diff --git a/.all-contributorsrc b/.all-contributorsrc index 078babbb..f1ba03ba 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -23,6 +23,15 @@ "code", "test" ] + }, + { + "login": "drproktor", + "name": "Max Huber", + "avatar_url": "https://avatars.githubusercontent.com/u/19718418?v=4", + "profile": "https://github.com/drproktor", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b9b20b9c..dc37ee98 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -29,7 +29,7 @@ jobs: path: ${{env.YARN_CACHE}} key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Setup Node.js ${{ matrix.node }} - uses: actions/setup-node@v3.3.0 + uses: actions/setup-node@v3.4.1 with: node-version: ${{ matrix.node }} - name: Install dependencies @@ -49,7 +49,7 @@ jobs: - name: Set yarn cache run: yarn config set cache-folder ${{env.YARN_CACHE}} - name: Setup Node.js - uses: actions/setup-node@v3.3.0 + uses: actions/setup-node@v3.4.1 with: node-version: ${{env.NODEJS}} - name: Cache node modules @@ -64,7 +64,7 @@ jobs: - name: Build package run: yarn build:doc - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.3.4 + uses: JamesIves/github-pages-deploy-action@v4.4.0 with: branch: gh-pages # The branch the action should deploy to. folder: docs # The folder the action should deploy. @@ -78,7 +78,7 @@ jobs: - name: Set yarn cache run: yarn config set cache-folder ${{env.YARN_CACHE}} - name: Setup Node.js - uses: actions/setup-node@v3.3.0 + uses: actions/setup-node@v3.4.1 with: node-version: ${{env.NODEJS}} - name: Cache node modules diff --git a/README.md b/README.md index 7e6bad86..bea40fea 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,15 @@ -[![NodeJs](https://github.com/Belphemur/node-json-db/actions/workflows/nodejs.yml/badge.svg)](https://github.com/Belphemur/node-json-db/actions/workflows/nodejs.yml)[![codecov](https://codecov.io/gh/Belphemur/node-json-db/branch/master/graph/badge.svg?token=J3Ppt4UCbY)](https://codecov.io/gh/Belphemur/node-json-db)[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FBelphemur%2Fnode-json-db.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FBelphemur%2Fnode-json-db?ref=badge_shield) +[![NodeJs](https://github.com/Belphemur/node-json-db/actions/workflows/nodejs.yml/badge.svg)](https://github.com/Belphemur/node-json-db/actions/workflows/nodejs.yml) [![codecov](https://codecov.io/gh/Belphemur/node-json-db/branch/master/graph/badge.svg?token=J3Ppt4UCbY)](https://codecov.io/gh/Belphemur/node-json-db) +[![npm version](https://badge.fury.io/js/node-json-db.svg)](https://badge.fury.io/js/node-json-db) +> A simple "database" that use JSON file for Node.JS. -[![NPM](https://nodei.co/npm/node-json-db.png?downloads=true&stars=true)](https://nodei.co/npm/node-json-db/) +## Breaking changes since v1.x.x +### v2.0.0 -> A simple "database" that use JSON file for Node.JS. +JsonDB is now using the concept of async/await for all its calls since we read from the database file on demands and +depending on how the database is configured, we might write at each push. + +* You're now forced to use the `Config` object to setup JsonDB +* Every method are now asynchronous ## Installation Add `node-json-db` to your existing Node.js project. @@ -52,17 +59,17 @@ var db = new JsonDB(new Config("myDataBase", true, false, '/')); // Pushing the data into the database // With the wanted DataPath // By default the push will override the old value -db.push("/test1","super test"); +await db.push("/test1","super test"); // It also create automatically the hierarchy when pushing new data for a DataPath that doesn't exists -db.push("/test2/my/test",5); +await db.push("/test2/my/test",5); // You can also push directly objects -db.push("/test3", {test:"test", json: {test:["test"]}}); +await db.push("/test3", {test:"test", json: {test:["test"]}}); // If you don't want to override the data but to merge them // The merge is recursive and work with Object and Array. -db.push("/test3", { +await db.push("/test3", { new:"cool", json: { important : 5 @@ -85,20 +92,20 @@ This give you this results : // You can't merge primitive. // If you do this: -db.push("/test2/my/test/",10,false); +await db.push("/test2/my/test/",10,false); // The data will be overriden // Get the data from the root -var data = db.getData("/"); +var data = await db.getData("/"); // From a particular DataPath -var data = db.getData("/test1"); +var data = await db.getData("/test1"); // If you try to get some data from a DataPath that doesn't exists // You'll get an Error try { - var data = db.getData("/test1/test/dont/work"); + var data = await db.getData("/test1/test/dont/work"); } catch(error) { // The error will tell you where the DataPath stopped. In this case test1 // Since /test1/test does't exist. @@ -106,14 +113,14 @@ try { }; // Deleting data -db.delete("/test1"); +await db.delete("/test1"); // Save the data (useful if you disable the saveOnPush) -db.save(); +await db.save(); // In case you have a exterior change to the databse file and want to reload it // use this method -db.reload(); +await db.reload(); ``` @@ -150,10 +157,10 @@ interface FooBar { } const object = {Hello: "World", World: 5} as FooBar; -db.push("/test", object); +await db.push("/test", object); //Will be typed as FooBar in your IDE -const result = db.getObject("/test"); +const result = await db.getObject("/test"); ``` @@ -170,79 +177,79 @@ import { Config } from 'node-json-db/dist/lib/JsonDBConfig' const db = new JsonDB(new Config("myDataBase", true, false, '/')); // This will create an array 'myarray' with the object '{obj:'test'}' at index 0 -db.push("/arraytest/myarray[0]", { +await db.push("/arraytest/myarray[0]", { obj:'test' }, true); // You can retrieve a property of an object included in an array // testString = 'test'; -var testString = db.getData("/arraytest/myarray[0]/obj"); +var testString = await db.getData("/arraytest/myarray[0]/obj"); // Doing this will delete the object stored at the index 0 of the array. // Keep in mind this won't delete the array even if it's empty. -db.delete("/arraytest/myarray[0]"); +await db.delete("/arraytest/myarray[0]"); ``` #### Appending in Array ```javascript // You can also easily append new item to an existing array // This set the next index with {obj: 'test'} -db.push("/arraytest/myarray[]", { +await db.push("/arraytest/myarray[]", { obj:'test' }, true); // The append feature can be used in conjuction with properties // This will set the next index as an object {myTest: 'test'} -db.push("/arraytest/myarray[]/myTest", 'test', true); +await db.push("/arraytest/myarray[]/myTest", 'test', true); ``` #### Last Item in Array ```javascript // Add basic array -db.push("/arraytest/lastItemArray", [1, 2, 3], true); +await db.push("/arraytest/lastItemArray", [1, 2, 3], true); // You can easily get the last item of the array with the index -1 // This will return 3 -db.getData("/arraytest/lastItemArray[-1]"); +await db.getData("/arraytest/lastItemArray[-1]"); // You can delete the last item of an array with -1 // This will remove the integer "3" from the array -db.delete("/arraytest/lastItemArray[-1]"); +await db.delete("/arraytest/lastItemArray[-1]"); // This will return 2 since 3 just got removed -db.getData("/arraytest/lastItemArray[-1]"); +await db.getData("/arraytest/lastItemArray[-1]"); ``` #### Count for Array ```javascript // -db.push("/arraytest/list", [{id: 65464646155, name: "test"}], true); +await db.push("/arraytest/list", [{id: 65464646155, name: "test"}], true); // You can have the number of element, in this case = 1 -let numberOfElement = db.count("/arraytest/list"); +let numberOfElement = await db.count("/arraytest/list"); ``` #### Get Index in Array ```javascript // You can have the current index of an object -db.push("/arraytest/myarray", {id: 65464646155, name: "test"}, true); -db.getIndex("/arraytest/myarray", 65464646155); +await db.push("/arraytest/myarray", {id: 65464646155, name: "test"}, true); +await db.getIndex("/arraytest/myarray", 65464646155); // By default, the property is 'id' // You can add another property instead -db.getIndex("/arraytest/myarray", "test", "name"); +await db.getIndex("/arraytest/myarray", "test", "name"); // It's useful if you want to delete some object -db.delete("/arraytest/myarray[" + db.getIndex("/arraytest/myarray", 65464646155) + "]"); +await db.delete("/arraytest/myarray[" + await db.getIndex("/arraytest/myarray", 65464646155) + "]"); ``` #### Nesting in Array ```javascript // You can easily access any nested array and their object //You can also append to nested array other array -db.push("/arraytest/myarray", +await db.push("/arraytest/myarray", [ [ { @@ -262,7 +269,7 @@ db.push("/arraytest/myarray", //This will return the first object (obj: 'test') -db.getData("/arraytest/myarray[0][0]"); +await db.getData("/arraytest/myarray[0][0]"); ``` ### Exception/Error @@ -294,7 +301,7 @@ db.getData("/arraytest/myarray[0][0]"); ## Object with `separator` in key Object pushed with key containing the `separator` character won't be reachable. See [#75](https://github.com/Belphemur/node-json-db/issues/75). - Please consider the `separator` as a reserved character by node-json-db. + Please consider the `separator` as a reserved character by node-json-await db. # Contributors @@ -306,6 +313,7 @@ db.getData("/arraytest/myarray[0][0]");
Jamie Davis

🛡️
sidblommerswork

💻 ⚠️ +
Max Huber

💻 @@ -320,4 +328,4 @@ db.getData("/arraytest/myarray[0][0]"); ## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FBelphemur%2Fnode-json-db.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FBelphemur%2Fnode-json-db?ref=badge_large) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FBelphemur%2Fnode-json-await db.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FBelphemur%2Fnode-json-db?ref=badge_large) diff --git a/jest.config.js b/jest.config.js index e4249dca..6a4e0e3c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,5 +2,11 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', - coverageProvider: "v8" + coverageProvider: "v8", + globals: { + "ts-jest": { + isolatedModules: true, + useESM: true + }, + }, }; \ No newline at end of file diff --git a/package.json b/package.json index 320dec99..5baa6beb 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Belphemur/node-json-db", "dependencies": { - "mkdirp": "~1.0.4" + "atomically": "^1.7.0" }, "config": { "commitizen": { @@ -67,12 +67,12 @@ "@types/safe-regex": "^1.1.2", "cz-conventional-changelog": "^3.3.0", "husky": "^8.0.0", - "jest": "^27.2.0", + "jest": "^28.1.3", "last-release-git": "^0.0.3", "safe-regex": "~2.1.1", "semantic-release": "^19.0.2", "travis-deploy-once": "^5.0.11", - "ts-jest": "^27.0.5", + "ts-jest": "^28.0.7", "typedoc": "^0.23.1", "typescript": "^4.4.3", "validate-commit-msg": "^2.14.0" diff --git a/src/JsonDB.ts b/src/JsonDB.ts index 6c9a7d08..c7675719 100644 --- a/src/JsonDB.ts +++ b/src/JsonDB.ts @@ -1,436 +1,380 @@ -import { KeyValue, merge, removeTrailingChar } from './lib/Utils' -import * as FS from 'fs' -import * as path from 'path' -import * as mkdirp from 'mkdirp' -import { DatabaseError, DataError } from './lib/Errors' -import { DBParentData } from './lib/DBParentData' -import { ArrayInfo } from './lib/ArrayInfo' -import { Config, JsonDBConfig } from './lib/JsonDBConfig' +import {KeyValue, merge, removeTrailingChar} from './lib/Utils' +import {DatabaseError, DataError} from './lib/Errors' +import {DBParentData} from './lib/DBParentData' +import {ArrayInfo} from './lib/ArrayInfo' +import {JsonDBConfig} from './lib/JsonDBConfig' type DataPath = Array export type FindCallback = (entry: any, index: number | string) => boolean export class JsonDB { - private loaded: boolean = false - private data: KeyValue = {} - private readonly config: JsonDBConfig - - /** - * JSONDB Constructor - * @param filename where to save the "DB". Can also be used to give the whole configuration - * @param saveOnPush save the database at each push command into the json file - * @param humanReadable the JSON file will be readable easily by a human - * @param separator what to use as separator - * @param syncOnSave force sync of the database (call fsync()) - */ - constructor( - filename: string | Config, - saveOnPush: boolean = true, - humanReadable: boolean = false, - separator: string = '/', - syncOnSave: boolean = false - ) { - if (filename instanceof Config) { - this.config = filename - } else { - this.config = new Config( - filename, - saveOnPush, - humanReadable, - separator, - syncOnSave - ) + private loaded: boolean = false + private data: KeyValue = {} + private readonly config: JsonDBConfig + + /** + * JSONDB Constructor + * @param config Configuration for the database + */ + constructor(config: JsonDBConfig) { + this.config = config; } - if (!FS.existsSync(this.config.filename)) { - const dirname = path.dirname(this.config.filename) - mkdirp.sync(dirname) - this.save(true) - this.loaded = true - } - } - - /** - * Process datapath into different parts - * @param dataPath - */ - private processDataPath(dataPath: string): DataPath { - if (dataPath === undefined || !dataPath.trim()) { - throw new DataError("The Data Path can't be empty", 6) - } - if (dataPath == this.config.separator) { - return [] - } - dataPath = removeTrailingChar(dataPath, this.config.separator) - const path = dataPath.split(this.config.separator) - path.shift() - return path - } - - private retrieveData(dataPath: DataPath, create: boolean = false) { - this.load() - - const thisDb = this - - const recursiveProcessDataPath = (data: any, index: number): any => { - let property = dataPath[index] - - /** - * Find the wanted Data or create it. - */ - function findData(isArray: boolean = false) { - if (data.hasOwnProperty(property)) { - data = data[property] - } else if (create) { - if (isArray) { - data[property] = [] - } else { - data[property] = {} - } - data = data[property] - } else { - throw new DataError( - `Can't find dataPath: ${thisDb.config.separator}${dataPath.join( - thisDb.config.separator - )}. Stopped at ${property}`, - 5 - ) + /** + * Process datapath into different parts + * @param dataPath + */ + private processDataPath(dataPath: string): DataPath { + if (dataPath === undefined || !dataPath.trim()) { + throw new DataError("The Data Path can't be empty", 6) } - } - - const arrayInfo = ArrayInfo.processArray(property) - if (arrayInfo) { - property = arrayInfo.property - findData(true) - if (!Array.isArray(data)) { - throw new DataError( - `DataPath: ${thisDb.config.separator}${dataPath.join( - thisDb.config.separator - )}. ${property} is not an array.`, - 11 - ) + if (dataPath == this.config.separator) { + return [] + } + dataPath = removeTrailingChar(dataPath, this.config.separator) + const path = dataPath.split(this.config.separator) + path.shift() + return path + } + + private async retrieveData(dataPath: DataPath, create: boolean = false) : Promise { + await this.load() + + const thisDb = this + + const recursiveProcessDataPath = (data: any, index: number): any => { + let property = dataPath[index] + + /** + * Find the wanted Data or create it. + */ + function findData(isArray: boolean = false) { + if (data.hasOwnProperty(property)) { + data = data[property] + } else if (create) { + if (isArray) { + data[property] = [] + } else { + data[property] = {} + } + data = data[property] + } else { + throw new DataError( + `Can't find dataPath: ${thisDb.config.separator}${dataPath.join( + thisDb.config.separator + )}. Stopped at ${property}`, + 5 + ) + } + } + + const arrayInfo = ArrayInfo.processArray(property) + if (arrayInfo) { + property = arrayInfo.property + findData(true) + if (!Array.isArray(data)) { + throw new DataError( + `DataPath: ${thisDb.config.separator}${dataPath.join( + thisDb.config.separator + )}. ${property} is not an array.`, + 11 + ) + } + const arrayIndex = arrayInfo.getIndex(data, true) + if (!arrayInfo.append && data.hasOwnProperty(arrayIndex)) { + data = arrayInfo.getData(data) + } else if (create) { + if (arrayInfo.append) { + data.push({}) + data = data[data.length - 1] + } else { + data[arrayIndex] = {} + data = data[arrayIndex] + } + } else { + throw new DataError( + `DataPath: ${thisDb.config.separator}${dataPath.join( + thisDb.config.separator + )}. . Can't find index ${arrayInfo.index} in array ${property}`, + 10 + ) + } + } else { + findData() + } + + if (dataPath.length == ++index) { + // check data + return data + } + return recursiveProcessDataPath(data, index) } - const arrayIndex = arrayInfo.getIndex(data, true) - if (!arrayInfo.append && data.hasOwnProperty(arrayIndex)) { - data = arrayInfo.getData(data) - } else if (create) { - if (arrayInfo.append) { - data.push({}) - data = data[data.length - 1] - } else { - data[arrayIndex] = {} - data = data[arrayIndex] - } - } else { - throw new DataError( - `DataPath: ${thisDb.config.separator}${dataPath.join( - thisDb.config.separator - )}. . Can't find index ${arrayInfo.index} in array ${property}`, - 10 - ) + + if (dataPath.length === 0) { + return this.data } - } else { - findData() - } - if (dataPath.length == ++index) { - // check data - return data - } - return recursiveProcessDataPath(data, index) + return recursiveProcessDataPath(this.data, 0) } - if (dataPath.length === 0) { - return this.data + private async getParentData(dataPath: string, create: boolean): Promise { + const path = this.processDataPath(dataPath) + const last = path.pop() + return new DBParentData( + await this.retrieveData(path, create), + this, + dataPath, + last + ) } - return recursiveProcessDataPath(this.data, 0) - } - - private getParentData(dataPath: string, create: boolean): DBParentData { - const path = this.processDataPath(dataPath) - const last = path.pop() - return new DBParentData( - this.retrieveData(path, create), - this, - dataPath, - last - ) - } - - /** - * Get the wanted data - * @param dataPath path of the data to retrieve - */ - public getData(dataPath: string): any { - const path = this.processDataPath(dataPath) - return this.retrieveData(path, false) - } - - /** - * Same as getData only here it's directly typed to your object - * @param dataPath path of the data to retrieve - */ - public getObject(dataPath: string): T { - return this.getData(dataPath) - } - - /** - * Check for existing datapath - * @param dataPath - */ - public exists(dataPath: string): boolean { - try { - this.getData(dataPath) - return true - } catch (e) { - if (e instanceof DataError) { - return false - } - throw e + /** + * Get the wanted data + * @param dataPath path of the data to retrieve + */ + public getData(dataPath: string): Promise { + const path = this.processDataPath(dataPath) + return this.retrieveData(path, false) } - } - - /** - * Returns the number of element which constitutes the array - * @param dataPath - */ - public count(dataPath: string): number { - const result = this.getData(dataPath) - if (!Array.isArray(result)) { - throw new DataError(`DataPath: ${dataPath} is not an array.`, 11) + + /** + * Same as getData only here it's directly typed to your object + * @param dataPath path of the data to retrieve + */ + public getObject(dataPath: string): Promise { + return this.getData(dataPath) } - const path = this.processDataPath(dataPath) - const data = this.retrieveData(path, false) - return data.length - } - - /** - * Returns the index of the object that meets the criteria submitted. Returns -1, if no match is found. - * @param dataPath base dataPath from where to start searching - * @param searchValue value to look for in the dataPath - * @param propertyName name of the property to look for searchValue - */ - public getIndex( - dataPath: string, - searchValue: string | number, - propertyName: string = 'id' - ): number { - const data = this.getArrayData(dataPath) - return data - .map(function (element: any) { - return element[propertyName] - }) - .indexOf(searchValue) - } - - /** - * Return the index of the value inside the array. Returns -1, if no match is found. - * @param dataPath base dataPath from where to start searching - * @param searchValue value to look for in the dataPath - */ - public getIndexValue(dataPath: string, searchValue: string | number): number { - return this.getArrayData(dataPath).indexOf(searchValue) - } - - private getArrayData(dataPath: string) { - const result = this.getData(dataPath) - if (!Array.isArray(result)) { - throw new DataError(`DataPath: ${dataPath} is not an array.`, 11) + + /** + * Check for existing datapath + * @param dataPath + */ + public async exists(dataPath: string): Promise { + try { + await this.getData(dataPath) + return true + } catch (e) { + if (e instanceof DataError) { + return false + } + throw e + } } - const path = this.processDataPath(dataPath) - return this.retrieveData(path, false) - } - - /** - * Find all specific entry in an array/object - * @param rootPath base dataPath from where to start searching - * @param callback method to filter the result and find the wanted entry. Receive the entry and it's index. - */ - public filter(rootPath: string, callback: FindCallback): T[] | undefined { - const result = this.getData(rootPath) - if (Array.isArray(result)) { - return result.filter(callback) as T[] + + /** + * Returns the number of element which constitutes the array + * @param dataPath + */ + public async count(dataPath: string): Promise { + const result = await this.getData(dataPath) + if (!Array.isArray(result)) { + throw new DataError(`DataPath: ${dataPath} is not an array.`, 11) + } + const path = this.processDataPath(dataPath) + const data = await this.retrieveData(path, false) + return data.length } - if (result instanceof Object) { - const entries = Object.entries(result) - const found = entries.filter((entry: [string, any]) => { - return callback(entry[1], entry[0]) - }) as [string, T][] - - if (!found || found.length < 1) { - return undefined - } - - return found.map((entry: [string, T]) => { - return entry[1] - }) + + /** + * Returns the index of the object that meets the criteria submitted. Returns -1, if no match is found. + * @param dataPath base dataPath from where to start searching + * @param searchValue value to look for in the dataPath + * @param propertyName name of the property to look for searchValue + */ + public async getIndex( + dataPath: string, + searchValue: string | number, + propertyName: string = 'id' + ): Promise { + const data = await this.getArrayData(dataPath) + return data + .map(function (element: any) { + return element[propertyName] + }) + .indexOf(searchValue) } - throw new DataError( - 'The entry at the path (' + - rootPath + - ') needs to be either an Object or an Array', - 12 - ) - } - - /** - * Find a specific entry in an array/object - * @param rootPath base dataPath from where to start searching - * @param callback method to filter the result and find the wanted entry. Receive the entry and it's index. - */ - public find(rootPath: string, callback: FindCallback): T | undefined { - const result = this.getData(rootPath) - if (Array.isArray(result)) { - return result.find(callback) as T + + /** + * Return the index of the value inside the array. Returns -1, if no match is found. + * @param dataPath base dataPath from where to start searching + * @param searchValue value to look for in the dataPath + */ + public async getIndexValue(dataPath: string, searchValue: string | number): Promise { + return (await this.getArrayData(dataPath)).indexOf(searchValue) } - if (result instanceof Object) { - const entries = Object.entries(result) - const found = entries.find((entry: Array) => { - return callback(entry[1], entry[0]) - }) - if (!found || found.length < 2) { - return undefined - } - return found[1] as T + + private async getArrayData(dataPath: string): Promise { + const result = await this.getData(dataPath) + if (!Array.isArray(result)) { + throw new DataError(`DataPath: ${dataPath} is not an array.`, 11) + } + const path = this.processDataPath(dataPath) + return this.retrieveData(path, false) } - throw new DataError( - 'The entry at the path (' + - rootPath + - ') needs to be either an Object or an Array', - 12 - ) - } - - /** - * Pushing data into the database - * @param dataPath path leading to the data - * @param data data to push - * @param override overriding or not the data, if not, it will merge them - */ - public push(dataPath: string, data: any, override: boolean = true): void { - const dbData = this.getParentData(dataPath, true) - // if (!dbData) { - // throw new Error('Data not found') - // } - - let toSet = data - if (!override) { - if (Array.isArray(data)) { - let storedData = dbData.getData() - if (storedData === undefined) { - storedData = [] - } else if (!Array.isArray(storedData)) { - throw new DataError( - "Can't merge another type of data with an Array", - 3 - ) + + /** + * Find all specific entry in an array/object + * @param rootPath base dataPath from where to start searching + * @param callback method to filter the result and find the wanted entry. Receive the entry and it's index. + */ + public async filter(rootPath: string, callback: FindCallback): Promise { + const result = await this.getData(rootPath) + if (Array.isArray(result)) { + return result.filter(callback) as T[] } - toSet = storedData.concat(data) - } else if (data === Object(data)) { - if (Array.isArray(dbData.getData())) { - throw new DataError("Can't merge an Array with an Object", 4) + if (result instanceof Object) { + const entries = Object.entries(result) + const found = entries.filter((entry: [string, any]) => { + return callback(entry[1], entry[0]) + }) as [string, T][] + + if (!found || found.length < 1) { + return undefined + } + + return found.map((entry: [string, T]) => { + return entry[1] + }) } - toSet = merge(dbData.getData(), data) - } + throw new DataError( + 'The entry at the path (' + + rootPath + + ') needs to be either an Object or an Array', + 12 + ) } - dbData.setData(toSet) - if (this.config.saveOnPush) { - this.save() + /** + * Find a specific entry in an array/object + * @param rootPath base dataPath from where to start searching + * @param callback method to filter the result and find the wanted entry. Receive the entry and it's index. + */ + public async find(rootPath: string, callback: FindCallback): Promise { + const result = await this.getData(rootPath) + if (Array.isArray(result)) { + return result.find(callback) as T + } + if (result instanceof Object) { + const entries = Object.entries(result) + const found = entries.find((entry: Array) => { + return callback(entry[1], entry[0]) + }) + if (!found || found.length < 2) { + return undefined + } + return found[1] as T + } + throw new DataError( + 'The entry at the path (' + + rootPath + + ') needs to be either an Object or an Array', + 12 + ) } - } - - /** - * Delete the data - * @param dataPath path leading to the data - */ - public delete(dataPath: string): void { - const dbData = this.getParentData(dataPath, true) - // if (!dbData) { - // return - // } - dbData.delete() - - if (this.config.saveOnPush) { - this.save() + + /** + * Pushing data into the database + * @param dataPath path leading to the data + * @param data data to push + * @param override overriding or not the data, if not, it will merge them + */ + public async push(dataPath: string, data: any, override: boolean = true): Promise { + const dbData = await this.getParentData(dataPath, true) + // if (!dbData) { + // throw new Error('Data not found') + // } + + let toSet = data + if (!override) { + if (Array.isArray(data)) { + let storedData = dbData.getData() + if (storedData === undefined) { + storedData = [] + } else if (!Array.isArray(storedData)) { + throw new DataError( + "Can't merge another type of data with an Array", + 3 + ) + } + toSet = storedData.concat(data) + } else if (data === Object(data)) { + if (Array.isArray(dbData.getData())) { + throw new DataError("Can't merge an Array with an Object", 4) + } + toSet = merge(dbData.getData(), data) + } + } + dbData.setData(toSet) + + if (this.config.saveOnPush) { + await this.save() + } + } + + /** + * Delete the data + * @param dataPath path leading to the data + */ + public async delete(dataPath: string): Promise { + const dbData = await this.getParentData(dataPath, true) + // if (!dbData) { + // return + // } + dbData.delete() + + if (this.config.saveOnPush) { + await this.save() + } } - } - - /** - * Only use this if you know what you're doing. - * It reset the full data of the database. - * @param data - */ - public resetData(data: any): void { - this.data = data - } - - /** - * Reload the database from the file - */ - public reload(): void { - this.loaded = false - this.load() - } - - /** - * Manually load the database - * It is automatically called when the first getData is done - */ - public load(): void { - if (this.loaded) { - return + + /** + * Only use this if you know what you're doing. + * It reset the full data of the database. + * @param data + */ + public resetData(data: any): void { + this.data = data } - try { - const data = FS.readFileSync(this.config.filename, 'utf8') - this.data = JSON.parse(data) - this.loaded = true - } catch (err) { - const error = new DatabaseError("Can't Load Database", 1, err) - throw error + + /** + * Reload the database from the file + */ + public async reload(): Promise { + this.loaded = false + await this.load() } - } - - /** - * Manually save the database - * By default you can't save the database if it's not loaded - * @param force force the save of the database - */ - public save(force?: boolean): void { - force = force || false - if (!force && !this.loaded) { - throw new DatabaseError("DataBase not loaded. Can't write", 7) + + /** + * Manually load the database + * It is automatically called when the first getData is done + */ + public async load(): Promise { + if (this.loaded) { + return + } + try { + this.data = await this.config.adapter.readAsync(); + this.loaded = true + } catch (err) { + throw new DatabaseError("Can't Load Database", 1, err) + } } - let data = '' - try { - if (this.config.humanReadable) { - data = JSON.stringify(this.data, null, 4) - } else { - data = JSON.stringify(this.data) - } - if (this.config.syncOnSave) { - const buffer = Buffer.from(String(data), 'utf8') - const fd_tmp = FS.openSync(this.config.filename, 'w') - let offset = 0 - let length = buffer.byteLength + + /** + * Manually save the database + * By default you can't save the database if it's not loaded + * @param force force the save of the database + */ + public async save(force?: boolean): Promise { + force = force || false + if (!force && !this.loaded) { + throw new DatabaseError("DataBase not loaded. Can't write", 7) + } try { - while (length > 0) { - const written = FS.writeSync(fd_tmp, buffer, offset, length) - offset += written - length -= written - } - } finally { - FS.fsyncSync(fd_tmp) - FS.closeSync(fd_tmp) + await this.config.adapter.writeAsync(this.data); + } catch (err) { + throw new DatabaseError("Can't save the database", 2, err) } - } else { - FS.writeFileSync(this.config.filename, data, 'utf8') - } - } catch (err) { - const error = new DatabaseError("Can't save the database", 2, err) - throw error } - } } diff --git a/src/adapter/IAdapter.ts b/src/adapter/IAdapter.ts new file mode 100644 index 00000000..1c3fb191 --- /dev/null +++ b/src/adapter/IAdapter.ts @@ -0,0 +1,21 @@ +/** + * Use to read and write data of type T + */ +export interface IAdapter { + /** + * Read the data from the medium + */ + readAsync: () => Promise + /** + * Write date into the medium + * @param data + */ + writeAsync: (data: T) => Promise +} + +export interface IFileAdapter extends IAdapter { + /** + * Name of the file used by the file adapter + */ + readonly filename: string; +} \ No newline at end of file diff --git a/src/adapter/data/JsonAdapter.ts b/src/adapter/data/JsonAdapter.ts new file mode 100644 index 00000000..ad639f04 --- /dev/null +++ b/src/adapter/data/JsonAdapter.ts @@ -0,0 +1,33 @@ +import {IAdapter} from "../IAdapter"; + +export class JsonAdapter implements IAdapter { + + private readonly adapter: IAdapter; + private readonly humanReadable: boolean; + + + constructor(adapter: IAdapter, humanReadable: boolean = false) { + this.adapter = adapter; + this.humanReadable = humanReadable; + } + + async readAsync(): Promise { + const data = await this.adapter.readAsync(); + if (data == null) { + await this.writeAsync({}); + return {}; + } + return JSON.parse(data); + } + + writeAsync(data: any): Promise { + let stringify = ''; + if (this.humanReadable) { + stringify = JSON.stringify(data, null, 4) + } else { + stringify = JSON.stringify(data) + } + return this.adapter.writeAsync(stringify); + } + +} \ No newline at end of file diff --git a/src/adapter/file/AtomicFileAdapter.ts b/src/adapter/file/AtomicFileAdapter.ts new file mode 100644 index 00000000..a0ff2a97 --- /dev/null +++ b/src/adapter/file/AtomicFileAdapter.ts @@ -0,0 +1,32 @@ +import {IFileAdapter} from "../IAdapter"; +import {readFile, writeFile} from "atomically"; + +export class AtomicFileAdapter implements IFileAdapter { + public readonly filename: string; + private fsync: boolean; + + constructor(filename: string, fsync: boolean) { + this.filename = filename; + this.fsync = fsync; + } + + async readAsync(): Promise { + try { + return await readFile(this.filename, { + encoding: 'utf-8' + }) + } catch (e) { + if ((e as NodeJS.ErrnoException).code === 'ENOENT') { + return null; + } + throw e + } + } + + writeAsync(data: string): Promise { + return writeFile(this.filename, data, { + encoding: 'utf-8', + fsync: this.fsync + }) + } +} \ No newline at end of file diff --git a/src/lib/JsonDBConfig.ts b/src/lib/JsonDBConfig.ts index 00a80e92..f0a859f4 100644 --- a/src/lib/JsonDBConfig.ts +++ b/src/lib/JsonDBConfig.ts @@ -1,31 +1,43 @@ import * as path from "path"; +import {IAdapter} from "../adapter/IAdapter"; +import {JsonAdapter} from "../adapter/data/JsonAdapter"; +import {AtomicFileAdapter} from "../adapter/file/AtomicFileAdapter"; export interface JsonDBConfig { - filename: string, - saveOnPush: boolean, - humanReadable: boolean, - separator: string, - syncOnSave: boolean + readonly adapter: IAdapter, + readonly saveOnPush: boolean, + readonly separator: string, } export class Config implements JsonDBConfig { - filename: string - humanReadable: boolean - saveOnPush: boolean - separator: string - syncOnSave: boolean - - constructor(filename: string, saveOnPush: boolean = true, humanReadable: boolean = false, separator: string = '/', syncOnSave: boolean = false) { - this.filename = filename - - // Force json if no extension - if (path.extname(filename) === "") { - this.filename += ".json" + adapter: IAdapter; + public readonly filename: string + saveOnPush: boolean + separator: string + + constructor(filename: string, saveOnPush: boolean = true, humanReadable: boolean = false, separator: string = '/', syncOnSave: boolean = false) { + this.filename = filename + + // Force json if no extension + if (path.extname(filename) === "") { + this.filename += ".json" + } + + this.saveOnPush = saveOnPush + this.separator = separator + this.adapter = new JsonAdapter(new AtomicFileAdapter(this.filename, syncOnSave), humanReadable); } +} - this.humanReadable = humanReadable - this.saveOnPush = saveOnPush - this.separator = separator - this.syncOnSave = syncOnSave - } +export class ConfigWithAdapter implements JsonDBConfig { + readonly adapter: IAdapter; + readonly saveOnPush: boolean; + readonly separator: string; + + + constructor(adapter: IAdapter, humanReadable: boolean, saveOnPush: boolean, separator: string) { + this.adapter = adapter; + this.saveOnPush = saveOnPush; + this.separator = separator; + } } \ No newline at end of file diff --git a/test/02-jsondb.test.ts b/test/02-jsondb.test.ts index 799a565e..f2062bb4 100644 --- a/test/02-jsondb.test.ts +++ b/test/02-jsondb.test.ts @@ -8,9 +8,7 @@ const testFile2 = "test/dirCreation/test_file2" const faulty = "test/faulty.json" const testFile3 = "test/test_file3" const testFile4 = "test/array_file" -const testFile5 = "test/test_file_empty" const testFile6 = "test/test_delete" -const testFile7 = "test/test_sync" interface Test { @@ -38,43 +36,27 @@ describe('JsonDB', () => { }) describe('Initialisation', () => { - let db = new JsonDB(testFile1, true, true) + let db = new JsonDB(new Config(testFile1, true, true)) - test('should create the JSON File', done => { + test('shouldn\'t create the JSON File', done => { fs.access(testFile1 + ".json", fs.constants.R_OK, function (err) { - expect(err).toBeNull() + expect(err).not.toBeNull(); done() }) }) - test('should create the JSON File when called directly', done => { - const jsondb = new JsonDB(testFile5, true, false) - fs.access(testFile5 + ".json", fs.constants.R_OK, function (err) { - expect(err).toBeNull() - done() - }) - - }) - - test('should create JSON file with sync', done => { - const jsondb = new JsonDB(testFile7, true, false, '/', true) - fs.access(testFile7+ ".json", fs.constants.R_OK, function (err) { - expect(err).toBeNull() - done() - }) - }) - test('should set en empty root', () => { - expect(JSON.stringify(db.getData("/"))).toEqual("{}") + test('should set en empty root', async () => { + expect(JSON.stringify(await db.getData("/"))).toEqual("{}") }) - test('should return a DatabaseError when loading faulty file', () => { - db = new JsonDB(faulty, true) + test('should return a DatabaseError when loading faulty file', async () => { + db = new JsonDB(new Config(faulty, true)) try { - (function (args) { - db.getData(args) + await (async function (args) { + return await db.getData(args) })('/') throw Error('Function did not throw') @@ -84,9 +66,9 @@ describe('JsonDB', () => { }) test( 'should return a DatabaseError when saving without successful loading.', - () => { + async () => { try { - db.save() + await db.save() throw Error('Function did not throw') } catch (e) { expect(e).toBeInstanceOf(DatabaseError) @@ -94,15 +76,6 @@ describe('JsonDB', () => { } ) - test('should work with config object', done => { - fs.unlinkSync(testFile1 + ".json") - let testDb = new JsonDB(new Config(testFile1, true, true)) - fs.access(testFile1 + ".json", fs.constants.R_OK, function (err) { - expect(err).toBeNull() - done() - }) - }) - }) describe('Data Management', () => { @@ -110,63 +83,63 @@ describe('JsonDB', () => { config.separator = '@' let db = new JsonDB(config) - test('should store the data at the root', () => { + test('should store the data at the root', async () => { const object = {test: {test: "test"}} - db.push("@", object) - expect(db.getData("@")).toBe(object) + await db.push("@", object) + expect(await db.getData("@")).toBe(object) }) - test('should store the data with typing', () => { + test('should store the data with typing', async () => { const object = {Hello: "test", World: 0} as Test; - db.push("@/hello", object) - const result = db.getObject("@/hello"); + await db.push("@/hello", object) + const result = await db.getObject("@/hello"); expect(result).toBe(object) }) - test('should have data at root', () => { - expect(db.exists('@test@test')).toBeTruthy() + test('should have data at root', async () => { + expect(await db.exists('@test@test')).toBeTruthy() }) - test('should not have data at not related path', () => { - expect(db.exists('@test@test@nope')).toBeFalsy() + test('should not have data at not related path', async () => { + expect(await db.exists('@test@test@nope')).toBeFalsy() }) - test('should override the data at the root', () => { + test('should override the data at the root', async () => { const object = {test: "test"} - db.push("@", object) - expect(db.getData("@")).toBe(object) + await db.push("@", object) + expect(await db.getData("@")).toBe(object) }) - test('should merge the data at the root', () => { + test('should merge the data at the root', async () => { let object = {test: {test: ['Okay']}} as any - db.push("@", object) - const data = db.getData("@") + await db.push("@", object) + const data = await db.getData("@") expect(data).toBe(object) object = {test: {test: ['Perfect'], okay: "test"}} as any - db.push("@", object, false) - expect(JSON.stringify(db.getData("@"))).toEqual('{\"test\":{\"test\":[\"Okay\",\"Perfect\"],\"okay\":\"test\"}}') + await db.push("@", object, false) + expect(JSON.stringify(await db.getData("@"))).toEqual('{\"test\":{\"test\":[\"Okay\",\"Perfect\"],\"okay\":\"test\"}}') }) - test('should return right data for dataPath', () => { - const data = db.getData("@test") + test('should return right data for dataPath', async () => { + const data = await db.getData("@test") expect(JSON.stringify(data)).toEqual('{\"test\":[\"Okay\",\"Perfect\"],\"okay\":\"test\"}') }) - test('should override only the data at dataPath', () => { + test('should override only the data at dataPath', async () => { const object = ['overriden'] - db.push("@test@test", object) - expect(db.getData("@test@test")).toBe(object) + await db.push("@test@test", object) + expect(await db.getData("@test@test")).toBe(object) }) test( 'should remove trailing Slash when pushing@getting data (@)', - () => { + async () => { const object = {test: {test: "test"}} - db.push("@testing@", object) - expect(db.getData("@testing")).toBe(object) + await db.push("@testing@", object) + expect(await db.getData("@testing")).toBe(object) } ) - test('should remove trailing Slash when deleting data (@)', () => { - db.delete("@testing@") + test('should remove trailing Slash when deleting data (@)', async () => { + await db.delete("@testing@") try { - (function (args) { - db.getData(args) + await (async function (args) { + await db.getData(args) })('@testing') throw Error('Function did not throw') @@ -175,22 +148,22 @@ describe('JsonDB', () => { } }) - test('should merge the data at dataPath', () => { + test('should merge the data at dataPath', async () => { const object = ['test2'] - db.push("@test@test", object, false) - expect(JSON.stringify(db.getData("@test@test"))).toEqual('[\"overriden\",\"test2\"]') + await db.push("@test@test", object, false) + expect(JSON.stringify(await db.getData("@test@test"))).toEqual('[\"overriden\",\"test2\"]') }) - test('should create the tree to reach dataPath', () => { + test('should create the tree to reach dataPath', async () => { const object = ['test2'] - db.push("@my@tree@is@awesome", object, false) - expect(JSON.stringify(db.getData("@my@tree@is@awesome"))).toEqual('[\"test2\"]') + await db.push("@my@tree@is@awesome", object, false) + expect(JSON.stringify(await db.getData("@my@tree@is@awesome"))).toEqual('[\"test2\"]') }) - test('should throw an Error when merging Object with Array', () => { + test('should throw an Error when merging Object with Array', async () => { try { - (function (path, data, override) { - db.push(path, data, override) + await (async function (path, data, override) { + await db.push(path, data, override) })("@test@test", {myTest: "test"}, false) throw Error('Function did not throw') @@ -199,18 +172,18 @@ describe('JsonDB', () => { } }) - test('should override a null constiable when merging', () => { + test('should override a null constiable when merging', async () => { const replacement = {a: 'test'} - db.push('@null', {a: null}, false) - db.push('@null', replacement, false) - const data = db.getData('@null') + await db.push('@null', {a: null}, false) + await db.push('@null', replacement, false) + const data = await db.getData('@null') expect(data['a']).toBe(replacement['a']) }) - test('should throw an Error when merging Array with Object', () => { + test('should throw an Error when merging Array with Object', async () => { try { - (function (path, data, override) { - db.push(path, data, override) + await (async function (path, data, override) { + await db.push(path, data, override) })("@test", ['test'], false) throw Error('Function did not throw') @@ -220,10 +193,10 @@ describe('JsonDB', () => { }) - test('should throw an Error when asking for empty dataPath', () => { + test('should throw an Error when asking for empty dataPath', async () => { try { - (function (args) { - db.getData(args) + await (async function (args) { + await db.getData(args) })("") throw Error('Function did not throw') @@ -232,12 +205,12 @@ describe('JsonDB', () => { } }) - test('should delete the data', () => { - db.delete("@test@test") + test('should delete the data', async () => { + await db.delete("@test@test") try { - (function (args) { - db.getData(args) + await (async function (args) { + await db.getData(args) })("@test@test") throw Error('Function did not throw') @@ -246,53 +219,47 @@ describe('JsonDB', () => { } }) - test('should reload the file', () => { + test('should reload the file', async () => { const data = JSON.stringify({test: "Okay", perfect: 1}) fs.writeFileSync(testFile2 + ".json", data, 'utf8') - db.reload() - expect(db.getData("@test")).toBe("Okay") - expect(db.getData("@perfect")).toBe(1) + await db.reload() + expect(await db.getData("@test")).toBe("Okay") + expect(await db.getData("@perfect")).toBe(1) }) }) describe('Human Readable', () => { - const db = new JsonDB(testFile3, true, true) - test('should save the data in an human readable format', done => { + const db = new JsonDB(new Config(testFile3, true, true)) + test('should save the data in an human readable format', async () => { const object = {test: {readable: "test"}} - db.push("/", object) - fs.readFile(testFile3 + ".json", "utf8", function (err, data) { - if (err) { - done(err) - return - } - expect(data).toBe(JSON.stringify(object, null, 4)) - done() - }) + await db.push("/", object) + const data = await fs.promises.readFile(testFile3 + ".json", "utf8"); + expect(data).toBe(JSON.stringify(object, null, 4)) }) }) describe('Array Support', () => { - const db = new JsonDB(testFile4, true) - test('should create an array with a string at index 0', () => { - db.push('/arraytest/myarray[0]', "test", true) - const myarray = db.getData('/arraytest/myarray') + const db = new JsonDB(new Config(testFile4, true)) + test('should create an array with a string at index 0', async () => { + await db.push('/arraytest/myarray[0]', "test", true) + const myarray = await db.getData('/arraytest/myarray') expect(myarray).toBeInstanceOf(Array) expect(myarray[0]).toBe('test') }) - test('should add array entry of array using dash (-) in name', () => { - db.push('/arraytest/my-array[0]', "test", true) - const myarray = db.getData('/arraytest/my-array') + test('should add array entry of array using dash (-) in name', async () => { + await db.push('/arraytest/my-array[0]', "test", true) + const myarray = await db.getData('/arraytest/my-array') expect(myarray).toBeInstanceOf(Array) expect(myarray[0]).toBe('test') }) test( 'should throw an Error when using an array with a string at index TEST', - () => { + async () => { try { - (function (args) { - db.push('/arraytest/myarray[TEST]', "works", true) + await (async function (args) { + await db.push('/arraytest/myarray[TEST]', "works", true) })() throw Error('Function did not throw') @@ -303,41 +270,41 @@ describe('JsonDB', () => { } ) - test('should add an object at index 1', () => { + test('should add an object at index 1', async () => { const obj = {property: "perfect"} - db.push('/arraytest/myarray[1]', obj, true) - const myarray = db.getData('/arraytest/myarray') + await db.push('/arraytest/myarray[1]', obj, true) + const myarray = await db.getData('/arraytest/myarray') expect(myarray).toBeInstanceOf(Array) expect(myarray[1]).toBe(obj) }) - test('should create a nested array with an object at index 0', () => { + test('should create a nested array with an object at index 0', async () => { const data = {test: "works"} - db.push('/arraytest/nested[0]/obj', data, true) - const obj = db.getData('/arraytest/nested[0]') + await db.push('/arraytest/nested[0]/obj', data, true) + const obj = await db.getData('/arraytest/nested[0]') expect(typeof obj).toBe('object') expect(obj).toHaveProperty('obj', data) }) - test('should access the object at index 1', () => { - const obj = db.getData('/arraytest/myarray[1]') + test('should access the object at index 1', async () => { + const obj = await db.getData('/arraytest/myarray[1]') expect(typeof obj).toBe('object') expect(obj).toHaveProperty('property', 'perfect') }) - test('should access the object property at index 1', () => { - const property = db.getData('/arraytest/myarray[1]/property') + test('should access the object property at index 1', async () => { + const property = await db.getData('/arraytest/myarray[1]/property') expect(typeof property).toBe('string') expect(property).toBe('perfect') }) - test('should throw an error when accessing non-present index', () => { + test('should throw an error when accessing non-present index', async () => { const obj = {property: "perfect"} - db.push('/arraytest/arrayTesting[0]', obj, true) + await db.push('/arraytest/arrayTesting[0]', obj, true) try { - (function (args) { - db.getData(args) + await (async function (args) { + await db.getData(args) })("/arraytest/arrayTesting[1]") throw Error('Function did not throw') @@ -347,12 +314,12 @@ describe('JsonDB', () => { } }) - test('should delete the object at index 1', () => { - db.delete('/arraytest/myarray[1]') + test('should delete the object at index 1', async () => { + await db.delete('/arraytest/myarray[1]') try { - (function (args) { - db.getData(args) + await (async function (args) { + await db.getData(args) })("/arraytest/myarray[1]") throw Error('Function did not throw') @@ -362,10 +329,10 @@ describe('JsonDB', () => { } }) - test('should throw an error when deleting non-present index', () => { + test('should throw an error when deleting non-present index', async () => { try { - (function (args) { - db.delete(args) + await (async function (args) { + await db.delete(args) })("/arraytest/myarray[10]") throw Error('Function did not throw') @@ -377,12 +344,12 @@ describe('JsonDB', () => { test( 'should throw an error when trying to set an object as an array', - () => { - db.push('/arraytest/fakearray', {fake: "fake"}, true) + async () => { + await db.push('/arraytest/fakearray', {fake: "fake"}, true) try { - (function (args) { - db.push(args, {test: 'test'}, true) + await (async function (args) { + await db.push(args, {test: 'test'}, true) })("/arraytest/fakearray[1]") throw Error('Function did not throw') @@ -395,12 +362,12 @@ describe('JsonDB', () => { test( 'should throw an error when trying to access an object as an array', - () => { - db.push('/arraytest/fakearray', {fake: "fake"}, true) + async () => { + await db.push('/arraytest/fakearray', {fake: "fake"}, true) try { - (function (args) { - db.getData(args) + await (async function (args) { + await db.getData(args) })('/arraytest/fakearray[1]') throw Error('Function did not throw') @@ -412,12 +379,12 @@ describe('JsonDB', () => { ) test( 'should throw an error when trying to set an object as an array (2)', - () => { - db.push('/arraytest/fakearray', {fake: "fake"}, true) + async () => { + await db.push('/arraytest/fakearray', {fake: "fake"}, true) try { - (function (args) { - db.push(args, {test: 'test'}, true) + await (async function (args) { + await db.push(args, {test: 'test'}, true) })('/arraytest/fakearray[1]/fake') throw Error('Function did not throw') @@ -428,20 +395,20 @@ describe('JsonDB', () => { } ) - test('should merge nested arrays', () => { - db.push('/merging/array[0]', ['test']) - db.push('/merging/array[0]', ['secondTest'], false) - const data = db.getData('/merging/array[0]') + test('should merge nested arrays', async () => { + await db.push('/merging/array[0]', ['test']) + await db.push('/merging/array[0]', ['secondTest'], false) + const data = await db.getData('/merging/array[0]') expect(data).toBeInstanceOf(Array) expect(data).toContain('test') expect(data).toContain('secondTest') }) - test('should remove the index of an array, not set it to null', () => { - db.push('/deleteTest/array[0]', 'test') - db.push('/deleteTest/array[1]', 'test2') - db.delete('/deleteTest/array[1]') - db.save(true) + test('should remove the index of an array, not set it to null', async () => { + await db.push('/deleteTest/array[0]', 'test') + await db.push('/deleteTest/array[1]', 'test2') + await db.delete('/deleteTest/array[1]') + await db.save(true) // @ts-ignore const json = JSON.parse(fs.readFileSync(testFile4 + '.json')) expect(typeof json.deleteTest).toBe('object') @@ -450,19 +417,19 @@ describe('JsonDB', () => { expect(json.deleteTest.array[1]).toBe(undefined) }) - test('should append a value to the existing array', () => { - db.push('/arraytest/appendArray', [0], true) - db.push('/arraytest/appendArray[]', 1, true) - const array = db.getData('/arraytest/appendArray') + test('should append a value to the existing array', async () => { + await db.push('/arraytest/appendArray', [0], true) + await db.push('/arraytest/appendArray[]', 1, true) + const array = await db.getData('/arraytest/appendArray') expect(array).toBeInstanceOf(Array) - const index1 = db.getData('/arraytest/appendArray[1]') + const index1 = await db.getData('/arraytest/appendArray[1]') expect(index1).toBe(1) }) - test('should throw an error when deleting a append command', () => { + test('should throw an error when deleting a append command', async () => { try { - (function (args) { - db.delete(args) + await (async function (args) { + await db.delete(args) })('/arraytest/appendArray[]') throw Error('Function did not throw') @@ -474,24 +441,24 @@ describe('JsonDB', () => { test( 'should append a value to the existing array and create property', - () => { - db.push('/arrayAppend/mySuperArray', [0], true) - db.push('/arrayAppend/mySuperArray[]/test', 1, true) - const array = db.getData('/arrayAppend/mySuperArray') + async () => { + await db.push('/arrayAppend/mySuperArray', [0], true) + await db.push('/arrayAppend/mySuperArray[]/test', 1, true) + const array = await db.getData('/arrayAppend/mySuperArray') expect(array).toBeInstanceOf(Array) - const index1 = db.getData('/arrayAppend/mySuperArray[1]/test') + const index1 = await db.getData('/arrayAppend/mySuperArray[1]/test') expect(index1).toBe(1) } ) test( 'should throw an error when trying to append to a non array', - () => { - db.push('/arraytest/fakearray', {fake: "fake"}, true) + async () => { + await db.push('/arraytest/fakearray', {fake: "fake"}, true) try { - (function (args) { - db.push(args, {test: 'test'}, true) + await (async function (args) { + await db.push(args, {test: 'test'}, true) })('/arraytest/fakearray[]/fake') throw Error('Function did not throw') @@ -501,15 +468,15 @@ describe('JsonDB', () => { } } ) - test('should add array entry of array starting with number in name', () => { - db.push('/arraytest/11_Dec[0]', "test", true) - const myarray = db.getData('/arraytest/11_Dec') + test('should add array entry of array starting with number in name', async () => { + await db.push('/arraytest/11_Dec[0]', "test", true) + const myarray = await db.getData('/arraytest/11_Dec') expect(myarray).toBeInstanceOf(Array) expect(myarray[0]).toBe('test') }) - test('should add array entry of array containg a dot (.) in name', () => { - db.push('/arraytest/d.s_[0]', "test", true) - const myarray = db.getData('/arraytest/d.s_') + test('should add array entry of array containg a dot (.) in name', async () => { + await db.push('/arraytest/d.s_[0]', "test", true) + const myarray = await db.getData('/arraytest/d.s_') expect(myarray).toBeInstanceOf(Array) expect(myarray[0]).toBe('test') }) @@ -517,12 +484,12 @@ describe('JsonDB', () => { test( 'should throw an exception when array is empty when using -1', - () => { - db.push('/arraylast/myarrayempty', [], true) + async () => { + await db.push('/arraylast/myarrayempty', [], true) try { - (function (args) { - db.getData(args) + await (async function (args) { + await db.getData(args) })('/arraylast/myarrayempty[-1]') throw Error('Function did not throw') @@ -533,28 +500,28 @@ describe('JsonDB', () => { } ) - test('should set the fist item when using -1 on empty array', () => { - db.push('/arraylast/emptyArray', [], true) - db.push('/arraylast/emptyArray[-1]', 3) - const lastItem = db.getData('/arraylast/emptyArray[0]') + test('should set the fist item when using -1 on empty array', async () => { + await db.push('/arraylast/emptyArray', [], true) + await db.push('/arraylast/emptyArray[-1]', 3) + const lastItem = await db.getData('/arraylast/emptyArray[0]') expect(lastItem).toBe(3) }) - test('should return the last key when using -1', () => { - db.push('/arraylast/myarray', [1, 2, 3], true) - const lastItem = db.getData('/arraylast/myarray[-1]') + test('should return the last key when using -1', async () => { + await db.push('/arraylast/myarray', [1, 2, 3], true) + const lastItem = await db.getData('/arraylast/myarray[-1]') expect(lastItem).toBe(3) }) - test('should replace the last item when using -1', () => { - db.push('/arraylast/a1', [1, 2, 3], true) - db.push('/arraylast/a1[-1]', 5) - const lastItem = db.getData('/arraylast/a1[-1]') + test('should replace the last item when using -1', async () => { + await db.push('/arraylast/a1', [1, 2, 3], true) + await db.push('/arraylast/a1[-1]', 5) + const lastItem = await db.getData('/arraylast/a1[-1]') expect(lastItem).toBe(5) }) - test('should delete the last item when using -1', () => { - db.push('/arraylast/a2', [1, 2, 3], true) - db.delete('/arraylast/a2[-1]') - const lastItem = db.getData('/arraylast/a2[-1]') + test('should delete the last item when using -1', async () => { + await db.push('/arraylast/a2', [1, 2, 3], true) + await db.delete('/arraylast/a2[-1]') + const lastItem = await db.getData('/arraylast/a2[-1]') expect(lastItem).toBe(2) }) }) @@ -562,94 +529,82 @@ describe('JsonDB', () => { }) describe('Delete Info', () => { - const db = new JsonDB(testFile6, true) + const db = new JsonDB(new Config(testFile6, true)) - test('should delete data from memory', () => { - db.push('/test', ['data']) - db.delete('/test') - expect(db.exists('/test')).toBeFalsy() + test('should delete data from memory', async () => { + await db.push('/test', ['data']) + await db.delete('/test') + expect(await db.exists('/test')).toBeFalsy() }) test( 'should delete the data and save the file if saveOnPush is set', - done => { + async () => { const object = {test: {readable: "test"}} - db.push("/", object) - fs.readFile(testFile6 + ".json", "utf8", function (err, data) { - if (err) { - done(err) - return - } - expect(data).toBe(JSON.stringify(object)) - db.delete('/test') - fs.readFile(testFile6 + ".json", "utf8", function (err, data) { - if (err) { - done(err) - return - } - expect(data).toBe(JSON.stringify({})) - done() - }) - }) - + await db.push("/", object) + let data = await fs.promises.readFile(testFile6 + ".json", "utf8"); + expect(data).toBe(JSON.stringify(object)) + await db.delete('/test') + data = await fs.promises.readFile(testFile6 + ".json", "utf8"); + expect(data).toBe(JSON.stringify({})) } ) }) describe('Find Info', () => { - const db = new JsonDB(testFile6, true) + const db = new JsonDB(new Config(testFile6, true)) test('should be able to find the wanted info in object', - () => { - db.push('/find/id-0', {test: 'hello'}) - db.push('/find/id-1', {test: 'hey'}) - db.push('/find/id-2', {test: 'echo'}) - const result = db.find('/find', entry => entry.test === 'echo') + async () => { + await db.push('/find/id-0', {test: 'hello'}) + await db.push('/find/id-1', {test: 'hey'}) + await db.push('/find/id-2', {test: 'echo'}) + const result = await db.find('/find', entry => entry.test === 'echo') expect(result).toBeInstanceOf(Object) expect(result).toHaveProperty('test', 'echo') }) test('should be able to find the wanted info in array', - () => { - db.push('/find/data', [{test: 'echo'}, {test: 'hey'}, {test: 'hello'}]) - const result = db.find('/find/data', entry => entry.test === 'hello') + async () => { + await db.push('/find/data', [{test: 'echo'}, {test: 'hey'}, {test: 'hello'}]) + const result = await db.find('/find/data', entry => entry.test === 'hello') expect(result).toBeInstanceOf(Object) expect(result).toHaveProperty('test', 'hello') }) test('shouldn\'t be able to find a data in anything else than Object or Array', - () => { - db.push('/find/number', 1) - expect(() => db.find('/find/number', entry => entry.test === 'hello')).toThrow(DataError) + async () => { + await db.push('/find/number', 1) + expect(async () => await db.find('/find/number', entry => entry.test === 'hello')).rejects.toThrow(DataError) }) }) describe('Filter Info', () => { - const db = new JsonDB(testFile6, true) + const db = new JsonDB(new Config(testFile6, true)) test('should be able to filter object matching filter', - () => { - db.push('/filter/id-0', {test: 'hello'}) - db.push('/filter/id-1', {test: 'hey'}) - db.push('/filter/id-2', {test: 'echo'}) - db.push('/filter/id-3', {test: 'hello'}) - const result = db.filter<{test: string}>('/filter', entry => entry.test === 'hello') + async () => { + await db.push('/filter/id-0', {test: 'hello'}) + await db.push('/filter/id-1', {test: 'hey'}) + await db.push('/filter/id-2', {test: 'echo'}) + await db.push('/filter/id-3', {test: 'hello'}) + const result = await db.filter<{ test: string }>('/filter', entry => entry.test === 'hello') expect(result).toBeInstanceOf(Array) expect(result).toHaveLength(2) expect(result![0]).toHaveProperty('test', 'hello') expect(result![1]).toHaveProperty('test', 'hello') }) test('should be able to filter the array matching filter', - () => { - db.push('/filter/data', [{test: 'echo'}, {test: 'hey'}, {test: 'hello'}, {test: 'echo'}]) - const result = db.filter<{test: string}>('/filter/data', entry => entry.test === 'echo') + async () => { + await db.push('/filter/data', [{test: 'echo'}, {test: 'hey'}, {test: 'hello'}, {test: 'echo'}]) + const result = await db.filter<{ test: string }>('/filter/data', entry => entry.test === 'echo') expect(result).toBeInstanceOf(Array) expect(result).toHaveLength(2) expect(result![0]).toHaveProperty('test', 'echo') expect(result![1]).toHaveProperty('test', 'echo') }) test('shouldn\'t be able to find a data in anything else than Object or Array', - () => { - db.push('/filter/number', 1) - expect(() => db.find<{test: string}>('/filter/number', entry => entry.test === 'hello')).toThrow(DataError) + async () => { + await db.push('/filter/number', 1) + expect(async () => await db.find<{ test: string }>('/filter/number', entry => entry.test === 'hello')).rejects.toThrow(DataError) }) }) @@ -659,9 +614,7 @@ describe('JsonDB', () => { fs.unlinkSync(testFile2 + ".json") fs.unlinkSync(testFile3 + ".json") fs.unlinkSync(testFile4 + ".json") - fs.unlinkSync(testFile5 + ".json") fs.unlinkSync(testFile6 + ".json") - fs.unlinkSync(testFile7 + ".json") fs.rmdirSync("test/dirCreation") }) }) diff --git a/test/03-existing-db.test.ts b/test/03-existing-db.test.ts index 0d949590..6b4fa405 100644 --- a/test/03-existing-db.test.ts +++ b/test/03-existing-db.test.ts @@ -1,18 +1,19 @@ -import { JsonDB } from '../src/JsonDB' +import {JsonDB} from '../src/JsonDB' +import { Config } from "../src/lib/JsonDBConfig" describe('JsonDB', () => { - const db = new JsonDB('test/game_file', true, true) + const db = new JsonDB(new Config('test/game_file', true, true)); describe('check existing database file', () => { - test('should contains data', () => { + test('should contains data', async () => { const role = {name: 'test:'} - expect(db.getData(`/${role.name}`)).toBe('488722677205303327') + expect(await db.getData(`/${role.name}`)).toBe('488722677205303327') }) - test('should delete data', () => { - db.push('/deleteme:', 'abc') + test('should delete data', async () => { + await db.push('/deleteme:', 'abc') const role = {name: 'deleteme:'} - db.delete(`/${role.name}`) - expect(db.exists(`/${role.name}`)).toBeFalsy() + await db.delete(`/${role.name}`) + expect(await db.exists(`/${role.name}`)).toBeFalsy() }) }) diff --git a/test/04-array-utils.test.ts b/test/04-array-utils.test.ts index 5e23e9d2..67ecb5b4 100644 --- a/test/04-array-utils.test.ts +++ b/test/04-array-utils.test.ts @@ -1,218 +1,220 @@ -import { JsonDB } from '../src/JsonDB' +import {JsonDB} from '../src/JsonDB' import * as fs from 'fs' +import {Config} from "../src/lib/JsonDBConfig" + describe('Array Utils', () => { - const db = new JsonDB('test/recipe', true, true) - describe('get number of item in an array', () => { - test('should have the correct count of an array', () => { - const recipe_1 = { - id: 65464646155, - name: 'Cheesecake', - category: 'Dessert', - } - const recipe_2 = { - id: 78687873783, - name: 'Cheeseburger', - category: 'Dish', - } - const recipe_3 = { id: 12335373873, name: 'Soup', category: 'Starter' } - db.push('/recipes[0]', recipe_1, true) - db.push('/recipes[1]', recipe_2, true) - db.push('/recipes[2]', recipe_3, true) + const db = new JsonDB(new Config('test/recipe', true, true)) + describe('get number of item in an array', () => { + test('should have the correct count of an array', async () => { + const recipe_1 = { + id: 65464646155, + name: 'Cheesecake', + category: 'Dessert', + } + const recipe_2 = { + id: 78687873783, + name: 'Cheeseburger', + category: 'Dish', + } + const recipe_3 = {id: 12335373873, name: 'Soup', category: 'Starter'} + await db.push('/recipes[0]', recipe_1, true) + await db.push('/recipes[1]', recipe_2, true) + await db.push('/recipes[2]', recipe_3, true) - expect(db.count('/recipes')).toBe(3) + expect(await db.count('/recipes')).toBe(3) + }) }) - }) - describe('get index of item in an array', () => { - test('should get the index of the current value', () => { - const recipe_1 = { - id: '65464646155', - name: 'Cheesecake', - category: 'Dessert', - } - const recipe_2 = { id: '78687873783', name: 'Gratin', category: 'Dish' } - const recipe_3 = { - id: '12335373873', - name: 'Soupe', - category: 'Starter', - } - db.push('/recipes[0]', recipe_1, true) - db.push('/recipes[1]', recipe_2, true) - db.push('/recipes[2]', recipe_3, true) + describe('get index of item in an array', () => { + test('should get the index of the current value', async () => { + const recipe_1 = { + id: '65464646155', + name: 'Cheesecake', + category: 'Dessert', + } + const recipe_2 = {id: '78687873783', name: 'Gratin', category: 'Dish'} + const recipe_3 = { + id: '12335373873', + name: 'Soupe', + category: 'Starter', + } + await db.push('/recipes[0]', recipe_1, true) + await db.push('/recipes[1]', recipe_2, true) + await db.push('/recipes[2]', recipe_3, true) - expect(db.getIndex('/recipes', '65464646155')).toBe(0) - expect(db.getIndex('/recipes', '78687873783')).toBe(1) - expect(db.getIndex('/recipes', '12335373873')).toBe(2) + expect(await db.getIndex('/recipes', '65464646155')).toBe(0) + expect(await db.getIndex('/recipes', '78687873783')).toBe(1) + expect(await db.getIndex('/recipes', '12335373873')).toBe(2) - db.delete('/recipes[' + db.getIndex('/recipes', '78687873783') + ']') + await db.delete('/recipes[' + await db.getIndex('/recipes', '78687873783') + ']') - expect(db.getIndex('/recipes', '65464646155')).toBe(0) - expect(db.getIndex('/recipes', '12335373873')).toBe(1) - }) + expect(await db.getIndex('/recipes', '65464646155')).toBe(0) + expect(await db.getIndex('/recipes', '12335373873')).toBe(1) + }) - test('should get the index of the current value with anything but id', () => { - const recipe_1 = { - test: '65464646155', - name: 'Cheesecake', - category: 'Dessert', - } - const recipe_2 = { - test: '78687873783', - name: 'Gratin', - category: 'Dish', - } - const recipe_3 = { - test: '12335373873', - name: 'Soupe', - category: 'Starter', - } - db.push('/recipes[0]', recipe_1, true) - db.push('/recipes[1]', recipe_2, true) - db.push('/recipes[2]', recipe_3, true) + test('should get the index of the current value with anything but id', async () => { + const recipe_1 = { + test: '65464646155', + name: 'Cheesecake', + category: 'Dessert', + } + const recipe_2 = { + test: '78687873783', + name: 'Gratin', + category: 'Dish', + } + const recipe_3 = { + test: '12335373873', + name: 'Soupe', + category: 'Starter', + } + await db.push('/recipes[0]', recipe_1, true) + await db.push('/recipes[1]', recipe_2, true) + await db.push('/recipes[2]', recipe_3, true) - expect(db.getIndex('/recipes', '65464646155', 'test')).toBe(0) - expect(db.getIndex('/recipes', '78687873783', 'test')).toBe(1) - expect(db.getIndex('/recipes', '12335373873', 'test')).toBe(2) - }) - test('should get the index of the current value with anything but numerical', () => { - const recipe_1 = { - test: 65464646155, - name: 'Cheesecake', - category: 'Dessert', - } - const recipe_2 = { test: 78687873783, name: 'Gratin', category: 'Dish' } - const recipe_3 = { - test: 12335373873, - name: 'Soupe', - category: 'Starter', - } - db.push('/recipes[0]', recipe_1, true) - db.push('/recipes[1]', recipe_2, true) - db.push('/recipes[2]', recipe_3, true) + expect(await db.getIndex('/recipes', '65464646155', 'test')).toBe(0) + expect(await db.getIndex('/recipes', '78687873783', 'test')).toBe(1) + expect(await db.getIndex('/recipes', '12335373873', 'test')).toBe(2) + }) + test('should get the index of the current value with anything but numerical', async () => { + const recipe_1 = { + test: 65464646155, + name: 'Cheesecake', + category: 'Dessert', + } + const recipe_2 = {test: 78687873783, name: 'Gratin', category: 'Dish'} + const recipe_3 = { + test: 12335373873, + name: 'Soupe', + category: 'Starter', + } + await db.push('/recipes[0]', recipe_1, true) + await db.push('/recipes[1]', recipe_2, true) + await db.push('/recipes[2]', recipe_3, true) - expect(db.getIndex('/recipes', 65464646155, 'test')).toBe(0) - expect(db.getIndex('/recipes', 78687873783, 'test')).toBe(1) - expect(db.getIndex('/recipes', 12335373873, 'test')).toBe(2) - }) + expect(await db.getIndex('/recipes', 65464646155, 'test')).toBe(0) + expect(await db.getIndex('/recipes', 78687873783, 'test')).toBe(1) + expect(await db.getIndex('/recipes', 12335373873, 'test')).toBe(2) + }) - test('should get the index of an array with string', () => { - db.push('/indexValue[]', 'abc', true) - db.push('/indexValue[]', 'def', true) - db.push('/indexValue[]', 'gh', true) + test('should get the index of an array with string', async () => { + await db.push('/indexValue[]', 'abc', true) + await db.push('/indexValue[]', 'def', true) + await db.push('/indexValue[]', 'gh', true) - expect(db.getIndexValue('/indexValue', 'abc')).toBe(0) - expect(db.getIndexValue('/indexValue', 'def')).toBe(1) - expect(db.getIndexValue('/indexValue', 'gh')).toBe(2) - }) - }) - describe('Nested array', () => { - test('get data of a nested array', () => { - db.push('/nested/0/array', [['test', 'test2']], true) - expect(db.getData('/nested/0/array[0][0]')).toBe('test') - }) - test('append data to a nested array', () => { - db.push('/nested/1/array', [['test', 'test2']], true) - db.push('/nested/1/array[0][]', 'test3', true) - expect(db.getData('/nested/1/array[0][2]')).toBe('test3') - }) - test('get data of a multiple nested array', () => { - db.push('/nested/0/array', [[['test', 'test2']]], true) - expect(db.getData('/nested/0/array[0][0][0]')).toBe('test') - }) - test('should delete array index at specified position', () => { - db.push('/nested/0/array', [ - ['abc', 'def'], - ['hij', 'klmn'], - ]) - db.delete('/nested/0/array[0][0]') - expect(db.getData('/nested/0/array[0][0]')).toBe('def') + expect(await db.getIndexValue('/indexValue', 'abc')).toBe(0) + expect(await db.getIndexValue('/indexValue', 'def')).toBe(1) + expect(await db.getIndexValue('/indexValue', 'gh')).toBe(2) + }) }) - describe('', () => { - beforeEach(() => [ - db.push('/nested/0/array', [ - [['abc', 'def'], [['hij', 'klmn']]], - ['123', '456'], - ['789', '100'], - ]), - ]) - test('should have the correct counts', () => { - // first level - expect(db.count('/nested/0/array')).toBe(3) - // second level - expect(db.count('/nested/0/array[0]')).toBe(2) - expect(db.count('/nested/0/array[1]')).toBe(2) - expect(db.count('/nested/0/array[2]')).toBe(2) - // third level - expect(db.count('/nested/0/array[0][0]')).toBe(2) - // fourth level - expect(db.count('/nested/0/array[0][1][0]')).toBe(2) - }) - test('should have correct information after delete', () => { - const deepestArrayParentQuery = '/nested/0/array[0][1][0]' - const deepestArrayEntryQuery = `${deepestArrayParentQuery}[0]` - // validate array value before delete - expect(db.getData(deepestArrayEntryQuery)).toBe('hij') + describe('Nested array', () => { + test('get data of a nested array', async () => { + await db.push('/nested/0/array', [['test', 'test2']], true) + expect(await db.getData('/nested/0/array[0][0]')).toBe('test') + }) + test('append data to a nested array', async () => { + await db.push('/nested/1/array', [['test', 'test2']], true) + await db.push('/nested/1/array[0][]', 'test3', true) + expect(await db.getData('/nested/1/array[0][2]')).toBe('test3') + }) + test('get data of a multiple nested array', async () => { + await db.push('/nested/0/array', [[['test', 'test2']]], true) + expect(await db.getData('/nested/0/array[0][0][0]')).toBe('test') + }) + test('should delete array index at specified position', async () => { + await db.push('/nested/0/array', [ + ['abc', 'def'], + ['hij', 'klmn'], + ]) + await db.delete('/nested/0/array[0][0]') + expect(await db.getData('/nested/0/array[0][0]')).toBe('def') + }) + describe('', () => { + beforeEach(async () => [ + await db.push('/nested/0/array', [ + [['abc', 'def'], [['hij', 'klmn']]], + ['123', '456'], + ['789', '100'], + ]), + ]) + test('should have the correct counts', async () => { + // first level + expect(await db.count('/nested/0/array')).toBe(3) + // second level + expect(await db.count('/nested/0/array[0]')).toBe(2) + expect(await db.count('/nested/0/array[1]')).toBe(2) + expect(await db.count('/nested/0/array[2]')).toBe(2) + // third level + expect(await db.count('/nested/0/array[0][0]')).toBe(2) + // fourth level + expect(await db.count('/nested/0/array[0][1][0]')).toBe(2) + }) + test('should have correct information after delete', async () => { + const deepestArrayParentQuery = '/nested/0/array[0][1][0]' + const deepestArrayEntryQuery = `${deepestArrayParentQuery}[0]` + // validate array value before delete + expect(await db.getData(deepestArrayEntryQuery)).toBe('hij') - db.delete(deepestArrayEntryQuery) - // validate array value after delete - expect(db.count(deepestArrayParentQuery)).toBe(1) - expect(db.getData(deepestArrayEntryQuery)).toBe('klmn') - }) + await db.delete(deepestArrayEntryQuery) + // validate array value after delete + expect(await db.count(deepestArrayParentQuery)).toBe(1) + expect(await db.getData(deepestArrayEntryQuery)).toBe('klmn') + }) - test('should return the last entry for an array when using -1', () => { - // first level - expect(db.getData('/nested/0/array[-1][0]')).toBe('789') - // second level - expect(db.getData('/nested/0/array[0][-1]')).toEqual([['hij', 'klmn']]) - // third level - expect(db.getData('/nested/0/array[0][-1][-1]')).toEqual([ - 'hij', - 'klmn', - ]) - // fourth level - expect(db.getData('/nested/0/array[0][-1][-1][-1]')).toBe('klmn') - }) + test('should return the last entry for an array when using -1', async () => { + // first level + expect(await db.getData('/nested/0/array[-1][0]')).toBe('789') + // second level + expect(await db.getData('/nested/0/array[0][-1]')).toEqual([['hij', 'klmn']]) + // third level + expect(await db.getData('/nested/0/array[0][-1][-1]')).toEqual([ + 'hij', + 'klmn', + ]) + // fourth level + expect(await db.getData('/nested/0/array[0][-1][-1][-1]')).toBe('klmn') + }) - test('should delete last entry when using -1', () => { - db.delete('/nested/0/array[0][-1][-1][-1]') - expect(db.count('/nested/0/array[0][-1][-1]')).toBe(1) - expect(db.getData('/nested/0/array[0][-1][-1][0]')).toBe('hij') - expect(db.getData('/nested/0/array[0][-1][-1][1]')).toBeUndefined() - }) + test('should delete last entry when using -1', async () => { + await db.delete('/nested/0/array[0][-1][-1][-1]') + expect(await db.count('/nested/0/array[0][-1][-1]')).toBe(1) + expect(await db.getData('/nested/0/array[0][-1][-1][0]')).toBe('hij') + expect(await db.getData('/nested/0/array[0][-1][-1][1]')).toBeUndefined() + }) - test('should add to the last entry when using -1', () => { - db.push('/nested/0/array[0][-1][-1][]', 'lastRecord') - expect(db.count('/nested/0/array[0][-1][-1]')).toBe(3) - expect(db.getData('/nested/0/array[0][-1][-1][2]')).toBe('lastRecord') - }) + test('should add to the last entry when using -1', async () => { + await db.push('/nested/0/array[0][-1][-1][]', 'lastRecord') + expect(await db.count('/nested/0/array[0][-1][-1]')).toBe(3) + expect(await db.getData('/nested/0/array[0][-1][-1][2]')).toBe('lastRecord') + }) + }) }) - }) - describe('Nested array regex', () => { - // Test added to play with the regex - test('should find index for nested array', () => { - const arrayRegex = () => /^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)(.*)/gm - const arrayIndexRegex = arrayRegex() - const match = arrayIndexRegex.exec('array[1][2]') - let property = '' - let nestedArrayIndicies = [] as any[] - if (match != null && match[2]) { - // Match 1 = property name - // Match 2 = Array or Nested Arrays - property = match[1] - const nestedArrayMatches = match[2].toString() - nestedArrayIndicies = [ - // matchAll to support [5] and [] - ...nestedArrayMatches.matchAll(/\[(.*?)\]/g), - ].map((match) => match[1]) - } - expect(property).toBe('array') - expect(nestedArrayIndicies[0]).toEqual('1') - expect(nestedArrayIndicies[1]).toEqual('2') + describe('Nested array regex', () => { + // Test added to play with the regex + test('should find index for nested array', async () => { + const arrayRegex = () => /^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)(.*)/gm + const arrayIndexRegex = arrayRegex() + const match = arrayIndexRegex.exec('array[1][2]') + let property = '' + let nestedArrayIndicies = [] as any[] + if (match != null && match[2]) { + // Match 1 = property name + // Match 2 = Array or Nested Arrays + property = match[1] + const nestedArrayMatches = match[2].toString() + nestedArrayIndicies = [ + // matchAll to support [5] and [] + ...nestedArrayMatches.matchAll(/\[(.*?)\]/g), + ].map((match) => match[1]) + } + expect(property).toBe('array') + expect(nestedArrayIndicies[0]).toEqual('1') + expect(nestedArrayIndicies[1]).toEqual('2') + }) }) - }) - describe('Cleanup', () => { - test('should remove the test files', () => { - fs.unlinkSync('test/recipe.json') + describe('Cleanup', () => { + test('should remove the test files', async () => { + fs.unlinkSync('test/recipe.json') + }) }) - }) }) diff --git a/test/JsonDB.test.ts b/test/JsonDB.test.ts index 584aaa31..abec9de5 100644 --- a/test/JsonDB.test.ts +++ b/test/JsonDB.test.ts @@ -1,115 +1,116 @@ -import { JsonDB } from '../src/JsonDB' +import {JsonDB} from '../src/JsonDB' describe('JsonDB', () => { - let db: JsonDB - beforeEach(() => { - db = JsonDB.prototype - }) - describe('exists()', () => { - test('should throw error when error is not instance of DataError', () => { - db.getData = jest.fn(() => { - throw 'error' - }) - - expect(() => { - db.exists('a') - }).toThrow('error') - }) - }) - describe('count()', () => { - test('should throw path error when path not found', () => { - db.getData = jest.fn(() => { - 'a' - }) - expect(() => { - db.count('a') - }).toThrow('DataPath: a is not an array.') - }) - }) - describe('getArrayData()', () => { - test('should throw path error when path not found', () => { - db.getData = jest.fn(() => { - 'a' - }) - expect(() => { - db['getArrayData']('a') - }).toThrow('DataPath: a is not an array.') + let db: JsonDB + beforeEach(() => { + db = JsonDB.prototype }) - }) - describe('filter()', () => { - test('should return undefined when not found', () => { - db.getData = jest.fn(() => ({ - a: 1, - b: 2, - })) - const result = db.filter<{ test: string }>( - '/filter/data', - (entry) => entry.test === 'echo' - ) - expect(result).toBeUndefined() - }) - test('should return undefined when found length < 1', () => { - db.getData = jest.fn(() => ({ - a: 1, - b: 2, - })) - const result = db.filter<{ a: string }>('/a', (entry) => entry.c === 1) - expect(result).toBeUndefined() + describe('exists()', () => { + test('should throw error when error is not instance of DataError', () => { + db.getData = jest.fn(() => { + throw new Error('error') + }) + + expect(async () => { + await db.exists('a') + }).rejects.toThrow('error') + }) }) - test('should throw path error when path not found', () => { - db.getData = jest.fn(() => 1) - expect(() => { - db.filter<{ a: string }>('/a', (entry) => entry.c === 1) - }).toThrow( - 'The entry at the path (/a) needs to be either an Object or an Array' - ) + describe('count()', () => { + test('should throw path error when path not found', () => { + db.getData = jest.fn(async () => { + 'a' + }) + expect(async () => { + await db.count('a') + }).rejects.toThrow('DataPath: a is not an array.') + }) }) - }) - describe('find()', () => { - test('should return undefined when not found', () => { - db.getData = jest.fn(() => ({ - a: 1, - b: 2, - })) - const result = db.find<{ test: string }>( - '/filter/data', - (entry) => entry.test === 'echo' - ) - expect(result).toBeUndefined() + describe('getArrayData()', () => { + test('should throw path error when path not found', () => { + db.getData = jest.fn(async () => { + 'a' + }) + expect(async () => { + await db['getArrayData']('a') + }).rejects.toThrow('DataPath: a is not an array.') + }) }) - test('should return undefined when found length < 1', () => { - db.getData = jest.fn(() => ({ - a: 1, - b: 2, - })) - const result = db.find<{ a: string }>('/a', (entry) => entry.c === 1) - expect(result).toBeUndefined() + describe('filter()', () => { + test('should return undefined when not found', async () => { + db.getData = jest.fn(async () => ({ + a: 1, + b: 2, + })) + const result = await db.filter<{ test: string }>( + '/filter/data', + (entry) => entry.test === 'echo' + ) + expect(result).toBeUndefined() + }) + test('should return undefined when found length < 1', async () => { + db.getData = jest.fn(async () => ({ + a: 1, + b: 2, + })) + const result = await db.filter<{ a: string }>('/a', (entry) => entry.c === 1) + expect(result).toBeUndefined() + }) + test('should throw path error when path not found', () => { + db.getData = jest.fn(async () => 1) + expect(async () => { + await db.filter<{ a: string }>('/a', (entry) => entry.c === 1) + }).rejects.toThrow( + 'The entry at the path (/a) needs to be either an Object or an Array' + ) + }) }) - test('should throw path error when path not found', () => { - db.getData = jest.fn(() => 1) - expect(() => { - db.find<{ a: string }>('/a', (entry) => entry.c === 1) - }).toThrow( - 'The entry at the path (/a) needs to be either an Object or an Array' - ) + + describe('find()', () => { + test('should return undefined when not found', async () => { + db.getData = jest.fn(async () => ({ + a: 1, + b: 2, + })) + const result = await db.find<{ test: string }>( + '/filter/data', + (entry) => entry.test === 'echo' + ) + expect(result).toBeUndefined() + }) + test('should return undefined when found length < 1', async () => { + db.getData = jest.fn(async () => ({ + a: 1, + b: 2, + })) + const result = await db.find<{ a: string }>('/a', (entry) => entry.c === 1) + expect(result).toBeUndefined() + }) + test('should throw path error when path not found', () => { + db.getData = jest.fn(async () => 1) + expect(async () => { + await db.find<{ a: string }>('/a', (entry) => entry.c === 1) + }).rejects.toThrow( + 'The entry at the path (/a) needs to be either an Object or an Array' + ) + }) }) - }) - // Test was made for code coverage for getParentData, but this cannot return null or undefined. - // Commented out the test and the checks in JsonDB.ts. - // describe('push()', () => { - // test('', () => { - // db['getParentData'] = jest.fn(() => { - // return DBParentData.prototype - // }) - // }) - // }) + // Test was made for code coverage for getParentData, but this cannot return null or undefined. + // Commented out the test and the checks in JsonDB.ts. + // describe('push()', () => { + // test('', () => { + // db['getParentData'] = jest.fn(() => { + // return DBParentData.prototype + // }) + // }) + // }) - describe('save()', () => { - test('should throw exception when save fails', () => { - expect(() => { - db.save(true) - }).toThrow("Can't save the database") + describe('save()', () => { + test('should throw exception when save fails', () => { + expect(async () => { + await db.save(true) + }).rejects.toThrow("Can't save the database") + }) }) - }) }) diff --git a/test/adapter/adapters.test.ts b/test/adapter/adapters.test.ts new file mode 100644 index 00000000..44106ba6 --- /dev/null +++ b/test/adapter/adapters.test.ts @@ -0,0 +1,80 @@ +import {AtomicFileAdapter} from "../../src/adapter/file/AtomicFileAdapter"; +import * as fs from "fs"; +import {JsonAdapter} from "../../src/adapter/data/JsonAdapter"; +import {IAdapter} from "../../src/adapter/IAdapter"; +import {ConfigWithAdapter} from "../../src/lib/JsonDBConfig"; + +function checkFileExists(file: string): Promise { + return fs.promises.access(file, fs.constants.F_OK) + .then(() => true) + .catch(() => false) +} + +class MemoryAdapter implements IAdapter { + private data: any = {}; + + readAsync(): Promise { + return Promise.resolve(this.data); + } + + writeAsync(data: any): Promise { + this.data = data; + return Promise.resolve(undefined); + } + +} + +describe('Adapter', () => { + describe('Atomic', () => { + test('should be able to write then read to a file', async () => { + const filename = "data/test.file"; + const data = "Hello World"; + + const adapter = new AtomicFileAdapter(filename, false); + await adapter.writeAsync(data); + const exists = await checkFileExists(filename); + expect(exists).toBeTruthy(); + const content = await adapter.readAsync(); + expect(content).toBe(data); + }) + test('should return null data when file doesn\'t exists', async () => { + const filename = "data/test2.file"; + + const adapter = new AtomicFileAdapter(filename, false); + const data = await adapter.readAsync(); + expect(data).toBeNull(); + + }) + describe('Json', () => { + test('should be able to write then read to a file', async () => { + const filename = "data/test.json"; + const data = {Hello: "World", Foo: "Bar"}; + + const adapter = new JsonAdapter(new AtomicFileAdapter(filename, false), false); + await adapter.writeAsync(data); + const exists = await checkFileExists(filename); + expect(exists).toBeTruthy(); + const content = await adapter.readAsync(); + expect(content.Hello).toBe("World") + expect(content.Foo).toBe("Bar"); + }) + test('should create file when loading if it doesn\'t exists', async () => { + const filename = "data/test.json"; + const adapter = new JsonAdapter(new AtomicFileAdapter(filename, false), false); + await adapter.readAsync(); + + const fileExists = await checkFileExists(filename); + expect(fileExists).toBeTruthy(); + + }) + }) + }); + describe('Config', () => { + test('should be able to set own adapter with config', async () => { + const config = new ConfigWithAdapter(new MemoryAdapter()); + await config.adapter.writeAsync({test: "test"}); + const result = await config.adapter.readAsync(); + expect(result.test).toBe("test"); + }); + }); +}); diff --git a/yarn.lock b/yarn.lock index 9d57c765..68b4a5c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,14 @@ # yarn lockfile v1 +"@ampproject/remapping@^2.1.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" + integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== + dependencies: + "@jridgewell/gen-mapping" "^0.1.0" + "@jridgewell/trace-mapping" "^0.3.9" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" @@ -16,6 +24,13 @@ dependencies: "@babel/highlight" "^7.16.7" +"@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.15.0": version "7.15.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" @@ -26,7 +41,12 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.4.tgz#081d6bbc336ec5c2435c6346b2ae1fb98b5ac68e" integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q== -"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.7.2": +"@babel/compat-data@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" + integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== + +"@babel/core@^7.0.0": version "7.15.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.5.tgz#f8ed9ace730722544609f90c9bb49162dc3bf5b9" integrity sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg== @@ -47,7 +67,28 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/core@^7.12.3", "@babel/core@^7.8.0": +"@babel/core@^7.11.6": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.10.tgz#39ad504991d77f1f3da91be0b8b949a5bc466fb8" + integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.10" + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-module-transforms" "^7.18.9" + "@babel/helpers" "^7.18.9" + "@babel/parser" "^7.18.10" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.18.10" + "@babel/types" "^7.18.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + +"@babel/core@^7.12.3": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.7.tgz#db990f931f6d40cb9b87a0dc7d2adc749f1dcbcf" integrity sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA== @@ -86,6 +127,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.10.tgz#794f328bfabdcbaf0ebf9bf91b5b57b61fa77a2a" + integrity sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA== + dependencies: + "@babel/types" "^7.18.10" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.14.5", "@babel/helper-annotate-as-pure@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz#3d0e43b00c5e49fdb6c57e421601a7a658d5f835" @@ -121,6 +171,16 @@ browserslist "^4.17.5" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf" + integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg== + dependencies: + "@babel/compat-data" "^7.18.8" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.20.2" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz#7f977c17bd12a5fba363cb19bea090394bf37d2e" @@ -162,6 +222,11 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-environment-visitor@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" + integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== + "@babel/helper-explode-assignable-expression@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz#f9aec9d219f271eaf92b9f561598ca6b2682600c" @@ -187,6 +252,14 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helper-function-name@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" + integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== + dependencies: + "@babel/template" "^7.18.6" + "@babel/types" "^7.18.9" + "@babel/helper-get-function-arity@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz#098818934a137fce78b536a3e015864be1e2879b" @@ -215,6 +288,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-member-expression-to-functions@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz#bfd34dc9bba9824a4658b0317ec2fd571a51e6ef" @@ -236,6 +316,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.4.tgz#962cc629a7f7f9a082dd62d0307fa75fe8788d7c" @@ -264,6 +351,20 @@ "@babel/traverse" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helper-module-transforms@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" + integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + "@babel/helper-optimise-call-expression@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz#f310a5121a3b9cc52d9ab19122bd729822dee171" @@ -309,6 +410,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-simple-access@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers@^7.14.5", "@babel/helper-skip-transparent-expression-wrappers@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz#707dbdba1f4ad0fa34f9114fc8197aec7d5da2eb" @@ -330,6 +438,18 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-string-parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" + integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": version "7.14.9" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" @@ -340,6 +460,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + "@babel/helper-validator-option@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" @@ -350,6 +475,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== + "@babel/helper-wrap-function@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz#6f754b2446cfaf3d612523e6ab8d79c27c3a3de7" @@ -378,6 +508,15 @@ "@babel/traverse" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helpers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9" + integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ== + dependencies: + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" @@ -396,6 +535,15 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.5": version "7.15.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" @@ -406,6 +554,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.7.tgz#d372dda9c89fcec340a82630a9f533f2fe15877e" integrity sha512-sR4eaSrnM7BV7QPzGfEX5paG/6wrZM3I0HDzfIAK06ESvo9oy3xBuVBxE3MbQaKNhvg8g/ixjMWo2CGpzpHsDA== +"@babel/parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.10.tgz#94b5f8522356e69e8277276adf67ed280c90ecc1" + integrity sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg== + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz#dbdeabb1e80f622d9f0b583efb2999605e0a567e" @@ -1044,6 +1197,15 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/template@^7.18.10", "@babel/template@^7.18.6": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" + integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" + "@babel/traverse@^7.13.0", "@babel/traverse@^7.15.4", "@babel/traverse@^7.7.2": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.4.tgz#ff8510367a144bfbff552d9e18e28f3e2889c22d" @@ -1075,6 +1237,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.10.tgz#37ad97d1cb00efa869b91dd5d1950f8a6cf0cb08" + integrity sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.10" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.15.4", "@babel/types@^7.15.6", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.15.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" @@ -1091,6 +1269,15 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" + integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1162,175 +1349,239 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.5.1.tgz#260fe7239602fe5130a94f1aa386eff54b014bba" - integrity sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg== +"@jest/console@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.3.tgz#2030606ec03a18c31803b8a36382762e447655df" + integrity sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.3" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^28.1.3" + jest-util "^28.1.3" slash "^3.0.0" -"@jest/core@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" - integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/reporters" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" +"@jest/core@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.3.tgz#0ebf2bd39840f1233cd5f2d1e6fc8b71bd5a1ac7" + integrity sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA== + dependencies: + "@jest/console" "^28.1.3" + "@jest/reporters" "^28.1.3" + "@jest/test-result" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - emittery "^0.8.1" + ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^27.5.1" - jest-config "^27.5.1" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-resolve-dependencies "^27.5.1" - jest-runner "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - jest-watcher "^27.5.1" + jest-changed-files "^28.1.3" + jest-config "^28.1.3" + jest-haste-map "^28.1.3" + jest-message-util "^28.1.3" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.3" + jest-resolve-dependencies "^28.1.3" + jest-runner "^28.1.3" + jest-runtime "^28.1.3" + jest-snapshot "^28.1.3" + jest-util "^28.1.3" + jest-validate "^28.1.3" + jest-watcher "^28.1.3" micromatch "^4.0.4" + pretty-format "^28.1.3" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" - integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== +"@jest/environment@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.3.tgz#abed43a6b040a4c24fdcb69eab1f97589b2d663e" + integrity sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA== dependencies: - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/fake-timers" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" - jest-mock "^27.5.1" + jest-mock "^28.1.3" -"@jest/fake-timers@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" - integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== +"@jest/expect-utils@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.3.tgz#58561ce5db7cd253a7edddbc051fb39dda50f525" + integrity sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA== + dependencies: + jest-get-type "^28.0.2" + +"@jest/expect@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.3.tgz#9ac57e1d4491baca550f6bdbd232487177ad6a72" + integrity sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw== + dependencies: + expect "^28.1.3" + jest-snapshot "^28.1.3" + +"@jest/fake-timers@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.3.tgz#230255b3ad0a3d4978f1d06f70685baea91c640e" + integrity sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw== dependencies: - "@jest/types" "^27.5.1" - "@sinonjs/fake-timers" "^8.0.1" + "@jest/types" "^28.1.3" + "@sinonjs/fake-timers" "^9.1.2" "@types/node" "*" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^28.1.3" + jest-mock "^28.1.3" + jest-util "^28.1.3" -"@jest/globals@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" - integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== +"@jest/globals@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.3.tgz#a601d78ddc5fdef542728309894895b4a42dc333" + integrity sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA== dependencies: - "@jest/environment" "^27.5.1" - "@jest/types" "^27.5.1" - expect "^27.5.1" + "@jest/environment" "^28.1.3" + "@jest/expect" "^28.1.3" + "@jest/types" "^28.1.3" -"@jest/reporters@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" - integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== +"@jest/reporters@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.3.tgz#9adf6d265edafc5fc4a434cfb31e2df5a67a369a" + integrity sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^28.1.3" + "@jest/test-result" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" + "@jridgewell/trace-mapping" "^0.3.13" "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" - glob "^7.1.2" + glob "^7.1.3" graceful-fs "^4.2.9" istanbul-lib-coverage "^3.0.0" istanbul-lib-instrument "^5.1.0" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-haste-map "^27.5.1" - jest-resolve "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-message-util "^28.1.3" + jest-util "^28.1.3" + jest-worker "^28.1.3" slash "^3.0.0" - source-map "^0.6.0" string-length "^4.0.1" + strip-ansi "^6.0.0" terminal-link "^2.0.0" - v8-to-istanbul "^8.1.0" + v8-to-istanbul "^9.0.1" -"@jest/source-map@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" - integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== +"@jest/schemas@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" + integrity sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg== + dependencies: + "@sinclair/typebox" "^0.24.1" + +"@jest/source-map@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24" + integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww== dependencies: + "@jridgewell/trace-mapping" "^0.3.13" callsites "^3.0.0" graceful-fs "^4.2.9" - source-map "^0.6.0" -"@jest/test-result@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.5.1.tgz#56a6585fa80f7cdab72b8c5fc2e871d03832f5bb" - integrity sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag== +"@jest/test-result@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.3.tgz#5eae945fd9f4b8fcfce74d239e6f725b6bf076c5" + integrity sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg== dependencies: - "@jest/console" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^28.1.3" + "@jest/types" "^28.1.3" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" - integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== +"@jest/test-sequencer@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz#9d0c283d906ac599c74bde464bc0d7e6a82886c3" + integrity sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw== dependencies: - "@jest/test-result" "^27.5.1" + "@jest/test-result" "^28.1.3" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-runtime "^27.5.1" + jest-haste-map "^28.1.3" + slash "^3.0.0" -"@jest/transform@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.5.1.tgz#6c3501dcc00c4c08915f292a600ece5ecfe1f409" - integrity sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw== +"@jest/transform@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.3.tgz#59d8098e50ab07950e0f2fc0fc7ec462371281b0" + integrity sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA== dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.5.1" + "@babel/core" "^7.11.6" + "@jest/types" "^28.1.3" + "@jridgewell/trace-mapping" "^0.3.13" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-regex-util "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^28.1.3" + jest-regex-util "^28.0.2" + jest-util "^28.1.3" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" + write-file-atomic "^4.0.1" -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== +"@jest/types@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b" + integrity sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ== dependencies: + "@jest/schemas" "^28.1.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" - "@types/yargs" "^16.0.0" + "@types/yargs" "^17.0.8" chalk "^4.0.0" +"@jridgewell/gen-mapping@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" + integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1732,6 +1983,11 @@ lodash "^4.17.4" read-pkg-up "^7.0.0" +"@sinclair/typebox@^0.24.1": + version "0.24.25" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.25.tgz#61234177664cf161b621443a18f9e6714f757e2b" + integrity sha512-Z0b1gkfeHzRQen7juqXIZ4P2nvI6vZV+m/PhxBlVsNH/jSg2FuqJ+x4haFFIbbct6LMA7m6x2sBob/Giecj09A== + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -1744,10 +2000,10 @@ dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^8.0.1": - version "8.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.0.1.tgz#1c1c9a91419f804e59ae8df316a07dd1c3a76b94" - integrity sha512-AU7kwFxreVd6OAXcAFlKSmZquiRUU0FvYm44k1Y1QbK7Co4m0aqfGMhjykIeQp/H6rcl+nFmj0zfdUcGVs9Dew== +"@sinonjs/fake-timers@^9.1.2": + version "9.1.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" + integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== dependencies: "@sinonjs/commons" "^1.7.0" @@ -1768,7 +2024,7 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": +"@types/babel__core@^7.1.14": version "7.1.16" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.16.tgz#bc12c74b7d65e82d29876b5d0baf5c625ac58702" integrity sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ== @@ -1794,14 +2050,14 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": version "7.14.2" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.14.2.tgz#ffcd470bbb3f8bf30481678fb5502278ca833a43" integrity sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA== dependencies: "@babel/types" "^7.3.0" -"@types/graceful-fs@^4.1.2": +"@types/graceful-fs@^4.1.3": version "4.1.5" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== @@ -1848,9 +2104,9 @@ "@types/node" "*" "@types/node@*", "@types/node@^18.0.0": - version "18.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.0.tgz#67c7b724e1bcdd7a8821ce0d5ee184d3b4dd525a" - integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA== + version "18.6.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" + integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -1887,10 +2143,10 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== -"@types/yargs@^16.0.0": - version "16.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" - integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== +"@types/yargs@^17.0.8": + version "17.0.10" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.10.tgz#591522fce85d8739bca7b8bb90d048e4478d186a" + integrity sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA== dependencies: "@types/yargs-parser" "*" @@ -1902,39 +2158,11 @@ JSONStream@^1.0.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.3, abab@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" - integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== - abbrev@1, abbrev@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" - integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - -acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn@^7.1.1: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - -acorn@^8.2.4: - version "8.5.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" - integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== - agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -2092,26 +2320,25 @@ asap@^2.0.0: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -babel-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" - integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== +atomically@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/atomically/-/atomically-1.7.0.tgz#c07a0458432ea6dbc9a3506fffa424b48bccaafe" + integrity sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w== + +babel-jest@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" + integrity sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q== dependencies: - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/transform" "^28.1.3" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^27.5.1" + babel-preset-jest "^28.1.3" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -2134,14 +2361,14 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz#9be98ecf28c331eb9f5df9c72d6f89deb8181c2e" - integrity sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ== +babel-plugin-jest-hoist@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz#1952c4d0ea50f2d6d794353762278d1d8cca3fbe" + integrity sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" + "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" babel-plugin-polyfill-corejs2@^0.2.2: @@ -2186,12 +2413,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz#91f10f58034cb7989cb4f962b69fa6eef6a6bc81" - integrity sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag== +babel-preset-jest@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz#5dfc20b99abed5db994406c2b9ab94c73aaa419d" + integrity sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A== dependencies: - babel-plugin-jest-hoist "^27.5.1" + babel-plugin-jest-hoist "^28.1.3" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -2261,11 +2488,6 @@ braces@^3.0.1: dependencies: fill-range "^7.0.1" -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - browserslist@^4.16.6, browserslist@^4.17.0: version "4.17.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.0.tgz#1fcd81ec75b41d6d4994fb0831b92ac18c01649c" @@ -2288,6 +2510,16 @@ browserslist@^4.17.5: node-releases "^2.0.1" picocolors "^1.0.0" +browserslist@^4.20.2: + version "4.21.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a" + integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ== + dependencies: + caniuse-lite "^1.0.30001370" + electron-to-chromium "^1.4.202" + node-releases "^2.0.6" + update-browserslist-db "^1.0.5" + bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -2427,6 +2659,11 @@ caniuse-lite@^1.0.30001286: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001296.tgz#d99f0f3bee66544800b93d261c4be55a35f1cec8" integrity sha512-WfrtPEoNSoeATDlf4y3QvkwiELl9GyPLISV5GejTbbQRtQx4LhsXmc9IQ6XCL2d7UxCyEzToEZNMeqR79OUw8Q== +caniuse-lite@^1.0.30001370: + version "1.0.30001373" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001373.tgz#2dc3bc3bfcb5d5a929bec11300883040d7b4b4be" + integrity sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ== + capture-stack-trace@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" @@ -2646,13 +2883,6 @@ columnify@^1.6.0: strip-ansi "^6.0.1" wcwidth "^1.0.0" -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - commander@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781" @@ -2865,23 +3095,6 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" - integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - cz-conventional-changelog@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-3.2.0.tgz#6aef1f892d64113343d7e455529089ac9f20e477" @@ -2910,15 +3123,6 @@ cz-conventional-changelog@^3.3.0: optionalDependencies: "@commitlint/load" ">6.1.1" -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" - integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== - dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -2949,11 +3153,6 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decimal.js@^10.2.1: - version "10.3.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" - integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== - decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" @@ -2971,11 +3170,6 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-is@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" @@ -3014,11 +3208,6 @@ del@^6.0.0: rimraf "^3.0.2" slash "^3.0.0" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" @@ -3062,6 +3251,11 @@ diff-sequences@^27.5.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== +diff-sequences@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" + integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== + diff@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" @@ -3074,13 +3268,6 @@ dir-glob@^3.0.0, dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" - integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== - dependencies: - webidl-conversions "^5.0.0" - dot-prop@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" @@ -3117,10 +3304,15 @@ electron-to-chromium@^1.4.17: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.35.tgz#69aabb73d7030733e71c1e970ec16f5ceefbaea4" integrity sha512-wzTOMh6HGFWeALMI3bif0mzgRrVGyP1BdFRx7IvWukFrSC5QVQELENuy+Fm2dCrAdQH9T3nuqr07n94nPDFBWA== -emittery@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== +electron-to-chromium@^1.4.202: + version "1.4.206" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.206.tgz#580ff85b54d7ec0c05f20b1e37ea0becdd7b0ee4" + integrity sha512-h+Fadt1gIaQ06JaIiyqPsBjJ08fV5Q7md+V8bUvQW/9OvXfL2LRICTz2EcnnCP7QzrFTS6/27MRV6Bl9Yn97zA== + +emittery@^0.10.2: + version "0.10.2" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" + integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== emoji-regex@^8.0.0: version "8.0.0" @@ -3181,28 +3373,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" - integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: +esprima@^4.0.0, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -3276,15 +3451,16 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" - integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== +expect@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.3.tgz#90a7c1a124f1824133dd4533cce2d2bdcb6603ec" + integrity sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g== dependencies: - "@jest/types" "^27.5.1" - jest-get-type "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" + "@jest/expect-utils" "^28.1.3" + jest-get-type "^28.0.2" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-util "^28.1.3" external-editor@^3.0.3: version "3.1.0" @@ -3311,11 +3487,6 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - fastest-levenshtein@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" @@ -3430,15 +3601,6 @@ findup@0.1.5: colors "~0.6.0-1" commander "~2.1.0" -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - from2@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" @@ -3595,7 +3757,7 @@ glob@7.1.4: 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: +glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -3776,13 +3938,6 @@ hosted-git-info@^5.0.0: dependencies: lru-cache "^7.5.1" -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" - integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== - dependencies: - whatwg-encoding "^1.0.5" - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -3841,7 +3996,7 @@ husky@^8.0.0: resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9" integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw== -iconv-lite@0.4.24, iconv-lite@^0.4.24: +iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -4120,11 +4275,6 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" @@ -4152,11 +4302,6 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typedarray@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -4245,85 +4390,82 @@ java-properties@^1.0.0: resolved "https://registry.yarnpkg.com/java-properties/-/java-properties-1.0.2.tgz#ccd1fa73907438a5b5c38982269d0e771fe78211" integrity sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ== -jest-changed-files@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" - integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== +jest-changed-files@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-28.1.3.tgz#d9aeee6792be3686c47cb988a8eaf82ff4238831" + integrity sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA== dependencies: - "@jest/types" "^27.5.1" execa "^5.0.0" - throat "^6.0.1" + p-limit "^3.1.0" -jest-circus@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" - integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== +jest-circus@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.3.tgz#d14bd11cf8ee1a03d69902dc47b6bd4634ee00e4" + integrity sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow== dependencies: - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/environment" "^28.1.3" + "@jest/expect" "^28.1.3" + "@jest/test-result" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.5.1" is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" + jest-each "^28.1.3" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-runtime "^28.1.3" + jest-snapshot "^28.1.3" + jest-util "^28.1.3" + p-limit "^3.1.0" + pretty-format "^28.1.3" slash "^3.0.0" stack-utils "^2.0.3" - throat "^6.0.1" -jest-cli@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" - integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== +jest-cli@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.3.tgz#558b33c577d06de55087b8448d373b9f654e46b2" + integrity sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ== dependencies: - "@jest/core" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/core" "^28.1.3" + "@jest/test-result" "^28.1.3" + "@jest/types" "^28.1.3" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-config "^28.1.3" + jest-util "^28.1.3" + jest-validate "^28.1.3" prompts "^2.0.1" - yargs "^16.2.0" + yargs "^17.3.1" -jest-config@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" - integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== +jest-config@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.3.tgz#e315e1f73df3cac31447eed8b8740a477392ec60" + integrity sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ== dependencies: - "@babel/core" "^7.8.0" - "@jest/test-sequencer" "^27.5.1" - "@jest/types" "^27.5.1" - babel-jest "^27.5.1" + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^28.1.3" + "@jest/types" "^28.1.3" + babel-jest "^28.1.3" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" - glob "^7.1.1" + glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-get-type "^27.5.1" - jest-jasmine2 "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runner "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-circus "^28.1.3" + jest-environment-node "^28.1.3" + jest-get-type "^28.0.2" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.3" + jest-runner "^28.1.3" + jest-util "^28.1.3" + jest-validate "^28.1.3" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^27.5.1" + pretty-format "^28.1.3" slash "^3.0.0" strip-json-comments "^3.1.1" @@ -4337,106 +4479,84 @@ jest-diff@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-docblock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" - integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== +jest-diff@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" + integrity sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw== dependencies: - detect-newline "^3.0.0" - -jest-each@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" - integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== - dependencies: - "@jest/types" "^27.5.1" chalk "^4.0.0" - jest-get-type "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" + diff-sequences "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.3" -jest-environment-jsdom@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" - integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== +jest-docblock@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8" + integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - jsdom "^16.6.0" + detect-newline "^3.0.0" -jest-environment-node@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.5.1.tgz#dedc2cfe52fab6b8f5714b4808aefa85357a365e" - integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== +jest-each@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.3.tgz#bdd1516edbe2b1f3569cfdad9acd543040028f81" + integrity sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g== dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.3" + chalk "^4.0.0" + jest-get-type "^28.0.2" + jest-util "^28.1.3" + pretty-format "^28.1.3" + +jest-environment-node@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.3.tgz#7e74fe40eb645b9d56c0c4b70ca4357faa349be5" + integrity sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A== + dependencies: + "@jest/environment" "^28.1.3" + "@jest/fake-timers" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" + jest-mock "^28.1.3" + jest-util "^28.1.3" jest-get-type@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== -jest-haste-map@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.5.1.tgz#9fd8bd7e7b4fa502d9c6164c5640512b4e811e7f" - integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== +jest-get-type@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" + integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== + +jest-haste-map@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.3.tgz#abd5451129a38d9841049644f34b034308944e2b" + integrity sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA== dependencies: - "@jest/types" "^27.5.1" - "@types/graceful-fs" "^4.1.2" + "@jest/types" "^28.1.3" + "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^27.5.1" - jest-serializer "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-regex-util "^28.0.2" + jest-util "^28.1.3" + jest-worker "^28.1.3" micromatch "^4.0.4" - walker "^1.0.7" + walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" - integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== +jest-leak-detector@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz#a6685d9b074be99e3adee816ce84fd30795e654d" + integrity sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA== dependencies: - "@jest/environment" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - throat "^6.0.1" - -jest-leak-detector@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" - integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== - dependencies: - jest-get-type "^27.5.1" - pretty-format "^27.5.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.3" -jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: +jest-matcher-utils@^27.0.0: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== @@ -4446,27 +4566,37 @@ jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-message-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" - integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== +jest-matcher-utils@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz#5a77f1c129dd5ba3b4d7fc20728806c78893146e" + integrity sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw== + dependencies: + chalk "^4.0.0" + jest-diff "^28.1.3" + jest-get-type "^28.0.2" + pretty-format "^28.1.3" + +jest-message-util@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.3.tgz#232def7f2e333f1eecc90649b5b94b0055e7c43d" + integrity sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.3" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^27.5.1" + pretty-format "^28.1.3" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" - integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== +jest-mock@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.3.tgz#d4e9b1fc838bea595c77ab73672ebf513ab249da" + integrity sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.3" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -4474,181 +4604,174 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== +jest-regex-util@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" + integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== -jest-resolve-dependencies@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" - integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== +jest-resolve-dependencies@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz#8c65d7583460df7275c6ea2791901fa975c1fe66" + integrity sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA== dependencies: - "@jest/types" "^27.5.1" - jest-regex-util "^27.5.1" - jest-snapshot "^27.5.1" + jest-regex-util "^28.0.2" + jest-snapshot "^28.1.3" -jest-resolve@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" - integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== +jest-resolve@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.3.tgz#cfb36100341ddbb061ec781426b3c31eb51aa0a8" + integrity sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ== dependencies: - "@jest/types" "^27.5.1" chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" + jest-haste-map "^28.1.3" jest-pnp-resolver "^1.2.2" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-util "^28.1.3" + jest-validate "^28.1.3" resolve "^1.20.0" resolve.exports "^1.1.0" slash "^3.0.0" -jest-runner@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" - integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" +jest-runner@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.3.tgz#5eee25febd730b4713a2cdfd76bdd5557840f9a1" + integrity sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA== + dependencies: + "@jest/console" "^28.1.3" + "@jest/environment" "^28.1.3" + "@jest/test-result" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" chalk "^4.0.0" - emittery "^0.8.1" + emittery "^0.10.2" graceful-fs "^4.2.9" - jest-docblock "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-haste-map "^27.5.1" - jest-leak-detector "^27.5.1" - jest-message-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runtime "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runtime@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" - integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/globals" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + jest-docblock "^28.1.1" + jest-environment-node "^28.1.3" + jest-haste-map "^28.1.3" + jest-leak-detector "^28.1.3" + jest-message-util "^28.1.3" + jest-resolve "^28.1.3" + jest-runtime "^28.1.3" + jest-util "^28.1.3" + jest-watcher "^28.1.3" + jest-worker "^28.1.3" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.3.tgz#a57643458235aa53e8ec7821949e728960d0605f" + integrity sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw== + dependencies: + "@jest/environment" "^28.1.3" + "@jest/fake-timers" "^28.1.3" + "@jest/globals" "^28.1.3" + "@jest/source-map" "^28.1.2" + "@jest/test-result" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" execa "^5.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^28.1.3" + jest-message-util "^28.1.3" + jest-mock "^28.1.3" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.3" + jest-snapshot "^28.1.3" + jest-util "^28.1.3" slash "^3.0.0" strip-bom "^4.0.0" -jest-serializer@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.5.1.tgz#81438410a30ea66fd57ff730835123dea1fb1f64" - integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.9" - -jest-snapshot@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.5.1.tgz#b668d50d23d38054a51b42c4039cab59ae6eb6a1" - integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== +jest-snapshot@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.3.tgz#17467b3ab8ddb81e2f605db05583d69388fc0668" + integrity sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg== dependencies: - "@babel/core" "^7.7.2" + "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__traverse" "^7.0.4" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" + "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.5.1" + expect "^28.1.3" graceful-fs "^4.2.9" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - jest-haste-map "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-diff "^28.1.3" + jest-get-type "^28.0.2" + jest-haste-map "^28.1.3" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-util "^28.1.3" natural-compare "^1.4.0" - pretty-format "^27.5.1" - semver "^7.3.2" + pretty-format "^28.1.3" + semver "^7.3.5" -jest-util@^27.0.0, jest-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== +jest-util@^28.0.0, jest-util@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0" + integrity sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.3" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" - integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== +jest-validate@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.3.tgz#e322267fd5e7c64cea4629612c357bbda96229df" + integrity sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.3" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^27.5.1" + jest-get-type "^28.0.2" leven "^3.1.0" - pretty-format "^27.5.1" + pretty-format "^28.1.3" -jest-watcher@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" - integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== +jest-watcher@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.3.tgz#c6023a59ba2255e3b4c57179fc94164b3e73abd4" + integrity sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g== dependencies: - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/test-result" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.5.1" + emittery "^0.10.2" + jest-util "^28.1.3" string-length "^4.0.1" -jest-worker@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== +jest-worker@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" + integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^27.2.0: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" - integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== +jest@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.3.tgz#e9c6a7eecdebe3548ca2b18894a50f45b36dfc6b" + integrity sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA== dependencies: - "@jest/core" "^27.5.1" + "@jest/core" "^28.1.3" + "@jest/types" "^28.1.3" import-local "^3.0.2" - jest-cli "^27.5.1" + jest-cli "^28.1.3" js-tokens@^4.0.0: version "4.0.0" @@ -4663,39 +4786,6 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -jsdom@^16.6.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" - integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== - dependencies: - abab "^2.0.5" - acorn "^8.2.4" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" - escodegen "^2.0.0" - form-data "^3.0.0" - html-encoding-sniffer "^2.0.1" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.0" - parse5 "6.0.1" - saxes "^5.0.1" - symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.6" - xml-name-validator "^3.0.0" - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4731,13 +4821,18 @@ json-stringify-safe@^5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@2.x, json5@^2.1.2: +json5@^2.1.2: version "2.2.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== dependencies: minimist "^1.2.5" +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + jsonc-parser@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" @@ -4817,14 +4912,6 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - libnpmaccess@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-6.0.3.tgz#473cc3e4aadb2bc713419d92e45d23b070d8cded" @@ -5019,7 +5106,7 @@ lodash.uniqby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= -lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: +lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5135,12 +5222,12 @@ make-fetch-happen@^9.1.0: socks-proxy-agent "^6.0.0" ssri "^8.0.0" -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== dependencies: - tmpl "1.0.x" + tmpl "1.0.5" map-age-cleaner@^0.1.1: version "0.1.3" @@ -5171,10 +5258,10 @@ marked-terminal@^5.0.0: node-emoji "^1.11.0" supports-hyperlinks "^2.2.0" -marked@^4.0.10, marked@^4.0.16: - version "4.0.16" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.16.tgz#9ec18fc1a723032eb28666100344d9428cf7a264" - integrity sha512-wahonIQ5Jnyatt2fn8KqF/nIqZM8mh3oRu2+l5EANGMhu6RFjiSG52QNE2eWzFMI94HqYSgN184NurgNG6CztA== +marked@^4.0.10, marked@^4.0.18: + version "4.0.18" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.18.tgz#cd0ac54b2e5610cfb90e8fd46ccaa8292c9ed569" + integrity sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw== mem@^4.0.0: version "4.3.0" @@ -5225,18 +5312,6 @@ micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" -mime-db@1.49.0: - version "1.49.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" - integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== - -mime-types@^2.1.12: - version "2.1.32" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" - integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== - dependencies: - mime-db "1.49.0" - mime@^2.4.3: version "2.5.2" resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" @@ -5372,7 +5447,7 @@ mkdirp-infer-owner@^2.0.0: infer-owner "^1.0.4" mkdirp "^1.0.3" -mkdirp@^1.0.3, mkdirp@^1.0.4, mkdirp@~1.0.4: +mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -5493,6 +5568,11 @@ node-releases@^2.0.1: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== + nopt@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" @@ -5731,11 +5811,6 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -nwsapi@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" - integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== - object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -5777,18 +5852,6 @@ opener@^1.5.2: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - os-locale@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -5854,6 +5917,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -5993,11 +6063,6 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= -parse5@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -6092,11 +6157,6 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -6116,6 +6176,16 @@ pretty-format@^27.0.0, pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" +pretty-format@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5" + integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q== + dependencies: + "@jest/schemas" "^28.1.3" + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^18.0.0" + proc-log@^2.0.0, proc-log@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-2.0.1.tgz#8f3f69a1f608de27878f91f5c688b225391cb685" @@ -6169,11 +6239,6 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= -psl@^1.1.33: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -6182,11 +6247,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -6222,6 +6282,11 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + read-cmd-shim@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-3.0.0.tgz#62b8c638225c61e6cc607f8f4b779f3b8238f155" @@ -6526,13 +6591,6 @@ safe-regex@~2.1.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" - integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== - dependencies: - xmlchars "^2.2.0" - semantic-release@^19.0.2: version "19.0.3" resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-19.0.3.tgz#9291053ad9890052f28e7c5921d4741530d516fd" @@ -6709,7 +6767,15 @@ socks@^2.6.2: ip "^1.1.5" smart-buffer "^4.2.0" -source-map-support@^0.5.16, source-map-support@^0.5.6: +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.5.16: version "0.5.20" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== @@ -6722,16 +6788,11 @@ source-map@^0.5.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - spawn-error-forwarder@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz#1afd94738e999b0346d7b9fc373be55e07577029" @@ -6981,11 +7042,6 @@ supports-hyperlinks@^2.0.0, supports-hyperlinks@^2.2.0: has-flag "^4.0.0" supports-color "^7.0.0" -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" @@ -7048,11 +7104,6 @@ text-table@~0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -throat@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" - integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== - through2@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" @@ -7090,7 +7141,7 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmpl@1.0.x: +tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== @@ -7112,22 +7163,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -7166,32 +7201,25 @@ trim-newlines@^3.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -ts-jest@^27.0.5: - version "27.1.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.4.tgz#84d42cf0f4e7157a52e7c64b1492c46330943e00" - integrity sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ== +ts-jest@^28.0.7: + version "28.0.7" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-28.0.7.tgz#e18757a9e44693da9980a79127e5df5a98b37ac6" + integrity sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA== dependencies: bs-logger "0.x" fast-json-stable-stringify "2.x" - jest-util "^27.0.0" - json5 "2.x" + jest-util "^28.0.0" + json5 "^2.2.1" lodash.memoize "4.x" make-error "1.x" semver "7.x" - yargs-parser "20.x" + yargs-parser "^21.0.1" tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -7227,20 +7255,13 @@ type-fest@^1.0.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - typedoc@^0.23.1: - version "0.23.2" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.2.tgz#c5f82752530749c8b541ff9b17883f6fb9e72f14" - integrity sha512-THpC4vtb3wu1yck6YHzEc4ck6W4lScf8TD0Rg7XAetDih8BzP+ErYO0/6DtdzYcZyKkDwEoujkMeWW7CffCbrQ== + version "0.23.10" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.10.tgz#285d595a5f2e35ccdf6f38eba4dfe951d5bff461" + integrity sha512-03EUiu/ZuScUBMnY6p0lY+HTH8SwhzvRE3gImoemdPDWXPXlks83UGTx++lyquWeB1MTwm9D9Ca8RIjkK3AFfQ== dependencies: lunr "^2.3.9" - marked "^4.0.16" + marked "^4.0.18" minimatch "^5.1.0" shiki "^0.10.1" @@ -7310,7 +7331,7 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -universalify@^0.1.0, universalify@^0.1.2: +universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== @@ -7325,6 +7346,14 @@ unzip-response@^2.0.1: resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= +update-browserslist-db@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" + integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + update-notifier@^2.3.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" @@ -7365,14 +7394,14 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -v8-to-istanbul@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz#0aeb763894f1a0a1676adf8a8b7612a38902446c" - integrity sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA== +v8-to-istanbul@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" + integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== dependencies: + "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" - source-map "^0.7.3" validate-commit-msg@^2.14.0: version "2.14.0" @@ -7409,31 +7438,17 @@ vscode-textmate@5.2.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" - integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" - integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== - dependencies: - xml-name-validator "^3.0.0" - walk-up-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-1.0.0.tgz#d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e" integrity sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg== -walker@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== dependencies: - makeerror "1.0.x" + makeerror "1.0.12" wcwidth@^1.0.0: version "1.0.1" @@ -7447,28 +7462,6 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" - integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -7477,15 +7470,6 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" - integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== - dependencies: - lodash "^4.7.0" - tr46 "^2.1.0" - webidl-conversions "^6.1.0" - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -7519,7 +7503,7 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" -word-wrap@^1.0.3, word-wrap@~1.2.3: +word-wrap@^1.0.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== @@ -7560,16 +7544,6 @@ write-file-atomic@^2.0.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - write-file-atomic@^4.0.0, write-file-atomic@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.1.tgz#9faa33a964c1c85ff6f849b80b42a88c2c537c8f" @@ -7578,26 +7552,11 @@ write-file-atomic@^4.0.0, write-file-atomic@^4.0.1: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@^7.4.6: - version "7.5.5" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" - integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== - xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -7628,11 +7587,6 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - yargs-parser@^11.1.1: version "11.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" @@ -7641,6 +7595,16 @@ yargs-parser@^11.1.1: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2, yargs-parser@^20.2.3: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-parser@^21.0.0, yargs-parser@^21.0.1: + version "21.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== + yargs@^12.0.1: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -7671,3 +7635,21 @@ yargs@^16.2.0: string-width "^4.2.0" y18n "^5.0.5" yargs-parser "^20.2.2" + +yargs@^17.3.1: + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.0.0" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==