@delight-rpc/piscina 0.3.2 → 0.4.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/README.md CHANGED
@@ -42,7 +42,7 @@ function createClient<IAPI extends object>(
42
42
  piscina: Piscina
43
43
  , options?: {
44
44
  parameterValidators?: DelightRPC.ParameterValidators<IAPI>
45
- expectedVersion?: `${number}.${number}.${number}`
45
+ expectedVersion?: string
46
46
  channel?: string
47
47
  }
48
48
  ): DelightRPC.ClientProxy<IAPI>
@@ -53,7 +53,7 @@ function createClient<IAPI extends object>(
53
53
  function createBatchClient(
54
54
  piscina: Piscina
55
55
  , options?: {
56
- expectedVersion?: `${number}.${number}.${number}`
56
+ expectedVersion?: string
57
57
  channel?: string
58
58
  }
59
59
  ): DelightRPC.BatchClient
package/lib/client.d.ts CHANGED
@@ -2,10 +2,10 @@ import * as DelightRPC from 'delight-rpc';
2
2
  import Piscina from 'piscina';
3
3
  export declare function createClient<IAPI extends object>(piscina: Piscina, { parameterValidators, expectedVersion, channel }?: {
4
4
  parameterValidators?: DelightRPC.ParameterValidators<IAPI>;
5
- expectedVersion?: `${number}.${number}.${number}`;
5
+ expectedVersion?: string;
6
6
  channel?: string;
7
7
  }): DelightRPC.ClientProxy<IAPI>;
8
8
  export declare function createBatchClient(piscina: Piscina, { expectedVersion, channel }?: {
9
- expectedVersion?: `${number}.${number}.${number}`;
9
+ expectedVersion?: string;
10
10
  channel?: string;
11
11
  }): DelightRPC.BatchClient;
package/lib/client.js CHANGED
@@ -43,8 +43,6 @@ function createBatchClient(piscina, { expectedVersion, channel } = {}) {
43
43
  }
44
44
  exports.createBatchClient = createBatchClient;
45
45
  function createSend(piscina) {
46
- return async function (request) {
47
- return await piscina.run(request);
48
- };
46
+ return async (request) => await piscina.run(request);
49
47
  }
50
48
  //# sourceMappingURL=client.js.map
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAyC;AAIzC,SAAgB,YAAY,CAC1B,OAAgB,EAChB,EAAE,mBAAmB,EAAE,eAAe,EAAE,OAAO,KAI3C,EAAE;IAEN,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CACpC,UAAU,CAAC,OAAO,CAAC,EACnB;QACE,mBAAmB;QACnB,eAAe;QACf,OAAO;KACR,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAlBD,oCAkBC;AAED,SAAgB,iBAAiB,CAC/B,OAAgB,EAChB,EAAE,eAAe,EAAE,OAAO,KAGtB,EAAE;IAEN,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,WAAW,CACvC,UAAU,CAAC,OAAO,CAAC,EACnB;QACE,eAAe;QACf,OAAO;KACR,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAhBD,8CAgBC;AAED,SAAS,UAAU,CAAI,OAAgB;IACrC,OAAO,KAAK,WACV,OAAmD;QAEnD,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAM,CAAA;IACxC,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAyC;AAIzC,SAAgB,YAAY,CAC1B,OAAgB,EAChB,EAAE,mBAAmB,EAAE,eAAe,EAAE,OAAO,KAI3C,EAAE;IAEN,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CACpC,UAAU,CAAC,OAAO,CAAC,EACnB;QACE,mBAAmB;QACnB,eAAe;QACf,OAAO;KACR,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAlBD,oCAkBC;AAED,SAAgB,iBAAiB,CAC/B,OAAgB,EAChB,EAAE,eAAe,EAAE,OAAO,KAGtB,EAAE;IAEN,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,WAAW,CACvC,UAAU,CAAC,OAAO,CAAC,EACnB;QACE,eAAe;QACf,OAAO;KACR,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAhBD,8CAgBC;AAED,SAAS,UAAU,CACjB,OAAgB;IAEhB,OAAO,KAAK,EAAC,OAAO,EAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;AACpD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delight-rpc/piscina",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "files": [
@@ -11,6 +11,7 @@
11
11
  "repository": "git@github.com:delight-rpc/piscina.git",
12
12
  "author": "BlackGlory <woshenmedoubuzhidao@blackglory.me>",
13
13
  "license": "MIT",
14
+ "sideEffects": false,
14
15
  "scripts": {
15
16
  "prepare": "ts-patch install -s",
16
17
  "lint": "eslint --ext .js,.jsx,.ts,.tsx --quiet src",
@@ -29,35 +30,36 @@
29
30
  }
30
31
  },
31
32
  "devDependencies": {
32
- "@blackglory/jest-matchers": "^0.3.1",
33
- "@commitlint/cli": "^17.0.2",
34
- "@commitlint/config-conventional": "^17.0.2",
35
- "@types/jest": "^27.5.1",
33
+ "@blackglory/jest-matchers": "^0.5.0",
34
+ "@commitlint/cli": "^17.3.0",
35
+ "@commitlint/config-conventional": "^17.3.0",
36
+ "@types/jest": "^29.2.4",
36
37
  "@types/node": "14",
37
- "@typescript-eslint/eslint-plugin": "^5.29.0",
38
- "@typescript-eslint/parser": "^5.29.0",
38
+ "@typescript-eslint/eslint-plugin": "^5.46.1",
39
+ "@typescript-eslint/parser": "^5.46.1",
39
40
  "cross-env": "^7.0.3",
40
- "delight-rpc": "^4.2.1",
41
- "eslint": "8.18.0",
41
+ "delight-rpc": "^5.0.0",
42
+ "eslint": "8.29.0",
42
43
  "husky": "4",
43
- "jest": "^27.5.1",
44
+ "jest": "^29.3.1",
45
+ "jest-environment-jsdom": "^29.3.1",
44
46
  "npm-run-all": "^4.1.5",
45
47
  "piscina": "^3.2.0",
46
48
  "return-style": "^1.0.0",
47
49
  "rimraf": "^3.0.2",
48
50
  "standard-version": "^9.5.0",
49
- "ts-jest": "^27.1.4",
50
- "ts-node": "^10.8.1",
51
- "ts-patch": "^2.0.1",
51
+ "ts-jest": "^29.0.3",
52
+ "ts-node": "^10.9.1",
53
+ "ts-patch": "^2.1.0",
52
54
  "typescript": "^4.7.4",
53
- "typescript-transform-paths": "^3.3.1"
55
+ "typescript-transform-paths": "^3.4.4"
54
56
  },
55
57
  "peerDependencies": {
56
- "delight-rpc": "^4.2.1",
58
+ "delight-rpc": "^5.0.0",
57
59
  "piscina": "^3.2.0"
58
60
  },
59
61
  "dependencies": {
60
- "@blackglory/prelude": "^0.1.2",
61
- "@delight-rpc/protocol": "^2.2.0"
62
+ "@blackglory/prelude": "^0.1.8",
63
+ "@delight-rpc/protocol": "^3.0.0"
62
64
  }
63
65
  }