Skip to content

Commit baee606

Browse files
committed
feat: support Node 14.x
1 parent 336886a commit baee606

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
strategy:
3737
matrix:
38-
nodejs: [16, 18, 20, 22]
38+
nodejs: [14, 16, 18, 20, 22]
3939
steps:
4040
- uses: actions/checkout@v4
4141
- uses: actions/setup-node@v4

deno.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"test": "uvu"
4242
},
4343
"engines": {
44-
"node": ">=16"
44+
"node": ">=14"
4545
},
4646
"devDependencies": {
4747
"uvu": "0.5"

src/package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function cache(
3535
name: string,
3636
options?: find.Options & { create?: boolean },
3737
): string | undefined {
38-
options ||= {};
38+
options = options || {};
3939

4040
let dir = env.CACHE_DIR;
4141

src/walk.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('walk.up', (it) => {
4242
assert.is(parents[3], resolve('fixtures'));
4343
assert.is(parents[4], resolve('.'));
4444
// total chain length unknown
45-
assert.is(parents.at(-1), resolve('/'));
45+
assert.is(parents[parents.length - 1], resolve('/'));
4646
});
4747

4848
it('should resolve from `options.cwd` if input not absolute', () => {
@@ -66,7 +66,7 @@ describe('walk.up', (it) => {
6666
stop: fixtures,
6767
});
6868

69-
assert.is(output.at(-1), join(fixtures, 'a'));
69+
assert.is(output[output.length - 1], join(fixtures, 'a'));
7070
});
7171

7272
it('should return nothing if stop === start', () => {
@@ -85,7 +85,7 @@ describe('walk.up', (it) => {
8585
assert.is(output[0], resolve('fixtures/a/b/c'));
8686
assert.is(output[1], resolve('fixtures/a/b'));
8787
assert.is(output[2], resolve('fixtures/a'));
88-
assert.is(output.at(-1), resolve('/'));
88+
assert.is(output[output.length - 1], resolve('/'));
8989

9090
assert.equal(output, parents);
9191
});

0 commit comments

Comments
 (0)