Skip to content

Commit 073fe82

Browse files
fix(enhanced): schema precompile & generation (#3454)
1 parent 81fcc19 commit 073fe82

28 files changed

+9821
-2072
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"changegen": "./changeset-gen.js --path ./packages/enhanced --staged && ./changeset-gen.js --path ./packages/node --staged && ./changeset-gen.js --path ./packages/runtime --staged && ./changeset-gen.js --path ./packages/data-prefetch --staged && ./changeset-gen.js --path ./packages/nextjs-mf --staged && ./changeset-gen.js --path ./packages/dts-plugin --staged",
5353
"commitgen:staged": "./commit-gen.js --path ./packages --staged",
5454
"commitgen:main": "./commit-gen.js --path ./packages",
55-
"changeset:status": "changeset status"
55+
"changeset:status": "changeset status",
56+
"generate:schema": "nx run enhanced:generate:schema && nx format:write"
5657
},
5758
"pnpm": {
5859
"packageExtensions": {

packages/enhanced/package.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"access": "public"
1818
},
1919
"peerDependencies": {
20-
"webpack": "^5.0.0",
2120
"typescript": "^4.9.0 || ^5.0.0",
22-
"vue-tsc": ">=1.0.24"
21+
"vue-tsc": ">=1.0.24",
22+
"webpack": "^5.0.0"
2323
},
2424
"peerDependenciesMeta": {
2525
"webpack": {
@@ -81,20 +81,22 @@
8181
"devDependencies": {
8282
"@module-federation/webpack-bundler-runtime": "workspace:*",
8383
"@types/btoa": "^1.2.5",
84-
"enhanced-resolve": "^5.0.0"
84+
"ajv": "^8.17.1",
85+
"enhanced-resolve": "^5.0.0",
86+
"terser": "^5.37.0"
8587
},
8688
"dependencies": {
87-
"@module-federation/sdk": "workspace:*",
88-
"@module-federation/runtime-tools": "workspace:*",
89-
"@module-federation/manifest": "workspace:*",
90-
"@module-federation/managers": "workspace:*",
91-
"@module-federation/error-codes": "workspace:*",
92-
"@module-federation/dts-plugin": "workspace:*",
93-
"@module-federation/rspack": "workspace:*",
9489
"@module-federation/bridge-react-webpack-plugin": "workspace:*",
9590
"@module-federation/data-prefetch": "workspace:*",
91+
"@module-federation/dts-plugin": "workspace:*",
92+
"@module-federation/error-codes": "workspace:*",
9693
"@module-federation/inject-external-runtime-core-plugin": "workspace:*",
97-
"upath": "2.0.1",
98-
"btoa": "^1.2.1"
94+
"@module-federation/managers": "workspace:*",
95+
"@module-federation/manifest": "workspace:*",
96+
"@module-federation/rspack": "workspace:*",
97+
"@module-federation/runtime-tools": "workspace:*",
98+
"@module-federation/sdk": "workspace:*",
99+
"btoa": "^1.2.1",
100+
"upath": "2.0.1"
99101
}
100102
}

packages/enhanced/project.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
"projectType": "library",
66
"tags": ["type:pkg"],
77
"targets": {
8+
"generate:schema": {
9+
"executor": "nx:run-commands",
10+
"options": {
11+
"command": "node src/scripts/compile-schema.js",
12+
"cwd": "packages/enhanced"
13+
}
14+
},
815
"build": {
916
"executor": "@nx/js:tsc",
1017
"outputs": ["{workspaceRoot}/packages/enhanced/dist"],

0 commit comments

Comments
 (0)