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

corejs needs updating #11

Closed
bendehghan opened this issue Jan 24, 2022 · 10 comments
Closed

corejs needs updating #11

bendehghan opened this issue Jan 24, 2022 · 10 comments

Comments

@bendehghan
Copy link

hi there!

npm WARN deprecated core-js@2.6.12: core-js@<3.4 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.
I'm getting it as part of install of another package for which your code is a requirement.

Thanks,
Ben

@duanehutchins
Copy link
Contributor

Opened a PR to fix this issue: #12

@dumbmatter
Copy link
Owner

Thanks, but I'm not sure this is worth doing. Despite the dramatic warning message, I doubt the very minimal usage of an old version of core-js is causing any problems. And this whole package is kind of deprecated since modern environments already include structuredClone.

And I am kind of rubbed the wrong way by people who pollute our consoles with tons of useless information. Like oh, an old version of an npm package might not be as good as a new version? I never would have guessed! Maybe all us package maintainers should add a message like that for every old version of every package :)

@zloirock
Copy link

You are mistaken. A little subset, one of many cases, of this issue is described here. I have always been amazed by people who simply do not believe in what the developers of the tools they use tell them - sure, they know all better -)

However, yes, this package is deprecated at least because core-js provide structuredClone polyfill by itself.

@dumbmatter
Copy link
Owner

Thanks, I will keep that in mind when applying a fix if anyone ever has a problem with this package besides npm console spam.

And it's good that other people have made structuredClone polyfills - the more the merrier. If any had existed back in 2015, realistic-structured-clone would not exist.

@zloirock
Copy link

zloirock commented Mar 11, 2022

It bacame the standard only in 2021 when it was exposed as structuredClone, so previously it didn't make sense as a polyfill.

@zloirock
Copy link

Thanks, I will keep that in mind when applying a fix if anyone ever has a problem with this package besides npm console spam.

So, you wanna going to continue to deoptimize the code and ignore notification? -) The most of users just will not understand why their apps works slower.

@dumbmatter
Copy link
Owner

My bad, I should have said "implementation" not "polyfill".

I'm not aware there is an actual performance problem. If there is a problem and someone shows me an example, I'll fix it.

@zloirock
Copy link

The example and the reason of this problem is describe in the article that was posted above. Some other V8 whims / deoptimizations mentioned here, some other you could find in other commits / issues. Those features detection is used not only in polyfills of those features - they are used in most of core-js internals, so the simples way to fix it is just update core-js to the actual version.

@duanehutchins
Copy link
Contributor

@dumbmatter I agree that polluting the console is the wrong way to go. That said, is there any harm in merging in my MR? I've already done the legwork, and it would be a shame to let it go to waste.

@dumbmatter
Copy link
Owner

v2.0.4 upgrades core-js - thanks @duanehutchins

v3.0.0 removes core-js

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

No branches or pull requests

4 participants