Skip to content

Convert package-scripts to TypeScript - #13

Merged
camacho merged 3 commits into
mainfrom
ts-package-scripts
Jul 5, 2026
Merged

Convert package-scripts to TypeScript#13
camacho merged 3 commits into
mainfrom
ts-package-scripts

Conversation

@camacho

@camacho camacho commented Jul 5, 2026

Copy link
Copy Markdown
Owner

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)

camacho added 3 commits July 5, 2026 21:10
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.
@camacho
camacho merged commit ae1a265 into main Jul 5, 2026
2 checks passed
@camacho
camacho deleted the ts-package-scripts branch July 5, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant