Keep packaged type sources compilable under strict consumer flags - #447
Merged
Merged
Conversation
Jungle consumers typecheck the shipped src/*.ts under their own compiler policy. Three latent breaks surfaced once a consumer set erasableSyntaxOnly and hosted a Next-style ProcessEnv that narrows NODE_ENV to the literal union: - cookie-safe-storage.ts used a constructor parameter property (TS1294). - storage.ts widened helperEnvironment.NODE_ENV to string, which is not assignable when ProcessEnv.NODE_ENV is "development" | "test" | "production" (TS2769 on both spawnSync call sites). - provider-plugin-portable-runtime.ts passed an explicitly-optional body to RequestInit under exactOptionalPropertyTypes with DOM types (TS2379). The parameter property is now an explicit field assigned after super(), the helper environment keeps NODE_ENV as literals, and a missing request body omits the key instead of passing undefined. @hraness/local-custody moves to 0.9.1, whose shipped sources made the same erasable-syntax cleanup. package-smoke's clean-consumer typecheck now carries the strict posture it guards against: erasableSyntaxOnly, exactOptionalPropertyTypes, verbatimModuleSyntax, noUncheckedIndexedAccess, and an ambient ProcessEnv narrowed to the Next.js NODE_ENV union.
After bun run build, a clean npm 11.19.0 pack --ignore-scripts with Node 24.18.1 on darwin arm64 measured 618 entries, 12,125,748 packed bytes, and 23,940,758 unpacked bytes (SHA-256 d5681ab1…11177d5), covering the three changed packed sources, their rebuilt bundles, and the changelog entry. Ceilings retain the same projections and allowances: 12,142,231 packed, 23,941,176 unpacked. Also restores src/cli.ts to its tracked 0755 mode after local drift left it 777, which the artifact mode check correctly rejected.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The clean-closure assertion still expected the v0.9.0 release tarball and its byte pins. Point the dependency spec at the v0.9.1 archive, bump each expected version to 0.9.1, and update the three artifact digests that changed in the release: the rust-artifacts manifest and the darwin-arm64 and darwin-x64 sidecar binaries (the version bump is embedded in the rebuilt binaries). The JS entry points and linux-x64 artifacts are byte-identical and keep their existing pins. All hashes measured from the published v0.9.1 release tarball.
0thernet
added a commit
that referenced
this pull request
Sep 28, 2026
Release 0.18.45: version pins, the `## 0.18.45` changelog section, rebuilt dist (only the version chunk renamed), and a remeasured archive over merged main `2ed33bb`. Carries #447: the packaged type sources now compile under strict consumer flags — `erasableSyntaxOnly`, a Next-style narrowed `ProcessEnv.NODE_ENV` union, and `exactOptionalPropertyTypes` — and the package smoke's clean-consumer typecheck enforces that posture. `@hraness/local-custody` is pinned to the released `0.9.1` tarball, and the standalone smoke's closure pins were repinned to its byte-exact artifacts. Also carries the earlier Wordcell 0.24.0 runtime adoption (#445). Archive measurement (after `bun run build`, npm 11.19.0 `pack --ignore-scripts`, Node 24.18.1, darwin arm64, merged with main `2ed33bb`): 618 entries, 12,125,761 packed / 23,940,938 unpacked bytes, SHA-256 `0d6a1de00fd825d700b1ed0505b6fa34992f11d1deb42a5c255f7cfc295eedbc`. Budgets keep the same projections and allowances: 12,142,244 packed, 23,941,356 unpacked, 24,574,976 tar bytes. #### Test plan - [x] `bun run build` (only the version chunk renamed) - [x] `bun run typecheck` — clean - [x] `bun run test:npm-release` — 49/49 pass with remeasured budget pins - [x] `bun run check:package` — build + package smoke pass; strict clean-consumer `tsc` reports zero errors on the 0.18.45 tarball - [x] `bun run website:check` — 126 pass; release-notes renderer accepts the 0.18.45 section - [x] `bun run test:standalone` — closure pins verified against released local-custody 0.9.1 artifacts - [ ] Required CI - [ ] After merge: main CI green on the merge commit, administrator readbacks, tag `v0.18.45` on that exact commit Generated with [Devin](https://devin.ai) Co-authored-by: 0thernet <894119+0thernet@users.noreply.github.com>
This branch was successfully deployed
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
Jungle consumers typecheck Ghostget's shipped
src/*.tsunder their own compiler policy (the package'stypesexports resolve to source, soskipLibCheckcannot hide errors). Three latent breaks surfaced once a consumer seterasableSyntaxOnlyand hosted a Next-styleProcessEnvthat narrowsNODE_ENVto the literal union:src/cookie-safe-storage.tsused a constructor parameter property (TS1294).src/storage.tswidenedhelperEnvironment.NODE_ENVtostring, which is not assignable whenProcessEnv.NODE_ENVis"development" | "test" | "production"(TS2769 on bothspawnSynccall sites).src/provider-plugin-portable-runtime.tspassed an explicitly-optionalbodytoRequestInitunderexactOptionalPropertyTypes(TS2379).Fixes:
super().NODE_ENVas literals ("production"/"test"unchanged at runtime).undefined(same wire behavior).@hraness/local-custodymoves to0.9.1(Make shipped TypeScript sources erasable-syntax clean local-custody#26, released asv0.9.1), whose shipped sources made the same erasable-syntax cleanup;bun.lockupdated to the immutable release tarball.scripts/package-smoke.ts's clean-consumer typecheck now carries the strict posture it guards against:erasableSyntaxOnly,exactOptionalPropertyTypes,verbatimModuleSyntax,noUncheckedIndexedAccess, and an ambientProcessEnvnarrowed to the Next.jsNODE_ENVunion.d5681ab1…11177d5; ceilings now 12,142,231 / 23,941,176.src/cli.tsto its tracked 0755 mode after local drift left it 777.Test plan
bun run typecheck— root + verification projects cleanbun run check:package— build + package smoke pass; the smoke's strict clean-consumertsc(typescript@6.0.3, erasableSyntaxOnly, narrowed ProcessEnv) reports zero errorsbun run test:npm-release— 49/49 pass with remeasured budget pinsbun run check:effect/check:cost-surfaces/website:check— passerasableSyntaxOnly: true+ Jungle's strict flags — 0 errorsGenerated with Devin