From 14b2ce61f2a24fb246ef4c8896649a7dae561c1d Mon Sep 17 00:00:00 2001 From: Jack Steam Date: Fri, 29 May 2020 09:27:32 -0500 Subject: [PATCH 1/2] Fix build config Add lib folder tests --- rollup.config.js | 6 --- tests/demo-cjs.test.js | 103 +++++++++++++++++++++++++++++++++++++++++ tests/demo-esm.test.js | 101 ++++++++++++++++++++++++++++++++++++++++ tsconfig.base.json | 6 +-- 4 files changed, 207 insertions(+), 9 deletions(-) create mode 100644 tests/demo-cjs.test.js create mode 100644 tests/demo-esm.test.js diff --git a/rollup.config.js b/rollup.config.js index 2ef4aa0..39276d3 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -18,12 +18,6 @@ export default [ sourcemap: true, }, ], - external: [ - 'chrome-promise', - '@bumble/chrome-rxjs', - 'rxjs', - 'rxjs/operators', - ], plugins: [ typescript({ tsconfig: './tsconfig.base.json', diff --git a/tests/demo-cjs.test.js b/tests/demo-cjs.test.js new file mode 100644 index 0000000..b95eebb --- /dev/null +++ b/tests/demo-cjs.test.js @@ -0,0 +1,103 @@ +const { chrome } = require('../lib/index.cjs') + +test('chrome api events', () => { + const listenerSpy = jest.fn() + const sendResponseSpy = jest.fn() + + chrome.runtime.onMessage.addListener(listenerSpy) + + expect(listenerSpy).not.toBeCalled() + expect(chrome.runtime.onMessage.hasListeners()).toBe(true) + + chrome.runtime.onMessage.callListeners( + { greeting: 'hello' }, // message + {}, // MessageSender object + sendResponseSpy, // SendResponse function + ) + + expect(listenerSpy).toBeCalledWith( + { greeting: 'hello' }, + {}, + sendResponseSpy, + ) + expect(sendResponseSpy).not.toBeCalled() +}) + +test('chrome api functions', () => { + const manifest = { + name: 'my chrome extension', + manifest_version: 2, + version: '1.0.0', + } + + chrome.runtime.getManifest.mockImplementation( + () => manifest, + ) + + expect(chrome.runtime.getManifest()).toEqual(manifest) + expect(chrome.runtime.getManifest).toBeCalled() +}) + +test('chrome api functions with callback', () => { + const message = { greeting: 'hello?' } + const response = { greeting: 'here I am' } + const callbackSpy = jest.fn() + + chrome.runtime.sendMessage.mockImplementation( + (message, callback) => { + callback(response) + }, + ) + + chrome.runtime.sendMessage(message, callbackSpy) + + expect(chrome.runtime.sendMessage).toBeCalledWith( + message, + callbackSpy, + ) + expect(callbackSpy).toBeCalledWith(response) +}) + +test('chrome api functions with lastError', () => { + const message = { greeting: 'hello?' } + const response = { greeting: 'here I am' } + + // lastError setup + const lastErrorMessage = 'this is an error' + const lastErrorGetter = jest.fn(() => lastErrorMessage) + const lastError = { + get message() { + return lastErrorGetter() + }, + } + + // mock implementation + chrome.runtime.sendMessage.mockImplementation( + (message, callback) => { + chrome.runtime.lastError = lastError + + callback(response) + + // lastError is undefined outside of a callback + delete chrome.runtime.lastError + }, + ) + + // callback implementation + const lastErrorSpy = jest.fn() + const callbackSpy = jest.fn(() => { + if (chrome.runtime.lastError) { + lastErrorSpy(chrome.runtime.lastError.message) + } + }) + + // send a message + chrome.runtime.sendMessage(message, callbackSpy) + + expect(callbackSpy).toBeCalledWith(response) + expect(lastErrorGetter).toBeCalled() + expect(lastErrorSpy).toBeCalledWith(lastErrorMessage) + + // lastError has been cleared + expect(chrome.runtime.lastError).toBeUndefined() +}) diff --git a/tests/demo-esm.test.js b/tests/demo-esm.test.js new file mode 100644 index 0000000..8b61158 --- /dev/null +++ b/tests/demo-esm.test.js @@ -0,0 +1,101 @@ +import { chrome } from '../lib/index.esm' + +test('chrome api events', () => { + const listenerSpy = jest.fn() + const sendResponseSpy = jest.fn() + + chrome.runtime.onMessage.addListener(listenerSpy) + + expect(listenerSpy).not.toBeCalled() + expect(chrome.runtime.onMessage.hasListeners()).toBe(true) + + chrome.runtime.onMessage.callListeners( + { greeting: 'hello' }, // message + {}, // MessageSender object + sendResponseSpy, // SendResponse function + ) + + expect(listenerSpy).toBeCalledWith( + { greeting: 'hello' }, + {}, + sendResponseSpy, + ) + expect(sendResponseSpy).not.toBeCalled() +}) + +test('chrome api functions', () => { + const manifest = { + name: 'my chrome extension', + manifest_version: 2, + version: '1.0.0', + } + + chrome.runtime.getManifest.mockImplementation(() => manifest) + + expect(chrome.runtime.getManifest()).toEqual(manifest) + expect(chrome.runtime.getManifest).toBeCalled() +}) + +test('chrome api functions with callback', () => { + const message = { greeting: 'hello?' } + const response = { greeting: 'here I am' } + const callbackSpy = jest.fn() + + chrome.runtime.sendMessage.mockImplementation( + (message, callback) => { + callback(response) + }, + ) + + chrome.runtime.sendMessage(message, callbackSpy) + + expect(chrome.runtime.sendMessage).toBeCalledWith( + message, + callbackSpy, + ) + expect(callbackSpy).toBeCalledWith(response) +}) + +test('chrome api functions with lastError', () => { + const message = { greeting: 'hello?' } + const response = { greeting: 'here I am' } + + // lastError setup + const lastErrorMessage = 'this is an error' + const lastErrorGetter = jest.fn(() => lastErrorMessage) + const lastError = { + get message() { + return lastErrorGetter() + }, + } + + // mock implementation + chrome.runtime.sendMessage.mockImplementation( + (message, callback) => { + chrome.runtime.lastError = lastError + + callback(response) + + // lastError is undefined outside of a callback + delete chrome.runtime.lastError + }, + ) + + // callback implementation + const lastErrorSpy = jest.fn() + const callbackSpy = jest.fn(() => { + if (chrome.runtime.lastError) { + lastErrorSpy(chrome.runtime.lastError.message) + } + }) + + // send a message + chrome.runtime.sendMessage(message, callbackSpy) + + expect(callbackSpy).toBeCalledWith(response) + expect(lastErrorGetter).toBeCalled() + expect(lastErrorSpy).toBeCalledWith(lastErrorMessage) + + // lastError has been cleared + expect(chrome.runtime.lastError).toBeUndefined() +}) diff --git a/tsconfig.base.json b/tsconfig.base.json index 2c48bc0..7d8c374 100755 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,19 +1,19 @@ { "compilerOptions": { - "allowJs": true, "allowSyntheticDefaultImports": true, "esModuleInterop": true, "lib": ["es2017", "dom", "esnext.array"], - "module": "CommonJS", + "module": "ES2015", "moduleResolution": "node", "noImplicitReturns": true, "noUnusedLocals": true, "resolveJsonModule": true, + "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "es2017" }, - "exclude": ["lib", "playground"], + "exclude": ["lib", "playground", "tests"], "typeAcquisition": { "enable": true } From 34602dd4e9850fcf2a67de592052e4a28df553b1 Mon Sep 17 00:00:00 2001 From: Jack Steam Date: Fri, 29 May 2020 09:28:35 -0500 Subject: [PATCH 2/2] Update package deps Remove unused deps Sort package.json --- package.json | 29 ++--- pnpm-lock.yaml | 343 +++++++++++++++++-------------------------------- 2 files changed, 130 insertions(+), 242 deletions(-) diff --git a/package.json b/package.json index 708ea16..a7c7622 100644 --- a/package.json +++ b/package.json @@ -26,22 +26,21 @@ ], "scripts": { "build": "run-s build:clean build:pro build:types build:copy", + "build:clean": "rm -rf lib types", "build:copy": "copyfiles -f src/jest-chrome.d.ts types", "build:dev": "rollup -c --environment NODE_ENV:development", "build:pro": "rollup -c --environment NODE_ENV:production", "build:types": "tsc -p tsconfig.d.json", - "build:clean": "rm -rf lib types", "build:watch": "npm run build:dev -- -w", "release:beta": "git push && npm publish --tag beta", "release:full": "git push && npm publish", "start": "run-p build:watch", + "pretest": "npm run build", "test": "jest", - "preversion": "run-s test build" + "preversion": "npm run test" }, "dependencies": { - "@bumble/chrome-rxjs": "^0.10.1", - "@types/chrome": "^0.0.113", - "rxjs": "^6.5.5" + "@types/chrome": "^0.0.114" }, "devDependencies": { "@rollup/plugin-commonjs": "^12.0.0", @@ -53,29 +52,27 @@ "@types/fs-extra": "^9.0.1", "@types/jest": "^25.2.3", "@types/jest-in-case": "^1.0.2", - "@types/lodash": "^4.14.152", - "@types/node": "^14.0.4", + "@types/lodash": "^4.14.153", + "@types/node": "^14.0.5", "@types/power-assert": "^1.5.3", "@types/puppeteer": "^3.0.0", - "@typescript-eslint/eslint-plugin": "^2.34.0", - "@typescript-eslint/parser": "^2.34.0", + "@typescript-eslint/eslint-plugin": "^3.0.2", + "@typescript-eslint/parser": "^3.0.2", "chrome-promise": "^3.0.5", - "copyfiles": "^2.2.0", - "delay": "^4.3.0", - "eslint": "^7.0.0", - "eslint-plugin-jest": "^23.13.1", + "copyfiles": "^2.3.0", + "eslint": "^7.1.0", + "eslint-plugin-jest": "^23.13.2", "fs-extra": "^9.0.0", "jest": "^26.0.1", - "jest-in-case": "^1.0.2", "lodash": "^4.17.15", "npm-run-all": "^4.1.5", "prettier": "^2.0.5", - "rollup": "^2.10.5", + "rollup": "^2.11.2", "ts-jest": "^26.0.0", "tslib": "^2.0.0", "typescript": "^3.9.3" }, "peerDependencies": { - "jest": "^26.0.1" + "jest": "^24.9.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0076dd..1f6ae8f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,46 +1,36 @@ dependencies: - '@bumble/chrome-rxjs': 0.10.1 - '@types/chrome': 0.0.113 - rxjs: 6.5.5 + '@types/chrome': 0.0.114 devDependencies: - '@rollup/plugin-commonjs': 12.0.0_rollup@2.10.5 - '@rollup/plugin-json': 4.0.3_rollup@2.10.5 - '@rollup/plugin-node-resolve': 8.0.0_rollup@2.10.5 - '@rollup/plugin-typescript': 4.1.2_6aa5b210aa501fad04b433775d815a2c + '@rollup/plugin-commonjs': 12.0.0_rollup@2.11.2 + '@rollup/plugin-json': 4.0.3_rollup@2.11.2 + '@rollup/plugin-node-resolve': 8.0.0_rollup@2.11.2 + '@rollup/plugin-typescript': 4.1.2_5c4aaeb72465be4cdf9f7ae1b52eddbf '@sucrase/jest-plugin': 2.0.0 '@types/filesystem': 0.0.29 '@types/fs-extra': 9.0.1 '@types/jest': 25.2.3 '@types/jest-in-case': 1.0.2 - '@types/lodash': 4.14.152 - '@types/node': 14.0.4 + '@types/lodash': 4.14.153 + '@types/node': 14.0.5 '@types/power-assert': 1.5.3 '@types/puppeteer': 3.0.0 - '@typescript-eslint/eslint-plugin': 2.34.0_c2ce56dad406ac5b5afd5779dddf4f93 - '@typescript-eslint/parser': 2.34.0_eslint@7.0.0+typescript@3.9.3 + '@typescript-eslint/eslint-plugin': 3.0.2_6305112a4dd05588288c08258cda3068 + '@typescript-eslint/parser': 3.0.2_eslint@7.1.0+typescript@3.9.3 chrome-promise: 3.0.5 - copyfiles: 2.2.0 - delay: 4.3.0 - eslint: 7.0.0 - eslint-plugin-jest: 23.13.1_eslint@7.0.0+typescript@3.9.3 + copyfiles: 2.3.0 + eslint: 7.1.0 + eslint-plugin-jest: 23.13.2_eslint@7.1.0+typescript@3.9.3 fs-extra: 9.0.0 jest: 26.0.1 - jest-in-case: 1.0.2 lodash: 4.17.15 npm-run-all: 4.1.5 prettier: 2.0.5 - rollup: 2.10.5 + rollup: 2.11.2 ts-jest: 26.0.0_jest@26.0.1+typescript@3.9.3 tslib: 2.0.0 typescript: 3.9.3 lockfileVersion: 5.1 packages: - /@babel/code-frame/7.5.5: - dependencies: - '@babel/highlight': 7.5.0 - dev: true - resolution: - integrity: sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== /@babel/code-frame/7.8.3: dependencies: '@babel/highlight': 7.9.0 @@ -161,14 +151,6 @@ packages: dev: true resolution: integrity: sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw== - /@babel/highlight/7.5.0: - dependencies: - chalk: 2.4.2 - esutils: 2.0.3 - js-tokens: 4.0.0 - dev: true - resolution: - integrity: sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== /@babel/highlight/7.9.0: dependencies: '@babel/helper-validator-identifier': 7.9.5 @@ -308,12 +290,6 @@ packages: dev: true resolution: integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - /@bumble/chrome-rxjs/0.10.1: - dependencies: - rxjs: 6.5.4 - dev: false - resolution: - integrity: sha512-S0ZhMfgaY8XDscJp0urbZjPg7ulhkty+jc8tLLyxR8AZn2lrqrUlsQd7mg3gZtiBx8Ng1TnzLF4URgsu2DYANQ== /@cnakazawa/watch/1.0.4: dependencies: exec-sh: 0.3.4 @@ -530,16 +506,16 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-IbtjvqI9+eS1qFnOIEL7ggWmT+iK/U+Vde9cGWtYb/b6XgKb3X44ZAe/z9YZzoAAZ/E92m0DqrilF934IGNnQA== - /@rollup/plugin-commonjs/12.0.0_rollup@2.10.5: + /@rollup/plugin-commonjs/12.0.0_rollup@2.11.2: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@2.10.5 + '@rollup/pluginutils': 3.0.10_rollup@2.11.2 commondir: 1.0.1 estree-walker: 1.0.1 glob: 7.1.6 is-reference: 1.1.4 magic-string: 0.25.6 resolve: 1.14.2 - rollup: 2.10.5 + rollup: 2.11.2 dev: true engines: node: '>= 8.0.0' @@ -547,25 +523,25 @@ packages: rollup: ^2.3.4 resolution: integrity: sha512-8+mDQt1QUmN+4Y9D3yCG8AJNewuTSLYPJVzKKUZ+lGeQrI+bV12Tc5HCyt2WdlnG6ihIL/DPbKRJlB40DX40mw== - /@rollup/plugin-json/4.0.3_rollup@2.10.5: + /@rollup/plugin-json/4.0.3_rollup@2.11.2: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@2.10.5 - rollup: 2.10.5 + '@rollup/pluginutils': 3.0.10_rollup@2.11.2 + rollup: 2.11.2 dev: true peerDependencies: rollup: ^1.20.0 || ^2.0.0 resolution: integrity: sha512-QMUT0HZNf4CX17LMdwaslzlYHUKTYGuuk34yYIgZrNdu+pMEfqMS55gck7HEeHBKXHM4cz5Dg1OVwythDdbbuQ== - /@rollup/plugin-node-resolve/8.0.0_rollup@2.10.5: + /@rollup/plugin-node-resolve/8.0.0_rollup@2.11.2: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@2.10.5 + '@rollup/pluginutils': 3.0.10_rollup@2.11.2 '@types/resolve': 0.0.8 builtin-modules: 3.1.0 deep-freeze: 0.0.1 deepmerge: 4.2.2 is-module: 1.0.0 resolve: 1.14.2 - rollup: 2.10.5 + rollup: 2.11.2 dev: true engines: node: '>= 8.0.0' @@ -573,11 +549,11 @@ packages: rollup: ^1.20.0||^2.0.0 resolution: integrity: sha512-5poJCChrkVggXXND/sQ7yNqwjUNT4fP31gpRWCnSNnlXuUXTCMHT33xZrTGxgjm5Rl18MHj7iEzlCT8rYWwQSA== - /@rollup/plugin-typescript/4.1.2_6aa5b210aa501fad04b433775d815a2c: + /@rollup/plugin-typescript/4.1.2_5c4aaeb72465be4cdf9f7ae1b52eddbf: dependencies: - '@rollup/pluginutils': 3.0.10_rollup@2.10.5 + '@rollup/pluginutils': 3.0.10_rollup@2.11.2 resolve: 1.14.2 - rollup: 2.10.5 + rollup: 2.11.2 tslib: 2.0.0 typescript: 3.9.3 dev: true @@ -589,12 +565,12 @@ packages: typescript: '>=2.1.0' resolution: integrity: sha512-+7UlGat/99e2JbmGNnIauxwEhYLwrL7adO/tSJxUN57xrrS3Ps+ZzYpLCDGPZJ57j+ZJTZLLN89KXW9JMEB+jg== - /@rollup/pluginutils/3.0.10_rollup@2.10.5: + /@rollup/pluginutils/3.0.10_rollup@2.11.2: dependencies: '@types/estree': 0.0.39 estree-walker: 1.0.1 picomatch: 2.2.2 - rollup: 2.10.5 + rollup: 2.11.2 dev: true engines: node: '>= 8.0.0' @@ -649,13 +625,13 @@ packages: dev: true resolution: integrity: sha512-ddHK5icION5U6q11+tV2f9Mo6CZVuT8GJKld2q9LqHSZbvLbH34Kcu2yFGckZut453+eQU6btIA3RihmnRgI+Q== - /@types/chrome/0.0.113: + /@types/chrome/0.0.114: dependencies: '@types/filesystem': 0.0.29 '@types/har-format': 1.2.4 dev: false resolution: - integrity: sha512-IlUaU/tgQ3skl0D4QsvwzWZXAHRdAesNS0CNt0mKIyUugWbZjdHS6EPFnf6BDw0ezh/QvYwWnM0iYSWYcy/Z3A== + integrity: sha512-i7qRr74IrxHtbnrZSKUuP5Uvd5EOKwlwJq/yp7+yTPihOXnPhNQO4Z5bqb1XTnrjdbUKEJicaVVbhcgtRijmLA== /@types/color-name/1.1.1: dev: true resolution: @@ -748,10 +724,10 @@ packages: dev: true resolution: integrity: sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== - /@types/lodash/4.14.152: + /@types/lodash/4.14.153: dev: true resolution: - integrity: sha512-Vwf9YF2x1GE3WNeUMjT5bTHa2DqgUo87ocdgTScupY2JclZ5Nn7W2RLM/N0+oreexUk8uaVugR81NnTY/jNNXg== + integrity: sha512-lYniGRiRfZf2gGAR9cfRC3Pi5+Q1ziJCKqPmjZocigrSJUVPWf7st1BtSJ8JOeK0FLXVndQ1IjUjTco9CXGo/Q== /@types/node/13.1.8: dev: true resolution: @@ -760,6 +736,10 @@ packages: dev: true resolution: integrity: sha512-k3NqigXWRzQZVBDS5D1U70A5E8Qk4Kh+Ha/x4M8Bt9pF0X05eggfnC9+63Usc9Q928hRUIpIhTQaXsZwZBl4Ew== + /@types/node/14.0.5: + dev: true + resolution: + integrity: sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA== /@types/normalize-package-data/2.4.0: dev: true resolution: @@ -805,32 +785,33 @@ packages: dev: true resolution: integrity: sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w== - /@typescript-eslint/eslint-plugin/2.34.0_c2ce56dad406ac5b5afd5779dddf4f93: + /@typescript-eslint/eslint-plugin/3.0.2_6305112a4dd05588288c08258cda3068: dependencies: - '@typescript-eslint/experimental-utils': 2.34.0_eslint@7.0.0+typescript@3.9.3 - '@typescript-eslint/parser': 2.34.0_eslint@7.0.0+typescript@3.9.3 - eslint: 7.0.0 + '@typescript-eslint/experimental-utils': 3.0.2_eslint@7.1.0+typescript@3.9.3 + '@typescript-eslint/parser': 3.0.2_eslint@7.1.0+typescript@3.9.3 + eslint: 7.1.0 functional-red-black-tree: 1.0.1 regexpp: 3.1.0 + semver: 7.3.2 tsutils: 3.17.1_typescript@3.9.3 typescript: 3.9.3 dev: true engines: - node: ^8.10.0 || ^10.13.0 || >=11.10.1 + node: ^10.12.0 || >=12.0.0 peerDependencies: - '@typescript-eslint/parser': ^2.0.0 - eslint: ^5.0.0 || ^6.0.0 + '@typescript-eslint/parser': ^3.0.0 + eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true resolution: - integrity: sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ== - /@typescript-eslint/experimental-utils/2.34.0_eslint@7.0.0+typescript@3.9.3: + integrity: sha512-ER3bSS/A/pKQT/hjMGCK8UQzlL0yLjuCZ/G8CDFJFVTfl3X65fvq2lNYqOG8JPTfrPa2RULCdwfOyFjZEMNExQ== + /@typescript-eslint/experimental-utils/2.34.0_eslint@7.1.0+typescript@3.9.3: dependencies: '@types/json-schema': 7.0.4 '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.3 - eslint: 7.0.0 + eslint: 7.1.0 eslint-scope: 5.0.0 eslint-utils: 2.0.0 dev: true @@ -841,25 +822,40 @@ packages: typescript: '*' resolution: integrity: sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA== - /@typescript-eslint/parser/2.34.0_eslint@7.0.0+typescript@3.9.3: + /@typescript-eslint/experimental-utils/3.0.2_eslint@7.1.0+typescript@3.9.3: + dependencies: + '@types/json-schema': 7.0.4 + '@typescript-eslint/typescript-estree': 3.0.2_typescript@3.9.3 + eslint: 7.1.0 + eslint-scope: 5.0.0 + eslint-utils: 2.0.0 + dev: true + engines: + node: ^10.12.0 || >=12.0.0 + peerDependencies: + eslint: '*' + typescript: '*' + resolution: + integrity: sha512-4Wc4EczvoY183SSEnKgqAfkj1eLtRgBQ04AAeG+m4RhTVyaazxc1uI8IHf0qLmu7xXe9j1nn+UoDJjbmGmuqXQ== + /@typescript-eslint/parser/3.0.2_eslint@7.1.0+typescript@3.9.3: dependencies: '@types/eslint-visitor-keys': 1.0.0 - '@typescript-eslint/experimental-utils': 2.34.0_eslint@7.0.0+typescript@3.9.3 - '@typescript-eslint/typescript-estree': 2.34.0_typescript@3.9.3 - eslint: 7.0.0 + '@typescript-eslint/experimental-utils': 3.0.2_eslint@7.1.0+typescript@3.9.3 + '@typescript-eslint/typescript-estree': 3.0.2_typescript@3.9.3 + eslint: 7.1.0 eslint-visitor-keys: 1.1.0 typescript: 3.9.3 dev: true engines: - node: ^8.10.0 || ^10.13.0 || >=11.10.1 + node: ^10.12.0 || >=12.0.0 peerDependencies: - eslint: ^5.0.0 || ^6.0.0 + eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true resolution: - integrity: sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA== + integrity: sha512-80Z7s83e8QXHNUspqVlWwb4t5gdz/1bBBmafElbK1wwAwiD/yvJsFyHRxlEpNrt4rdK6eB3p+2WEFkEDHAKk9w== /@typescript-eslint/typescript-estree/2.34.0_typescript@3.9.3: dependencies: debug: 4.1.1 @@ -880,6 +876,26 @@ packages: optional: true resolution: integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg== + /@typescript-eslint/typescript-estree/3.0.2_typescript@3.9.3: + dependencies: + debug: 4.1.1 + eslint-visitor-keys: 1.1.0 + glob: 7.1.6 + is-glob: 4.0.1 + lodash: 4.17.15 + semver: 7.3.2 + tsutils: 3.17.1_typescript@3.9.3 + typescript: 3.9.3 + dev: true + engines: + node: ^10.12.0 || >=12.0.0 + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + resolution: + integrity: sha512-cs84mxgC9zQ6viV8MEcigfIKQmKtBkZNDYf8Gru2M+MhnA6z9q0NFMZm2IEzKqAwN8lY5mFVd1Z8DiHj6zQ3Tw== /abab/2.0.3: dev: true resolution: @@ -912,15 +928,6 @@ packages: hasBin: true resolution: integrity: sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ== - /ajv/6.10.2: - dependencies: - fast-deep-equal: 2.0.1 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.2.2 - dev: true - resolution: - integrity: sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== /ajv/6.12.2: dependencies: fast-deep-equal: 3.1.1 @@ -930,14 +937,6 @@ packages: dev: true resolution: integrity: sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== - /ansi-escapes/4.3.0: - dependencies: - type-fest: 0.8.1 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg== /ansi-escapes/4.3.1: dependencies: type-fest: 0.11.0 @@ -1343,14 +1342,6 @@ packages: dev: true resolution: integrity: sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= - /cliui/5.0.0: - dependencies: - string-width: 3.1.0 - strip-ansi: 5.2.0 - wrap-ansi: 5.1.0 - dev: true - resolution: - integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== /cliui/6.0.0: dependencies: string-width: 4.2.0 @@ -1439,18 +1430,18 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - /copyfiles/2.2.0: + /copyfiles/2.3.0: dependencies: glob: 7.1.6 minimatch: 3.0.4 - mkdirp: 0.5.1 + mkdirp: 1.0.4 noms: 0.0.0 through2: 2.0.5 - yargs: 13.3.0 + yargs: 15.3.1 dev: true hasBin: true resolution: - integrity: sha512-iJbHJI+8OKqsq+4JF0rqgRkZzo++jqO6Wf4FUU1JM41cJF6JcY5968XyF4tm3Kkm7ZOMrqlljdm8N9oyY5raGw== + integrity: sha512-73v7KFuDFJ/ofkQjZBMjMBFWGgkS76DzXvBMUh7djsMOE5EELWtAO/hRB6Wr5Vj5Zg+YozvoHemv0vnXpqxmOQ== /core-util-is/1.0.2: dev: true resolution: @@ -1586,12 +1577,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - /delay/4.3.0: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-Lwaf3zVFDMBop1yDuFZ19F9WyGcZcGacsbdlZtWjQmM50tOcMntm1njF/Nb/Vjij3KaSvCF+sEYGKrrjObu2NA== /delayed-stream/1.0.0: dev: true engines: @@ -1713,10 +1698,10 @@ packages: source-map: 0.6.1 resolution: integrity: sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== - /eslint-plugin-jest/23.13.1_eslint@7.0.0+typescript@3.9.3: + /eslint-plugin-jest/23.13.2_eslint@7.1.0+typescript@3.9.3: dependencies: - '@typescript-eslint/experimental-utils': 2.34.0_eslint@7.0.0+typescript@3.9.3 - eslint: 7.0.0 + '@typescript-eslint/experimental-utils': 2.34.0_eslint@7.1.0+typescript@3.9.3 + eslint: 7.1.0 dev: true engines: node: '>=8' @@ -1724,7 +1709,7 @@ packages: eslint: '>=5' typescript: '*' resolution: - integrity: sha512-TRLJH6M6EDvGocD98a7yVThrAOCK9WJfo9phuUb0MJptcrOYZeCKzC9aOzZCD93sxXCsiJVZywaTHdI/mAi0FQ== + integrity: sha512-qZit+moTXTyZFNDqSIR88/L3rdBlTU7CuW6XmyErD2FfHEkdoLgThkRbiQjzgYnX6rfgLx3Ci4eJmF4Ui5v1Cw== /eslint-scope/5.0.0: dependencies: esrecurse: 4.2.1 @@ -1748,10 +1733,10 @@ packages: node: '>=4' resolution: integrity: sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== - /eslint/7.0.0: + /eslint/7.1.0: dependencies: - '@babel/code-frame': 7.5.5 - ajv: 6.10.2 + '@babel/code-frame': 7.8.3 + ajv: 6.12.2 chalk: 4.0.0 cross-spawn: 7.0.2 debug: 4.1.1 @@ -1791,7 +1776,7 @@ packages: node: ^10.12.0 || >=12.0.0 hasBin: true resolution: - integrity: sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg== + integrity: sha512-DfS3b8iHMK5z/YLSme8K5cge168I8j8o1uiVmFCgnnjxZQbCGyraF8bMl7Ju4yfBmCuxD7shOF7eqGkcuIHfsA== /espree/7.0.0: dependencies: acorn: 7.2.0 @@ -1966,10 +1951,6 @@ packages: '0': node >=0.6.0 resolution: integrity: sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - /fast-deep-equal/2.0.1: - dev: true - resolution: - integrity: sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= /fast-deep-equal/3.1.1: dev: true resolution: @@ -2023,14 +2004,6 @@ packages: node: '>=8' resolution: integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - /find-up/3.0.0: - dependencies: - locate-path: 3.0.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== /find-up/4.1.0: dependencies: locate-path: 5.0.0 @@ -2367,7 +2340,7 @@ packages: integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== /inquirer/7.0.3: dependencies: - ansi-escapes: 4.3.0 + ansi-escapes: 4.3.1 chalk: 2.4.2 cli-cursor: 3.1.0 cli-width: 2.2.0 @@ -2842,12 +2815,6 @@ packages: fsevents: 2.1.3 resolution: integrity: sha512-J9kBl/EdjmDsvyv7CiyKY5+DsTvVOScenprz/fGqfLg/pm1gdjbwwQ98nW0t+OIt+f+5nAVaElvn/6wP5KO7KA== - /jest-in-case/1.0.2: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-VnRLWvMyIr0KurcM+Rnx0XCrdcw= /jest-jasmine2/26.0.1: dependencies: '@babel/traverse': 7.9.6 @@ -3300,15 +3267,6 @@ packages: node: '>=4' resolution: integrity: sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - /locate-path/3.0.0: - dependencies: - p-locate: 3.0.0 - path-exists: 3.0.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== /locate-path/5.0.0: dependencies: p-locate: 4.1.0 @@ -3456,6 +3414,7 @@ packages: /mkdirp/0.5.1: dependencies: minimist: 0.0.8 + deprecated: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) dev: true hasBin: true resolution: @@ -3717,14 +3676,6 @@ packages: node: '>=4' resolution: integrity: sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - /p-limit/2.2.2: - dependencies: - p-try: 2.2.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== /p-limit/2.3.0: dependencies: p-try: 2.2.0 @@ -3733,14 +3684,6 @@ packages: node: '>=6' resolution: integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - /p-locate/3.0.0: - dependencies: - p-limit: 2.2.2 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== /p-locate/4.1.0: dependencies: p-limit: 2.3.0 @@ -3793,12 +3736,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - /path-exists/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= /path-exists/4.0.0: dev: true engines: @@ -4156,7 +4093,7 @@ packages: /restore-cursor/3.1.0: dependencies: onetime: 5.1.0 - signal-exit: 3.0.2 + signal-exit: 3.0.3 dev: true engines: node: '>=8' @@ -4182,7 +4119,7 @@ packages: hasBin: true resolution: integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - /rollup/2.10.5: + /rollup/2.11.2: dev: true engines: node: '>=10.0.0' @@ -4190,7 +4127,7 @@ packages: optionalDependencies: fsevents: 2.1.3 resolution: - integrity: sha512-05WRM/tjmPYwhOBvm/G9Qwa/HnAqn0TK0XxLDLQzoM4XdSmKjPBvhBl+U+Q/C6VJsucljyTQjGkZD503mjbPQg== + integrity: sha512-pJT6mfH+/gh1sOWyNMAWxjbYGL5x2AfsaR0SWLRwq2e7vxOKt/0mBjtYDTVYF8JXxVzmnuDzA+EpsPLWt/oyrg== /rsvp/4.8.5: dev: true engines: @@ -4208,18 +4145,11 @@ packages: /rxjs/6.5.4: dependencies: tslib: 1.10.0 + dev: true engines: npm: '>=2.0.0' resolution: integrity: sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== - /rxjs/6.5.5: - dependencies: - tslib: 1.10.0 - dev: false - engines: - npm: '>=2.0.0' - resolution: - integrity: sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== /safe-buffer/5.1.2: dev: true resolution: @@ -4332,10 +4262,6 @@ packages: optional: true resolution: integrity: sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== - /signal-exit/3.0.2: - dev: true - resolution: - integrity: sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= /signal-exit/3.0.3: dev: true resolution: @@ -4666,7 +4592,7 @@ packages: integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== /table/5.4.6: dependencies: - ajv: 6.10.2 + ajv: 6.12.2 lodash: 4.17.15 slice-ansi: 2.1.0 string-width: 3.1.0 @@ -4836,6 +4762,7 @@ packages: resolution: integrity: sha512-eBpWH65mGgzobuw7UZy+uPP9lwu+tPp60o324ASRX4Ijg8UC5dl2zcge4kkmqr2Zeuk9FwIjvCTOPuNMEyGWWw== /tslib/1.10.0: + dev: true resolution: integrity: sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== /tslib/2.0.0: @@ -5083,16 +5010,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - /wrap-ansi/5.1.0: - dependencies: - ansi-styles: 3.2.1 - string-width: 3.1.0 - strip-ansi: 5.2.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== /wrap-ansi/6.2.0: dependencies: ansi-styles: 4.2.1 @@ -5156,13 +5073,6 @@ packages: dev: true resolution: integrity: sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== - /yargs-parser/13.1.1: - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - dev: true - resolution: - integrity: sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== /yargs-parser/18.1.3: dependencies: camelcase: 5.3.1 @@ -5172,21 +5082,6 @@ packages: node: '>=6' resolution: integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - /yargs/13.3.0: - dependencies: - cliui: 5.0.0 - find-up: 3.0.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 3.1.0 - which-module: 2.0.0 - y18n: 4.0.0 - yargs-parser: 13.1.1 - dev: true - resolution: - integrity: sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== /yargs/15.3.1: dependencies: cliui: 6.0.0 @@ -5206,36 +5101,32 @@ packages: resolution: integrity: sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== specifiers: - '@bumble/chrome-rxjs': ^0.10.1 '@rollup/plugin-commonjs': ^12.0.0 '@rollup/plugin-json': ^4.0.3 '@rollup/plugin-node-resolve': ^8.0.0 '@rollup/plugin-typescript': ^4.1.2 '@sucrase/jest-plugin': ^2.0.0 - '@types/chrome': ^0.0.113 + '@types/chrome': ^0.0.114 '@types/filesystem': ^0.0.29 '@types/fs-extra': ^9.0.1 '@types/jest': ^25.2.3 '@types/jest-in-case': ^1.0.2 - '@types/lodash': ^4.14.152 - '@types/node': ^14.0.4 + '@types/lodash': ^4.14.153 + '@types/node': ^14.0.5 '@types/power-assert': ^1.5.3 '@types/puppeteer': ^3.0.0 - '@typescript-eslint/eslint-plugin': ^2.34.0 - '@typescript-eslint/parser': ^2.34.0 + '@typescript-eslint/eslint-plugin': ^3.0.2 + '@typescript-eslint/parser': ^3.0.2 chrome-promise: ^3.0.5 - copyfiles: ^2.2.0 - delay: ^4.3.0 - eslint: ^7.0.0 - eslint-plugin-jest: ^23.13.1 + copyfiles: ^2.3.0 + eslint: ^7.1.0 + eslint-plugin-jest: ^23.13.2 fs-extra: ^9.0.0 jest: ^26.0.1 - jest-in-case: ^1.0.2 lodash: ^4.17.15 npm-run-all: ^4.1.5 prettier: ^2.0.5 - rollup: ^2.10.5 - rxjs: ^6.5.5 + rollup: ^2.11.2 ts-jest: ^26.0.0 tslib: ^2.0.0 typescript: ^3.9.3