Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
feat: remove Node 8 support (#478)
Browse files Browse the repository at this point in the history
* feat: remove Node 8 support

* chore: fix linting error

* chore: update minimum Node version
  • Loading branch information
eduardoboucas authored May 26, 2021
1 parent 67cb622 commit aca350a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 37 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [10.3.0, '*']
node-version: [10.18.0, '*']
exclude:
- os: macOS-latest
node-version: 10.3.0
node-version: 10.18.0
- os: windows-latest
node-version: 10.3.0
node-version: 10.18.0
fail-fast: false
steps:
- name: Git checkout
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"tmp-promise": "^3.0.2"
},
"engines": {
"node": ">=8.3.0"
"node": ">=10.18.0"
},
"ava": {
"files": [
Expand Down
29 changes: 3 additions & 26 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,10 @@
dependencyDashboard: true,
automerge: false,
packageRules: [
{
// Those cannot be upgraded to a major version until we drop support for Node 8
packageNames: [
'archiver',
'ava',
'cp-file',
'del',
'eslint',
'execa',
'find-up',
'get-stream',
'locate-path',
'p-map',
'pkg-dir',
'prettier',
'precinct',
'semver',
'yargs',
],
major: {
enabled: false
}
},
{
// Fake dependencies used in tests
packageNames: ['test'],
enabled: false
}
]
enabled: false,
},
],
}
6 changes: 1 addition & 5 deletions src/archive.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
const { createWriteStream } = require('fs')
const { promisify } = require('util')

const archiver = require('archiver')
const endOfStream = require('end-of-stream')

const pEndOfStream = promisify(endOfStream)

// Start zipping files
const startZip = function (destPath) {
// `archiver` is not compatible with Node 8, so we lazy-load it and defer its
// execution to when absolutely needed. This way, functions that don't create
// an archive can still work in Node 8.
// eslint-disable-next-line node/global-require
const archiver = require('archiver')
const output = createWriteStream(destPath)
const archive = archiver('zip', { level: ZIP_LEVEL })
archive.pipe(output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const noop = () => {}
module.exports.handler = () => {
try {
noop()
// eslint-disable-next-line node/no-unsupported-features/es-syntax
} catch {
// ¯\_(ツ)_/¯
}
Expand Down

1 comment on commit aca350a

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱ Benchmark results

  • largeDepsEsbuild: 12s
  • largeDepsZisi: 1m 7.7s

Please sign in to comment.