Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove npm view "json" arg so that 16.17 does not throw on release #4890

Closed
wants to merge 2 commits into from

Conversation

robwalch
Copy link
Collaborator

Ran into trouble with npm 16.17 publishing v1.2.2:
https://github.com/video-dev/hls.js/runs/8280226435?check_suite_focus=true#step:7:1 (ended up running the scripts locally to publish).

I seems to be related to this issue npm/cli#4724 so I'm hoping that removing the JSON arg will prevent publishing to npm from failing.

Even though publishing failed, the build step did not. Does this happen for interim (canaray) builds too? Should we change the exit code to address this?

@tjenkinson
Copy link
Member

tjenkinson commented Sep 10, 2022

Even though publishing failed, the build step did not. Does this happen for interim (canaray) builds too?

Yep this was intentional so that builds could be rerun if a stage after publish failed. Otherwise given GitHub requires reruns to happen from the start you’d never be able to get a pipeline green if a later stage failed.

It looks like now given it is actually returning json we could decode it and just return false if that error is exactly E404?

@tjenkinson
Copy link
Member

tjenkinson commented Sep 10, 2022

Actually safer to return true only if there’s no error. Would be good to see what the output actually is for exists and not exists now

@tjenkinson
Copy link
Member

I opened another approach here which just hits the api directly: #4892

Should be a bit more robust than the npm cli 🤞

@robwalch robwalch closed this Sep 10, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants