Repository navigation
feat: convert lib/ JavaScript to TypeScript (behavior-identical) - #436
Merged
Merged
Conversation
…one (lib/*.js are build output now)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Converts all six
lib/modules from JavaScript to TypeScript under the hard requirement "works exact like the JavaScript now" — every emitted.jsis runtime-identical to the previous JS, verified at four independent layers.What changed
lib/debug.ts,lib/helper.ts,lib/openssl.ts(+lib/which.d.tssidecar — which@7 ships no types),lib/convert.ts,lib/pem.ts,lib/ca.tstsconfig.json: rootDir-only, emit-beside-source (tsc -p .);lib/*.jsis gitignored build output now (zero tracked)package.json:buildnow chainsbuild:libbefore ncc — fixesrelease-v2.ymlon fresh checkouts;dist/bundle rebuilt and committed (byte-reproducible, see verification)test/andtypes/are byte-identical to master — the 133-test suite and tsd type tests are the same acceptance criteria as beforeBehavior-parity decisions (rules R1–R17, learned and applied during conversion)
.namesemantics preserved (anonymous""names master relies on)__esModulemarker on any module:pem.tsstays script-form soimport pem from 'pem'default-import interop keeps working;convert.tsis module-form with a dead marker (replaced exports)createCSRassigned beforemodule.exports.CA = require('./ca'))Verification
.name, arities,CertificateAuthorityshape) · git-state asserts · diff-paths · test/types untouchedpem.js/ca.jsvs master is empty except require paths and erased-cast parensyarn install --immutable→yarn run build→ smoke PASS; rebuiltdist/byte-identical to the committed bundlelib/*.jsdespite the gitignore (fileswhitelist force-includes)lib/*.jsin theyarn npm publish --dry-runtarball list)Notes
node10moduleResolution and breaks typescript-eslint)lib/*.tssources (same-as-master-or-better;types/pem.test-d.tsshipped on master too)lib/*.jsappear in the printedyarn npm publish --dry-runtarball list (both current packers verified)