@nazarkalytiuk/rusc-xlsx 1.0.7 → 1.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nazarkalytiuk/rusc-xlsx",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Fast Excel XLSX library for Node.js powered by rust_xlsxwriter",
5
5
  "main": "wrapper.js",
6
6
  "types": "wrapper.d.ts",
@@ -69,12 +69,12 @@
69
69
  "node": ">=16"
70
70
  },
71
71
  "optionalDependencies": {
72
- "@nazarkalytiuk/rusc-xlsx-win32-x64-msvc": "1.0.7",
73
- "@nazarkalytiuk/rusc-xlsx-win32-ia32-msvc": "1.0.7",
74
- "@nazarkalytiuk/rusc-xlsx-win32-arm64-msvc": "1.0.7",
75
- "@nazarkalytiuk/rusc-xlsx-darwin-universal": "1.0.7",
76
- "@nazarkalytiuk/rusc-xlsx-linux-x64-gnu": "1.0.7",
77
- "@nazarkalytiuk/rusc-xlsx-linux-arm64-gnu": "1.0.7",
78
- "@nazarkalytiuk/rusc-xlsx-linux-x64-musl": "1.0.7"
72
+ "@nazarkalytiuk/rusc-xlsx-win32-x64-msvc": "1.0.8",
73
+ "@nazarkalytiuk/rusc-xlsx-win32-ia32-msvc": "1.0.8",
74
+ "@nazarkalytiuk/rusc-xlsx-win32-arm64-msvc": "1.0.8",
75
+ "@nazarkalytiuk/rusc-xlsx-darwin-universal": "1.0.8",
76
+ "@nazarkalytiuk/rusc-xlsx-linux-x64-gnu": "1.0.8",
77
+ "@nazarkalytiuk/rusc-xlsx-linux-arm64-gnu": "1.0.8",
78
+ "@nazarkalytiuk/rusc-xlsx-linux-x64-musl": "1.0.8"
79
79
  }
80
80
  }
package/wrapper.d.ts CHANGED
@@ -2332,5 +2332,26 @@ export declare class Workbook {
2332
2332
  setProperties(properties: DocProperties): void;
2333
2333
  }
2334
2334
 
2335
+ /**
2336
+ * Returns [currentBytes, peakBytes] of Rust allocator usage.
2337
+ * Useful for profiling memory consumption of the native layer.
2338
+ *
2339
+ * @example
2340
+ * const [current, peak] = rustMemoryStats();
2341
+ * console.log(`Rust heap: ${(current / 1024 / 1024).toFixed(2)} MB (peak: ${(peak / 1024 / 1024).toFixed(2)} MB)`);
2342
+ */
2343
+ export declare function rustMemoryStats(): [number, number];
2344
+
2345
+ /**
2346
+ * Resets peak memory tracking to the current allocation level.
2347
+ * Call before a section you want to measure.
2348
+ *
2349
+ * @example
2350
+ * rustMemoryResetPeak();
2351
+ * // ... do work ...
2352
+ * const [current, peak] = rustMemoryStats();
2353
+ */
2354
+ export declare function rustMemoryResetPeak(): void;
2355
+
2335
2356
  // Re-export native bindings for advanced use
2336
2357
  export { RuscFormat, RuscNote, RuscFormula, RuscDataValidation, RuscChart, RuscWorkbook, RuscWorksheet, RuscProtectionOptions, RuscRichText, RuscImage, RuscTable, RuscTableColumn, RuscSparkline, RuscDocProperties, RuscButton, RuscShape } from './index';
package/wrapper.js CHANGED
@@ -1342,4 +1342,7 @@ module.exports = {
1342
1342
  RuscDocProperties: nativeBinding.RuscDocProperties,
1343
1343
  RuscButton: nativeBinding.RuscButton,
1344
1344
  RuscShape: nativeBinding.RuscShape,
1345
+ // Memory tracking
1346
+ rustMemoryStats: nativeBinding.rustMemoryStats,
1347
+ rustMemoryResetPeak: nativeBinding.rustMemoryResetPeak,
1345
1348
  }