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

v2.6.0 #5352

Merged
merged 69 commits into from
Apr 4, 2019
Merged

v2.6.0 #5352

merged 69 commits into from
Apr 4, 2019

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Mar 23, 2019

Beta Testing

If you are interested in early testing this release, you can temporarily switch to the nuxt-edge distribution. Please make this change in package.json:

{
  "dependencies": {
--    "nuxt": "^2.5.1",
++    "nuxt-edge": "^2.6.0-25904774.3c737017`",
  }
}

Migration Guide

This version is addressing most of the problems of 2.5 and is without any breaking changes. For most of the users, a normal version upgrade would be enough. However, reading this guide can help to have a smooth upgrade.

General Tips

  • Using yarn as the package manager is more preferred as Nuxt is internally being tested against yarn
  • Before upgrade ensure to remove yarn.lock, package-lock.json and node_modules
  • After full install and testing, also consider upgrading other dependencies. The yarn outdated command can be used.

Missing App Dependencies

Because of how package managers (yarn, npm) work, a wrong version of a dependency from one of the other dependencies may be hoisted into node_modules. Nuxt is strict about this and provides instructions for dependency resolution so please follow it.

The well-known problem is with firebase package that requires to manually installing node-fetch dependency in your project.

Core-js

Since core-js@2 and core-js@3 are both supported from babel 7.4.0, Starting from 2.6 Nuxt supports both versions (#5411). It is highly advised to stick with 2 (default) unless having a special dependency that needs 3. (Instructions for core-js@2 are not required but recommended)

core-js@2

  • yarn: yarn add -D core-js@2 @babel/runtime-corejs2
  • npm: npm i -D core-js@2 @babel/runtime-corejs2

core-js@3

  • yarn: yarn add -D core-js@3 @babel/runtime-corejs3
  • npm: npm i -D core-js@3 @babel/runtime-corejs3

Edit nuxt.config.js:

export default {
  build: {
    babel: {
      presets({ isServer }) {
        return [
          [
            require.resolve('@nuxt/babel-preset-app'),
            // require.resolve('@nuxt/babel-preset-app-edge'), // For nuxt-edge users
            {
              targets: isServer ? { node: '10' } : { ie: '11' },
              corejs: { version: 3 }
            }
          ]
        ]
      }
    }
  }
}

Typescript

Nuxt 2.5 users may only require to add ts-node to the dependencies

Beta Testers : Replace nuxt by nuxt-edge, and @nuxt/typescript by @nuxt/typescript-edge in the following instructions.

  1. Remove nuxt-ts dependency (2.4 users only)
    • yarn: yarn remove nuxt-ts
    • npm: npm remove nuxt-ts
  2. Add nuxt and ts-node to dependencies:
    • yarn: yarn add nuxt ts-node
    • npm: npm i nuxt ts-node
  3. Add @nuxt/typescript to devDependencies:
    • yarn: yarn add -D @nuxt/typescript
    • npm: npm i -D @nuxt/typescript
  4. Create an empty tsconfig.json file. Nuxt will automatically generate it with defaults at first run, then you can edit it to fit your needs

Features

Fixes

Refactors

Examples

Chore

Dependency Upgrades

@codecov-io
Copy link

codecov-io commented Mar 23, 2019

Codecov Report

Merging #5352 into 2.x will increase coverage by 0.42%.
The diff coverage is 94.73%.

Impacted file tree graph

@@            Coverage Diff            @@
##             2.x    #5352      +/-   ##
=========================================
+ Coverage   95.7%   96.12%   +0.42%     
=========================================
  Files         74       74              
  Lines       2513     2555      +42     
  Branches     639      650      +11     
=========================================
+ Hits        2405     2456      +51     
+ Misses        91       83       -8     
+ Partials      17       16       -1
Impacted Files Coverage Δ
packages/config/src/config/build.js 100% <ø> (ø) ⬆️
packages/typescript/src/index.js 100% <100%> (ø) ⬆️
packages/vue-renderer/src/renderer.js 95.56% <100%> (+3.48%) ⬆️
packages/webpack/src/utils/postcss.js 93.22% <100%> (+0.62%) ⬆️
packages/cli/src/imports.js 100% <100%> (ø) ⬆️
packages/cli/src/commands/dev.js 84.61% <100%> (ø) ⬆️
packages/webpack/src/config/client.js 98.18% <100%> (+0.18%) ⬆️
packages/core/src/nuxt.js 94.73% <100%> (+0.29%) ⬆️
packages/builder/src/builder.js 100% <100%> (ø) ⬆️
packages/cli/src/commands/build.js 86.36% <100%> (ø) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d7757b...516aea3. Read the comment docs.

@pi0 pi0 marked this pull request as ready for review March 24, 2019 11:28
@pi0 pi0 changed the title [WIP] prep for v2.5.2 v2.5.2 Mar 24, 2019
@pi0 pi0 requested a review from a team March 24, 2019 11:38
Copy link
Contributor

@kevinmarrec kevinmarrec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core-js & node-fetch should not be present in examples/vue-apollo/package.json, they are shipped by packages/vue-app.

Didn't find how to suggest multiple line edits (I think that Github doesn't have this feature yet)

examples/vue-apollo/package.json Show resolved Hide resolved
examples/vue-apollo/package.json Show resolved Hide resolved
@pi0 pi0 requested a review from kevinmarrec March 24, 2019 12:03
@sgmheyhey
Copy link

Have ever tried with firebase? Errors happened newly like The XMLHttpRequest compatibility library was not found.

@pi0
Copy link
Member Author

pi0 commented Apr 2, 2019

@sgmheyhey Did you tried adding xmlhttprequest npm dependency?

@sgmheyhey
Copy link

No needed with Nuxt.js v2.5.2-25897721.3b85dd97.

And v2.6, I've tried to add xmlhttprequest. But not worked.

@pi0
Copy link
Member Author

pi0 commented Apr 2, 2019

@sgmheyhey Please create an issue with a small repository or at least link to the method that you are deploying to the firebase. Sharing custom server.js, nuxt.config and package.json can also help.

@sgmheyhey
Copy link

Failed to open new issue. :( #5441

@pi0 pi0 merged commit f00a675 into 2.x Apr 4, 2019
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet