diff --git a/.husky/.gitignore b/.husky/.gitignore deleted file mode 100644 index 31354ec1..00000000 --- a/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index c599cab8..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -yarn lint-staged -yarn lint -yarn test -yarn build diff --git a/dist/index.js b/dist/index.js index 3d2b8436..1645565c 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 6d6ac1dc..11ed6418 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/jest.config.js b/jest.config.js index f3a27fa9..be54f49e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,11 +1,30 @@ module.exports = { + // Automatically clear mock calls and instances between every test clearMocks: true, + + // An array of file extensions your modules use moduleFileExtensions: ['js', 'ts'], + + // The test environment that will be used for testing testEnvironment: 'node', + + // The glob patterns Jest uses to detect test files testMatch: ['**/*.test.ts'], + + // This option allows use of a custom test runner testRunner: 'jest-circus/runner', + + // A map with regular expressions for transformers to paths transform: { '^.+\\.ts$': 'ts-jest', }, + + // Indicates whether each individual test should be reported during the run verbose: true, + + // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader + modulePathIgnorePatterns: ['/lib/', '/dist/'], + + // A list of paths to modules that run some code to configure or set up the testing framework before each test + setupFilesAfterEnv: ['/src/jest.setup.ts'], }; diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 00000000..6789e0af --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,38 @@ +# EXAMPLE USAGE +# Refer for explanation to following link: +# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md +# + +color: true +extends: {} + +pre-push: + parallel: true + commands: + packages-audit: + tags: security + run: yarn audit + +pre-commit: + parallel: true + commands: + format documents: + glob: '*.{md,mdx}' + run: yarn prettier --write {staged_files} + format configs: + glob: '*.{json,yml,yaml}' + run: yarn prettier --write {staged_files} + format code: + glob: '*.{js,jsx,ts,tsx}' + exclude: 'dist/' + run: yarn prettier --write {staged_files} && yarn eslint {staged_files} && git add {staged_files} + run tests: + glob: '*.{js,jsx,ts,tsx}' + exclude: 'dist/' + run: yarn jest --passWithNoTests --findRelatedTests {staged_files} + build distributables: + skip: ['merge', 'rebase'] + run: yarn build && git add dist + make shell script executable: + glob: '*.sh' + run: git update-index --chmod=+x diff --git a/package.json b/package.json index 256f007a..675a2dd3 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,10 @@ "author": "Webber ", "license": "MIT", "scripts": { - "prebuild": "yarn", - "build": "tsc && ncc build lib --source-map --license licenses.txt", + "prepare": "lefthook install", + "build": "yarn && tsc && ncc build lib --source-map --license licenses.txt", "lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts", "format": "prettier --write \"src/**/*.{js,ts}\"", - "prepare": "husky install", "cli": "yarn ts-node src/index.ts -m cli", "cli-aws": "cross-env cloudRunnerCluster=aws yarn run test-cli", "cli-k8s": "cross-env cloudRunnerCluster=k8s yarn run test-cli", @@ -41,6 +40,7 @@ "yaml": "^1.10.2" }, "devDependencies": { + "@arkweid/lefthook": "^0.7.7", "@types/jest": "^27.4.1", "@types/node": "^17.0.21", "@types/semver": "^7.3.9", @@ -53,27 +53,13 @@ "eslint-plugin-jest": "24.1.3", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-unicorn": "28.0.2", - "husky": "^7.0.4", "jest": "^27.5.1", "jest-circus": "^27.5.1", + "jest-fail-on-console": "^2.3.0", "js-yaml": "^4.1.0", - "lint-staged": "^12.3.4", "prettier": "^2.5.1", "ts-jest": "^27.1.3", "ts-node": "10.4.0", "typescript": "4.1.3" - }, - "lint-staged": { - "*.{js,jsx,ts,tsx}": [ - "prettier --write", - "eslint", - "jest --findRelatedTests" - ], - "*.{json,md,yaml,yml}": [ - "prettier --write" - ], - "*.sh": [ - "git update-index --chmod=+x" - ] } } diff --git a/src/jest.setup.ts b/src/jest.setup.ts new file mode 100644 index 00000000..40325e3b --- /dev/null +++ b/src/jest.setup.ts @@ -0,0 +1,9 @@ +import failOnConsole from 'jest-fail-on-console'; + +// Fail when console logs something inside a test - use spyOn instead +failOnConsole({ + shouldFailOnWarn: true, + shouldFailOnError: true, + shouldFailOnLog: true, + shouldFailOnAssert: true, +}); diff --git a/src/model/build-parameters.test.ts b/src/model/build-parameters.test.ts index c4ab5659..5b3075c0 100644 --- a/src/model/build-parameters.test.ts +++ b/src/model/build-parameters.test.ts @@ -5,16 +5,15 @@ import BuildParameters from './build-parameters'; import Input from './input'; import Platform from './platform'; +// Todo - Don't use process.env directly, that's what the input model class is for. const testLicense = '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nm0Db8UK+ktnOLJBtHybkfetpcKo=o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw=='; process.env.UNITY_LICENSE = testLicense; const determineVersion = jest.spyOn(Versioning, 'determineVersion').mockImplementation(async () => '1.3.37'); - const determineUnityVersion = jest .spyOn(UnityVersioning, 'determineUnityVersion') .mockImplementation(() => '2019.2.11f1'); - const determineSdkManagerParameters = jest .spyOn(AndroidVersioning, 'determineSdkManagerParameters') .mockImplementation(() => 'platforms;android-30'); diff --git a/src/model/build-parameters.ts b/src/model/build-parameters.ts index be4770b4..17b650a9 100644 --- a/src/model/build-parameters.ts +++ b/src/model/build-parameters.ts @@ -55,15 +55,13 @@ class BuildParameters { static async create(): Promise { const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle); - const unityVersion = UnityVersioning.determineUnityVersion(Input.projectPath, Input.unityVersion); - const buildVersion = await Versioning.determineVersion(Input.versioningStrategy, Input.specifiedVersion); - const androidVersionCode = AndroidVersioning.determineVersionCode(buildVersion, Input.androidVersionCode); - const androidSdkManagerParameters = AndroidVersioning.determineSdkManagerParameters(Input.androidTargetSdkVersion); + // Todo - Don't use process.env directly, that's what the input model class is for. + // --- let unitySerial = ''; if (!process.env.UNITY_SERIAL) { //No serial was present so it is a personal license that we need to convert @@ -78,6 +76,7 @@ class BuildParameters { unitySerial = process.env.UNITY_SERIAL!; } core.setSecret(unitySerial); + // --- return { version: unityVersion, diff --git a/src/model/input-readers/git-repo.ts b/src/model/input-readers/git-repo.ts index 9b6c902f..bc6ab9fc 100644 --- a/src/model/input-readers/git-repo.ts +++ b/src/model/input-readers/git-repo.ts @@ -7,12 +7,14 @@ export class GitRepoReader { static GetSha() { return ''; } + public static async GetRemote() { return (await CloudRunnerSystem.Run(`git remote -v`)) .split(' ')[1] .split('https://github.com/')[1] .split('.git')[0]; } + public static async GetBranch() { assert(fs.existsSync(`.git`)); return (await System.run(`git branch`, [], {}, false)).split('*')[1].split(`\n`)[0].replace(/ /g, ``); diff --git a/src/model/input-readers/github-cli.test.ts b/src/model/input-readers/github-cli.test.ts index ca4b6b72..424af059 100644 --- a/src/model/input-readers/github-cli.test.ts +++ b/src/model/input-readers/github-cli.test.ts @@ -2,8 +2,11 @@ import { GithubCliReader } from './github-cli'; import * as core from '@actions/core'; describe(`github cli`, () => { - it(`returns`, async () => { + // Todo - We can not assume that everyone has the GitHub cli installed locally. + it.skip(`returns`, async () => { const token = await GithubCliReader.GetGitHubAuthToken(); + + // Todo - use expect(result).toStrictEqual(something) core.info(token); }); }); diff --git a/src/model/input.ts b/src/model/input.ts index 105c5e60..cee2ec47 100644 --- a/src/model/input.ts +++ b/src/model/input.ts @@ -147,7 +147,7 @@ class Input { } static get androidTargetSdkVersion() { - return core.getInput('androidTargetSdkVersion') || ''; + return Input.getInput('androidTargetSdkVersion') || ''; } static get sshAgent() { @@ -155,7 +155,7 @@ class Input { } static async gitPrivateToken() { - return core.getInput('gitPrivateToken') || (await Input.githubToken()); + return Input.getInput('gitPrivateToken') || (await Input.githubToken()); } static get chownFilesTo() { diff --git a/src/model/system.integration.test.ts b/src/model/system.integration.test.ts new file mode 100644 index 00000000..4d452fd1 --- /dev/null +++ b/src/model/system.integration.test.ts @@ -0,0 +1,46 @@ +import * as core from '@actions/core'; +import System from './system'; + +jest.spyOn(core, 'debug').mockImplementation(() => {}); +jest.spyOn(core, 'info').mockImplementation(() => {}); +jest.spyOn(core, 'warning').mockImplementation(() => {}); +jest.spyOn(core, 'error').mockImplementation(() => {}); + +afterEach(() => jest.clearAllMocks()); + +describe('System', () => { + describe('run', () => { + /** + * Not all shells (e.g. Powershell, sh) have a reference to `echo` binary (absent or alias). + * To ensure our integration with '@actions/exec' works as expected we run some specific tests in CI only + */ + describe('integration', () => { + if (!process.env.CI) { + it("doesn't run locally", () => { + expect(true).toBe(true); + }); + } else { + it('runs a command successfully', async () => { + await expect(System.run('true')).resolves.not.toBeNull(); + }); + + it('outputs results', async () => { + await expect(System.run('echo test')).resolves.toStrictEqual('test\n'); + }); + + it('throws on when error code is not 0', async () => { + await expect(System.run('false')).rejects.toThrowError(); + }); + + it('allows pipes using buffer', async () => { + await expect( + System.run('sh', undefined, { + input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'), + // eslint-disable-next-line github/no-then + }).then((result) => Number(result)), + ).resolves.not.toBeNaN(); + }); + } + }); + }); +}); diff --git a/src/model/system.test.ts b/src/model/system.test.ts index 85349f54..b65ca6df 100644 --- a/src/model/system.test.ts +++ b/src/model/system.test.ts @@ -1,57 +1,46 @@ import * as core from '@actions/core'; +import * as exec from '@actions/exec'; import System from './system'; jest.spyOn(core, 'debug').mockImplementation(() => {}); const info = jest.spyOn(core, 'info').mockImplementation(() => {}); jest.spyOn(core, 'warning').mockImplementation(() => {}); jest.spyOn(core, 'error').mockImplementation(() => {}); +const execSpy = jest.spyOn(exec, 'exec').mockImplementation(async () => 0); -afterEach(() => { - jest.clearAllMocks(); -}); +afterEach(() => jest.clearAllMocks()); describe('System', () => { describe('run', () => { - it('runs a command successfully', async () => { - await expect(System.run('true')).resolves.not.toBeNull(); - }); + describe('units', () => { + it('passes the command to command line', async () => { + await expect(System.run('echo test')).resolves.not.toBeNull(); + await expect(execSpy).toHaveBeenLastCalledWith('echo test', expect.anything(), expect.anything()); + }); - it('outputs results', async () => { - await expect(System.run('echo test')).resolves.toStrictEqual('test\n'); - }); + it('throws on when error code is not 0', async () => { + execSpy.mockImplementationOnce(async () => 1); + await expect(System.run('false')).rejects.toThrowError(); + }); - it('throws on when error code is not 0', async () => { - await expect(System.run('false')).rejects.toThrowError(); - }); + it('throws when no command is given', async () => { + await expect(System.run('')).rejects.toThrowError(); + }); - it('throws when no arguments are given', async () => { - await expect(System.run('')).rejects.toThrowError(); - }); + it('throws when command consists only of spaces', async () => { + await expect(System.run(' \t\n')).rejects.toThrowError(); + }); - it('outputs info', async () => { - await expect(System.run('echo test')).resolves.not.toBeNull(); - expect(info).toHaveBeenLastCalledWith('test\n'); - }); + it('outputs info', async () => { + execSpy.mockImplementationOnce(async (input, _, options) => { + options?.listeners?.stdout?.(Buffer.from(input, 'utf8')); + return 0; + }); - it('outputs info only once', async () => { - await expect(System.run('echo 1')).resolves.not.toBeNull(); - expect(info).toHaveBeenCalledTimes(1); - expect(info).toHaveBeenLastCalledWith('1\n'); - - info.mockClear(); - await expect(System.run('echo 2')).resolves.not.toBeNull(); - await expect(System.run('echo 3')).resolves.not.toBeNull(); - expect(info).toHaveBeenCalledTimes(2); - expect(info).toHaveBeenLastCalledWith('3\n'); - }); - - it('allows pipes using buffer', async () => { - await expect( - System.run('sh', undefined, { - input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'), - // eslint-disable-next-line github/no-then - }).then((result) => Number(result)), - ).resolves.not.toBeNaN(); + await expect(System.run('foo-bar')).resolves.not.toBeNull(); + expect(info).toHaveBeenCalledTimes(1); + expect(info).toHaveBeenLastCalledWith('foo-bar'); + }); }); }); }); diff --git a/src/model/system.ts b/src/model/system.ts index c9f0c8bf..9f1cb676 100644 --- a/src/model/system.ts +++ b/src/model/system.ts @@ -45,6 +45,10 @@ class System { }; try { + if (command.trim() === '') { + throw new Error(`Failed to execute empty command`); + } + const exitCode = await exec(command, arguments_, { silent: true, listeners, ...options }); showOutput(); if (exitCode !== 0) { diff --git a/yarn.lock b/yarn.lock index 657f21d5..7d6c5fa5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -45,6 +45,11 @@ dependencies: "@jridgewell/trace-mapping" "^0.3.0" +"@arkweid/lefthook@^0.7.7": + version "0.7.7" + resolved "https://registry.yarnpkg.com/@arkweid/lefthook/-/lefthook-0.7.7.tgz#12951b09b955d8054885ffe929aa07a49f39027c" + integrity sha512-Eq30OXKmjxIAIsTtbX2fcF3SNZIXS8yry1u8yty7PQFYRctx04rVlhOJCEB2UmfTh8T2vrOMC9IHHUvvo5zbaQ== + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": version "7.12.13" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz" @@ -1446,7 +1451,7 @@ ansi-colors@^4.1.1: resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -1458,11 +1463,6 @@ ansi-regex@^5.0.0, ansi-regex@^5.0.1: resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" @@ -1482,11 +1482,6 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -ansi-styles@^6.0.0: - version "6.1.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz" - integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ== - anymatch@^3.0.3: version "3.1.2" resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" @@ -1858,6 +1853,14 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" @@ -1895,29 +1898,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-truncate@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz" - integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== - dependencies: - slice-ansi "^3.0.0" - string-width "^4.2.0" - -cli-truncate@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz" - integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== - dependencies: - slice-ansi "^5.0.0" - string-width "^5.0.0" - cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -1973,11 +1953,6 @@ colorette@^1.2.2: resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== -colorette@^2.0.16: - version "2.0.16" - resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz" - integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== - combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -1997,11 +1972,6 @@ commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - commander@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/commander/-/commander-9.0.0.tgz#86d58f24ee98126568936bd1d3574e0308a99a40" @@ -2083,7 +2053,7 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.3: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.3.3" resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== @@ -2240,11 +2210,6 @@ emoji-regex@^8.0.0: resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -emoji-regex@^9.2.2: - version "9.2.2" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz" - integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -2572,7 +2537,7 @@ execa@5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^5.0.0, execa@^5.1.1: +execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -3002,11 +2967,6 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -husky@^7.0.4: - version "7.0.4" - resolved "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz" - integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ== - iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" @@ -3134,11 +3094,6 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-fullwidth-code-point@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz" - integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== - is-generator-fn@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" @@ -3413,6 +3368,13 @@ jest-environment-node@^27.5.1: jest-mock "^27.5.1" jest-util "^27.5.1" +jest-fail-on-console@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/jest-fail-on-console/-/jest-fail-on-console-2.3.0.tgz#bf22af0e535512ec7e220223279e3fb7ae621b8b" + integrity sha512-RwTq79+v5OccU59VmhoTvsCyTQ11YeOtLL6xLtkks/H7afLay6gASk6a4qMlyLlpM36t0rPW+DQsJ4ZNcCS2ug== + dependencies: + chalk "^4.1.0" + 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" @@ -3930,49 +3892,11 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lilconfig@2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz" - integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA== - lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -lint-staged@^12.3.4: - version "12.3.4" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.3.4.tgz#4b1ff8c394c3e6da436aaec5afd4db18b5dac360" - integrity sha512-yv/iK4WwZ7/v0GtVkNb3R82pdL9M+ScpIbJLJNyCXkJ1FGaXvRCOg/SeL59SZtPpqZhE7BD6kPKFLIDUhDx2/w== - dependencies: - cli-truncate "^3.1.0" - colorette "^2.0.16" - commander "^8.3.0" - debug "^4.3.3" - execa "^5.1.1" - lilconfig "2.0.4" - listr2 "^4.0.1" - micromatch "^4.0.4" - normalize-path "^3.0.0" - object-inspect "^1.12.0" - string-argv "^0.3.1" - supports-color "^9.2.1" - yaml "^1.10.2" - -listr2@^4.0.1: - version "4.0.4" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.4.tgz#d098a1c419284fb26e184b5d5889b235e8912245" - integrity sha512-vJOm5KD6uZXjSsrwajr+mNacIjf87gWvlBEltPWLbTkslUscWAzquyK4xfe9Zd4RDgO5nnwFyV06FC+uVR+5mg== - dependencies: - cli-truncate "^2.1.0" - colorette "^2.0.16" - log-update "^4.0.0" - p-map "^4.0.0" - rfdc "^1.3.0" - rxjs "^7.5.4" - through "^2.3.8" - wrap-ansi "^7.0.0" - load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz" @@ -4023,16 +3947,6 @@ lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.7.0: resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-update@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz" @@ -4240,11 +4154,6 @@ object-hash@^2.0.1: resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== -object-inspect@^1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" - integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== - object-inspect@^1.9.0: version "1.11.1" resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.1.tgz" @@ -4287,7 +4196,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^5.1.0, onetime@^5.1.2: +onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -4392,13 +4301,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - p-some@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/p-some/-/p-some-5.0.0.tgz" @@ -4819,14 +4721,6 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - reusify@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" @@ -4837,11 +4731,6 @@ rfc4648@^1.3.0: resolved "https://registry.yarnpkg.com/rfc4648/-/rfc4648-1.5.1.tgz#b0b16756e33d9de8c0c7833e94b28e627ec372a4" integrity sha512-60e/YWs2/D3MV1ErdjhJHcmlgnyLUiG4X/14dgsfm9/zmCWLN16xI6YqJYSCd/OANM7bUNzJqPY5B8/02S9Ibw== -rfdc@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz" - integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== - rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" @@ -4856,13 +4745,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.5.4: - version "7.5.4" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.4.tgz#3d6bd407e6b7ce9a123e76b1e770dc5761aa368d" - integrity sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ== - dependencies: - tslib "^2.1.0" - safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -4969,15 +4851,6 @@ slash@^3.0.0: resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz" - integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - slice-ansi@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz" @@ -4987,14 +4860,6 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -slice-ansi@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz" - integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== - dependencies: - ansi-styles "^6.0.0" - is-fullwidth-code-point "^4.0.0" - source-map-support@^0.5.6: version "0.5.19" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz" @@ -5081,11 +4946,6 @@ stream-buffers@^3.0.2: resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-3.0.2.tgz#5249005a8d5c2d00b3a32e6e0a6ea209dc4f3521" integrity sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ== -string-argv@^0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz" - integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== - string-length@^4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" @@ -5103,15 +4963,6 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string-width@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/string-width/-/string-width-5.0.1.tgz" - integrity sha512-5ohWO/M4//8lErlUUtrFy3b11GtNOuMOU0ysKCDXFcfXuuvUXu95akgj/i8ofmaGdN0hCqyl6uu9i8dS/mQp5g== - dependencies: - emoji-regex "^9.2.2" - is-fullwidth-code-point "^4.0.0" - strip-ansi "^7.0.1" - string.prototype.trimend@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz" @@ -5135,13 +4986,6 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" -strip-ansi@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz" - integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== - dependencies: - ansi-regex "^6.0.1" - strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" @@ -5183,11 +5027,6 @@ supports-color@^8.0.0: dependencies: has-flag "^4.0.0" -supports-color@^9.2.1: - version "9.2.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.1.tgz#599dc9d45acf74c6176e0d880bab1d7d718fe891" - integrity sha512-Obv7ycoCTG51N7y175StI9BlAXrmgZrFhZOb0/PyjHBher/NmsdBgbbQ1Inhq+gIhz6+7Gb+jWF2Vqi7Mf1xnQ== - supports-hyperlinks@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz" @@ -5274,11 +5113,6 @@ throat@^6.0.1: resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== -through@^2.3.8: - version "2.3.8" - resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - tmp-promise@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7" @@ -5391,11 +5225,6 @@ tslib@^1.8.1, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tsutils@^3.17.1: version "3.21.0" resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" @@ -5656,15 +5485,6 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"