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

feat: remove Node 8 support #478

Merged
merged 4 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: [
Copy link
Member Author

Choose a reason for hiding this comment

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

There's a possibility that some of these packages will also have problems in Node 10, but I think we can wait for Renovate to create the PRs and we evaluate them one-by-one. Unless anyone thinks otherwise?

Copy link
Contributor

Choose a reason for hiding this comment

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

Absolutely 👍

Many packages from Sindre Sorhus have dropped support for Node 10 recently, but we could check one by one.

Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

'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