npm @vue/cli 4.0.0-rc.4

latest releases: 5.0.8, 5.0.7, 4.5.19...
5 years ago

Documentation for the RC version is available at https://next.cli.vuejs.org/
There is also a work-in-progress migration guide at #4552

To install the RC version, run yarn global add @vue/cli@next or npm i -g @vue/cli@next


Start from the version, the unit-jest plugin comes with 4 configuration presets:

  • @vue/cli-plugin-unit-jest The default preset for the most common type of projects
  • @vue/cli-plugin-unit-jest/presets/no-babel If you don't have @vue/cli-plugin-babel installed and don't want to see babel files in the project
  • @vue/cli-plugin-unit-jest/presets/typescript The preset with TypeScript support (but no TSX support)
  • @vue/cli-plugin-unit-jest/presets/typescript-and-babel The preset with TypeScript (and TSX) and babel support.

If you haven't changed the default Jest configuration (lies in either jest.config.js or the jest field in package.json) ever since project creation, you can now replace the massive configuration object with one single field:

module.exports = {
  // Replace the following preset name with the one you want to use from the above list
  preset: '@vue/cli-plugin-unit-jest'
}

(the ts-jest, babel-jest dependencies can also be removed now)

A reminder:
The default test environment in the new presets is jsdom@15, which differs from the default one in Jest 24 (jsdom@11).
This is to be aligned with the upcoming Jest 25 updates.
Most users won't be affected by this change.
For a detailed changelog with regard to jsdom, see https://github.com/jsdom/jsdom/blob/master/Changelog.md

🚀 New Features

  • @vue/cli-plugin-unit-jest
    • #4607 feat: use jsdom v15 in jest presets instead of the default v11 (@sodatea)
    • #4597 refactor: move jest configs into presets (@sodatea)
  • @vue/cli-plugin-e2e-nightwatch, @vue/cli-shared-utils, @vue/cli
    • #4563 feat(nightwatch): check user's installed browser versions on scaffolding / before running tests (@sodatea)

🐛 Bug Fix

  • @vue/cli-service
    • #4613 fix: correctly ignore html templates in copy-webpack-plugin (@sodatea)

📝 Documentation

🔨 Underlying Tools

  • @vue/cli-plugin-unit-jest
    • #4607 feat: use jsdom v15 in jest presets instead of the default v11 (@sodatea)
    • #4597 refactor: move jest configs into presets (@sodatea)

Committers: 4

Don't miss a new cli release

NewReleases is sending notifications on new releases.