Skip to content

Commit

Permalink
refactor: disable ts checks in user project by default
Browse files Browse the repository at this point in the history
  • Loading branch information
brunozoric committed May 13, 2024
1 parent a9012b4 commit d50ba58
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = options => {
const sourceMaps = options.sourceMaps !== false;

const definitions = overrides.define ? JSON.parse(overrides.define) : {};
const tsChecksEnabled = process.env.WEBINY_DISABLE_TS_CHECKS !== "true";
const tsChecksEnabled = process.env.WEBINY_ENABLE_TS_CHECKS === "true";

return {
entry: [
Expand Down
16 changes: 4 additions & 12 deletions packages/project-utils/bundling/function/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ module.exports = options => {
const sourceMaps = options.sourceMaps !== false;

const definitions = overrides.define ? JSON.parse(overrides.define) : {};
const tsChecksEnabled = process.env.WEBINY_DISABLE_TS_CHECKS !== "true";
const tsChecksEnabled = process.env.WEBINY_ENABLE_TS_CHECKS === "true";

return {
context: cwd,
entry: [
sourceMaps && require.resolve("source-map-support/register"),
path.resolve(entry)
Expand Down Expand Up @@ -60,17 +59,10 @@ module.exports = options => {
tsChecksEnabled &&
new ForkTsCheckerWebpackPlugin({
typescript: {
typescriptPath: require.resolve("typescript"),
configOverwrite: {
skipLibCheck: true,
references: []
},
diagnosticOptions: {
semantic: true,
syntactic: true
}
configFile: path.resolve(cwd, "./tsconfig.json"),
typescriptPath: require.resolve("typescript")
},
async: false
async: !production
}),
options.logs && new WebpackBar({ name: path.basename(cwd) })
].filter(Boolean),
Expand Down
2 changes: 1 addition & 1 deletion packages/project-utils/package.json
Original file line number Diff line number Diff line change
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.91.0",
"webpack-dev-server": "^4.6.0",
"webpack-manifest-plugin": "^4.0.2",
"webpackbar": "^6.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/serverless-cms-aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"invariant": "^2.2.4",
"node-fetch": "^2.6.13",
"ora": "^4.1.1",
"webpack": "^5.90.0"
"webpack": "^5.91.0"
},
"devDependencies": {
"@babel/cli": "^7.23.9",
Expand Down
61 changes: 7 additions & 54 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13059,7 +13059,7 @@ __metadata:
languageName: node
linkType: hard

"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.11.5, @webassemblyjs/ast@npm:^1.12.1":
"@webassemblyjs/ast@npm:1.12.1, @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.11.5, @webassemblyjs/wasm-edit@npm:^1.12.1":
"@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.11.5, @webassemblyjs/wasm-parser@npm:^1.12.1":
"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1":
version: 1.12.1
resolution: "@webassemblyjs/wasm-parser@npm:1.12.1"
dependencies:
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.91.0
webpack-dev-server: ^4.6.0
webpack-manifest-plugin: ^4.0.2
webpackbar: ^6.0.0
Expand Down Expand Up @@ -17684,7 +17684,7 @@ __metadata:
ora: ^4.1.1
ttypescript: ^1.5.12
typescript: 4.7.4
webpack: ^5.90.0
webpack: ^5.91.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -23673,16 +23673,6 @@ __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 @@ -39666,7 +39656,7 @@ __metadata:
languageName: node
linkType: hard

"watchpack@npm:^2.4.0, watchpack@npm:^2.4.1":
"watchpack@npm:^2.4.1":
version: 2.4.1
resolution: "watchpack@npm:2.4.1"
dependencies:
Expand Down Expand Up @@ -39819,44 +39809,7 @@ __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":
"webpack@npm:^5.91.0":
version: 5.91.0
resolution: "webpack@npm:5.91.0"
dependencies:
Expand Down

0 comments on commit d50ba58

Please sign in to comment.