Skip to content

Commit c08f0eb

Browse files
Merge pull request #444 from Yoast/feature/upgrade-packages
Refactor webpack plugins and add tooling versions file
2 parents cd55087 + 1f20f60 commit c08f0eb

File tree

7 files changed

+10201
-4337
lines changed

7 files changed

+10201
-4337
lines changed

.babelrc

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
{
2-
"presets": [ [ "env" ] ],
2+
"presets": [
3+
[ "@babel/preset-env" ],
4+
[ "@babel/preset-react", { "pragma": "wp.element.createElement", "runtime": "classic" } ]
5+
],
36
"plugins": [
4-
[
5-
"transform-react-jsx",
6-
{
7-
"pragma": "wp.element.createElement"
8-
}
9-
],
10-
"dynamic-import-webpack",
11-
"transform-object-rest-spread"
7+
"@babel/plugin-transform-runtime"
128
],
13-
"env": {
14-
"test": {
15-
"plugins": [
16-
[
17-
"transform-react-jsx",
18-
{
19-
"pragma": "wp.element.createElement"
20-
}
21-
]
22-
]
23-
}
24-
},
259
"comments": true
2610
}

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Set up node and disable caching of dependencies
7272
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
7373
with:
74-
node-version: '14'
74+
node-version-file: './.nvmrc'
7575
# Explicitly NOT using the cache functionality to prevent cache poisoning for deployments.
7676
cache: ''
7777
package-manager-cache: false

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
20

VERSIONS.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"comment": "JSON-formatted versions of the tooling and languages used by automations to build, deploy, and test this branch",
3+
"tools": {
4+
"composer": {
5+
"name": "composer",
6+
"version": "--stable",
7+
"comment": "Used with Jenkins, GH actions uses its own setup"
8+
},
9+
"node": {
10+
"name": "nodeJS",
11+
"node-version-file": "./.nvmrc",
12+
"comment": "We use the version set in the .nvmrc file, so Devs will see the same version as CI and release processes"
13+
},
14+
"php": {
15+
"name": "PHP",
16+
"GH-Actions_version": "7.4",
17+
"GH-Actions-comment": "This is hard coded ATM in the GH-actions",
18+
"version": "7.4",
19+
"possible version values": [
20+
"7.4",
21+
"8.0",
22+
"8.1",
23+
"8.2"
24+
],
25+
"container": "bullseye",
26+
"possible container values": [
27+
"bullseye"
28+
],
29+
"comment": "Used Jenkins container will be made of <version>-<container> see https://hub.docker.com/r/yoastseo/jenkins-plugin-release/tags"
30+
},
31+
"yarn": {
32+
"name": "yarn",
33+
"comment": "We use the version set in .yarnrc (line yarn-path), this is the method used by Yarn itself"
34+
}
35+
}
36+
}

config/webpack/webpack.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const CaseSensitivePathsPlugin = require( "case-sensitive-paths-webpack-plugin" );
21

32
const {
43
camelCaseDash,
@@ -99,9 +98,7 @@ module.exports = ( env = { environment: "production" } ) => {
9998
},
10099
],
101100
},
102-
plugins: [
103-
new CaseSensitivePathsPlugin(),
104-
],
101+
plugins: [],
105102
};
106103

107104
if ( mode === "development" ) {

package.json

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,25 @@
2727
},
2828
"homepage": "https://github.com/Yoast/duplicate-post#readme",
2929
"devDependencies": {
30-
"@wordpress/data": "^4.25.0",
31-
"@wordpress/dependency-extraction-webpack-plugin": "^2.8.0",
30+
"@babel/core": "^7.18.5",
31+
"@babel/plugin-transform-runtime": "^7.18.5",
32+
"@babel/preset-env": "^7.18.5",
33+
"@babel/preset-react": "^7.18.5",
34+
"@babel/runtime": "^7.18.5",
35+
"@wordpress/dependency-extraction-webpack-plugin": "^6.6.0",
36+
"@wordpress/scripts": "^28.6.0",
3237
"@yoast/grunt-plugin-tasks": "^2.5",
33-
"babel-core": "^6.26.3",
34-
"babel-eslint": "^10.1.0",
35-
"babel-loader": "7",
36-
"babel-plugin-dynamic-import-webpack": "^1.1.0",
37-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
38-
"babel-plugin-transform-react-jsx": "^6.24.1",
39-
"babel-preset-env": "^1.7.0",
40-
"babel-preset-es2015": "^6.24.1",
41-
"babel-preset-react": "^6.24.1",
42-
"babelify": "^10.0.0",
43-
"case-sensitive-paths-webpack-plugin": "^2.3.0",
38+
"babel-loader": "^9.1.3",
4439
"grunt": "^1.5.3",
4540
"grunt-contrib-clean": "^2.0.0",
4641
"grunt-git": "^1.0.14",
4742
"grunt-shell": "^3.0.1",
48-
"grunt-webpack": "^4.0.2",
43+
"grunt-webpack": "^6.0.0",
4944
"load-grunt-config": "^3.0.1",
5045
"webpack": "^5.94.0"
5146
},
5247
"dependencies": {
48+
"@wordpress/data": "^4.25.0",
5349
"@wordpress/edit-post": "^3.25.2",
5450
"@wordpress/plugins": "^2.23.0"
5551
},

0 commit comments

Comments
 (0)