Skip to content

Commit

Permalink
adding in nodejs engine requirement (#999)
Browse files Browse the repository at this point in the history
* adding in nodejs engine requirement

* lint fixes
  • Loading branch information
jaredwray authored Jan 30, 2025
1 parent d81e192 commit 707a2f6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/cacheable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"import": "./dist/index.js"
}
},
"engines": {
"node": ">=20"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jaredwray/cacheable.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/cacheable/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('cacheable options and properties', async () => {
describe('cacheable stats', async () => {
test('should return stats', async () => {
const cacheable = new Cacheable();
const stats = cacheable.stats;
const {stats} = cacheable;
expect(stats.enabled).toBe(false);
});
test('should be able to enable stats', async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/cacheable/test/memory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('CacheableMemory Options and Properties', () => {
cache.set('key2', 'value');
cache.set('key3', 'value');
cache.set('key4', 'value');
const keys = Array.from(cache.keys);
const keys = [...cache.keys];
expect(keys).toContain('key');
expect(keys).toContain('key1');
expect(keys).toContain('key2');
Expand All @@ -60,7 +60,7 @@ describe('CacheableMemory Options and Properties', () => {
cache.set('key2', 'value2');
cache.set('key3', 'value3');
cache.set('key4', 'value4');
const values = Array.from(cache.items);
const values = [...cache.items];
expect(values[0].value).toBe('value3');
expect(values[1].value).toBe('value4');
expect(values[2].value).toBe('value1');
Expand Down
2 changes: 1 addition & 1 deletion packages/cacheable/test/wrap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describe('wrap functions handling thrown errors', () => {

expect(result).toBe(undefined);
expect(errorCallCount).toBe(1);
const values = Array.from(cache.items);
const values = [...cache.items];
expect(values.length).toBe(0);
});

Expand Down

0 comments on commit 707a2f6

Please sign in to comment.