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

fix(trigger): replace yarn publish with npm publish #919

Merged
merged 1 commit into from Sep 8, 2020

Conversation

eunjae-lee
Copy link
Contributor

@eunjae-lee eunjae-lee commented Sep 8, 2020

This PR replaces yarn publish with npm publish even if user is using yarn.

yarn publish uses yarn pack under the hood, and there is a critical bug in yarn pack.

Replacing yarn publish with npm publish requires an extra job, which is to set registry to the one of npm. Even though Ship.js calls npm publish, if it's triggered by yarn shipjs trigger, then yarn overrides the registry. It's coming from ~/.yarnrc. To revert this back, we need to prepend npm_config_registry=https://registry.npmjs.org/ to set the registry correctly.

@eunjae-lee eunjae-lee merged commit 66149dc into main Sep 8, 2020
@eunjae-lee eunjae-lee deleted the fix/yarn-publish branch September 8, 2020 11:28
@Haroenv
Copy link
Contributor

Haroenv commented Sep 8, 2020

you could set the registry in the yarnrc too, although I'm not sure how that works when shipjs is in node_modules

@eunjae-lee
Copy link
Contributor Author

@Haroenv didn't see you comment here. You're right. That env var didn't work and now I'm trying again with yarn config set registry ...

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