Skip to content

Commit 60527e7

Browse files
Copilotpelikhan
andcommitted
Remove xlsx package references from core and restore original xlsx functionality
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent c071b25 commit 60527e7

File tree

13 files changed

+17
-173
lines changed

13 files changed

+17
-173
lines changed

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"turndown": "^7.2.0",
101101
"turndown-plugin-gfm": "^1.0.2",
102102
"typescript": "5.8.3",
103-
"genaiscript-xlsx": "file:../xlsx",
103+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz",
104104
"zod": "^3.25.30",
105105
"zod-to-json-schema": "^3.24.5"
106106
},

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"ts-dedent": "^2.2.0",
100100
"tsx": "^4.19.4",
101101
"typescript": "5.8.3",
102-
"genaiscript-xlsx": "file:../xlsx",
102+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz",
103103
"yaml": "^2.8.0"
104104
},
105105
"scripts": {

packages/core/src/data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { splitMarkdown } from "./frontmatter"
1515
import { INITryParse } from "./ini"
1616
import { JSON5TryParse } from "./json5"
1717
import { TOMLTryParse } from "./toml"
18-
import { XLSXParse } from "../../xlsx/src/index.ts"
18+
import { XLSXParse } from "./xlsx"
1919
import { XMLTryParse } from "./xml"
2020
import { YAMLTryParse } from "./yaml"
2121
import { resolveFileContent } from "./file"

packages/core/src/file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { fromBase64, toBase64 } from "./base64"
1313
import { host } from "./host"
1414
import { TraceOptions } from "./trace"
1515
import { parsePdf } from "./pdf"
16-
import { XLSXParse, WorkbookSheet } from "../../xlsx/src/index.ts"
16+
import { XLSXParse } from "./xlsx"
1717
import { dataToMarkdownTable, CSVTryParse } from "./csv"
1818
import {
1919
CSV_REGEX,

packages/core/src/parsers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, beforeEach, test } from "node:test"
22
import assert from "node:assert/strict"
33
import { createParsers } from "./parsers"
44
import { MarkdownTrace } from "./trace"
5-
import { XLSXParse } from "../../xlsx/src/index.ts"
5+
import { XLSXParse } from "./xlsx"
66
import { readFile } from "fs/promises"
77
import { resolve } from "path"
88
import { TestHost } from "./testhost"

packages/core/src/parsers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { parsePdf } from "./pdf"
2121
import { HTMLToMarkdown, HTMLToText } from "./html"
2222
import { MathTryEvaluate } from "./math"
2323
import { tryValidateJSONWithSchema, validateJSONWithSchema } from "./schema"
24-
import { XLSXTryParse } from "../../xlsx/src/index.ts"
24+
import { XLSXTryParse } from "./xlsx"
2525
import { host } from "./host"
2626
import { unzip } from "./zip"
2727
import { JSONLTryParse } from "./jsonl"

packages/core/src/types/prompt_template.d.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,8 +2179,6 @@ interface RunPromptResult {
21792179
usage?: RunPromptUsage
21802180
}
21812181

2182-
import type { ParseXLSXOptions, WorkbookSheet } from "../../xlsx/src/index.ts"
2183-
21842182
/**
21852183
* Path manipulation functions.
21862184
*/
@@ -2324,6 +2322,17 @@ interface HTMLToTextOptions {
23242322
wordwrap?: number | false | null | undefined
23252323
}
23262324

2325+
interface ParseXLSXOptions {
2326+
// specific worksheet name
2327+
sheet?: string
2328+
// Use specified range (A1-style bounded range string)
2329+
range?: string
2330+
}
2331+
2332+
interface WorkbookSheet {
2333+
name: string
2334+
rows: object[]
2335+
}
23272336

23282337
interface ParseZipOptions {
23292338
glob?: string

packages/xlsx/README.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

packages/xlsx/package.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)