@tbela99/rust-css-parser-wasm 2.3.0 → 2.3.1

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/dist/backend.js CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  import { columnTypes } from "./columns.js";
4
4
 
5
- const isNode = typeof process !== "undefined" && process.versions?.node != null && typeof window === "undefined";
6
-
7
5
  /**
8
6
  * the backend of this package
9
7
  */
@@ -16,7 +14,9 @@ export async function createBackend() {
16
14
  const url = new URL("./css_parser.wasm", import.meta.url);
17
15
  let bytes;
18
16
 
19
- if (isNode) {
17
+ // the module is read from the disk when the package is a local file (node, bun, deno with npm packages), fetched
18
+ // otherwise: the browsers, and deno with the jsr package, whose modules are urls of jsr.io
19
+ if (url.protocol === "file:") {
20
20
  const { readFile } = await import("node:fs/promises");
21
21
  bytes = await readFile(url);
22
22
  } else {
Binary file
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Version number
3
3
  */
4
- export const version = "2.3.0";
4
+ export const version = "2.3.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbela99/rust-css-parser-wasm",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",