Skip to content

Commit e712ae3

Browse files
Sort package.json files to reduce diff from the Error Recovery PR (#1506)
* Set config * sort package json files
1 parent 1674149 commit e712ae3

File tree

29 files changed

+636
-408
lines changed

29 files changed

+636
-408
lines changed

.eslintrc.cjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,50 @@ module.exports = {
6464
'@typescript-eslint/no-var-requires': 'off',
6565
},
6666
},
67+
{
68+
files: ['./package.json', '**/package.json'],
69+
parser: 'jsonc-eslint-parser',
70+
extends: ['plugin:jsonc/recommended-with-json', 'plugin:jsonc/prettier'],
71+
rules: {
72+
// Enforce order in the scripts object
73+
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html
74+
'jsonc/sort-keys': [
75+
'error',
76+
{
77+
pathPattern: '^$',
78+
order: [
79+
'name',
80+
'version',
81+
'license',
82+
'description',
83+
'repository',
84+
'author',
85+
'type',
86+
'main',
87+
'types',
88+
'module',
89+
'exports',
90+
'publishConfig',
91+
'files',
92+
'scripts',
93+
'dependencies',
94+
'peerDependencies',
95+
'devDependencies',
96+
'release-it',
97+
'changelog',
98+
'engines',
99+
'volta',
100+
],
101+
},
102+
{
103+
pathPattern:
104+
'scripts|devDependencies|peerDependencies|optionalDependencies|pnpm|overrides|peerDependencyRules|patchedDependencies|dependenciesMeta',
105+
order: { type: 'asc' },
106+
},
107+
// ...
108+
],
109+
},
110+
},
67111

68112
{
69113
// these packages need to be fixed to avoid these warnings, but in the

benchmark/benchmarks/krausest/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"private": true,
33
"name": "@glimmer-workspace/krausest",
4+
"scripts": {
5+
"test:lint": "eslint .",
6+
"test:types": "tsc --noEmit -p ../../tsconfig.json"
7+
},
48
"dependencies": {
59
"@glimmer-workspace/benchmark-env": "workspace:^",
610
"@glimmer/compiler": "workspace:^",
@@ -19,9 +23,5 @@
1923
},
2024
"config": {
2125
"tsconfig": "../../tsconfig.json"
22-
},
23-
"scripts": {
24-
"test:lint": "eslint .",
25-
"test:types": "tsc --noEmit -p ../../tsconfig.json"
2626
}
2727
}

bin/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "@glimmer-workspace/bin",
33
"private": true,
4+
"scripts": {
5+
"test:lint": "eslint .",
6+
"test:types": "tsc --noEmit -p ./tsconfig.json"
7+
},
48
"dependencies": {
59
"@types/glob": "^8.1.0",
610
"@types/js-yaml": "^4.0.9",
@@ -21,9 +25,5 @@
2125
},
2226
"config": {
2327
"tsconfig": "./tsconfig.json"
24-
},
25-
"scripts": {
26-
"test:lint": "eslint .",
27-
"test:types": "tsc --noEmit -p ./tsconfig.json"
2828
}
2929
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"eslint-config-prettier": "^9.0.0",
9090
"eslint-import-resolver-typescript": "^3.6.1",
9191
"eslint-plugin-import": "npm:eslint-plugin-i@^2.28.1",
92+
"eslint-plugin-jsonc": "^2.10.0",
9293
"eslint-plugin-n": "^16.3.1",
9394
"eslint-plugin-qunit": "^8.0.1",
9495
"eslint-plugin-simple-import-sort": "^10.0.0",

packages/@glimmer-workspace/benchmark-env/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
"name": "@glimmer-workspace/benchmark-env",
33
"version": "0.84.3",
44
"private": true,
5-
"engines": {
6-
"node": ">=16"
7-
},
8-
"main": "index.ts",
95
"repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer-workspace/benchmark-env",
6+
"main": "index.ts",
7+
"scripts": {
8+
"test:lint": "eslint .",
9+
"test:types": "tsc --noEmit -p ../tsconfig.json"
10+
},
1011
"dependencies": {
1112
"@glimmer/global-context": "workspace:^",
1213
"@glimmer/interfaces": "workspace:^",
@@ -21,8 +22,7 @@
2122
"devDependencies": {
2223
"eslint": "^8.52.0"
2324
},
24-
"scripts": {
25-
"test:lint": "eslint .",
26-
"test:types": "tsc --noEmit -p ../tsconfig.json"
25+
"engines": {
26+
"node": ">=16"
2727
}
2828
}

packages/@glimmer-workspace/build/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
{
22
"private": true,
33
"name": "@glimmer-workspace/build-support",
4-
"type": "module",
54
"version": "1.0.0",
5+
"type": "module",
66
"main": "index.mjs",
77
"types": "index.d.mts",
8-
"engines": {
9-
"node": ">=16"
10-
},
118
"exports": {
129
"default": "./index.js"
1310
},
14-
"starbeam": {
15-
"source": "js:typed",
16-
"type": "library:build-support"
17-
},
1811
"scripts": {
1912
"test:lint": "eslint .",
2013
"test:types": "tsc --noEmit -p ../tsconfig.json"
@@ -44,5 +37,12 @@
4437
"@types/node": "^20.9.4",
4538
"eslint": "^8.52.0",
4639
"typescript": "*"
40+
},
41+
"engines": {
42+
"node": ">=16"
43+
},
44+
"starbeam": {
45+
"source": "js:typed",
46+
"type": "library:build-support"
4747
}
4848
}

packages/@glimmer-workspace/integration-tests/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
"name": "@glimmer-workspace/integration-tests",
33
"version": "0.84.3",
44
"private": true,
5-
"main": "index.ts",
65
"repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer-workspace/integration-tests",
6+
"main": "index.ts",
7+
"scripts": {
8+
"test:lint": "eslint .",
9+
"test:types": "tsc --noEmit -p ../tsconfig.json"
10+
},
711
"dependencies": {
812
"@glimmer-workspace/test-utils": "workspace:^",
913
"@glimmer/compiler": "workspace:^",
@@ -34,9 +38,5 @@
3438
"@types/js-reporters": "workspace:^",
3539
"@types/qunit": "^2.19.9",
3640
"eslint": "^8.52.0"
37-
},
38-
"scripts": {
39-
"test:lint": "eslint .",
40-
"test:types": "tsc --noEmit -p ../tsconfig.json"
4141
}
4242
}

packages/@glimmer-workspace/test-utils/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"private": true,
33
"name": "@glimmer-workspace/test-utils",
44
"main": "index.ts",
5+
"scripts": {
6+
"test:lint": "eslint .",
7+
"test:types": "tsc --noEmit -p ../tsconfig.json"
8+
},
59
"dependencies": {
610
"@glimmer/interfaces": "workspace:^",
711
"@glimmer/util": "workspace:^"
812
},
913
"devDependencies": {
1014
"eslint": "^8.52.0"
11-
},
12-
"scripts": {
13-
"test:lint": "eslint .",
14-
"test:types": "tsc --noEmit -p ../tsconfig.json"
1515
}
1616
}

packages/@glimmer/compiler/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
{
22
"name": "@glimmer/compiler",
3-
"type": "module",
43
"version": "0.85.13",
54
"repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer/compiler",
5+
"type": "module",
6+
"main": "index.ts",
7+
"types": "index.ts",
68
"exports": {
79
"types": "./index.ts",
810
"development": "./index.ts",
911
"import": "./dist/index.js"
1012
},
11-
"engines": {
12-
"node": ">= 16.0.0"
13-
},
14-
"files": [
15-
"dist"
16-
],
1713
"publishConfig": {
1814
"access": "public",
1915
"types": "dist/dev/index.d.ts",
@@ -31,6 +27,15 @@
3127
"main": null,
3228
"module": "dist/dev/index.js"
3329
},
30+
"files": [
31+
"dist"
32+
],
33+
"scripts": {
34+
"build": "rollup -c rollup.config.mjs",
35+
"test:lint": "eslint .",
36+
"test:publint": "publint",
37+
"test:types": "tsc --noEmit -p ../tsconfig.json"
38+
},
3439
"dependencies": {
3540
"@glimmer/interfaces": "workspace:^",
3641
"@glimmer/syntax": "workspace:^",
@@ -47,12 +52,7 @@
4752
"rollup": "^4.5.1",
4853
"typescript": "*"
4954
},
50-
"scripts": {
51-
"build": "rollup -c rollup.config.mjs",
52-
"test:lint": "eslint .",
53-
"test:types": "tsc --noEmit -p ../tsconfig.json",
54-
"test:publint": "publint"
55-
},
56-
"main": "index.ts",
57-
"types": "index.ts"
55+
"engines": {
56+
"node": ">= 16.0.0"
57+
}
5858
}

packages/@glimmer/debug/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
{
22
"name": "@glimmer/debug",
3-
"type": "module",
43
"version": "0.85.13",
54
"repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer/debug",
5+
"type": "module",
66
"main": "index.ts",
77
"types": "index.ts",
88
"exports": {
99
"types": "./index.ts",
1010
"development": "./index.ts"
1111
},
12-
"files": [
13-
"dist"
14-
],
1512
"publishConfig": {
1613
"access": "public",
1714
"types": "dist/dev/index.d.ts",
@@ -24,6 +21,15 @@
2421
"main": null,
2522
"module": "dist/dev/index.js"
2623
},
24+
"files": [
25+
"dist"
26+
],
27+
"scripts": {
28+
"build": "rollup -c rollup.config.mjs",
29+
"test:lint": "eslint .",
30+
"test:publint": "publint",
31+
"test:types": "tsc --noEmit -p ../tsconfig.json"
32+
},
2733
"dependencies": {
2834
"@glimmer/interfaces": "workspace:^",
2935
"@glimmer/util": "workspace:^",
@@ -37,11 +43,5 @@
3743
"rollup": "^4.5.1",
3844
"toml": "^3.0.0",
3945
"typescript": "*"
40-
},
41-
"scripts": {
42-
"test:lint": "eslint .",
43-
"test:types": "tsc --noEmit -p ../tsconfig.json",
44-
"build": "rollup -c rollup.config.mjs",
45-
"test:publint": "publint"
4646
}
4747
}

0 commit comments

Comments
 (0)