@jscad/core 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,13 @@
|
|
|
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/core@2.6.4...@jscad/core@3.0.1-alpha.0) (2025-01-03)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **cli:** reworked logic to use new io package exports and functions ([#1199](https://github.com/jscad/OpenJSCAD.org/issues/1199)) ([71a3d27](https://github.com/jscad/OpenJSCAD.org/commit/71a3d27a4cf416b1a9fea57a1fe40f5cfdaa905c))
|
|
11
|
+
* **modeling:** reworked exports to expose a flattened API ([8235238](https://github.com/jscad/OpenJSCAD.org/commit/8235238ad63d063f1e501478cae1208deb130a9c))
|
|
12
|
+
|
|
6
13
|
# [3.0.0-alpha.0](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/core@2.6.4...@jscad/core@3.0.0-alpha.0) (2023-10-09)
|
|
7
14
|
|
|
8
15
|
### Features
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jscad/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-alpha.0",
|
|
4
4
|
"description": "Core functionality for JSCAD Applications",
|
|
5
5
|
"homepage": "https://openjscad.xyz/",
|
|
6
6
|
"repository": "https://github.com/jscad/OpenJSCAD.org",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
],
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@jscad/array-utils": "3.0.
|
|
40
|
-
"@jscad/io": "3.0.
|
|
41
|
-
"@jscad/io-utils": "3.0.
|
|
42
|
-
"@jscad/modeling": "3.0.
|
|
39
|
+
"@jscad/array-utils": "3.0.1-alpha.0",
|
|
40
|
+
"@jscad/io": "3.0.1-alpha.0",
|
|
41
|
+
"@jscad/io-utils": "3.0.1-alpha.0",
|
|
42
|
+
"@jscad/modeling": "3.0.1-alpha.0",
|
|
43
43
|
"json5": "2.2.3",
|
|
44
44
|
"strip-bom": "4.0.0"
|
|
45
45
|
},
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"url": "https://opencollective.com/openjscad",
|
|
53
53
|
"logo": "https://opencollective.com/openjscad/logo.txt"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "0660b5c1f1a5faf54d4cfae1cb85bb94182a8d32"
|
|
56
56
|
}
|
|
@@ -70,7 +70,7 @@ export const rebuildGeometry = (data, callback) => {
|
|
|
70
70
|
lookupCounts: solidsData.lookupCounts
|
|
71
71
|
})
|
|
72
72
|
} catch (error) {
|
|
73
|
-
callback({
|
|
73
|
+
callback(null, {
|
|
74
74
|
type: 'errors',
|
|
75
75
|
name: error.name ? error.name : 'Error',
|
|
76
76
|
message: error.message ? error.message : error.toString(),
|
|
@@ -80,6 +80,6 @@ export const rebuildGeometry = (data, callback) => {
|
|
|
80
80
|
lineNumber: error.lineNumber ? error.lineNumber : '',
|
|
81
81
|
columnNumber: error.columnNumber ? error.columnNumber : '',
|
|
82
82
|
stack: error.stack ? error.stack : ''
|
|
83
|
-
}
|
|
83
|
+
})
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -17,7 +17,13 @@ const registerDeserializer = (extension, fs, _require) => {
|
|
|
17
17
|
const deserializer = deserializers[extension]
|
|
18
18
|
const fileExtension = '.' + extension
|
|
19
19
|
_require.extensions[fileExtension] = (module, filename) => {
|
|
20
|
-
const
|
|
20
|
+
const fileReadResult = fs.readFileSync(filename) // read into buffer
|
|
21
|
+
// NOTE: https://nodejs.org/api/buffer.html#bufbuffer: Buffer.buffer is not
|
|
22
|
+
// guaranteed to correspond exactly to the original Buffer.
|
|
23
|
+
const content = fileReadResult.buffer
|
|
24
|
+
? fileReadResult.buffer.slice(fileReadResult.byteOffset, fileReadResult.byteOffset + fileReadResult.length)
|
|
25
|
+
: fileReadResult;
|
|
26
|
+
|
|
21
27
|
const parsed = deserializer({ filename, output: 'geometry' }, content)
|
|
22
28
|
module.exports = parsed
|
|
23
29
|
}
|