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

Why @latest? #73

Closed
fregante opened this issue Jun 25, 2024 · 2 comments · Fixed by #74
Closed

Why @latest? #73

fregante opened this issue Jun 25, 2024 · 2 comments · Fixed by #74

Comments

@fregante
Copy link

As pointed out in a recent ljh debacle, dependencies should not use branch references, but explicit versions.

Any particular reason why this points to latest?

Also, why don't all these packages look just like module.exports = Array.prototype.findLast?

@SukkaW
Copy link
Owner

SukkaW commented Jun 25, 2024

@latest was a serious mistake of mine: #63 (comment)

And the nolyfill CLI has made a very big mistake. When writing overrides to the package.json, I accidentally use @latest (e.g. @nolyfill/hasown@latest). I use latest because I don't want downstream to have several versions of @nolyfill/shared. But now if I introduce a breaking change, even if I follow the semver, it could still break many existing projects. The solution for this would be using a new npm tag when publishing packages, just like the way how yarn 2 and yarn 3 are published to the npm registry.

So in case any breaking change is going to be made, I will publish the new packages under a different tag (to make sure previous @latest usage won't be broken).

@SukkaW
Copy link
Owner

SukkaW commented Jun 25, 2024

Also, why don't all these packages look just like module.exports = Array.prototype.findLast?

ljharb creates his own polyfill behavior spec (called es-shim). And his projects are heavily based on his polyfill behavior. So I have to make the replacements behave exactly the same to prevent breaking.

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 a pull request may close this issue.

2 participants