Skip to content

Commit ca24eae

Browse files
authored
Release v2.1.2 (#49)
* load npm version of punycode (specify / after require) - dep(mocha): remove dev dep (installed by npx) - dep(punycode): bump 2.3.0 to 2.3.1 * switch to haraka shared workflow * ci: remove coveralls workflow (dupe) * exclude .gitmodules from npm publish * test: use strict assertions
1 parent 7fc8925 commit ca24eae

File tree

7 files changed

+29
-72
lines changed

7 files changed

+29
-72
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,14 @@ jobs:
1010
lint:
1111
uses: haraka/.github/.github/workflows/lint.yml@master
1212

13+
coverage:
14+
uses: haraka/.github/.github/workflows/coverage.yml@master
15+
secrets: inherit
16+
1317
test:
14-
needs: [ lint, get-lts ]
15-
runs-on: ${{ matrix.os }}
16-
strategy:
17-
matrix:
18-
os: [ ubuntu-latest, windows-latest ]
19-
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
20-
fail-fast: false
21-
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/setup-node@v3
24-
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
- run: npm install
28-
- run: npm test
18+
needs: [ lint ]
19+
uses: haraka/.github/.github/workflows/ubuntu.yml@master
2920

30-
get-lts:
31-
runs-on: ubuntu-latest
32-
steps:
33-
- id: get
34-
uses: msimerson/node-lts-versions@v1
35-
outputs:
36-
active: ${{ steps.get.outputs.active }}
37-
lts: ${{ steps.get.outputs.lts }}
38-
min: ${{ steps.get.outputs.min }}
21+
windows:
22+
needs: [ lint ]
23+
uses: haraka/.github/.github/workflows/windows.yml@master

.github/workflows/coveralls.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ node_modules
1212
.lock-wscript
1313
package-lock.json
1414
.eslintrc.yaml
15+
.gitmodules

Changes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11

22
### Unreleased
33

4+
5+
### [2.1.2] - 2024-02-23
6+
7+
- load npm version of punycode (specify / after require)
8+
- dep(mocha): remove dev dep (installed by npx)
9+
- dep(punycode): bump 2.3.0 to 2.3.1
10+
11+
412
### 2.1.1 - 2023-08-22
513

614
- feat: bundle grammar.js, build with prepack, fixes #46
@@ -77,3 +85,4 @@
7785
- replaced null host or user values with empty strings
7886
[2.1.0]: https://github.com/haraka/node-address-rfc2821/releases/tag/2.1.0
7987
[2.1.1]: https://github.com/haraka/node-address-rfc2821/releases/tag/2.1.1
88+
[2.1.2]: https://github.com/haraka/node-address-rfc2821/releases/tag/2.1.2

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const punycode = require('punycode');
3+
const punycode = require('punycode/');
44
const nearley = require('nearley');
55

66
const grammar = nearley.Grammar.fromCompiled(require('./grammar.js'));

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "address-rfc2821",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "RFC-5321 (Envelope) email address parser",
55
"author": {
66
"name": "The Haraka Team",
@@ -27,7 +27,6 @@
2727
},
2828
"scripts": {
2929
"grammar": "npx -p nearley nearleyc grammar.ne -o grammar.js",
30-
"cover": "NODE_ENV=cov npx nyc --reporter=lcovonly npm run test",
3130
"lint": "npx eslint index.js test/*.js",
3231
"lintfix": "npx eslint --fix index.js test/*.js",
3332
"prepack": "npm run grammar",
@@ -39,13 +38,12 @@
3938
"url": "https://github.com/haraka/node-address-rfc2821.git"
4039
},
4140
"devDependencies": {
42-
"eslint": "*",
43-
"eslint-plugin-haraka": "*",
44-
"mocha": "*"
41+
"eslint": "8.56.0",
42+
"eslint-plugin-haraka": "1.0.15"
4543
},
4644
"license": "MIT",
4745
"dependencies": {
4846
"nearley": "^2.20.1",
49-
"punycode": "^2.3.0"
47+
"punycode": "^2.3.1"
5048
}
5149
}

test/address.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const assert = require('assert');
3+
const assert = require('node:assert/strict');
44

55
const Address = require('../index').Address;
66

@@ -119,29 +119,25 @@ describe('isNull', function () {
119119
})
120120

121121
describe('format()', function () {
122-
it('works', function (done) {
122+
it('works', function () {
123123
const addr = new Address('<matt@example.com>');
124124
assert.equal(addr.user, 'matt');
125125
assert.equal(addr.host, 'example.com');
126126
assert.equal(addr.format(), '<matt@example.com>');
127-
done();
128127
})
129128

130-
it('lower cases hostnames', function (done) {
129+
it('lower cases hostnames', function () {
131130
const addr = new Address('<matt@exAMple.com>');
132131
assert.equal(addr.host, 'example.com');
133-
done();
134132
})
135133

136-
it('no latin escaping', function (done) {
134+
it('no latin escaping', function () {
137135
const addr = new Address('<přílišžluťoučkýkůň@přílišžluťoučkýkůň.cz>');
138136
assert.equal(addr.format(), '<přílišžluťoučkýkůň@přílišžluťoučkýkůň.cz>');
139-
done();
140137
})
141138

142-
it('spaces inside a quoted string', function (done) {
139+
it('spaces inside a quoted string', function () {
143140
const addr = new Address('<"pří lišžlu ťoučkýkůň"@přílišžluťoučkýkůň.cz>');
144141
assert.equal(addr.format(), '<"pří lišžlu ťoučkýkůň"@přílišžluťoučkýkůň.cz>');
145-
done();
146142
})
147143
})

0 commit comments

Comments
 (0)