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

feat: default to core-js version 3 #9987

Merged
merged 4 commits into from Oct 27, 2021
Merged

feat: default to core-js version 3 #9987

merged 4 commits into from Oct 27, 2021

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Oct 26, 2021

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR upgrades the Nuxt core-js dependency to v3. Users can still opt-in to old core-js@2 version if they want by installing the package at root-level, although this is not advised.

warning core-js@2.6.12: core-js@<3.3 is no longer maintained and not
recommended for usage due to the number of issues. Because of the V8
engine whims, feature detection in old core-js versions could cause
a slowdown up to 100x even if nothing is polyfilled. Please, upgrade
your dependencies to the actual version of core-js.

closes #9851

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@danielroe danielroe requested a review from pi0 October 26, 2021 09:23
@danielroe danielroe self-assigned this Oct 26, 2021
@pi0 pi0 changed the title chore!: default to core-js version 3 feat: default to core-js version 3 Oct 26, 2021
pi0
pi0 previously approved these changes Oct 26, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2021

Codecov Report

Merging #9987 (ad09d74) into dev (4bf7c35) will not change coverage.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #9987   +/-   ##
=======================================
  Coverage   65.10%   65.10%           
=======================================
  Files          94       94           
  Lines        4155     4155           
  Branches     1172     1172           
=======================================
  Hits         2705     2705           
  Misses       1171     1171           
  Partials      279      279           
Flag Coverage Δ
unittests 65.10% <50.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/webpack/src/config/base.js 65.89% <50.00%> (ø)

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 4bf7c35...ad09d74. Read the comment docs.

@pi0 pi0 merged commit 293dc11 into dev Oct 27, 2021
@pi0 pi0 deleted the chore/default-corejs-3 branch October 27, 2021 11:40
@gkatsanos
Copy link

gkatsanos commented Oct 30, 2021

hey @danielroe / @pi0 I guess we'll see this one in the next nuxtjs release? (do we have an estimate of when will that be? )

@pi0
Copy link
Member

pi0 commented Nov 2, 2021

@gkatsanos You can use nuxt-edge with a pinned version in the meantime.

@gkatsanos
Copy link

Hello @pi0 is this released or not yet?

@rchl
Copy link

rchl commented Jun 13, 2022

I'm not sure if it's stated anywhere, if so then I apologize, but core-js needs to be in project's dependencies for everything to work properly (it's required for server middleware, depending on what constructs are used there).

I'm not sure if that was also the case with core-js 2x. If so then it's not technically a breaking change, but I feel that the fact that core-js needs to be installed as a prod dependency should be mentioned somewhere. Possibly even enforced with some runtime hook or something.

@rchl
Copy link

rchl commented Jun 13, 2022

Also, maybe (depending on what what was the initial reasoning) this should be removed now:

https://github.com/nuxt/nuxt.js/blob/a10e5dd49fc06dc8b9e2a8983b10f2d025ad7328/renovate.json#L9-L9

?

@danielroe danielroe added the 2.x label Jan 18, 2023
@danielroe danielroe mentioned this pull request Jan 19, 2023
@danielroe danielroe mentioned this pull request Feb 1, 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.

nuxt/babel-preset-app incorrectly depends on core-js@2.x.x
5 participants