From 12f211279509b929e5db64409b4dc398be51c0cb Mon Sep 17 00:00:00 2001 From: Pascal Garber Date: Fri, 1 Mar 2024 23:01:35 +0100 Subject: [PATCH] chore(npm): Also export as default --- examples/gjs/gtk-4-custom-widget/package.json | 4 ++++ examples/gjs/gtk-4-list-store/package.json | 4 ++++ examples/gjs/soup-3-websocket/package.json | 2 ++ .../templates/package.json | 24 ++++++++++++------- types | 2 +- yarn.lock | 6 +++++ 6 files changed, 33 insertions(+), 9 deletions(-) diff --git a/examples/gjs/gtk-4-custom-widget/package.json b/examples/gjs/gtk-4-custom-widget/package.json index 3908cc239..ba69b8646 100644 --- a/examples/gjs/gtk-4-custom-widget/package.json +++ b/examples/gjs/gtk-4-custom-widget/package.json @@ -23,5 +23,9 @@ "@ts-for-gir/cli": "workspace:^", "esbuild": "^0.20.1", "typescript": "^5.2.2" + }, + "dependencies": { + "@girs/gjs": "workspace:^", + "@girs/gtk-4.0": "workspace:^" } } diff --git a/examples/gjs/gtk-4-list-store/package.json b/examples/gjs/gtk-4-list-store/package.json index 3a729e568..4d1eebc6f 100644 --- a/examples/gjs/gtk-4-list-store/package.json +++ b/examples/gjs/gtk-4-list-store/package.json @@ -22,5 +22,9 @@ "devDependencies": { "esbuild": "^0.20.1", "typescript": "^5.2.2" + }, + "dependencies": { + "@girs/gjs": "workspace:^", + "@girs/gtk-4.0": "workspace:^" } } diff --git a/examples/gjs/soup-3-websocket/package.json b/examples/gjs/soup-3-websocket/package.json index bda423e26..9239f514b 100644 --- a/examples/gjs/soup-3-websocket/package.json +++ b/examples/gjs/soup-3-websocket/package.json @@ -24,6 +24,8 @@ "typescript": "^5.2.2" }, "dependencies": { + "@girs/gio-2.0": "workspace:^", + "@girs/gjs": "workspace:^", "@girs/soup-3.0": "workspace:^" } } diff --git a/packages/generator-typescript/templates/package.json b/packages/generator-typescript/templates/package.json index 5f67b4c82..fe171e683 100644 --- a/packages/generator-typescript/templates/package.json +++ b/packages/generator-typescript/templates/package.json @@ -21,37 +21,45 @@ _%> <%_ if (packageName === 'Gjs') { _%> "./ambient": { "types": "./ambient.d.ts", - "import": "./ambient.js" + "import": "./ambient.js", + "default": "./ambient.js" }, "./dom": { "types": "./dom.d.ts", - "import": "./dom.js" + "import": "./dom.js", + "default": "./dom.js" }, "./gettext": { "types": "./gettext.d.ts", - "import": "./gettext.js" + "import": "./gettext.js", + "default": "./gettext.js" }, "./system": { "types": "./system.d.ts", - "import": "./system.js" + "import": "./system.js", + "default": "./system.js" }, "./cairo": { "types": "./cairo.d.ts", - "import": "./cairo.js" + "import": "./cairo.js", + "default": "./cairo.js" }, <%_ } else {_%> "./ambient": { "types": "./<%- entryPointName %>-ambient.d.ts", - "import": "./<%- entryPointName %>-ambient.js" + "import": "./<%- entryPointName %>-ambient.js", + "default": "./<%- entryPointName %>-ambient.js" }, "./import": { "types": "./<%- entryPointName %>-import.d.ts", - "import": "./<%- entryPointName %>-import.js" + "import": "./<%- entryPointName %>-import.js", + "default": "./<%- entryPointName %>-import.js" }, <%_ } _%> ".": { "types": "./<%- entryPointName %>.d.ts", - "import": "./<%- entryPointName %>.js" + "import": "./<%- entryPointName %>.js", + "default": "./<%- entryPointName %>.js" } }, "scripts": { diff --git a/types b/types index 2cdd502aa..caf8888e6 160000 --- a/types +++ b/types @@ -1 +1 @@ -Subproject commit 2cdd502aabc5e471edceeac22c482bb0aac8a2c8 +Subproject commit caf8888e6818d5d005f4426274fe0e03c7c6bccf diff --git a/yarn.lock b/yarn.lock index 2dd9b7904..ec937304b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8164,6 +8164,8 @@ __metadata: version: 0.0.0-use.local resolution: "@ts-for-gir-example/gjs-gtk-4-custom-widget-example@workspace:examples/gjs/gtk-4-custom-widget" dependencies: + "@girs/gjs": "workspace:^" + "@girs/gtk-4.0": "workspace:^" "@ts-for-gir/cli": "workspace:^" esbuild: "npm:^0.20.1" typescript: "npm:^5.2.2" @@ -8319,6 +8321,8 @@ __metadata: version: 0.0.0-use.local resolution: "@ts-for-gir-example/gtk-4-list-store-example@workspace:examples/gjs/gtk-4-list-store" dependencies: + "@girs/gjs": "workspace:^" + "@girs/gtk-4.0": "workspace:^" esbuild: "npm:^0.20.1" typescript: "npm:^5.2.2" languageName: unknown @@ -8360,6 +8364,8 @@ __metadata: version: 0.0.0-use.local resolution: "@ts-for-gir-example/soup-3-websocket-example@workspace:examples/gjs/soup-3-websocket" dependencies: + "@girs/gio-2.0": "workspace:^" + "@girs/gjs": "workspace:^" "@girs/soup-3.0": "workspace:^" esbuild: "npm:^0.20.1" typescript: "npm:^5.2.2"