update TS version for checking internal lib code

This commit is contained in:
Evan Wallace
2026-04-01 20:32:47 -04:00
parent 362a38f35f
commit 5554ee47a7
9 changed files with 55 additions and 23 deletions
+2
View File
@@ -1,5 +1,7 @@
import type * as types from "../shared/types"
import * as common from "../shared/common"
// @ts-ignore TS2303: Circular definition of import alias 'ourselves'.
import * as ourselves from "./browser"
interface Go {
+3 -1
View File
@@ -1,8 +1,10 @@
import type * as types from "../shared/types"
import * as common from "../shared/common"
import * as ourselves from "./node"
import { ESBUILD_BINARY_PATH, generateBinPath } from "./node-platform"
// @ts-ignore TS2303: Circular definition of import alias 'ourselves'.
import * as ourselves from "./node"
import child_process = require('child_process')
import crypto = require('crypto')
import path = require('path')
+34 -15
View File
@@ -5,38 +5,57 @@
"packages": {
"": {
"dependencies": {
"@types/node": "17.0.2",
"typescript": "4.5.4"
"@types/node": "25.5.0",
"typescript": "6.0.2"
}
},
"node_modules/@types/node": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.2.tgz",
"integrity": "sha512-JepeIUPFDARgIs0zD/SKPgFsJEAF0X5/qO80llx59gOxFTboS9Amv3S+QfB7lqBId5sFXJ99BN0J6zFRvL9dDA=="
"version": "25.5.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
"license": "MIT",
"dependencies": {
"undici-types": "~7.18.0"
}
},
"node_modules/typescript": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
"integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==",
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.2.tgz",
"integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==",
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
"license": "MIT"
}
},
"dependencies": {
"@types/node": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.2.tgz",
"integrity": "sha512-JepeIUPFDARgIs0zD/SKPgFsJEAF0X5/qO80llx59gOxFTboS9Amv3S+QfB7lqBId5sFXJ99BN0J6zFRvL9dDA=="
"version": "25.5.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
"requires": {
"undici-types": "~7.18.0"
}
},
"typescript": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
"integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg=="
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.2.tgz",
"integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ=="
},
"undici-types": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="
}
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"@types/node": "17.0.2",
"typescript": "4.5.4"
"@types/node": "25.5.0",
"typescript": "6.0.2"
}
}
+2 -2
View File
@@ -434,7 +434,7 @@ function flagsForTransformOptions(
}
export interface StreamIn {
writeToStdin: (data: Uint8Array) => void
writeToStdin: (data: Uint8Array<ArrayBuffer>) => void
readFileSync?: (path: string, encoding: 'utf8') => string
isSync: boolean
hasFS: boolean
@@ -608,7 +608,7 @@ export function createChannel(streamIn: StreamIn): StreamOut {
let isFirstPacket = true
let handleIncomingPacket = (bytes: Uint8Array): void => {
let handleIncomingPacket = (bytes: Uint8Array<ArrayBuffer>): void => {
// The first packet is a version check
if (isFirstPacket) {
isFirstPacket = false
+2 -2
View File
@@ -262,7 +262,7 @@ export type Value =
| Value[]
| { [key: string]: Value }
export function encodePacket(packet: Packet): Uint8Array {
export function encodePacket(packet: Packet): Uint8Array<ArrayBuffer> {
let visit = (value: Value) => {
if (value === null) {
bb.write8(0)
@@ -303,7 +303,7 @@ export function encodePacket(packet: Packet): Uint8Array {
return bb.buf.subarray(0, bb.len)
}
export function decodePacket(bytes: Uint8Array): Packet {
export function decodePacket(bytes: Uint8Array<ArrayBuffer>): Packet {
let visit = (): Value => {
switch (bb.read8()) {
case 0: // null
+3
View File
@@ -4,6 +4,9 @@
"target": "es2017", // Allow calling APIs such as "Object.entries"
"strict": true,
"skipLibCheck": true,
"types": [
"node"
],
},
"exclude": [
"npm",
+4 -1
View File
@@ -3,7 +3,10 @@
"module": "CommonJS", // Allow the "import assignment" syntax
"target": "es2017", // Allow calling APIs such as "Object.entries"
"strict": true,
"lib": [], // Omit "dom" to test what happens with the "WebAssembly" type, which is defined in "dom"
"lib": [
// Omit "dom" to test what happens with the "WebAssembly" type, which is defined in "dom"
"ES5",
],
},
"include": [
"shared/types.ts",
+3
View File
@@ -3,6 +3,9 @@
"module": "CommonJS", // Allow the "import assignment" syntax
"target": "es2017", // Allow calling APIs such as "Object.entries"
"strict": true,
"types": [
"node"
],
},
"exclude": [
"deno",