@visulima/disposable-email-domains 1.1.23 → 1.1.25

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## @visulima/disposable-email-domains [1.1.25](https://github.com/visulima/visulima/compare/@visulima/disposable-email-domains@1.1.24...@visulima/disposable-email-domains@1.1.25) (2026-10-14)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **disposable-email-domains,free-email-domains:** resolve disk loaders lazily ([#962](https://github.com/visulima/visulima/issues/962)) ([0b5b734](https://github.com/visulima/visulima/commit/0b5b734e75877903993dc953df381fb5744835d4)), closes [#966](https://github.com/visulima/visulima/issues/966) [#968](https://github.com/visulima/visulima/issues/968)
6
+
7
+ ## @visulima/disposable-email-domains [1.1.24](https://github.com/visulima/visulima/compare/@visulima/disposable-email-domains@1.1.23...@visulima/disposable-email-domains@1.1.24) (2026-10-14)
8
+
9
+ ### Bug Fixes
10
+
11
+ * sync data sources (disposable email domains, typosquats blocklist) ([98379ba](https://github.com/visulima/visulima/commit/98379baa5873d776f05741cdd818d5d3d450c036))
12
+
1
13
  ## @visulima/disposable-email-domains [1.1.23](https://github.com/visulima/visulima/compare/@visulima/disposable-email-domains@1.1.22...@visulima/disposable-email-domains@1.1.23) (2026-10-13)
2
14
 
3
15
  ### Bug Fixes
package/README.md CHANGED
@@ -54,26 +54,26 @@ pnpm add @visulima/disposable-email-domains
54
54
 
55
55
  | Repository | Domains | Success | Performance |
56
56
  |------------|---------|---------|-------------|
57
- | disposable/disposable-email-domains | 98,517 | ✅ | 0.53s (1.5 MB) |
58
- | willwhite/freemail | 88,162 | ✅ | 0.59s (1.3 MB) |
59
- | FGRibreau/mailchecker | 56,512 | ✅ | 0.51s (848.5 KB) |
60
- | wesbos/burner-email-providers | 27,277 | ✅ | 0.42s (388.0 KB) |
61
- | groundcat/disposable-email-domain-list | 21,453 | ✅ | 0.12s (329.4 KB) |
62
- | 7c/fakefilter | 10,608 | ✅ | 0.36s (145.8 KB) |
63
- | sublime-security/static-files | 10,522 | ✅ | 0.27s (144.0 KB) |
64
- | disposable-email-domains/disposable-email-domains | 9,880 | ✅ | 0.18s (139.6 KB) |
65
- | eser/sanitizer-svc | 3,855 | ✅ | 0.24s (48.9 KB) |
66
- | unkn0w/disposable-email-domain-list | 3,616 | ✅ | 0.03s (45.7 KB) |
67
- | MattKetmo/EmailChecker | 2,515 | ✅ | 0.13s (32.4 KB) |
68
- | GeroldSetz/emailondeck.com-domains | 1,121 | ✅ | 0.22s (15.4 KB) |
69
- | castle/disposable-email-domains | 1,000 | ✅ | 0.01s (12.8 KB) |
70
- | jespernissen/disposable-maildomain-list | 982 | ✅ | 0.17s (12.6 KB) |
71
- | TheDahoom/disposable-email | 18 | ✅ | 0.21s (234 B) |
57
+ | disposable/disposable-email-domains | 98,610 | ✅ | 1.05s (1.5 MB) |
58
+ | willwhite/freemail | 88,162 | ✅ | 0.87s (1.3 MB) |
59
+ | FGRibreau/mailchecker | 56,512 | ✅ | 0.29s (848.5 KB) |
60
+ | wesbos/burner-email-providers | 27,277 | ✅ | 0.10s (388.0 KB) |
61
+ | groundcat/disposable-email-domain-list | 21,453 | ✅ | 0.19s (329.4 KB) |
62
+ | 7c/fakefilter | 10,630 | ✅ | 0.05s (146.1 KB) |
63
+ | sublime-security/static-files | 10,522 | ✅ | 0.05s (144.0 KB) |
64
+ | disposable-email-domains/disposable-email-domains | 9,881 | ✅ | 0.53s (139.6 KB) |
65
+ | eser/sanitizer-svc | 3,855 | ✅ | 0.20s (48.9 KB) |
66
+ | unkn0w/disposable-email-domain-list | 3,616 | ✅ | 0.10s (45.7 KB) |
67
+ | MattKetmo/EmailChecker | 2,515 | ✅ | 0.24s (32.4 KB) |
68
+ | GeroldSetz/emailondeck.com-domains | 1,121 | ✅ | 0.14s (15.4 KB) |
69
+ | castle/disposable-email-domains | 1,000 | ✅ | 0.21s (13.1 KB) |
70
+ | jespernissen/disposable-maildomain-list | 982 | ✅ | 0.09s (12.6 KB) |
71
+ | TheDahoom/disposable-email | 18 | ✅ | 0.13s (234 B) |
72
72
 
73
73
  <!-- END_PLACEHOLDER_CONTRIBUTING -->
74
74
  <!-- START_PLACEHOLDER_LAST_UPDATED -->
75
75
 
76
- _Last updated: 2026-10-13_
76
+ _Last updated: 2026-10-14_
77
77
 
78
78
  <!-- END_PLACEHOLDER_LAST_UPDATED -->
79
79
 
@@ -161,11 +161,23 @@ extractDomain("User@Example.COM"); // "example.com"
161
161
 
162
162
  ### Edge / browser / bundled runtimes
163
163
 
164
- By default the package reads `dist/domains.json` from disk via `node:fs`. That does not work in Cloudflare Workers, Next.js middleware/edge, Deno, or bundles that relocate `index.js` away from the data file. For those environments, import the list statically and inject it once at startup with `setDomains`:
164
+ For Cloudflare Workers, Next.js middleware/edge and other bundles, import from the `/edge` subpath. It exports the same API as the main entry, but ships the list inside your bundle and registers it for you, so there is no filesystem access and no `setDomains` call:
165
+
166
+ ```typescript
167
+ import { isDisposableEmail } from "@visulima/disposable-email-domains/edge";
168
+
169
+ isDisposableEmail("user@mailinator.com"); // true, no setup
170
+ ```
171
+
172
+ The list is about 2.8 MB (about 0.9 MB gzipped) of your bundle and cannot be tree-shaken, which is why it is a separate entry: use `/edge` only where you need it, and use the main entry with `setDomains` if you supply your own list.
173
+
174
+ **Using the main entry instead?** By default the package reads `dist/domains.json` from disk via `node:fs`, the first time a lookup needs it. That is not possible in Cloudflare Workers, Next.js middleware/edge, or bundles that relocate `index.js` away from the data file, and in Deno it needs `process.getBuiltinModule`, `import.meta.url` and read permission for the data file. Importing the package is safe everywhere, but when the loader cannot read the list nothing matches the built-in list (only `customDomains` you pass per call still match) and a single warning is logged.
175
+
176
+ Inject the list once at startup with `setDomains` and, since disposable detection is often a signup gate, call `assertListLoaded()` at startup so a missed or failed load throws instead of failing open (`isListLoaded()` is the non-throwing check):
165
177
 
166
178
  ```typescript
167
179
  import { setDomains, isDisposableEmail } from "@visulima/disposable-email-domains";
168
- import domains from "@visulima/disposable-email-domains/domains" with { type: "json" };
180
+ import domains from "@visulima/disposable-email-domains/domains";
169
181
 
170
182
  setDomains(domains);
171
183
 
@@ -186,10 +198,10 @@ if (!isListLoaded()) {
186
198
 
187
199
  ### Raw domain list (`./domains`)
188
200
 
189
- The raw, sorted array of disposable domains is exported from the `./domains` subpath. In Node ESM you must use a JSON import attribute:
201
+ The raw, sorted array of disposable domains is the default export of the `./domains` subpath. It is a plain ES module, so no JSON import attribute is needed:
190
202
 
191
203
  ```typescript
192
- import domains from "@visulima/disposable-email-domains/domains" with { type: "json" };
204
+ import domains from "@visulima/disposable-email-domains/domains";
193
205
 
194
206
  console.log(domains.length); // number of disposable domains
195
207
  ```