Skip to content

fix(bundle): declare Node >=20 and install the shipped lockfile with npm ci - #191

Merged
mmcky merged 2 commits into
mainfrom
fix/bundle-manifest
Sep 10, 2026
Merged

mmcky merged 2 commits into
mainfrom
fix/bundle-manifest

Conversation

@mmcky

@mmcky mmcky commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Both halves of #162, one PR since both lines are part of the same bundle manifest.

Engines floor. template/package.json declared engines.node as >=16 while CONTRIBUTING.md cites that field as the evidence for a Node 20 floor. Twenty is the honest number: .nvmrc pins 24, the root package.json requires 20 or newer, and the rendering engine's floor is above 16 anyway. The report theme's copy was already corrected to >=20 in QuantEcon/quantecon-theme-report.mystmd#12, so this brings the two back in step.

Install command. template.yml ran npm install although the release asset ships a lockfile (release.yml generates it with npm install --package-lock-only and files lists it). It now runs npm ci, which makes consumer installs reproducible and stops the lockfile being mutated in a consumer's template cache. On the caveat #162 raises: npm ci fails outright without a lockfile, but the only lockfile-less path is a source checkout of this repo, which is not a usable template until make build-theme has produced the bundle, and that target runs its own npm install in .deploy/. The reasoning is recorded as a comment next to the line so nobody re-litigates it from the manifest alone. The report theme's identical decision is QuantEcon/quantecon-theme-report.mystmd#13 and should move the same way.

Not tested end to end against a consumer install from a release asset; that happens on the next tag. The CI visual jobs exercise .deploy/quantecon-theme via the Makefile path, which this change does not touch.

Closes #162.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings September 10, 2026 10:15
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-10 10:49 UTC

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

The consumer-facing behavior change is not recorded in the empty ## [Unreleased] section of CHANGELOG.md as required by CONTRIBUTING.md.

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

Pull request overview

This PR corrects two inconsistencies in the shipped release bundle manifest (resolving #162). It raises the declared Node engine floor in the bundled template/package.json from >=16 to >=20 to match the repo's actual runtime requirements and CONTRIBUTING.md, and changes the consumer install command in template.yml from npm install to npm ci so installs from the release asset (which ships a package-lock.json) are reproducible and don't mutate the cached lockfile. A comment documents why npm ci is safe despite failing without a lockfile.

Changes:

  • Bump engines.node in the bundled template/package.json to >=20.
  • Switch build.install in template.yml to npm ci with an explanatory comment.
File summaries
File Description
template/package.json Raises declared Node floor to >=20, aligning the shipped bundle with the root package, .nvmrc, and CONTRIBUTING.
template.yml Uses npm ci for reproducible consumer installs against the shipped lockfile, with a rationale comment.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

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

Comment thread template.yml
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🎭 Visual regression results

passed  34 passed
skipped  5 skipped

Details

stats  39 tests across 2 suites
duration  1 minute, 3 seconds
commit  872b7fc

Skipped tests

mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › without JavaScript › drawer-opens-without-javascript
mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › drawer-closes-when-search-opens
mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › launch-colab
mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › live-compute-toggle
mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › live-compute-toggle-absent-without-thebe

mmcky added a commit that referenced this pull request Sep 10, 2026
Copilot review on #191: CONTRIBUTING.md requires every consumer-facing
change under Unreleased.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…npm ci

The release bundle's package.json declared engines.node ">=16" while
CONTRIBUTING.md cites that field as evidence for a Node 20 floor; 20 is
the honest number (.nvmrc pins 24, the root package.json requires 20,
the rendering engine's floor is above 16). And template.yml ran
`npm install` although the release asset ships a lockfile (release.yml
generates it and `files` lists it), so consumer installs were neither
reproducible nor lockfile-preserving. `npm ci` fails without a lockfile,
but the only lockfile-less path is a source checkout, which is not a
usable template until `make build-theme` has run, and that target
installs on its own (#162).

The report theme carries the same two lines; its copy of the engines
floor was corrected in QuantEcon/quantecon-theme-report.mystmd#12 and
the install decision is QuantEcon/quantecon-theme-report.mystmd#13.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Sep 10, 2026
Copilot review on #191: CONTRIBUTING.md requires every consumer-facing
change under Unreleased.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mmcky
mmcky force-pushed the fix/bundle-manifest branch from a6f04b8 to 3382c4c Compare September 10, 2026 10:40
Copilot review on #191: CONTRIBUTING.md requires every consumer-facing
change under Unreleased.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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.

🟢 Approval recommended

The three-file, config-only change is fully verified against the release workflow, Makefile, and repo Node floors, with all inline-comment claims confirmed and the prior changelog feedback addressed.

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

@mmcky
mmcky merged commit d1bbc97 into main Sep 10, 2026
5 checks passed
@mmcky
mmcky deleted the fix/bundle-manifest branch September 10, 2026 10:49
mmcky added a commit that referenced this pull request Sep 10, 2026
Moves the Unreleased entries under 2.7.0 (#194, #196, #197, #198, #191),
adds the missing #191 PR link, bumps package.json and the two README pins.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.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.

Release bundle manifest: Node floor contradicts CONTRIBUTING, and build.install ignores the shipped lockfile

2 participants