From e193de44d523bb27ab90d26fea6a16d3e70b4fd0 Mon Sep 17 00:00:00 2001 From: Prithpal Sooriya Date: Mon, 16 Sep 2024 18:04:10 +0100 Subject: [PATCH 1/3] fix: add SDK subpath export --- packages/profile-sync-controller/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index aeca017f97..39b1749490 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -59,7 +59,8 @@ "files": [ "dist/", "auth/", - "user-storage/" + "user-storage/", + "sdk/" ], "scripts": { "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", From 3963395aa400fbadb7ec7c353f24d5aada886779 Mon Sep 17 00:00:00 2001 From: Prithpal Sooriya Date: Mon, 16 Sep 2024 20:04:20 +0100 Subject: [PATCH 2/3] fix: update profile-sync-controller subpath exports We have changes our ts bundler to ts-bridge, which exports new type definition files --- .../auth/mocks/package.json | 4 +- .../profile-sync-controller/auth/package.json | 4 +- packages/profile-sync-controller/package.json | 55 ++++++++++++++----- .../profile-sync-controller/sdk/package.json | 4 +- .../user-storage/mocks/package.json | 4 +- .../user-storage/package.json | 4 +- 6 files changed, 50 insertions(+), 25 deletions(-) diff --git a/packages/profile-sync-controller/auth/mocks/package.json b/packages/profile-sync-controller/auth/mocks/package.json index 2df06e7994..11186bb695 100644 --- a/packages/profile-sync-controller/auth/mocks/package.json +++ b/packages/profile-sync-controller/auth/mocks/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../../dist/controllers/authentication/__fixtures__/index.js", - "types": "../../dist/types/controllers/authentication/__fixtures__/index.d.ts" + "main": "../../dist/controllers/authentication/__fixtures__/index.cjs", + "types": "../../dist/controllers/authentication/__fixtures__/index.d.cts" } diff --git a/packages/profile-sync-controller/auth/package.json b/packages/profile-sync-controller/auth/package.json index c6d23fafa7..ea3049e4db 100644 --- a/packages/profile-sync-controller/auth/package.json +++ b/packages/profile-sync-controller/auth/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../dist/controllers/authentication/index.js", - "types": "../dist/types/controllers/authentication/index.d.ts" + "main": "../dist/controllers/authentication/index.cjs", + "types": "../dist/controllers/authentication/index.d.cts" } diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index 39b1749490..bbb1754e55 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -28,29 +28,54 @@ } }, "./sdk": { - "import": "./dist/sdk/index.mjs", - "require": "./dist/sdk/index.js", - "types": "./dist/types/sdk/index.d.ts" + "import": { + "types": "./dist/sdk/index.d.mts", + "default": "./dist/sdk/index.mjs" + }, + "require": { + "types": "./dist/sdk/index.d.cts", + "default": "./dist/sdk/index.cjs" + } }, "./auth": { - "import": "./dist/controllers/authentication/index.mjs", - "require": "./dist/controllers/authentication/index.js", - "types": "./dist/types/controllers/authentication/index.d.ts" + "import": { + "types": "./dist/controllers/authentication/index.d.mts", + "default": "./dist/controllers/authentication/index.mjs" + }, + "require": { + "types": "./dist/controllers/authentication/index.d.cts", + "default": "./dist/controllers/authentication/index.cjs" + } }, "./auth/mocks": { - "import": "./dist/controllers/authentication/__fixtures__/index.mjs", - "require": "./dist/controllers/authentication/__fixtures__/index.js", - "types": "./dist/types/controllers/authentication/__fixtures__/index.d.ts" + "import": { + "types": "./dist/controllers/authentication/__fixtures__/index.d.mts", + "default": "./dist/controllers/authentication/__fixtures__/index.mjs" + }, + "require": { + "types": "./dist/controllers/authentication/__fixtures__/index.d.cts", + "default": "./dist/controllers/authentication/__fixtures__/index.cjs" + } }, "./user-storage": { - "import": "./dist/controllers/user-storage/index.mjs", - "require": "./dist/controllers/user-storage/index.js", - "types": "./dist/types/controllers/user-storage/index.d.ts" + "import": { + "types": "./dist/controllers/user-storage/index.d.mts", + "default": "./dist/controllers/user-storage/index.mjs" + }, + "require": { + "types": "./dist/controllers/user-storage/index.d.cts", + "default": "./dist/controllers/user-storage/index.cjs" + } }, "./user-storage/mocks": { - "import": "./dist/controllers/user-storage/__fixtures__/index.mjs", - "require": "./dist/controllers/user-storage/__fixtures__/index.js", - "types": "./dist/types/controllers/user-storage/__fixtures__/index.d.ts" + "import": { + "types": "./dist/controllers/user-storage/__fixtures__/index.d.mts", + "default": "./dist/controllers/user-storage/__fixtures__/index.mjs" + }, + "require": { + "types": "./dist/controllers/user-storage/__fixtures__/index.d.cts", + "default": "./dist/controllers/user-storage/__fixtures__/index.cjs" + } }, "./package.json": "./package.json" }, diff --git a/packages/profile-sync-controller/sdk/package.json b/packages/profile-sync-controller/sdk/package.json index 9fe1d6a067..82f8934a50 100644 --- a/packages/profile-sync-controller/sdk/package.json +++ b/packages/profile-sync-controller/sdk/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../dist/sdk/index.js", - "types": "../dist/types/sdk/index.d.ts" + "main": "../dist/sdk/index.cjs", + "types": "../dist/sdk/index.d.cts" } diff --git a/packages/profile-sync-controller/user-storage/mocks/package.json b/packages/profile-sync-controller/user-storage/mocks/package.json index b6557b6d0a..2835e2de22 100644 --- a/packages/profile-sync-controller/user-storage/mocks/package.json +++ b/packages/profile-sync-controller/user-storage/mocks/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../../dist/controllers/user-storage/__fixtures__/index.js", - "types": "../../dist/types/controllers/user-storage/__fixtures__/index.d.ts" + "main": "../../dist/controllers/user-storage/__fixtures__/index.cjs", + "types": "../../dist/types/controllers/user-storage/__fixtures__/index.d.cts" } diff --git a/packages/profile-sync-controller/user-storage/package.json b/packages/profile-sync-controller/user-storage/package.json index e4141de992..25caed994d 100644 --- a/packages/profile-sync-controller/user-storage/package.json +++ b/packages/profile-sync-controller/user-storage/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../dist/controllers/user-storage/index.js", - "types": "../dist/types/controllers/user-storage/index.d.ts" + "main": "../dist/controllers/user-storage/index.cjs", + "types": "../dist/controllers/user-storage/index.d.cts" } From f9f11cbbcb92afafa124ba3170a7fb86e89c2452 Mon Sep 17 00:00:00 2001 From: Prithpal Sooriya Date: Mon, 16 Sep 2024 20:10:35 +0100 Subject: [PATCH 3/3] fix: fix: update notification-services-controller subpath exports We have changes our ts bundler to ts-bridge, which exports new type definition files --- .../notification-services/mocks/package.json | 4 +- .../notification-services/package.json | 4 +- .../notification-services/ui/package.json | 4 +- .../package.json | 55 ++++++++++++++----- .../push-services/mocks/package.json | 4 +- .../push-services/package.json | 4 +- 6 files changed, 50 insertions(+), 25 deletions(-) diff --git a/packages/notification-services-controller/notification-services/mocks/package.json b/packages/notification-services-controller/notification-services/mocks/package.json index 1976e12eac..9e3d00f23f 100644 --- a/packages/notification-services-controller/notification-services/mocks/package.json +++ b/packages/notification-services-controller/notification-services/mocks/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../../dist/NotificationServicesController/__fixtures__/index.js", - "types": "../../dist/types/NotificationServicesController/__fixtures__/index.d.ts" + "main": "../../dist/NotificationServicesController/__fixtures__/index.cjs", + "types": "../../dist/NotificationServicesController/__fixtures__/index.d.cts" } diff --git a/packages/notification-services-controller/notification-services/package.json b/packages/notification-services-controller/notification-services/package.json index 1b9161a5b9..929af09dc8 100644 --- a/packages/notification-services-controller/notification-services/package.json +++ b/packages/notification-services-controller/notification-services/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../dist/NotificationServicesController/index.js", - "types": "../dist/types/NotificationServicesController/index.d.ts" + "main": "../dist/NotificationServicesController/index.cjs", + "types": "../dist/NotificationServicesController/index.d.cts" } diff --git a/packages/notification-services-controller/notification-services/ui/package.json b/packages/notification-services-controller/notification-services/ui/package.json index 8842eec527..75d655f391 100644 --- a/packages/notification-services-controller/notification-services/ui/package.json +++ b/packages/notification-services-controller/notification-services/ui/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../../dist/NotificationServicesController/ui/index.js", - "types": "../../dist/types/NotificationServicesController/ui/index.d.ts" + "main": "../../dist/NotificationServicesController/ui/index.cjs", + "types": "../../dist/NotificationServicesController/ui/index.d.cts" } diff --git a/packages/notification-services-controller/package.json b/packages/notification-services-controller/package.json index 2586e0d84e..e5e94373bf 100644 --- a/packages/notification-services-controller/package.json +++ b/packages/notification-services-controller/package.json @@ -28,29 +28,54 @@ } }, "./notification-services": { - "import": "./dist/NotificationServicesController/index.mjs", - "require": "./dist/NotificationServicesController/index.js", - "types": "./dist/types/NotificationServicesController/index.d.ts" + "import": { + "types": "./dist/NotificationServicesController/index.d.mts", + "default": "./dist/NotificationServicesController/index.mjs" + }, + "require": { + "types": "./dist/NotificationServicesController/index.d.cts", + "default": "./dist/NotificationServicesController/index.cjs" + } }, "./notification-services/ui": { - "import": "./dist/NotificationServicesController/ui/index.mjs", - "require": "./dist/NotificationServicesController/ui/index.js", - "types": "./dist/types/NotificationServicesController/ui/index.d.ts" + "import": { + "types": "./dist/NotificationServicesController/ui/index.d.mts", + "default": "./dist/NotificationServicesController/ui/index.mjs" + }, + "require": { + "types": "./dist/NotificationServicesController/ui/index.d.cts", + "default": "./dist/NotificationServicesController/ui/index.cjs" + } }, "./notification-services/mocks": { - "import": "./dist/NotificationServicesController/__fixtures__/index.mjs", - "require": "./dist/NotificationServicesController/__fixtures__/index.js", - "types": "./dist/types/NotificationServicesController/__fixtures__/index.d.ts" + "import": { + "types": "./dist/NotificationServicesController/__fixtures__/index.d.mts", + "default": "./dist/NotificationServicesController/__fixtures__/index.mjs" + }, + "require": { + "types": "./dist/NotificationServicesController/__fixtures__/index.d.cts", + "default": "./dist/NotificationServicesController/__fixtures__/index.cjs" + } }, "./push-services": { - "import": "./dist/NotificationServicesPushController/index.mjs", - "require": "./dist/NotificationServicesPushController/index.js", - "types": "./dist/types/NotificationServicesPushController/index.d.ts" + "import": { + "types": "./dist/NotificationServicesPushController/index.d.mts", + "default": "./dist/NotificationServicesPushController/index.mjs" + }, + "require": { + "types": "./dist/NotificationServicesPushController/index.d.cts", + "default": "./dist/NotificationServicesPushController/index.cjs" + } }, "./push-services/mocks": { - "import": "./dist/NotificationServicesPushController/__fixtures__/index.mjs", - "require": "./dist/NotificationServicesPushController/__fixtures__/index.js", - "types": "./dist/types/NotificationServicesPushController/__fixtures__/index.d.ts" + "import": { + "types": "./dist/NotificationServicesPushController/__fixtures__/index.d.mts", + "default": "./dist/NotificationServicesPushController/__fixtures__/index.mjs" + }, + "require": { + "types": "./dist/NotificationServicesPushController/__fixtures__/index.d.cts", + "default": "./dist/NotificationServicesPushController/__fixtures__/index.cjs" + } }, "./package.json": "./package.json" }, diff --git a/packages/notification-services-controller/push-services/mocks/package.json b/packages/notification-services-controller/push-services/mocks/package.json index 05596c0f59..662f704c85 100644 --- a/packages/notification-services-controller/push-services/mocks/package.json +++ b/packages/notification-services-controller/push-services/mocks/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../../dist/NotificationServicesPushController/__fixtures__/index.js", - "types": "../../dist/types/NotificationServicesPushController/__fixtures__/index.d.ts" + "main": "../../dist/NotificationServicesPushController/__fixtures__/index.cjs", + "types": "../../dist/NotificationServicesPushController/__fixtures__/index.d.cts" } diff --git a/packages/notification-services-controller/push-services/package.json b/packages/notification-services-controller/push-services/package.json index 7cd1c6ae21..c3c2fa9aee 100644 --- a/packages/notification-services-controller/push-services/package.json +++ b/packages/notification-services-controller/push-services/package.json @@ -4,6 +4,6 @@ "description": "", "license": "MIT", "sideEffects": false, - "main": "../dist/NotificationServicesPushController/index.js", - "types": "../dist/types/NotificationServicesPushController/index.d.ts" + "main": "../dist/NotificationServicesPushController/index.cjs", + "types": "../dist/NotificationServicesPushController/index.d.cts" }