Skip to content

Commit 9f72907

Browse files
committed
feat: require Node.js >=10.13
BREAKING CHANGE: Require Node.js >= 10.13
1 parent 4ff652f commit 9f72907

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
language: node_js
22
node_js:
33
- 12
4-
- 10
5-
- 8.16
4+
- 10.13
65

76
# Trigger a push build on release and greenkeeper branches + PRs build on every branches
87
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"xo": "^0.25.0"
4343
},
4444
"engines": {
45-
"node": ">=8.16"
45+
"node": ">=10.13"
4646
},
4747
"files": [
4848
"lib",

test/integration.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ test('Accept a "parseOpts" object as option', async t => {
6464
{hash: '456', message: '%%FEATURE%% Second feature (fixes #456)'},
6565
];
6666
const releaseType = await analyzeCommits(
67-
{parserOpts: {headerPattern: /^%%(.*?)%% (.*)$/, headerCorrespondence: ['tag', 'shortDesc']}},
67+
{parserOpts: {headerPattern: /^%%(?<type>.*?)%% (?<subject>.*)$/, headerCorrespondence: ['tag', 'shortDesc']}},
6868
{cwd, commits, logger: t.context.logger}
6969
);
7070

@@ -84,7 +84,7 @@ test('Accept a partial "parseOpts" object as option', async t => {
8484
const releaseType = await analyzeCommits(
8585
{
8686
config: 'conventional-changelog-eslint',
87-
parserOpts: {headerPattern: /^%%(.*?)%% (.*)$/, headerCorrespondence: ['type', 'shortDesc']},
87+
parserOpts: {headerPattern: /^%%(?<type>.*?)%% (?<subject>.*)$/, headerCorrespondence: ['type', 'shortDesc']},
8888
},
8989
{cwd, commits, logger: t.context.logger}
9090
);

test/load-parser-config.test.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,21 @@ test('Load "conventional-changelog-angular" by default', async t => {
3838
});
3939

4040
test('Accept a "parserOpts" object as option', async t => {
41-
const customParserOpts = {headerPattern: /^##(.*?)## (.*)$/, headerCorrespondence: ['tag', 'shortDesc']};
41+
const customParserOpts = {
42+
headerPattern: /^##(?<type>.*?)## (?<subject>.*)$/,
43+
headerCorrespondence: ['tag', 'shortDesc'],
44+
};
4245
const parserOpts = await loadParserConfig({parserOpts: customParserOpts}, {cwd});
4346

4447
t.is(customParserOpts.headerPattern, parserOpts.headerPattern);
4548
t.deepEqual(customParserOpts.headerCorrespondence, parserOpts.headerCorrespondence);
4649
});
4750

4851
test('Accept a partial "parserOpts" object as option that overlaod a preset', async t => {
49-
const customParserOpts = {headerPattern: /^##(.*?)## (.*)$/, headerCorrespondence: ['tag', 'shortDesc']};
52+
const customParserOpts = {
53+
headerPattern: /^##(?<type>.*?)## (?<subject>.*)$/,
54+
headerCorrespondence: ['tag', 'shortDesc'],
55+
};
5056
const parserOpts = await loadParserConfig({parserOpts: customParserOpts, preset: 'angular'}, {cwd});
5157

5258
t.is(customParserOpts.headerPattern, parserOpts.headerPattern);
@@ -55,7 +61,10 @@ test('Accept a partial "parserOpts" object as option that overlaod a preset', as
5561
});
5662

5763
test('Accept a partial "parserOpts" object as option that overlaod a config', async t => {
58-
const customParserOpts = {headerPattern: /^##(.*?)## (.*)$/, headerCorrespondence: ['tag', 'shortDesc']};
64+
const customParserOpts = {
65+
headerPattern: /^##(?<type>.*?)## (?<subject>.*)$/,
66+
headerCorrespondence: ['tag', 'shortDesc'],
67+
};
5968
const parserOpts = await loadParserConfig(
6069
{parserOpts: customParserOpts, config: 'conventional-changelog-angular'},
6170
{cwd}

0 commit comments

Comments
 (0)