Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Types that are found, but not exported in package.jsonΒ #33

@adxmcollins

Description

@adxmcollins

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Because of some changes with TypeScript (moduleResolution = bundler), the types are not working with newer versions of TypeScript. The following change needs to be made to make sure the types are exported in a way which works with bundler.

More details can be found here: microsoft/TypeScript#52363

It's only a small change to fix it. Here is the diff that solved the problem:

diff --git a/node_modules/lemonsqueezy.ts/package.json b/node_modules/lemonsqueezy.ts/package.json
index e5a0751..bc84638 100644
--- a/node_modules/lemonsqueezy.ts/package.json
+++ b/node_modules/lemonsqueezy.ts/package.json
@@ -32,7 +32,10 @@
   },
   "exports": {
     ".": {
-      "import": "./dist/index.mjs",
+      "import": {
+        "types": "./dist/index.d.ts",
+        "default": "./dist/index.mjs"
+      },
       "require": "./dist/index.js"
     },
     "./checkout": {

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions