json-as 1.0.0-beta.15 → 1.0.0-beta.16

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/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 2025-03-04 - 1.0.0-beta.16
4
+
5
+ - fix: isPrimitive should only trigger on actual primitives
6
+
3
7
  ## 2025-03-04 - 1.0.0-beta.15
4
8
 
5
9
  - fix: deserialize custom should take in string
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
7
7
  █████ ███████ ██████ ██ ████ ██ ██ ███████
8
8
  </span>
9
- AssemblyScript - v1.0.0-beta.15
9
+ AssemblyScript - v1.0.0-beta.16
10
10
  </pre>
11
11
  </h5>
12
12
 
@@ -31,7 +31,7 @@ JSON is the de-facto serialization format of modern web applications, but its se
31
31
  ## 💾 Installation
32
32
 
33
33
  ```bash
34
- npm install json-as@1.0.0-beta.15
34
+ npm install json-as@1.0.0-beta.16
35
35
  ```
36
36
 
37
37
  Add the `--transform` to your `asc` command (e.g. in package.json)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-as",
3
- "version": "1.0.0-beta.15",
3
+ "version": "1.0.0-beta.16",
4
4
  "author": "Jairus Tanaka",
5
5
  "repository": {
6
6
  "type": "git",
@@ -760,7 +760,7 @@ function strToNum(data: string, simd: boolean = false, offset: number = 0): stri
760
760
 
761
761
  function isPrimitive(type: string): boolean {
762
762
  const primitiveTypes = ["u8", "u16", "u32", "u64", "i8", "i16", "i32", "i64", "f32", "f64", "bool", "boolean"];
763
- return primitiveTypes.some((v) => type.includes(v));
763
+ return primitiveTypes.some((v) => type.startsWith(v));
764
764
  }
765
765
 
766
766
  function throwError(message: string, range: Range): never {