fix: preflight npm release namespaces - #100
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7be7fd88b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }; | ||
|
|
||
| const npmNamespaceExists = (name) => { | ||
| const result = attempt("npm", ["view", name, "name", "--json"]); |
There was a problem hiding this comment.
Query the namespace without resolving
latest
When a bootstrapped package has only a non-latest dist-tag, such as a seed release published with --tag next, this command does not actually test whether its namespace exists. The npm CLI documentation states, “The default version is latest if unspecified”; consequently this lookup can return no name or an E404 for an existing package, causing JSON.parse to throw or the preflight to reject a valid namespace. Query package metadata independently of the latest tag so these releases can proceed. CC on behalf of @sok0.
AGENTS.md reference: AGENTS.md:L34-L37
Useful? React with 👍 / 👎.
a096daa to
d2deb6a
Compare
Summary
Validation
find .github -type f -name '*.test.mjs' -print0 | sort -z | xargs -0 node --test