From 68c8a44bbf7a773c9d237ff4eb07758c72a93d2c Mon Sep 17 00:00:00 2001 From: Pascal Garber Date: Wed, 28 Feb 2024 21:22:18 +0100 Subject: [PATCH] Update examples tsconfig to use ESM --- examples/gjs/adw-1-hello/tsconfig.json | 3 ++- examples/gjs/gio-2-cat-alias/tsconfig.json | 7 ++++++- examples/gjs/gio-2-cat-packages/tsconfig.json | 8 ++++++-- examples/gjs/gio-2-cat-promisify/tsconfig.json | 8 +++++++- examples/gjs/gio-2-cat-types-only/tsconfig.json | 3 ++- examples/gjs/gio-2-cat/tsconfig.json | 1 + examples/gjs/gio-2-dbus/tsconfig.json | 1 + examples/gjs/gio-2-list-model/tsconfig.json | 3 ++- examples/gjs/glib-2-spawn-command/tsconfig.json | 3 ++- examples/gjs/glib-2-variant/tsconfig.json | 1 + examples/gjs/gtk-3-browser/tsconfig.json | 3 ++- examples/gjs/gtk-3-builder/tsconfig.json | 3 ++- examples/gjs/gtk-3-calc/tsconfig.json | 1 + examples/gjs/gtk-3-editor/tsconfig.json | 3 ++- examples/gjs/gtk-3-gettext/tsconfig.json | 1 + examples/gjs/gtk-3-hello-2/tsconfig.json | 1 + examples/gjs/gtk-3-hello/tsconfig.json | 3 ++- examples/gjs/gtk-3-template/tsconfig.json | 1 + examples/gjs/gtk-3-webkit/tsconfig.json | 1 + examples/gjs/gtk-4-application/tsconfig.json | 1 + examples/gjs/gtk-4-custom-widget/tsconfig.json | 2 +- examples/gjs/gtk-4-list-store/tsconfig.json | 3 ++- examples/gjs/gtk-4-template/tsconfig.json | 1 + examples/gjs/run-async/tsconfig.json | 8 ++++++-- examples/gjs/soup-3-http/tsconfig.json | 4 +--- examples/gjs/soup-3-websocket/tsconfig.json | 1 + examples/gjs/timers/tsconfig.json | 1 + 27 files changed, 57 insertions(+), 19 deletions(-) diff --git a/examples/gjs/adw-1-hello/tsconfig.json b/examples/gjs/adw-1-hello/tsconfig.json index c92f8d475..0ae284f50 100644 --- a/examples/gjs/adw-1-hello/tsconfig.json +++ b/examples/gjs/adw-1-hello/tsconfig.json @@ -1,9 +1,10 @@ { "compilerOptions": { - "lib": ["ESNext"], + "lib": ["ESNext"], "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gio-2-cat-alias/tsconfig.json b/examples/gjs/gio-2-cat-alias/tsconfig.json index 89d0f11a2..b438edd2e 100644 --- a/examples/gjs/gio-2-cat-alias/tsconfig.json +++ b/examples/gjs/gio-2-cat-alias/tsconfig.json @@ -5,7 +5,12 @@ "types": [], "target": "ESNext", "module": "ESNext", - "moduleResolution": "node", + "moduleResolution": "bundler", + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, }, "include": ["@types/gjs.d.ts", "@types/dom.d.ts"], "files": [ diff --git a/examples/gjs/gio-2-cat-packages/tsconfig.json b/examples/gjs/gio-2-cat-packages/tsconfig.json index 22851e93f..802d624f0 100644 --- a/examples/gjs/gio-2-cat-packages/tsconfig.json +++ b/examples/gjs/gio-2-cat-packages/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { - "baseUrl": ".", "lib": ["ESNext"], "types": [], "target": "ESNext", "module": "ESNext", - "moduleResolution": "node" + "moduleResolution": "bundler", + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, }, "include": ["@girs/gjs", "@girs/gjs/dom", "@girs/gjs/ambient"], "files": [ diff --git a/examples/gjs/gio-2-cat-promisify/tsconfig.json b/examples/gjs/gio-2-cat-promisify/tsconfig.json index 1d5d30cd2..b438edd2e 100644 --- a/examples/gjs/gio-2-cat-promisify/tsconfig.json +++ b/examples/gjs/gio-2-cat-promisify/tsconfig.json @@ -4,7 +4,13 @@ "lib": ["ESNext"], "types": [], "target": "ESNext", - "module": "ESNext" + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, }, "include": ["@types/gjs.d.ts", "@types/dom.d.ts"], "files": [ diff --git a/examples/gjs/gio-2-cat-types-only/tsconfig.json b/examples/gjs/gio-2-cat-types-only/tsconfig.json index dc12aae7e..387ef5260 100644 --- a/examples/gjs/gio-2-cat-types-only/tsconfig.json +++ b/examples/gjs/gio-2-cat-types-only/tsconfig.json @@ -4,11 +4,12 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, "noImplicitThis": true, - "alwaysStrict": true + "alwaysStrict": true, }, "include": ["@types/gjs.d.ts", "@types/dom.d.ts", "@types/gio-2.0.d.ts", "@types/glib-2.0.d.ts"], "files": [ diff --git a/examples/gjs/gio-2-cat/tsconfig.json b/examples/gjs/gio-2-cat/tsconfig.json index 307401077..0ae284f50 100644 --- a/examples/gjs/gio-2-cat/tsconfig.json +++ b/examples/gjs/gio-2-cat/tsconfig.json @@ -4,6 +4,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gio-2-dbus/tsconfig.json b/examples/gjs/gio-2-dbus/tsconfig.json index 33bae9338..0d914b3af 100644 --- a/examples/gjs/gio-2-dbus/tsconfig.json +++ b/examples/gjs/gio-2-dbus/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gio-2-list-model/tsconfig.json b/examples/gjs/gio-2-list-model/tsconfig.json index 27740af42..f7adebcb5 100644 --- a/examples/gjs/gio-2-list-model/tsconfig.json +++ b/examples/gjs/gio-2-list-model/tsconfig.json @@ -1,10 +1,11 @@ { "extends": "./tsconfig.alias.json", "compilerOptions": { - "lib": ["ESNext"], + "lib": ["ESNext"], "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/glib-2-spawn-command/tsconfig.json b/examples/gjs/glib-2-spawn-command/tsconfig.json index 9da618f9d..fa3e8ae25 100644 --- a/examples/gjs/glib-2-spawn-command/tsconfig.json +++ b/examples/gjs/glib-2-spawn-command/tsconfig.json @@ -4,8 +4,9 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, - "noImplicitAny": false, + "noImplicitAny": true, "strictNullChecks": true, "noImplicitThis": true, "alwaysStrict": true, diff --git a/examples/gjs/glib-2-variant/tsconfig.json b/examples/gjs/glib-2-variant/tsconfig.json index 2af89788e..55908286a 100644 --- a/examples/gjs/glib-2-variant/tsconfig.json +++ b/examples/gjs/glib-2-variant/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gtk-3-browser/tsconfig.json b/examples/gjs/gtk-3-browser/tsconfig.json index f47168300..b0ea0baa9 100644 --- a/examples/gjs/gtk-3-browser/tsconfig.json +++ b/examples/gjs/gtk-3-browser/tsconfig.json @@ -4,8 +4,9 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, - "noImplicitAny": false, + "noImplicitAny": true, "strictNullChecks": true, "noImplicitThis": true, "alwaysStrict": true, diff --git a/examples/gjs/gtk-3-builder/tsconfig.json b/examples/gjs/gtk-3-builder/tsconfig.json index ae1ae2e0a..b8ecd1ea3 100644 --- a/examples/gjs/gtk-3-builder/tsconfig.json +++ b/examples/gjs/gtk-3-builder/tsconfig.json @@ -4,8 +4,9 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, - "noImplicitAny": false, + "noImplicitAny": true, "strictNullChecks": true, "noImplicitThis": true, "alwaysStrict": true, diff --git a/examples/gjs/gtk-3-calc/tsconfig.json b/examples/gjs/gtk-3-calc/tsconfig.json index de82d12da..f7adebcb5 100644 --- a/examples/gjs/gtk-3-calc/tsconfig.json +++ b/examples/gjs/gtk-3-calc/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gtk-3-editor/tsconfig.json b/examples/gjs/gtk-3-editor/tsconfig.json index 172ffaef9..81b59ad04 100644 --- a/examples/gjs/gtk-3-editor/tsconfig.json +++ b/examples/gjs/gtk-3-editor/tsconfig.json @@ -4,8 +4,9 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, - "noImplicitAny": false, + "noImplicitAny": true, "strictNullChecks": true, "noImplicitThis": true, "alwaysStrict": true, diff --git a/examples/gjs/gtk-3-gettext/tsconfig.json b/examples/gjs/gtk-3-gettext/tsconfig.json index de82d12da..f7adebcb5 100644 --- a/examples/gjs/gtk-3-gettext/tsconfig.json +++ b/examples/gjs/gtk-3-gettext/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gtk-3-hello-2/tsconfig.json b/examples/gjs/gtk-3-hello-2/tsconfig.json index 15a01fef0..c3570f8e1 100644 --- a/examples/gjs/gtk-3-hello-2/tsconfig.json +++ b/examples/gjs/gtk-3-hello-2/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gtk-3-hello/tsconfig.json b/examples/gjs/gtk-3-hello/tsconfig.json index 172ffaef9..81b59ad04 100644 --- a/examples/gjs/gtk-3-hello/tsconfig.json +++ b/examples/gjs/gtk-3-hello/tsconfig.json @@ -4,8 +4,9 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, - "noImplicitAny": false, + "noImplicitAny": true, "strictNullChecks": true, "noImplicitThis": true, "alwaysStrict": true, diff --git a/examples/gjs/gtk-3-template/tsconfig.json b/examples/gjs/gtk-3-template/tsconfig.json index de82d12da..f7adebcb5 100644 --- a/examples/gjs/gtk-3-template/tsconfig.json +++ b/examples/gjs/gtk-3-template/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gtk-3-webkit/tsconfig.json b/examples/gjs/gtk-3-webkit/tsconfig.json index de82d12da..f7adebcb5 100644 --- a/examples/gjs/gtk-3-webkit/tsconfig.json +++ b/examples/gjs/gtk-3-webkit/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gtk-4-application/tsconfig.json b/examples/gjs/gtk-4-application/tsconfig.json index 18c6dbf89..31e7d2e96 100644 --- a/examples/gjs/gtk-4-application/tsconfig.json +++ b/examples/gjs/gtk-4-application/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gtk-4-custom-widget/tsconfig.json b/examples/gjs/gtk-4-custom-widget/tsconfig.json index f6ed449e8..ecac22692 100644 --- a/examples/gjs/gtk-4-custom-widget/tsconfig.json +++ b/examples/gjs/gtk-4-custom-widget/tsconfig.json @@ -5,12 +5,12 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, "noImplicitThis": true, "alwaysStrict": true, - "moduleResolution":"Bundler" }, "include": ["@types/gjs.d.ts", "@types/dom.d.ts"], "files": [ diff --git a/examples/gjs/gtk-4-list-store/tsconfig.json b/examples/gjs/gtk-4-list-store/tsconfig.json index 27740af42..f7adebcb5 100644 --- a/examples/gjs/gtk-4-list-store/tsconfig.json +++ b/examples/gjs/gtk-4-list-store/tsconfig.json @@ -1,10 +1,11 @@ { "extends": "./tsconfig.alias.json", "compilerOptions": { - "lib": ["ESNext"], + "lib": ["ESNext"], "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/gtk-4-template/tsconfig.json b/examples/gjs/gtk-4-template/tsconfig.json index de82d12da..f7adebcb5 100644 --- a/examples/gjs/gtk-4-template/tsconfig.json +++ b/examples/gjs/gtk-4-template/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/run-async/tsconfig.json b/examples/gjs/run-async/tsconfig.json index 5cc523f87..5b0645c8b 100644 --- a/examples/gjs/run-async/tsconfig.json +++ b/examples/gjs/run-async/tsconfig.json @@ -1,11 +1,15 @@ { "compilerOptions": { - "baseUrl": ".", "lib": ["ESNext"], "types": [], "target": "ESNext", "module": "ESNext", - "moduleResolution": "node" + "moduleResolution": "bundler", + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, }, "include": ["@girs/gjs", "@girs/gjs/ambient"], "files": [ diff --git a/examples/gjs/soup-3-http/tsconfig.json b/examples/gjs/soup-3-http/tsconfig.json index 516172fba..2d020c50d 100644 --- a/examples/gjs/soup-3-http/tsconfig.json +++ b/examples/gjs/soup-3-http/tsconfig.json @@ -5,9 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", - "moduleResolution": "Bundler", - "noEmit": true, - "allowImportingTsExtensions": true, + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/soup-3-websocket/tsconfig.json b/examples/gjs/soup-3-websocket/tsconfig.json index c48863475..9212c917f 100644 --- a/examples/gjs/soup-3-websocket/tsconfig.json +++ b/examples/gjs/soup-3-websocket/tsconfig.json @@ -5,6 +5,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true, diff --git a/examples/gjs/timers/tsconfig.json b/examples/gjs/timers/tsconfig.json index 4c0e84e16..c1b1f0dca 100644 --- a/examples/gjs/timers/tsconfig.json +++ b/examples/gjs/timers/tsconfig.json @@ -4,6 +4,7 @@ "types": [], "target": "ESNext", "module": "ESNext", + "moduleResolution": "bundler", "strict": true, "noImplicitAny": true, "strictNullChecks": true,