Skip to content

Commit

Permalink
feat!: bump fork-ts-checker-webpack-plugin version to v5 (#5941)
Browse files Browse the repository at this point in the history
  • Loading branch information
sodatea committed Oct 12, 2020
1 parent 1a0d4df commit 3f7fb4f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 33 deletions.
5 changes: 2 additions & 3 deletions docs/migrations/migrate-from-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ If you want to migrate manually and gradually, you can run `vue upgrade <the-plu

### TypeScript Plugin

#### Dropped TSLint support

As [TSLint has been deprecated](https://github.com/palantir/tslint/issues/4534), we [removed](https://github.com/vuejs/vue-cli/pull/5065) all TSLint-related code in this version.
* Dropped TSLint support. As [TSLint has been deprecated](https://github.com/palantir/tslint/issues/4534), we [removed](https://github.com/vuejs/vue-cli/pull/5065) all TSLint-related code in this version.
Please consider switching to ESLint. You can check out [`tslint-to-eslint-config`](https://github.com/typescript-eslint/tslint-to-eslint-config) for a mostly automatic migration experience.
* Updated `fork-ts-checker-webpack-plugin` from v3.x to v5.x, you can see the detailed breaking changes at <https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases/tag/v4.0.0> and <https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases/tag/v5.0.0>

### E2E-Cypress Plugin

Expand Down
41 changes: 15 additions & 26 deletions packages/@vue/cli-plugin-typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,34 +82,23 @@ module.exports = (api, projectOptions) => {
// this plugin does not play well with jest + cypress setup (tsPluginE2e.spec.js) somehow
// so temporarily disabled for vue-cli tests
if (!process.env.VUE_CLI_TEST) {
if (isVue3) {
config
.plugin('fork-ts-checker')
.use(require('fork-ts-checker-webpack-plugin-v5'), [{
typescript: {
extensions: {
vue: {
enabled: true,
compiler: '@vue/compiler-sfc'
}
},
diagnosticOptions: {
semantic: true,
// https://github.com/TypeStrong/ts-loader#happypackmode
syntactic: useThreads
config
.plugin('fork-ts-checker')
.use(require('fork-ts-checker-webpack-plugin'), [{
typescript: {
extensions: {
vue: {
enabled: true,
compiler: isVue3 ? '@vue/compiler-sfc' : 'vue-template-compiler'
}
},
diagnosticOptions: {
semantic: true,
// https://github.com/TypeStrong/ts-loader#happypackmode
syntactic: useThreads
}
}])
} else {
config
.plugin('fork-ts-checker')
.use(require('fork-ts-checker-webpack-plugin'), [{
vue: { enabled: true, compiler: 'vue-template-compiler' },
formatter: 'codeframe',
// https://github.com/TypeStrong/ts-loader#happypackmode-boolean-defaultfalse
checkSyntacticErrors: useThreads
}])
}
}
}])
}
})
}
5 changes: 1 addition & 4 deletions packages/@vue/cli-plugin-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@
"@types/webpack-env": "^1.15.2",
"@vue/cli-shared-utils": "^4.5.7",
"cache-loader": "^4.1.0",
"fork-ts-checker-webpack-plugin": "^3.1.1",
"fork-ts-checker-webpack-plugin": "^5.0.11",
"globby": "^9.2.0",
"thread-loader": "^2.1.3",
"ts-loader": "^6.2.2",
"webpack": "^4.0.0",
"yorkie": "^2.0.0"
},
"optionalDependencies": {
"fork-ts-checker-webpack-plugin-v5": "npm:fork-ts-checker-webpack-plugin@^5.0.11"
},
"peerDependencies": {
"@vue/cli-service": "^3.0.0 || ^4.0.0-0",
"@vue/compiler-sfc": "^3.0.0-beta.14",
Expand Down

0 comments on commit 3f7fb4f

Please sign in to comment.