From 0dc1c1ab987c671b1a1fca56d33eb88085b63634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Veillard?= Date: Thu, 31 Oct 2024 01:39:44 +0900 Subject: [PATCH] Update package.json (#216) * Update package.json Fixes the issue: ``` There are types at '/home/xxx/node_modules/robot3/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'robot3' library may need to update its package.json or typings. * Update package.json * Create six-terms-shake.md --- .changeset/six-terms-shake.md | 15 +++++++++++++++ packages/core/package.json | 1 + 2 files changed, 16 insertions(+) create mode 100644 .changeset/six-terms-shake.md diff --git a/.changeset/six-terms-shake.md b/.changeset/six-terms-shake.md new file mode 100644 index 00000000..5fedaeba --- /dev/null +++ b/.changeset/six-terms-shake.md @@ -0,0 +1,15 @@ +--- +"robot3": patch +--- + +### WHAT: + +Explicitly routing the right place for the index.d.ts file + +### WHY: + +Types fail to load in some scenarios. F.i PNPM throws the error: "There are types at '/xxxx/node_modules/robot3/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'robot3' library may need to update its package.json or typings." + +### HOW: + +Added types path for exports in package.json diff --git a/packages/core/package.json b/packages/core/package.json index 783f3099..c2625a95 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -7,6 +7,7 @@ "exports": { ".": { "require": "./dist/machine.js", + "types": "./index.d.ts", "import": "./machine.js", "default": "./machine.js", "types": "./index.d.ts"