Repository navigation
feat(mongo): consumer ./elf entry for npm-static builds - #51
Merged
Merged
Conversation
Audit found two real consumer-compile breaks fixed here:
- positional netConnect(port, host) bound host into a listener slot
under JS inference -> createConnection({host, port}) options form,
matching postgres's proven lowering
- connectTcp params inferred unknown in shipped JS -> @PARAM JSDoc so
the concrete (string, number, number) signature survives tsc
Adds test/consumer-elf.test.sh + consumer-elf-app.ts + the canned
OP_MSG mock server; full pack -> install -> --npm-static -> ELF ->
wire round-trip verified.
Deploying cutilsjs with
|
| Latest commit: |
14706db
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://56dc5a2c.cutilsjs.pages.dev |
| Branch Preview URL: | https://feat-mongo-elf-export.cutilsjs.pages.dev |
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.
Summary
Consumer
--npm-staticcompile contract for @cutils/mongo, matching the postgres/cache/cli./elfstory:"./elf": "./dist/esm/index.js"exportnetConnect(port, host)→createConnection({host, port})— the positional form boundhostinto a listener slot under JS inference ("expected function, got string" at runtime)@paramJSDoc onconnectTcp—unknown-inferredporthit the unlowered overload (SC2020)test/consumer-elf.test.sh+consumer-elf-app.ts+ canned OP_MSGmock-server.mjs: pack → install →--npm-staticcompile → ELF →findOneround-tripVerification
scriptc build app.ts --npm-static @cutils/mongo: clean, zero errors/warningsconsumer-elf.test.sh: OK (ELF ↔ canned wire server, real TCP)elf.test.sh, coverage 100%, node unit tests: all green