@shbernal/ts-xlsx 3.2.0 → 3.2.2-next.21.g3c63400
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/formula.d.ts +2 -2
- package/dist/core/formula.js +4 -3
- package/package.json +9 -9
package/dist/core/formula.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function mangleParams(formula: string): string;
|
|
|
50
50
|
* LET or LAMBDA parameter spelled like a function already carries `_xlpm.`.
|
|
51
51
|
*
|
|
52
52
|
* A name is not a value where it names a sheet (`SUM!A1`, `SUM:Other!A1`) or a table (`Rate[Amount]`),
|
|
53
|
-
* where a sheet or workbook qualifies it (`S1!SUM`),
|
|
54
|
-
* function too.
|
|
53
|
+
* where a sheet or workbook qualifies it (`S1!SUM`), where it is the column of a reference (`$T$1`,
|
|
54
|
+
* `T:T`), or inside an error literal: the `N` of `#N/A` is a function too.
|
|
55
55
|
*/
|
|
56
56
|
export declare function mangleFunctionValues(formula: string, namesInScope: ReadonlySet<string>): string;
|
|
57
57
|
/**
|
package/dist/core/formula.js
CHANGED
|
@@ -145,7 +145,8 @@ export function mangleParams(formula) {
|
|
|
145
145
|
i = k + 1;
|
|
146
146
|
continue;
|
|
147
147
|
}
|
|
148
|
-
const
|
|
148
|
+
const anchored = formula[i - 1] === '$' || formula[nameEnd] === '$';
|
|
149
|
+
const spelling = anchored ? undefined : declared(name);
|
|
149
150
|
out += spelling === undefined ? name : `${XLPM}${spelling}`;
|
|
150
151
|
i = nameEnd;
|
|
151
152
|
}
|
|
@@ -173,8 +174,8 @@ export function mangleFunctionValues(formula, namesInScope) {
|
|
|
173
174
|
}
|
|
174
175
|
return out;
|
|
175
176
|
}
|
|
176
|
-
const QUALIFIES_NAME = /[A-Za-z0-9_
|
|
177
|
-
const NAMES_A_CONTAINER = /[
|
|
177
|
+
const QUALIFIES_NAME = /[A-Za-z0-9_.$:!#\]]/;
|
|
178
|
+
const NAMES_A_CONTAINER = /[!:$[]/;
|
|
178
179
|
function isFunctionValue(formula, start, end, namesInScope) {
|
|
179
180
|
const name = formula.slice(start, end).toUpperCase();
|
|
180
181
|
if (!FUNCTION_VALUE_NAMES.has(name) || namesInScope.has(name))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shbernal/ts-xlsx",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2-next.21.g3c63400",
|
|
4
4
|
"description": "A TypeScript-first library for reading and writing xlsx (OOXML) spreadsheets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"csv",
|
|
@@ -125,18 +125,18 @@
|
|
|
125
125
|
"fflate": "^0.8.3"
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
128
|
-
"@types/node": "^24.
|
|
128
|
+
"@types/node": "^24.19.2",
|
|
129
129
|
"charcheck": "^0.4.0",
|
|
130
|
-
"jszip": "^3.10.
|
|
131
|
-
"lefthook": "^2.1
|
|
130
|
+
"jszip": "^3.10.2",
|
|
131
|
+
"lefthook": "^2.2.1",
|
|
132
132
|
"ooxml-validate": "^0.0.3",
|
|
133
|
-
"oxfmt": "^0.
|
|
134
|
-
"oxlint": "^1.
|
|
135
|
-
"oxlint-tsgolint": "7.0.
|
|
136
|
-
"shiki": "^4.
|
|
133
|
+
"oxfmt": "^0.72.0",
|
|
134
|
+
"oxlint": "^1.87.0",
|
|
135
|
+
"oxlint-tsgolint": "7.0.2003",
|
|
136
|
+
"shiki": "^4.5.0",
|
|
137
137
|
"typescript": "^7.0.2",
|
|
138
138
|
"vitepress": "^1.6.4",
|
|
139
|
-
"vue": "^3.5.
|
|
139
|
+
"vue": "^3.5.43"
|
|
140
140
|
},
|
|
141
141
|
"engines": {
|
|
142
142
|
"node": ">=24"
|