@defold-typescript/transpiler 0.8.1 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -647,6 +647,7 @@ function transpileProject(input) {
647
647
  const result = tstl2.transpileVirtualProject(merged, {
648
648
  luaTarget: tstl2.LuaTarget.Lua51,
649
649
  sourceMap: true,
650
+ lib: ["lib.es2022.d.ts"],
650
651
  skipLibCheck: true,
651
652
  noImplicitSelf: true,
652
653
  luaPlugins: [
@@ -672,6 +673,7 @@ var requireFromHere2 = createRequire2(import.meta.url);
672
673
  var COMPILER_OPTIONS = {
673
674
  luaTarget: tstl3.LuaTarget.Lua51,
674
675
  sourceMap: true,
676
+ lib: ["lib.es2022.d.ts"],
675
677
  skipLibCheck: true,
676
678
  noImplicitSelf: true,
677
679
  luaPlugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defold-typescript/transpiler",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "TypeScript-to-Lua build pipeline tuned for Defold's runtime.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@defold-typescript/types": "0.8.1",
38
+ "@defold-typescript/types": "0.8.3",
39
39
  "@typescript-to-lua/language-extensions": "1.19.0",
40
40
  "typescript-to-lua": "^1.36.0"
41
41
  }
package/src/session.ts CHANGED
@@ -19,6 +19,10 @@ const requireFromHere = createRequire(import.meta.url);
19
19
  const COMPILER_OPTIONS: tstl.CompilerOptions = {
20
20
  luaTarget: tstl.LuaTarget.Lua51,
21
21
  sourceMap: true,
22
+ // Already-resolved CompilerOptions, so the value is the lib file name, not the
23
+ // tsconfig spelling "ES2022". Drops the default `lib.dom`, whose `declare var
24
+ // window` shadows Defold's `window` namespace. Keep in lockstep with transpile.ts.
25
+ lib: ["lib.es2022.d.ts"],
22
26
  // Don't cross-check the seeded ambient .d.ts surface against itself; only user
23
27
  // files matter (mirrors transpileProject and the editor's skipLibCheck).
24
28
  skipLibCheck: true,
package/src/transpile.ts CHANGED
@@ -246,6 +246,10 @@ export function transpileProject(input: TranspileProjectInput): TranspileProject
246
246
  const result = tstl.transpileVirtualProject(merged, {
247
247
  luaTarget: tstl.LuaTarget.Lua51,
248
248
  sourceMap: true,
249
+ // Already-resolved CompilerOptions, so the value is the lib file name, not
250
+ // the tsconfig spelling "ES2022". Drops the default `lib.dom`, whose
251
+ // `declare var window` shadows Defold's `window` namespace.
252
+ lib: ["lib.es2022.d.ts"],
249
253
  // Don't cross-check the seeded ambient .d.ts surface against itself; we only
250
254
  // care about diagnostics on user files (mirrors the editor's skipLibCheck).
251
255
  skipLibCheck: true,