-
Notifications
You must be signed in to change notification settings - Fork 65
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
Publish multiple npm workspaces packages #1149
Publish multiple npm workspaces packages #1149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! lets add a test to JFrog CLI with --workspaces flag and moe then one pack
output = strings.TrimSpace(output) | ||
lines := strings.Split(output, "\n") | ||
return strings.TrimSpace(lines[len(lines)-1]), nil | ||
return strings.Split(output, "\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will work on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like from the CLI test that it is working on windows 👍
…blish-multiple-npm-packages
…blish-multiple-npm-packages
artifactory/utils/npm/pack_test.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed this test as the test case was irrelevant.
We checked the whole output of the CMD and tried to extract the tar.gz file name, as in practice, the npm cmd already gives us the name. and all we have to do now is to split the file names if we have more then one.
I've deleted the test here, and added a full test in CLI side to publish multiple packages.
When using the
jf npm publish
command the core didn't address the--workspaces
flag which indices that there are multiple modules inside the current project.This PR fixes the publish command to handle more than one module if exists and combine the results.
example package.json workspaces defined:
Before:

After:

Should fix the following issue:
jfrog/jfrog-azure-devops-extension#473