Skip to content

Commit

Permalink
fix(project-utils): override workspace references during webpack TS c…
Browse files Browse the repository at this point in the history
…heck [skip ci]
  • Loading branch information
Pavel910 committed May 13, 2024
1 parent de02750 commit b937697
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 22 deletions.
14 changes: 11 additions & 3 deletions packages/project-utils/bundling/function/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = options => {
const tsChecksEnabled = process.env.WEBINY_DISABLE_TS_CHECKS !== "true";

return {
context: cwd,
entry: [
sourceMaps && require.resolve("source-map-support/register"),
path.resolve(entry)
Expand Down Expand Up @@ -59,10 +60,17 @@ module.exports = options => {
tsChecksEnabled &&
new ForkTsCheckerWebpackPlugin({
typescript: {
configFile: path.resolve(cwd, "./tsconfig.json"),
typescriptPath: require.resolve("typescript")
typescriptPath: require.resolve("typescript"),
configOverwrite: {
skipLibCheck: true,
references: []
},
diagnosticOptions: {
semantic: true,
syntactic: true
}
},
async: !production
async: false
}),
options.logs && new WebpackBar({ name: path.basename(cwd) })
].filter(Boolean),
Expand Down
4 changes: 2 additions & 2 deletions packages/project-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"eslint-config-react-app": "^6.0.0",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "6.2.0",
"fork-ts-checker-webpack-plugin": "^6.5.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"fs-extra": "^9.1.0",
"get-yarn-workspaces": "1.0.2",
"glob": "^7.1.2",
Expand Down Expand Up @@ -78,7 +78,7 @@
"url": "0.11.0",
"url-loader": "4.1.1",
"vm-browserify": "^1.1.2",
"webpack": "^5.90.0",
"webpack": "5.90.0",
"webpack-dev-server": "^4.6.0",
"webpack-manifest-plugin": "^4.0.2",
"webpackbar": "^6.0.0"
Expand Down
138 changes: 121 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2324,6 +2324,16 @@ __metadata:
languageName: node
linkType: hard

"@babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.1, @babel/code-frame@npm:^7.24.2":
version: 7.24.2
resolution: "@babel/code-frame@npm:7.24.2"
dependencies:
"@babel/highlight": ^7.24.2
picocolors: ^1.0.0
checksum: 70e867340cfe09ca5488b2f36372c45cabf43c79a5b6426e6df5ef0611ff5dfa75a57dda841895693de6008f32c21a7c97027a8c7bcabd63a7d17416cbead6f8
languageName: node
linkType: hard

"@babel/code-frame@npm:^7.21.4":
version: 7.21.4
resolution: "@babel/code-frame@npm:7.21.4"
Expand Down Expand Up @@ -2352,16 +2362,6 @@ __metadata:
languageName: node
linkType: hard

"@babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.1, @babel/code-frame@npm:^7.24.2":
version: 7.24.2
resolution: "@babel/code-frame@npm:7.24.2"
dependencies:
"@babel/highlight": ^7.24.2
picocolors: ^1.0.0
checksum: 70e867340cfe09ca5488b2f36372c45cabf43c79a5b6426e6df5ef0611ff5dfa75a57dda841895693de6008f32c21a7c97027a8c7bcabd63a7d17416cbead6f8
languageName: node
linkType: hard

"@babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.20.1, @babel/compat-data@npm:^7.20.5":
version: 7.20.14
resolution: "@babel/compat-data@npm:7.20.14"
Expand Down Expand Up @@ -13059,7 +13059,7 @@ __metadata:
languageName: node
linkType: hard

"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1":
"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.11.5, @webassemblyjs/ast@npm:^1.12.1":
version: 1.12.1
resolution: "@webassemblyjs/ast@npm:1.12.1"
dependencies:
Expand Down Expand Up @@ -13145,7 +13145,7 @@ __metadata:
languageName: node
linkType: hard

"@webassemblyjs/wasm-edit@npm:^1.12.1":
"@webassemblyjs/wasm-edit@npm:^1.11.5, @webassemblyjs/wasm-edit@npm:^1.12.1":
version: 1.12.1
resolution: "@webassemblyjs/wasm-edit@npm:1.12.1"
dependencies:
Expand Down Expand Up @@ -13186,7 +13186,7 @@ __metadata:
languageName: node
linkType: hard

"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1":
"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.11.5, @webassemblyjs/wasm-parser@npm:^1.12.1":
version: 1.12.1
resolution: "@webassemblyjs/wasm-parser@npm:1.12.1"
dependencies:
Expand Down Expand Up @@ -17378,7 +17378,7 @@ __metadata:
eslint-config-react-app: ^6.0.0
eslint-webpack-plugin: ^3.1.1
file-loader: 6.2.0
fork-ts-checker-webpack-plugin: ^6.5.0
fork-ts-checker-webpack-plugin: ^9.0.2
fs-extra: ^9.1.0
get-yarn-workspaces: 1.0.2
glob: ^7.1.2
Expand Down Expand Up @@ -17420,7 +17420,7 @@ __metadata:
url: 0.11.0
url-loader: 4.1.1
vm-browserify: ^1.1.2
webpack: ^5.90.0
webpack: 5.90.0
webpack-dev-server: ^4.6.0
webpack-manifest-plugin: ^4.0.2
webpackbar: ^6.0.0
Expand Down Expand Up @@ -23673,6 +23673,16 @@ __metadata:
languageName: node
linkType: hard

"enhanced-resolve@npm:^5.15.0":
version: 5.16.1
resolution: "enhanced-resolve@npm:5.16.1"
dependencies:
graceful-fs: ^4.2.4
tapable: ^2.2.0
checksum: 6e4c166fef72ef231455f9119686d93ecccb11874f8256d73a42de5b293cb2536050849382468864b25973514ca4fa4cb13c37be2ff857a211e2aca3ff05bb6c
languageName: node
linkType: hard

"enhanced-resolve@npm:^5.16.0":
version: 5.16.0
resolution: "enhanced-resolve@npm:5.16.0"
Expand Down Expand Up @@ -25313,6 +25323,29 @@ __metadata:
languageName: node
linkType: hard

"fork-ts-checker-webpack-plugin@npm:^9.0.2":
version: 9.0.2
resolution: "fork-ts-checker-webpack-plugin@npm:9.0.2"
dependencies:
"@babel/code-frame": ^7.16.7
chalk: ^4.1.2
chokidar: ^3.5.3
cosmiconfig: ^8.2.0
deepmerge: ^4.2.2
fs-extra: ^10.0.0
memfs: ^3.4.1
minimatch: ^3.0.4
node-abort-controller: ^3.0.1
schema-utils: ^3.1.1
semver: ^7.3.5
tapable: ^2.2.1
peerDependencies:
typescript: ">3.6.0"
webpack: ^5.11.0
checksum: 136a87bfa36cb6ca27d2ae0feb3c6cabe0de734c1c1ed38f95b71ddb3eb4b6c461829a2dbb04f18f0f717fc6341f544327598255758c269cec9774ccee035afc
languageName: node
linkType: hard

"form-data@npm:^2.5.0":
version: 2.5.1
resolution: "form-data@npm:2.5.1"
Expand Down Expand Up @@ -25395,6 +25428,17 @@ __metadata:
languageName: node
linkType: hard

"fs-extra@npm:^10.0.0":
version: 10.1.0
resolution: "fs-extra@npm:10.1.0"
dependencies:
graceful-fs: ^4.2.0
jsonfile: ^6.0.1
universalify: ^2.0.0
checksum: dc94ab37096f813cc3ca12f0f1b5ad6744dfed9ed21e953d72530d103cea193c2f81584a39e9dee1bea36de5ee66805678c0dddc048e8af1427ac19c00fffc50
languageName: node
linkType: hard

"fs-extra@npm:^11.1.0, fs-extra@npm:^11.1.1, fs-extra@npm:^11.2.0":
version: 11.2.0
resolution: "fs-extra@npm:11.2.0"
Expand Down Expand Up @@ -25454,6 +25498,13 @@ __metadata:
languageName: node
linkType: hard

"fs-monkey@npm:^1.0.4":
version: 1.0.6
resolution: "fs-monkey@npm:1.0.6"
checksum: 4e9986acf197581b10b79d3e63e74252681ca215ef82d4afbd98dcfe86b3f09189ac1d7e8064bc433e4e53cdb5c14fdb38773277d41bba18b1ff8bbdcab01a3a
languageName: node
linkType: hard

"fs-readdir-recursive@npm:^1.1.0":
version: 1.1.0
resolution: "fs-readdir-recursive@npm:1.1.0"
Expand Down Expand Up @@ -30414,6 +30465,15 @@ __metadata:
languageName: node
linkType: hard

"memfs@npm:^3.4.1":
version: 3.5.3
resolution: "memfs@npm:3.5.3"
dependencies:
fs-monkey: ^1.0.4
checksum: 18dfdeacad7c8047b976a6ccd58bc98ba76e122ad3ca0e50a21837fe2075fc0d9aafc58ab9cf2576c2b6889da1dd2503083f2364191b695273f40969db2ecc44
languageName: node
linkType: hard

"meow@npm:^8.0.0, meow@npm:^8.1.2":
version: 8.1.2
resolution: "meow@npm:8.1.2"
Expand Down Expand Up @@ -31128,6 +31188,13 @@ __metadata:
languageName: node
linkType: hard

"node-abort-controller@npm:^3.0.1":
version: 3.1.1
resolution: "node-abort-controller@npm:3.1.1"
checksum: 2c340916af9710328b11c0828223fc65ba320e0d082214a211311bf64c2891028e42ef276b9799188c4ada9e6e1c54cf7a0b7c05dd9d59fcdc8cd633304c8047
languageName: node
linkType: hard

"node-addon-api@npm:^6.1.0":
version: 6.1.0
resolution: "node-addon-api@npm:6.1.0"
Expand Down Expand Up @@ -37988,7 +38055,7 @@ __metadata:
languageName: node
linkType: hard

"tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0":
"tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0, tapable@npm:^2.2.1":
version: 2.2.1
resolution: "tapable@npm:2.2.1"
checksum: 3b7a1b4d86fa940aad46d9e73d1e8739335efd4c48322cb37d073eb6f80f5281889bf0320c6d8ffcfa1a0dd5bfdbd0f9d037e252ef972aca595330538aac4d51
Expand Down Expand Up @@ -39599,7 +39666,7 @@ __metadata:
languageName: node
linkType: hard

"watchpack@npm:^2.4.1":
"watchpack@npm:^2.4.0, watchpack@npm:^2.4.1":
version: 2.4.1
resolution: "watchpack@npm:2.4.1"
dependencies:
Expand Down Expand Up @@ -39752,6 +39819,43 @@ __metadata:
languageName: node
linkType: hard

"webpack@npm:5.90.0":
version: 5.90.0
resolution: "webpack@npm:5.90.0"
dependencies:
"@types/eslint-scope": ^3.7.3
"@types/estree": ^1.0.5
"@webassemblyjs/ast": ^1.11.5
"@webassemblyjs/wasm-edit": ^1.11.5
"@webassemblyjs/wasm-parser": ^1.11.5
acorn: ^8.7.1
acorn-import-assertions: ^1.9.0
browserslist: ^4.21.10
chrome-trace-event: ^1.0.2
enhanced-resolve: ^5.15.0
es-module-lexer: ^1.2.1
eslint-scope: 5.1.1
events: ^3.2.0
glob-to-regexp: ^0.4.1
graceful-fs: ^4.2.9
json-parse-even-better-errors: ^2.3.1
loader-runner: ^4.2.0
mime-types: ^2.1.27
neo-async: ^2.6.2
schema-utils: ^3.2.0
tapable: ^2.1.1
terser-webpack-plugin: ^5.3.10
watchpack: ^2.4.0
webpack-sources: ^3.2.3
peerDependenciesMeta:
webpack-cli:
optional: true
bin:
webpack: bin/webpack.js
checksum: 178a0e7e9e5b26264a19dd5fe554a3508a8afafc9cce972bfd4452b5128d0db1b37832f5e615be1cff1934f24da0de967929f199be2b3fe283ca1951f98ea3fe
languageName: node
linkType: hard

"webpack@npm:^5.90.0":
version: 5.91.0
resolution: "webpack@npm:5.91.0"
Expand Down

0 comments on commit b937697

Please sign in to comment.