@cj-tech-master/excelts 3.1.0-canary.20260102052037.381817c → 3.1.0-canary.20260102054456.77dafd9

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @cj-tech-master/excelts v3.1.0-canary.20260102052037.381817c
2
+ * @cj-tech-master/excelts v3.1.0-canary.20260102054456.77dafd9
3
3
  * TypeScript Excel Workbook Manager - Read and Write xlsx and csv Files.
4
4
  * (c) 2026 cjnoname
5
5
  * Released under the MIT License
@@ -4045,13 +4045,16 @@ var ExcelTS = (function(exports) {
4045
4045
  try {
4046
4046
  setController(controller);
4047
4047
  if (hasSubclassTransform()) await new Promise((resolve, reject) => {
4048
- this._transform(chunk, "utf8", (err, data) => {
4048
+ const transformFn = this._transform;
4049
+ const callback = (err, data) => {
4049
4050
  if (err) reject(err);
4050
4051
  else {
4051
4052
  if (data !== void 0) controller.enqueue(data);
4052
4053
  resolve();
4053
4054
  }
4054
- });
4055
+ };
4056
+ if (transformFn.length >= 3) transformFn.call(this, chunk, "utf8", callback);
4057
+ else transformFn.call(this, chunk, callback);
4055
4058
  });
4056
4059
  else if (userTransform) if (isNodeStyleTransform) await new Promise((resolve, reject) => {
4057
4060
  userTransform.call(getInstance(), chunk, "utf8", (err, data) => {
@@ -16219,10 +16222,7 @@ var ExcelTS = (function(exports) {
16219
16222
  */
16220
16223
  async write(data, encoding, callback) {
16221
16224
  const nop = () => {};
16222
- if (typeof encoding === "function") {
16223
- callback = encoding;
16224
- encoding = "utf8";
16225
- }
16225
+ if (typeof encoding === "function") callback = encoding;
16226
16226
  callback = callback || nop;
16227
16227
  let chunk;
16228
16228
  if (data instanceof StringBuf || data && data.constructor?.name === "StringBuf") chunk = new StringBufChunk(data);