@deltachat/stdio-rpc-server 1.140.1 → 1.141.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +6 -4
  3. package/package.json +11 -11
package/README.md CHANGED
@@ -7,7 +7,7 @@ This simplifies cross-compilation and even reduces binary size (no CFFI layer an
7
7
 
8
8
  ## Usage
9
9
 
10
- > The **minimum** nodejs version for this package is `20.11`
10
+ > The **minimum** nodejs version for this package is `16`
11
11
 
12
12
  ```
13
13
  npm i @deltachat/stdio-rpc-server @deltachat/jsonrpc-client
package/index.js CHANGED
@@ -11,9 +11,6 @@ import {
11
11
  NPM_NOT_FOUND_UNSUPPORTED_PLATFORM_ERROR,
12
12
  } from "./src/errors.js";
13
13
 
14
- // Because this is not compiled by typescript, esm needs this stuff (` with { type: "json" };`,
15
- // nodejs still complains about it being experimental, but deno also uses it, so treefit bets taht it will become standard)
16
- import package_json from "./package.json" with { type: "json" };
17
14
  import { createRequire } from "node:module";
18
15
 
19
16
  function findRPCServerInNodeModules() {
@@ -25,7 +22,12 @@ function findRPCServerInNodeModules() {
25
22
  return resolve(package_name);
26
23
  } catch (error) {
27
24
  console.debug("findRpcServerInNodeModules", error);
28
- if (Object.keys(package_json.optionalDependencies).includes(package_name)) {
25
+ const require = createRequire(import.meta.url);
26
+ if (
27
+ Object.keys(require("./package.json").optionalDependencies).includes(
28
+ package_name
29
+ )
30
+ ) {
29
31
  throw new Error(NPM_NOT_FOUND_SUPPORTED_PLATFORM_ERROR(package_name));
30
32
  } else {
31
33
  throw new Error(NPM_NOT_FOUND_UNSUPPORTED_PLATFORM_ERROR());
package/package.json CHANGED
@@ -3,16 +3,16 @@
3
3
  "main": "index.js",
4
4
  "name": "@deltachat/stdio-rpc-server",
5
5
  "optionalDependencies": {
6
- "@deltachat/stdio-rpc-server-darwin-arm64": "1.140.1",
7
- "@deltachat/stdio-rpc-server-android-arm64": "1.140.1",
8
- "@deltachat/stdio-rpc-server-linux-arm64": "1.140.1",
9
- "@deltachat/stdio-rpc-server-linux-arm": "1.140.1",
10
- "@deltachat/stdio-rpc-server-android-arm": "1.140.1",
11
- "@deltachat/stdio-rpc-server-win32-ia32": "1.140.1",
12
- "@deltachat/stdio-rpc-server-linux-ia32": "1.140.1",
13
- "@deltachat/stdio-rpc-server-darwin-x64": "1.140.1",
14
- "@deltachat/stdio-rpc-server-win32-x64": "1.140.1",
15
- "@deltachat/stdio-rpc-server-linux-x64": "1.140.1"
6
+ "@deltachat/stdio-rpc-server-darwin-arm64": "1.141.0",
7
+ "@deltachat/stdio-rpc-server-android-arm64": "1.141.0",
8
+ "@deltachat/stdio-rpc-server-linux-arm64": "1.141.0",
9
+ "@deltachat/stdio-rpc-server-linux-arm": "1.141.0",
10
+ "@deltachat/stdio-rpc-server-android-arm": "1.141.0",
11
+ "@deltachat/stdio-rpc-server-win32-ia32": "1.141.0",
12
+ "@deltachat/stdio-rpc-server-linux-ia32": "1.141.0",
13
+ "@deltachat/stdio-rpc-server-darwin-x64": "1.141.0",
14
+ "@deltachat/stdio-rpc-server-win32-x64": "1.141.0",
15
+ "@deltachat/stdio-rpc-server-linux-x64": "1.141.0"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "@deltachat/jsonrpc-client": "*"
@@ -26,5 +26,5 @@
26
26
  },
27
27
  "type": "module",
28
28
  "types": "index.d.ts",
29
- "version": "1.140.1"
29
+ "version": "1.141.0"
30
30
  }