diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 2bf495b..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - test: - name: Run tests - strategy: - matrix: - node-version: - - '0.12' - - '4.x' - - '6.x' - - '8.x' - - '10.x' - - '12.x' - - '14.x' - - '15.x' - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Install Node.js ${{matrix.node-version}} - uses: actions/setup-node@v2 - with: - node-version: ${{matrix.node-version}} - - name: Install dependencies - run: npm install - - name: Run tests - run: npm test - - lint: - name: Standard Style - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Install Node.js - uses: actions/setup-node@v2 - with: - node-version: 14.x - - name: Install dependencies - run: npm install - - name: Check style - run: npm run lint diff --git a/.github/workflows/node-aught.yml b/.github/workflows/node-aught.yml new file mode 100644 index 0000000..c49d417 --- /dev/null +++ b/.github/workflows/node-aught.yml @@ -0,0 +1,18 @@ +name: 'Tests: node.js < 10' + +on: [pull_request, push] + +jobs: + tests: + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '< 10' + type: minors + command: npm run tests-only + + node: + name: 'node < 10' + needs: [tests] + runs-on: ubuntu-latest + steps: + - run: true diff --git a/.github/workflows/node-pretest.yml b/.github/workflows/node-pretest.yml new file mode 100644 index 0000000..765edf7 --- /dev/null +++ b/.github/workflows/node-pretest.yml @@ -0,0 +1,7 @@ +name: 'Tests: pretest/posttest' + +on: [pull_request, push] + +jobs: + tests: + uses: ljharb/actions/.github/workflows/pretest.yml@main diff --git a/.github/workflows/node-tens.yml b/.github/workflows/node-tens.yml new file mode 100644 index 0000000..6b71d59 --- /dev/null +++ b/.github/workflows/node-tens.yml @@ -0,0 +1,21 @@ +name: 'Tests: node.js 10 - 20' + +on: [pull_request, push] + +permissions: + contents: read + +jobs: + tests: + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '>= 10 < 20' + type: minors + command: npm run tests-only + + node: + name: 'node 10 - 20' + needs: [tests] + runs-on: ubuntu-latest + steps: + - run: true diff --git a/.github/workflows/node-twenties.yml b/.github/workflows/node-twenties.yml new file mode 100644 index 0000000..66c9382 --- /dev/null +++ b/.github/workflows/node-twenties.yml @@ -0,0 +1,21 @@ +name: 'Tests: node.js >= 20' + +on: [pull_request, push] + +permissions: + contents: read + +jobs: + tests: + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '>= 20' + type: minors + command: npm run tests-only + + node: + name: 'node >= 20' + needs: [tests] + runs-on: ubuntu-latest + steps: + - run: true diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml new file mode 100644 index 0000000..b9e1712 --- /dev/null +++ b/.github/workflows/rebase.yml @@ -0,0 +1,9 @@ +name: Automatic Rebase + +on: [pull_request_target] + +jobs: + _: + uses: ljharb/actions/.github/workflows/rebase.yml@main + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/require-allow-edits.yml b/.github/workflows/require-allow-edits.yml new file mode 100644 index 0000000..7b842f8 --- /dev/null +++ b/.github/workflows/require-allow-edits.yml @@ -0,0 +1,12 @@ +name: Require “Allow Edits” + +on: [pull_request_target] + +jobs: + _: + name: "Require “Allow Edits”" + + runs-on: ubuntu-latest + + steps: + - uses: ljharb/require-allow-edits@main diff --git a/package.json b/package.json index 8c39f3d..58f75ae 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ "standard": "^13.1.0", "tape": "^4.13.3" }, + "engines": { + "node": ">= 0.8" + }, "homepage": "https://github.com/browserify/acorn-node", "keywords": [ "acorn", @@ -36,8 +39,11 @@ }, "scripts": { "lint": "standard", - "test": "node test", - "prepare": "npm run build && node test", + "pretest": "npm run lint", + "tests-only": "node test", + "test": "npm run tests-only", + "posttest": "npx npm@\">= 10.2\" audit --production", + "prepare": "npm run build", "build:self": "babel src --out-dir .", "build": "npm-run-all --parallel build:*" },