consume getJson function for better error messages#110
Merged
ericsciple merged 1 commit intomasterfrom Feb 5, 2020
Merged
Conversation
a7a7e99 to
2cb5914
Compare
2cb5914 to
cf70565
Compare
ericsciple
commented
Feb 5, 2020
| - run: npm ci | ||
| - run: npm run build | ||
| - run: npm run format-check | ||
| - run: npm run pack |
Collaborator
Author
There was a problem hiding this comment.
npm run build now runs ncc
ericsciple
commented
Feb 5, 2020
| "main": "lib/setup-node.js", | ||
| "scripts": { | ||
| "build": "tsc", | ||
| "build": "tsc && ncc build", |
Collaborator
Author
There was a problem hiding this comment.
aligned with the pattern set by setup-ruby
ericsciple
commented
Feb 5, 2020
| ); | ||
| let body = await response.readBody(); | ||
| let nodeVersions = JSON.parse(body) as INodeVersion[]; | ||
| let response = await httpClient.getJson<INodeVersion[]>(dataUrl); |
Collaborator
Author
There was a problem hiding this comment.
getJson now checks for errors, so i removed the error checking code here
TingluoHuang
approved these changes
Feb 5, 2020
ericsciple
commented
Feb 5, 2020
| let body = await response.readBody(); | ||
| let nodeVersions = JSON.parse(body) as INodeVersion[]; | ||
| let response = await httpClient.getJson<INodeVersion[]>(dataUrl); | ||
| let nodeVersions = response.result || []; |
Collaborator
Author
There was a problem hiding this comment.
|| [] is to satisfy typescript. Shouldnt be null since getJson checks for errors
crAlfred
added a commit
to crAlfred/setup-node
that referenced
this pull request
Feb 12, 2020
krzyk
pushed a commit
to krzyk/setup-node
that referenced
this pull request
Apr 11, 2023
Update README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
also updated package.json scripts to align with setup-ruby, also ran npm audit fix