Skip to content

Commit 707a2f6

Browse files
authored
adding in nodejs engine requirement (#999)
* adding in nodejs engine requirement * lint fixes
1 parent d81e192 commit 707a2f6

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

packages/cacheable/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"import": "./dist/index.js"
1313
}
1414
},
15+
"engines": {
16+
"node": ">=20"
17+
},
1518
"repository": {
1619
"type": "git",
1720
"url": "git+https://github.com/jaredwray/cacheable.git",

packages/cacheable/test/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('cacheable options and properties', async () => {
100100
describe('cacheable stats', async () => {
101101
test('should return stats', async () => {
102102
const cacheable = new Cacheable();
103-
const stats = cacheable.stats;
103+
const {stats} = cacheable;
104104
expect(stats.enabled).toBe(false);
105105
});
106106
test('should be able to enable stats', async () => {

packages/cacheable/test/memory.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('CacheableMemory Options and Properties', () => {
4646
cache.set('key2', 'value');
4747
cache.set('key3', 'value');
4848
cache.set('key4', 'value');
49-
const keys = Array.from(cache.keys);
49+
const keys = [...cache.keys];
5050
expect(keys).toContain('key');
5151
expect(keys).toContain('key1');
5252
expect(keys).toContain('key2');
@@ -60,7 +60,7 @@ describe('CacheableMemory Options and Properties', () => {
6060
cache.set('key2', 'value2');
6161
cache.set('key3', 'value3');
6262
cache.set('key4', 'value4');
63-
const values = Array.from(cache.items);
63+
const values = [...cache.items];
6464
expect(values[0].value).toBe('value3');
6565
expect(values[1].value).toBe('value4');
6666
expect(values[2].value).toBe('value1');

packages/cacheable/test/wrap.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ describe('wrap functions handling thrown errors', () => {
222222

223223
expect(result).toBe(undefined);
224224
expect(errorCallCount).toBe(1);
225-
const values = Array.from(cache.items);
225+
const values = [...cache.items];
226226
expect(values.length).toBe(0);
227227
});
228228

0 commit comments

Comments
 (0)