Repository navigation
Commit ff7a2f8
committed
🚨 Sort through a copy, so the Node typecheck accepts the History proofs (#881)
`tsconfig.node.json` pins `lib` to ES2022 and `toSorted` is ES2023, so the
three `toSorted` calls in the History suite failed `tsc` in every `test-node`
shard before a single test ran — ten identical shard failures, and the `green`
gate with them. `deno check`, `deno task test` and `pnpm lint` all passed,
and oxlint's `no-array-sort` actively recommends `toSorted`, so nothing local
said otherwise.
Sort a copy instead, which keeps what `toSorted` was chosen for: `ordinals`
arrives `readonly`, and nothing observes the order of the array sorted here.
`Object.keys` already returns a fresh array, so that one sorts in place.
The three remaining `no-array-sort` warnings are the lib's cost, and the
comment at the first site says so.1 parent a9905f3 commit ff7a2f8
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| |||
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
426 | | - | |
| 428 | + | |
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
| |||
590 | 592 | | |
591 | 593 | | |
592 | 594 | | |
593 | | - | |
| 595 | + | |
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
| |||
0 commit comments