Skip to content

Commit c4f835e

Browse files
cmdcolinclaude
andcommitted
update typescript to latest
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent 64ee3a6 commit c4f835e

10 files changed

Lines changed: 805 additions & 669 deletions

eslint.config.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ export default defineConfig(
3535
'@typescript-eslint/consistent-type-imports': 'error',
3636
semi: ['error', 'never'],
3737

38-
'@typescript-eslint/ban-ts-comment': 'off',
39-
'@typescript-eslint/no-explicit-any': 'off',
38+
'@typescript-eslint/ban-ts-comment': [
39+
'error',
40+
{ 'ts-expect-error': 'allow-with-description', 'ts-ignore': true },
41+
],
42+
'@typescript-eslint/no-explicit-any': 'warn',
4043
'@typescript-eslint/no-non-null-assertion': 'off',
4144
'@typescript-eslint/no-unsafe-member-access': 'off',
4245
'@typescript-eslint/no-unsafe-argument': 'off',

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@
4444
"tmp": "^0.2.1"
4545
},
4646
"devDependencies": {
47-
"@eslint/js": "^9.8.0",
47+
"@eslint/js": "^10.0.1",
4848
"@types/command-exists": "^1.2.1",
49-
"@types/node": "^25.0.9",
49+
"@types/node": "^25.5.0",
5050
"@types/split2": "^4.2.0",
5151
"@types/tmp": "^0.2.3",
5252
"eslint": "^9.8.0",
5353
"eslint-plugin-import": "^2.32.0",
54-
"eslint-plugin-unicorn": "^62.0.0",
55-
"prettier": "^3.8.0",
56-
"rimraf": "^6.0.1",
57-
"typescript": "^5.5.4",
58-
"typescript-eslint": "^8.53.0",
59-
"vitest": "^4.0.17"
54+
"eslint-plugin-unicorn": "^63.0.0",
55+
"prettier": "^3.8.1",
56+
"rimraf": "^6.1.3",
57+
"typescript": "^6.0.2",
58+
"typescript-eslint": "^8.57.2",
59+
"vitest": "^4.1.1"
6060
},
6161
"publishConfig": {
6262
"access": "public"

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { makeIx, makeIxStream } from './makeIx.ts'
32
import { makeIxx } from './makeIxx.ts'
43

src/sortLines.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fs from 'fs'
22

3-
43
import tmp from 'tmp'
54

65
import { externalSort } from './externalSort.ts'

test/TrixInputTransformEdgeCases.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ describe('TrixInputTransform edge cases', () => {
4545

4646
test('handles mixed whitespace', async () => {
4747
const result = await transformInput(['id1 \t word1 \t word2'])
48-
const lines = result.trim().split('\n').filter(l => l.length > 0)
48+
const lines = result
49+
.trim()
50+
.split('\n')
51+
.filter(l => l.length > 0)
4952
expect(lines).toHaveLength(2)
5053
})
5154

test/externalSort.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@ describe('externalSort', () => {
6161
})
6262

6363
test('handles lines with spaces', async () => {
64-
const result = await sortLines([
65-
'cherry pie',
66-
'apple tart',
67-
'banana split',
68-
])
64+
const result = await sortLines(['cherry pie', 'apple tart', 'banana split'])
6965
expect(result).toEqual(['apple tart', 'banana split', 'cherry pie'])
7066
})
7167

test/externalSortMerge.test.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,7 @@ describe('externalSort merge behavior', () => {
5454

5555
test('maintains sort stability with equal elements across files', async () => {
5656
// Create data that will be split across multiple files with duplicates
57-
const lines = [
58-
'b',
59-
'a',
60-
'c',
61-
'a',
62-
'b',
63-
'c',
64-
'a',
65-
'b',
66-
'c',
67-
]
57+
const lines = ['b', 'a', 'c', 'a', 'b', 'c', 'a', 'b', 'c']
6858

6959
const input = Readable.from(lines.map(l => l + '\n'))
7060
const output = new StringWritable()

test/makeIx.test.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ async function createIxFromStream(lines: string[]): Promise<string> {
3434

3535
describe('makeIx', () => {
3636
test('creates index from file', async () => {
37-
const result = await createIx([
38-
'id1 apple banana',
39-
'id2 cherry date',
40-
])
37+
const result = await createIx(['id1 apple banana', 'id2 cherry date'])
4138
expect(result).toContain('apple')
4239
expect(result).toContain('banana')
4340
expect(result).toContain('cherry')
@@ -52,21 +49,14 @@ describe('makeIx', () => {
5249
})
5350

5451
test('sorts output alphabetically', async () => {
55-
const result = await createIx([
56-
'id1 zebra',
57-
'id2 apple',
58-
'id3 middle',
59-
])
52+
const result = await createIx(['id1 zebra', 'id2 apple', 'id3 middle'])
6053
const lines = result.trim().split('\n')
6154
const words = lines.map(l => l.split(' ')[0])
6255
expect(words).toEqual(words.toSorted())
6356
})
6457

6558
test('groups same words with different ids', async () => {
66-
const result = await createIx([
67-
'id1 common unique1',
68-
'id2 common unique2',
69-
])
59+
const result = await createIx(['id1 common unique1', 'id2 common unique2'])
7060
const lines = result.trim().split('\n')
7161
const commonLine = lines.find(l => l.startsWith('common'))
7262
expect(commonLine).toBeDefined()
@@ -87,10 +77,7 @@ describe('makeIx', () => {
8777

8878
describe('makeIxStream', () => {
8979
test('creates index from stream', async () => {
90-
const result = await createIxFromStream([
91-
'id1 hello world',
92-
'id2 foo bar',
93-
])
80+
const result = await createIxFromStream(['id1 hello world', 'id2 foo bar'])
9481
expect(result).toContain('hello')
9582
expect(result).toContain('world')
9683
expect(result).toContain('foo')

test/makeIxx.test.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ async function createIxx(
2424

2525
describe('makeIxx', () => {
2626
test('creates index for simple ix file', async () => {
27-
const ixContent = [
28-
'apple data1,1',
29-
'banana data2,1',
30-
'cherry data3,1',
31-
].join('\n') + '\n'
27+
const ixContent =
28+
['apple data1,1', 'banana data2,1', 'cherry data3,1'].join('\n') + '\n'
3229

3330
const result = await createIxx(ixContent, 5)
3431
expect(result).toContain('apple')
@@ -65,10 +62,7 @@ describe('makeIxx', () => {
6562
})
6663

6764
test('auto-optimizes prefix size when not provided', async () => {
68-
const lines = Array.from(
69-
{ length: 10 },
70-
(_, i) => `word${i} data${i},1`,
71-
)
65+
const lines = Array.from({ length: 10 }, (_, i) => `word${i} data${i},1`)
7266
const ixContent = lines.join('\n') + '\n'
7367
const result = await createIxx(ixContent)
7468
expect(result.length).toBeGreaterThan(0)

0 commit comments

Comments
 (0)