Skip to content

Commit 0b3e85a

Browse files
authored
Drop ix lib. Node 22 has native iterator helper methods. (#3426)
1 parent f77c9f5 commit 0b3e85a

File tree

4 files changed

+19
-50
lines changed

4 files changed

+19
-50
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
"indent-string": "^5.0.0",
8585
"ioredis": "^5.3.2",
8686
"iso-3166-1": "^2.1.1",
87-
"ix": "^5.0.0",
8887
"jsonwebtoken": "^9.0.2",
8988
"lazy-get-decorator": "^2.2.1",
9089
"lodash": "npm:lodash-es@^4.17.21",

src/common/xlsx.util.ts

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { mapEntries, nonEnumerable } from '@seedcompany/common';
2-
import { Iterable } from 'ix';
32
import { LazyGetter as Once } from 'lazy-get-decorator';
43
import { assert } from 'ts-essentials';
54
import {
@@ -274,38 +273,30 @@ abstract class Rangable<TSheet extends Sheet = Sheet> {
274273
* Iterate through the rows in this range.
275274
* Cell column is always the starting column.
276275
*/
277-
walkDown(): Iterable<Cell<TSheet>> {
278-
return Iterable.from(
279-
function* (this: Rangable<TSheet>) {
280-
let current = this.start.row;
281-
while (current <= this.end.row) {
282-
const cell = current.cell(this.start.column);
283-
if (cell.exists) {
284-
yield cell;
285-
}
286-
current = current.move(1);
287-
}
288-
}.call(this),
289-
);
276+
*walkDown() {
277+
let current = this.start.row;
278+
while (current <= this.end.row) {
279+
const cell = current.cell(this.start.column);
280+
if (cell.exists) {
281+
yield cell;
282+
}
283+
current = current.move(1);
284+
}
290285
}
291286

292287
/**
293288
* Iterate through the columns in this range.
294289
* Cell row is always the starting row.
295290
*/
296-
walkRight(): Iterable<Cell<TSheet>> {
297-
return Iterable.from(
298-
function* (this: Rangable<TSheet>) {
299-
let current = this.start.column;
300-
while (current <= this.end.column) {
301-
const cell = current.cell(this.start.row);
302-
if (cell.exists) {
303-
yield cell;
304-
}
305-
current = current.move(1);
306-
}
307-
}.call(this),
308-
);
291+
*walkRight() {
292+
let current = this.start.column;
293+
while (current <= this.end.column) {
294+
const cell = current.cell(this.start.row);
295+
if (cell.exists) {
296+
yield cell;
297+
}
298+
current = current.move(1);
299+
}
309300
}
310301

311302
get ref() {

src/components/pnp/findStepColumns.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import { ProductStep as Step } from '../product/dto';
66
import { type PnpExtractionResult, PnpProblemType } from './extraction-result';
77
import { type PlanningSheet } from './planning-sheet';
88
import { type ProgressSheet } from './progress-sheet';
9-
import 'ix/add/iterable-operators/filter.js';
10-
import 'ix/add/iterable-operators/map.js';
11-
import 'ix/add/iterable-operators/toarray.js';
129

1310
/**
1411
* Fuzzy match available steps to their column address.

yarn.lock

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4154,13 +4154,6 @@ __metadata:
41544154
languageName: node
41554155
linkType: hard
41564156

4157-
"@types/node@npm:^13.7.4":
4158-
version: 13.13.52
4159-
resolution: "@types/node@npm:13.13.52"
4160-
checksum: 10c0/9224aaea219fe7f8b903039bb146d4c38b391d0166a8226a1efa2d43a35b5b7dddfe021c32941bb454a1543da94921c112687934da88e2a019f4bd44f9d517b5
4161-
languageName: node
4162-
linkType: hard
4163-
41644157
"@types/normalize-package-data@npm:^2.4.3":
41654158
version: 2.4.4
41664159
resolution: "@types/normalize-package-data@npm:2.4.4"
@@ -5901,7 +5894,6 @@ __metadata:
59015894
indent-string: "npm:^5.0.0"
59025895
ioredis: "npm:^5.3.2"
59035896
iso-3166-1: "npm:^2.1.1"
5904-
ix: "npm:^5.0.0"
59055897
jest: "npm:^29.7.0"
59065898
jsonwebtoken: "npm:^9.0.2"
59075899
lazy-get-decorator: "npm:^2.2.1"
@@ -9084,16 +9076,6 @@ __metadata:
90849076
languageName: node
90859077
linkType: hard
90869078

9087-
"ix@npm:^5.0.0":
9088-
version: 5.0.0
9089-
resolution: "ix@npm:5.0.0"
9090-
dependencies:
9091-
"@types/node": "npm:^13.7.4"
9092-
tslib: "npm:^2.3.0"
9093-
checksum: 10c0/2b9a1fd724fb9d42e2d0786ab03333148a776fe546cc7f27ed95d49c7d22231cc371bbc9b377a4f29cbaf8ac0cdc5ef80a21821e396cf5462f1d5b8f7a8f8624
9094-
languageName: node
9095-
linkType: hard
9096-
90979079
"jackspeak@npm:^3.1.2":
90989080
version: 3.4.3
90999081
resolution: "jackspeak@npm:3.4.3"
@@ -13632,7 +13614,7 @@ __metadata:
1363213614
languageName: node
1363313615
linkType: hard
1363413616

13635-
"tslib@npm:2.8.1, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.2, tslib@npm:^2.6.3, tslib@npm:^2.8.1":
13617+
"tslib@npm:2.8.1, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.2, tslib@npm:^2.6.3, tslib@npm:^2.8.1":
1363613618
version: 2.8.1
1363713619
resolution: "tslib@npm:2.8.1"
1363813620
checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62

0 commit comments

Comments
 (0)