Convert package-scripts to TypeScript - #13
Merged
Merged
Conversation
Convert index.js/index.spec.js/example.js to TypeScript, mirroring the engines package's structure: index.ts typed against a local types.ts (TransformArgs/TransformOptions), packaging flipped to dist output (build/prebuild/prepack scripts), .ts import specifiers. sort-scripts ships no type declarations and no @types package exists, so a minimal local ambient shim (sort-scripts-shim.d.ts) declares just the default export signature actually used here. The content-table parsing detail record is typed Record<string, string | undefined>. README/example rename ripple (example.js -> example.ts, docs script) updated to match; snapshot renamed and content updated for the new script set.
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.
Wave-A TypeScript conversion (engines pilot pattern): typed details record for the description-preservation path, minimal verified shim for typeless
sort-scripts(single signature, checked against its source), dist packaging + prepack, changeset minor.Logic byte-for-byte vs main (review-verified). Snapshot legitimately regenerated — the SCRIPTS transform renders this package's own scripts table, which now includes build/prepack and
node example.ts; reviewer confirmed the snapshot matches real regenerated output, not hand-edits. Review's one P1 (lockfile missing the two new devDeps — would fail CI frozen install) fixed and verified in e80d5fd.Validation: typecheck + lint + prettier clean · workspace tests green · frozen-lockfile install verified · tarball gate incl. consumer-typecheck · node example.ts exit 0 · docs idempotent · code-reviewed (APPROVE after lockfile fix)