Skip to content

Commit 98738e1

Browse files
authored
fix: update dependencies to support @wordpress/scripts (#303)
BREAKING CHANGE: Updates dependencies for compatibility with WordPress 6.6.*, but breaks JS in WordPress 6.5.* and below. If you need support for WP 6.5.*, please do not upgrade to this new major version. * chore: refactor for newspack-scripts dependency updates * refactor: use proxy script for eslint and stylelint scripts * fix: peer dependencies * chore: update newspack-scripts to v5.6.0-alpha.3 * chore: add .stylelintrc.js * chore: update newspack-scripts to v5.6.0-alpha.4 * fix: add missing Prettier config files * chore: update newspack-scripts to 5.6.0-alpha.5 * chore: update newspack-scripts to v5.6.0-alpha.7 * chore: update newspack-scripts to v5.6.0-alpha.8 * fix: phpcs * chore: bump newspack-scripts to v5.5.2
1 parent d5f61a1 commit 98738e1

14 files changed

+19913
-44629
lines changed

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.11.1
1+
lts/*

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
release
4+
vendor

.prettierrc

-10
This file was deleted.

.prettierrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const baseConfig = require( './node_modules/newspack-scripts/config/prettier.config.js' );
2+
3+
module.exports = {
4+
...baseConfig
5+
};

.stylelintrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
ignoreFiles: [
3+
'dist/**',
4+
'node_modules/**',
5+
'release/**',
6+
'scripts/**',
7+
],
8+
extends: [ './node_modules/newspack-scripts/config/stylelint.config.js' ],
9+
};

composer.json

+40-33
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
11
{
2-
"name": "automattic/newspack-sponsors",
3-
"description": "Add sponsors and sponsor info to posts. Allows special visual treatment for sponsored content.",
4-
"type": "wordpress-plugin",
5-
"require": {
6-
},
7-
"require-dev": {
8-
"automattic/vipwpcs": "^2.0",
9-
"wp-coding-standards/wpcs": "^2.2",
10-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
11-
"phpcompatibility/phpcompatibility-wp": "^2.1",
12-
"brainmaestro/composer-git-hooks": "^2.8"
13-
},
14-
"license": "GPL-2.0-or-later",
15-
"scripts": {
16-
"post-install-cmd": [ "vendor/bin/cghooks add --no-lock" ],
17-
"post-update-cmd": [ "vendor/bin/cghooks update" ]
18-
},
19-
"extra": {
20-
"hooks": {
21-
"pre-commit": [
22-
"./node_modules/.bin/lint-staged"
23-
],
24-
"commit-msg": [
25-
"cat $1 | ./node_modules/.bin/newspack-scripts commitlint"
26-
]
27-
}
28-
},
29-
"config": {
30-
"allow-plugins": {
31-
"dealerdirect/phpcodesniffer-composer-installer": true
32-
}
33-
}
34-
}
2+
"name": "automattic/newspack-sponsors",
3+
"description": "Add sponsors and sponsor info to posts. Allows special visual treatment for sponsored content.",
4+
"type": "wordpress-plugin",
5+
"require": {},
6+
"require-dev": {
7+
"automattic/vipwpcs": "^3.0",
8+
"wp-coding-standards/wpcs": "^3.0",
9+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
10+
"phpcompatibility/phpcompatibility-wp": "^2.1",
11+
"brainmaestro/composer-git-hooks": "^2.8"
12+
},
13+
"license": "GPL-2.0-or-later",
14+
"scripts": {
15+
"post-install-cmd": [
16+
"vendor/bin/cghooks add --no-lock"
17+
],
18+
"post-update-cmd": [
19+
"vendor/bin/cghooks update"
20+
]
21+
},
22+
"extra": {
23+
"hooks": {
24+
"pre-commit": [
25+
"./node_modules/.bin/lint-staged"
26+
],
27+
"commit-msg": [
28+
"cat $1 | ./node_modules/.bin/newspack-scripts commitlint"
29+
]
30+
}
31+
},
32+
"config": {
33+
"platform": {
34+
"php": "8.0"
35+
},
36+
"allow-plugins": {
37+
"composer/installers": true,
38+
"dealerdirect/phpcodesniffer-composer-installer": true
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)