Skip to content

feat: expose bin/update script via a JSR/npm exports subpath - #242

Merged
jhnns merged 1 commit into
mainfrom
add-bin-script-jsr-exports
Aug 12, 2026
Merged

feat: expose bin/update script via a JSR/npm exports subpath#242
jhnns merged 1 commit into
mainfrom
add-bin-script-jsr-exports

Conversation

@jhnns

@jhnns jhnns commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a ./update exports entry in both package.json and jsr.json so the public-suffix-list update script is reachable from JSR/Deno consumers, who don't get npm-style bin entries.
  • Documents JSR installation and how to run the update script via Deno in the README, including the nodeModulesDir caveat needed for the script's relative path resolution to work.

Test plan

  • npm test (format, lint, types, unit tests, JSR dry-run publish) passes
  • Verified npm run test:jsr dry-run includes src/bin/update.ts under the new export

Adds a "./update" exports entry in both package.json and jsr.json so
JSR consumers (who don't get npm-style bin entries) can also run the
public-suffix-list update script, and documents usage for both npm
and Deno/JSR in the README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 12, 2026 11:54
@pkg-pr-new

pkg-pr-new Bot commented Aug 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/parse-domain@242

commit: 236f086

@jhnns
jhnns merged commit 2798583 into main Aug 12, 2026
4 checks passed
@jhnns
jhnns deleted the add-bin-script-jsr-exports branch August 12, 2026 11:56
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 95.094%. remained the same — add-bin-script-jsr-exports into main

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 8.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Pull request overview

This PR makes the public-suffix-list update script reachable via an explicit ./update subpath export for both npm and JSR consumers, and documents how JSR/Deno users can install and invoke the updater given Deno’s nodeModulesDir behavior.

Changes:

  • Add ./update subpath export to package.json pointing at the built CLI entry (dist/bin/update.js).
  • Add ./update subpath export to jsr.json pointing at the source updater (src/bin/update.ts).
  • Document JSR installation and Deno invocation guidance (including nodeModulesDir) in README.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
README.md Documents JSR install and how to run the updater from a local node_modules checkout under Deno.
package.json Exposes the updater script via an npm exports subpath (./update).
jsr.json Exposes the updater script via a JSR exports subpath (./update).

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

Comment thread README.md

💡 **Please note:** [publicsuffix.org](https://publicsuffix.org/) is updated several times per month. This package comes with a prebuilt list that has been downloaded at the time of `npm publish`. In order to get an up-to-date list, you should run `npx parse-domain-update` everytime you start or build your application. This will download the latest list from `https://publicsuffix.org/list/public_suffix_list.dat`.

JSR packages don't support npm-style `bin` entries, so the script is published under the `./update` export instead. The script writes to a path relative to its own location, so it only works once the package has been resolved into a local `node_modules` directory (e.g. by enabling [`nodeModulesDir`](https://docs.deno.com/runtime/fundamentals/configuration/#node-modules-dir) in `deno.json`) — running it directly off a `jsr:` specifier fails because Deno doesn't expose a local path for remote-cached modules:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants