Dependencies update + API cleanups (#376)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 18 May 2021 13:35:39 +0000 (15:35 +0200)
committerGitHub <noreply@github.com>
Tue, 18 May 2021 13:35:39 +0000 (15:35 +0200)
CHANGELOG.md
package-lock.json
package.json
src/worker/abstract-worker.ts
tsconfig.json

index 20b83d5bea6703dfd57ef509564fc86402aacfcc..6d75ac56d075338390eb9cc0191b5b6bcfe21850 100644 (file)
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - `AbstractWorker` class `maxInactiveTime`, `killBehavior` and `async` attributes have been removed in favour of the same ones in the worker options `opts` public attribute.
 - `AbstractWorker` class `lastTask` attribute have been renamed to `lastTaskTimestamp`.
 - `AbstractWorker` class `interval` attribute have been renamed to `aliveInterval`.
+- `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker.
 
 ## [2.0.2] - 2021-12-05
 
index 8c0e348218ae42efbbdb6655fb87feba5a7e4fb7..610c0f6787a79c1038232c3621eff62de7269fa6 100644 (file)
       "dev": true
     },
     "@typescript-eslint/eslint-plugin": {
-      "version": "4.23.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.23.0.tgz",
-      "integrity": "sha512-tGK1y3KIvdsQEEgq6xNn1DjiFJtl+wn8JJQiETtCbdQxw1vzjXyAaIkEmO2l6Nq24iy3uZBMFQjZ6ECf1QdgGw==",
+      "version": "4.24.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.24.0.tgz",
+      "integrity": "sha512-qbCgkPM7DWTsYQGjx9RTuQGswi+bEt0isqDBeo+CKV0953zqI0Tp7CZ7Fi9ipgFA6mcQqF4NOVNwS/f2r6xShw==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/experimental-utils": "4.23.0",
-        "@typescript-eslint/scope-manager": "4.23.0",
+        "@typescript-eslint/experimental-utils": "4.24.0",
+        "@typescript-eslint/scope-manager": "4.24.0",
         "debug": "^4.1.1",
         "functional-red-black-tree": "^1.0.1",
         "lodash": "^4.17.15",
       }
     },
     "@typescript-eslint/experimental-utils": {
-      "version": "4.23.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.23.0.tgz",
-      "integrity": "sha512-WAFNiTDnQfrF3Z2fQ05nmCgPsO5o790vOhmWKXbbYQTO9erE1/YsFot5/LnOUizLzU2eeuz6+U/81KV5/hFTGA==",
+      "version": "4.24.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.24.0.tgz",
+      "integrity": "sha512-IwTT2VNDKH1h8RZseMH4CcYBz6lTvRoOLDuuqNZZoThvfHEhOiZPQCow+5El3PtyxJ1iDr6UXZwYtE3yZQjhcw==",
       "dev": true,
       "requires": {
         "@types/json-schema": "^7.0.3",
-        "@typescript-eslint/scope-manager": "4.23.0",
-        "@typescript-eslint/types": "4.23.0",
-        "@typescript-eslint/typescript-estree": "4.23.0",
+        "@typescript-eslint/scope-manager": "4.24.0",
+        "@typescript-eslint/types": "4.24.0",
+        "@typescript-eslint/typescript-estree": "4.24.0",
         "eslint-scope": "^5.0.0",
         "eslint-utils": "^2.0.0"
       }
     },
     "@typescript-eslint/parser": {
-      "version": "4.23.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.23.0.tgz",
-      "integrity": "sha512-wsvjksHBMOqySy/Pi2Q6UuIuHYbgAMwLczRl4YanEPKW5KVxI9ZzDYh3B5DtcZPQTGRWFJrfcbJ6L01Leybwug==",
+      "version": "4.24.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.24.0.tgz",
+      "integrity": "sha512-dj1ZIh/4QKeECLb2f/QjRwMmDArcwc2WorWPRlB8UNTZlY1KpTVsbX7e3ZZdphfRw29aTFUSNuGB8w9X5sS97w==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/scope-manager": "4.23.0",
-        "@typescript-eslint/types": "4.23.0",
-        "@typescript-eslint/typescript-estree": "4.23.0",
+        "@typescript-eslint/scope-manager": "4.24.0",
+        "@typescript-eslint/types": "4.24.0",
+        "@typescript-eslint/typescript-estree": "4.24.0",
         "debug": "^4.1.1"
       }
     },
     "@typescript-eslint/scope-manager": {
-      "version": "4.23.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.23.0.tgz",
-      "integrity": "sha512-ZZ21PCFxPhI3n0wuqEJK9omkw51wi2bmeKJvlRZPH5YFkcawKOuRMQMnI8mH6Vo0/DoHSeZJnHiIx84LmVQY+w==",
+      "version": "4.24.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.24.0.tgz",
+      "integrity": "sha512-9+WYJGDnuC9VtYLqBhcSuM7du75fyCS/ypC8c5g7Sdw7pGL4NDTbeH38eJPfzIydCHZDoOgjloxSAA3+4l/zsA==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.23.0",
-        "@typescript-eslint/visitor-keys": "4.23.0"
+        "@typescript-eslint/types": "4.24.0",
+        "@typescript-eslint/visitor-keys": "4.24.0"
       }
     },
     "@typescript-eslint/types": {
-      "version": "4.23.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.23.0.tgz",
-      "integrity": "sha512-oqkNWyG2SLS7uTWLZf6Sr7Dm02gA5yxiz1RP87tvsmDsguVATdpVguHr4HoGOcFOpCvx9vtCSCyQUGfzq28YCw==",
+      "version": "4.24.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.24.0.tgz",
+      "integrity": "sha512-tkZUBgDQKdvfs8L47LaqxojKDE+mIUmOzdz7r+u+U54l3GDkTpEbQ1Jp3cNqqAU9vMUCBA1fitsIhm7yN0vx9Q==",
       "dev": true
     },
     "@typescript-eslint/typescript-estree": {
-      "version": "4.23.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.23.0.tgz",
-      "integrity": "sha512-5Sty6zPEVZF5fbvrZczfmLCOcby3sfrSPu30qKoY1U3mca5/jvU5cwsPb/CO6Q3ByRjixTMIVsDkqwIxCf/dMw==",
+      "version": "4.24.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.24.0.tgz",
+      "integrity": "sha512-kBDitL/by/HK7g8CYLT7aKpAwlR8doshfWz8d71j97n5kUa5caHWvY0RvEUEanL/EqBJoANev8Xc/mQ6LLwXGA==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.23.0",
-        "@typescript-eslint/visitor-keys": "4.23.0",
+        "@typescript-eslint/types": "4.24.0",
+        "@typescript-eslint/visitor-keys": "4.24.0",
         "debug": "^4.1.1",
         "globby": "^11.0.1",
         "is-glob": "^4.0.1",
       }
     },
     "@typescript-eslint/visitor-keys": {
-      "version": "4.23.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.23.0.tgz",
-      "integrity": "sha512-5PNe5cmX9pSifit0H+nPoQBXdbNzi5tOEec+3riK+ku4e3er37pKxMKDH5Ct5Y4fhWxcD4spnlYjxi9vXbSpwg==",
+      "version": "4.24.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.24.0.tgz",
+      "integrity": "sha512-4ox1sjmGHIxjEDBnMCtWFFhErXtKA1Ec0sBpuz0fqf3P+g3JFGyTxxbF06byw0FRsPnnbq44cKivH7Ks1/0s6g==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.23.0",
+        "@typescript-eslint/types": "4.24.0",
         "eslint-visitor-keys": "^2.0.0"
       }
     },
       }
     },
     "eslint-plugin-jsdoc": {
-      "version": "34.6.3",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.6.3.tgz",
-      "integrity": "sha512-ixty4/Zl7cZ0fcvqQAWKuTzQ5hnWIirZOuJrzLtWV0RwF4E70/WG5vLXyppxDFbLCiwmYXjSkiqBfcKfm4VA3Q==",
+      "version": "34.7.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.7.0.tgz",
+      "integrity": "sha512-H2zrJorJfocd//PNNYsrPxWNAQjHONzIHGZ9CFYISyfZCOTXYUzH8CyA95LHYpZqGf5UEueHiwl+0bzWreqAjQ==",
       "dev": true,
       "requires": {
         "@es-joy/jsdoccomment": "^0.6.0",
       }
     },
     "prettier-plugin-organize-imports": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-2.0.0.tgz",
-      "integrity": "sha512-jPSE5sqFAu+lyKqwcN4zlSHaZmI6/3sJ2F+BkKn7iGCwNdPba1FPUJrx5bPzWnGyrQwGKQZYCuHgVQlCzohing==",
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-2.1.0.tgz",
+      "integrity": "sha512-P6TzXkuZRV4g9Fl363tN+r6/ecynu0fwmItKCb/04iksrUtwl/6Jf4DxBPuW8UbcgFRadltxB0VlV5Yh1Ec0Ow==",
       "dev": true
     },
     "prettierx": {
index c335dc1397c94921300fe566e67833e174309850..488bca0342f46ed38367c38e88a34cf476bdb7ff 100644 (file)
   ],
   "devDependencies": {
     "@types/node": "^14.14.45",
-    "@typescript-eslint/eslint-plugin": "^4.23.0",
-    "@typescript-eslint/parser": "^4.23.0",
+    "@typescript-eslint/eslint-plugin": "^4.24.0",
+    "@typescript-eslint/parser": "^4.24.0",
     "benchmark": "^2.1.4",
     "eslint": "^7.26.0",
     "eslint-config-standard": "^16.0.2",
     "eslint-define-config": "^1.0.8",
     "eslint-plugin-import": "^2.23.2",
-    "eslint-plugin-jsdoc": "^34.6.3",
+    "eslint-plugin-jsdoc": "^34.7.0",
     "eslint-plugin-node": "^11.1.0",
     "eslint-plugin-prettierx": "^0.18.0",
     "eslint-plugin-promise": "^5.1.0",
@@ -81,7 +81,7 @@
     "mocha": "^8.4.0",
     "nyc": "^15.1.0",
     "prettier": "^2.3.0",
-    "prettier-plugin-organize-imports": "^2.0.0",
+    "prettier-plugin-organize-imports": "^2.1.0",
     "prettierx": "^0.18.0",
     "rollup": "^2.48.0",
     "rollup-plugin-analyzer": "^4.0.0",
index 4a6241a8ccfdb1c7426504568989c3c293983405..520be7cd0041ee29604a8f79ddf046b78677e702 100644 (file)
@@ -43,7 +43,7 @@ export abstract class AbstractWorker<
     type: string,
     isMain: boolean,
     fn: (data: Data) => Response,
-    protected mainWorker?: MainWorker | null,
+    protected mainWorker: MainWorker | null,
     public readonly opts: WorkerOptions = {
       /**
        * The kill behavior option on this Worker or its default value.
index 63fc2cf073b9554f707b161b4f921045bcffb24e..2ac8fa7d1898feaf841d59d98872f761e9c19a5e 100644 (file)
@@ -1,7 +1,7 @@
 {
   "compilerOptions": {
-    "target": "ES2018",
-    "module": "ES2015",
+    "target": "ES2019",
+    "module": "ES2020",
     "outDir": "lib",
     "esModuleInterop": true,
     "declaration": true,