Skip to content

Sync the builder with the sibling packages - #36

Merged
kawanet merged 4 commits into
kawanet:mainfrom
kawanet-bot:feature/builder-sync
Sep 3, 2026
Merged

Sync the builder with the sibling packages#36
kawanet merged 4 commits into
kawanet:mainfrom
kawanet-bot:feature/builder-sync

Conversation

@kawanet-bot

@kawanet-bot kawanet-bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Three builder changes the sibling packages already carry.

  • show-files.ts takes the shared form: the optional filter argument alongside the doc comment already in place. This repo calls it with no argument, so the logged output is unchanged.
  • The bundle target name moves into a variable. It was written out twice — the rule in builder/Makefile, the argument in builder/pack/Makefile — so the two spellings could drift. Copying the declaration line keeps them identical by construction.
  • --engine-strict on the lane install. npm reports an engines mismatch as a warning and still exits 0, so a dependency that cannot run on a supported line would pass CI unnoticed. The flag makes it an error, and it reaches transitive dependencies too.
  • The lane gets a manifest of its own, empty for now. The recipe branched on whether a package had peers to declare; shipping the file everywhere puts every unpack on the same two lines, and adding a peer later is a line of JSON rather than a line of JSON and a line of make.

Verified

  • Dev gate: 71 source tests (65 pass, 6 skipped where a compared vendor is absent), tsc --noEmit, format/imports checks — green.
  • Checkout lifecycle: packbundledtest-dist (36/36 plus the IIFE check), then unpacktest on the installed copy, leaving git status untouched.
  • Matrix equivalent on bare directories (no checkout): 18.20.8 / 20.20.2 / 22.23.2 / 24.19.0 / 26.8.1 — 36/36 on each, no engine warnings.
  • Browser suite: 61 passing, 7 pending, unchanged.

The lane runs fewer suites than the checkout because the compat and benchmark suites stay source-only, which is unchanged here.

🤖 Generated with Claude Code

kawanet-bot and others added 3 commits September 3, 2026 13:34
Bring the plugin to the form the sibling builders share: the optional
filter argument alongside the doc comment already in place. This repo
keeps calling it with no argument, so the logged output is unchanged.

Co-authored-by: Claude <noreply@anthropic.com>
The target name was written out twice -- once as the rule in
builder/Makefile, once as the argument that calls it -- so the two
spellings could drift apart. Copying the declaration line keeps them
identical by construction. The value is a target name in builder/, which
is why it is not a path relative to this directory.

Co-authored-by: Claude <noreply@anthropic.com>
npm reports an engines mismatch as a warning and still exits 0, so a
dependency that cannot run on a line the package claims to support passes
CI unnoticed. --engine-strict turns that into an error, and it reaches
transitive dependencies as well.

Co-authored-by: Claude <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

The recipe branched on whether a package had test-only peers to declare:
some copies carried the cp line, some did not. Shipping the file
everywhere -- empty where nothing is needed -- puts every unpack on the
same two lines, and states that this lane needs nothing rather than
leaving it to be inferred from a missing file.

Adding a peer later is then a line of JSON instead of a line of JSON and
a line of make.

Co-authored-by: Claude <noreply@anthropic.com>
@kawanet

kawanet commented Sep 3, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: dec4008b8f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI left a comment

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.

🟡 Changes recommended

The changes touch the release/CI packing pipeline (Makefile shell logic and --engine-strict engine enforcement), which warrants human confirmation of matrix behavior before approval despite no defects being found.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR syncs the builder/ tooling with sibling packages, bringing three small build-infrastructure changes into alignment. It touches only build/CI scaffolding (a rollup logging plugin and the pack-lane Makefile/manifest), with no impact on the library's runtime code or public API.

Changes:

  • show-files.ts gains an optional filter argument (test?: {test: (path: string) => boolean}); all in-repo callers invoke it with no argument, so logged output is unchanged.
  • The builder test-bundle target name is extracted into the BUILDER_TEST_DST variable so the two Makefiles can't drift, and the pack lane gains its own (empty) package.json plus --engine-strict on the tarball install to turn engine mismatches into hard errors.
File summaries
File Description
builder/show-files.ts Adds an optional RegExp-like filter to the rollup import-logging plugin; early-returns when a module is filtered out. Backward compatible with existing zero-arg callers.
builder/pack/package.json New minimal manifest ({"devDependencies": {}}) copied into a bare lane by unpack to host test-only peers without self-referencing the package.
builder/pack/Makefile Introduces BUILDER_TEST_DST to mirror builder/Makefile, conditionally seeds package.json in the bare lane, and adds --engine-strict to the lane install.

I verified: the BUILDER_TEST_DST target (./tests/bundled.mjs) exists in builder/Makefile:108 and resolves correctly under $(MAKE) -C ..; the cd ../.. && [ -e package.json ] || cp ... recipe copies into the repo root correctly under both checkout and bare-lane conditions; and --engine-strict is safe against the declared engines (node >=18.8.0) across the CI matrix (18–26).

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@kawanet
kawanet merged commit 1a53bb9 into kawanet:main Sep 3, 2026
6 checks passed
@kawanet-bot
kawanet-bot deleted the feature/builder-sync branch September 3, 2026 04:53
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