Skip to content

chore(typescript): move the typescript package to 7.0.2 and drop the native alias - #657

Merged
jasonhnd merged 2 commits into
previewfrom
chore/typescript-7
Sep 24, 2026
Merged

jasonhnd merged 2 commits into
previewfrom
chore/typescript-7

Conversation

@jasonhnd

@jasonhnd jasonhnd commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Closes #644

Part of #635 (order 8). Base preview. Blocked-by order 7 is 34bae4cc (PR #656).

Edits mapped to やること

  1. Branch chore/typescript-7 from origin/preview 34bae4cc (order 7 merged). Bun 1.4.2 (1.4.2+744846f84) was already installed at /tmp/bun-1.4.2 and was prepended to PATH. Global Bun was not upgraded (bun upgrade was not run; ~/.bun was not written). Node v24.20.0. No PUBLIC_GA4_MEASUREMENT_ID / PUBLIC_X_PIXEL_ID / PUBLIC_META_PIXEL_ID.
  2. package.json:
    • scripts.typecheck: node node_modules/@typescript/native/bin/tsc --noEmit → node node_modules/typescript/bin/tsc --noEmit
    • devDependencies: deleted "@typescript/native": "npm:typescript@^7.0.2"; "typescript": "^6.0.3" → "typescript": "^7.0.2".
      No other package range changed. No tsconfig.json change. Commit bb46fe78.
  3. bun install (Bun 1.4.2). See Lockfile.
  4. Probe (not committed): src/__tc_probe.ts with export const probe: number = "not a number"; made bun run typecheck exit 1 with error TS2322. File removed; bun run typecheck exit 0. See Probe.
  5. Standard chain below, run after commit bb46fe78 so git diff --exit-code is the generated-file check. All exit 0. Results match the dry-run table (typecheck probe bites, then clean; test / build / REQUIRE_BUILT_ARTIFACTS / verify:gates OK; Playwright 356 passed, 26 skipped, 0 failed).
  6. Docs in commit bb46fe78:
    • docs/TOOLCHAIN.md §2: typescript (JS package) row is **7.0.2** (native compiler; platform binary via optional deps). typecheck binary row is `typescript` **7.0.2** via `node node_modules/typescript/bin/tsc --noEmit` (the `@typescript/native` alias was removed in #635 order 8). §4's historical sentence is unchanged.
    • CHANGELOG.md ### Changed: - **typescript 6.0.3 → 7.0.2; @typescript/native alias removed** — typecheck now runs node_modules/typescript/bin/tsc (owner ruling 2026-09-24).
    • docs/TOOLCHAIN.md §11 order 8: — done (#657). Follow-up commit 80f7cede.

Lockfile

git diff --numstat 34bae4cc for commit bb46fe78:

1	0	CHANGELOG.md
2	5	bun.lock
2	2	docs/TOOLCHAIN.md
2	3	package.json

package.json is +2 / −3, matching the dry-run table. The dry-run's "diff = package.json (+2 / −3), bun.lock" did not include the step-6 docs; those are the CHANGELOG and TOOLCHAIN rows above. bun.lock is +2 / −5. bun install wrote it; it was not hand-edited.

The hunks are:

  1. Embedded workspace devDependency: delete "@typescript/native": "npm:typescript@^7.0.2"; "typescript": "^6.0.3" → "^7.0.2".
  2. Delete the package entry "@typescript/native": ["typescript@7.0.2", …] (optional platform deps + bin.tsc).
  3. Replace "typescript": ["typescript@6.0.3", …] with "typescript": ["typescript@7.0.2", …] carrying those same optional platform deps and the same integrity (sha512-8FYau96o3NK…). bin is tsc only, as on the old alias entry.

bun install log (Bun 1.4.2, after the range bump):

bun install v1.4.2 (744846f84)
Resolving dependencies
Resolved, downloaded and extracted [1]
Saved lockfile

+ typescript@7.0.2

1 package installed [80.00ms]
Removed: 1

Lockfile greps

grep -c '@typescript/native' bun.lock
0

grep -o '"typescript@[0-9.]*"' bun.lock | sort -u
"typescript@7.0.2"

grep -c '"@typescript/typescript-linux-x64@7.0.2"' bun.lock
1

grep -n 'lockfileVersion' bun.lock
2:  "lockfileVersion": 1,

Frozen reinstall

rm -rf node_modules && bun install --frozen-lockfile
bun install v1.4.2 (744846f84)

+ @axe-core/playwright@4.13.0
+ @playwright/test@1.62.1
+ @types/node@24.13.3
+ @types/react@19.3.0
+ exceljs@4.4.0
+ fontkitten@1.0.3
+ subset-font@2.9.0
+ typescript@7.0.2
+ @vercel/functions@3.9.9
+ @vercel/og@1.0.1
+ astro@7.3.5
+ react@19.3.0
+ zod@4.6.5

339 packages installed [273.00ms]

node_modules/@typescript/ after that install:

typescript-darwin-arm64

node_modules/@typescript/native is absent.

node node_modules/typescript/bin/tsc --version
Version 7.0.2

Probe

Not committed. echo 'export const probe: number = "not a number";' > src/__tc_probe.ts, then:

$ node node_modules/typescript/bin/tsc --noEmit
src/__tc_probe.ts(1,14): error TS2322: Type 'string' is not assignable to type 'number'.
error: script "typecheck" exited with code 1
exit=1

rm src/__tc_probe.ts, then:

$ node node_modules/typescript/bin/tsc --noEmit
exit=0

TS 7.0.2 reported nothing on the real tree that the previous alias path did not. No source change was made to satisfy a new diagnostic.

@typescript/native grep

Step 5 grep, after the docs in step 6 were already in the tree (commit bb46fe78):

grep -rn "@typescript/native" --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist-astro --exclude-dir=.cache .
./CHANGELOG.md:20:- **typescript 6.0.3 → 7.0.2; @typescript/native alias removed** — typecheck now runs node_modules/typescript/bin/tsc (owner ruling 2026-09-24).
./docs/TOOLCHAIN.md:37:| typecheck binary | `typescript` **7.0.2** via `node node_modules/typescript/bin/tsc --noEmit` (the `@typescript/native` alias was removed in #635 order 8) | same | same (`bun run typecheck` in `buildCommand`) |
./docs/TOOLCHAIN.md:84:- ~~Replacing the npm package name typescript with 7.0.2~~ — **lifted by owner ruling 2026-09-24 「A」** (#635 order 8). Nothing in the repo imports the TypeScript JS API (grep in #636), so waiting for 7.1 protected nothing. After order 8, typecheck is node node_modules/typescript/bin/tsc --noEmit and the @typescript/native alias is gone.
./docs/TOOLCHAIN.md:309:| 8 | code | #644 | `typescript` 6.0.3 → **7.0.2**; drop the `@typescript/native` alias |

No hit in package.json, bun.lock, scripts/, or src/. The four hits are the CHANGELOG bullet and the §2 sentence this Issue tells us to write, the §4 historical sentence it tells us to leave, and the §11 queue row. Those prescribed sentences contain the string, so the grep cannot be empty without rewriting them. After follow-up 80f7cede the §11 line is the same target text plus — done (#657); it still matches.

Verification (Bun 1.4.2+744846f84, Node v24.20.0)

Chain ran on commit bb46fe78. Each command exit 0. unset PUBLIC_GA4_MEASUREMENT_ID PUBLIC_X_PIXEL_ID PUBLIC_META_PIXEL_ID before the chain.

bun run test

bun run test runs build:data then bun test. ETL completed (556 occupations).

bun test v1.4.2 (744846f84)

 1725 pass
 0 fail
Ran 1725 tests across 168 files. [4.34s]

sector.test.ts prints two [og] sectors projection schema mismatch lines. Same pre-existing negative fixtures noted on #656; the run is 1725 pass / 0 fail.

bun run build

[check-lockfile-sync] OK — 13 deps match between package.json and bun.lock.
[check-analytics-config] OK — 6 script-src origins ok, 11 connect-src origins ok, 0 frame-src origins ok, 5 PUBLIC_* env vars documented.
[check-nested-html-comments] OK — scanned 71 files, no nested HTML comments.
00:25:03 [build] ✓ Completed in 7.01s.
00:25:03 [build] 844 page(s) built in 7.12s
00:25:03 [build] Complete!
[subset-fonts] 2 font files, serif=1102 sans=2399 unique codepoints, 302 KiB total
[check-geo-freshness] OK - GPT 6 SOL 2026-09-23, 556 occupations, mean=4.55
[check-rendered-leaks] OK — scanned 844 pages, no leaked tokens.
[compute-csp-hashes] OK — script-src/style-src already up to date (24 inline-script + 36 inline-style hash(es), 844 HTML files scanned).

The 844 route lines are omitted. CSP hashes unchanged. Lockfile-sync reports 13 deps; order 7 reported 14 because @typescript/native was a separate devDependency.

REQUIRE_BUILT_ARTIFACTS=1 bun test scripts/home-css-loading.test.ts src/site/models-built.test.ts

bun test v1.4.2 (744846f84)
 10 pass
 0 fail
Ran 10 tests across 2 files. [97.00ms]

bun run verify:gates

[OK] projections pass L3 consistency checks
[check-geo-freshness] OK - GPT 6 SOL 2026-09-23, 556 occupations, mean=4.55
[check-model-redirects] OK - 12 bare model slug(s) redirect to their latest run
[check-analytics-spec] OK — 36 events / 46 params match analytics/spec.yaml (5 dynamic emit sites declared).
[check-architecture] no Edge entries — plane C is nodejs/Bun (TOOLCHAIN §9)
[check-architecture] ✓ all enforced layer boundaries respected
[check-doc-links] OK — 58 tracked Markdown files, 99 local link/image target(s)
[verify-occupation-routes] 556 occupations own 556 unique, indexable routes
✅ Internal-link integrity passed — every NEW href resolves; 0 pre-known broken targets remain (TODO).
✅ JSON-LD validation passed — all 843/844 pages structurally valid.
[diff-seo-baseline] capturing current dist-astro/ …
✓ URL set (urls.txt) — 844 URLs
✓ data file paths (data-files.txt) — 616 files
✓ sitemap.xml — 5002 lines
✓ image-sitemap.xml — 3897 lines
✓ SEO metadata (seo-metadata.jsonl) — 844 URLs compared
✓ OG / Twitter meta (og-meta.jsonl) — 844 URLs compared
✓ JSON-LD (json-ld.jsonl) — 844 URLs compared
✓ internal links + anchors (internal-links.jsonl) — 844 URLs compared
✅ SEO baseline clean — no drift.
[check-page-class] ✓ Page Class System invariants respected
[check-design-sync] OK — Design.md §21.2 and design-tokens.ts agree
[check-type-scale] OK — every font-size on a conformant surface is a scale token (0 warning(s))
[check-heading-rules] OK — no conformant surface sets heading type (0 warning(s))
[check-surface-coverage] OK — every file carrying design declarations belongs to a surface
[check-contrast] OK — 33 role × background combinations satisfy §2.2
[check-role-color] OK — every checked role uses its §4.7 colour token
[check-color-tokens] OK — no palette tint written raw
[compute-csp-hashes] OK — script-src has 24 inline-script hash(es) and matches dist-astro/.

bun x playwright test --reporter=line

Running 382 tests using 12 workers
  26 skipped
  356 passed (22.1s)

git diff --exit-code

(empty)
exit=0

Issue #644 does not list vercel inspect or a preview curl. Those commands were not run.

CI

gh pr checks 657 on head 80f7cede:

quality	pass	3m31s	https://github.com/jasonhnd/jobs/actions/runs/36020374152/job/107703923046
Vercel	pass	0	https://vercel.com/zkscio/jobs/FEeGaZz7vZCydmrhwwb2QUsnAG6G	Canceled by Ignored Build Step
Vercel Preview Comments	pass	0	https://vercel.com/github

quality on 80f7cede (run 36020374152) is green, including the Run typecheck step (started 15:29:23Z, completed 15:29:24Z, conclusion success). The step log is:

bun run typecheck
$ node node_modules/typescript/bin/tsc --noEmit

No error TS line. The next step is Build production output. Linux unit tests in that job: 1725 pass / 0 fail. [check-lockfile-sync] OK — 13 deps.

quality on the code commit bb46fe78 (run 36020323233) was cancelled when 80f7cede was pushed (concurrency cancel-in-progress). The run that passed is the head run above.

The head commit is docs-only (docs/TOOLCHAIN.md), so scripts/vercel-ignore-build.sh skipped that build (exit 0 → skip). The code commit bb46fe78 deployed: Vercel status Deployment has completed at https://vercel.com/zkscio/jobs/EzRWHZsGTNsbXdDJVsE1MiwgPpRT. Branch preview from the Vercel bot comment: https://jobs-git-chore-typescript-7-zkscio.vercel.app.

Issue #644 does not list vercel inspect or a preview curl. Those commands were not run.

…native alias

Typecheck now runs node_modules/typescript/bin/tsc. The @typescript/native
alias is removed (owner ruling 2026-09-24, #635 order 8).
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
jobs Ready Ready Preview Sep 24, 2026 3:28pm UTC

Request Review

§11 order 8 now points at the PR that moves typescript to 7.0.2.
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