From 4412cd825b4c0794eb950a26ca279c038851d8aa Mon Sep 17 00:00:00 2001 From: Jiri Spac Date: Wed, 13 Jul 2022 11:57:12 +0200 Subject: [PATCH 1/2] fix vitest incompatibility ATM vitest/vite cannot load graphql correctly. I have reported this to vite here: https://github.com/vitejs/vite/issues/7879 I have tested this change with latest vitests and it seems to work correctly with this change. I will be using patch-package with graphql 16 for now, but it would be nice if this could land. Also why was `private: true` set here? --- package.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5457b6e2ec..848c91d2a8 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,14 @@ "version": "16.5.0", "description": "A Query Language and Runtime which can target any service.", "license": "MIT", - "private": true, - "main": "index", - "module": "index.mjs", + "type": "commonjs", + "main": "index.js", + "exports": { + ".": { + "require": "./index.js", + "import": "./index.mjs" + } + }, "typesVersions": { ">=4.1.0": { "*": [ From 102f122d42728b59b3890f76e06d92f626d0707b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0p=C3=A1c?= Date: Wed, 13 Jul 2022 12:26:22 +0200 Subject: [PATCH 2/2] put private:true back to package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 848c91d2a8..fa9aeb1e62 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "16.5.0", "description": "A Query Language and Runtime which can target any service.", "license": "MIT", + "private": true, "type": "commonjs", "main": "index.js", "exports": {