From eeffa0cf6125bd46464c8986ca823a0920907bf3 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sun, 5 May 2024 09:50:52 +0200 Subject: [PATCH] Run Publint to check for package issues --- .github/workflows/test.yml | 17 +++++++++++++++++ package.json | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 548aea2..631ef98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,3 +40,20 @@ jobs: cache: "npm" - run: npm install --ignore-scripts --no-audit - run: npm test + + lint-package: + name: Lint package + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm install --ignore-scripts --no-audit + - name: Build package + run: npm run build + - name: Lint package + run: npx --yes publint diff --git a/package.json b/package.json index 4247add..d8dc06f 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "module": "./dist/analyzer.module.js", "unpkg": "./dist/analyzer.umd.js", "exports": { + "types": "./dist/index.d.ts", "require": "./dist/analyzer.cjs", - "default": "./dist/analyzer.modern.js", - "types": "./dist/index.d.ts" + "default": "./dist/analyzer.modern.js" }, "types": "./dist/index.d.ts", "engines": {