Skip to content

fix(ci): use npm pkg delete instead of set to empty string#30

Merged
carlos-alm merged 1 commit intomainfrom
fix/publish-prepublishonly
Feb 23, 2026
Merged

fix(ci): use npm pkg delete instead of set to empty string#30
carlos-alm merged 1 commit intomainfrom
fix/publish-prepublishonly

Conversation

@carlos-alm
Copy link
Contributor

Summary

  • npm pkg set scripts.prepublishOnly="" fails on newer npm versions — the empty "" is not recognized as a valid key=value pair
  • Replace with npm pkg delete scripts.prepublishOnly which removes the key entirely (same effect, works across all npm versions)

Test plan

  • Merge and verify the publish workflow succeeds on next push to main

npm pkg set scripts.prepublishOnly="" fails on newer npm versions
because the empty value is not recognized as a valid key=value pair.
Use npm pkg delete to remove the key entirely instead.
@carlos-alm carlos-alm merged commit e778ddb into main Feb 23, 2026
13 checks passed
@carlos-alm carlos-alm deleted the fix/publish-prepublishonly branch February 23, 2026 01:33
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 23, 2026

Greptile Summary

Fixes publish workflow compatibility with newer npm versions by replacing npm pkg set scripts.prepublishOnly="" with npm pkg delete scripts.prepublishOnly. The empty string syntax is not recognized as valid in recent npm versions, causing the workflow to fail. The delete command removes the key entirely, achieving the same goal (preventing tests from running during publish) while working across all npm versions.

Confidence Score: 5/5

  • Safe to merge - simple CI fix with no production code changes
  • Single-line change in CI workflow that fixes a documented npm compatibility issue. The npm pkg delete command is the canonical way to remove package.json fields and works across all npm versions, whereas setting to empty string fails on newer npm versions. No impact on runtime code.
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/publish.yml Replaced npm pkg set scripts.prepublishOnly="" with npm pkg delete scripts.prepublishOnly to fix compatibility with newer npm versions

Last reviewed commit: 09b07c5

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@carlos-alm carlos-alm restored the fix/publish-prepublishonly branch February 23, 2026 01:43
@carlos-alm carlos-alm deleted the fix/publish-prepublishonly branch February 23, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant