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

BREAKING CHANGE: Invalidate special chars #13

Merged
merged 4 commits into from
Feb 13, 2017

Conversation

chrisdickinson
Copy link
Contributor

No longer allow ~!'()* in package names in any position (Surprise, they're url-safe!)

The first commit contains the relevant change; the second commit upgrades the builtins & tap deps; the final commit (noisily) standard-formats the repo.

index.js Outdated
@@ -68,6 +68,10 @@ var validate = module.exports = function(name) {
warnings.push("name can no longer contain capital letters")
}

if (/[~'!()*]/.test(name.split('/').slice(-1)[0])) {
warnings.push('name can no longer contain special characters ("~\'!()*")')
Copy link
Contributor

Choose a reason for hiding this comment

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

curious about the choice of using warn rather than error, I imagine:

  1. on the registry we'll block new publications that cause this warning.
  2. the CLI will log the message but allow the publish.
  3. old packages will continue to be able to be published?

This seems reasonable to me, just refreshing myself with this module.

@isaacs
Copy link

isaacs commented Feb 13, 2017

This seems to do what it says on the tin. Since it only affects new packages, I'm fine with this. Agreed that it is a breaking change.

Copy link

@isaacs isaacs left a comment

Choose a reason for hiding this comment

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

lgtm

@coveralls
Copy link

coveralls commented Feb 13, 2017

Coverage Status

Changes Unknown when pulling 55f1162 on invalidate-special-chars into ** on master**.

@chrisdickinson
Copy link
Contributor Author

Merging and publishing as v3.0.0.

@chrisdickinson chrisdickinson merged commit f847db3 into master Feb 13, 2017
@chrisdickinson chrisdickinson deleted the invalidate-special-chars branch February 13, 2017 22:42
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 this pull request may close these issues.

4 participants