Skip to content

build: support npm/yarn/pnpm + Changesets publishing#150

Merged
JumpLink merged 1 commit into
mainfrom
feat/multi-pm-changesets
Jun 22, 2026
Merged

build: support npm/yarn/pnpm + Changesets publishing#150
JumpLink merged 1 commit into
mainfrom
feat/multi-pm-changesets

Conversation

@JumpLink

Copy link
Copy Markdown
Owner

Install with any package manager + set up npm publishing (Changesets)

Makes the monorepo installable with npm, yarn, pnpm or gjsify, and sets up npm publishing for @learn6502/6502 via Changesets.

Why / what

  • Drop the workspace: protocol → internal deps use plain ^0.7.0 ranges. npm and classic yarn can't resolve workspace: (only berry/pnpm/gjsify can); plain ranges work with all of npm/yarn/pnpm/gjsify (each symlinks the dep to the local workspace).
  • Changesets (fixed group over @learn6502/*) bumps versions and rewrites the internal ^ ranges automatically — no hand-sync footgun. @learn6502/6502 (the standalone, zero-dep core) is made public; common-ui/examples/learn flipped to private so only 6502 publishes. Adds @changesets/cli + changeset/changeset:version/changeset:publish scripts + .changeset/config.json.
  • 6502 publish-readiness: types/files/repository/publishConfig: { access: public }.
  • pnpm: committed pnpm-workspace.yaml (pnpm ignores the workspaces field) + .npmrc with link-workspace-packages=true (pnpm 10 won't link local workspaces for plain ranges otherwise) and node-linker=hoisted (the strict layout breaks the gjsify bundler's --globals auto).
  • Manual Package Managers workflow (workflow_dispatch + weekly cron, never per-PR) verifying npm/yarn/pnpm/gjsify each install + resolve the workspaces.
  • README: install via npm/yarn/pnpm/gjsify (gjsify recommended) + a Releasing (Changesets) section.
  • Regenerated gjsify-lock.json (+ the @changesets/cli subtree; no existing dep bumped) and gjsify-sources.json (+52 tarballs, purely additive — so the offline Flatpak build still installs).

Verified (real install + build, isolated worktrees)

PM install cross-workspace resolution / build
npm 11 ✅ exit 0 ✅ 6502 build + common-ui check (0 TS2307)
yarn v1 (1.22.22) ✅ (was broken on workspace:^)
pnpm 10 ✅ (via .npmrc) full app-gnome build (431 KB exe, no Unsupported URI scheme regression)
gjsify

(The .npmrc pnpm keys are cosmetic-only for npm — "Unknown project config" warnings, install still exit 0 — and ignored by yarn/gjsify.)

Note on publishing

This sets the repo publish-ready; the first @learn6502/6502 npm publish (scope + auth/OIDC) is a maintainer step. After that, the Changesets flow (changesetchangeset:versionchangeset:publish) takes over.

Make the monorepo installable with any package manager and set up npm
publishing for @learn6502/6502 via Changesets.

- Drop the `workspace:` protocol: internal deps now use plain `^0.7.0`
  ranges. npm and classic yarn can't resolve `workspace:` (only
  berry/pnpm/gjsify can); plain ranges work with ALL of npm/yarn/pnpm/gjsify,
  which every PM symlinks to the local workspace.
- Changesets: version-locked `fixed` group for all @learn6502/*; bumps the
  internal ^ranges automatically (no hand-sync footgun). `@learn6502/6502`
  is made public (the standalone, zero-dep core); common-ui/examples/learn
  flipped to `private` so only 6502 publishes. Adds @changesets/cli +
  changeset/changeset:version/changeset:publish scripts + .changeset/config.json.
- 6502 publish-readiness: types/files/repository/publishConfig(access:public).
- pnpm-workspace.yaml (pnpm ignores the package.json `workspaces` field) with
  nodeLinker: hoisted (the strict layout breaks the gjsify bundler's
  --globals auto node-builtin resolution).
- Manual `Package Managers` CI workflow (workflow_dispatch + weekly cron, NOT
  per-PR) verifying npm/yarn/pnpm/gjsify each install + resolve the workspaces.
- README: document install via npm/yarn/pnpm/gjsify (gjsify recommended) + a
  Releasing (Changesets) section.
- Regenerate gjsify-lock.json (adds the @changesets/cli subtree; no existing
  dep bumped).
@JumpLink JumpLink merged commit 295966e into main Jun 22, 2026
3 checks passed
@JumpLink JumpLink deleted the feat/multi-pm-changesets branch June 22, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant