newspack-scripts 5.7.0 → 5.8.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/.eslintrc.js +0 -4
- package/.prettierrc.js +5 -0
- package/bin/newspack-scripts.js +4 -4
- package/config/babel.config.js +2 -4
- package/config/eslintrc.js +3 -12
- package/config/getWebpackConfig.js +1 -1
- package/config/stylelint.config.js +3 -4
- package/package.json +54 -45
- package/scripts/release.js +1 -1
- package/scripts/typescript-check.js +7 -0
package/.eslintrc.js
CHANGED
package/.prettierrc.js
ADDED
package/bin/newspack-scripts.js
CHANGED
|
@@ -25,14 +25,14 @@ if (
|
|
|
25
25
|
if ( result.signal === 'SIGKILL' ) {
|
|
26
26
|
utils.log(
|
|
27
27
|
'The build failed because the process exited too early. ' +
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
'This probably means the system ran out of memory or someone called ' +
|
|
29
|
+
'`kill -9` on the process.'
|
|
30
30
|
);
|
|
31
31
|
} else if ( result.signal === 'SIGTERM' ) {
|
|
32
32
|
utils.log(
|
|
33
33
|
'The build failed because the process exited too early. ' +
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
'Someone might have called `kill` or `killall`, or the system could ' +
|
|
35
|
+
'be shutting down.'
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
process.exit( 1 );
|
package/config/babel.config.js
CHANGED
package/config/eslintrc.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
const wpRecommended = require.resolve(
|
|
2
|
-
'@wordpress/eslint-plugin/configs/recommended'
|
|
3
|
-
);
|
|
4
|
-
const reactRecommended = require.resolve(
|
|
5
|
-
'@wordpress/eslint-plugin/configs/react'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
1
|
/**
|
|
9
2
|
* Assume `@wordpress/*` packages are available. This is because `@wordpress/scripts` is using
|
|
10
3
|
* Dependency Extraction Webpack Plugin to use core WP packages instead of those from
|
|
@@ -23,17 +16,14 @@ module.exports = {
|
|
|
23
16
|
extends: [
|
|
24
17
|
'plugin:import/errors',
|
|
25
18
|
'plugin:import/warnings',
|
|
26
|
-
'plugin:@
|
|
27
|
-
'plugin:@
|
|
28
|
-
reactRecommended,
|
|
29
|
-
wpRecommended,
|
|
19
|
+
'plugin:@wordpress/eslint-plugin/recommended',
|
|
20
|
+
'plugin:@wordpress/eslint-plugin/react',
|
|
30
21
|
],
|
|
31
22
|
env: {
|
|
32
23
|
browser: true,
|
|
33
24
|
jest: true,
|
|
34
25
|
},
|
|
35
26
|
parser: '@typescript-eslint/parser',
|
|
36
|
-
plugins: [ '@typescript-eslint' ],
|
|
37
27
|
settings: {
|
|
38
28
|
'import/resolver': {
|
|
39
29
|
node: {
|
|
@@ -85,5 +75,6 @@ module.exports = {
|
|
|
85
75
|
'@typescript-eslint/no-shadow': 'error',
|
|
86
76
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
87
77
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
78
|
+
'@typescript-eslint/no-require-imports': 'off',
|
|
88
79
|
},
|
|
89
80
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
|
|
4
|
-
],
|
|
2
|
+
extends: [ '@wordpress/stylelint-config' ],
|
|
3
|
+
ignoreFiles: [ 'dist/**', 'node_modules/**', 'release/**', 'scripts/**' ],
|
|
5
4
|
rules: {
|
|
6
5
|
'rule-empty-line-before': null,
|
|
7
6
|
'at-rule-empty-line-before': null,
|
|
@@ -16,6 +15,7 @@ module.exports = {
|
|
|
16
15
|
'alpha-value-notation': null,
|
|
17
16
|
'color-function-notation': null,
|
|
18
17
|
'selector-not-notation': null,
|
|
18
|
+
'no-invalid-double-slash-comments': null,
|
|
19
19
|
'function-no-unknown': [
|
|
20
20
|
true,
|
|
21
21
|
{
|
|
@@ -29,6 +29,5 @@ module.exports = {
|
|
|
29
29
|
},
|
|
30
30
|
],
|
|
31
31
|
'media-feature-range-notation': null,
|
|
32
|
-
'max-line-length': null,
|
|
33
32
|
},
|
|
34
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newspack-scripts",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bin": {
|
|
6
6
|
"newspack-scripts": "./bin/newspack-scripts.js"
|
|
@@ -8,63 +8,72 @@
|
|
|
8
8
|
"author": "",
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@commitlint/cli": "^
|
|
12
|
-
"@commitlint/config-conventional": "^
|
|
13
|
-
"@rushstack/eslint-patch": "^1.
|
|
11
|
+
"@commitlint/cli": "^20.1.0",
|
|
12
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
13
|
+
"@rushstack/eslint-patch": "^1.14.1",
|
|
14
14
|
"@semantic-release/changelog": "^6.0.3",
|
|
15
15
|
"@semantic-release/git": "^10.0.1",
|
|
16
|
-
"@testing-library/jest-dom": "^
|
|
17
|
-
"@testing-library/react": "^
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@wordpress/
|
|
22
|
-
"@wordpress/
|
|
23
|
-
"@wordpress/
|
|
24
|
-
"@wordpress/
|
|
25
|
-
"@wordpress/
|
|
26
|
-
"@wordpress/
|
|
27
|
-
"@wordpress/
|
|
28
|
-
"@wordpress/
|
|
29
|
-
"@wordpress/
|
|
30
|
-
"@wordpress/
|
|
31
|
-
"@wordpress/
|
|
32
|
-
"@wordpress/
|
|
33
|
-
"@wordpress/
|
|
34
|
-
"@wordpress/html
|
|
35
|
-
"@wordpress/
|
|
36
|
-
"@wordpress/
|
|
37
|
-
"@wordpress/
|
|
38
|
-
"@wordpress/
|
|
39
|
-
"@wordpress/
|
|
40
|
-
"@wordpress/
|
|
41
|
-
"@wordpress/
|
|
42
|
-
"@wordpress/
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
16
|
+
"@testing-library/jest-dom": "^6.9.0",
|
|
17
|
+
"@testing-library/react": "^16.3.0",
|
|
18
|
+
"@types/qs": "^6.14.0",
|
|
19
|
+
"@types/react": "^19.2.2",
|
|
20
|
+
"@typescript-eslint/parser": "^8.46.0",
|
|
21
|
+
"@wordpress/a11y": "^4.33.0",
|
|
22
|
+
"@wordpress/api-fetch": "^7.33.0",
|
|
23
|
+
"@wordpress/base-styles": "^6.9.0",
|
|
24
|
+
"@wordpress/block-editor": "^15.6.0",
|
|
25
|
+
"@wordpress/blocks": "^15.6.0",
|
|
26
|
+
"@wordpress/browserslist-config": "^6.33.0",
|
|
27
|
+
"@wordpress/components": "^30.6.0",
|
|
28
|
+
"@wordpress/compose": "^7.33.0",
|
|
29
|
+
"@wordpress/data": "^10.33.0",
|
|
30
|
+
"@wordpress/date": "^5.33.0",
|
|
31
|
+
"@wordpress/dom-ready": "^4.33.0",
|
|
32
|
+
"@wordpress/edit-post": "^8.33.0",
|
|
33
|
+
"@wordpress/element": "^6.33.0",
|
|
34
|
+
"@wordpress/escape-html": "^3.33.0",
|
|
35
|
+
"@wordpress/eslint-plugin": "^22.19.0",
|
|
36
|
+
"@wordpress/hooks": "^4.33.0",
|
|
37
|
+
"@wordpress/html-entities": "^4.33.0",
|
|
38
|
+
"@wordpress/i18n": "^6.6.0",
|
|
39
|
+
"@wordpress/icons": "^11.0.0",
|
|
40
|
+
"@wordpress/keycodes": "^4.33.0",
|
|
41
|
+
"@wordpress/plugins": "^7.33.0",
|
|
42
|
+
"@wordpress/prettier-config": "^4.33.0",
|
|
43
|
+
"@wordpress/scripts": "^30.26.0",
|
|
44
|
+
"@wordpress/stylelint-config": "^23.25.0",
|
|
45
|
+
"@wordpress/url": "^4.33.0",
|
|
46
|
+
"autoprefixer": "^10.4.21",
|
|
47
|
+
"commitizen": "^4.3.1",
|
|
48
|
+
"cross-spawn": "^7.0.6",
|
|
46
49
|
"cz-conventional-changelog": "^3.3.0",
|
|
47
50
|
"eslint": "^8.57.0",
|
|
48
|
-
"eslint-config-prettier": "^
|
|
49
|
-
"eslint-plugin-import": "^2.
|
|
50
|
-
"eslint-plugin-jest": "^
|
|
51
|
-
"eslint-plugin-react": "^7.
|
|
51
|
+
"eslint-config-prettier": "^10.1.8",
|
|
52
|
+
"eslint-plugin-import": "^2.32.0",
|
|
53
|
+
"eslint-plugin-jest": "^29.0.1",
|
|
54
|
+
"eslint-plugin-react": "^7.37.5",
|
|
55
|
+
"lint-staged": "^16.2.6",
|
|
52
56
|
"lodash": "^4.17.21",
|
|
53
|
-
"postcss": "^8.
|
|
54
|
-
"postcss-focus-within": "^
|
|
57
|
+
"postcss": "^8.5.6",
|
|
58
|
+
"postcss-focus-within": "^9.0.1",
|
|
55
59
|
"postcss-scss": "^4.0.9",
|
|
56
60
|
"prettier": "npm:wp-prettier@^3.0.3",
|
|
57
|
-
"
|
|
61
|
+
"qs": "^6.14.0",
|
|
62
|
+
"semantic-release": "^25.0.1",
|
|
58
63
|
"semantic-release-version-bump": "^1.4.1",
|
|
59
|
-
"stylelint": "^
|
|
60
|
-
"typescript": "^5.
|
|
64
|
+
"stylelint": "^16.25.0",
|
|
65
|
+
"typescript": "^5.9.3",
|
|
61
66
|
"yargs": "^17.7.2"
|
|
62
67
|
},
|
|
63
68
|
"overrides": {
|
|
64
|
-
"
|
|
65
|
-
"path-to-regexp": "1.7.0"
|
|
69
|
+
"prettier": "$prettier"
|
|
66
70
|
},
|
|
67
71
|
"scripts": {
|
|
72
|
+
"lint": "npm run lint:js",
|
|
73
|
+
"lint:js": "./bin/newspack-scripts.js wp-scripts lint-js '**/{bin,config,scripts}/**/*.{js,jsx,ts,tsx}'",
|
|
74
|
+
"lint:js:staged": "./bin/newspack-scripts.js wp-scripts lint-js --ext .js,.jsx,.ts,.tsx",
|
|
75
|
+
"fix:js": "./bin/newspack-scripts.js wp-scripts lint-js --fix '**/{bin,config,scripts}/**/*.{js,jsx,ts,tsx}'",
|
|
76
|
+
"format:js": "./bin/newspack-scripts.js wp-scripts format '**/{bin,config,scripts}/**/*.{js,jsx,ts,tsx}'",
|
|
68
77
|
"semantic-release": "semantic-release"
|
|
69
78
|
},
|
|
70
79
|
"release": {
|
package/scripts/release.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DEPRECATION NOTICE: As of v5.8.0, this script is deprecated as @wordpress/eslint-plugin
|
|
3
|
+
* will perform TypeScript checks on .ts and .tsx files.
|
|
4
|
+
*
|
|
5
|
+
* This script and its dependencies will be removed in a future version of Newspack Scripts.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
'use strict';
|
|
2
9
|
|
|
3
10
|
const spawn = require( 'cross-spawn' );
|