From 005618cd4f6dace1b52d843fdfb07673ed49cf51 Mon Sep 17 00:00:00 2001 From: dominikg Date: Sat, 30 Sep 2023 11:15:46 +0200 Subject: [PATCH] fix(types): use import condition for types to avoid masquerading as cjs --- .changeset/pink-points-hide.md | 5 +++++ .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 4 ++-- packages/tsconfck/package.json | 8 +++++--- 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .changeset/pink-points-hide.md diff --git a/.changeset/pink-points-hide.md b/.changeset/pink-points-hide.md new file mode 100644 index 0000000..91e2af3 --- /dev/null +++ b/.changeset/pink-points-hide.md @@ -0,0 +1,5 @@ +--- +'tsconfck': patch +--- + +fix(types): use import condition for types to avoid masquerading as cjs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index afe455b..166b7cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: os: [ubuntu-latest] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22b7376..2dfb2db 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: node: [18] os: [ubuntu-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} @@ -65,7 +65,7 @@ jobs: - node: 20 os: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} diff --git a/packages/tsconfck/package.json b/packages/tsconfck/package.json index 8547510..563aef8 100644 --- a/packages/tsconfck/package.json +++ b/packages/tsconfck/package.json @@ -17,8 +17,10 @@ "types": "types/index.d.ts", "exports": { ".": { - "types": "./types/index.d.ts", - "import": "./src/index.js" + "import": { + "types": "./types/index.d.ts", + "default": "./src/index.js" + } } }, "repository": { @@ -59,6 +61,6 @@ "test": "vitest run", "test:coverage": "vitest run --coverage", "test:watch": "vitest", - "dts-buddy": "dts-buddy" + "dts-buddy": "dts-buddy -m \"tsconfck:src/index.js\"" } }