Skip to content

Commit fe4f452

Browse files
committed
method for disabling list check; tag 0.0.24
1 parent ee461f2 commit fe4f452

File tree

6 files changed

+42
-22
lines changed

6 files changed

+42
-22
lines changed

.github/workflows/npm-publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
publish-npm:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212

13-
- uses: actions/setup-node@v3
13+
- uses: actions/setup-node@v4
1414
with:
15-
node-version: 18
15+
node-version: 20
1616
registry-url: https://registry.npmjs.org/
1717
cache: yarn
1818

.github/workflows/upload.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
upload-assets:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

1515
- name: Use Node.js
16-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
1717
with:
18-
node-version: 18
18+
node-version: 20
1919
cache: yarn
2020

2121
- run: yarn && yarn tsc

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "@calcit/ternary-tree",
3-
"version": "0.0.23",
3+
"version": "0.0.24",
44
"main": "./lib/index.mjs",
55
"scripts": {},
66
"devDependencies": {
7-
"@types/node": "^20.4.8",
8-
"prettier": "^3.0.0",
9-
"typescript": "^5.1.6"
7+
"@types/node": "^20.12.5",
8+
"prettier": "^3.2.5",
9+
"typescript": "^5.4.4"
1010
}
1111
}

src/list.mts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,17 @@ export function listEqual<T>(xs: TernaryTreeList<T>, ys: TernaryTreeList<T>): bo
942942
return true;
943943
}
944944

945+
var skipListStructureCheck = false;
946+
947+
/** in some cases we disable for performance */
948+
export let disableListStructureCheck = () => {
949+
skipListStructureCheck = true;
950+
};
951+
945952
export function checkListStructure<T>(tree: TernaryTreeList<T>): boolean {
953+
if (skipListStructureCheck) {
954+
return true;
955+
}
946956
if (tree == null || listLen(tree) === 0) {
947957
return true;
948958
} else {

src/main.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import { runListTests } from "./test-list.mjs";
55
import { runMapTests } from "./test-map.mjs";
66
import { mergeValueHash, overwriteHashGenerator, valueHash } from "./types.mjs";
77

8+
// import { disableListStructureCheck } from "./list.mjs";
9+
// disableListStructureCheck();
10+
811
overwriteComparator((x, y) => {
912
// console.log("comparing", x, y);
1013
return deepEqual(x, y);

yarn.lock

Lines changed: 19 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)