Skip to content

Commit 569069e

Browse files
greenkeeper[bot]pvdlg
authored andcommitted
chore(package): update xo to version 0.28.0
1 parent cbb5016 commit 569069e

File tree

3 files changed

+30
-27
lines changed

3 files changed

+30
-27
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"semantic-release": "^17.0.0",
3939
"sinon": "^9.0.0",
4040
"tempy": "^0.5.0",
41-
"xo": "^0.27.0"
41+
"xo": "^0.28.0"
4242
},
4343
"engines": {
4444
"node": ">=10.18"
@@ -95,6 +95,9 @@
9595
},
9696
"xo": {
9797
"prettier": true,
98-
"space": true
98+
"space": true,
99+
"rules": {
100+
"unicorn/string-content": "off"
101+
}
99102
}
100103
}

test/integration.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ test('Accept a partial "parseOpts" and "writerOpts" objects as option', async t
197197
const changelog = await generateNotes(
198198
{
199199
preset: 'angular',
200-
parserOpts: {headerPattern: /^(?<type>\w*)(?:\((?<scope>.*)\)): (?<subject>.*)$/},
200+
parserOpts: {headerPattern: /^(?<type>\w*)\((?<scope>.*)\): (?<subject>.*)$/},
201201
writerOpts: {commitsSort: ['subject', 'scope']},
202202
},
203203
{cwd, options: {repositoryUrl}, lastRelease, nextRelease, commits}

test/load-changelog-config.test.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,88 +49,88 @@ test('Load "conventional-changelog-angular" by default', async t => {
4949
});
5050

5151
test('Accept a "parserOpts" object as option', async t => {
52-
const customParserOpts = {
52+
const customParserOptions = {
5353
headerPattern: /^##(?<tag>.*?)## (?<shortDesc>.*)$/,
5454
headerCorrespondence: ['tag', 'shortDesc'],
5555
};
56-
const changelogConfig = await loadChangelogConfig({parserOpts: customParserOpts}, {cwd});
56+
const changelogConfig = await loadChangelogConfig({parserOpts: customParserOptions}, {cwd});
5757
const angularChangelogConfig = await require('conventional-changelog-angular');
5858

59-
t.is(customParserOpts.headerPattern, changelogConfig.parserOpts.headerPattern);
60-
t.deepEqual(customParserOpts.headerCorrespondence, changelogConfig.parserOpts.headerCorrespondence);
59+
t.is(customParserOptions.headerPattern, changelogConfig.parserOpts.headerPattern);
60+
t.deepEqual(customParserOptions.headerCorrespondence, changelogConfig.parserOpts.headerCorrespondence);
6161
t.deepEqual(changelogConfig.parserOpts.noteKeywords, angularChangelogConfig.parserOpts.noteKeywords);
6262
t.deepEqual(changelogConfig.writerOpts, angularChangelogConfig.writerOpts);
6363
});
6464

6565
test('Accept a "writerOpts" object as option', async t => {
66-
const customWriterOpts = {commitGroupsSort: 'title', commitsSort: ['scope', 'subject']};
67-
const changelogConfig = await loadChangelogConfig({writerOpts: customWriterOpts}, {cwd});
66+
const customWriterOptions = {commitGroupsSort: 'title', commitsSort: ['scope', 'subject']};
67+
const changelogConfig = await loadChangelogConfig({writerOpts: customWriterOptions}, {cwd});
6868
const angularChangelogConfig = await require('conventional-changelog-angular');
6969

70-
t.is(customWriterOpts.commitGroupsSort, changelogConfig.writerOpts.commitGroupsSort);
71-
t.deepEqual(customWriterOpts.commitsSort, changelogConfig.writerOpts.commitsSort);
70+
t.is(customWriterOptions.commitGroupsSort, changelogConfig.writerOpts.commitGroupsSort);
71+
t.deepEqual(customWriterOptions.commitsSort, changelogConfig.writerOpts.commitsSort);
7272
t.deepEqual(changelogConfig.writerOpts.noteGroupsSort, angularChangelogConfig.writerOpts.noteGroupsSort);
7373
t.deepEqual(changelogConfig.parserOpts, angularChangelogConfig.parserOpts);
7474
});
7575

7676
test('Accept a partial "parserOpts" object as option that overwrite a preset', async t => {
77-
const customParserOpts = {
77+
const customParserOptions = {
7878
headerPattern: /^##(?<tag>.*?)## (?<shortDesc>.*)$/,
7979
headerCorrespondence: ['tag', 'shortDesc'],
8080
};
81-
const changelogConfig = await loadChangelogConfig({parserOpts: customParserOpts, preset: 'angular'}, {cwd});
81+
const changelogConfig = await loadChangelogConfig({parserOpts: customParserOptions, preset: 'angular'}, {cwd});
8282
const angularChangelogConfig = await require('conventional-changelog-angular');
8383

84-
t.is(customParserOpts.headerPattern, changelogConfig.parserOpts.headerPattern);
85-
t.deepEqual(customParserOpts.headerCorrespondence, changelogConfig.parserOpts.headerCorrespondence);
84+
t.is(customParserOptions.headerPattern, changelogConfig.parserOpts.headerPattern);
85+
t.deepEqual(customParserOptions.headerCorrespondence, changelogConfig.parserOpts.headerCorrespondence);
8686
t.truthy(changelogConfig.parserOpts.noteKeywords);
8787
t.deepEqual(changelogConfig.writerOpts, angularChangelogConfig.writerOpts);
8888
});
8989

9090
test('Accept a "writerOpts" object as option that overwrite a preset', async t => {
91-
const customWriterOpts = {commitGroupsSort: 'title', commitsSort: ['scope', 'subject']};
92-
const changelogConfig = await loadChangelogConfig({writerOpts: customWriterOpts, preset: 'angular'}, {cwd});
91+
const customWriterOptions = {commitGroupsSort: 'title', commitsSort: ['scope', 'subject']};
92+
const changelogConfig = await loadChangelogConfig({writerOpts: customWriterOptions, preset: 'angular'}, {cwd});
9393
const angularChangelogConfig = await require('conventional-changelog-angular');
9494

95-
t.is(customWriterOpts.commitGroupsSort, changelogConfig.writerOpts.commitGroupsSort);
96-
t.deepEqual(customWriterOpts.commitsSort, changelogConfig.writerOpts.commitsSort);
95+
t.is(customWriterOptions.commitGroupsSort, changelogConfig.writerOpts.commitGroupsSort);
96+
t.deepEqual(customWriterOptions.commitsSort, changelogConfig.writerOpts.commitsSort);
9797
t.truthy(changelogConfig.writerOpts.noteGroupsSort);
9898
t.deepEqual(changelogConfig.parserOpts, angularChangelogConfig.parserOpts);
9999
});
100100

101101
test('Accept a partial "parserOpts" object as option that overwrite a config', async t => {
102-
const customParserOpts = {
102+
const customParserOptions = {
103103
headerPattern: /^##(?<tag>.*?)## (?<shortDesc>.*)$/,
104104
headerCorrespondence: ['tag', 'shortDesc'],
105105
};
106106
const changelogConfig = await loadChangelogConfig(
107107
{
108-
parserOpts: customParserOpts,
108+
parserOpts: customParserOptions,
109109
config: 'conventional-changelog-angular',
110110
},
111111
{cwd}
112112
);
113113
const angularChangelogConfig = await require('conventional-changelog-angular');
114114

115-
t.is(customParserOpts.headerPattern, changelogConfig.parserOpts.headerPattern);
116-
t.deepEqual(customParserOpts.headerCorrespondence, changelogConfig.parserOpts.headerCorrespondence);
115+
t.is(customParserOptions.headerPattern, changelogConfig.parserOpts.headerPattern);
116+
t.deepEqual(customParserOptions.headerCorrespondence, changelogConfig.parserOpts.headerCorrespondence);
117117
t.truthy(changelogConfig.parserOpts.noteKeywords);
118118
t.deepEqual(changelogConfig.writerOpts, angularChangelogConfig.writerOpts);
119119
});
120120

121121
test('Accept a "writerOpts" object as option that overwrite a config', async t => {
122-
const customWriterOpts = {commitGroupsSort: 'title', commitsSort: ['scope', 'subject']};
122+
const customWriterOptions = {commitGroupsSort: 'title', commitsSort: ['scope', 'subject']};
123123
const changelogConfig = await loadChangelogConfig(
124124
{
125-
writerOpts: customWriterOpts,
125+
writerOpts: customWriterOptions,
126126
config: 'conventional-changelog-angular',
127127
},
128128
{cwd}
129129
);
130130
const angularChangelogConfig = await require('conventional-changelog-angular');
131131

132-
t.is(customWriterOpts.commitGroupsSort, changelogConfig.writerOpts.commitGroupsSort);
133-
t.deepEqual(customWriterOpts.commitsSort, changelogConfig.writerOpts.commitsSort);
132+
t.is(customWriterOptions.commitGroupsSort, changelogConfig.writerOpts.commitGroupsSort);
133+
t.deepEqual(customWriterOptions.commitsSort, changelogConfig.writerOpts.commitsSort);
134134
t.truthy(changelogConfig.writerOpts.noteGroupsSort);
135135
t.deepEqual(changelogConfig.parserOpts, angularChangelogConfig.parserOpts);
136136
});

0 commit comments

Comments
 (0)