diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b630201..d819bad 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [12.x, 14.x, 16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -26,3 +26,5 @@ jobs: node-version: ${{ matrix.node-version }} - run: yarn install --frozen-lockfile - run: yarn test + - run: npm install + - run: npm pack diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index b943d60..f6e6d74 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,13 +11,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 + with: + node-version: 16 # We're using npm to publish due to: https://github.com/yarnpkg/yarn/issues/5779 - run: npm install - id: publish - uses: JS-DevTools/npm-publish@v1.4.3 + uses: JS-DevTools/npm-publish@v1 with: token: ${{ secrets.NPM_TOKEN }} dry-run: ${{ github.event.action != 'published' }} diff --git a/package.json b/package.json index 60e2898..5b3bce9 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dist" ], "engines": { - "node": "^10 || ^12 || >=14" + "node": "12.x || 14.x || 16.x" }, "dependencies": { "is-url": "^1.2.4", @@ -29,8 +29,7 @@ "typescript": "^4.5.5" }, "scripts": { - "prepare": "rimraf ./dist", - "prepack": "tsc --outDir dist --declaration --declarationDir dist", + "prepack": "rimraf ./dist && tsc --outDir dist --declaration --declarationDir dist", "pretest": "prettier --check .", "test": "jest --ci", "test:watch": "jest --watch --notify",