resolve-email 4.0.33 → 4.0.37

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.
@@ -1,3 +1,3 @@
1
- declare const _default: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
1
+ declare const _default: import("eslint").Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
2
2
  export default _default;
3
3
  //# sourceMappingURL=eslint.config.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "resolve-email",
3
3
  "description": "Resolve the domain of an email address to see if it even has a chance of delivering",
4
- "version": "4.0.33",
4
+ "version": "4.0.37",
5
5
  "author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/bcomnes/resolve-email/issues"
@@ -9,21 +9,30 @@
9
9
  "devDependencies": {
10
10
  "@types/node": "^25.0.0",
11
11
  "@voxpelli/tsconfig": "^16.0.0",
12
- "auto-changelog": "^2.0.0",
13
- "c8": "^10.0.0",
14
12
  "emailvalid": "^1.0.4",
15
- "gh-release": "^7.0.0",
16
- "installed-check": "^9.3.0",
17
- "neostandard": "^0.12.0",
13
+ "releasearoni": "^0.1.10",
14
+ "installed-check": "^10.0.1",
15
+ "neostandard": "^0.13.0",
18
16
  "npm-run-all2": "^8.0.1",
19
17
  "typescript": "~5.9.2"
20
18
  },
21
19
  "engines": {
22
- "node": ">=18.0.0",
23
- "npm": ">=8.0.0"
20
+ "node": ">=22.1.0",
21
+ "npm": ">=10.0.0"
24
22
  },
25
23
  "homepage": "https://github.com/bcomnes/resolve-email",
26
24
  "keywords": [],
25
+ "files": [
26
+ "index.js",
27
+ "*.d.ts",
28
+ "*.d.ts.map",
29
+ "reasonable-email.js",
30
+ "disposable.cjs",
31
+ "disposable.json",
32
+ "wildcard-disposable.cjs",
33
+ "wildcard-disposable.json",
34
+ "CHANGELOG.md"
35
+ ],
27
36
  "license": "MIT",
28
37
  "type": "module",
29
38
  "module": "index.js",
@@ -36,7 +45,8 @@
36
45
  },
37
46
  "scripts": {
38
47
  "prepare": "npm run build:throwaway",
39
- "prepublishOnly": "npm run build && git push --follow-tags && gh-release -y",
48
+ "preversion": "releasearoni preversion",
49
+ "prepublishOnly": "releasearoni npm-check && npm run build && git push --follow-tags && releasearoni -y",
40
50
  "postpublish": "npm run clean",
41
51
  "clean": "run-p clean:*",
42
52
  "clean:declarations-top": "rm -rf $(find . -maxdepth 1 -type f -name '*.d.ts*' -o -name '*.d.cts*')",
@@ -46,11 +56,9 @@
46
56
  "test": "run-s test:*",
47
57
  "test:neostandard": "eslint .",
48
58
  "test:tsc": "tsc",
49
- "test:node-test": "c8 node --test --test-reporter spec",
59
+ "test:node-test": "node --experimental-test-coverage --test-coverage-exclude '**/*.test.js' --test-coverage-exclude 'fuzz-test.js' --test-coverage-exclude 'build-throwaway-domain-list.cjs' --test-coverage-exclude '*.config.*' --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info",
50
60
  "test:installed-check": "installed-check --ignore-dev",
51
- "version": "run-s prepare version:*",
52
- "version:changelog": "auto-changelog -p --template keepachangelog auto-changelog --breaking-pattern 'BREAKING CHANGE:'",
53
- "version:git": "git add CHANGELOG.md disposable.json wildcard-disposable.json"
61
+ "version": "npm run prepare && releasearoni version --add disposable.json --add wildcard-disposable.json"
54
62
  },
55
63
  "standard": {
56
64
  "ignore": [
@@ -61,12 +69,6 @@
61
69
  "type": "individual",
62
70
  "url": "https://github.com/sponsors/bcomnes"
63
71
  },
64
- "c8": {
65
- "reporter": [
66
- "lcov",
67
- "text"
68
- ]
69
- },
70
72
  "dependencies": {
71
73
  "tldts": "^7.0.9"
72
74
  }
@@ -1,22 +0,0 @@
1
- # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2
- version: 2
3
- updates:
4
- - package-ecosystem: "npm"
5
- directory: "/"
6
- # Check the npm registry for updates every day (weekdays)
7
- schedule:
8
- interval: "daily"
9
- groups:
10
- typescript:
11
- patterns:
12
- - "@voxpelli/tsconfig"
13
- - "@types/node"
14
- - "typescript"
15
- - package-ecosystem: "github-actions"
16
- directory: "/"
17
- schedule:
18
- interval: "daily"
19
- - package-ecosystem: "gitsubmodule"
20
- directory: "/"
21
- schedule:
22
- interval: "daily"
@@ -1,4 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: ['bcomnes']
4
- custom: ['https://bret.io']
@@ -1,54 +0,0 @@
1
- name: npm bump
2
-
3
- on:
4
- workflow_dispatch:
5
- inputs:
6
- version_type:
7
- description: 'Version type'
8
- type: choice
9
- options:
10
- - major
11
- - minor
12
- - patch
13
- - custom
14
- default: 'patch'
15
- required: true
16
- newversion:
17
- description: 'Custom version (used when version_type is "custom")'
18
- required: false
19
-
20
- env:
21
- node_version: 'lts/*'
22
- FORCE_COLOR: 1
23
-
24
- concurrency: # prevent concurrent releases
25
- group: npm-bump
26
- cancel-in-progress: true
27
-
28
- jobs:
29
- version_and_release:
30
- runs-on: ubuntu-latest
31
- steps:
32
- - uses: actions/checkout@v6
33
- with:
34
- # fetch full history so things like auto-changelog work properly
35
- fetch-depth: 0
36
- submodules: true
37
- - name: Use Node.js ${{ env.node_version }}
38
- uses: actions/setup-node@v6
39
- with:
40
- node-version: ${{ env.node_version }}
41
- # setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
42
- registry-url: 'https://registry.npmjs.org'
43
- - run: npm i
44
- - run: npm test
45
- - run: git reset --hard
46
- - name: npm version && npm publish
47
- uses: bcomnes/npm-bump@v2
48
- with:
49
- git_email: bcomnes@gmail.com
50
- git_username: ${{ github.actor }}
51
- newversion: ${{ github.event.inputs.version_type == 'custom' && github.event.inputs.newversion || github.event.inputs.version_type }}
52
- github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
53
- npm_token: ${{ secrets.NPM_TOKEN }} # user set secret token generated at npm
54
-
@@ -1,43 +0,0 @@
1
- name: tests
2
-
3
- on: [pull_request, push]
4
-
5
- env:
6
- FORCE_COLOR: 1
7
-
8
- jobs:
9
- test:
10
- runs-on: ${{ matrix.os }}
11
-
12
- strategy:
13
- matrix:
14
- os: [ubuntu-latest]
15
- node: ['lts/*']
16
-
17
- steps:
18
- - uses: actions/checkout@v6
19
- with:
20
- submodules: true
21
- - name: Use Node.js ${{ matrix.node-version }}
22
- uses: actions/setup-node@v6
23
- with:
24
- node-version: ${{ matrix.node-version }}
25
- - run: npm i
26
- - run: npm test --color=always
27
- - name: Coveralls
28
- uses: coverallsapp/github-action@v2
29
- with:
30
- github-token: ${{ secrets.GITHUB_TOKEN }}
31
-
32
-
33
- automerge:
34
- needs: test
35
- runs-on: ubuntu-latest
36
- permissions:
37
- pull-requests: write
38
- contents: write
39
- steps:
40
- - uses: fastify/github-action-merge-dependabot@v3
41
- if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' && contains(github.head_ref, 'dependabot/github_actions') }}
42
- with:
43
- github-token: ${{secrets.github_token}}
package/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "disposable-email-domains"]
2
- path = disposable-email-domains
3
- url = git@github.com:disposable-email-domains/disposable-email-domains.git
package/CONTRIBUTING.md DELETED
@@ -1,34 +0,0 @@
1
- # Contributing
2
-
3
- ## Releasing
4
-
5
- Changelog, and releasing is autmated with npm scripts and actions. To create a release:
6
-
7
- - Navigate to the actions tab
8
- - Select the `npm bump` action.
9
- - Trigger an action, specifying the semantic version bump that is needed.
10
- - Changelog, Github release and npm publish is hanlded by the action.
11
- - An in depth review of this system is documented here: [bret.io/projects/package-automation](https://bret.io/projects/package-automation/)
12
-
13
- If for some reason that isn't workoing or a local release is preferred, follow these steps:
14
-
15
- - Ensure a clean working git workspace.
16
- - Run `npm version {patch,minor,major}`.
17
- - This wills update the version number and generate the changelog.
18
- - Run `npm publish`.
19
- - This will push your local git branch and tags to the default remote, perform a [gh-release](https://ghub.io/gh-release), and create an npm publication
20
-
21
- ## Guidelines
22
-
23
- - Patches, ideas and changes welcome.
24
- - Fixes almost always welcome.
25
- - Features sometimes welcome.
26
- - Please open an issue to discuss the issue prior to spending lots of time on the problem.
27
- - It may be rejected.
28
- - If you don't want to wait around for the discussion to commence, and you really want to jump into the implementation work, be prepared for fork if the idea is respectfully declined.
29
- - Try to stay within the style of the existing code.
30
- - All tests must pass.
31
- - Additional features or code paths must be tested.
32
- - Aim for 100% coverage.
33
- - Questions are welcome, however unless there is a official support contract established between the maintainers and the requester, support is not guaranteed.
34
- - Contributors reserve the right to walk away from this project at any moment with or without notice.
package/allow-list.json DELETED
@@ -1,13 +0,0 @@
1
- [
2
- "rocketmail.com",
3
- "googlemail.com",
4
- "mail.ru",
5
- "yahoo.co.jp",
6
- "yahoo.ca",
7
- "yahoo.co.in",
8
- "yahoo.co.jp",
9
- "yahoo.co.kr",
10
- "yahoo.co.nz",
11
- "yahoo.co.uk",
12
- "alibaba.com"
13
- ]
@@ -1,142 +0,0 @@
1
- const { readFile, writeFile } = require('node:fs/promises')
2
- const { join } = require('node:path')
3
- const emailvalidDomains = require('emailvalid/domains.json')
4
- const { reasonableEmail } = require('./reasonable-email.js')
5
-
6
- /** @type {Set<string>} */
7
- const disposableEmailDomains = new Set()
8
- /** @type {Set<string>} */
9
- const wildcardDomains = new Set()
10
-
11
- const disposableEmailDomainsPath = join(__dirname, 'disposable-email-domains', 'disposable_email_blocklist.conf')
12
- const allowList = join(__dirname, 'disposable-email-domains', 'allowlist.conf')
13
-
14
- /**
15
- * Checks if a domain is a wildcard pattern (ends with .*)
16
- *
17
- * @param {string} domain - The domain to check
18
- * @returns {boolean} - Whether the domain is a wildcard pattern
19
- */
20
- function isWildcardDomain (domain) {
21
- return domain.endsWith('.*')
22
- }
23
-
24
- /**
25
- * Extracts the base domain from a wildcard pattern (removes the .*)
26
- *
27
- * @param {string} wildcardDomain - The wildcard domain pattern (e.g., "example.*")
28
- * @returns {string} - The base domain (e.g., "example")
29
- */
30
- function getBaseDomain (wildcardDomain) {
31
- // @ts-expect-error
32
- return wildcardDomain.split('.*')[0] // Remove ".*"
33
- }
34
-
35
- /**
36
- * Checks if a domain would pass the reasonableEmail regex validation.
37
- *
38
- * @param {string} domain - The domain to check
39
- * @returns {boolean} - Whether the domain would create a valid email address
40
- */
41
- function isReasonableDomain (domain) {
42
- // Skip checking wildcard domains with reasonableEmail
43
- if (isWildcardDomain(domain)) return true
44
-
45
- // Create a test email with the domain to check against the regex
46
- const testEmail = `test@${domain}`
47
- return reasonableEmail.test(testEmail)
48
- }
49
-
50
- /**
51
- * Main function that builds the disposable email domain list.
52
- *
53
- * @returns {Promise<void>}
54
- */
55
- const work = async () => {
56
- console.log('Adding disposable-email-domains')
57
- const disposableEmailDomainsRaw = await readFile(disposableEmailDomainsPath, { encoding: 'utf-8' })
58
- /** @type {string[]} */
59
- const disposableEmailDomainsList = disposableEmailDomainsRaw.split('\n').slice(0, -1)
60
- /** @type {number} */
61
- let skippedCount = 0
62
- for (const domain of disposableEmailDomainsList) {
63
- if (isWildcardDomain(domain)) {
64
- wildcardDomains.add(getBaseDomain(domain))
65
- } else if (isReasonableDomain(domain)) {
66
- disposableEmailDomains.add(domain)
67
- } else {
68
- skippedCount++
69
- }
70
- }
71
- console.log(`Skipped ${skippedCount} domains from disposable-email-domains that don't pass the reasonableEmail regex`)
72
-
73
- console.log('Adding emailvalid')
74
- /** @type {string[]} */
75
- const disposableOnly = Object.entries(emailvalidDomains).filter(([_domain, type]) => type === 'disposable').map(([domain, _type]) => domain)
76
-
77
- /** @type {number} */
78
- let skippedEmailvalidCount = 0
79
- for (const domain of disposableOnly) {
80
- if (isWildcardDomain(domain)) {
81
- wildcardDomains.add(getBaseDomain(domain))
82
- } else if (isReasonableDomain(domain)) {
83
- disposableEmailDomains.add(domain)
84
- } else {
85
- skippedEmailvalidCount++
86
- }
87
- }
88
- console.log(`Skipped ${skippedEmailvalidCount} domains from emailvalid that don't pass the reasonableEmail regex`)
89
-
90
- console.log('Removing anything in disposable-email-domains/allowlist.conf')
91
- // I guess newlines are a format too
92
- const allowDataRaw = await readFile(allowList, { encoding: 'utf-8' })
93
- const allowData = allowDataRaw.split('\n').slice(0, -1)
94
- for (const domain of allowData) {
95
- disposableEmailDomains.delete(domain)
96
- wildcardDomains.delete(getBaseDomain(domain))
97
- }
98
-
99
- /** @type {string[]} */
100
- const denyListOverride = require('./deny-list.json')
101
- /** @type {number} */
102
- let skippedDenylistCount = 0
103
- denyListOverride.forEach(domain => {
104
- if (isWildcardDomain(domain)) {
105
- wildcardDomains.add(getBaseDomain(domain))
106
- } else if (isReasonableDomain(domain)) {
107
- disposableEmailDomains.add(domain)
108
- } else {
109
- skippedDenylistCount++
110
- }
111
- })
112
- console.log(`Skipped ${skippedDenylistCount} domains from deny-list that don't pass the reasonableEmail regex`)
113
-
114
- /** @type {string[]} */
115
- const allowListOverride = require('./allow-list.json')
116
- allowListOverride.forEach(domain => {
117
- disposableEmailDomains.delete(domain)
118
- wildcardDomains.delete(getBaseDomain(domain))
119
- })
120
-
121
- /** @type {number} */
122
- const finalCount = disposableEmailDomains.size
123
- /** @type {number} */
124
- const wildcardCount = wildcardDomains.size
125
-
126
- // Sort the domains for consistency
127
- const sortedDisposable = Array.from(disposableEmailDomains).sort()
128
- const sortedWildcards = Array.from(wildcardDomains).sort()
129
-
130
- // Create the disposable.json file (regular domains)
131
- await writeFile('disposable.json', JSON.stringify(sortedDisposable, null, ' '))
132
-
133
- // Create the wildcard-disposable.json file (base domains without the .*)
134
- await writeFile('wildcard-disposable.json', JSON.stringify(sortedWildcards, null, ' '))
135
-
136
- console.log(`Done! Final disposable domain list contains ${finalCount} domains and ${wildcardCount} wildcard base domains`)
137
- }
138
-
139
- work().catch(err => {
140
- console.error(err)
141
- process.exit(1)
142
- })
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=build-throwaway-domain-list.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-throwaway-domain-list.d.cts","sourceRoot":"","sources":["build-throwaway-domain-list.cjs"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "declarationMap": true,
6
- "noEmit": false,
7
- "emitDeclarationOnly": true
8
- }
9
- }
package/deny-list.json DELETED
@@ -1,23 +0,0 @@
1
- [
2
- "tmail.link",
3
- "cock.li",
4
- "airmail.cc",
5
- "420blaze.it",
6
- "aaathats3as.com",
7
- "cumallover.me",
8
- "dicksinhisan.us",
9
- "loves.dicksinhisan.us",
10
- "wants.dicksinhisan.us",
11
- "dicksinmyan.us",
12
- "loves.dicksinmyan.us",
13
- "wants.dicksinmyan.us",
14
- "horsefucker.org",
15
- "national.shitposting.agency",
16
- "tfwno.gf",
17
- "cock.lu",
18
- "cock.email",
19
- "firemail.cc",
20
- "memeware.net",
21
- "cocaine.ninja",
22
- "waifu.club"
23
- ]
package/disposable.d.cts DELETED
@@ -1,2 +0,0 @@
1
- export const disposable: Set<string>;
2
- //# sourceMappingURL=disposable.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"disposable.d.cts","sourceRoot":"","sources":["disposable.cjs"],"names":[],"mappings":""}
package/eslint.config.js DELETED
@@ -1,8 +0,0 @@
1
- import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
2
-
3
- export default neostandard({
4
- ignores: [
5
- ...resolveIgnoresFromGitignore(),
6
- 'disposable-email-domains'
7
- ]
8
- })