Skip to content

Commit 8090553

Browse files
jeddy3ybiquitous
andauthored
Document check of configs in release process (#7047)
Co-authored-by: Masafumi Koba <[email protected]>
1 parent 56a545e commit 8090553

File tree

2 files changed

+35
-30
lines changed

2 files changed

+35
-30
lines changed

docs/maintainer-guide/releases.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,32 @@
22

33
1. Create a [new issue](https://github.com/stylelint/stylelint/issues/new?title=Release+%7Bversion%7D&labels=status%3A+needs+discussion) to announce the planned release:
44
- include the [template checklist](#new-release-issue-template)
5-
2. If necessary, test `main` locally in the:
5+
- if applicable, list any new rules so that we can discuss including them in our configs
6+
2. If necessary, open a pull request to mark those rules in [`docs/user-guide/rules.md`](../user-guide/rules.md).
7+
3. If necessary, test `main` locally in the:
68
1. [`stylelint/stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended)
79
2. [`stylelint/stylelint-config-standard`](https://github.com/stylelint/stylelint-config-standard)
810
3. [`stylelint/stylelint.io`](https://github.com/stylelint/stylelint.io)
9-
3. Release Stylelint:
11+
4. Release Stylelint:
1012
1. If necessary, reorder the changelog entries in the "Prepare release" pull request so that the widest-reaching changes come first.
1113
2. Merge the "Prepare release" pull request.
1214
3. Open a terminal window in the `stylelint` repository.
1315
4. Run `npm run release`.
1416
5. Select the version from the [`np`](https://github.com/sindresorhus/np) prompt that matches the one in the changelog.
1517
6. Confirm the publishing of the package to [www.npmjs.com/package/stylelint](https://www.npmjs.com/package/stylelint).
1618
7. Confirm the creation of the release at [github.com/stylelint/stylelint/releases](https://github.com/stylelint/stylelint/releases).
17-
4. If necessary, release `stylelint-config-*`:
19+
5. If necessary, release `stylelint-config-*`:
1820
1. Change to the `stylelint-config-*` repository.
1921
2. Repeat steps 5 to 8 above for that repository.
20-
5. Update the website:
22+
6. Update the website:
2123
1. Change to the `stylelint.io` repository.
2224
2. Run `npm install https://github.com/stylelint/stylelint/tarball/${new_version} --save-dev` (replacing `${new_version}` with the version number e.g. `14.13.2`).
2325
3. Run `npm test`.
2426
4. Commit these changes.
2527
5. Push these changes.
2628
6. Confirm the deployment of the update to [stylelint.io](https://stylelint.io).
27-
6. Check that [stylelint.io/demo](https://stylelint.io/demo) installs the latest Stylelint and config versions.
28-
7. Compose a tweet that:
29+
7. Check that [stylelint.io/demo](https://stylelint.io/demo) installs the latest Stylelint and config versions.
30+
8. Compose a tweet that:
2931
- announces the release
3032
- communicates what has changed
3133
- links to the appropriate heading in the changelog on [stylelint.io](https://stylelint.io)

lib/rules/__tests__/index.test.mjs

+27-24
Original file line numberDiff line numberDiff line change
@@ -74,36 +74,39 @@ describe('custom message option', () => {
7474
});
7575

7676
describe('standard config', () => {
77-
const tmpDir = path.join(__dirname, 'tmp');
78-
79-
// NOTE: The use of Promised-based APIs may cause flaky test on CI.
80-
rmSync(tmpDir, { recursive: true, force: true });
81-
mkdirSync(tmpDir, { recursive: true });
82-
writeFileSync(path.join(tmpDir, 'package.json'), '{}');
83-
execSync(
84-
'npm install --silent --no-package-lock --no-audit --omit=peer stylelint-config-standard',
85-
{ cwd: tmpDir },
86-
);
77+
// eslint-disable-next-line jest/no-disabled-tests -- To prevent a failure when adding a new rule to the sharable config. See #7045.
78+
describe.skip('due to chicken and egg problem #7045', () => {
79+
const tmpDir = path.join(__dirname, 'tmp');
8780

88-
const configRules = (name) => {
89-
const config = require(path.join(tmpDir, 'node_modules', name));
81+
// NOTE: The use of Promised-based APIs may cause flaky test on CI.
82+
rmSync(tmpDir, { recursive: true, force: true });
83+
mkdirSync(tmpDir, { recursive: true });
84+
writeFileSync(path.join(tmpDir, 'package.json'), '{}');
85+
execSync(
86+
'npm install --silent --no-package-lock --no-audit --omit=peer stylelint-config-standard',
87+
{ cwd: tmpDir },
88+
);
9089

91-
return Object.keys(config.rules);
92-
};
90+
const configRules = (name) => {
91+
const config = require(path.join(tmpDir, 'node_modules', name));
9392

94-
const standardRules = configRules('stylelint-config-standard');
93+
return Object.keys(config.rules);
94+
};
9595

96-
standardRules.push(...configRules('stylelint-config-recommended'));
96+
const standardRules = configRules('stylelint-config-standard');
9797

98-
afterAll(() => {
99-
rmSync(tmpDir, { recursive: true, force: true });
100-
});
98+
standardRules.push(...configRules('stylelint-config-recommended'));
10199

102-
test('the rules are not empty', () => {
103-
expect(standardRules).not.toHaveLength(0);
104-
});
100+
afterAll(() => {
101+
rmSync(tmpDir, { recursive: true, force: true });
102+
});
103+
104+
test('the rules are not empty', () => {
105+
expect(standardRules).not.toHaveLength(0);
106+
});
105107

106-
test.each(standardRules)('the rule "%s" are present in the rules doc', (name) => {
107-
expect(rulesListDoc).toMatch(new RegExp(`^.+\`${name}\`.+\\|\\s+✅\\s+\\|.+\\|$`, 'm'));
108+
test.each(standardRules)('the rule "%s" are present in the rules doc', (name) => {
109+
expect(rulesListDoc).toMatch(new RegExp(`^.+\`${name}\`.+\\|\\s+✅\\s+\\|.+\\|$`, 'm'));
110+
});
108111
});
109112
});

0 commit comments

Comments
 (0)