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

Scoped Packages #108

Closed
ayuhito opened this issue Dec 11, 2020 · 3 comments
Closed

Scoped Packages #108

ayuhito opened this issue Dec 11, 2020 · 3 comments
Assignees
Labels
breaking change Issue contains breaking changes contributors welcome! Open to outside contributors enhancement New feature or request

Comments

@ayuhito
Copy link
Member

ayuhito commented Dec 11, 2020

This is changing the Fontsource package names from fontsource-<font name> to the scoped @fontsource/<font name>, which means everyone would have to redownload the renamed package from NPM.

After randomly reading the Emotion 11 blog post, I saw it's somewhat acceptable to just rename packages and migrate them to new namespaces on a breaking change. However, Fontsource is on another scale as it has almost 1100 packages that would have to migrate over to the new namespace.

Why?

The only benefits associated with this is:

  • We never have to worry about package name conflicts as we have our own namespace. No other random developer can upload a package under the fontsource scope. While I believe it is still possible to contact NPM support to gain rights to a taken package name that blatantly uses our upload format, it isn't guaranteed to work and is messy, to say the least.

  • Possible impersonators may upload under the fontsource name which could be an entry point for one of those famous NPM package malware stories. If it is under @fontsource, you know it is authentic.

  • All packages would be stored in the same scoped folder in node_modules, which may make it easier for developers in some niche cases.

Cons:

  • Breaking change to migrate. It is controversial to displace so many developers for a minor change such as this.

I'd love to hear some opinions and whether this should be included in the next breaking change update or not. In the long term, I agree this may be the best solution moving forward and I'm inclined to approve this, but I'm more than open to change my mind here.

@ayuhito ayuhito added enhancement New feature or request contributors welcome! Open to outside contributors breaking change Issue contains breaking changes labels Dec 11, 2020
@cbirdsong
Copy link

I think this is a good idea, but only if you can deprecate the old packages so nothing relying on them would break.

@ayuhito
Copy link
Member Author

ayuhito commented Dec 16, 2020

I think this is a good idea, but only if you can deprecate the old packages so nothing relying on them would break.

@cbirdsong, of course. Actually, I'll just contact NPM support to deprecate the 1000+ packages for me since I had chatted about this idea with them previously. They have the necessary tools to mass deprecate.

@ayuhito ayuhito self-assigned this Dec 22, 2020
@ayuhito
Copy link
Member Author

ayuhito commented Dec 24, 2020

Included in the Fontsource v4 release.

@ayuhito ayuhito closed this as completed Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Issue contains breaking changes contributors welcome! Open to outside contributors enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants