Skip to content

leaflet: add 1.9.4 - #988

Merged
bryan-minimal merged 3 commits into
mainfrom
add-leaflet
Oct 28, 2026
Merged

bryan-minimal merged 3 commits into
mainfrom
add-leaflet

Conversation

@bryan-minimal

Copy link
Copy Markdown
Member

Adds leaflet 1.9.4, the browser map library. Split out of #966 at review, since it's unrelated to next.

What

  • No bin. The sha256-pinned registry tarball is unpacked into a package-private prefix, /usr/libexec/leaflet/lib/node_modules/leaflet. That's the layout npm install -g --prefix gives serve and next, so a project can link it into its own node_modules.
  • Leaflet has no dependencies and no install scripts, so npm never runs.
  • The registry tarball ships upstream's rollup-built dist/, so binary_from points at it. source_provenance is Leaflet/Leaflet, and the licence is BSD-2-Clause, matching the repo's own.

Changes from #966's version (norrie's review)

  • minimal.ncl import moved to line 1.
  • coreutils runtime dep dropped. Nothing runs at runtime; runtime_deps = [].
  • The version test reads %{version} instead of a hard-coded "1.9.4".
  • source_provenance added alongside binary_from.

Scope question

This is a browser-only library with prebuilt rollup output, so whether it belongs in the registry is a scope call. It was added for a project that builds a Next app entirely from registry packages.

Verified

  • nickel format --check and bash -n pass, and mip dump --packages evaluates.
  • In a fresh session (arm64), min package build --rebuild leaflet built it. min check --packages leaflet passed every check, including standalone tests...Pass, not Skip.

🤖 Generated with Claude Code

Browser map library, no bin: the sha256-pinned registry tarball unpacked
into a package-private prefix, the same layout as serve and next.
Review fixes from #966: minimal.ncl import on line 1, no coreutils
runtime dep, the test reads `version`, and source_provenance
(Leaflet/Leaflet) alongside binary_from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 22, 2026 19:13
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 7 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 735d135 and 7ada749.

📒 Files selected for processing: 2
  • packages/leaflet/build.ncl
  • packages/leaflet/build.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@norrietaylor norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All four points from #966 are addressed:

  • the import is on line 1;
  • runtime_deps = [];
  • the test uses %{version};
  • source_provenance is set alongside binary_from.

The sha256 matches the registry tarball (the sha512 matches npm's integrity too), the license is BSD-2-Clause, and the usr/libexec/leaflet layout is right.

I'm fine shipping upstream's rollup-built dist/. Since node is packaged, though, AGENTS.md asks for the reason to be called out, and build.ncl:46 states the fact but not the why. Please add one line there (e.g. that upstream's rollup + uglify build needs network devDeps). I'll approve once that's in.

Optional: src/geo/crs/CRS.Earth.js and src/layer/tile/GridLayer.js carry +x upstream, so a chmod -R a-x would tidy the data output.


Generated by Claude Code

bryan-minimal and others added 2 commits October 22, 2026 16:41
…data files

Review follow-ups: upstream's `npm run build` is rollup + uglify-js with
rollup-plugin-git-version/git-rev-sync (network devDependencies that also
read a .git checkout the tarball lacks). Two sources carry +x in the
tarball; build.sh clears it on files (not dirs) and asserts none remain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal

Copy link
Copy Markdown
Member Author

Thanks @norrietaylor. Both points are addressed in 7ada749, on top of a merge of main (1b22586).

  • Why the prebuilt dist/: build.ncl now says it next to binary_from. Upstream's npm run build is npm run rollup && npm run uglify. Its devDependencies, rollup, uglify-js, @rollup/plugin-json, rollup-plugin-git-version and git-rev-sync, are network-fetched, and the last two also read a .git checkout, which the npm tarball doesn't have. dist/ is plain JS/CSS with no native code. (Checked against package.json in leaflet-1.9.4.tgz, sha256 84c65a25…, the same pin.)
  • +x on data files: exactly the two files you named carry it in the tarball. build.sh now clears it on files only. A literal chmod -R a-x would also drop the directories' search bit. It then asserts that no executable file remains, failing the build otherwise.

Verification, in a fresh remote session: min package build --rebuild leaflet passed, and min check --packages leaflet passed every check, standalone tests included, with no Skip. A negative control in a second fresh session (a temporary exit 97 after the new assertion) printed the post-check marker and then failed with code 97. So the build ran the edited script, and the no-+x assertion held. Both sessions are destroyed.

🤖 Generated with Claude Code

@mitodrummer mitodrummer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The sha256 matches registry.npmjs.org's leaflet-1.9.4.tgz, and its sha512 matches npm's integrity field. The package has no dependencies and no install scripts, and its license is BSD-2-Clause. All four points from #966 and norrietaylor's follow-ups (why the prebuilt dist/ is shipped, +x cleared on data files) are in 7ada749, and minimal build is green. Whether a browser-only library belongs in the catalog is a scope question the PR raises itself; that is a maintainer call, not a defect.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 8e673a8 Oct 28, 2026
11 checks passed
@bryan-minimal
bryan-minimal deleted the add-leaflet branch October 28, 2026 20:43
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