create-stylelint 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 - present Stylelint
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,17 +1,14 @@
1
1
  #!/usr/bin/env node
2
- /* eslint-disable no-process-exit */
3
- /* eslint-disable no-console */
4
- 'use strict';
2
+ /* eslint no-console: 'off' */
3
+ /* eslint n/no-process-exit: 'off' */
5
4
 
6
- const currentVersion = process.versions.node;
5
+ import process from 'node:process';
6
+ import { readFileSync } from 'node:fs';
7
7
 
8
- import { fileURLToPath } from 'node:url';
9
- import fs from 'node:fs';
10
- import path from 'node:path';
11
8
  import semver from 'semver';
12
9
 
13
- const dirname = path.dirname(fileURLToPath(import.meta.url));
14
- const pkg = JSON.parse(fs.readFileSync(path.join(dirname, 'package.json').toString()));
10
+ const currentVersion = process.versions.node;
11
+ const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));
15
12
 
16
13
  if (!semver.satisfies(currentVersion, pkg.engines.node)) {
17
14
  console.error(`Unsupported Node.js version (v${currentVersion})`);
@@ -19,5 +16,4 @@ if (!semver.satisfies(currentVersion, pkg.engines.node)) {
19
16
  process.exit(1);
20
17
  }
21
18
 
22
- // eslint-disable-next-line node/no-unsupported-features/es-syntax
23
19
  import('./src/index.mjs').then(({ main }) => main());
package/package.json CHANGED
@@ -1,16 +1,22 @@
1
1
  {
2
2
  "name": "create-stylelint",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "The npm init script for Stylelint.",
5
5
  "keywords": [
6
6
  "stylelint",
7
7
  "npm init"
8
8
  ],
9
9
  "repository": "stylelint/create-stylelint",
10
- "funding": {
11
- "type": "opencollective",
12
- "url": "https://opencollective.com/stylelint"
13
- },
10
+ "funding": [
11
+ {
12
+ "type": "opencollective",
13
+ "url": "https://opencollective.com/stylelint"
14
+ },
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/stylelint"
18
+ }
19
+ ],
14
20
  "license": "MIT",
15
21
  "author": "stylelint",
16
22
  "main": "create-stylelint.mjs",
@@ -31,7 +37,7 @@
31
37
  "pretest": "npm run lint",
32
38
  "test": "vitest run",
33
39
  "watch": "vitest watch",
34
- "release": "np"
40
+ "release": "np --no-release-draft"
35
41
  },
36
42
  "prettier": "@stylelint/prettier-config",
37
43
  "eslintConfig": {
@@ -49,28 +55,28 @@
49
55
  ]
50
56
  },
51
57
  "dependencies": {
52
- "cosmiconfig": "^8.1.0",
53
- "execa": "^7.0.0",
54
- "ora": "^6.1.2",
55
- "picocolors": "^1.0.0",
56
- "semver": "^7.3.8",
58
+ "cosmiconfig": "^9.0.0",
59
+ "execa": "^9.2.0",
60
+ "ora": "^8.0.1",
61
+ "picocolors": "^1.0.1",
62
+ "semver": "^7.6.2",
57
63
  "strip-indent": "^4.0.0",
58
64
  "which-pm-runs": "^1.1.0"
59
65
  },
60
66
  "devDependencies": {
61
- "@stylelint/npm-package-json-lint-config": "^3.0.0",
62
- "@stylelint/prettier-config": "^2.0.0",
63
- "@stylelint/remark-preset": "^4.0.0",
64
- "@types/which-pm-runs": "^1.0.0",
65
- "eslint": "^8.35.0",
66
- "eslint-config-stylelint": "^18.0.0",
67
- "np": "^7.6.3",
67
+ "@stylelint/npm-package-json-lint-config": "^5.0.1",
68
+ "@stylelint/prettier-config": "^3.0.0",
69
+ "@stylelint/remark-preset": "^5.1.1",
70
+ "@types/which-pm-runs": "^1.0.2",
71
+ "eslint": "^8.57.0",
72
+ "eslint-config-stylelint": "^21.0.0",
73
+ "np": "^10.0.6",
68
74
  "npm-run-all": "^4.1.5",
69
- "remark-cli": "^11.0.0",
70
- "typescript": "^4.9.5",
71
- "vitest": "^0.29.2"
75
+ "remark-cli": "^12.0.1",
76
+ "typescript": "^5.5.2",
77
+ "vitest": "^1.6.0"
72
78
  },
73
79
  "engines": {
74
- "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
80
+ "node": ">=18.19.0"
75
81
  }
76
82
  }
package/src/index.mjs CHANGED
@@ -1,8 +1,10 @@
1
- /* eslint-disable no-process-exit */
2
1
  /* eslint no-console: 'off' */
2
+ /* eslint n/no-process-exit: 'off' */
3
3
 
4
4
  import * as fs from 'node:fs';
5
5
  import * as path from 'node:path';
6
+ import process from 'node:process';
7
+
6
8
  import { cosmiconfigSync } from 'cosmiconfig';
7
9
  import detectPackageManager from 'which-pm-runs';
8
10
  import { execa } from 'execa';