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: add support for scoped packages #451

Merged
merged 6 commits into from
Nov 27, 2019

Conversation

jeetiss
Copy link
Contributor

@jeetiss jeetiss commented Nov 26, 2019

re #436

  • added question about package access on setup step
  • added isScopedPackage verification on setup step
  • added custom publishCommand to config, based on information from previous step

PS: I added restricted access except scoped package support, if somebody with default package (not scoped) chose don't publish public package. Setup script will add custom publishCommand with --access restricted 🤖

Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

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

Hi @jeetiss, thanks for coming up with this PR :)

I've checked the NPM documentation, and found this

[--access <public|restricted>] Tells the registry whether this package should be published as public or restricted. Only applies to scoped packages, which default to restricted. If you don’t have a paid account, you must publish with --access public to publish scoped packages.

I guess un-scoped packages are always published in public. --access should be a thing for only scoped packages.
If I understand correctly, the xor part can be simplified, checking only if it's a scoped package.
What do you think?

@jeetiss
Copy link
Contributor Author

jeetiss commented Nov 27, 2019

Yes, @eunjae-lee you right

I'm missed that access flag applies only to scoped packages

@jeetiss jeetiss changed the title feat: add support for scoped and private packages feat: add support for scoped packages Nov 27, 2019
@eunjae-lee
Copy link
Contributor

@jeetiss That way, the publishCommand function is being quoted.
What do you think of using https://github.com/yahoo/serialize-javascript instead of JSON.stringify?

image

@eunjae-lee eunjae-lee merged commit 765cade into algolia:master Nov 27, 2019
@jeetiss jeetiss deleted the feat/add-scoped-support branch November 27, 2019 17:05
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.

None yet

2 participants