add package.json with postinstall canary script#40
Conversation
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0ddf13a. Configure here.
| } | ||
| "postinstall": "echo CANARY_MARKER > /tmp/postinstall-canary.txt" | ||
| }, | ||
| "dependencies": {} |
There was a problem hiding this comment.
Test fixture overwrites project's real package.json configuration
High Severity
This change replaces the repository's real package.json (which had "private": true, "type": "module", and a "test": "vitest run" script) with a postinstall canary test fixture. The existing test/math.test.ts still imports from vitest, so tests can no longer run. Removing "type": "module" breaks ESM resolution for the TypeScript sources, and removing "private": true risks accidental npm publication. This looks like test fixture content that belongs in a subdirectory rather than at the project root.
Reviewed by Cursor Bugbot for commit 0ddf13a. Configure here.
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json
…into pullfrog/add-test-package-json


Adds
package.jsonwritten during the dependency installation behavior test. The postinstall script writes a canary marker to/tmp/postinstall-canary.txt.Claude Sonnet| 𝕏Note
Medium Risk
Any
npm installruns arbitrary shell viapostinstalland writes to/tmp, which is intentional for canary tests but risky if this package is installed outside a controlled test environment.Overview
Introduces a new
package.jsonfor dependency-installation behavior testing, replacing the prior minimaltest-repoVitest setup withtest-pkgat version1.0.0.The notable change is a
postinstallscript that writesCANARY_MARKERto/tmp/postinstall-canary.txt, so installs can be verified without running tests.dependenciesis an empty object and the oldtestscript is removed.Reviewed by Cursor Bugbot for commit 64cae7b. Bugbot is set up for automated code reviews on this repo. Configure here.