Skip to content

Commit 654271f

Browse files
committed
chore: update pkgs
2 parents 9eed1b0 + ef75f39 commit 654271f

File tree

6 files changed

+1733
-46
lines changed

6 files changed

+1733
-46
lines changed

.github/workflows/ci.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ concurrency:
1919
group: ${{ github.workflow }}-${{ github.ref }}
2020
cancel-in-progress: true
2121

22+
2223
env:
2324
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2425
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -39,6 +40,7 @@ jobs:
3940
- uses: actions/checkout@v4
4041
with:
4142
fetch-depth: 30
43+
persist-credentials: false
4244

4345
- uses: FranzDiebold/github-env-vars-action@v2
4446

@@ -57,5 +59,4 @@ jobs:
5759
- name: Release
5860
if: github.ref == 'refs/heads/develop'
5961
run: |
60-
npm i -g semantic-release @semantic-release/git @semantic-release/github conventional-changelog-conventionalcommits
61-
npx semantic-release --no-ci --debug
62+
node release.mjs

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
- uses: actions/checkout@v4
3434
with:
3535
fetch-depth: 30
36+
persist-credentials: false
3637

3738
- uses: FranzDiebold/github-env-vars-action@v2
3839

@@ -50,5 +51,4 @@ jobs:
5051
5152
- name: Release
5253
run: |
53-
npm i -g semantic-release @semantic-release/git @semantic-release/github conventional-changelog-conventionalcommits
54-
npx semantic-release --no-ci --debug
54+
node release.mjs

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## v2.0.0
44
- Update license from MIT to BSL-1.1
55
- Improve performance use es6 set to speed up domain lookups thanks to [@ArsenyYankovsky](https://github.com/ArsenyYankovsky) [#221](https://github.com/devmehq/email-validator-js/pull/221)
6+
- Update dependencies
7+
- Update lists
68

79
## v1.0.19
810
- allow passing `smtpPort` to `verifyEmail` function

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devmehq/email-validator-js",
3-
"version": "1.0.19",
3+
"version": "2.0.0",
44
"private": false,
55
"description": "Advanced Email Validation with DNS MX lookup and Mailbox Verification",
66
"keywords": [
@@ -61,8 +61,12 @@
6161
"sinon": "19.0.2",
6262
"ts-jest": "^29.2.5",
6363
"typescript": "5.7.3",
64-
"typescript-eslint": "^8.24.0"
64+
"typescript-eslint": "^8.24.0",
65+
"@release-it/conventional-changelog": "^10.0.0",
66+
"@release-it/keep-a-changelog": "^6.0.0",
67+
"release-it": "^18.1.2"
6568
},
69+
"packageManager": "[email protected]+sha256.c17d3797fb9a9115bf375e31bfd30058cac6bc9c3b8807a3d8cb2094794b51ca",
6670
"engines": {
6771
"node": ">= 12.0"
6872
},

release.mjs

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import release from 'release-it'
2+
3+
const branch = process.env.BRANCH || process.env.CI_REF_NAME || ''
4+
const branchSlug = branch.replace(/\//g, '-')
5+
const branchPrefix = branch.split('/')[0]
6+
7+
const config = {
8+
isPreRelease: branch !== 'master',
9+
preRelease: branch !== 'master',
10+
preReleaseId: branch === 'master' ? '' : branch,
11+
plugins: {
12+
'@release-it/conventional-changelog': {
13+
preset: {
14+
name: 'conventionalcommits',
15+
types: [
16+
{ type: 'breaking', release: 'major' },
17+
{ type: 'feat', release: 'minor' },
18+
// match anything else
19+
{ type: '**', release: 'patch' },
20+
{ subject: '**', release: 'patch' },
21+
{ message: '**', release: 'patch' },
22+
],
23+
},
24+
},
25+
},
26+
}
27+
28+
console.debug('config', config)
29+
30+
release(config).then((output) => {
31+
console.debug('output', output)
32+
33+
const { version: nextVersion, latestVersion, name, changelog } = output || {}
34+
35+
console.info(
36+
`Last release is ${latestVersion} and next release is ${nextVersion}`
37+
)
38+
if (latestVersion === nextVersion) {
39+
console.info(
40+
`No release is needed, last release is ${latestVersion} and next release is ${nextVersion}`
41+
)
42+
return
43+
}
44+
45+
if (!nextVersion) {
46+
console.info(`No release is needed - no next version`)
47+
}
48+
})

0 commit comments

Comments
 (0)