Skip to content

Commit

Permalink
Drop support for Node.js v12 & add support for Node.js v18 (#342)
Browse files Browse the repository at this point in the history
* Drop support for Node.js v12 & add support for Node.js v18

* Minor dependencies updates & update lint-staged to v13

* Replace depreacted 'rmdirSync' & use top-level-await in sleep fixture

* Downgrade @types/node to lowest supported Node.js version (14)

* Update package-lock.json

* Clean-up tsconfig

- allowJs / noImplicitAny are default values
- Align with https://github.com/tsconfig/bases/blob/main/bases/node14.json

* Simplify "engines" definition

* Test against Node.js v19 (current)

* Update lint-staged
  • Loading branch information
paescuj committed Nov 26, 2022
1 parent 2c98a91 commit 8e7af9d
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 89 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
fail-fast: false
matrix:
node:
- 12
- 14
- 16
- 17
- 18
- 19
os:
- name: Ubuntu
version: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion bin/concurrently.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ beforeAll(async () => {
afterAll(() => {
// Remove the temporary directory where 'concurrently' was stored
if (tmpDir) {
fs.rmdirSync(tmpDir, { recursive: true });
fs.rmSync(tmpDir, { recursive: true });
}
});

Expand Down
12 changes: 4 additions & 8 deletions bin/fixtures/sleep.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@

/* eslint-disable no-console */

async function run(s) {
await new Promise((resolve) => setTimeout(resolve, s * 1000));
}

const s = process.argv[2];
if (!s || isNaN(s) || process.argv.length > 3) {
const seconds = process.argv[2];
if (!seconds || isNaN(seconds) || process.argv.length > 3) {
// Mimic behavior from native 'sleep' command
console.error(`usage: sleep seconds`);
console.error('usage: sleep seconds');
process.exit(1);
}
run(s);
await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
Loading

0 comments on commit 8e7af9d

Please sign in to comment.