Skip to content

Commit

Permalink
Tools: Enforce the same order of fields in package.json files (#66239)
Browse files Browse the repository at this point in the history
* Update package managing flow

* Adapt packages webpack config for workspaces

* Ignore "dev" scripts

this should be done another way

* Annotate packages included as WordPress scripts

* Do not annotate react-native packages

* Update packages webpack to use wpScript package.json

* Implement Gutenberg specific check-licenses script

* Remove redundant entries from the ignore list

* Update some docs langauge about lerna and npm workspaces

* Tools: Enforce the same order of fields in `package.json` files

* Update the PR number in the changelog entry

* Update packages/npm-package-json-lint-config/index.js

Co-authored-by: Jon Surrell <[email protected]>

* Update CHANGELOG.md

* Update the order of properties added recently

---------

Co-authored-by: Aki Hamano <[email protected]>
Co-authored-by: Jon Surrell <[email protected]>

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: sirreal <[email protected]>
Co-authored-by: gziolo <[email protected]>
  • Loading branch information
4 people authored Nov 5, 2024
1 parent 0c869d4 commit 6cfeadc
Show file tree
Hide file tree
Showing 72 changed files with 156 additions and 148 deletions.
6 changes: 3 additions & 3 deletions packages/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
"wpScript": true,
"wpScriptModuleExports": "./build-module/module/index.js",
"types": "build-types",
"dependencies": {
"@babel/runtime": "7.25.7",
"@wordpress/dom-ready": "*",
"@wordpress/i18n": "*"
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/annotations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"dependencies": {
"@babel/runtime": "7.25.7",
"@wordpress/data": "*",
Expand All @@ -38,6 +39,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/api-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"dependencies": {
"@babel/runtime": "7.25.7",
Expand All @@ -34,6 +35,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/autop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "7.25.7"
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "7.25.7"
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/block-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"dependencies": {
"@babel/runtime": "7.25.7",
"@wordpress/a11y": "*",
Expand Down Expand Up @@ -54,6 +55,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"sideEffects": [
"build-style/**",
"src/**/*.scss",
Expand Down Expand Up @@ -87,6 +88,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
14 changes: 7 additions & 7 deletions packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"sideEffects": [
"build-style/**",
"src/**/*.scss",
"{src,build,build-module}/*/init.js"
],
"wpScript": true,
"wpScriptModuleExports": {
"./file/view": "./build-module/file/view.js",
"./image/view": "./build-module/image/view.js",
"./navigation/view": "./build-module/navigation/view.js",
"./query/view": "./build-module/query/view.js",
"./search/view": "./build-module/search/view.js"
},
"sideEffects": [
"build-style/**",
"src/**/*.scss",
"{src,build,build-module}/*/init.js"
],
"dependencies": {
"@babel/runtime": "7.25.7",
"@wordpress/a11y": "*",
Expand Down Expand Up @@ -88,6 +89,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/block-serialization-default-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "7.25.7"
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/block-serialization-spec-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"npm": ">=8.19.2"
},
"main": "parser.js",
"wpScript": true,
"sideEffects": false,
"dependencies": {
"pegjs": "^0.10.0",
Expand All @@ -37,6 +38,5 @@
"build": "concurrently \"npm run build:js\" \"npm run build:php\"",
"build:js": "pegjs --format commonjs -o ./parser.js ./grammar.pegjs",
"build:php": "node bin/create-php-parser.js"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"sideEffects": [
"{src,build,build-module}/{index.js,store/index.js}"
],
Expand Down Expand Up @@ -62,6 +63,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"dependencies": {
"@babel/runtime": "7.25.7",
"@wordpress/components": "*",
Expand All @@ -44,6 +45,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
6 changes: 3 additions & 3 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": [
"build-style/**",
"src/**/*.scss"
],
"types": "build-types",
"dependencies": {
"@ariakit/react": "^0.4.10",
"@babel/runtime": "7.25.7",
Expand Down Expand Up @@ -83,6 +84,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/compose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": false,
"dependencies": {
Expand All @@ -49,6 +50,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/core-commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"sideEffects": false,
"dependencies": {
"@babel/runtime": "7.25.7",
Expand All @@ -48,6 +49,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/core-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": [
"{src,build,build-module}/index.js"
Expand Down Expand Up @@ -60,6 +61,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/customize-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"dependencies": {
"@babel/runtime": "7.25.7",
"@wordpress/block-editor": "*",
Expand Down Expand Up @@ -55,6 +56,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/data-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"dependencies": {
"@babel/runtime": "7.25.7",
Expand All @@ -38,6 +39,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": false,
"dependencies": {
Expand All @@ -50,6 +51,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/dataviews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": false,
"dependencies": {
Expand All @@ -47,6 +48,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"dependencies": {
"@babel/runtime": "7.25.7",
Expand All @@ -34,6 +35,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/deprecated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": false,
"dependencies": {
Expand All @@ -33,6 +34,5 @@
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
4 changes: 2 additions & 2 deletions packages/dom-ready/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "7.25.7"
},
"publishConfig": {
"access": "public"
},
"wpScript": true
}
}
Loading

0 comments on commit 6cfeadc

Please sign in to comment.