Skip to content

Conversation

@tnikolova82
Copy link
Contributor

Title

fix: only warn when no lockfile present (package-lock.json | npm-shrinkwrap.json) (#852)
Body

Summary: Avoid a misleading "PRO TIP" when an app has npm-shrinkwrap.json vendored. The buildpack should not warn about a missing package-lock.json if an equivalent lockfile exists.

Root cause: NoPackageLockTip() iterated lockfile names and emitted the tip on the first missing file instead of checking whether any supported lockfile exists.

Changes: Update NoPackageLockTip() in supply.go to check for any existing lockfile before warning and adjust the message to reference package-lock.json or npm-shrinkwrap.json (or yarn.lock for Yarn). Added unit tests in supply_test.go covering both the positive and negative cases.

Tests: Added unit tests for the NoPackageLockTip() behavior. CI should run the test suite; if you run locally you may see platform-specific issues building test binaries (I observed a macOS dyld build abort), but the code and tests are committed.

Related: Issue #852.

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