From ac57f3bcf5e0641a82cb0121be7c7dd25c5d7abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Bostro=CC=88m?= Date: Tue, 1 Oct 2024 22:54:48 +0300 Subject: [PATCH] fix(build): flatten published package structure --- .github/workflows/node-ci.yml | 2 +- package.json | 24 ++++++++---------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index bf32f4c..b63b945 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -63,7 +63,7 @@ jobs: - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies run: npm audit signatures - name: Build - run: npm run build + run: npm run package - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index ceacd92..108bb13 100644 --- a/package.json +++ b/package.json @@ -17,31 +17,23 @@ "twitter" ], "license": "ISC", - "types": "dist/index.d.ts", - "files": [ - "dist" - ], + "type": "commonjs", + "main": "index.js", "exports": { - ".": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "./extensions/fileWriter": { - "types": "./dist/extensions/fileWriter.d.ts", - "default": "./dist/extensions/fileWriter.js" - }, - "./extensions/bubbleTail": { - "types": "./dist/extensions/bubbleTail.d.ts", - "default": "./dist/extensions/bubbleTail.js" - } + "./extensions/fileWriter": "./extensions/fileWriter.js", + "./extensions/bubbleTail": "./extensions/bubbleTail.js" }, "scripts": { "prepare": "husky", "clean": "rimraf dist", "build": "npm run clean && tsc --build", + "package": "npm run build && cp package.json README.md LICENSE dist/", "test": "jest", "semantic-release": "semantic-release" }, + "release": { + "pkgRoot": "dist" + }, "devDependencies": { "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0",