Releases: vuejs/vue-cli
v4.2.1
v4.2.0
Notable Changes
Vue CLI UI CORS Issue
A critical CORS vulnerability is fixed in this version.
We recommend all users of vue ui
to upgrade to this version as soon as possible.
Lock Minor Version By Default
From this version on, newly-created projects and newly-added CLI plugins will lock the plugin version ranges to their minor versions.
The core functionalities of Vue CLI is quite stable at the moment. So we decided to make this change to improve project stability even more.
Users can run vue upgrade
periodically to bump the minor versions in the projects.
We also expect this change to make the adoption of new features smoother.
See more detailed explanation at #5012
ESLint 6
With the recent updates in the ecosystem (eslint-plugin-vue, @vue/eslint-config-airbnb, @vue/eslint-config-standard, @vue/eslint-config-prettier, @vue/eslint-config-typescript), Vue CLI now supports ESLint 6. It will scaffold all new projects will ESLint 6.
For users from older versions, ESLint 5 is still supported. If you want to adopt ESLint 6 in the project, it's recommended to migrate through the vue upgrade
command; otherwise, there will be much manual work to do.
Optional Chaining & Nullish Coalescing
We now support the optional chaining and nullish coalescing operators!
Note: scripts only, support in template expressions only available for Vue 3
// Optional chaining
a?.(); // undefined if `a` is null/undefined
b?.c; // undefined if `b` is null/undefined
// Nullish coalescing
undefined ?? 'some other default'; // result: 'some other default'
null ?? 'some other default'; // result: 'some other default'
'' ?? 'some other default'; // result: ''
0 ?? 300; // result: 0
false ?? true; // result: false
If you're using Babel, these syntaxes supported by default since this version, so no actions to take.
If you're using TypeScript, the vue upgrade
command will automatically do the necessary
configurations for you, or you can manually upgrade your typescript dependency to 3.7.0 or later.
vue upgrade
and vue migrate
See the Pull Request at #5091
You may have encountered the TypeError: Invalid Version: N/A
error if you ran vue upgrade
in a monorepo or forgot to run npm install
first.
It is because, to run corresponding migration scripts, Vue CLI needs to know which versions of plugins the project previously depended on.
Monorepo support has been added since v4.2.
But in case of missing dependencies or any other edge cases, you can pass a --from
option to the command to skip the local version detection step. For example: vue upgrade eslint --from 4.1.2
.
A vue migrate --from
command is available for those already bumped to the latest versions but didn't run the migration scripts.
Better Yarn 2 Support
Previously in v4.1.0, we added basic Yarn 2 support with the introduction of vue-cli-plugin-pnp
package.
Now since Yarn 2 has officially released, we have also improved the support in Vue CLI.
You can create new projects directly with Yarn 2 and run it. That extra plugin is no longer required.
Note
Not every plugin works under Yarn 2. Yarn 2 comes with a lot of breaking changes that make requires some serious work to be done in the entire Node.js ecosystem.
As for Vue CLI, we still have much work to do for the compatibility of thetypescript
,unit-*
, ande2e-*
plugins. There may also be a few glitches in theeslint
plugin.
yarn dlx -p @vue/cli vue create hello-yarn-2 --default
cd hello-yarn-2
yarn serve
Project Template Changes
- The default ESLint version is bumped to v6. Users can upgrade through
vue upgrade
. - The default TypeScript version is bumped from
~3.5.3
to~3.7.5
. Users can upgrade throughvue upgrade
, or manually change the dependency version inpackage.json
- For ESLint + TypeScript + Nightwatch users, due to the ESLint rule change, an additional rule needs to be added to
tests/e2e/.eslintrc
. We haven't implemented an automatic migration script for it. Please add it manually. See https://github.com/vuejs/vue-cli/blob/v4.2.0/packages/%40vue/cli-plugin-e2e-nightwatch/generator/template/tests/e2e/_eslintrc.js#L5 - The default
@vue/test-utils
version used for unit tests is bumped from1.0.0-beta.29
to1.0.0-beta.31
. Due to the breaking changes, we didn't migrate it automatically for old projects. Please read the release notes and upgrade at your own will.
Detailed Changelog
🚀 New Features
@vue/cli-plugin-babel
,@vue/cli-plugin-eslint
,@vue/cli-plugin-typescript
,@vue/cli
@vue/cli-plugin-unit-jest
,@vue/cli-plugin-unit-mocha
@vue/cli-ui
,@vue/cli
@vue/cli-plugin-typescript
,@vue/cli-ui
@vue/cli
@vue/cli-service
- #4953 feat: adds transparent PnP support to Webpack (@arcanis)
- #2411 feat(cli): add
--stdin
flag to serve (@nullpilot)
@vue/babel-preset-app
,@vue/cli-plugin-e2e-nightwatch
,@vue/cli-plugin-eslint
,@vue/cli-plugin-pwa
,@vue/cli-ui-addon-webpack
,@vue/cli-ui-addon-widgets
,@vue/cli-ui
,@vue/cli
@vue/cli-service
,@vue/cli-shared-utils
,@vue/cli
@vue/babel-preset-app
@vue/cli-service-global
🐛 Bug Fix
@vue/cli-shared-utils
,@vue/cli
@vue/cli
- #5062 fix
afterInvoke
/onCreateComplete
callbacks in Migrator (@sodatea) - #5038 fix:
extendPackage
dependency versions should be string (@pksunkara)
- #5062 fix
@vue/cli-ui
,@vue/cli
@vue/cli-plugin-e2e-cypress
- #5108 fix(e2e-cypress): make
--headless
work with--browser chrome
(@LinusBorg) - #4910 fix: comment eslint disable in cypress config (@cexbrayat)
- #5108 fix(e2e-cypress): make
@vue/cli-service
@vue/cli-plugin-pwa
@vue/cli-plugin-unit-jest
,@vue/cli-plugin-unit-mocha
@vue/cli-service
,@vue/cli-test-utils
@vue/cli-plugin-e2e-nightwatch
v4.1.2
4.1.2 (2019-12-28)
🐛 Bug Fix
@vue/cli-plugin-pwa
@vue/cli
@vue/cli-plugin-babel
📝 Documentation
@vue/cli-service-global
@vue/cli-plugin-unit-jest
- Other
- #4976 docs: his -> their (@sodatea)
- #4973 docs: mention navigateFallback option for PWA App Shell caching (@clementmas)
- #4917 docs: [RU] Translation update (@Alex-Sokolov)
🏠 Internal
- dependency maintenance across all packages
@vue/cli
- #4904 refactor: use inline approach (@jamesgeorge007)
@vue/cli-service
- #4909 changed var-name
async
toisAsync
(@ikumargaurav)
- #4909 changed var-name
Committers: 9
- Alexander Sokolov (@Alex-Sokolov)
- Haoqun Jiang (@sodatea)
- Ivan Demidov (@Scrum)
- James George (@jamesgeorge007)
- Jorge Moliner (@whoisjorge)
- Jun-Kyu Kim (@x6ax6b)
- Kumar Gaurav (@ikumargaurav)
- clem (@clementmas)
- ziga (@zigomir)
v4.1.1
v4.1.0
Notable Changes
Improved Default Babel Preset
We've refactored the defautl babel preset with #4797 and #4777.
If you are experiencing code size bloat with core-js-pure
imports, or encountering obscure errors when adding packages to transpileDependencies
, this release should have fixed these problems for you.
Basic Yarn 2 Support
Great thanks to @arcanis for his help on this feature.
New projects created with the default preset now have proper support for Yarn 2.
You can try it out with the following commands:
yarn global add @vue/cli@next
vue create -d hello-yarn-2
cd hello-yarn-2
yarn policies set-version v2
yarn
yarn add vue-cli-plugin-pnp -D
yarn serve
We are still working on making the entire CLI work properly under Yarn 2, and hope to support the Plug'n'Play feature in Yarn v1, too, in the near future.
If you have any idea on how to better support these package managers, contributions are more than welcome.
For more information on Yarn 2, here's a great talk about its upcoming new features: https://2019.jsconf.eu/mael-nison/yarn-2019-and-beyond.html
Better Scaffolding Experience for Users in China
CDN URLs of several popular native packages are blocked in China, including the cypress
, chromedriver
and node-sass
package. So we have now added support for mirror URLs of binary packages, following the implementation of the cnpm
package.
Now if you have configured useTaobaoRegistry
, dependency installation during vue create
would be more seamless.
Detailed Changelog
🚀 New Features
@vue/cli
@vue/cli-service
,@vue/cli-ui-addon-webpack
,@vue/cli-ui-addon-widgets
,@vue/cli-ui
,@vue/cli
@vue/cli-plugin-pwa
🐛 Bug Fix
@vue/cli-service
- #4816 fix: don't prepend publicPath with slash (@sodatea)
- #4809 fix: fix build error when path contains space (Closes #4667) (@RSeidelsohn)
@vue/babel-preset-app
@vue/babel-preset-app
,@vue/cli-plugin-babel
,@vue/cli-service
@vue/babel-preset-app
,@vue/cli-plugin-babel
,@vue/cli-plugin-typescript
,@vue/cli-service
,@vue/cli-ui
@vue/cli-shared-utils
- #4842 Replace chalk.reset with stripAnsi in @vue/cli-shared-utils/lib/logger.js (@perakerberg)
@vue/cli
- #4883 fix: support
parser
option for codemods, and enable ts parsing by default (@sodatea) - #4859 fix: invalid version error when modules not installed (@yannbertrand)
- #4883 fix: support
🏠 Internal
@vue/cli-ui
@vue/babel-preset-app
,@vue/cli-plugin-babel
,@vue/cli-service
📝 Documentation
- #4760 Add 'Browse plugins' link to header (@Akryum)
- #4820 Update doc section on Git Hooks (@Codermar)
- #4836 docs: add warnings on CSS sideEffects (@sodatea)
- #4831 Update browser-compatibility.md (@wenhandi)
- #4716 use gitlab CI env variable for project name (@gregoiredx)
- #4803 fix docs
css.loaderOptions.css.localsConvention
(@negibouze) - #4746 Update migrating-from-v3 README typo (@seangwright)
Committers: 15
- Guillaume Chau (@Akryum)
- Haoqun Jiang (@sodatea)
- Jan Van Bruggen (@JanCVanB)
- Maël Nison (@arcanis)
- Roman Seidelsohn (@RSeidelsohn)
- Jose G. Alfonso (@Codermar)
- Per Åkerberg (@perakerberg)
- Sean G. Wright (@seangwright)
- Thomas Kint (@tkint)
- Yann Bertrand (@yannbertrand)
- Yingya Zhang (@zyy7259)
- Yoshiaki Itakura (@negibouze)
- @arnaudvalle
- @gregoiredx
- 文翰弟 (@wenhandi)
v4.1.0-beta.0
🚀 New Features
@vue/cli
@vue/cli-service
,@vue/cli-ui-addon-webpack
,@vue/cli-ui-addon-widgets
,@vue/cli-ui
,@vue/cli
🐛 Bug Fix
@vue/cli-service
- #4816 fix: don't prepend publicPath with slash (@sodatea)
- #4809 fix: fix build error when path contains space (Closes #4667) (@RSeidelsohn)
@vue/babel-preset-app
@vue/babel-preset-app
,@vue/cli-plugin-babel
,@vue/cli-service
@vue/babel-preset-app
,@vue/cli-plugin-babel
,@vue/cli-plugin-typescript
,@vue/cli-service
,@vue/cli-ui
📝 Documentation
🏠 Internal
@vue/cli-ui
@vue/babel-preset-app
,@vue/cli-plugin-babel
,@vue/cli-service
Committers: 5
- Guillaume Chau (@Akryum)
- Haoqun Jiang (@sodatea)
- Jan Van Bruggen (@JanCVanB)
- Maël Nison (@arcanis)
- Roman Seidelsohn (@RSeidelsohn)
v4.0.5
🐛 Bug Fix
@vue/cli
@vue/cli-plugin-eslint
@vue/cli-ui
📝 Documentation
🏠 Internal
@vue/babel-preset-app
,@vue/cli-plugin-babel
,@vue/cli-plugin-e2e-cypress
,@vue/cli-plugin-e2e-nightwatch
,@vue/cli-plugin-eslint
,@vue/cli-plugin-router
,@vue/cli-plugin-typescript
,@vue/cli-plugin-unit-jest
,@vue/cli-plugin-unit-mocha
,@vue/cli-service-global
,@vue/cli-service
,@vue/cli-test-utils
,@vue/cli-ui-addon-webpack
,@vue/cli-ui-addon-widgets
,@vue/cli-ui
,@vue/cli
Committers: 2
v4.0.4
We've also released v3.12.1 to address the router plugin issue in a different way. See the release notes for more explanation.
🐛 Bug Fix
📝 Documentation
Committers: 2
v3.12.1
Regarding recent patch releases of Vue CLI v4, we are not fixing bugs in v4 itself, but for v3 compatibility actually (to be more specific, for the vue add router
and vue add vuex
commands in the older CLI versions, user projects are not likely affected). We still recommend all users to upgrade to v4 early.
This is because we've made a mistake in implementing the version check mechanism of core plugins in v3. As we expect to bring users the latest and best practices for their projects, we always use the latest versions of the core plugins for scaffolding. This, however, became a burden when we bump the major versions. During the RC phase, the version check logic wasn't triggered, thus we failed to spot this problem early enough.
Luckily, few breaking changes have been made in v4 regarding the scaffolding part, so most users are not affected.
The main issues are due to the changed locations of router
and vuex
templates. But as the usage varies (scaffolding via Vue CLI UI / command line; calling CLI v4 in v3 projects; calling CLI v3 in v4 projects, etc.), it took us several patches to fully address these issues. We are now also releasing this patch version in v3 so that users who are not confident enough to upgrade their workflow to v4 can have a more backward-compatible CLI to use.
🐛 Bug Fix
Committers: 1
- Haoqun Jiang (@sodatea)
v4.0.3
🐛 Bug Fix
@vue/cli-ui
,@vue/cli
@vue/cli-service
@vue/cli-plugin-eslint
,@vue/cli-plugin-typescript
,@vue/cli-ui
Committers: 1
- Haoqun Jiang (@sodatea)