@jscad/json-serializer 3.0.0-alpha.0 → 3.0.2-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 +14 -0
- package/LICENSE +1 -1
- package/dist/jscad-json-serializer.es.js +2 -2
- package/dist/jscad-json-serializer.min.js +2 -2
- package/package.json +4 -4
- package/rollup.config.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.2-alpha.0](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-serializer@3.0.1-alpha.0...@jscad/json-serializer@3.0.2-alpha.0) (2025-09-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @jscad/json-serializer
|
|
9
|
+
|
|
10
|
+
## [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)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **io:** fix io after V3 refactoring ([7a12bbd](https://github.com/jscad/OpenJSCAD.org/commit/7a12bbdb7b4b3df792a4c5b3c8b30a6a985a48f0))
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **modeling:** reworked exports to expose a flattened API ([8235238](https://github.com/jscad/OpenJSCAD.org/commit/8235238ad63d063f1e501478cae1208deb130a9c))
|
|
19
|
+
|
|
6
20
|
# [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
21
|
|
|
8
22
|
### Bug Fixes
|
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
The MIT License (MIT)
|
|
3
3
|
|
|
4
|
-
Copyright (c) 2017-
|
|
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.
|
|
4
|
+
* @version 3.0.2-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.
|
|
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.
|
|
4
|
+
* @version 3.0.2-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.
|
|
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.
|
|
3
|
+
"version": "3.0.2-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.
|
|
37
|
-
"@jscad/modeling": "3.0.
|
|
36
|
+
"@jscad/array-utils": "3.0.1-alpha.0",
|
|
37
|
+
"@jscad/modeling": "3.0.2-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": "
|
|
47
|
+
"gitHead": "ac80d1a7cb0a8efb21aff9193d4a8bccb6e31f1c"
|
|
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
|
}
|