fix(find-and-require-package-json): require callerDir parameter to find correct package.json #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix(find-and-require-package-json): require callerDir parameter to find correct package.json
Summary
BREAKING CHANGE:
findAndRequirePackageJson()now requires acallerDirparameter.The previous implementation used
__dirnameinternally, which always pointed to thefind-and-require-package-jsonpackage's own directory. This caused any package calling this function to incorrectly identify itself as[email protected]instead of its actual name/version.This was discovered via CI failures in constructive PR #393 where plugins were reporting errors like:
Now callers must pass their own
__dirname(CJS) ordirname(fileURLToPath(import.meta.url))(ESM).Updates since last revision
inquirererpackage (internal consumer in this repo) to pass__dirnametofindAndRequirePackageJson()- this was causing CI build failuresReview & Testing Checklist for Human
graphile-plugin-connection-filter-postgis,graphile-plugin-connection-filter,graphile-many-to-many,graphile-postgis,packages/cli,packages/pgpmRecommended test plan:
__dirnamepackages/introspectronandpackages/launchql-genNotes