diff --git a/.npmrc b/.npmrc deleted file mode 100644 index b68c7b1b..00000000 --- a/.npmrc +++ /dev/null @@ -1,13 +0,0 @@ -# pnpm-specific settings. npm/yarn/gjsify ignore these keys (npm may print a -# cosmetic "unknown config" for node-linker — install still works). -# -# link-workspace-packages: the internal deps use plain `^x.y.z` ranges (not the -# `workspace:` protocol). pnpm 10 defaults this to false, so without it pnpm -# fetches @learn6502/* from the registry (404) instead of linking the local -# workspace. true makes pnpm resolve a workspace-named dep to the local package. -link-workspace-packages=true -# node-linker: flat node_modules (like npm/yarn/gjsify). pnpm's default strict -# symlinked layout hides the gjsify bundler's node-builtin polyfills -# (@gjsify/node-globals etc.) → `--globals auto` fails the build with -# "Unsupported URI scheme for importing: node". -node-linker=hoisted diff --git a/README.md b/README.md index 250dd950..158137fb 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ npm run build && npm run start:gnome # or the yarn / pnpm equivalent Notes: - **gjsify is the canonical path** — the committed `gjsify-lock.json` and the offline Flatpak build use it. npm/yarn/pnpm generate their own lockfiles (gitignored); they're fine for local dev, please don't commit them. -- **pnpm** relies on the committed `pnpm-workspace.yaml` (pnpm doesn't read the `workspaces` field) plus `.npmrc` — `link-workspace-packages=true` (so plain `^` ranges link the local workspaces) and `node-linker=hoisted` (flat layout the gjsify bundler needs). +- **pnpm** relies on the committed `pnpm-workspace.yaml` (pnpm reads its workspace members + settings there, not the `workspaces` field or a project `.npmrc`) — `linkWorkspacePackages: true` (so plain `^` ranges link the local workspaces) + `nodeLinker: hoisted` (flat layout the gjsify bundler needs). - The internal packages use plain `^x.y.z` ranges (not the `workspace:` protocol), which is why every manager — including npm and classic yarn — can resolve them. - A manual **Package Managers** CI workflow verifies all four managers install + resolve the workspaces; trigger it from the Actions tab if you touch the dependency wiring. diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 74c6580c..fcceb62d 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,20 @@ -# pnpm reads workspace members from this file (it does NOT read the package.json -# "workspaces" field). Install behaviour (link-workspace-packages, node-linker) -# lives in .npmrc. +# pnpm config lives here (pnpm 10 reads settings from pnpm-workspace.yaml, NOT +# the package.json "workspaces" field, and — unlike npm — not reliably from a +# project .npmrc). +# +# - linkWorkspacePackages: the internal deps use plain `^x.y.z` ranges (not the +# `workspace:` protocol). pnpm 10 defaults this to false, so without it pnpm +# fetches @learn6502/* from the registry (404, unpublished) instead of linking +# the local workspace. +# - nodeLinker: flat node_modules (like npm/yarn/gjsify). pnpm's default strict +# symlinked layout hides the gjsify bundler's node-builtin polyfills +# (@gjsify/node-globals etc.) → `--globals auto` fails the build with +# "Unsupported URI scheme for importing: node". +# - minimumReleaseAge: 0 disables pnpm's new-version quarantine. The other PMs +# (npm/yarn/gjsify) have no such gate, so this keeps pnpm consistent and stops +# it blocking freshly-published @gjsify/* right after a gjsify release. packages: - "packages/*" +linkWorkspacePackages: true +nodeLinker: hoisted +minimumReleaseAge: 0