Files
tailscale/client/web/pnpm-workspace.yaml
Jim Wright e232b0a131 client/web,release/dist: move web client from yarn to pnpm (#22464)
Import yarn.lock into pnpm with the same supply-chain settings as
cmd/tsconnect, plus overrides replacing yarn resolutions, two narrow
trustPolicyExclude entries for packages published without provenance,
and denied esbuild/@swc/core install scripts.

Switch assets.go, cmd/build-webclient, release/dist and CI to
tool/pnpm. release/dist now looks up pnpm only when building web
client assets; Build.Yarn is deprecated.

Updates tailscale/corp#51439

Change-Id: Ib472fc8439e916bfe41158e3952f9fa8c02f522d

Signed-off-by: Jim Wright <[email protected]>
2026-11-17 13:07:03 -07:00

65 lines
2.6 KiB
YAML

# pnpm settings for client/web. Use ./tool/pnpm (pinned in tool/pnpm.rev)
# rather than a globally installed pnpm.
#
# Most of these are supply-chain hardening settings. Several match pnpm's
# defaults but are set explicitly so that they're visible and can't be
# silently weakened by a future default change.
# See https://pnpm.io/settings for details.
# Don't install any version (direct or transitive) published less than 7 days
# ago, and fail rather than fall back to a newer version if nothing in the
# requested range is old enough.
minimumReleaseAge: 10080 # minutes
minimumReleaseAgeStrict: true
# Fail if the registry doesn't tell us when a version was published, rather
# than skipping the age (and trust) check.
minimumReleaseAgeIgnoreMissingTime: false
# Fail if a package's trust level (e.g. trusted publishing / provenance) has
# decreased compared to its earlier releases.
trustPolicy: no-downgrade
# undici-types 6.19.3-6.21.0 were published by the same maintainer as the
# surrounding releases but without provenance, which trips no-downgrade. Exclude
# only the exact version we lock (inherited from the old yarn.lock).
#
# vite 5.4.20 and 5.4.21 (used by vitest) were published by vitebot with
# provenance but not via trusted publishing, so no-downgrade would otherwise
# fall back to 5.4.19, losing dev server fs.deny security fixes.
trustPolicyExclude:
- [email protected]
- [email protected]
# Re-check minimumReleaseAge and trustPolicy against lockfile entries on every
# install, so a hand-edited lockfile can't bypass them.
trustLockfile: false
# Only direct dependencies may come from git repos or tarball URLs.
blockExoticSubdeps: true
# Don't run dependency lifecycle scripts unless the package is set to true in
# allowBuilds, and fail the install if an unlisted package wants to run one.
strictDepBuilds: true
dangerouslyAllowAllBuilds: false
# esbuild and @swc/core postinstall scripts only verify/optimize the native
# binaries, which are already installed via their per-platform optional
# dependencies, so they're explicitly denied.
allowBuilds:
"@swc/core": false
esbuild: false
# Verify package contents in the store before linking them into node_modules.
verifyStoreIntegrity: true
strictStorePkgContentCheck: true
# Error out rather than downloading a different pnpm version if package.json
# ever declares one that doesn't match tool/pnpm.rev.
pmOnFail: error
frozenLockfile: true
# Formerly "resolutions" in package.json (yarn). eslint-config-react-app
# depends on @typescript-eslint v5, which doesn't support newer TypeScript.
overrides:
"@typescript-eslint/eslint-plugin": ^6.2.1
"@typescript-eslint/parser": ^6.2.1