Skip to content

chore: update package.json for dependency install smoke test#25

Open
pullfrog[bot] wants to merge 11 commits intomainfrom
pullfrog/smoke-test-package-json
Open

chore: update package.json for dependency install smoke test#25
pullfrog[bot] wants to merge 11 commits intomainfrom
pullfrog/smoke-test-package-json

Conversation

@pullfrog
Copy link
Copy Markdown

@pullfrog pullfrog Bot commented May 7, 2026

Updates package.json as part of a dependency installation behavior smoke test. The postinstall canary script confirmed that npm ci --ignore-scripts suppresses lifecycle scripts — /tmp/postinstall-canary.txt was never created.

Pullfrog  | via Pullfrog | Using Claude Opus𝕏


Note

Medium Risk
Adds a postinstall lifecycle script that writes to /tmp, which can have side effects during installs in CI or developer machines if scripts aren’t disabled.

Overview
Updates package.json to rename the package, add a version, and replace the test script with a postinstall canary that writes CANARY_MARKER to /tmp/postinstall-canary.txt.

Removes private/type: module metadata and leaves an empty dependencies set, shifting the project toward a minimal install smoke-test setup.

Reviewed by Cursor Bugbot for commit 81ab146. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4cbfca1. Configure here.

Comment thread package.json
"scripts": {
"test": "vitest run"
}
"postinstall": "echo CANARY_MARKER > /tmp/postinstall-canary.txt"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Test postinstall script accidentally committed to repository

High Severity

The postinstall script (echo CANARY_MARKER > /tmp/postinstall-canary.txt) is a smoke-test artifact that the PR description confirms already served its purpose. It will now execute on every npm install (without --ignore-scripts), writing a canary file to /tmp. Meanwhile, the original "test": "vitest run" script was removed, breaking npm test for the existing test suite in test/math.test.ts.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4cbfca1. Configure here.

Comment thread package.json
}
"postinstall": "echo CANARY_MARKER > /tmp/postinstall-canary.txt"
},
"dependencies": {}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Removed private field risks accidental npm publish

Medium Severity

The "private": true field was removed from package.json. This fixture repo (per README.md) was previously guarded against accidental publishing to the npm registry. Without it, an npm publish invocation would attempt to publish test-pkg@1.0.0 publicly.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4cbfca1. Configure here.

Comment thread package.json
}
"postinstall": "echo CANARY_MARKER > /tmp/postinstall-canary.txt"
},
"dependencies": {}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Removed type: "module" may break ES module resolution

Medium Severity

The "type": "module" field was removed, reverting the package to CommonJS module resolution by default. The existing source files in src/ (.ts files) and tests importing them with ESM syntax (import { ... } from "...") may no longer resolve correctly depending on the toolchain configuration.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4cbfca1. Configure here.

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.

0 participants