A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix(cli): an export loads its own toolchain instead of bundling it
esengine0ca90668d321
diff --git a/compiler/package.json b/compiler/package.jsonindex 614ac48bd..33a168d52 100644--- a/compiler/package.json+++ b/compiler/package.json@@ -11,7 +11,7 @@},"devDependencies": {"@types/node": "^22.0.0",- "typescript": "^5.6.0",+ "typescript": "^6.0.3","vitest": "^2.1.9"}}diff --git a/compiler/tests/toolchain.test.ts b/compiler/tests/toolchain.test.tsnew file mode 100644index 000000000..fe11d5176--- /dev/null+++ b/compiler/tests/toolchain.test.ts@@ -0,0 +1,27 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file toolchain.test.ts+ * @brief The TypeScript this compiler is tested with is the one it will get.+ *+ * @details The frontend parses a project with the real `typescript`, and the+ * CLI resolves it from the PIPELINE package — the export bundle keeps+ * it external, because it is CommonJS that probes `__filename` and+ * throws inside an ESM bundle. So two versions can be in play: the one+ * these tests prove the subset against, and the one that actually+ * lowers a shipped project. That difference is a parser difference.+ */+import { describe, it, expect } from 'vitest';+import { createRequire } from 'node:module';+import { resolve } from 'node:path';+import { fileURLToPath } from 'node:url';++const ROOT = resolve(fileURLToPath(new URL('../..', import.meta.url)));++describe('the parser this compiler gets', () => {+ it('is the same file the CLI would hand it', () => {+ const here = createRequire(import.meta.url).resolve('typescript');+ const viaPipeline = createRequire(resolve(ROOT, 'pipeline/package.json')).resolve('typescript');+ expect(here).toBe(viaPipeline);+ });+});diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 8987c34e4..9a9aca279 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -40,8 +40,8 @@ importers:specifier: ^22.0.0version: 22.20.1typescript:- specifier: ^5.6.0- version: 5.9.3+ specifier: ^6.0.3+ version: 6.0.3vitest:specifier: ^2.1.9version: 2.1.9(@types/[email protected])(@vitest/[email protected])([email protected])([email protected])([email protected])([email protected])