From bc9c41d04609c40e609e672254df5ff1ddf0cad9 Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Wed, 25 Sep 2024 20:59:59 +0100 Subject: [PATCH] fix: change export order so default is last fixes https://github.com/wheresrhys/fetch-mock/issues/840 --- packages/core/package.json | 8 ++++---- packages/fetch-mock/package.json | 8 ++++---- packages/jest/package.json | 19 ++++++++++++------- packages/vitest/package.json | 19 ++++++++++++------- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index dd2fa488..ce446d39 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,12 +5,12 @@ "exports": { "browser": "./dist/esm/index.js", "import": { - "default": "./dist/esm/index.js", - "types": "./dist/esm/index.d.ts" + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" }, "require": { - "default": "./dist/cjs/index.js", - "types": "./dist/cjs/index.d.ts" + "types": "./dist/cjs/index.d.ts", + "default": "./dist/cjs/index.js" } }, "main": "./dist/cjs/index.js", diff --git a/packages/fetch-mock/package.json b/packages/fetch-mock/package.json index bffb1060..e6998de5 100644 --- a/packages/fetch-mock/package.json +++ b/packages/fetch-mock/package.json @@ -5,12 +5,12 @@ "exports": { "browser": "./dist/esm/index.js", "import": { - "default": "./dist/esm/index.js", - "types": "./dist/esm/types/index.d.ts" + "types": "./dist/esm/types/index.d.ts", + "default": "./dist/esm/index.js" }, "require": { - "default": "./dist/cjs/index.js", - "types": "./dist/cjs/types/index.d.ts" + "types": "./dist/cjs/types/index.d.ts", + "default": "./dist/cjs/index.js" } }, "main": "./dist/cjs/index.js", diff --git a/packages/jest/package.json b/packages/jest/package.json index 82f9c2df..a56a5600 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -3,14 +3,19 @@ "description": "jest wrapper for fetch-mock", "version": "0.1.0", "exports": { - "browser": "./src/index.js", - "import": "./src/index.js", - "require": "./dist/commonjs.js", - "types": "./types/index.d.ts" + "browser": "./dist/esm/index.js", + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/cjs/index.d.ts", + "default": "./dist/cjs/index.js" + } }, - "main": "./dist/commonjs.js", - "module": "./src/index.js", - "types": "./types/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", "type": "module", "engines": { "node": ">=18.11.0" diff --git a/packages/vitest/package.json b/packages/vitest/package.json index 278c2c63..d6b37dc0 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -3,14 +3,19 @@ "description": "Vitest wrapper for fetch-mock", "version": "0.1.4", "exports": { - "browser": "./src/index.js", - "import": "./src/index.js", - "require": "./dist/commonjs.js", - "types": "./types/index.d.ts" + "browser": "./dist/esm/index.js", + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/cjs/index.d.ts", + "default": "./dist/cjs/index.js" + } }, - "main": "./dist/commonjs.js", - "module": "./src/index.js", - "types": "./types/index.d.ts", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", "type": "module", "engines": { "node": ">=18.11.0"