Skip to content

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.

3 participants