@cosmol-studio/cosmolkit-core-analysis 0.6.2-rc.1 → 0.6.2-rc.2

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.
Binary file
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './cosmolkit_wasm.js';
package/index.js ADDED
@@ -0,0 +1,14 @@
1
+ import init from './cosmolkit_wasm.js';
2
+
3
+ const wasmUrl = new URL('./cosmolkit_wasm_bg.wasm', import.meta.url);
4
+
5
+ if (wasmUrl.protocol === 'file:') {
6
+ // Leave the Node-only import out of browser bundles.
7
+ const fsModule = 'node:fs/promises';
8
+ const { readFile } = await import(/* webpackIgnore: true */ /* @vite-ignore */ fsModule);
9
+ await init({ module_or_path: await readFile(wasmUrl) });
10
+ } else {
11
+ await init({ module_or_path: wasmUrl });
12
+ }
13
+
14
+ export * from './cosmolkit_wasm.js';
package/package.json CHANGED
@@ -1,22 +1,26 @@
1
1
  {
2
2
  "name": "@cosmol-studio/cosmolkit-core-analysis",
3
- "version": "0.6.2-rc.1",
4
- "description": "Rust-native cheminformatics for JavaScript and TypeScript",
5
- "license": "MIT",
6
- "repository": "https://github.com/cosmol-studio/COSMolKit",
7
3
  "type": "module",
8
- "main": "cosmolkit_wasm.js",
9
- "types": "cosmolkit_wasm.d.ts",
4
+ "description": "JavaScript and TypeScript bindings for COSMolKit",
5
+ "version": "0.6.2-rc.2",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/cosmol-studio/COSMolKit"
10
+ },
10
11
  "files": [
11
- "cosmolkit_wasm.d.ts",
12
- "cosmolkit_wasm.js",
13
- "cosmolkit_wasm_bg.wasm",
14
- "cosmolkit_wasm_bg.wasm.d.ts",
15
- "snippets/cosmolkit-wasm-3a9592bd6ca60084/src/readonly_map.js",
16
- "snippets/package.json",
17
- "README.md",
18
- "LICENSE"
12
+ "*.js",
13
+ "*.d.ts",
14
+ "*.wasm",
15
+ "snippets"
16
+ ],
17
+ "main": "index.js",
18
+ "types": "index.d.ts",
19
+ "sideEffects": [
20
+ "./index.js",
21
+ "./snippets/*"
19
22
  ],
23
+ "module": "index.js",
20
24
  "publishConfig": {
21
25
  "access": "public",
22
26
  "tag": "rc"
@@ -1 +0,0 @@
1
- {"type":"module"}