Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade @vue/cli-plugin-unit-mocha from 4.1.2 to 4.2.2 #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snyk-bot
Copy link

@snyk-bot snyk-bot commented Mar 1, 2020

Snyk has created this PR to upgrade @vue/cli-plugin-unit-mocha from 4.1.2 to 4.2.2.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
  • The recommended version is 3 versions ahead of your current version.
  • The recommended version was released 23 days ago, on 2020-02-07.
Release notes
Package name: @vue/cli-plugin-unit-mocha
  • 4.2.2 - 2020-02-07

    🐛 Bug Fix

    • @vue/cli
  • 4.2.1 - 2020-02-07

    🐛 Bug Fix

  • 4.2.0 - 2020-02-07

    How to Upgrade

    First, reinstall the latest version of @vue/cli globally.

    yarn global add @vue/cli
    # OR
    npm install -g @vue/cli
    

    Then in the projects, run

    vue upgrade
    

    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.

    #4985 #5142

    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 the typescript, unit-*, and e2e-* plugins. There may also be a few glitches in the eslint plugin.

    yarn dlx -p @vue/cli vue create hello-yarn-2 --default
    cd hello-yarn-2
    yarn serve

    Project Template Changes

    1. The default ESLint version is bumped to v6. Users can upgrade through vue upgrade.
    2. The default TypeScript version is bumped from ~3.5.3 to ~3.7.5. Users can upgrade through vue upgrade, or manually change the dependency version in package.json
    3. 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
    4. The default @vue/test-utils version used for unit tests is bumped from 1.0.0-beta.29 to 1.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
      • #5149 feat(GeneratorAPI): allow passing options to api.extendPackage (@sodatea)
    • @vue/cli-plugin-unit-jest, @vue/cli-plugin-unit-mocha
      • #5147 feat: create projects with @vue/test-utils beta 31 (@sodatea)
    • @vue/cli-ui, @vue/cli
      • #5134 feat: lock minor versions when creating projects / adding plugins (@sodatea)
    • @vue/cli-plugin-typescript, @vue/cli-ui
    • @vue/cli
      • #5091 feat: vue upgrade monorepo support, --from option, and a new vue migrate --from command (@sodatea)
      • #4828 feat: add option --merge to create command (@zyy7259)
    • @vue/cli-service
    • @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
      • #5029 feat: don't throw on console/debugger statements for vue serve (@sodatea)

    🐛 Bug Fix

    • @vue/cli-shared-utils, @vue/cli
      • #5150 fix: should infer package manager from config if there's no lockfile in the project (@sodatea)
      • #5045 refactor: use a plain http request to get package metadata (@sodatea)
    • @vue/cli
      • #5062 fix afterInvoke/onCreateComplete callbacks in Migrator (@sodatea)
      • #5038 fix: extendPackage dependency versions should be string (@pksunkara)
    • @vue/cli-ui, @vue/cli
      • #4985 fix(CORS): only allow connections from the designated host (@Akryum)
      • #5142 fix(CORS): fixup #4985, allow same-origin ws requests of any domain (@sodatea)
    • @vue/cli-plugin-e2e-cypress
    • @vue/cli-service
      • #5113 fix: correctly calculate cacheIdentifier from lockfiles (@sodatea)
    • @vue/cli-plugin-pwa
      • #5089 fix: pwa-plugin avoid generating manifest when path is an URL (@tkint)
    • @vue/cli-plugin-unit-jest, @vue/cli-plugin-unit-mocha
      • #5028 fix applyESLint when eslint plugin is added after unit test plugins (@sodatea)
    • @vue/cli-service, @vue/cli-test-utils
    • @vue/cli-plugin-e2e-nightwatch

    📝 Documentation

    🏠 Internal

    • @vue/babel-preset-app, @vue/cli-plugin-babel
      • #5133 refactor: remove usage of deprecated babel functions, preparing for babel 8 (@sodatea)
    • @vue/cli-service
      • #5123 fix: vue-template-compiler can be optional if @vue/compiler-sfc presents (@sodatea)
      • #5060 refactor: use the title option in the html template, instead of hard-code the project name (@sodatea)
    • @vue/cli
      • #5110 refactor: use env variables to set registry for package managers (@sodatea)
    • @vue/cli-shared-utils
      • #5092 refactor: use createRequire to load/resolve modules (@sodatea)
    • @vue/cli-plugin-router, @vue/cli-plugin-typescript, @vue/cli-service

    Committers: 17

  • 4.1.2 - 2019-12-28

    4.1.2 (2019-12-28)

    🐛 Bug Fix

    • @vue/cli-plugin-pwa
      • #4974 fix: fix several bugs in the PWA plugin UI, make it usable again (@sodatea)
    • @vue/cli
      • #4922 fix: should download to different tmp directories for different preset names (@sodatea)
    • @vue/cli-plugin-babel
      • #4924 fix: do not throw when babel config contains ignore/include/exclude (@sodatea)

    📝 Documentation

    🏠 Internal

    Committers: 9

from @vue/cli-plugin-unit-mocha GitHub release notes
Commit messages
Package name: @vue/cli-plugin-unit-mocha
  • 94da524 v4.2.2
  • 0d0168b fix(ui): fix the incorrect RegExp used for CORS check
  • 70fbd74 chore: refine changelog [ci skip]
  • 8b951f8 v4.2.1
  • 776275d fix: add graphql-server.js to npm files
  • d7acff5 chore: merge branch 'dev' into `master`
  • 807382c chore: refine changelog [ci skip]
  • 079a451 v4.2.0
  • d493491 chore: pre release sync
  • 6d680bc fix(migrator): correctly extract config fields to files
  • 246c197 fix: clear require cache after `upgrade`, before `migrate`
  • ef15316 fix: preserve the tilde version range after `vue upgrade`
  • 51a4da7 fix: should infer package manager from config if there's no lockfile in the project (#5150)
  • f5f4de0 feat(GeneratorAPI): allow passing options to `api.extendPackage` (#5149)
  • 9a1d52e feat: create projects with @vue/test-utils beta 31 (#5147)
  • 7f2140a docs(en): update polyfill import according to core-js 3 docs (#5130)
  • adef4c9 fix(e2e-nightwatch): fix eslint config generation (#5148)
  • c5bf5b1 chore: update chromedriver version to 80
  • e6d7bbd feat: implement a migrator that updates the project's ts version
  • 82bd074 refactor: use dep versions from plugin package.json
  • 1b64ff8 fix: fix eslint errors for typescript + e2e-nightwatch setup
  • e4410b8 fixup! fix: fix duplicate slash in metadata url
  • 813680e fix: should use the local version number if the cache falls behind
  • e1b8519 fix: fix duplicate slash in metadata url

Compare


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant