parse-domain 8.3.2 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,10 +44,28 @@ The list of top-level domains is stored in a [trie](https://en.wikipedia.org/wik
44
44
  npm install parse-domain
45
45
  ```
46
46
 
47
+ This package is also published to [JSR](https://jsr.io/@peerigon/parse-domain):
48
+
49
+ ```sh
50
+ deno add jsr:@peerigon/parse-domain
51
+ ```
52
+
47
53
  ## Updates
48
54
 
49
55
  💡 **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`.
50
56
 
57
+ 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:
58
+
59
+ ```jsonc
60
+ // deno.json
61
+ { "nodeModulesDir": "auto" }
62
+ ```
63
+
64
+ ```sh
65
+ deno add jsr:@peerigon/parse-domain
66
+ deno run --allow-net --allow-write ./node_modules/@peerigon/parse-domain/src/bin/update.ts
67
+ ```
68
+
51
69
  <br />
52
70
 
53
71
  ## Expected input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse-domain",
3
- "version": "8.3.2",
3
+ "version": "8.4.0",
4
4
  "description": "Splits a hostname into subdomains, domain and (effective) top-level domains",
5
5
  "keywords": [
6
6
  "domain",
@@ -21,6 +21,9 @@
21
21
  "type": "git",
22
22
  "url": "https://github.com/peerigon/parse-domain.git"
23
23
  },
24
+ "bin": {
25
+ "parse-domain-update": "./dist/bin/update.js"
26
+ },
24
27
  "files": [
25
28
  "dist",
26
29
  "serialized-tries",
@@ -30,8 +33,10 @@
30
33
  "type": "module",
31
34
  "sideEffects": false,
32
35
  "main": "./dist/main.js",
36
+ "types": "./dist/main.d.ts",
33
37
  "exports": {
34
- ".": "./dist/main.js"
38
+ ".": "./dist/main.js",
39
+ "./update": "./dist/bin/update.js"
35
40
  },
36
41
  "publishConfig": {
37
42
  "access": "public",
@@ -1 +1 @@
1
- {"updatedAt":"2026-08-01T23:10:45.862Z"}
1
+ {"updatedAt":"2026-08-12T11:56:33.471Z"}