Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the pg-protocol module exports and test coverage while ensuring that the pg-native ./lib sub-directory is included in the npm package.
- Update the ESM wrapper for pg-protocol to use a namespace import
- Add new tests for both pg-protocol and CommonJS imports
- Extend the list of paths in the CommonJS import test to verify inclusion of additional files
Reviewed Changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/pg-protocol/esm/index.js | Changed default import to a namespace import to re-export properties |
| packages/pg-esm-test/pg-protocol.test.js | Introduced tests verifying proper export of protocol components |
| packages/pg-esm-test/common-js-imports.test.cjs | Expanded test paths to include new modules from pg-protocol and pg-native |
Files not reviewed (3)
- packages/pg-esm-test/package.json: Language not supported
- packages/pg-native/package.json: Language not supported
- packages/pg-protocol/package.json: Language not supported
Comments suppressed due to low confidence (2)
packages/pg-protocol/esm/index.js:2
- Changing from a default import to a namespace import may impact consumers expecting a default export. Please verify that this update is intentional and compatible with downstream usage.
import * as protocol from '../dist/index.js'
packages/pg-esm-test/common-js-imports.test.cjs:10
- Ensure that 'pg-native/lib/build-result.js' is correctly included in the published npm package to prevent runtime import errors.
'pg-native/lib/build-result.js',
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update more exports and visibility of files. Also, include the
./libsub-directory in pg-native (it was mistakenly excluded) when the library is published to npm. This wasn't caught in my tests since they reference local copy of all source and it was a publishing specific issue.