From eea3df56ef0bd5abe841e6ae4a07ae60ef814d52 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 20 Nov 2023 16:00:55 +0200 Subject: [PATCH] fix: add back `main`, `module` and `types` field in top-level package.json (#742) closes #738 `"moduleResolution": "node"` doesn't handle the `exports` field --- plugins/authenticator/package.json | 3 +++ plugins/autostart/package.json | 3 +++ plugins/barcode-scanner/package.json | 3 +++ plugins/cli/package.json | 3 +++ plugins/clipboard-manager/package.json | 3 +++ plugins/deep-link/package.json | 3 +++ plugins/dialog/package.json | 3 +++ plugins/fs/package.json | 3 +++ plugins/global-shortcut/package.json | 3 +++ plugins/http/package.json | 3 +++ plugins/log/package.json | 3 +++ plugins/notification/package.json | 3 +++ plugins/os/package.json | 3 +++ plugins/positioner/package.json | 3 +++ plugins/process/package.json | 3 +++ plugins/shell/package.json | 3 +++ plugins/sql/package.json | 3 +++ plugins/store/package.json | 3 +++ plugins/stronghold/package.json | 3 +++ plugins/updater/package.json | 3 +++ plugins/upload/package.json | 3 +++ plugins/websocket/package.json | 3 +++ plugins/window-state/package.json | 3 +++ shared/template/package.json | 3 +++ 24 files changed, 72 insertions(+) diff --git a/plugins/authenticator/package.json b/plugins/authenticator/package.json index 9c9109a6..093e2a39 100644 --- a/plugins/authenticator/package.json +++ b/plugins/authenticator/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json index 3b252f17..2946bf06 100644 --- a/plugins/autostart/package.json +++ b/plugins/autostart/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/barcode-scanner/package.json b/plugins/barcode-scanner/package.json index 026f0f4c..33d15342 100644 --- a/plugins/barcode-scanner/package.json +++ b/plugins/barcode-scanner/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/cli/package.json b/plugins/cli/package.json index 4d772f14..e2d66ea9 100644 --- a/plugins/cli/package.json +++ b/plugins/cli/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json index ac9d84c9..c45a7670 100644 --- a/plugins/clipboard-manager/package.json +++ b/plugins/clipboard-manager/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/deep-link/package.json b/plugins/deep-link/package.json index e4c92e68..f0cb159c 100644 --- a/plugins/deep-link/package.json +++ b/plugins/deep-link/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/dialog/package.json b/plugins/dialog/package.json index 4bb547c4..dd84aacc 100644 --- a/plugins/dialog/package.json +++ b/plugins/dialog/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/fs/package.json b/plugins/fs/package.json index 0fedb51d..b29578c4 100644 --- a/plugins/fs/package.json +++ b/plugins/fs/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/global-shortcut/package.json b/plugins/global-shortcut/package.json index b50150f7..b0f979c2 100644 --- a/plugins/global-shortcut/package.json +++ b/plugins/global-shortcut/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/http/package.json b/plugins/http/package.json index 4dc7bcf8..7c3f7df7 100644 --- a/plugins/http/package.json +++ b/plugins/http/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/log/package.json b/plugins/log/package.json index 2fdc0750..76df61a4 100644 --- a/plugins/log/package.json +++ b/plugins/log/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/notification/package.json b/plugins/notification/package.json index 75e574bc..9a93a566 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/os/package.json b/plugins/os/package.json index df6e9594..494e05b6 100644 --- a/plugins/os/package.json +++ b/plugins/os/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json index 1894cc85..6c77b02e 100644 --- a/plugins/positioner/package.json +++ b/plugins/positioner/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/process/package.json b/plugins/process/package.json index 1ed26c3a..c7b76245 100644 --- a/plugins/process/package.json +++ b/plugins/process/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/shell/package.json b/plugins/shell/package.json index 3888991d..013b69de 100644 --- a/plugins/shell/package.json +++ b/plugins/shell/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/sql/package.json b/plugins/sql/package.json index cb90f3e4..db91c5bc 100644 --- a/plugins/sql/package.json +++ b/plugins/sql/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/store/package.json b/plugins/store/package.json index 2e0d6164..a0cb01bf 100644 --- a/plugins/store/package.json +++ b/plugins/store/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/stronghold/package.json b/plugins/stronghold/package.json index 1aebb033..46c8f908 100644 --- a/plugins/stronghold/package.json +++ b/plugins/stronghold/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/updater/package.json b/plugins/updater/package.json index 9239a7ac..7b8eca0f 100644 --- a/plugins/updater/package.json +++ b/plugins/updater/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/upload/package.json b/plugins/upload/package.json index cd3b7a6e..86b6d981 100644 --- a/plugins/upload/package.json +++ b/plugins/upload/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/websocket/package.json b/plugins/websocket/package.json index 0e322641..ea6652d1 100644 --- a/plugins/websocket/package.json +++ b/plugins/websocket/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json index 8ad6c677..d6d0e08d 100644 --- a/plugins/window-state/package.json +++ b/plugins/window-state/package.json @@ -7,6 +7,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js", diff --git a/shared/template/package.json b/shared/template/package.json index 88606d39..00294c19 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -6,6 +6,9 @@ "Tauri Programme within The Commons Conservancy" ], "type": "module", + "types": "./dist-js/index.d.ts", + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", "exports": { "types": "./dist-js/index.d.ts", "import": "./dist-js/index.js",