Modernize toolchain, CI, and packaging - #2
Open
botre wants to merge 1 commit into
Open
Conversation
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.
What changed
Dependencies
ignoreDeprecations: "6.0"because tsup injects the deprecatedbaseUrloption during dts builds.overridesentry pinning esbuild to ^0.28.1. tsup pins ^0.27.0, which sits inside the GHSA-g7r4-m6w7-qqqr advisory range. esbuild 0.28 only changed binary download integrity checks, no build API or output format changes.npm auditis now clean (was 1 low, 3 high).CI
pull_request_target/workflow_runtriggers, which these workflows do not use; setup-node v7 is an internal ESM migration.npm run typecheck(tsc) step, which was previously not enforced anywhere.Packaging
exportsmap (import todist/index.mjswithindex.d.mtstypes, require todist/index.jswithindex.d.tstypes) plussideEffects: false. The legacymain/module/unpkg/typesfields are kept for older tooling.export default { toJSON }. Before the exports map, Node ESMimportresolved to the CJS build where cjs-module-lexer only surfaces adefaultnamespace, so existingimport Formson from ...consumers relied onFormson.toJSON. The default export keeps that pattern working now thatimportresolves to the real ESM build.Tests
README
Version bumped to 0.2.0 (minor: packaging surface additions). Not published; the release workflow handles that on merge.
Compat verification
Baselined against the published 0.1.2 tarball (
npm pack @formspark/formson), then installed 0.1.2 and the freshly packed 0.2.0 into throwaway consumers and ran an identical battery (25 key-shape cases covering nesting, arrays, repeated keys, empty values, boundary indices, prototype pollution keys, unicode, plus File passthrough) through every access pattern:require().toJSONrequire().default.toJSONimport { toJSON }.toJSONFormson.toJSONtsc --moduleResolution node16type resolution verified for both.mtsand.ctsconsumers.Risks
@formspark/formson/dist/index.mjsunder Node resolution. No known consumers do this; unpkg URL paths are unaffected.require()output now carries an extradefaultkey; purely additive but visible to key enumeration.