chore: upgrade pnpm to 11.9.0 - #1781
Conversation
Pin pnpm_version to 11.9.0 in CI workflows, set packageManager field via corepack, and add pnpm-workspace.yaml with allowBuilds for native deps (@parcel/watcher, esbuild, sharp, unrs-resolver) required under pnpm 11's stricter build-script gating.
3e3324b to
1a3853c
Compare
pnpm 11's stricter hoisting no longer resolves tailwindcss transitively for eslint-plugin-tailwindcss in examiner/host-pm/platform/strata, crashing eslint entirely (Could not find tailwindcss). It was already present in each lockfile as a transitive dep; declaring it directly fixes resolution without changing the resolved version (3.4.19).
The git-hosted layer reference (github:bcgov/STRR/strr-base-web) is cloned by giget into an isolated node_modules/.c12/<hash> tree with no node_modules of its own, so its tsconfig.json (and anything depending on generated .nuxt/tsconfig.json) can't resolve under pnpm 11's resolution behavior. This broke nuxt prepare for all 4 downstream apps, which in turn broke both eslint's typescript/import resolvers (200+ spurious lint errors) and the Nuxt build itself. Switching to a local relative-path extends avoids the git-clone isolation entirely. Since the sibling app's own .nuxt/tsconfig.json may not exist in a fresh checkout (CI only runs each app's own nuxt prepare), each consuming app eagerly installs and prepares strr-base-web if missing, before Nuxt evaluates its config.
All 4 STRR frontend CD files (examiner/host-pm/platform/strata) were still hardcoded to pnpm_version: 10.0.0, unrelated to and never touched by the pnpm-v11 CI migration on this branch.
Picker.vue uses raw @use 'tailwindcss/base'/'components'/'utilities' imports, but strr-base-web never declared tailwindcss itself as a dependency - it only worked by relying on hoisting from whichever app extended the layer. Under pnpm v11's stricter per-package node_modules, that resolution fails, breaking strr-host-pm-web's build/tests since it's the only app that actually renders ConnectFormDateInput.
# Conflicts: # strr-base-web/pnpm-lock.yaml
…spec ConnectFeeInfo.* strings live only in strr-base-web's own locale file. Under mountSuspended, the real @nuxtjs/i18n module doesn't merge that layer's locale file in, so the component's auto-imported useI18n() resolved against messages missing those keys - independent of the test's own baseEnI18n mock, which was only ever used to compute the expected assertion values, not to back the rendered component. Stub useI18n via mockNuxtImport (already used elsewhere in this test suite for other auto-imports) so the component resolves against the same baseEnI18n messages the assertions are built from.
…re shim
Sonar flagged execSync('npx --yes pnpm install ...')/('npx --yes nuxi
prepare ...') in all 4 apps' nuxt.config.ts (typescript:S4036 - PATH
search for the executed command). Replace with pre-resolved absolute
paths: corepack (bundled next to the running node binary, so still
honours strr-base-web's own pinned packageManager version the same
way npx did) for the install step, and nuxt's own package.json 'bin'
field (the same lookup pnpm's own generated shim uses, since nuxt's
'exports' map doesn't expose './bin/nuxt.mjs' for require.resolve)
for the prepare step.
Verified locally via a simulated fresh checkout (node_modules/.nuxt
deleted) that both steps still run and the build completes.
… module The PATH-avoidance fix from the previous commit was correct but duplicated the same ~27 lines across all 4 apps' nuxt.config.ts, which pushed SonarCloud's New Code duplication gate from 7.2% to 15.6%. Move the logic into strr-base-web/prepare.mjs (a plain module with no external deps of its own, safe to import even before strr-base-web's own node_modules exists) and have each app just call ensureStrrBaseWebPrepared(). Verified locally via a simulated fresh checkout that both the prepare step and the full build still succeed.
|
/gcbrun |
|
Temporary Url for review: https://strr-strata-hotel-dev--pr-1781-331fqimk.web.app |
|
Temporary Url for review: https://strr-platform-dev--pr-1781-3viy7v9o.web.app |
|
Temporary Url for review: https://strr-examiner-dev--pr-1781-hitdz37x.web.app |
|
Temporary Url for review: https://strr-hosts-dev--pr-1781-t1669sum.web.app |
599e7c8 to
cc0934e
Compare
|
|
@jimmypalelil - this PR is fully green (CI/SonarCloud/Cloud Build preview all pass) and ready to merge. If you'd like to validate on the real dev environment before merging, could you push this branch into bcgov/STRR as |



Fresh PR replacing #1747 (closed while testing was still in progress).
Scoped strictly to pnpm 11.9.0: version pins (
pnpm_version,packageManager,pnpm/action-setup@v6),--ignore-scriptswhere needed, and pinning the smoke-test workflows off the floatinglatest-11tag.Note: strr-examiner-web, strr-host-pm-web, strr-platform-web, and strr-strata-web will still fail
verify-build— this is the pre-existing, already-known upstream Nuxt/c12#importsresolution bug for git-hosted layers (unrelated to pnpm, confirmed via A/B test against the pre-pnpm-11 code). Deliberately left unfixed here per @panish16's request to keep this PR pnpm-only.