feat(build): finish compiler and package config audits - #648
Merged
Conversation
Keep generated executables on es2022 from a single Node 22.19 constant, inline legal comments so license text stays in the planned artifact, and add output.sourceMap as an opt-in wired to the compiler profile.
…ESM shims (#566 §2/§4) @agent-bundle/runtime declares react and react-dom as `^19.2.0` peers instead of the exact `19.2.8` pins: the runtime only calls stable React 19 APIs, react-dom enforces the react/react-dom exact match itself, and the Flight binding react-server-dom-rspack@0.1.0 (still an exact dependency) accepts `^19.1.0`, so the caret sits inside what it admits at the minor the suite proves. rsc-markdown-stream is declared `workspace:^`; pnpm's packer rewrites it to `^<version>` on publish, so the pnpm-workspace override goes away and a rsc-markdown-stream release now patch-bumps the runtime through changesets. The packed pool and the shared-pack fallback pack with `pnpm pack --json` (scripts/pnpm-pack.mjs) — the packer `changeset publish` ships through — so the tarball under test carries the rewritten range; `npm pack` would have shipped `workspace:^` for a consumer's npm to refuse. The package build's custom `agent-bundle:esm-node-globals` plugin and the `node.__dirname/__filename = false` override are replaced by Rslib 1.0's `lib.shims.esm` on both libs: it rewrites the bundled TypeScript parser's `__filename`/`__dirname` inside the module to `fileURLToPath(import.meta.url)` from `node:url`, and the only dist chunk that changes is the parser's. Tests: manifest-contract.test.ts (caret ranges inside the Flight binding's, pinned React inside the range, workspace:^, README claim), dist-esm-node-globals.test.ts (no bare CommonJS path global in any emitted chunk), rstest-rslib-adapter (shims on both libs, no plugin), packed-entry-identity (installed manifest carries `^0.1.0`, peers as declared, `npm ls` reports no problems).
The provider session pinned production React and a bare pluginReact(). Development now follows options.mode, Fast Refresh stays off for the srcdoc App, and the web hosts target chrome >= 144.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🦋 Changeset detectedLatest commit: f448048 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
…e-config # Conflicts: # pnpm-lock.yaml # pnpm-workspace.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
output.sourceMapopt-inpluginReact({ fastRefresh: false })@agent-bundle/runtimeReact peers to^19.2.0, packrsc-markdown-streamfromworkspace:^, use Rslib's ESM shims, and reject removed Rsbuild v2 hatch keys with AB4726Refs #566 and #572.
Decisions
chrome >= 144, the oldest verified shipped MCP desktop host floor (Cursor 3.18); newer Claude Desktop and Codex builds ship newer Chromium.inline, because linked comments would create an unplanned sibling asset if minification is enabled; currentminify: falsebytes are unchanged.^19.2.0, withinreact-server-dom-rspack's^19.1.0contract while leaving exact React/React DOM matching to the host pair.Local merge gate
Branch includes current
origin/main(461a6dc5c9). All commands passed locally:pnpm build && pnpm typecheck && pnpm lint && pnpm test:unitpnpm exec rstest --config rstest.config.ts packages/workbench/tests/lifecycles.e2e.test.tspnpm --filter @agent-bundle-example/mcp-app test:browser-apppnpm test:packedpnpm docs:site:buildReview hygiene
legalComments: 'inline'and the Node-floor guard were retained because they are explicit audit requirements, with linked comments rejected by the single-file artifact contract.