Skip to content

Rename the npm package to @githubnext/projections-sdk - #394

Merged
agorischek merged 9 commits into
mainfrom
sdk/rename-projections-sdk
Dec 5, 2026
Merged

agorischek merged 9 commits into
mainfrom
sdk/rename-projections-sdk

Conversation

@agorischek

@agorischek agorischek commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Renames the npm package @githubnext/projections (packages/sdk/) to @githubnext/projections-sdk. The bare name suggests installing the product, and the CLI will never be distributed through npm. The subpaths are unchanged: /renderer, /renderer/react, /kit, /kit/react, /vite, /testing, /schemas, /extractor and the CSS entries. The internal workspace @githubnext/projections-renderer-sdk keeps its name.

  • Package and workspace. packages/sdk/package.json is renamed, and so are the workspace dependencies on it (packages/cli, examples/extractors, examples/renderers/minimal). package-lock.json was regenerated through the configured feed: the only changes are the workspace link and those dependency keys. npm also re-sorts entries that are out of order on main, so to keep the diff small the committed lockfile is main's with the rename applied. It's semantically identical to the regenerated one (checked by comparing parsed JSON).
  • Imports. Every import, dependency and specifier now uses the new name: the CLI's init templates (renderer package.json, vite.config.ts, views, browser spec, extract.mjs, SKILL.md), the examples, the .github/projections extractors (self-topology and the others), the renderer SDK's Vite default kit (@githubnext/projections-sdk/kit), and the CLI's Node extractor helper (register.cjs now resolves @githubnext/projections-sdk/extractor).
  • Tarball names follow npm pack. The release asset is now githubnext-projections-sdk-<version>.tgz, and the dogfood tarball from tools install is dist/dogfood/githubnext-projections-sdk.tgz. The Rust RENDERER_PACKAGE and CHECKOUT_TARBALL constants, the release-notes upgrade line (tools/cli/src/lib/changelog-notes.ts), tools install and their tests are updated to match.
  • Checks that treated the bare name as public. Three checks recognize internal workspaces by the @githubnext/projections- prefix, which -sdk now matches too: the renderer dependency rule in check-boundaries.mjs, tsdown's alwaysBundle and check-pack.mjs's internal-name scan. Each now exempts this package's own name, which keeps the previous behaviour.
  • Docs. The SDK README (title and frontmatter), the guides, contracts, maintainer docs (including docs/maintainers/npm-publishing.md), setup docs, the generated reference pages and agent prompt, the CI rules and workflow comments, and dist-workspace.toml comments are updated. Links to the renamed heading now use #install-githubnextprojections-sdk.

How scaffolds reference the package

This hasn't changed, apart from the name. projections init --renderer custom writes a renderer package.json that depends on the tarball attached to the CLI's GitHub release, by URL: "@githubnext/projections-sdk": "https://github.com/githubnext/projections/releases/download/v<version>/githubnext-projections-sdk-<version>.tgz". The URL comes from npm pack's file name for the renamed package, which is what the release proof job attaches. Two overrides still work the same way. When PROJECTIONS_RENDERER_PACKAGES names a directory of npm pack tarballs, the renderer depends on the tarball there (file:) through dependencies and overrides. A development build run from a source checkout uses file: to depend on dist/dogfood/githubnext-projections-sdk.tgz.

For downstream consumers

The package has never been published to npm (npm view @githubnext/projections and npm view @githubnext/projections-sdk both return 404). Anything that depends on or imports the package must change once this merges:

  • the dependency key and tarball URL in package.json;
  • the import specifiers (@githubnext/projections/... becomes @githubnext/projections-sdk/...);
  • extractors that install the package themselves (the dependency key).

Custom extractors run with node keep working: the CLI resolves both @githubnext/projections-sdk/extractor and the former @githubnext/projections/extractor (register.cjs and hooks.mjs), so comparisons that run an extractor committed before the rename still load it.

The changelog fragments describe the upgrade: changelog.d/394.md for renderer authors, and changelog.d/394-authoring.md for extractor authors.

Refs #305

Evidence

Disk on this machine was limited, so heavy builds were left to CI (see below).

  • npm run format:check: passed.

  • npm run check:boundaries: passed.

  • npm run tools -- check --fast: all gates passed (boundaries, links, lockfile, changelog, format, cargo-fmt, typecheck, lint, cargo check) except considered, which isn't installed here.

  • npm run docs:check: the TSDoc coverage and agent-text tests passed. With the CLI built locally (PROJECTIONS_BIN), --check --only cli,action,schemas,extractors reported all pages up to date. The agent prompt (docs/agents/create-projection.md) matches projections help authoring except for the built-in renderer list, which a debug build without bundled renderers can't print. The renderer-sdk, renderers and builtins pages need the full workspace build (including the Wasm engine), so they were not regenerated here; CI's docs job checks them.

  • node --test tools/cli/test/changelog.test.ts tools/cli/test/install.test.ts tools/scripts/check-change-hues.test.mjs: 18 passed.

  • npm run tools -- test packages/renderers/sdk: 127 passed and 3 failed. After fixing the one rename-related failure (a regex in vite.test.mjs with escaped slashes), vite.test.mjs passed 8 of 8. The two remaining failures in notices.test.mjs read built renderer bundles (packages/renderers/graph/dist) that weren't built here. Its test on the renamed node_modules/@githubnext/projections-sdk path passed.

  • Not run locally, left to CI: the packages/sdk tests and pack check (they need the Wasm engine build), and the Rust scaffold and authoring tests (cargo test -p projections-cli). The Rust changes are the two constants and matching test expectations; the tarball-version parser derives its prefix from the package name.

  • git grep -n -E "@githubnext/projections([^-a-zA-Z0-9_]|$)", plus searches for escaped and tarball spellings: nothing remains outside CHANGELOG.md history.

  • Documentation that this change affects is updated, and generated reference
    pages are regenerated (npm run docs:generate).

  • Fixes include a regression test.

  • A changelog fragment at changelog.d/<this PR's number>.md describes what
    users will notice, or the PR has the no changelog label (see
    changelog.d/README.md).

  • No credentials, private source or machine-specific paths are included.

agorischek and others added 4 commits December 4, 2026 21:21
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
… anchors

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Historical revisions still import @githubnext/projections/extractor, so both resolver paths must retain it as an alias to prevent comparison failures when the package is not installed.

1 open issue
What changed in this PR

Renames the public authoring package to @githubnext/projections-sdk, distinguishing it from the Projections CLI while preserving its existing subpaths.

Changes:

  • Updates dependencies, imports, scaffolds and extractor resolution.
  • Aligns release tarballs, development installation tooling and package checks.
  • Updates documentation, examples, tests and migration notes; npm publishing remains gated.
File Description
tools/​scripts/​reference-docs/​renderer-sdk.mjs Generates references with the new package name.
tools/​scripts/​check-change-hues.test.mjs Updates the example dependency fixture.
tools/​scripts/​check-boundaries/​layers.mjs Updates the package comment.
tools/​scripts/​check-boundaries.mjs Exempts the public SDK from internal-package matching.
tools/​cli/​test/​install.test.ts Updates installation expectations.
tools/​cli/​test/​changelog.test.ts Updates release-note expectations.
tools/​cli/​src/​setup.ts Updates installation help text.
tools/​cli/​src/​lib/​install.ts Renames package and development tarball constants.
tools/​cli/​src/​lib/​generated.ts Targets the renamed workspace generator.
tools/​cli/​src/​lib/​changelog.ts Updates renderer-author section wording.
tools/​cli/​src/​lib/​changelog-notes.ts Emits renamed upgrade URLs.
tools/​cli/​src/​commands/​install.ts Updates installation comments.
tools/​cli/​README.md Documents renamed development tarballs.
packages/​sdk/​tsdown.config.ts Exempts the public SDK from internal bundling matching.
packages/​sdk/​src/​workbench.ts Updates the testing-entry comment.
packages/​sdk/​src/​extractor.ts Updates the extractor-entry comment.
packages/​sdk/​scripts/​release-asset.mjs Updates release-asset comments.
packages/​sdk/​scripts/​extractor-module.mjs Updates the generated module header.
packages/​sdk/​scripts/​check-pack.mjs Allows the public SDK name in packed output.
packages/​sdk/​README.md Documents renamed entries and installation links.
packages/​sdk/​package.json Renames the public package.
packages/​schemas/​fixtures/​extractor-helpers.json Updates fixture description wording.
packages/​renderers/​testing/​src/​checks.ts Updates the testing-entry documentation comment.
packages/​renderers/​testing/​README.md Updates testing imports and installation instructions.
packages/​renderers/​sdk/​test/​vite.test.mjs Expects renamed generated imports.
packages/​renderers/​sdk/​test/​notices.test.mjs Uses the renamed installed-package fixture.
packages/​renderers/​sdk/​src/​vite.ts Changes the default kit import path.
packages/​renderers/​sdk/​README.md Updates SDK usage examples.
packages/​renderers/​sdk/​build/​notices.mjs Updates the installed-package comment.
packages/​renderers/​README.md Updates public package references.
packages/​renderers/​kit/​src/​timeline.ts Updates the timeline comment.
packages/​renderers/​kit/​src/​palette.ts Updates palette documentation wording.
packages/​renderers/​kit/​README.md Documents renamed kit entries.
packages/​integrations/​vscode/​README.md Updates the workbench package reference.
packages/​cli/​tests/​authoring.rs Updates package-version warning expectations.
packages/​cli/​test/​extractor-helpers/​driver.mjs Imports the renamed extractor entry.
packages/​cli/​test/​extractor-helpers.test.mjs Updates helper-test comments.
packages/​cli/​templates/​SKILL.md Updates scaffolded authoring guidance.
packages/​cli/​templates/​renderer/​vite.config.ts Uses the renamed Vite entry.
packages/​cli/​templates/​renderer/​src/​view.tsx Updates starter view imports.
packages/​cli/​templates/​renderer/​src/​diff.tsx Updates starter diff imports.
packages/​cli/​templates/​renderer/​package.json Renames the dependency and release URL.
packages/​cli/​templates/​renderer/​browser/​renderer.spec.ts Uses the renamed testing entry.
packages/​cli/​templates/​extract.mjs Uses the renamed extractor entry.
packages/​cli/​src/​scaffold/​tests.rs Updates package and tarball expectations.
packages/​cli/​src/​scaffold/​package.rs Renames scaffold package and tarball constants.
packages/​cli/​src/​runtime/​extract.rs Updates extractor-loading comments.
packages/​cli/​src/​node.rs Updates helper documentation and test imports.
packages/​cli/​src/​main.rs Updates hidden-command help wording.
packages/​cli/​src/​doctor.rs Updates the package-check comment.
packages/​cli/​src/​commands/​help/​init.after-help.md Documents renamed scaffold installation paths.
packages/​cli/​src/​commands/​authoring.rs Updates installation messages.
packages/​cli/​src/​check/​renderer.rs Updates the version-warning comment.
packages/​cli/​package.json Renames the SDK development dependency.
packages/​cli/​node/​register.cjs Resolves the new extractor specifier.
packages/​cli/​node/​extractor.mjs Updates the generated header comment.
packages/​cli/​browser/​starter.ts Updates the starter-test comment.
package-lock.json Updates workspace links and dependency keys.
examples/​renderers/​minimal/​vite.config.ts Uses the renamed Vite entry.
examples/​renderers/​minimal/​src/​main.ts Updates renderer and schema imports.
examples/​renderers/​minimal/​README.md Updates renderer usage instructions.
examples/​renderers/​minimal/​package.json Renames the SDK dependency.
examples/​renderers/​minimal/​browser/​renderer.spec.ts Uses the renamed testing entry.
examples/​renderers/​minimal/​.github/​workflows/​renderer.yml Updates the CLI-version matching comment.
examples/​extractors/​typescript-common/​basics.mjs Uses the renamed extractor helpers.
examples/​extractors/​test-support.mjs Updates the preload comment.
examples/​extractors/​README.md Updates helper-package documentation.
examples/​extractors/​package.json Renames the SDK development dependency.
examples/​extractors/​class-summaries/​test/​class-summaries.test.mjs Updates the helper import.
examples/​extractors/​class-summaries/​README.md Updates helper-entry documentation.
examples/​extractors/​class-summaries/​extract.mjs Updates generation-helper imports.
docs/​setup/​first-projection.md Updates scaffold and installation guidance.
docs/​setup/​early-access.md Documents renamed development installation paths.
docs/​runner/​commands.md Updates scaffold package references.
docs/​reference/​renderer-sdk.md Updates API package names and examples.
docs/​reference/​renderer-messages.md Updates protocol export references.
docs/​reference/​renderer-kit.md Updates kit API entry names.
docs/​README.md Updates the public SDK link label.
docs/​models/​domain-model.md Updates package and testing references.
docs/​maintainers/​releasing.md Documents renamed release assets.
docs/​maintainers/​npm-publishing.md Updates publishing setup package names.
docs/​guides/​renderer-sdk.md Updates SDK imports and stylesheet paths.
docs/​guides/​renderer-kit.md Updates kit imports and entry references.
docs/​guides/​renderer-kit-components.md Updates component examples and references.
docs/​guides/​how-it-works.md Updates generation-helper imports.
docs/​guides/​first-extractor.md Updates extractor setup examples.
docs/​guides/​develop-a-renderer.md Updates installation URLs and renderer imports.
docs/​guides/​change-emphasis.md Updates example imports.
docs/​design/​proposals/​skills-distribution.md Updates the proposed distribution package name.
docs/​design/​generated-values.md Updates helper imports and references.
docs/​design/​desktop-surfaces.md Updates the workbench package reference.
docs/​contracts/​scenarios.md Updates workbench and testing references.
docs/​contracts/​packages.md Documents renamed public entries and assets.
docs/​contracts/​extractors.md Documents the new injected specifier.
docs/​contracts.md Updates schema-entry references.
docs/​agents/​create-projection.md Updates generated authoring guidance.
dist-workspace.toml Updates release and publishing comments.
CONTRIBUTING.md Updates package-layout and publishing documentation.
changelog.d/​review-sentence-renderer-authors.md Updates the unreleased SDK import reference.
changelog.d/​README.md Updates renderer-author section guidance.
changelog.d/​394.md Adds renderer migration instructions.
changelog.d/​394-behaviour-changes.md Adds extractor migration instructions.
.github/​workflows/​release-proof.yml Updates the package-job comment.
.github/​workflows/​publish-npm.yml Checks publication under the new package name.
.github/​workflows/​ci.yml Updates the package-check comment.
.github/​projections/​self-topology/​extract.mjs Uses the renamed extractor entry.
.github/​projections/​self-authoring-sdk.json Updates the projection description.
.github/​projections/​self-authoring-api/​extract.mjs Updates helper imports and SDK comments.
.github/​projections/​agent-tools/​extract.mjs Uses the renamed extractor entry.
.github/​ci-rules.json Updates SDK check descriptions.
.github/​actions/​package/​action.yml Updates the package-action description.

Review effort: Balanced

Comment thread packages/cli/node/register.cjs Resolved
agorischek and others added 5 commits December 4, 2026 22:59
…mitted before the rename

Comparisons run the extractor a base revision committed, so its import of the former
specifier must keep resolving. Both resolver paths (register.cjs and hooks.mjs) accept it.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@agorischek
agorischek merged commit d1264da into main Dec 5, 2026
107 of 110 checks passed
@agorischek
agorischek deleted the sdk/rename-projections-sdk branch December 5, 2026 03:10
@agorischek agorischek mentioned this pull request Dec 5, 2026
3 of 4 tasks
agorischek added a commit that referenced this pull request Dec 5, 2026
Adopt's new `skipped` and a sweep cell's `items` (#390) are declared in the
CLI schemas, and the changelog names the renamed SDK package (#394).

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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.

2 participants