Summary
JFrog CLI now natively supports pnpm via jf pnpm (install/publish with build-info tracking). We should add pnpm as a first-class package manager to the jfrog-token and jfrog-oauth modules in coder/registry, alongside the existing npm, go, pypi, docker, conda, and maven support.
References
Requirements
- pnpm 10.x or 11.x (11.x needs JFrog CLI >= 2.116.0)
- Node.js 20+
- An npm-type Artifactory repository (reused for pnpm)
.npmrc with registry URL + auth (same file pnpm reads)
Proposed changes
Apply to both registry/coder/modules/jfrog-token and registry/coder/modules/jfrog-oauth:
- Extend the
package_managers variable with a new optional pnpm list:
pnpm = optional(list(string), [])
- Reuse the existing
.npmrc.tftpl template for pnpm (same registry + auth format). If both npm and pnpm are provided pointing to different repos, decide behavior: either (a) require they resolve to the same repo, or (b) generate a merged .npmrc with the pnpm entries scoped appropriately.
- In
run.sh, add a pnpm block mirroring the npm block:
if [ -z "${HAS_PNPM}" ]; then
not_configured pnpm
else
echo "📦 Configuring pnpm..."
jf pnpmc --global --repo-resolve "${REPOSITORY_PNPM}"
cat << EOF > ~/.npmrc
${NPMRC}
EOF
config_complete
fi
Note: verify the exact config subcommand name (jf pnpmc vs jf pnpm-config) against the shipped CLI.
- Pass
HAS_PNPM, REPOSITORY_PNPM into the templatefile(...) call in main.tf.
- Update
README.md examples to include pnpm = ["npm-local"] (or a dedicated repo) and show jf pnpm install <pkg> usage.
- Add a
pnpm case in *.tftest.hcl to assert the script contains the jf pnpmc invocation.
- Bump module versions and note the new input in the changelog/README.
Notes / open questions
- pnpm uses the same npm-type Artifactory repo, so we may not need a separate variable — but a dedicated
pnpm key keeps the UX consistent and future-proofs it if JFrog diverges.
- The module doesn't install pnpm itself (matches existing behavior for
npm, go, etc.) — document this in the README.
- Confirm minimum
jf CLI version we should recommend (>= 2.98.0 for pnpm 10.x, >= 2.116.0 for pnpm 11.x).
Created on behalf of @matifali
Summary
JFrog CLI now natively supports pnpm via
jf pnpm(install/publish with build-info tracking). We should addpnpmas a first-class package manager to thejfrog-tokenandjfrog-oauthmodules incoder/registry, alongside the existingnpm,go,pypi,docker,conda, andmavensupport.References
Requirements
.npmrcwith registry URL + auth (same file pnpm reads)Proposed changes
Apply to both
registry/coder/modules/jfrog-tokenandregistry/coder/modules/jfrog-oauth:package_managersvariable with a new optionalpnpmlist:.npmrc.tftpltemplate for pnpm (same registry + auth format). If bothnpmandpnpmare provided pointing to different repos, decide behavior: either (a) require they resolve to the same repo, or (b) generate a merged.npmrcwith the pnpm entries scoped appropriately.run.sh, add apnpmblock mirroring thenpmblock:jf pnpmcvsjf pnpm-config) against the shipped CLI.HAS_PNPM,REPOSITORY_PNPMinto thetemplatefile(...)call inmain.tf.README.mdexamples to includepnpm = ["npm-local"](or a dedicated repo) and showjf pnpm install <pkg>usage.pnpmcase in*.tftest.hclto assert the script contains thejf pnpmcinvocation.Notes / open questions
pnpmkey keeps the UX consistent and future-proofs it if JFrog diverges.npm,go, etc.) — document this in the README.jfCLI version we should recommend (>= 2.98.0 for pnpm 10.x, >= 2.116.0 for pnpm 11.x).Created on behalf of @matifali