From 11d39f62b1d1fddbbd2734458f626ae8d11a8c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Thu, 24 Sep 2020 23:12:43 +0200 Subject: [PATCH 1/2] refactor(types): use `typesVersions` over `types` By using `typesVersions` instead of `types` pointing to a single `index` declaration file, we enable consumers of `react-query` to also import directly from nested files. --- package.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 74fcafdaac..4151ff1028 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,14 @@ }, "main": "lib/index.js", "unpkg": "dist/react-query.development.js", - "types": "types/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "types/*", + "types/*/index" + ] + } + }, "module": "es/index.js", "scripts": { "test": "is-ci \"test:ci\" \"test:dev\"", From 5654c82047c18f20ea594e37032726a77c3a6bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Fri, 25 Sep 2020 13:36:21 +0200 Subject: [PATCH 2/2] fix(types): restore standard pathless index export --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4151ff1028..4324fd3ea8 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,12 @@ }, "main": "lib/index.js", "unpkg": "dist/react-query.development.js", + "types": "types/index.d.ts", "typesVersions": { "*": { - "*": [ + "es/*": [ "types/*", - "types/*/index" + "types/*/index.d.ts" ] } },