diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76074a1..f54af9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,19 +10,32 @@ on: branches: [master] jobs: - build: + unit: + name: Unit tests runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18] - steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} cache: "npm" - - run: npm ci + - run: npm install --no-audit --no-fund --ignore-scripts - run: npm test + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + cache: "npm" + - run: npm install --no-audit --no-fund --ignore-scripts + - name: Check types + run: npm run check --if-present + - name: Lint JS + run: npx --yes oxlint@latest -D perf + - name: Build package + run: npm run build + - name: "Publint" + run: "npx --yes publint" diff --git a/package.json b/package.json index 1c85929..46e052a 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "type": "module", "source": "color-sorter.js", "exports": { + "types": "./dist/color-sorter.d.ts", "require": "./dist/color-sorter.cjs", - "default": "./dist/color-sorter.modern.js", - "types": "./dist/color-sorter.d.ts" + "default": "./dist/color-sorter.modern.js" }, "types": "./dist/color-sorter.d.ts", "main": "./dist/color-sorter.cjs",