From d4d4c17a1e35cde5bff13121396f7b6800594f70 Mon Sep 17 00:00:00 2001 From: thibaut severac Date: Wed, 3 Jan 2024 11:31:25 +0100 Subject: [PATCH 1/3] update exports --- packages/universal-cookie/package.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/universal-cookie/package.json b/packages/universal-cookie/package.json index 41b352b0..db295815 100644 --- a/packages/universal-cookie/package.json +++ b/packages/universal-cookie/package.json @@ -3,13 +3,22 @@ "version": "7.0.0", "description": "Universal cookies for JavaScript", "main": "cjs/index.js", + "types": "cjs/index.d.ts", + "type": "module", + "module": "esm/index.mjs", "exports": { ".": { - "import": "./esm/index.mjs", - "require": "./cjs/index.js" + "import": { + "types": "./esm/index.d.ts", + "default": "./esm/index.mjs" + }, + "require": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + }, + "default": "./build/index.js" } }, - "types": "esm/index.d.ts", "sideEffects": false, "files": [ "esm", From f0bf4ca14cb3b458cc707f1fd3f01ebb25cb3954 Mon Sep 17 00:00:00 2001 From: Thibaut SEVERAC Date: Wed, 3 Jan 2024 12:19:08 +0100 Subject: [PATCH 2/3] correct paths --- packages/universal-cookie/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/universal-cookie/package.json b/packages/universal-cookie/package.json index db295815..fc9e9c11 100644 --- a/packages/universal-cookie/package.json +++ b/packages/universal-cookie/package.json @@ -13,10 +13,10 @@ "default": "./esm/index.mjs" }, "require": { - "types": "./build/index.d.ts", - "default": "./build/index.js" + "types": "./cjs/index.d.ts", + "default": "./cjs/index.js" }, - "default": "./build/index.js" + "default": "./cjs/index.js" } }, "sideEffects": false, From 57e3a3e8f2d7fd9565cd393a14c45d68d6f52cef Mon Sep 17 00:00:00 2001 From: thib3113 Date: Fri, 5 Jan 2024 16:15:37 +0100 Subject: [PATCH 3/3] correct type, and apply modifications on others packages --- packages/react-cookie/package.json | 14 +++++++++++--- packages/universal-cookie-express/package.json | 14 +++++++++++--- packages/universal-cookie-koa/package.json | 14 +++++++++++--- packages/universal-cookie/package.json | 2 -- 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/packages/react-cookie/package.json b/packages/react-cookie/package.json index ba1a172e..168ee2c7 100644 --- a/packages/react-cookie/package.json +++ b/packages/react-cookie/package.json @@ -3,13 +3,21 @@ "version": "7.0.0", "description": "Universal cookies for React", "main": "cjs/index.js", + "types": "cjs/index.d.ts", + "module": "esm/index.mjs", "exports": { ".": { - "import": "./esm/index.mjs", - "require": "./cjs/index.js" + "import": { + "types": "./esm/index.d.ts", + "default": "./esm/index.mjs" + }, + "require": { + "types": "./cjs/index.d.ts", + "default": "./cjs/index.js" + }, + "default": "./cjs/index.js" } }, - "types": "esm/index.d.ts", "sideEffects": false, "files": [ "esm", diff --git a/packages/universal-cookie-express/package.json b/packages/universal-cookie-express/package.json index a26e40ba..c99b9c83 100644 --- a/packages/universal-cookie-express/package.json +++ b/packages/universal-cookie-express/package.json @@ -3,13 +3,21 @@ "version": "7.0.0", "description": "Hook cookies get/set on Express for server-rendering", "main": "cjs/index.js", + "types": "cjs/index.d.ts", + "module": "esm/index.mjs", "exports": { ".": { - "import": "./esm/index.mjs", - "require": "./cjs/index.js" + "import": { + "types": "./esm/index.d.ts", + "default": "./esm/index.mjs" + }, + "require": { + "types": "./cjs/index.d.ts", + "default": "./cjs/index.js" + }, + "default": "./cjs/index.js" } }, - "types": "esm/index.d.ts", "sideEffects": false, "files": [ "esm", diff --git a/packages/universal-cookie-koa/package.json b/packages/universal-cookie-koa/package.json index 2d378f06..0b300f9f 100644 --- a/packages/universal-cookie-koa/package.json +++ b/packages/universal-cookie-koa/package.json @@ -3,13 +3,21 @@ "version": "7.0.0", "description": "Hook cookies get/set on Koa for server-rendering", "main": "cjs/index.js", + "types": "cjs/index.d.ts", + "module": "esm/index.mjs", "exports": { ".": { - "import": "./esm/index.mjs", - "require": "./cjs/index.js" + "import": { + "types": "./esm/index.d.ts", + "default": "./esm/index.mjs" + }, + "require": { + "types": "./cjs/index.d.ts", + "default": "./cjs/index.js" + }, + "default": "./cjs/index.js" } }, - "types": "esm/index.d.ts", "sideEffects": false, "files": [ "esm", diff --git a/packages/universal-cookie/package.json b/packages/universal-cookie/package.json index 23d1cf55..34127ae2 100644 --- a/packages/universal-cookie/package.json +++ b/packages/universal-cookie/package.json @@ -2,9 +2,7 @@ "name": "universal-cookie", "version": "7.0.0", "description": "Universal cookies for JavaScript", - "main": "cjs/index.js", "types": "cjs/index.d.ts", - "type": "module", "module": "esm/index.mjs", "exports": { ".": {