From 7502e95369692978e51f8330ed6215a455549dbb Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Tue, 16 Aug 2022 18:53:21 +0200 Subject: [PATCH] Require Node.js 14 --- .github/workflows/main.yml | 5 +++-- package.json | 22 ++++++++++------------ test/is-present.ts | 1 + 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 441975c..6a82b18 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,10 +10,11 @@ jobs: fail-fast: false matrix: node-version: + - 18 - 16 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - run: npm install diff --git a/package.json b/package.json index 5dd7534..39b1706 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "exports": "./distribution/index.js", "types": "./distribution/index.d.ts", "engines": { - "node": ">=12.20" + "node": ">=14.16" }, "scripts": { "build": "del-cli distribution && tsc", @@ -39,32 +39,30 @@ "helpers" ], "dependencies": { - "type-fest": "^2.11.1" + "type-fest": "^2.18.0" }, "devDependencies": { - "@sindresorhus/tsconfig": "^2.0.0", - "ava": "^3.15.0", - "del-cli": "^4.0.1", + "@sindresorhus/tsconfig": "^3.0.1", + "ava": "^4.3.1", + "del-cli": "^5.0.0", "expect-type": "^0.13.0", - "ts-node": "^10.4.0", - "typescript": "^4.5.5", - "xo": "^0.47.0" + "ts-node": "^10.9.1", + "typescript": "^4.7.4", + "xo": "^0.51.0" }, "sideEffects": false, "ava": { "extensions": { "ts": "module" }, - "nonSemVerExperiments": { - "configurableModuleFormat": true - }, "nodeArguments": [ "--loader=ts-node/esm" ] }, "xo": { "rules": { - "@typescript-eslint/ban-ts-comment": "off" + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/naming-convention": "off" } } } diff --git a/test/is-present.ts b/test/is-present.ts index a8c8755..f314d9f 100644 --- a/test/is-present.ts +++ b/test/is-present.ts @@ -11,6 +11,7 @@ test('isPresent()', t => { const fixture = [1, null].filter(x => isPresent(x)); expectTypeOf(fixture).not.toBeNullable(); + // eslint-disable-next-line @typescript-eslint/ban-types const nullable: null | undefined = null; if (isPresent(nullable)) {