@happyvertical/json 0.102.0 → 0.102.1

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.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Benchmarks for JSON parsing and serialization
3
+ *
4
+ * Run with: pnpm test:bench
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=benchmark.bench.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benchmark.bench.d.ts","sourceRoot":"","sources":["../../src/__tests__/benchmark.bench.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -1,4 +1,10 @@
1
- import { AdapterInfo, JSONAdapter, ParseError, Replacer, Result, Reviver, StringifyError } from '../types.js';
1
+ /**
2
+ * Native JavaScript JSON adapter
3
+ *
4
+ * This adapter uses the built-in JSON object as a fallback when
5
+ * the Rust SIMD-accelerated adapter is not available.
6
+ */
7
+ import type { AdapterInfo, JSONAdapter, ParseError, Replacer, Result, Reviver, StringifyError } from '../types.js';
2
8
  /**
3
9
  * Native JavaScript JSON adapter implementation
4
10
  *
@@ -1,4 +1,10 @@
1
- import { AdapterInfo, JSONAdapter, NativeBindings, ParseError, Replacer, Result, Reviver, StringifyError } from '../types.js';
1
+ /**
2
+ * Sonic (Rust SIMD) JSON adapter
3
+ *
4
+ * This adapter uses sonic-rs through napi-rs bindings for
5
+ * SIMD-accelerated JSON parsing and serialization.
6
+ */
7
+ import type { AdapterInfo, JSONAdapter, NativeBindings, ParseError, Replacer, Result, Reviver, StringifyError } from '../types.js';
2
8
  /**
3
9
  * Sonic (Rust SIMD) JSON adapter implementation
4
10
  *
package/dist/factory.d.ts CHANGED
@@ -1,4 +1,9 @@
1
- import { AdapterType, JSONAdapter, JSONOptions } from './types.js';
1
+ /**
2
+ * JSON Factory
3
+ *
4
+ * Factory for creating JSON adapters with automatic fallback support.
5
+ */
6
+ import type { AdapterType, JSONAdapter, JSONOptions } from './types.js';
2
7
  /**
3
8
  * Factory for creating JSON adapters
4
9
  *
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { ParseError, Replacer, Result, Reviver, StringifyError } from './types.js';
2
1
  /**
3
2
  * @happyvertical/json
4
3
  *
@@ -42,6 +41,7 @@ import { ParseError, Replacer, Result, Reviver, StringifyError } from './types.j
42
41
  export { createSonicAdapter, isSonicAvailable, NativeAdapter, nativeAdapter, SonicAdapter, } from './adapters/index.js';
43
42
  export { createAdapter, getDefaultAdapter, JSONFactory } from './factory.js';
44
43
  export type { AdapterInfo, AdapterType, JSONAdapter, JSONOptions, ParseError, Replacer, Result, Reviver, StringifyError, } from './types.js';
44
+ import type { ParseError, Replacer, Result, Reviver, StringifyError } from './types.js';
45
45
  /**
46
46
  * Parse a JSON string into a JavaScript value
47
47
  *
@@ -164,7 +164,7 @@ export declare function isValid(text: string): boolean;
164
164
  * console.log(`SIMD enabled: ${info.simdEnabled}`);
165
165
  * ```
166
166
  */
167
- export declare function getAdapterInfo(): import('./types.js').AdapterInfo;
167
+ export declare function getAdapterInfo(): import("./types.js").AdapterInfo;
168
168
  /**
169
169
  * Check if SIMD-accelerated parsing is available
170
170
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/json",
3
- "version": "0.102.0",
3
+ "version": "0.102.1",
4
4
  "description": "High-performance JSON parsing and serialization with Rust SIMD acceleration and automatic fallback",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",