diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffa194d014c12..0e9edb5f5ef31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [10.x, 12.x, 14.x, 16.x] + node-version: [12.x, 14.x, 16.x] platform: - os: ubuntu-latest shell: bash @@ -100,7 +100,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [10.x, 12.x, 14.x, 16.x] + node-version: [12.x, 14.x, 16.x] platform: - os: ubuntu-latest shell: bash @@ -141,7 +141,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: ['10.1', 10.x, '12.1', 12.x, '14.1', 14.x, '16.1', 16.x] + node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.1', 16.x] platform: - os: ubuntu-latest shell: bash diff --git a/lib/npm.js b/lib/npm.js index 966d11210c275..15a7a4859731e 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -358,3 +358,5 @@ const npm = module.exports = new class extends EventEmitter { if (require.main === module) require('./cli.js')(process) +else + throw new Error('The programmatic API was removed in npm v8.0.0') diff --git a/package.json b/package.json index 8011f238ac2ff..b76dff0cc9079 100644 --- a/package.json +++ b/package.json @@ -235,6 +235,6 @@ }, "license": "Artistic-2.0", "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" } } diff --git a/test/lib/utils/unsupported.js b/test/lib/utils/unsupported.js index 3a05d90666025..4d806cefc4e52 100644 --- a/test/lib/utils/unsupported.js +++ b/test/lib/utils/unsupported.js @@ -27,10 +27,15 @@ const versions = [ ['v7.2.3', false, true], ['v8.4.0', false, true], ['v9.3.0', false, true], - ['v10.0.0-0', false, false], - ['v11.0.0-0', false, false], - ['v12.0.0-0', false, false], - ['v13.0.0-0', false, false], + ['v10.0.0-0', false, true], + ['v11.0.0-0', false, true], + ['v12.0.0-0', false, true], + ['v12.13.0-0', false, false], + ['v13.0.0-0', false, true], + ['v14.0.0-0', false, true], + ['v14.15.0-0', false, false], + ['v15.0.0-0', false, true], + ['v16.0.0-0', false, false], ] t.test('versions', function (t) {