Skip to content

Commit

Permalink
fix: update dependencies to support @wordpress/scripts (#303)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dkoo authored Aug 2, 2024
1 parent d5f61a1 commit 98738e1
Show file tree
Hide file tree
Showing 14 changed files with 19,913 additions and 44,629 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.11.1
lts/*
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
release
vendor
10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const baseConfig = require( './node_modules/newspack-scripts/config/prettier.config.js' );

module.exports = {
...baseConfig
};
9 changes: 9 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
ignoreFiles: [
'dist/**',
'node_modules/**',
'release/**',
'scripts/**',
],
extends: [ './node_modules/newspack-scripts/config/stylelint.config.js' ],
};
73 changes: 40 additions & 33 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
{
"name": "automattic/newspack-sponsors",
"description": "Add sponsors and sponsor info to posts. Allows special visual treatment for sponsored content.",
"type": "wordpress-plugin",
"require": {
},
"require-dev": {
"automattic/vipwpcs": "^2.0",
"wp-coding-standards/wpcs": "^2.2",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"brainmaestro/composer-git-hooks": "^2.8"
},
"license": "GPL-2.0-or-later",
"scripts": {
"post-install-cmd": [ "vendor/bin/cghooks add --no-lock" ],
"post-update-cmd": [ "vendor/bin/cghooks update" ]
},
"extra": {
"hooks": {
"pre-commit": [
"./node_modules/.bin/lint-staged"
],
"commit-msg": [
"cat $1 | ./node_modules/.bin/newspack-scripts commitlint"
]
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
"name": "automattic/newspack-sponsors",
"description": "Add sponsors and sponsor info to posts. Allows special visual treatment for sponsored content.",
"type": "wordpress-plugin",
"require": {},
"require-dev": {
"automattic/vipwpcs": "^3.0",
"wp-coding-standards/wpcs": "^3.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"brainmaestro/composer-git-hooks": "^2.8"
},
"license": "GPL-2.0-or-later",
"scripts": {
"post-install-cmd": [
"vendor/bin/cghooks add --no-lock"
],
"post-update-cmd": [
"vendor/bin/cghooks update"
]
},
"extra": {
"hooks": {
"pre-commit": [
"./node_modules/.bin/lint-staged"
],
"commit-msg": [
"cat $1 | ./node_modules/.bin/newspack-scripts commitlint"
]
}
},
"config": {
"platform": {
"php": "8.0"
},
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit 98738e1

Please sign in to comment.