diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 783bf2f2c..737a01745 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -144,149 +144,3 @@ jobs: - name: 'Integration Tests' run: yarn test:integration:node --ci - -on: [push] - -jobs: - unit: - name: 'Tests: Unit' - runs-on: ubuntu-latest - steps: - - name: 'Checkout repository' - uses: actions/checkout@v2 - - - uses: actions/setup-node@v2 - with: - node-version: '14' - - - uses: actions/cache@v2 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - - - name: 'Installing' - run: yarn - - - name: 'Unit Tests' - run: yarn test:unit - - - name: 'Codecov' - uses: codecov/codecov-action@v1 - with: - directory: ./packages/upscalerjs/coverage - verbose: true - - integration-browser-browserstack: - name: 'Tests: Integration / Browser / Browserstack' - runs-on: ubuntu-latest - steps: - - name: 'BrowserStack Env Setup' # Invokes the setup-env action - uses: browserstack/github-actions/setup-env@master - with: - username: ${{ secrets.BROWSERSTACK_USERNAME }} - access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - - - name: 'Checkout repository' - uses: actions/checkout@v2 - - - uses: actions/cache@v2 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - - - name: 'Installing' - env: - NODE_OPTIONS: --max_old_space_size=8192 - run: yarn - - - name: 'Integration Tests' - run: yarn test:integration:browserstack --ci - env: - NODE_OPTIONS: --max_old_space_size=8192 - - integration-browser-local: - name: 'Tests: Integration / Browser / Local' - runs-on: ubuntu-latest - steps: - - name: 'BrowserStack Env Setup' # Invokes the setup-env action - uses: browserstack/github-actions/setup-env@master - with: - username: ${{ secrets.BROWSERSTACK_USERNAME }} - access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - - - name: 'Checkout repository' - uses: actions/checkout@v2 - - - uses: actions/cache@v2 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - - - name: 'Installing' - env: - NODE_OPTIONS: --max_old_space_size=8192 - run: yarn - - - name: 'Integration Tests' - run: yarn test:integration:browser --ci - env: - NODE_OPTIONS: --max_old_space_size=8192 - - - integration-node-local-14: - name: 'Tests: Integration / Node / Local / v14' - runs-on: ubuntu-latest - steps: - - name: 'Checkout repository' - uses: actions/checkout@v2 - - - uses: actions/setup-node@v2 - with: - node-version: '14' - - - uses: actions/cache@v2 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - - - name: 'Installing' - env: - NODE_OPTIONS: --max_old_space_size=8192 - run: yarn - - - name: 'Installing Node-specific deps' - env: - NODE_OPTIONS: --max_old_space_size=8192 - run: cd test/lib/node && yarn - - - name: 'Integration Tests' - run: yarn test:integration:node --ci - - integration-node-local-16: - name: 'Tests: Integration / Node / Local / v16' - runs-on: ubuntu-latest - steps: - - name: 'Checkout repository' - uses: actions/checkout@v2 - - - uses: actions/setup-node@v2 - with: - node-version: '16' - - - uses: actions/cache@v2 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - - - name: 'Installing' - env: - NODE_OPTIONS: --max_old_space_size=8192 - run: yarn - - - name: 'Installing Node-specific deps' - env: - NODE_OPTIONS: --max_old_space_size=8192 - run: cd test/lib/node && yarn - - - name: 'Integration Tests' - run: yarn test:integration:node --ci diff --git a/package.json b/package.json index a6d69aa43..160236109 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "canvas": "^2.9.0", "codecov": "^3.7.2", "docsify-cli": "^4.4.2", + "tslint-to-eslint-config": "1.0.0", "dotenv": "^8.2.0", "esbuild": "^0.9.6", "html-webpack-plugin": "^5.3.0", diff --git a/packages/upscalerjs/.eslintignore b/packages/upscalerjs/.eslintignore new file mode 100644 index 000000000..fabf7f08d --- /dev/null +++ b/packages/upscalerjs/.eslintignore @@ -0,0 +1,2 @@ +**/*.generated.ts +**/*.test.ts diff --git a/packages/upscalerjs/.eslintrc.js b/packages/upscalerjs/.eslintrc.js new file mode 100644 index 000000000..9f36e56db --- /dev/null +++ b/packages/upscalerjs/.eslintrc.js @@ -0,0 +1,30 @@ +module.exports = { + "env": { + "browser": true, + "es6": true + }, + "extends": [ + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "prettier", + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "tsconfig.json", + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint" + ], + "rules": { + "@typescript-eslint/semi": ["error", "always"], + "comma-dangle": ["error", "always"], + "curly": ["error", "all"], + "no-empty": [ + "error", + { + "allowEmptyCatch": true + } + ], + } +}; diff --git a/packages/upscalerjs/package.json b/packages/upscalerjs/package.json index 55f82c00e..d3b047688 100644 --- a/packages/upscalerjs/package.json +++ b/packages/upscalerjs/package.json @@ -34,11 +34,9 @@ ], "scripts": { "build": "rimraf dist && yarn build:node && yarn build:browser", - "build:browser": "rimraf dist/browser && mkdir -p dist/browser && yarn scaffold:platform 'browser' && yarn lerna run build:umd && yarn lerna run build:esm && mv dist/esm dist/browser/esm", "build:node": "rimraf dist/node && mkdir -p dist/node && yarn scaffold:platform 'node' && yarn lerna run build:cjs && mv dist/cjs dist/node/cjs", "build:node-gpu": "rimraf dist/node-gpu && mkdir -p dist/node-gpu && yarn scaffold:platform 'node-gpu' && yarn lerna run build:cjs && mv dist/cjs dist/node-gpu/cjs", - "build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs", "build:esm": "tsc --module esnext --moduleResolution node --target esnext --outDir dist/esm", "build:umd:tsc": "tsc --moduleResolution node --module es2015 --target es5 --outDir dist/tmp", @@ -46,17 +44,14 @@ "build:umd:generate": "yarn build:umd:tsc && yarn build:umd:rollup", "build:umd:compress": "uglifyjs --source-map --comments --output dist/browser/umd/upscaler.min.js -- dist/browser/umd/upscaler.js", "build:umd": "yarn build:umd:generate && yarn build:umd:compress && rimraf dist/tmp", - "scaffold:platform": "ts-node ../../scripts/scaffold-platform.ts", - "docs:serve": "docsify serve docs --port 3030", "prepare": "yarn build", "preversion": "yarn lint", "prepublishOnly": "yarn test && yarn lint", "format": "echo 'Formatting code' && prettier --write \"src/**/*.ts\"", - "lint": "echo 'Linting code' && tslint -p tsconfig.json", + "lint": "eslint -c .eslintrc.js src --ext .ts", "test": "jest --config jestconfig.json", - "watch": "chokidar \"src\" -c \"yarn build\" -i \"test.ts\" -i \"generated.ts\"", "watch:esm": "chokidar \"src\" -c \"yarn build:esm\" -i \"test.ts\" -i \"generated.ts\"", "watch:umd": "chokidar \"src\" -c \"yarn build:umd\" -i \"test.ts\" -i \"generated.ts\"", @@ -79,8 +74,16 @@ "@tensorflow/tfjs": "^3.13.0" }, "dependencies": { - "tensor-as-base64": "^0.1.1", - "isomorphic-fetch": "^3.0.0" + "isomorphic-fetch": "^3.0.0", + "tensor-as-base64": "^0.1.1" }, - "gitHead": "cccae63a0a7aeccaa78d30e55a8e12ec72f5c19f" + "gitHead": "cccae63a0a7aeccaa78d30e55a8e12ec72f5c19f", + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.11.0", + "@typescript-eslint/parser": "^5.11.0", + "eslint": "^8.8.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-jsdoc": "^37.8.2", + "eslint-plugin-prefer-arrow": "^1.2.3" + } } diff --git a/packages/upscalerjs/src/cjs.ts b/packages/upscalerjs/src/cjs.ts index 4dcee6c47..45f8896b7 100644 --- a/packages/upscalerjs/src/cjs.ts +++ b/packages/upscalerjs/src/cjs.ts @@ -1,2 +1 @@ -// tslint:disable-next-line:no-var-requires -module.exports = require('./index').default; +module.exports = require('./index').default; // eslint-disable-line diff --git a/packages/upscalerjs/src/image.browser.test.ts b/packages/upscalerjs/src/image.browser.test.ts index 015d24f58..5856e7649 100644 --- a/packages/upscalerjs/src/image.browser.test.ts +++ b/packages/upscalerjs/src/image.browser.test.ts @@ -1,5 +1,5 @@ -import { JSDOM } from 'jsdom'; -import { getImageAsPixels, getInvalidTensorError } from './image.browser'; +import { JSDOM, } from 'jsdom'; +import { getImageAsPixels, getInvalidTensorError, } from './image.browser'; import * as tf from '@tensorflow/tfjs'; jest.mock('@tensorflow/tfjs', () => { const tf = jest.requireActual('@tensorflow/tfjs'); @@ -10,12 +10,12 @@ jest.mock('@tensorflow/tfjs', () => { fromPixels: () => { return { expandDims: () => { - return tf.tensor([1]); - } + return tf.tensor([1,]); + }, }; - } - } - } + }, + }, + }; }); import * as utils from './utils'; jest.mock('./utils', () => { @@ -23,11 +23,11 @@ jest.mock('./utils', () => { return { ...utils, isFourDimensionalTensor: jest.fn((pixels) => utils.isFourDimensionalTensor(pixels)), - } + }; }); const mockedUtils = utils as jest.Mocked; -const { window } = new JSDOM('', { resources: 'usable' }); +const { window, } = new JSDOM('', { resources: 'usable', }); global.Image = window.Image; global.HTMLImageElement = window.HTMLImageElement; const origSrc = Object.getOwnPropertyDescriptor(Image.prototype, 'src'); @@ -42,10 +42,10 @@ describe('Image', () => { describe('getImageAsPixels', () => { afterEach(() => { Object.defineProperty(global.Image.prototype, 'src', origSrc); - }) + }); it('loads an Image() if given a string as input', async () => { - const mockSet = jest.fn((_this) => setTimeout(() => _this.onload())) + const mockSet = jest.fn((_this) => setTimeout(() => _this.onload())); Object.defineProperty(global.Image.prototype, 'src', { set() { return mockSet(this); @@ -59,7 +59,7 @@ describe('Image', () => { it('handles a rejected Image() if given a string as input', async () => { const error = 'some error'; - const mockSet = jest.fn((_this) => setTimeout(() => _this.onerror(new Error(error)))) + const mockSet = jest.fn((_this) => setTimeout(() => _this.onerror(new Error(error)))); Object.defineProperty(global.Image.prototype, 'src', { set() { return mockSet(this); @@ -75,7 +75,7 @@ describe('Image', () => { const img = new Image(); img.src = 'foobar'; img.crossOrigin = 'anonymous'; - const mockSet = jest.fn((_this) => setTimeout(() => _this.onload())) + const mockSet = jest.fn((_this) => setTimeout(() => _this.onload())); Object.defineProperty(global.Image.prototype, 'src', { set() { return mockSet(this); @@ -87,8 +87,8 @@ describe('Image', () => { }); it('reads a rank 4 tensor directly without manipulation', async () => { - const input: tf.Tensor4D = tf.tensor([[[[1]]]]); - const mockSet = jest.fn((_this) => setTimeout(() => _this.onload())) + const input: tf.Tensor4D = tf.tensor([[[[1,],],],]); + const mockSet = jest.fn((_this) => setTimeout(() => _this.onload())); Object.defineProperty(global.Image.prototype, 'src', { set() { return mockSet(this); @@ -98,12 +98,12 @@ describe('Image', () => { expect(mockSet).toHaveBeenCalledTimes(0); expect(result.canDispose).toEqual(false); expect(result.tensor).toBe(input); - expect(result.tensor.shape).toEqual([1,1,1,1]); + expect(result.tensor.shape).toEqual([1,1,1,1,]); }); it('reads a rank 3 tensor and expands to rank 4', async () => { - const input: tf.Tensor3D = tf.tensor([[[1]]]); - const mockSet = jest.fn((_this) => setTimeout(() => _this.onload())) + const input: tf.Tensor3D = tf.tensor([[[1,],],]); + const mockSet = jest.fn((_this) => setTimeout(() => _this.onload())); Object.defineProperty(global.Image.prototype, 'src', { set() { return mockSet(this); @@ -112,21 +112,21 @@ describe('Image', () => { const result = await getImageAsPixels(input); expect(mockSet).toHaveBeenCalledTimes(0); expect(result.canDispose).toEqual(true); - expect(result.tensor.shape).toEqual([1,1,1,1]); + expect(result.tensor.shape).toEqual([1,1,1,1,]); }); it('handles an invalid (too small) tensor input', async () => { - const input = tf.tensor([[1]]); + const input = tf.tensor([[1,],]); await expect(() => getImageAsPixels(input as any)) .rejects - .toThrow(getInvalidTensorError(input)) + .toThrow(getInvalidTensorError(input)); }); it('handles an invalid (too large) tensor input', async () => { - const input = tf.tensor([[[[[1]]]]]); + const input = tf.tensor([[[[[1,],],],],]); await expect(() => getImageAsPixels(input as any)) .rejects - .toThrow(getInvalidTensorError(input)) + .toThrow(getInvalidTensorError(input)); }); }); }); diff --git a/packages/upscalerjs/src/image.browser.ts b/packages/upscalerjs/src/image.browser.ts index b894a0869..f072bf0fe 100644 --- a/packages/upscalerjs/src/image.browser.ts +++ b/packages/upscalerjs/src/image.browser.ts @@ -1,5 +1,5 @@ -import { tf } from './dependencies.generated'; -import { isFourDimensionalTensor, isThreeDimensionalTensor, isTensor, isString } from './utils'; +import { tf, } from './dependencies.generated'; +import { isFourDimensionalTensor, isThreeDimensionalTensor, isTensor, isString, } from './utils'; export const getInvalidTensorError = (input: tf.Tensor) => new Error( [ diff --git a/packages/upscalerjs/src/image.node.ts b/packages/upscalerjs/src/image.node.ts index b894a0869..f072bf0fe 100644 --- a/packages/upscalerjs/src/image.node.ts +++ b/packages/upscalerjs/src/image.node.ts @@ -1,5 +1,5 @@ -import { tf } from './dependencies.generated'; -import { isFourDimensionalTensor, isThreeDimensionalTensor, isTensor, isString } from './utils'; +import { tf, } from './dependencies.generated'; +import { isFourDimensionalTensor, isThreeDimensionalTensor, isTensor, isString, } from './utils'; export const getInvalidTensorError = (input: tf.Tensor) => new Error( [ diff --git a/packages/upscalerjs/src/index.ts b/packages/upscalerjs/src/index.ts index 41f6db634..c4b3183e6 100644 --- a/packages/upscalerjs/src/index.ts +++ b/packages/upscalerjs/src/index.ts @@ -1,2 +1,2 @@ -export { default } from './upscaler'; -export { getRowsAndColumns, getTensorDimensions } from './upscale'; +export { default, } from './upscaler'; +export { getRowsAndColumns, getTensorDimensions, } from './upscale'; diff --git a/packages/upscalerjs/src/loadModel.test.ts b/packages/upscalerjs/src/loadModel.test.ts index 8ac57b558..6c4e66118 100644 --- a/packages/upscalerjs/src/loadModel.test.ts +++ b/packages/upscalerjs/src/loadModel.test.ts @@ -11,12 +11,12 @@ import * as utils from './utils'; jest.mock('./models'); jest.mock('@tensorflow/tfjs'); jest.mock('./utils', () => ({ - ...(jest.requireActual('./utils') as any), + ...(jest.requireActual('./utils') ), warn: jest.fn(), })); const mockModels = (obj: { [index: string]: any }) => - Object.entries(obj).forEach(([key, val]) => ((models as any)[key] = val)); + Object.entries(obj).forEach(([key, val,]) => ((models as any)[key] = val)); describe('checkDeprecatedModels', () => { it('does not report if not a deprecated model', () => { @@ -27,7 +27,7 @@ describe('checkDeprecatedModels', () => { it('does report if a deprecated model', () => { checkDeprecatedModels( { - foo: ['foo', 'bar', 'baz'], + foo: ['foo', 'bar', 'baz',], }, 'foo', ); @@ -44,7 +44,7 @@ describe('warnDeprecatedModel', () => { ]; warnDeprecatedModel(...args); expect(utils.warn).toBeCalledWith( - expect.arrayContaining([expect.stringContaining('psnr')]), + expect.arrayContaining([expect.stringContaining('psnr'),]), ); }); }); diff --git a/packages/upscalerjs/src/loadModel.ts b/packages/upscalerjs/src/loadModel.ts index 978a8a740..22406e6c0 100644 --- a/packages/upscalerjs/src/loadModel.ts +++ b/packages/upscalerjs/src/loadModel.ts @@ -1,7 +1,7 @@ -import { tf } from './dependencies.generated'; -import { IUpscalerOptions, IModelDefinition } from './types'; -import MODELS, { DEFAULT_MODEL } from './models'; -import { warn } from './utils'; +import { tf, } from './dependencies.generated'; +import { IUpscalerOptions, IModelDefinition, } from './types'; +import MODELS, { DEFAULT_MODEL, } from './models'; +import { warn, } from './utils'; const ERROR_URL_EXPLICIT_SCALE_REQUIRED = 'https://thekevinscott.github.io/UpscalerJS/#/?id=you-must-provide-an-explicit-scale'; @@ -23,10 +23,10 @@ export interface DeprecationWarnings { } const DEPRECATION_WARNINGS: DeprecationWarnings = { - 'div2k-2x': ['div2k-2x', 'div2k/rdn-C3-D10-G64-G064-x2', '0.8.0'], - 'div2k-3x': ['div2k-3x', 'div2k/rdn-C3-D10-G64-G064-x3', '0.8.0'], - 'div2k-4x': ['div2k-4x', 'div2k/rdn-C3-D10-G64-G064-x4', '0.8.0'], - psnr: ['psnr', 'idealo/psnr-small', '0.8.0'], + 'div2k-2x': ['div2k-2x', 'div2k/rdn-C3-D10-G64-G064-x2', '0.8.0',], + 'div2k-3x': ['div2k-3x', 'div2k/rdn-C3-D10-G64-G064-x3', '0.8.0',], + 'div2k-4x': ['div2k-4x', 'div2k/rdn-C3-D10-G64-G064-x4', '0.8.0',], + psnr: ['psnr', 'idealo/psnr-small', '0.8.0',], }; export const checkDeprecatedModels = ( @@ -120,7 +120,7 @@ export const prepareModelDefinitions = async ( ) => { const entries = Object.entries(MODELS); await Promise.all( - entries.map(async ([key, val]) => { + entries.map(async ([key, val,]) => { const config = await getModelDescription(val); preparedModelDefinitions[key] = { ...val, diff --git a/packages/upscalerjs/src/models.ts b/packages/upscalerjs/src/models.ts index 6efed8959..cf8a08486 100644 --- a/packages/upscalerjs/src/models.ts +++ b/packages/upscalerjs/src/models.ts @@ -1,6 +1,6 @@ -import { IModelDefinition, IIntermediaryModelDefinition } from './types'; +import { IModelDefinition, IIntermediaryModelDefinition, } from './types'; import idealoGans from './models/idealo-gans'; -import { buildURL, buildConfigURL } from './utils'; +import { buildURL, buildConfigURL, } from './utils'; const buildModelsConfig = (config: { [index: string]: IIntermediaryModelDefinition; @@ -8,7 +8,7 @@ const buildModelsConfig = (config: { [index: string]: IModelDefinition; } => Object.entries(config).reduce( - (obj, [key, val]) => ({ + (obj, [key, val,]) => ({ ...obj, [key]: { ...val, diff --git a/packages/upscalerjs/src/models/idealo-gans.ts b/packages/upscalerjs/src/models/idealo-gans.ts index 299077407..8eae513fc 100644 --- a/packages/upscalerjs/src/models/idealo-gans.ts +++ b/packages/upscalerjs/src/models/idealo-gans.ts @@ -1,5 +1,5 @@ import * as tf from '@tensorflow/tfjs'; -import { IIntermediaryModelDefinition } from '../types'; +import { IIntermediaryModelDefinition, } from '../types'; const SCALE = 4; const BETA = 0.2; @@ -41,7 +41,7 @@ class PixelShuffle extends tf.layers.Layer { } computeOutputShape(inputShape: number[]) { - return [inputShape[0], inputShape[1], inputShape[2], 3]; + return [inputShape[0], inputShape[1], inputShape[2], 3,]; } call(inputs: Inputs) { @@ -56,7 +56,7 @@ const config: IIntermediaryModelDefinition = { scale: 4, preprocess: (image) => tf.mul(image, 1 / 255), postprocess: (output: tf.Tensor3D) => tf.mul(output.clipByValue(0, 1), 255), - customLayers: [MultiplyBeta, PixelShuffle], + customLayers: [MultiplyBeta, PixelShuffle,], }; export default config; diff --git a/packages/upscalerjs/src/types.ts b/packages/upscalerjs/src/types.ts index 1b14c9e9f..a9e4582f4 100644 --- a/packages/upscalerjs/src/types.ts +++ b/packages/upscalerjs/src/types.ts @@ -1,5 +1,5 @@ -import { tf } from './dependencies.generated'; -import { SerializableConstructor } from '@tensorflow/tfjs-core/dist/serialization'; +import { tf, } from './dependencies.generated'; +import { SerializableConstructor, } from '@tensorflow/tfjs-core/dist/serialization'; export type WarmupSizesByPatchSize = { patchSize: number; diff --git a/packages/upscalerjs/src/umd.ts b/packages/upscalerjs/src/umd.ts index 8fe540c9d..5495df6dc 100644 --- a/packages/upscalerjs/src/umd.ts +++ b/packages/upscalerjs/src/umd.ts @@ -1,5 +1,5 @@ import Upscaler from './upscaler'; -import { getRowsAndColumns, getTensorDimensions } from './upscale'; +import { getRowsAndColumns, getTensorDimensions, } from './upscale'; ( Upscaler as typeof Upscaler & { diff --git a/packages/upscalerjs/src/upscale.test.ts b/packages/upscalerjs/src/upscale.test.ts index 2bdae035f..936d0cb75 100644 --- a/packages/upscalerjs/src/upscale.test.ts +++ b/packages/upscalerjs/src/upscale.test.ts @@ -6,7 +6,7 @@ import upscale, { } from './upscale'; import * as tensorAsBase from 'tensor-as-base64'; import * as image from './image.generated'; -import { IModelDefinition } from './types'; +import { IModelDefinition, } from './types'; jest.mock('./image.generated', () => ({ ...jest.requireActual('./image.generated'), })); @@ -40,7 +40,7 @@ describe('getConsistentTensorDimensions', () => { const { row, col, - expectation: { origin, size, sliceOrigin = [0, 0], sliceSize }, + expectation: { origin, size, sliceOrigin = [0, 0,], sliceSize, }, } = expectations[i]; try { expect( @@ -78,9 +78,9 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - size: [2, 2], - sliceSize: [2, 2], + origin: [0, 0,], + size: [2, 2,], + sliceSize: [2, 2,], }, }, ], @@ -100,10 +100,10 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - size: [2, 2], - sliceOrigin: [0, 0], - sliceSize: [2, 2], + origin: [0, 0,], + size: [2, 2,], + sliceOrigin: [0, 0,], + sliceSize: [2, 2,], }, }, ], @@ -111,8 +111,8 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for a subset patch size that fits equally', () => { - const sliceSize: [number, number] = [2, 2]; - const size: [number, number] = [2, 2]; + const sliceSize: [number, number] = [2, 2,]; + const size: [number, number] = [2, 2,]; testGetTensorDimensions( { width: 4, @@ -125,7 +125,7 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], + origin: [0, 0,], size, sliceSize, }, @@ -134,7 +134,7 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 0, expectation: { - origin: [2, 0], + origin: [2, 0,], size, sliceSize, }, @@ -143,7 +143,7 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 1, expectation: { - origin: [0, 2], + origin: [0, 2,], size, sliceSize, }, @@ -152,7 +152,7 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 1, expectation: { - origin: [2, 2], + origin: [2, 2,], size, sliceSize, }, @@ -162,7 +162,7 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for a subset patch size that is unequal without padding', () => { - const size: [number, number] = [4, 4]; + const size: [number, number] = [4, 4,]; testGetTensorDimensions( { width: 6, @@ -175,40 +175,40 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], + origin: [0, 0,], size, - sliceOrigin: [0, 0], - sliceSize: [4, 4], + sliceOrigin: [0, 0,], + sliceSize: [4, 4,], }, }, { row: 1, col: 0, expectation: { - origin: [2, 0], + origin: [2, 0,], size, - sliceOrigin: [2, 0], - sliceSize: [2, 4], + sliceOrigin: [2, 0,], + sliceSize: [2, 4,], }, }, { row: 0, col: 1, expectation: { - origin: [0, 2], + origin: [0, 2,], size, - sliceOrigin: [0, 2], - sliceSize: [4, 2], + sliceOrigin: [0, 2,], + sliceSize: [4, 2,], }, }, { row: 1, col: 1, expectation: { - origin: [2, 2], + origin: [2, 2,], size, - sliceOrigin: [2, 2], - sliceSize: [2, 2], + sliceOrigin: [2, 2,], + sliceSize: [2, 2,], }, }, ], @@ -216,8 +216,8 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for an uneven subset patch size that fits equally', () => { - const size: [number, number] = [2, 2]; - const sliceSize: [number, number] = [2, 2]; + const size: [number, number] = [2, 2,]; + const sliceSize: [number, number] = [2, 2,]; testGetTensorDimensions( { width: 6, @@ -230,9 +230,9 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], + origin: [0, 0,], size, - sliceOrigin: [0, 0], + sliceOrigin: [0, 0,], sliceSize, }, }, @@ -240,7 +240,7 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 0, expectation: { - origin: [2, 0], + origin: [2, 0,], size, sliceSize, }, @@ -249,7 +249,7 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 1, expectation: { - origin: [0, 2], + origin: [0, 2,], size, sliceSize, }, @@ -258,7 +258,7 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 1, expectation: { - origin: [2, 2], + origin: [2, 2,], size, sliceSize, }, @@ -267,7 +267,7 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 2, expectation: { - origin: [0, 4], + origin: [0, 4,], size, sliceSize, }, @@ -276,7 +276,7 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 2, expectation: { - origin: [2, 4], + origin: [2, 4,], size, sliceSize, }, @@ -286,7 +286,7 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for an uneven subset patch size that fits unequally without padding', () => { - const size: [number, number] = [4, 4]; + const size: [number, number] = [4, 4,]; testGetTensorDimensions( { width: 10, @@ -299,60 +299,60 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [0, 0], + origin: [0, 0,], + sliceOrigin: [0, 0,], size, - sliceSize: [4, 4], + sliceSize: [4, 4,], }, }, { row: 1, col: 0, expectation: { - origin: [1, 0], - sliceOrigin: [3, 0], + origin: [1, 0,], + sliceOrigin: [3, 0,], size, - sliceSize: [1, 4], + sliceSize: [1, 4,], }, }, { row: 0, col: 1, expectation: { - origin: [0, 4], - sliceOrigin: [0, 0], + origin: [0, 4,], + sliceOrigin: [0, 0,], size, - sliceSize: [4, 4], + sliceSize: [4, 4,], }, }, { row: 1, col: 1, expectation: { - origin: [1, 4], - sliceOrigin: [3, 0], + origin: [1, 4,], + sliceOrigin: [3, 0,], size, - sliceSize: [1, 4], + sliceSize: [1, 4,], }, }, { row: 0, col: 2, expectation: { - origin: [0, 6], - sliceOrigin: [0, 2], + origin: [0, 6,], + sliceOrigin: [0, 2,], size, - sliceSize: [4, 2], + sliceSize: [4, 2,], }, }, { row: 1, col: 2, expectation: { - origin: [1, 6], - sliceOrigin: [3, 2], + origin: [1, 6,], + sliceOrigin: [3, 2,], size, - sliceSize: [1, 2], + sliceSize: [1, 2,], }, }, ], @@ -361,8 +361,8 @@ describe('getConsistentTensorDimensions', () => { describe('Padding for constant sized slices', () => { it('gets tensor dimensions for a subset patch size that fits equally with padding', () => { - const size: [number, number] = [4, 4]; - const sliceSize: [number, number] = [2, 2]; + const size: [number, number] = [4, 4,]; + const sliceSize: [number, number] = [2, 2,]; testGetTensorDimensions( { width: 4, @@ -375,8 +375,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [0, 0], + origin: [0, 0,], + sliceOrigin: [0, 0,], size, sliceSize, }, @@ -385,8 +385,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [2, 0], + origin: [0, 0,], + sliceOrigin: [2, 0,], size, sliceSize, }, @@ -395,8 +395,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 1, expectation: { - origin: [0, 0], - sliceOrigin: [0, 2], + origin: [0, 0,], + sliceOrigin: [0, 2,], size, sliceSize, }, @@ -405,8 +405,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 1, expectation: { - origin: [0, 0], - sliceOrigin: [2, 2], + origin: [0, 0,], + sliceOrigin: [2, 2,], size, sliceSize, }, @@ -416,8 +416,8 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for a subset patch size that fits equally with padding with more dimensions', () => { - const size: [number, number] = [5, 5]; - const sliceSize: [number, number] = [3, 3]; + const size: [number, number] = [5, 5,]; + const sliceSize: [number, number] = [3, 3,]; testGetTensorDimensions( { width: 9, @@ -430,8 +430,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [0, 0], + origin: [0, 0,], + sliceOrigin: [0, 0,], size, sliceSize, }, @@ -440,8 +440,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 0, expectation: { - origin: [2, 0], - sliceOrigin: [1, 0], + origin: [2, 0,], + sliceOrigin: [1, 0,], size, sliceSize, }, @@ -450,8 +450,8 @@ describe('getConsistentTensorDimensions', () => { row: 2, col: 0, expectation: { - origin: [4, 0], - sliceOrigin: [2, 0], + origin: [4, 0,], + sliceOrigin: [2, 0,], size, sliceSize, }, @@ -460,8 +460,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 1, expectation: { - origin: [0, 2], - sliceOrigin: [0, 1], + origin: [0, 2,], + sliceOrigin: [0, 1,], size, sliceSize, }, @@ -470,8 +470,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 1, expectation: { - origin: [2, 2], - sliceOrigin: [1, 1], + origin: [2, 2,], + sliceOrigin: [1, 1,], size, sliceSize, }, @@ -480,8 +480,8 @@ describe('getConsistentTensorDimensions', () => { row: 2, col: 1, expectation: { - origin: [4, 2], - sliceOrigin: [2, 1], + origin: [4, 2,], + sliceOrigin: [2, 1,], size, sliceSize, }, @@ -490,8 +490,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 2, expectation: { - origin: [0, 4], - sliceOrigin: [0, 2], + origin: [0, 4,], + sliceOrigin: [0, 2,], size, sliceSize, }, @@ -500,8 +500,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 2, expectation: { - origin: [2, 4], - sliceOrigin: [1, 2], + origin: [2, 4,], + sliceOrigin: [1, 2,], size, sliceSize, }, @@ -510,8 +510,8 @@ describe('getConsistentTensorDimensions', () => { row: 2, col: 2, expectation: { - origin: [4, 4], - sliceOrigin: [2, 2], + origin: [4, 4,], + sliceOrigin: [2, 2,], size, sliceSize, }, @@ -533,10 +533,10 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - size: [2, 2], - sliceOrigin: [0, 0], - sliceSize: [2, 2], + origin: [0, 0,], + size: [2, 2,], + sliceOrigin: [0, 0,], + sliceSize: [2, 2,], }, }, ], @@ -544,7 +544,7 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for a subset patch size that is unequal with padding for constant patch size', () => { - const size: [number, number] = [6, 6]; + const size: [number, number] = [6, 6,]; testGetTensorDimensions( { width: 9, @@ -557,90 +557,90 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [0, 0], + origin: [0, 0,], + sliceOrigin: [0, 0,], size, - sliceSize: [4, 4], + sliceSize: [4, 4,], }, }, { row: 1, col: 0, expectation: { - origin: [3, 0], - sliceOrigin: [1, 0], + origin: [3, 0,], + sliceOrigin: [1, 0,], size, - sliceSize: [4, 4], + sliceSize: [4, 4,], }, }, { row: 2, col: 0, expectation: { - origin: [3, 0], - sliceOrigin: [5, 0], + origin: [3, 0,], + sliceOrigin: [5, 0,], size, - sliceSize: [1, 4], + sliceSize: [1, 4,], }, }, { row: 0, col: 1, expectation: { - origin: [0, 3], - sliceOrigin: [0, 1], + origin: [0, 3,], + sliceOrigin: [0, 1,], size, - sliceSize: [4, 4], + sliceSize: [4, 4,], }, }, { row: 1, col: 1, expectation: { - origin: [3, 3], - sliceOrigin: [1, 1], + origin: [3, 3,], + sliceOrigin: [1, 1,], size, - sliceSize: [4, 4], + sliceSize: [4, 4,], }, }, { row: 2, col: 1, expectation: { - origin: [3, 3], - sliceOrigin: [5, 1], + origin: [3, 3,], + sliceOrigin: [5, 1,], size, - sliceSize: [1, 4], + sliceSize: [1, 4,], }, }, { row: 0, col: 2, expectation: { - origin: [0, 3], - sliceOrigin: [0, 5], + origin: [0, 3,], + sliceOrigin: [0, 5,], size, - sliceSize: [4, 1], + sliceSize: [4, 1,], }, }, { row: 1, col: 2, expectation: { - origin: [3, 3], - sliceOrigin: [1, 5], + origin: [3, 3,], + sliceOrigin: [1, 5,], size, - sliceSize: [4, 1], + sliceSize: [4, 1,], }, }, { row: 2, col: 2, expectation: { - origin: [3, 3], - sliceOrigin: [5, 5], + origin: [3, 3,], + sliceOrigin: [5, 5,], size, - sliceSize: [1, 1], + sliceSize: [1, 1,], }, }, ], @@ -648,8 +648,8 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for an uneven subset patch size that fits equally with padding for a constant patch size', () => { - const size: [number, number] = [5, 5]; - const sliceSize: [number, number] = [3, 3]; + const size: [number, number] = [5, 5,]; + const sliceSize: [number, number] = [3, 3,]; testGetTensorDimensions( { width: 9, @@ -662,8 +662,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [0, 0], + origin: [0, 0,], + sliceOrigin: [0, 0,], size, sliceSize, }, @@ -672,8 +672,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 0, expectation: { - origin: [1, 0], - sliceOrigin: [2, 0], + origin: [1, 0,], + sliceOrigin: [2, 0,], size, sliceSize, }, @@ -682,8 +682,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 1, expectation: { - origin: [0, 2], - sliceOrigin: [0, 1], + origin: [0, 2,], + sliceOrigin: [0, 1,], size, sliceSize, }, @@ -692,8 +692,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 1, expectation: { - origin: [1, 2], - sliceOrigin: [2, 1], + origin: [1, 2,], + sliceOrigin: [2, 1,], size, sliceSize, }, @@ -702,8 +702,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 2, expectation: { - origin: [0, 4], - sliceOrigin: [0, 2], + origin: [0, 4,], + sliceOrigin: [0, 2,], size, sliceSize, }, @@ -712,8 +712,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 2, expectation: { - origin: [1, 4], - sliceOrigin: [2, 2], + origin: [1, 4,], + sliceOrigin: [2, 2,], size, sliceSize, }, @@ -723,7 +723,7 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for an uneven subset patch size that fits unequally with padding for constant patch size', () => { - const size: [number, number] = [6, 6]; + const size: [number, number] = [6, 6,]; testGetTensorDimensions( { width: 9, @@ -736,60 +736,60 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [0, 0], + origin: [0, 0,], + sliceOrigin: [0, 0,], size, - sliceSize: [4, 4], + sliceSize: [4, 4,], }, }, { row: 1, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [4, 0], + origin: [0, 0,], + sliceOrigin: [4, 0,], size, - sliceSize: [2, 4], + sliceSize: [2, 4,], }, }, { row: 0, col: 1, expectation: { - origin: [0, 3], - sliceOrigin: [0, 1], + origin: [0, 3,], + sliceOrigin: [0, 1,], size, - sliceSize: [4, 4], + sliceSize: [4, 4,], }, }, { row: 1, col: 1, expectation: { - origin: [0, 3], - sliceOrigin: [4, 1], + origin: [0, 3,], + sliceOrigin: [4, 1,], size, - sliceSize: [2, 4], + sliceSize: [2, 4,], }, }, { row: 0, col: 2, expectation: { - origin: [0, 3], - sliceOrigin: [0, 5], + origin: [0, 3,], + sliceOrigin: [0, 5,], size, - sliceSize: [4, 1], + sliceSize: [4, 1,], }, }, { row: 1, col: 2, expectation: { - origin: [0, 3], - sliceOrigin: [4, 5], + origin: [0, 3,], + sliceOrigin: [4, 5,], size, - sliceSize: [2, 1], + sliceSize: [2, 1,], }, }, ], @@ -798,7 +798,7 @@ describe('getConsistentTensorDimensions', () => { it('gets tensor dimensions for a very small patch size for constant patch size', () => { // const size: [number, number] = [9, 9]; - const sliceSize: [number, number] = [1, 1]; + const sliceSize: [number, number] = [1, 1,]; testGetTensorDimensions( { width: 13, @@ -811,9 +811,9 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - size: [2, 9], - sliceOrigin: [0, 0], + origin: [0, 0,], + size: [2, 9,], + sliceOrigin: [0, 0,], sliceSize, }, }, @@ -821,9 +821,9 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 0, expectation: { - origin: [0, 0], - size: [2, 9], - sliceOrigin: [1, 0], + origin: [0, 0,], + size: [2, 9,], + sliceOrigin: [1, 0,], sliceSize, }, }, @@ -831,9 +831,9 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 8, expectation: { - origin: [0, 4], - size: [2, 9], - sliceOrigin: [0, 4], + origin: [0, 4,], + size: [2, 9,], + sliceOrigin: [0, 4,], sliceSize, }, }, @@ -841,9 +841,9 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 8, expectation: { - origin: [0, 4], - size: [2, 9], - sliceOrigin: [1, 4], + origin: [0, 4,], + size: [2, 9,], + sliceOrigin: [1, 4,], sliceSize, }, }, @@ -852,8 +852,8 @@ describe('getConsistentTensorDimensions', () => { }); it('gets tensor dimensions for a larger image at constant patch size', () => { - const size: [number, number] = [40, 40]; - const sliceSize: [number, number] = [32, 32]; + const size: [number, number] = [40, 40,]; + const sliceSize: [number, number] = [32, 32,]; testGetTensorDimensions( { width: 100, @@ -866,8 +866,8 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - sliceOrigin: [0, 0], + origin: [0, 0,], + sliceOrigin: [0, 0,], size, sliceSize, }, @@ -876,8 +876,8 @@ describe('getConsistentTensorDimensions', () => { row: 1, col: 0, expectation: { - origin: [28, 0], - sliceOrigin: [4, 0], + origin: [28, 0,], + sliceOrigin: [4, 0,], size, sliceSize, }, @@ -886,8 +886,8 @@ describe('getConsistentTensorDimensions', () => { row: 2, col: 0, expectation: { - origin: [60, 0], - sliceOrigin: [4, 0], + origin: [60, 0,], + sliceOrigin: [4, 0,], size, sliceSize, }, @@ -896,10 +896,10 @@ describe('getConsistentTensorDimensions', () => { row: 3, col: 0, expectation: { - origin: [60, 0], - sliceOrigin: [36, 0], + origin: [60, 0,], + sliceOrigin: [36, 0,], size, - sliceSize: [4, 32], + sliceSize: [4, 32,], }, }, ], @@ -920,9 +920,9 @@ describe('getConsistentTensorDimensions', () => { row: 0, col: 0, expectation: { - origin: [0, 0], - size: [30, 30], - sliceSize: [20, 20], + origin: [0, 0,], + size: [30, 30,], + sliceSize: [20, 20,], }, }, ], @@ -933,8 +933,8 @@ describe('getConsistentTensorDimensions', () => { describe('getRowsAndColumns', () => { it('gets rows and columns', () => { const img: tf.Tensor4D = tf.tensor( - [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4], - [1, 2, 2, 3], + [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4,], + [1, 2, 2, 3,], ); expect(getRowsAndColumns(img, 1)).toEqual({ @@ -945,8 +945,8 @@ describe('getRowsAndColumns', () => { it('gets single row and column for a greater-than patch size', () => { const img: tf.Tensor4D = tf.tensor( - [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4], - [1, 2, 2, 3], + [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4,], + [1, 2, 2, 3,], ); expect(getRowsAndColumns(img, 3)).toEqual({ @@ -961,7 +961,7 @@ describe('getRowsAndColumns', () => { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, ], - [1, 3, 3, 3], + [1, 3, 3, 3,], ); expect(getRowsAndColumns(img, 2)).toEqual({ @@ -979,10 +979,10 @@ describe('predict', () => { it('should make a prediction', async () => { const img: tf.Tensor3D = tf.tensor( - [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4], - [2, 2, 3], + [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4,], + [2, 2, 3,], ); - const upscaledTensor = tf.ones([1, 2, 2, 3]); + const upscaledTensor = tf.ones([1, 2, 2, 3,]); const pred = { squeeze: jest.fn(() => upscaledTensor), }; @@ -994,7 +994,7 @@ describe('predict', () => { } as IModelDefinition); expect(model.predict).toHaveBeenCalledWith( expect.objectContaining({ - shape: [1, 2, 2, 3], + shape: [1, 2, 2, 3,], }), ); expect(result).toEqual(upscaledTensor); @@ -1002,18 +1002,18 @@ describe('predict', () => { it('should make a prediction with a patchSize', async () => { const img: tf.Tensor3D = tf.tensor( - [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], - [2, 2, 3], + [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4,], + [2, 2, 3,], ); const model = { predict: jest.fn((pixel) => { - return tf.fill([2, 2, 3], pixel.dataSync()[0]).expandDims(0); + return tf.fill([2, 2, 3,], pixel.dataSync()[0]).expandDims(0); }), } as unknown as tf.LayersModel; const result = await predict( model, img.expandDims(0), - { scale: 2 } as IModelDefinition, + { scale: 2, } as IModelDefinition, { patchSize: 1, padding: 0, @@ -1023,28 +1023,28 @@ describe('predict', () => { tf .tensor([ [ - [1, 1, 1], - [1, 1, 1], - [2, 2, 2], - [2, 2, 2], + [1, 1, 1,], + [1, 1, 1,], + [2, 2, 2,], + [2, 2, 2,], ], [ - [1, 1, 1], - [1, 1, 1], - [2, 2, 2], - [2, 2, 2], + [1, 1, 1,], + [1, 1, 1,], + [2, 2, 2,], + [2, 2, 2,], ], [ - [3, 3, 3], - [3, 3, 3], - [4, 4, 4], - [4, 4, 4], + [3, 3, 3,], + [3, 3, 3,], + [4, 4, 4,], + [4, 4, 4,], ], [ - [3, 3, 3], - [3, 3, 3], - [4, 4, 4], - [4, 4, 4], + [3, 3, 3,], + [3, 3, 3,], + [4, 4, 4,], + [4, 4, 4,], ], ]) .expandDims(0) @@ -1053,18 +1053,18 @@ describe('predict', () => { }); it('should callback with progress on patchSize', async () => { - const img: tf.Tensor4D = tf.ones([4, 4, 3]).expandDims(0); + const img: tf.Tensor4D = tf.ones([4, 4, 3,]).expandDims(0); const scale = 2; const patchSize = 2; const model = { predict: jest.fn((pixel) => { return tf - .fill([patchSize * scale, patchSize * scale, 3], pixel.dataSync()[0]) + .fill([patchSize * scale, patchSize * scale, 3,], pixel.dataSync()[0]) .expandDims(0); }), } as unknown as tf.LayersModel; const progress = jest.fn(); - await predict(model, img, { scale } as IModelDefinition, { + await predict(model, img, { scale, } as IModelDefinition, { patchSize, padding: 0, progress, @@ -1077,17 +1077,17 @@ describe('predict', () => { it('should warn if provided a patch size without a padding', async () => { console.warn = jest.fn(); - const img: tf.Tensor4D = tf.ones([4, 4, 3]).expandDims(0); + const img: tf.Tensor4D = tf.ones([4, 4, 3,]).expandDims(0); const scale = 2; const patchSize = 2; const model = { predict: jest.fn((pixel) => { return tf - .fill([patchSize * scale, patchSize * scale, 3], pixel.dataSync()[0]) + .fill([patchSize * scale, patchSize * scale, 3,], pixel.dataSync()[0]) .expandDims(0); }), } as unknown as tf.LayersModel; - await predict(model, img, { scale } as IModelDefinition, { + await predict(model, img, { scale, } as IModelDefinition, { patchSize, }); expect(console.warn).toHaveBeenCalled(); @@ -1098,12 +1098,12 @@ describe('upscale', () => { it('should return a base64 src by default', async () => { const img: tf.Tensor3D = tf.tensor([ [ - [1, 1, 1], - [2, 2, 2], + [1, 1, 1,], + [2, 2, 2,], ], [ - [3, 3, 3], - [4, 4, 4], + [3, 3, 3,], + [4, 4, 4,], ], ]); (mockedImage as any).getImageAsPixels = () => ({ @@ -1111,34 +1111,34 @@ describe('upscale', () => { canDispose: true, }); const model = { - predict: jest.fn(() => tf.ones([1, 2, 2, 3])), + predict: jest.fn(() => tf.ones([1, 2, 2, 3,])), } as unknown as tf.LayersModel; (tensorAsBase as any).default = () => 'foobarbaz'; - const result = await upscale(model, img, { scale: 2 } as IModelDefinition); + const result = await upscale(model, img, { scale: 2, } as IModelDefinition); expect(result).toEqual('foobarbaz'); }); it('should return a tensor if specified', async () => { const img: tf.Tensor3D = tf.tensor([ [ - [1, 1, 1], - [2, 2, 2], + [1, 1, 1,], + [2, 2, 2,], ], [ - [3, 3, 3], - [4, 4, 4], + [3, 3, 3,], + [4, 4, 4,], ], ]); (mockedImage as any).getImageAsPixels = () => ({ tensor: img, canDispose: true, }); - const upscaledTensor = tf.ones([1, 2, 2, 3]); + const upscaledTensor = tf.ones([1, 2, 2, 3,]); const model = { predict: jest.fn(() => upscaledTensor), } as unknown as tf.LayersModel; (tensorAsBase as any).default = () => 'foobarbaz'; - const result = await upscale(model, img, { scale: 2 } as IModelDefinition, { + const result = await upscale(model, img, { scale: 2, } as IModelDefinition, { output: 'tensor', }); if (typeof result === 'string') { diff --git a/packages/upscalerjs/src/upscale.ts b/packages/upscalerjs/src/upscale.ts index 0568fbc2d..f56417fb7 100644 --- a/packages/upscalerjs/src/upscale.ts +++ b/packages/upscalerjs/src/upscale.ts @@ -1,9 +1,9 @@ -import { tf } from './dependencies.generated'; -import { IUpscaleOptions, IModelDefinition, ProcessFn } from './types'; -import { getImageAsPixels } from './image.generated'; +import { tf, } from './dependencies.generated'; +import { IUpscaleOptions, IModelDefinition, ProcessFn, } from './types'; +import { getImageAsPixels, } from './image.generated'; import tensorAsBase64 from 'tensor-as-base64'; -import { warn } from './utils'; -import { ImageInput } from './image.browser'; +import { warn, } from './utils'; +import { ImageInput, } from './image.browser'; const ERROR_UNDEFINED_PADDING = 'https://thekevinscott.github.io/UpscalerJS/#/?id=padding-is-undefined'; @@ -31,7 +31,7 @@ export const getRowsAndColumns = ( rows: number; columns: number; } => { - const [height, width] = getWidthAndHeight(pixels); + const [height, width,] = getWidthAndHeight(pixels); return { rows: Math.ceil(height / patchSize), @@ -145,7 +145,7 @@ export const getTensorDimensions = ({ row * patchSize - padding, col * patchSize - padding, ]; - const sliceOrigin: [number, number] = [padding, padding]; + const sliceOrigin: [number, number] = [padding, padding,]; checkAndAdjustStartingPosition(0, origin, sliceOrigin); checkAndAdjustStartingPosition(1, origin, sliceOrigin); @@ -200,7 +200,7 @@ export const predict = async ( model: tf.LayersModel, pixels: tf.Tensor4D, modelDefinition: IModelDefinition, - { progress, patchSize, padding }: IUpscaleOptions = {}, + { progress, patchSize, padding, }: IUpscaleOptions = {}, ): Promise => { const scale = modelDefinition.scale; @@ -214,9 +214,9 @@ export const predict = async ( ]); } const channels = 3; - const [height, width] = pixels.shape.slice(1); - const { rows, columns } = getRowsAndColumns(pixels, patchSize); - const { size: originalSize } = getTensorDimensions({ + const [height, width,] = pixels.shape.slice(1); + const { rows, columns, } = getRowsAndColumns(pixels, patchSize); + const { size: originalSize, } = getTensorDimensions({ row: 0, col: 0, patchSize, @@ -239,7 +239,7 @@ export const predict = async ( channels, ]); for (let col = 0; col < columns; col++) { - const { origin, size, sliceOrigin, sliceSize } = getTensorDimensions({ + const { origin, size, sliceOrigin, sliceSize, } = getTensorDimensions({ row, col, patchSize, @@ -248,8 +248,8 @@ export const predict = async ( width, }); const slicedPixels = pixels.slice( - [0, origin[0], origin[1]], - [-1, size[0], size[1]], + [0, origin[0], origin[1],], + [-1, size[0], size[1],], ); await tf.nextFrame(); const prediction = model.predict(slicedPixels) as tf.Tensor4D; @@ -261,8 +261,8 @@ export const predict = async ( progress(index / total); } const slicedPrediction = prediction.slice( - [0, sliceOrigin[0] * scale, sliceOrigin[1] * scale], - [-1, sliceSize[0] * scale, sliceSize[1] * scale], + [0, sliceOrigin[0] * scale, sliceOrigin[1] * scale,], + [-1, sliceSize[0] * scale, sliceSize[1] * scale,], ); await tf.nextFrame(); prediction.dispose(); @@ -309,7 +309,7 @@ const upscale = async ( modelDefinition: IModelDefinition, options: IUpscaleOptions = {}, ) => { - const { tensor: pixels, canDispose } = await getImageAsPixels(image as any); + const { tensor: pixels, canDispose, } = await getImageAsPixels(image); const preprocessedPixels = getProcessedPixels( modelDefinition.preprocess, diff --git a/packages/upscalerjs/src/upscaler.ts b/packages/upscalerjs/src/upscaler.ts index 942f1c588..adf9173cf 100644 --- a/packages/upscalerjs/src/upscaler.ts +++ b/packages/upscalerjs/src/upscaler.ts @@ -1,11 +1,11 @@ -import { tf } from './dependencies.generated'; +import { tf, } from './dependencies.generated'; import { IUpscalerOptions, IUpscaleOptions, WarmupSizes, IModelDefinition, } from './types'; -import loadModel, { getModelDefinitions } from './loadModel'; +import loadModel, { getModelDefinitions, } from './loadModel'; import warmup from './warmup'; import upscale from './upscale'; @@ -33,7 +33,7 @@ class Upscaler { image: string | HTMLImageElement | tf.Tensor3D, options: IUpscaleOptions = {}, ) => { - const { model, modelDefinition } = await this._model; + const { model, modelDefinition, } = await this._model; return upscale(model, image, modelDefinition, options); }; diff --git a/packages/upscalerjs/src/utils.test.ts b/packages/upscalerjs/src/utils.test.ts index c2477ec87..bfbe2361a 100644 --- a/packages/upscalerjs/src/utils.test.ts +++ b/packages/upscalerjs/src/utils.test.ts @@ -1,5 +1,5 @@ import * as tf from '@tensorflow/tfjs'; -import { isString, isHTMLImageElement, isFourDimensionalTensor, isThreeDimensionalTensor, isTensor } from './utils'; +import { isString, isHTMLImageElement, isFourDimensionalTensor, isThreeDimensionalTensor, isTensor, } from './utils'; describe('isString', () => { it('returns true for a string', () => { @@ -7,7 +7,7 @@ describe('isString', () => { }); it('returns false for a non-string', () => { - expect(isString({})).toEqual(false); + expect(isString({} as any)).toEqual(false); }); }); @@ -19,11 +19,11 @@ describe('isHTMLImageElement', () => { describe('isFourDimensionalTensor', () => { it('returns true if a 4d tensor', () => { - expect(isFourDimensionalTensor(tf.tensor([[[[1]]]]))).toEqual(true); + expect(isFourDimensionalTensor(tf.tensor([[[[1,],],],]))).toEqual(true); }); it('returns false for a 3d tensor', () => { - expect(isFourDimensionalTensor(tf.tensor([[[1]]]))).toEqual(false); + expect(isFourDimensionalTensor(tf.tensor([[[1,],],]))).toEqual(false); }); expect(isFourDimensionalTensor({} as any)).toEqual(false); @@ -31,23 +31,23 @@ describe('isFourDimensionalTensor', () => { describe('isThreeDimensionalTensor', () => { it('returns true if a 3d tensor', () => { - expect(isThreeDimensionalTensor(tf.tensor([[[1]]]))).toEqual(true); + expect(isThreeDimensionalTensor(tf.tensor([[[1,],],]))).toEqual(true); }); it('returns false for a 4d tensor', () => { - expect(isThreeDimensionalTensor(tf.tensor([[[[1]]]]))).toEqual(false); + expect(isThreeDimensionalTensor(tf.tensor([[[[1,],],],]))).toEqual(false); }); it('defensively handles invalid input', () => { expect(isThreeDimensionalTensor({} as any)).toEqual(false); - }) + }); }); describe('isTensor', () => { it('returns true if a tensor', () => { - expect(isTensor(tf.tensor([[1]]))).toEqual(true); + expect(isTensor(tf.tensor([[1,],]))).toEqual(true); }); it('returns false if not a tensor', () => { - expect(isTensor([])).toEqual(false); - }) -}) + expect(isTensor([] as any)).toEqual(false); + }); +}); diff --git a/packages/upscalerjs/src/utils.ts b/packages/upscalerjs/src/utils.ts index 32bb974e6..7a1085b32 100644 --- a/packages/upscalerjs/src/utils.ts +++ b/packages/upscalerjs/src/utils.ts @@ -1,11 +1,12 @@ -import { tf } from './dependencies.generated'; -import { ROOT } from './constants'; +import { tf, } from './dependencies.generated'; +import { ROOT, } from './constants'; +import type { ImageInput, } from './image.browser'; -export const isString = (pixels: any): pixels is string => { +export const isString = (pixels: ImageInput): pixels is string => { return typeof pixels === 'string'; }; -export const isHTMLImageElement = (pixels: any): pixels is HTMLImageElement => { +export const isHTMLImageElement = (pixels: ImageInput): pixels is HTMLImageElement => { try { return pixels instanceof HTMLImageElement; } catch (err) { @@ -28,10 +29,9 @@ function makeIsNDimensionalTensor(rank: number) { export const isFourDimensionalTensor = makeIsNDimensionalTensor(4); export const isThreeDimensionalTensor = makeIsNDimensionalTensor(3); -export const isTensor = (input: any): input is tf.Tensor => { - try { return !!input.shape; } catch(err) { } - return false; -} +export const isTensor = (input: ImageInput | tf.Tensor): input is tf.Tensor => { + return input instanceof tf.Tensor; +}; const MODEL_DIR = 'models'; diff --git a/packages/upscalerjs/src/warmup.test.ts b/packages/upscalerjs/src/warmup.test.ts index ca07ab492..2e334c5db 100644 --- a/packages/upscalerjs/src/warmup.test.ts +++ b/packages/upscalerjs/src/warmup.test.ts @@ -1,9 +1,9 @@ import * as tf from '@tensorflow/tfjs'; import warmup from './warmup'; -import { IModelDefinition } from './types'; +import { IModelDefinition, } from './types'; const getFakeModel = () => { - const predict = jest.fn(async () => { + const predict = jest.fn(() => { return { dataSync: () => {}, dispose: () => {}, @@ -22,12 +22,12 @@ describe('Warmup', () => { model: tf.LayersModel; modelDefinition: IModelDefinition; }>((resolve) => - resolve({ model: fakeModel, modelDefinition: { url: 'foo', scale: 2 } }), + resolve({ model: fakeModel, modelDefinition: { url: 'foo', scale: 2, }, }), ); - await expect(warmup(model, [['foo', 1]] as any)).rejects.toThrow( + await expect(warmup(model, [['foo', 1,],] as any)).rejects.toThrow( 'Invalid value passed to warmup in warmupSizes. Expected two numbers, got foo,1', ); - await expect(warmup(model, [[1, 'foo']] as any)).rejects.toThrow( + await expect(warmup(model, [[1, 'foo',],] as any)).rejects.toThrow( 'Invalid value passed to warmup in warmupSizes. Expected two numbers, got 1,foo', ); }); @@ -38,9 +38,9 @@ describe('Warmup', () => { model: tf.LayersModel; modelDefinition: IModelDefinition; }>((resolve) => - resolve({ model: fakeModel, modelDefinition: { url: 'foo', scale: 2 } }), + resolve({ model: fakeModel, modelDefinition: { url: 'foo', scale: 2, }, }), ); - expect(warmup(model, [20, 20] as any)).rejects.toEqual(expect.anything()); + expect(warmup(model, [20, 20,] as any)).rejects.toEqual(expect.anything()); }); it('does nothing if provided an empty array', async () => { @@ -49,7 +49,7 @@ describe('Warmup', () => { model: tf.LayersModel; modelDefinition: IModelDefinition; }>((resolve) => - resolve({ model: fakeModel, modelDefinition: { url: 'foo', scale: 2 } }), + resolve({ model: fakeModel, modelDefinition: { url: 'foo', scale: 2, }, }), ); await warmup(model, []); expect((await model).model.predict).not.toHaveBeenCalled(); @@ -64,13 +64,13 @@ describe('Warmup', () => { }>((resolve) => resolve({ model: fakeModel, - modelDefinition: { url: 'foo', scale: 2 }, + modelDefinition: { url: 'foo', scale: 2, }, }), ); - await warmup(model, [[20, 10]]); + await warmup(model, [[20, 10,],]); expect((await model).model.predict).toHaveBeenCalledWith( expect.objectContaining({ - shape: [1, 10, 20, 3], + shape: [1, 10, 20, 3,], }), ); }); @@ -83,21 +83,21 @@ describe('Warmup', () => { }>((resolve) => resolve({ model: fakeModel, - modelDefinition: { url: 'foo', scale: 2 }, + modelDefinition: { url: 'foo', scale: 2, }, }), ); await warmup(model, [ - [20, 10], - [200, 100], + [20, 10,], + [200, 100,], ]); expect((await model).model.predict).toHaveBeenCalledWith( expect.objectContaining({ - shape: [1, 10, 20, 3], + shape: [1, 10, 20, 3,], }), ); expect((await model).model.predict).toHaveBeenCalledWith( expect.objectContaining({ - shape: [1, 100, 200, 3], + shape: [1, 100, 200, 3,], }), ); }); @@ -112,13 +112,13 @@ describe('Warmup', () => { }>((resolve) => resolve({ model: fakeModel, - modelDefinition: { url: 'foo', scale: 2 }, + modelDefinition: { url: 'foo', scale: 2, }, }), ); - await warmup(model, [{ patchSize: 10 }]); + await warmup(model, [{ patchSize: 10, },]); expect((await model).model.predict).toHaveBeenCalledWith( expect.objectContaining({ - shape: [1, 10, 10, 3], + shape: [1, 10, 10, 3,], }), ); }); @@ -131,18 +131,18 @@ describe('Warmup', () => { }>((resolve) => resolve({ model: fakeModel, - modelDefinition: { url: 'foo', scale: 2 }, + modelDefinition: { url: 'foo', scale: 2, }, }), ); - await warmup(model, [{ patchSize: 10 }, { patchSize: 20 }]); + await warmup(model, [{ patchSize: 10, }, { patchSize: 20, },]); expect((await model).model.predict).toHaveBeenCalledWith( expect.objectContaining({ - shape: [1, 10, 10, 3], + shape: [1, 10, 10, 3,], }), ); expect((await model).model.predict).toHaveBeenCalledWith( expect.objectContaining({ - shape: [1, 20, 20, 3], + shape: [1, 20, 20, 3,], }), ); }); diff --git a/packages/upscalerjs/src/warmup.ts b/packages/upscalerjs/src/warmup.ts index f426265a4..5b246d3d6 100644 --- a/packages/upscalerjs/src/warmup.ts +++ b/packages/upscalerjs/src/warmup.ts @@ -1,5 +1,5 @@ -import { tf } from './dependencies.generated'; -import { WarmupSizes, IModelDefinition, WarmupSizesByPatchSize } from './types'; +import { tf, } from './dependencies.generated'; +import { WarmupSizes, IModelDefinition, WarmupSizesByPatchSize, } from './types'; const isWarmupSizeByPatchSize = ( size: WarmupSizes, @@ -15,15 +15,13 @@ const warmup = async ( sizes: WarmupSizes[], ) => { await tf.nextFrame(); - const { model } = await modelPackage; + const { model, } = await modelPackage; for (const size of sizes) { if (isWarmupSizeByPatchSize(size)) { - const { patchSize, padding = 0 } = size; + const { patchSize, padding = 0, } = size; const amount = patchSize + padding * 2; - const pred = (await model.predict( - tf.zeros([1, amount, amount, 3]), - )) as tf.Tensor; + const pred = model.predict(tf.zeros([1, amount, amount, 3,])) as tf.Tensor4D; await tf.nextFrame(); pred.dataSync(); pred.dispose(); @@ -35,10 +33,8 @@ const warmup = async ( )}`, ); } - const [width, height] = size; - const pred = (await model.predict( - tf.zeros([1, height, width, 3]), - )) as tf.Tensor; + const [width, height,] = size; + const pred = model.predict(tf.zeros([1, height, width, 3,])) as tf.Tensor4D; await tf.nextFrame(); pred.dataSync(); pred.dispose(); diff --git a/packages/upscalerjs/tsconfig.json b/packages/upscalerjs/tsconfig.json index 28bd44b76..a2cb3dd9a 100644 --- a/packages/upscalerjs/tsconfig.json +++ b/packages/upscalerjs/tsconfig.json @@ -14,5 +14,5 @@ "noFallthroughCasesInSwitch": true }, "include": ["src/**/*.ts"], - "exclude": ["node_modules", "**/*.test.ts"] + "exclude": ["node_modules", "**/*.test.ts", "**/*.generated.ts"] } diff --git a/packages/upscalerjs/tslint.json b/packages/upscalerjs/tslint.json deleted file mode 100644 index cfd57cbe3..000000000 --- a/packages/upscalerjs/tslint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": ["tslint:recommended", "tslint-config-prettier"], - "rules": { - "max-classes-per-file": "off", - "curly": true, - "no-empty": [true, "allow-empty-catch"] - - } -} diff --git a/yarn.lock b/yarn.lock index f56a2633a..5b359642c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1605,6 +1605,15 @@ resolved "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-10.1.0.tgz" integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg== +"@es-joy/jsdoccomment@~0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.18.0.tgz#2532b2ecb8576d694011b157c447ed6b12534c70" + integrity sha512-TjT8KJULV4I6ZiwIoKr6eMs+XpRejqwJ/VA+QPDeFGe9j6bZFKmMJ81EeFsGm6JNZhnzm37aoxVROmTh2PZoyA== + dependencies: + comment-parser "1.3.0" + esquery "^1.4.0" + jsdoc-type-pratt-parser "~2.2.2" + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz" @@ -1620,6 +1629,21 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@eslint/eslintrc@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.5.tgz#33f1b838dbf1f923bfa517e008362b78ddbbf318" + integrity sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.2.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + "@evocateur/libnpmaccess@^3.1.2": version "3.1.2" resolved "https://registry.npmjs.org/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz" @@ -1740,7 +1764,16 @@ debug "^4.1.1" minimatch "^3.0.4" -"@humanwhocodes/object-schema@^1.2.0": +"@humanwhocodes/config-array@^0.9.2": + version "0.9.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.3.tgz#f2564c744b387775b436418491f15fce6601f63e" + integrity sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0", "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== @@ -3333,7 +3366,7 @@ resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== -"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.9" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== @@ -3552,6 +3585,21 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/eslint-plugin@^5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.11.0.tgz#3b866371d8d75c70f9b81535e7f7d3aa26527c7a" + integrity sha512-HJh33bgzXe6jGRocOj4FmefD7hRY4itgjzOrSs3JPrTNXsX7j5+nQPciAUj/1nZtwo2kAc3C75jZO+T23gzSGw== + dependencies: + "@typescript-eslint/scope-manager" "5.11.0" + "@typescript-eslint/type-utils" "5.11.0" + "@typescript-eslint/utils" "5.11.0" + debug "^4.3.2" + functional-red-black-tree "^1.0.1" + ignore "^5.1.8" + regexpp "^3.2.0" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/experimental-utils@4.33.0", "@typescript-eslint/experimental-utils@^4.0.1": version "4.33.0" resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz" @@ -3585,6 +3633,16 @@ "@typescript-eslint/typescript-estree" "4.33.0" debug "^4.3.1" +"@typescript-eslint/parser@^5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.11.0.tgz#b4fcaf65513f9b34bdcbffdda055724a5efb7e04" + integrity sha512-x0DCjetHZYBRovJdr3U0zG9OOdNXUaFLJ82ehr1AlkArljJuwEsgnud+Q7umlGDFLFrs8tU8ybQDFocp/eX8mQ== + dependencies: + "@typescript-eslint/scope-manager" "5.11.0" + "@typescript-eslint/types" "5.11.0" + "@typescript-eslint/typescript-estree" "5.11.0" + debug "^4.3.2" + "@typescript-eslint/scope-manager@4.33.0": version "4.33.0" resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz" @@ -3593,6 +3651,23 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" +"@typescript-eslint/scope-manager@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz#f5aef83ff253f457ecbee5f46f762298f0101e4b" + integrity sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA== + dependencies: + "@typescript-eslint/types" "5.11.0" + "@typescript-eslint/visitor-keys" "5.11.0" + +"@typescript-eslint/type-utils@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.11.0.tgz#58be0ba73d1f6ef8983d79f7f0bc2209b253fefe" + integrity sha512-wDqdsYO6ofLaD4DsGZ0jGwxp4HrzD2YKulpEZXmgN3xo4BHJwf7kq49JTRpV0Gx6bxkSUmc9s0EIK1xPbFFpIA== + dependencies: + "@typescript-eslint/utils" "5.11.0" + debug "^4.3.2" + tsutils "^3.21.0" + "@typescript-eslint/types@3.10.1": version "3.10.1" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz" @@ -3603,6 +3678,11 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== +"@typescript-eslint/types@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.11.0.tgz#ba345818a2540fdf2755c804dc2158517ab61188" + integrity sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ== + "@typescript-eslint/typescript-estree@3.10.1": version "3.10.1" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz" @@ -3630,6 +3710,31 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz#53f9e09b88368191e52020af77c312a4777ffa43" + integrity sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg== + dependencies: + "@typescript-eslint/types" "5.11.0" + "@typescript-eslint/visitor-keys" "5.11.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.11.0.tgz#d91548ef180d74c95d417950336d9260fdbe1dc5" + integrity sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.11.0" + "@typescript-eslint/types" "5.11.0" + "@typescript-eslint/typescript-estree" "5.11.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + "@typescript-eslint/visitor-keys@3.10.1": version "3.10.1" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz" @@ -3645,6 +3750,14 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@5.11.0": + version "5.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz#888542381f1a2ac745b06d110c83c0b261487ebb" + integrity sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA== + dependencies: + "@typescript-eslint/types" "5.11.0" + eslint-visitor-keys "^3.0.0" + "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz" @@ -4027,7 +4140,7 @@ acorn@^8.4.1: resolved "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz" integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== -acorn@^8.5.0: +acorn@^8.5.0, acorn@^8.7.0: version "8.7.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== @@ -4328,6 +4441,11 @@ argparse@^1.0.10, argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + "argparse@~ 0.1.11": version "0.1.16" resolved "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz" @@ -5466,6 +5584,14 @@ chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3. escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" + integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" @@ -5856,6 +5982,11 @@ commander@1.3.x: dependencies: keypress "0.1.x" +commander@5.1.0, commander@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + commander@^2.11.0, commander@^2.12.1, commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" @@ -5866,10 +5997,10 @@ commander@^4.1.1: resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== +comment-parser@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.0.tgz#68beb7dbe0849295309b376406730cd16c719c44" + integrity sha512-hRpmWIKgzd81vn0ydoWoyPoALEOnF4wt8yKD35Ib1D6XC2siLiYaiqfGkYrunuKdsXGwpBpHU3+9r+RVw2NZfA== common-tags@^1.8.0: version "1.8.0" @@ -6740,6 +6871,13 @@ debug@^4.1.0, debug@^4.1.1: dependencies: ms "^2.1.1" +debug@^4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz" @@ -7585,6 +7723,18 @@ escodegen@~1.9.0: optionalDependencies: source-map "~0.6.1" +eslint-config-prettier@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== + dependencies: + get-stdin "^6.0.0" + +eslint-config-prettier@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" + integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== + eslint-config-react-app@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-6.0.0.tgz" @@ -7643,6 +7793,20 @@ eslint-plugin-jest@^24.1.0: dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" +eslint-plugin-jsdoc@^37.8.2: + version "37.8.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.8.2.tgz#503b03f732b26ecfc61e344dc2df0f00d0fe8590" + integrity sha512-YsCdhrfdipGAy1NBdPOR5yiFzsyKv7lPDKlPn5aZGsQX+0KAw4fHV4uTdW9zsXJ8MxLgaF2cOC9e7JPwfJpYJw== + dependencies: + "@es-joy/jsdoccomment" "~0.18.0" + comment-parser "1.3.0" + debug "^4.3.3" + escape-string-regexp "^4.0.0" + esquery "^1.4.0" + regextras "^0.8.0" + semver "^7.3.5" + spdx-expression-parse "^3.0.1" + eslint-plugin-jsx-a11y@^6.3.1: version "6.4.1" resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz" @@ -7660,6 +7824,11 @@ eslint-plugin-jsx-a11y@^6.3.1: jsx-ast-utils "^3.1.0" language-tags "^1.0.5" +eslint-plugin-prefer-arrow@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz#e7fbb3fa4cd84ff1015b9c51ad86550e55041041" + integrity sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ== + eslint-plugin-react-hooks@^4.2.0: version "4.3.0" resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz" @@ -7708,6 +7877,14 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.0.tgz#c1f6ea30ac583031f203d65c73e723b01298f153" + integrity sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz" @@ -7732,6 +7909,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz#6fbb166a6798ee5991358bc2daa1ba76cc1254a1" + integrity sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ== + eslint-webpack-plugin@^2.5.2: version "2.5.4" resolved "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-2.5.4.tgz" @@ -7790,6 +7972,47 @@ eslint@^7.11.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +eslint@^8.8.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.8.0.tgz#9762b49abad0cb4952539ffdb0a046392e571a2d" + integrity sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ== + dependencies: + "@eslint/eslintrc" "^1.0.5" + "@humanwhocodes/config-array" "^0.9.2" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.0" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.2.0" + espree "^9.3.0" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.6.0" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz" @@ -7799,6 +8022,15 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" +espree@^9.2.0, espree@^9.3.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.0.tgz#c1240d79183b72aaee6ccfa5a90bc9111df085a8" + integrity sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ== + dependencies: + acorn "^8.7.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^3.1.0" + esprima@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz" @@ -8191,6 +8423,17 @@ fast-glob@^3.1.1: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" @@ -8704,6 +8947,11 @@ get-stdin@^4.0.1: resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" @@ -8819,6 +9067,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz" @@ -8829,10 +9084,10 @@ glob-to-regexp@^0.4.1: resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.6: - version "7.2.0" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== +glob@7.1.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.6" + resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -8841,10 +9096,10 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.1.6" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.6: + version "7.2.0" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -8936,6 +9191,18 @@ globby@^11.0.3: merge2 "^1.3.0" slash "^3.0.0" +globby@^11.0.4: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + globby@^6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz" @@ -9704,6 +9971,11 @@ ignore@^5.1.4, ignore@^5.1.8: resolved "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz" integrity sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ== +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" @@ -10993,6 +11265,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + js-yaml@~2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz" @@ -11006,6 +11285,11 @@ jsbn@~0.1.0: resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= +jsdoc-type-pratt-parser@~2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-2.2.2.tgz#a85e407ac502b444dc23333aa4d6d0dc83f76187" + integrity sha512-zRokSWcPLSWkoNzsWn9pq7YYSwDhKyEe+cJYT2qaPqLOOJb5sFSi46BPj81vP+e8chvCNdQL9RG86Bi9EI6MDw== + jsdom@^14.1.0: version "14.1.0" resolved "https://registry.npmjs.org/jsdom/-/jsdom-14.1.0.tgz" @@ -11865,7 +12149,7 @@ merge-stream@^2.0.0: resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3, merge2@^1.3.0: +merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -15115,7 +15399,7 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.1.0: +regexpp@^3.1.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -15132,6 +15416,11 @@ regexpu-core@^4.7.1: unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.0.0" +regextras@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/regextras/-/regextras-0.8.0.tgz#ec0f99853d4912839321172f608b544814b02217" + integrity sha512-k519uI04Z3SaY0fLX843MRXnDeG2+vHOFsyhiPZvNLe7r8rD2YNRjq4BQLZZ0oAr2NrtvZlICsXysGNFPGa3CQ== + registry-auth-token@3.3.2: version "3.3.2" resolved "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz" @@ -16211,7 +16500,7 @@ spdx-exceptions@^2.1.0: resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz" integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== -spdx-expression-parse@^3.0.0: +spdx-expression-parse@^3.0.0, spdx-expression-parse@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== @@ -16655,6 +16944,11 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" +strip-json-comments@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" + integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" @@ -17289,9 +17583,9 @@ tsconfig-paths@^3.11.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^1.13.0, tslib@^1.9.0: +tslib@^1.10.0, tslib@^1.13.0, tslib@^1.9.0: version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^1.8.1: @@ -17309,6 +17603,38 @@ tslint-config-prettier@^1.18.0: resolved "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz" integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== +tslint-to-eslint-config@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tslint-to-eslint-config/-/tslint-to-eslint-config-1.0.0.tgz#9283649f035c62acfe0f1f5bfe1cc052705c734f" + integrity sha512-BNvXP3EQX6BMcOgp5OqYWcKrYhfaW3sFjeNjf5HVQRbFTdzeJrtaBO9C4MGl5d9iVnOleaOCAyMX9MZA5SZTfQ== + dependencies: + chalk "4.0.0" + commander "5.1.0" + eslint-config-prettier "6.11.0" + glob "7.1.6" + strip-json-comments "3.1.0" + tslint "6.1.2" + typescript "3.9.3" + +tslint@6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.2.tgz#2433c248512cc5a7b2ab88ad44a6b1b34c6911cf" + integrity sha512-UyNrLdK3E0fQG/xWNqAFAC5ugtFyPO4JJR1KyyfQAyzR8W0fTRrC91A8Wej4BntFzcvETdCSDa/4PnNYJQLYiA== + dependencies: + "@babel/code-frame" "^7.0.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^4.0.1" + glob "^7.1.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + mkdirp "^0.5.3" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.10.0" + tsutils "^2.29.0" + tslint@^6.1.2: version "6.1.3" resolved "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz" @@ -17448,6 +17774,11 @@ typedarray@^0.0.6: resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@3.9.3: + version "3.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a" + integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ== + typescript@^3.9.7: version "3.9.7" resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz"