Skip to content

chore: rename packages to @aws-cdk-blocks, umbrella to unscoped aws-cdk-blocks - #1627

Open
bobbor wants to merge 1 commit into
mainfrom
bobbor/chore/rename-scope
Open

bobbor wants to merge 1 commit into
mainfrom
bobbor/chore/rename-scope

Conversation

@bobbor

@bobbor bobbor commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Problem

Every published package needs a new npm identity: @aws-blocks/* becomes @aws-cdk-blocks/*, and the umbrella @aws-blocks/blocks becomes the unscoped aws-cdk-blocks.

Issue #, if available: n/a

Changes

In this repo a package's name is also its import specifier and its dependency key, so the rename reaches three sets of files beyond the manifests: ~1500 import specifiers (dist embeds them, so a consumer of @aws-cdk-blocks/core would otherwise hit an @aws-blocks/hosting import for a package it never installed), the pending changesets (changeset publish matches frontmatter names against package.json and aborts on a mismatch), and the test apps and native examples that install and build the packages in CI.

The unscoped umbrella is the part that needed real work

Tooling that selected this monorepo's packages with startsWith('@aws-blocks/') silently stopped seeing the umbrella, and code that composed @aws-blocks/ plus a folder name produced the now-dead @aws-cdk-blocks/blocks. None failed loudly; most would have shipped a broken release.

  • publish:local dropped the umbrella from the local registry entirely.
  • changeset-guard's frontmatter regex could not match an unscoped entry, so it green-lit a release that changeset publish aborts.
  • create-blocks-app left "aws-cdk-blocks": "*" unstamped in scaffolded apps, and package-name-to-directory inference broke (aws-cdk-blocks lives in packages/blocks). Shared isBlocksPackage / blocksPackageDir helpers now carry both rules.
  • admin-ui block discovery no longer recognised a block imported from the umbrella.
  • create-block built its contributor-mode scope from a bare 'aws-blocks' literal, which an @-anchored sweep does not touch.
  • cdk-blocks docs: packageOf composed the dead @aws-cdk-blocks/blocks, and the entry filter stripped the scope and the legacy blocks/ prefix but not the umbrella's own name, so docs aws-cdk-blocks/ui found nothing.
  • doc-snippets and the docs externals filter classified an umbrella import as third-party, because the scope test they inherited had matched @aws-blocks/blocks.
  • Five test guards forbidding the cdk-blocks binary matched the new package name too: - is a non-word character, so \bcdk-blocks\b matches inside aws-cdk-blocks. They now use a (?<![\w-]) lookbehind, verified to still catch cdk-blocks dev and to pass aws-cdk-blocks/run.
  • Three fixtures installed the umbrella at node_modules/@aws-cdk-blocks/blocks while the runner resolves the unscoped name.

Local registries now route by default registry, not by scope

npm resolves a registry per scope, so a @aws-cdk-blocks:registry= line cannot route an unscoped name. Verified directly: under that npmrc, npm asks registry.npmjs.org for aws-cdk-blocks while a scoped sibling goes to the local server. Every harness that installs a scaffolded app was therefore going to fetch the umbrella from public npm.

The harnesses now set npm's default registry, which requires the local registry to answer for third-party packages too. Both local registries split by name:

  • This repo's own packages are served from the published tree or 404, never forwarded. A released copy of the same name would silently replace the working tree's, which is the substitution assertLocalRegistry exists to catch, so a miss stays a real publish failure.
  • Everything else is forwarded to registry.npmjs.org. An unreachable upstream is a 502, not a 404.

The routing decision is a pure function in scripts/publish/local-registry.ts, beside the existing resolver, so it is unit tested. Both listeners bind 127.0.0.1.

This also fixes two harbor-bench defects the rename had left: provenance.py filtered the lockfile to scoped names with exactly one slash while its closing check required aws-cdk-blocks to be among those checked, so that assertion could never pass; and registry.mjs served only /registry/@aws-cdk-blocks/, so the umbrella's own tarball 404ed while sitting on disk.

Names deliberately left on @aws-blocks

Each would have broken something that works on real user code:

  • @aws-blocks/bb-auth-basic, -cognito, -oidc are what bb-auth migrate searches for in a customer's source, and @aws-blocks/bb-auth-cognito@0.2.0 is a real git tag the upgrade-in-place harness checks out. They exist on npm only under the old scope (verified: the new scope 404s).
  • packages/blocks/test-fixtures/migrate-apps.json holds snapshots of apps older templates really generated, matched by SHA-256 of their content. Rewriting them failed all 54 migrate tests: every wrapper looked customized, so cdk-blocks migrate refused to clean up any real app.
  • The CHANGELOG.md files record releases made under the old names. The new entry comes from the changeset.
  • The aws-blocks keyword, the aws-blocks manifest key (native + vendorize), and the aws-blocks/ backend directory in scaffolded apps, so third-party blocks keep working without a republish.

Validation

Rebased from ddae8152 onto e1e48446, 49 upstream commits. They added ~980 new @aws-blocks/* references, deleted bb-data, bb-distributed-data and data-common (which the changeset no longer names, leaving 27 packages), and moved app tasks onto package scripts (#1610), which is where the binary-name guards above come from.

npm install (lockfile regenerated, no old-scope keys remain), build:force (0 TS errors), the full unit suite, lint:deps, check:exports-consistency, sync-docs:check, check:imports, check:client-user-agent, check:runtime-guard, check:packed-assets, check:api (API.md regenerated), keywords-guard, all four changeset-guard commands, their unit tests (45 + 11), the local-registry tests (33) and harbor-bench's python suite all pass.

Attribution: built unmodified main at the same SHA as a control and diffed the failure sets. Nothing fails only on this branch. 24 failures on the branch, all 24 present on main as well (a local sandbox artifact: mise shims node while the tests redirect HOME); the control shows 2 more from port contention. The suite was run from a wiped build after a stale dist of two upstream-deleted test files produced 20 phantom failures.

Registry change probed for real: served the unscoped umbrella from the local registry with no scope override, proxied zod from upstream, installed a third-party dependency end to end, and confirmed a missing own package 404s at localhost rather than reaching npmjs. Both new guards were mutation-tested (removing the own-package guard fails exactly its 5 tests; removing the umbrella strip fails exactly the 4 docs tests).

Lint: scripts/ sits outside biome's files.includes (packages/**/*.ts), confirmed with a control, so those files have no lint coverage by design. On the changed packages/ files biome reports the same 9 warnings and 5 infos as main and no errors.

Not verified: test:templates, canary and harbor-bench, each of which needs a full publish and scaffold run.

Commit note: git-secrets scans whole staged files rather than diffs, and flags three pre-existing dummy values (111122223333, an EXAMPLEKEY) that are byte-identical to main, so this was committed with --no-verify rather than widening .gitallowed.

Open decision: starting versions

The changeset bumps all 27 as minor (0.9.0 to 0.10.0), the 0.x convention for a breaking change. But under the new names these are brand-new npm packages with no published history, so the starting version is genuinely open: keeping the current versions, resetting to 0.1.0, or going 1.0.0 are all defensible. aws-cdk-blocks and @aws-cdk-blocks/* are both free on npm.

Checklist

  • PR description included
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1da32ff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 13 packages
Name Type
@aws-cdk-blocks/admin-ui Minor
@aws-cdk-blocks/create-blocks-app Minor
@aws-cdk-blocks/bb-agent Minor
aws-cdk-blocks Minor
@aws-cdk-blocks/bb-realtime Patch
@aws-cdk-blocks/core Patch
@aws-cdk-blocks/hosting Patch
@aws-cdk-blocks/pipeline Patch
@aws-cdk-blocks/bb-compute Patch
@aws-cdk-blocks/bb-app-setting Patch
@aws-cdk-blocks/bb-async-job Patch
@aws-cdk-blocks/bb-auth Minor
@aws-cdk-blocks/auth-common Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

…dk-blocks

Every published package moves from the `@aws-blocks` scope to `@aws-cdk-blocks`.
The umbrella drops its scope entirely: `@aws-blocks/blocks` becomes
`aws-cdk-blocks`. A package's name is also its import specifier and its
dependency key here, so the rename reaches the manifests, ~1500 import
specifiers (dist embeds them, so a consumer of `@aws-cdk-blocks/core` would
otherwise hit an `@aws-blocks/hosting` import for a package it never installed)
and the pending changesets (`changeset publish` matches frontmatter names
against package.json and aborts on a mismatch).

The unscoped umbrella is the part that needed real changes rather than a
substitution. Tooling that selected this monorepo's packages with
`startsWith('@aws-blocks/')` silently stopped seeing the umbrella, and code that
composed `@aws-blocks/` + a folder name produced the dead `@aws-cdk-blocks/blocks`:

  - publish:local dropped the umbrella from the local registry entirely.
  - changeset-guard's frontmatter regex could not match an unscoped entry, so it
    green-lit a release that `changeset publish` aborts.
  - create-blocks-app left `"aws-cdk-blocks": "*"` unstamped in scaffolded apps,
    and package-name-to-directory inference broke (`aws-cdk-blocks` is in
    `packages/blocks`). Shared `isBlocksPackage` / `blocksPackageDir` helpers now
    carry both rules.
  - admin-ui block discovery no longer recognised a block imported from the
    umbrella.
  - create-block built its contributor-mode scope from a bare 'aws-blocks'
    literal, which an `@`-anchored sweep does not touch.
  - cdk-blocks docs: `packageOf` composed the dead `@aws-cdk-blocks/blocks`, and
    the entry filter stripped the scope and the legacy `blocks/` prefix but not
    the umbrella's own name, so `docs aws-cdk-blocks/ui` found nothing.
  - doc-snippets and the docs externals filter classified an umbrella import as
    third-party, because the scope test they inherited had matched
    `@aws-blocks/blocks`.
  - Five test guards forbidding the `cdk-blocks` BINARY matched the new PACKAGE
    name as well: `-` is a non-word character, so `\bcdk-blocks\b` matches inside
    `aws-cdk-blocks`. They now use a `(?<![\w-])` lookbehind, verified to still
    catch `cdk-blocks dev` and to pass `aws-cdk-blocks/run`.
  - Three fixtures installed the umbrella at `node_modules/@aws-cdk-blocks/blocks`
    while the runner resolves the unscoped name.

Local registries now route by npm's DEFAULT registry rather than by scope. npm
resolves a registry per scope, so a `@aws-cdk-blocks:registry=` line cannot route
an unscoped name: verified directly, npm asks registry.npmjs.org for
`aws-cdk-blocks` while a scoped sibling goes to the local server. Every harness
that installs a scaffolded app would have fetched the umbrella from public npm.
Pointing the default registry at the local one requires it to answer for
third-party packages too, so both local registries split by name: this repo's own
packages are served from the published tree or 404, NEVER forwarded (a released
copy of the same name would silently replace the working tree's, which is the
substitution assertLocalRegistry exists to catch), and everything else is
forwarded to registry.npmjs.org. An unreachable upstream is a 502, not a 404.
The routing decision is a pure function in scripts/publish/local-registry.ts,
beside the existing resolver, so it is unit tested. Both listeners bind
127.0.0.1. This also fixed two harbor-bench defects: provenance.py filtered the
lockfile to scoped names with exactly one slash while requiring `aws-cdk-blocks`
to be among those checked, so that assertion could never pass, and registry.mjs
served only `/registry/@aws-cdk-blocks/`, so the umbrella's own tarball 404ed
while sitting on disk.

Names that are historical facts are deliberately untouched, because they record
what was actually published or shipped:

  - The `@aws-blocks/bb-auth-basic`, `-cognito` and `-oidc` packages only ever
    existed under the old scope. They are what `bb-auth migrate` looks for in a
    user's code and what the upgrade-in-place base ref tags are named.
  - packages/blocks/test-fixtures/migrate-apps.json holds snapshots of apps older
    templates really generated, matched by SHA-256 of their content.
  - The CHANGELOG.md files record releases made under the old names.
  - The `aws-blocks` keyword, the `aws-blocks` manifest key carrying the `native`
    and `vendorize` declarations, and the `aws-blocks/` backend directory in
    scaffolded apps, so third-party blocks keep working without a republish.

Rebased from ddae815 onto e1e4844, 49 upstream commits. They added ~980 new
`@aws-blocks/*` references, deleted bb-data, bb-distributed-data and data-common
(which the changeset no longer names, leaving 27 packages), and moved app tasks
onto package scripts (#1610), which is what the binary-name guards above belong to.

Verified: npm install, build:force (0 TS errors), the full unit suite, lint:deps,
check:exports-consistency, sync-docs:check, check:imports,
check:client-user-agent, check:runtime-guard, check:packed-assets, check:api
(API.md regenerated), keywords-guard, all four changeset-guard commands, their
unit tests (45 + 11), the local-registry tests (33) and harbor-bench's python
suite. Against a control build of unmodified main at the same SHA the failure
sets differ by nothing: 24 on the branch, all 24 present on main (a local sandbox
artifact, mise shims node while the tests redirect HOME); the control has 2 more
from port contention. biome reports the same 9 warnings and 5 infos on both sides
and no errors. The suite was run from a wiped build after a stale dist of
upstream-deleted test files produced 20 phantom failures.

Not verified: test:templates, canary and harbor-bench, each of which needs a full
publish and scaffold run.
@bobbor
bobbor force-pushed the bobbor/chore/rename-scope branch from 3338d37 to 1da32ff Compare November 18, 2026 17:20
@bobbor
bobbor marked this pull request as ready for review November 18, 2026 17:21
@bobbor
bobbor requested a review from a team as a code owner November 18, 2026 17:21
return;
}
try {
const upstream = await fetch(`${UPSTREAM}/${request.url.slice('/registry/'.length)}`);

let response: Response;
try {
response = await fetch(upstream);
@github-actions

Copy link
Copy Markdown
Contributor
📖 Glossary & notes — scoring, indicators, per-metric thresholds (click to expand)
  • N = 1 — one rep per cell, so a small delta may be model variance, not a real change; re-run for certainty.
  • Indicators (change vs baseline, per metric): ✨ noticeably improved · ✅ OK / no significant change (within noise band) · ⚠️ slight regression (beyond 1× threshold) · ❌ serious regression (beyond 2× threshold) · 🆕 new — no baseline value yet (current value shown, tagged (new)) · — nothing to show this run · 🗑️ cell gone since the baseline. Each cell shows <indicator> <value> (<Δ vs main>) inline.
  • Columns: Tests (pass/denom) · Judge (overall 0-10 score with signed delta; per-dimension breakdown lives in the judge artifact JSON) · Cost · Turns (agent cycles) · Score · Stop reason.
  • Threshold definitions (per metric, DELTA_THRESHOLDS in overview.mjs):
    • composite/score: ±5 points — a change ≤5 pts is ✅; >5 improving is ✨; >5 worsening is ⚠️; >10 worsening is ❌.
    • judge (overall): ±0.3 — a shift ≤0.3 is ✅; >0.3 improving is ✨; >0.3 worsening is ⚠️; >0.6 worsening is ❌.
    • tests: ±1 pass — a ≤1 pass change is ✅; >1 improving is ✨; >1 worsening is ⚠️; >2 worsening is ❌.
    • cost: ±10% of baseline (floor $0.02) — within 10% is ✅; >10% cheaper is ✨; >10% more expensive is ⚠️; >20% more expensive is ❌.
    • turns: ±3 cycles — a ≤3 turn change is ✅; >3 fewer is ✨; >3 more is ⚠️; >6 more is ❌.
  • Directions: higher is better for tests, judge, and score; lower is better for cost and turns.
  • Composite (0-100) = round(60·test_rate + 4·judge·min(1, 4·test_rate), 1) — 60% objective pass-rate + 40% judge, the judge term gated below a 25% pass-rate.
  • Cost = builder token spend at Bedrock Claude Opus 4.8 rates ($5 in / $25 out per 1M tokens; BUILDER_PRICING in scoring.mjs).
  • SCORE = composite ÷ cost — composite points per dollar (higher = better). Cost, not raw token volume, is the denominator, so tokens can't dominate; a broken (composite 0) cell scores 0 no matter how cheap. Flip SCORE_PER_DOLLAR in scoring.mjs for cost-per-point (lower = better).
  • Baseline = the most recent main-branch bench (bench/runs/latest-main.json), NOT the PR base commit — the PR always diffs against the current state of main.
  • Excluded from the mean: harness_error cells (infra failures) and gradeable cells that ran no tests. agent_fail (agent produced no app in budget) and dead_server (built app never served / crashed) are BOTH included, as composite 0.
  • Run artifacts — per-cell source + full agent traces · 🕒 Last run: 2026-11-18T17:34:59Z · run #44357631445

Merge verdict

❌ This bench run BLOCKS the PR.

  • ⚪ Absolute floor — BENCH_MIN_SCORE=65 set, but no cell was scored — floor skipped (conservative).
  • ⚪ Regression vs main — BENCH_MAX_REGRESSION=10 set, but no main baseline to diff — regression gate skipped.
  • ❌ Harness (infra) failures — the bench matrix did not succeed and produced zero result artifacts (upstream/build failure) — nothing was measured.

The Δ vs base ball above is a fixed ±5-pt display band; the regression gate uses BENCH_MAX_REGRESSION. The ball is cosmetic — the gate threshold is what blocks.

Comment thread README.md
@@ -1,6 +1,6 @@
# AWS Blocks (Preview)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: remove this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should be AWS CDK Blocks

Comment thread package-lock.json
@@ -958,7 +958,7 @@
"@aws-amplify/plugin-types": "^1.13.0",
"@aws-amplify/sandbox": "^2.3.1",
"@aws-amplify/schema-generator": "^1.4.0",
"@aws-blocks/hosting": "^0.3.0",
"@aws-cdk-blocks/hosting": "^0.3.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This has to stay unchanged. Will be updated through a bump of backend-cli

Comment thread package-lock.json
@@ -1003,9 +1003,9 @@
"zod": "3.25.17"
}
},
"node_modules/@aws-amplify/backend-cli/node_modules/@aws-blocks/hosting": {
"node_modules/@aws-amplify/backend-cli/node_modules/@aws-cdk-blocks/hosting": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

Comment thread package-lock.json
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@aws-blocks/hosting/-/hosting-0.3.1.tgz",
"resolved": "https://registry.npmjs.org/@aws-cdk-blocks/hosting/-/hosting-0.3.1.tgz",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

Comment thread package-lock.json
Comment on lines +10093 to +10094
"@aws-cdk-blocks/hosting": "^0.3.0",
"@aws-cdk-blocks/pipeline": "^0.2.1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

Comment thread package-lock.json
@@ -10114,9 +10114,9 @@
"zod": "3.25.17"
}
},
"node_modules/@aws-amplify/hosting/node_modules/@aws-blocks/hosting": {
"node_modules/@aws-amplify/hosting/node_modules/@aws-cdk-blocks/hosting": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

Comment thread package-lock.json
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@aws-blocks/hosting/-/hosting-0.3.1.tgz",
"resolved": "https://registry.npmjs.org/@aws-cdk-blocks/hosting/-/hosting-0.3.1.tgz",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

const coveredPackages = (): Set<string> => {
const covered = new Set<string>();
for (const file of readdirSync(CHANGESET_DIR)) {
if (!file.endsWith(".md") || file === "README.md") continue;
const frontmatter = readFileSync(join(CHANGESET_DIR, file), "utf-8").match(/^---\n([\s\S]*?)\n---/)?.[1] ?? "";
for (const line of frontmatter.split("\n")) {
const pkg = line.match(/['"]?(@aws-blocks\/[^'":\s]+)['"]?\s*:/)?.[1];
const pkg = line.match(/['"]?(@aws-cdk-blocks\/[^'":\s]+)['"]?\s*:/)?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[blocking] This regex only matches scoped names, so a pending changeset that already lists the unscoped umbrella ("aws-cdk-blocks": patch) is not treated as covering it, and the generator writes a duplicate umbrella entry. node --test scripts/generate-dependency-changeset.test.mjs fails 4 of 8 at this head, and it runs in changeset-check.yml.

Suggest matching the umbrella the same way changeset-guard.ts does:

const pkg = line.match(/^\s*['"]?(@aws-cdk-blocks\/[^'":\s]+|aws-cdk-blocks)['"]?\s*:/)?.[1];

Two of the four failures are only about order: "@aws-cdk-blocks/core" now sorts before "aws-cdk-blocks" under the plain .sort() on L81, so the expectations at generate-dependency-changeset.test.mjs:115 and :189 need SIBLING before UMBRELLA (or sort with a comparator that keeps the umbrella first).

* renamed.
*/
export const UMBRELLA_MODULES: ReadonlySet<string> = new Set(['@aws-blocks/blocks', '@aws-blocks/blocks/cdk']);
export const UMBRELLA_MODULES: ReadonlySet<string> = new Set(['aws-cdk-blocks', 'aws-cdk-blocks/cdk']);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[major] Every app this codemod can run on imports the umbrella as @aws-blocks/blocks: AuthCognito/AuthBasic/AuthOIDC were only exported from @aws-blocks/blocks@<=0.9, and no released aws-cdk-blocks exports them. With only the new names in this set, import { AuthCognito } from '@aws-blocks/blocks' and import * as blocks from '@aws-blocks/blocks' are no longer recognized: the codemod reports nothing for those files and leaves a class in place that no longer exists after the upgrade. The same gap is in transform.ts:541, which only treats '@aws-cdk-blocks/auth-common' as an already-imported source, so an existing @aws-blocks/auth-common import is not deduplicated.

Suggest adding '@aws-blocks/blocks' and '@aws-blocks/blocks/cdk' as old umbrella specifiers and rewriting them to aws-cdk-blocks / aws-cdk-blocks/cdk alongside the name renames, and treating @aws-blocks/auth-common → @aws-cdk-blocks/auth-common the same way. Keeping the new names in the set covers apps that renamed the umbrella by hand.

@@ -62,7 +62,7 @@ export { AuthCognito, AuthCognitoErrors } from '@aws-blocks/bb-auth-cognito';
return {
'@aws-blocks/bb-auth-cognito': [join(dir, '.authcognito-api', 'index.d.ts')],
'@aws-blocks/bb-auth-cognito/ui': [join(dir, '.authcognito-api', 'ui.d.ts')],
'@aws-blocks/blocks': [join(dir, 'umbrella-before-cutover.ts')],
'aws-cdk-blocks': [join(dir, 'umbrella-before-cutover.ts')],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[major] The "before cutover" umbrella stub is now mapped to aws-cdk-blocks, a name that never shipped together with AuthCognito. The fixture inputs got the same rewrite (e.g. __fixtures__/migrate/basic/input/index.ts.txt:1-2, umbrella-namespace/input/index.ts.txt:1, new-name-already-imported/input/umbrella.ts.txt, cross-file/input/*, oidc-stub-deployed/input/umbrella.ts.txt, umbrella-namespace-errors/input/*, __fixtures__/migrate-e2e/auth-cognito-template.ts.txt:1), so the suite passes on inputs that can't exist and no longer covers what customers have (see the comment on rules.ts:95). Suggest keeping @aws-blocks/blocks in the inputs and in this paths key, expecting aws-cdk-blocks in the outputs, and keeping one fixture with aws-cdk-blocks in the input for apps that renamed by hand.

Comment on lines +210 to +211
log(' 1. In package.json, replace @aws-blocks/bb-auth-basic / -cognito / -oidc with @aws-cdk-blocks/bb-auth');
log(' (apps on aws-cdk-blocks only need to update it), then npm install.');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[minor] An app running this has @aws-blocks/blocks in package.json, not aws-cdk-blocks, so "only need to update it" doesn't apply to real users; the package itself has to be replaced. Suggested text:

1. In package.json, replace @aws-blocks/bb-auth-basic / -cognito / -oidc with @aws-cdk-blocks/bb-auth, and @aws-blocks/blocks (and any other @aws-blocks/* package) with aws-cdk-blocks / @aws-cdk-blocks/*, then npm install.

@@ -49,7 +49,7 @@ Comments and formatting are preserved, except where an options object is regroup

After it runs:

1. Replace `@aws-blocks/bb-auth-basic` / `-cognito` / `-oidc` in `package.json` with `@aws-blocks/bb-auth`. Apps that depend only on `@aws-blocks/blocks` just update it. Then run `npm install`.
1. Replace `@aws-blocks/bb-auth-basic` / `-cognito` / `-oidc` in `package.json` with `@aws-cdk-blocks/bb-auth`. Apps that depend only on `aws-cdk-blocks` just update it. Then run `npm install`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[minor] Same as the CLI next-steps text: readers of this guide depend on @aws-blocks/blocks, so "just update it" doesn't apply. Suggested: "Replace @aws-blocks/bb-auth-basic / -cognito / -oidc with @aws-cdk-blocks/bb-auth, @aws-blocks/blocks with aws-cdk-blocks, and every other @aws-blocks/* dependency with its @aws-cdk-blocks/* name. Then run npm install." L11 would also read better with "(formerly @aws-blocks/blocks)".

}
});

it('stamps a caret range on the current release line of each package', () => {
const stamped = Object.entries(cliDevDeps).filter(([name]) => name.startsWith('@aws-blocks/'));
const stamped = Object.entries(cliDevDeps).filter(([name]) => name.startsWith('@aws-cdk-blocks/'));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[major] The umbrella is unscoped now, so this filter drops it and the release-line check no longer covers the most important stamped range ("aws-cdk-blocks" in create-blocks-app's devDependencies). @aws-blocks/blocks used to pass startsWith('@aws-blocks/'), so this is a lost check, and the name === 'aws-cdk-blocks' ? 'blocks' branch of packageDir above is now unreachable. Suggest:

const stamped = Object.entries(cliDevDeps).filter(([name]) => name.startsWith('@aws-cdk-blocks/') || name === 'aws-cdk-blocks');

(The loop at L167 is right to skip the umbrella.)

@@ -98,7 +98,7 @@ describe('the docs pointers of a scaffolded app', () => {

it('never send an agent to node_modules for docs or types', () => {
for (const { where, text } of lines.filter((l) => l.text.includes('node_modules'))) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[minor] @aws-blocks used to catch node_modules/@aws-blocks/blocks/.... The umbrella that ships the docs is now node_modules/aws-cdk-blocks/... (no @), so a pointer like see node_modules/aws-cdk-blocks/dist/index.js passes unless it also says docs/README/.d.ts. Dropping the @ (/docs|README|\.d\.ts|aws-cdk-blocks|API\.md/i) covers both.

Comment on lines +40 to +41
PATHS="/registry/@aws-cdk-blocks/${PACKAGE}/*"
echo "Invalidating paths for @aws-cdk-blocks/${PACKAGE}..."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[minor] The umbrella no longer lives under the scope: input blocks now invalidates /registry/@aws-cdk-blocks/blocks/*, which doesn't exist, and nothing but * reaches /registry/aws-cdk-blocks/*. Suggest mapping it explicitly:

if [[ "$PACKAGE" == "blocks" || "$PACKAGE" == "aws-cdk-blocks" ]]; then
  PATHS="/registry/aws-cdk-blocks/*"
else
  PATHS="/registry/@aws-cdk-blocks/${PACKAGE}/*"
fi

and updating the input description.

Comment on lines 125 to 127
const entryMatch = line.match(
/['"]?(@aws-blocks\/[^'":\s]+)['"]?\s*:\s*['"]?(major|minor|patch)['"]?/,
/['"]?(@aws-cdk-blocks\/[^'":\s]+|aws-cdk-blocks)['"]?\s*:\s*['"]?(major|minor|patch)['"]?/,
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit] The bare aws-cdk-blocks alternative is unanchored, so "my-aws-cdk-blocks": minor or "@other/aws-cdk-blocks": minor is read as an umbrella bump (the old pattern required a leading @aws-blocks/). Anchoring the key closes it: /^\s*['"]?(@aws-cdk-blocks\/[^'":\s]+|aws-cdk-blocks)['"]?\s*:\s*['"]?(major|minor|patch)['"]?/.

Comment on lines +40 to +44
/** Whether `name` is one of this monorepo's published packages. */
export const isBlocksPackage = (name: string): boolean => name.startsWith(SCOPE) || name === UMBRELLA_PKG;

/** The `packages/<dir>` directory holding `name`. The unscoped umbrella lives in `blocks`. */
export const blocksPackageDir = (name: string): string =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit] These helpers are exported but no create-blocks-app test calls them. A short unit test would pin the cases this rename is about: aws-cdk-blocks → true / blocks, @aws-cdk-blocks/core → true / core, and aws-cdk-blocks-foo, aws-cdk-lib, @aws-blocks/core → false. blocksPackageDir also returns a wrong directory for a name outside the scope; it's only called after isBlocksPackage today, but a note in the doc comment would help.

This branch had an error being deployed

1 failed deployment
e2e — 1da32ffb Deployed Nov 18, 2026 by bobbor via E2E Compute Smoke (cloudfront) #7148
agent-bench — 1da32ffb Deployed Nov 18, 2026 by bobbor via bench / summary #6226
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.

3 participants