@jscad/json-serializer 3.0.0-alpha.0 → 3.0.1-alpha.0

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.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.1-alpha.0](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-serializer@2.0.22...@jscad/json-serializer@3.0.1-alpha.0) (2025-01-03)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **io:** fix io after V3 refactoring ([7a12bbd](https://github.com/jscad/OpenJSCAD.org/commit/7a12bbdb7b4b3df792a4c5b3c8b30a6a985a48f0))
11
+
12
+ ### Features
13
+
14
+ * **modeling:** reworked exports to expose a flattened API ([8235238](https://github.com/jscad/OpenJSCAD.org/commit/8235238ad63d063f1e501478cae1208deb130a9c))
15
+
6
16
  # [3.0.0-alpha.0](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-serializer@2.0.22...@jscad/json-serializer@3.0.0-alpha.0) (2023-10-09)
7
17
 
8
18
  ### Bug Fixes
package/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  The MIT License (MIT)
3
3
 
4
- Copyright (c) 2017-2021 JSCAD Organization
4
+ Copyright (c) 2017-2025 JSCAD Organization
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * JSON Serializer for JSCAD
3
3
  * @module @jscad/json-serializer
4
- * @version 3.0.0-alpha.0
4
+ * @version 3.0.1-alpha.0
5
5
  * @license MIT
6
6
  */
7
7
  /**
8
8
  * JSCAD Utility functions for arrays
9
9
  * @module @jscad/array-utils
10
- * @version 3.0.0-alpha.0
10
+ * @version 3.0.1-alpha.0
11
11
  * @license MIT
12
12
  */
13
13
  const flatten=arr=>arr.reduce(((acc,val)=>Array.isArray(val)?acc.concat(flatten(val)):acc.concat(val)),[]),mimeType="application/json",replacer=(key,value)=>{switch(key){case"transforms":case"plane":return Array.from(value);case"points":case"vertices":return value.map((v=>Array.from(v)));case"outlines":return value.map((o=>o.map((v=>Array.from(v)))))}return value},serialize=(options,...objects)=>{options=Object.assign({},{statusCallback:null},options),objects=flatten(objects),options.statusCallback&&options.statusCallback({progress:0});const notation=JSON.stringify(objects,replacer);return options.statusCallback&&options.statusCallback({progress:100}),[notation]};export{mimeType,serialize};
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * JSON Serializer for JSCAD
3
3
  * @module @jscad/json-serializer
4
- * @version 3.0.0-alpha.0
4
+ * @version 3.0.1-alpha.0
5
5
  * @license MIT
6
6
  */
7
7
  var global,factory;global=this,factory=function(exports){
8
8
  /**
9
9
  * JSCAD Utility functions for arrays
10
10
  * @module @jscad/array-utils
11
- * @version 3.0.0-alpha.0
11
+ * @version 3.0.1-alpha.0
12
12
  * @license MIT
13
13
  */
14
14
  const flatten=arr=>arr.reduce(((acc,val)=>Array.isArray(val)?acc.concat(flatten(val)):acc.concat(val)),[]),replacer=(key,value)=>{switch(key){case"transforms":case"plane":return Array.from(value);case"points":case"vertices":return value.map((v=>Array.from(v)));case"outlines":return value.map((o=>o.map((v=>Array.from(v)))))}return value};exports.mimeType="application/json",exports.serialize=(options,...objects)=>{options=Object.assign({},{statusCallback:null},options),objects=flatten(objects),options.statusCallback&&options.statusCallback({progress:0});const notation=JSON.stringify(objects,replacer);return options.statusCallback&&options.statusCallback({progress:100}),[notation]},Object.defineProperty(exports,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).jscadJsonSerializer={});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jscad/json-serializer",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.1-alpha.0",
4
4
  "description": "JSON Serializer for JSCAD",
5
5
  "homepage": "https://openjscad.xyz/",
6
6
  "repository": "https://github.com/jscad/OpenJSCAD.org",
@@ -33,8 +33,8 @@
33
33
  ],
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
- "@jscad/array-utils": "3.0.0-alpha.0",
37
- "@jscad/modeling": "3.0.0-alpha.0"
36
+ "@jscad/array-utils": "3.0.1-alpha.0",
37
+ "@jscad/modeling": "3.0.1-alpha.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@rollup/plugin-node-resolve": "^15.0.1",
@@ -44,5 +44,5 @@
44
44
  "rollup": "^2.79.1",
45
45
  "rollup-plugin-banner": "^0.2.1"
46
46
  },
47
- "gitHead": "3656d36ed9cd738ab884e86aae5a2ce08d52adf7"
47
+ "gitHead": "0660b5c1f1a5faf54d4cfae1cb85bb94182a8d32"
48
48
  }
package/rollup.config.js CHANGED
@@ -20,6 +20,6 @@ export default {
20
20
  plugins: [
21
21
  nodeResolve(),
22
22
  banner('<%= pkg.description %>\n@module <%= pkg.name %>\n@version <%= pkg.version %>\n@license <%= pkg.license %>'),
23
- terser({ compress: { module: true }, mangle: false, format: { comments: 'some'} })
23
+ terser({ compress: { module: true }, mangle: false, format: { comments: 'some' } })
24
24
  ]
25
25
  }