Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout/install
uses: adamhamlin/checkout-node-project@v1
uses: adamhamlin/checkout-node-project@v2

- name: Run Tests
run: npm run test:ci
6,111 changes: 3,983 additions & 2,128 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
},
"devDependencies": {
"@adamhamlin/eslint-config": "^1.4.1",
"@tsconfig/recommended": "^1.0.7",
"@types/jest": "^29.5.12",
"@tsconfig/recommended": "^1.0.13",
"@types/jest": "^30.0.0",
"@types/object-hash": "^3.0.6",
"husky": "^9.1.5",
"jest": "^29.7.0",
"lint-staged": "^15.2.10",
"ts-jest": "^29.2.5",
"husky": "^9.1.7",
"jest": "^30.4.2",
"lint-staged": "^17.0.8",
"ts-jest": "^29.4.11",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
"typescript": "^6.0.3"
}
}
2 changes: 1 addition & 1 deletion src/__tests__/normalizer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import hash from 'object-hash';

import { Normalizer } from '../normalizer';

jest.mock('object-hash', () => {
jest.mock<typeof import('object-hash')>('object-hash', () => {
const origModule = jest.requireActual('object-hash');
return {
__esModule: true,
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('options.ts', () => {
const opts = {
caseInsensitive: true,
// eslint-disable-next-line jest/no-conditional-in-test
replacer: (val: unknown) => (typeof val === 'string' ? val.trimEnd() : val),
replacer: (val: unknown) => (typeof val === 'string' ? val.trim() : val),
};
expect(areEqual([{ word: 'blah' }, { WORD: 'Blah ' }], opts)).toBe(true);
});
Expand Down
8 changes: 4 additions & 4 deletions src/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class DeepMap<K, V, TxK = K, TxV = V> extends Map<K, V> implements Compar
* @yields the next key-value pair in the map
* @inheritdoc
*/
override *[Symbol.iterator](): IterableIterator<[K, V]> {
override *[Symbol.iterator](): MapIterator<[K, V]> {
for (const [_hashStr, pair] of this.map[Symbol.iterator]()) {
yield [pair.key, pair.val];
}
Expand All @@ -101,7 +101,7 @@ export class DeepMap<K, V, TxK = K, TxV = V> extends Map<K, V> implements Compar
* @yields the next key-value pair in the map
* @inheritdoc
*/
override *entries(): IterableIterator<[K, V]> {
override *entries(): MapIterator<[K, V]> {
for (const entry of this[Symbol.iterator]()) {
yield entry;
}
Expand All @@ -110,7 +110,7 @@ export class DeepMap<K, V, TxK = K, TxV = V> extends Map<K, V> implements Compar
/**
* @inheritdoc
*/
override *keys(): IterableIterator<K> {
override *keys(): MapIterator<K> {
for (const [key, _val] of this[Symbol.iterator]()) {
yield key;
}
Expand All @@ -119,7 +119,7 @@ export class DeepMap<K, V, TxK = K, TxV = V> extends Map<K, V> implements Compar
/**
* @inheritdoc
*/
override *values(): IterableIterator<V> {
override *values(): MapIterator<V> {
for (const [_key, val] of this[Symbol.iterator]()) {
yield val;
}
Expand Down
8 changes: 4 additions & 4 deletions src/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class DeepSet<V, TxV = V> extends Set<V> implements Comparable<DeepSet<V,
/**
* @inheritdoc
*/
override *[Symbol.iterator](): IterableIterator<V> {
override *[Symbol.iterator](): SetIterator<V> {
for (const [key, _val] of this.map[Symbol.iterator]()) {
yield key;
}
Expand All @@ -80,7 +80,7 @@ export class DeepSet<V, TxV = V> extends Set<V> implements Comparable<DeepSet<V,
/**
* @inheritdoc
*/
override *entries(): IterableIterator<[V, V]> {
override *entries(): SetIterator<[V, V]> {
for (const val of this[Symbol.iterator]()) {
yield [val, val];
}
Expand All @@ -89,7 +89,7 @@ export class DeepSet<V, TxV = V> extends Set<V> implements Comparable<DeepSet<V,
/**
* @inheritdoc
*/
override *keys(): IterableIterator<V> {
override *keys(): SetIterator<V> {
for (const val of this[Symbol.iterator]()) {
yield val;
}
Expand All @@ -98,7 +98,7 @@ export class DeepSet<V, TxV = V> extends Set<V> implements Comparable<DeepSet<V,
/**
* @inheritdoc
*/
override *values(): IterableIterator<V> {
override *values(): SetIterator<V> {
yield* this.keys();
}

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "@tsconfig/recommended/tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
"declaration": true
"declaration": true,
"types": ["jest"]
},
"exclude": ["node_modules", "dist/**/*"]
}