feat: add pn tc command using typescript-native (tsgo) (#363)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Neil 2026-04-06 23:27:29 -07:00 committed by GitHub
parent c0b6687e13
commit 03a7077597
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 95 additions and 0 deletions

View file

@ -13,6 +13,10 @@
"lint": "oxlint",
"prepare": "husky",
"test": "vitest run",
"tc:node": "tsgo --noEmit -p tsconfig.node.json",
"tc:cli": "tsgo --noEmit -p tsconfig.tc.cli.json",
"tc:web": "tsgo --noEmit -p tsconfig.tc.web.json",
"tc": "tsgo --noEmit -p tsconfig.node.json && tsgo --noEmit -p tsconfig.tc.cli.json && tsgo --noEmit -p tsconfig.tc.web.json",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:cli": "tsc --noEmit -p tsconfig.cli.json --composite false",
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
@ -87,6 +91,7 @@
"@types/node": "^25.5.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@typescript/native-preview": "7.0.0-dev.20260406.1",
"@vitejs/plugin-react": "^5.2.0",
"electron": "^41.0.3",
"electron-builder": "^26.8.1",

View file

@ -159,6 +159,9 @@ importers:
'@types/react-dom':
specifier: ^19.2.3
version: 19.2.3(@types/react@19.2.14)
'@typescript/native-preview':
specifier: 7.0.0-dev.20260406.1
version: 7.0.0-dev.20260406.1
'@vitejs/plugin-react':
specifier: ^5.2.0
version: 5.2.0(vite@7.3.1(@types/node@25.5.0)(jiti@2.6.1)(lightningcss@1.32.0)(yaml@2.8.3))
@ -2405,6 +2408,45 @@ packages:
'@types/yauzl@2.10.3':
resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==}
'@typescript/native-preview-darwin-arm64@7.0.0-dev.20260406.1':
resolution: {integrity: sha512-q6AMrDHlD6dQHpRuGOewhvKTCBDWRgJ42678+muvHbdHkBafRSUSBRiYasUp8cInK22jlkVwNLqQn6j7Sl9zVg==}
cpu: [arm64]
os: [darwin]
'@typescript/native-preview-darwin-x64@7.0.0-dev.20260406.1':
resolution: {integrity: sha512-3v8LplbhJwY4GlBawgJt4ydn0sYeowGMniGiPMBl38ioYAIJOriuBvAk+S/gbOoIfLjMLq0L65fnQN+w9+i5ag==}
cpu: [x64]
os: [darwin]
'@typescript/native-preview-linux-arm64@7.0.0-dev.20260406.1':
resolution: {integrity: sha512-hRY2czBKisYtcbwgl8HZBA7u/KKUumNlL0X2OpCK1BtQzKbHXAXi1HxUCPbwgHu4v6uGibvniny0BPA6MVrHDA==}
cpu: [arm64]
os: [linux]
'@typescript/native-preview-linux-arm@7.0.0-dev.20260406.1':
resolution: {integrity: sha512-KLa4bK2BxnQwc9uefI8rtaso3cNiRI5Y19z9Jx7UzFJS4YaxtFp5cVjfy4FlQ55ixtUExmCJH7GhSzuVeFl/Jw==}
cpu: [arm]
os: [linux]
'@typescript/native-preview-linux-x64@7.0.0-dev.20260406.1':
resolution: {integrity: sha512-Cbcy+lSctRHNmqvLl+l8RgomL0qX3wxEPKCOIdQ/ooicsIPFbkK57Cwdhw3RSpJ+Xb2LzLdneA2Q1Vg+f/Nwxg==}
cpu: [x64]
os: [linux]
'@typescript/native-preview-win32-arm64@7.0.0-dev.20260406.1':
resolution: {integrity: sha512-IFIkbYABge7f83A16awJJWUCrDG1Lw4//NCdU927i/CjgxG09q4ZJeVXcIbZQ5lJWwraiSTa6AMqvhF/tnR2KQ==}
cpu: [arm64]
os: [win32]
'@typescript/native-preview-win32-x64@7.0.0-dev.20260406.1':
resolution: {integrity: sha512-Jk7wP6SPaELTGY+ijvpude+dmXX9WeuLQLk9qjevQXTusFVcT8vjvepxJVshSJ1+Thmxy1t9v4l1pHnM3XUMjw==}
cpu: [x64]
os: [win32]
'@typescript/native-preview@7.0.0-dev.20260406.1':
resolution: {integrity: sha512-hlVajr01Y/ZmI9iZ7A6BgPxqXccGqxuc/PmVNdanr/LZdtsH9q11y2H3NFMaOrbPlDoeWxHvGUT3wsZllCphyg==}
hasBin: true
'@ungap/structured-clone@1.3.0':
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
@ -7445,6 +7487,37 @@ snapshots:
'@types/node': 25.5.0
optional: true
'@typescript/native-preview-darwin-arm64@7.0.0-dev.20260406.1':
optional: true
'@typescript/native-preview-darwin-x64@7.0.0-dev.20260406.1':
optional: true
'@typescript/native-preview-linux-arm64@7.0.0-dev.20260406.1':
optional: true
'@typescript/native-preview-linux-arm@7.0.0-dev.20260406.1':
optional: true
'@typescript/native-preview-linux-x64@7.0.0-dev.20260406.1':
optional: true
'@typescript/native-preview-win32-arm64@7.0.0-dev.20260406.1':
optional: true
'@typescript/native-preview-win32-x64@7.0.0-dev.20260406.1':
optional: true
'@typescript/native-preview@7.0.0-dev.20260406.1':
optionalDependencies:
'@typescript/native-preview-darwin-arm64': 7.0.0-dev.20260406.1
'@typescript/native-preview-darwin-x64': 7.0.0-dev.20260406.1
'@typescript/native-preview-linux-arm': 7.0.0-dev.20260406.1
'@typescript/native-preview-linux-arm64': 7.0.0-dev.20260406.1
'@typescript/native-preview-linux-x64': 7.0.0-dev.20260406.1
'@typescript/native-preview-win32-arm64': 7.0.0-dev.20260406.1
'@typescript/native-preview-win32-x64': 7.0.0-dev.20260406.1
'@ungap/structured-clone@1.3.0': {}
'@vitejs/plugin-react@5.2.0(vite@7.3.1(@types/node@25.5.0)(jiti@2.6.1)(lightningcss@1.32.0)(yaml@2.8.3))':

7
tsconfig.tc.cli.json Normal file
View file

@ -0,0 +1,7 @@
{
"extends": "./tsconfig.cli.json",
"compilerOptions": {
"module": "node16",
"moduleResolution": "node16"
}
}

10
tsconfig.tc.web.json Normal file
View file

@ -0,0 +1,10 @@
{
"extends": "./tsconfig.web.json",
"compilerOptions": {
"baseUrl": null,
"paths": {
"@renderer/*": ["./src/renderer/src/*"],
"@/*": ["./src/renderer/src/*"]
}
}
}