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

Support running npm install without package.json #206

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

yahavi
Copy link
Member

@yahavi yahavi commented Oct 18, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

Dependent PRs:

Allow running npm install (jf npm install <package-name>) without package.json file.

@yahavi yahavi added the improvement Automatically generated release notes label Oct 18, 2023
@yahavi yahavi self-assigned this Oct 18, 2023
@github-actions
Copy link


@@ -73,3 +73,11 @@ func PrintBuildInfoMismatch(t *testing.T, expected, actual []entities.Module) {
assert.NoError(t, err)
t.Errorf("build-info don't match. want: \n%v\ngot:\n%s\n", string(excpectedStr), string(actualStr))
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure it's the right thing to place this file inside the testdata directory, since this durectory shouldn't include code.
Let's move this file to be under the utils package. We also ready have a utils_test.go file thsi code can be merged into.

Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't put it in the utils package because it makes a cyclic import. I moved this file into a new "tests" package.

build/utils/npm.go Outdated Show resolved Hide resolved
build/utils/npm.go Outdated Show resolved Hide resolved
build/utils/npm_test.go Outdated Show resolved Hide resolved
@yahavi yahavi merged commit e1b1924 into jfrog:dev Oct 19, 2023
13 of 14 checks passed
@yahavi yahavi deleted the no-package-json branch October 19, 2023 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants