From d9b458cd011b0ccb396d420930bc26b694acac42 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Mon, 27 Feb 2023 15:17:27 -0800 Subject: [PATCH] chore: adopt prettier and eslint hooks --- .husky/pre-commit | 4 + .vscode/extensions.json | 6 + .vscode/settings.json | 18 +- CHANGELOG.md | 18 +- README.md | 49 +++--- SECURITY.md | 18 +- lib/del.ts | 19 -- lib/download.test.ts | 2 +- lib/download.ts | 35 +++- lib/progress.ts | 27 ++- lib/runTest.ts | 15 +- lib/util.ts | 49 +++--- package.json | 17 +- yarn.lock | 382 +++++++++++++++++++++++++++++++++++++++- 14 files changed, 538 insertions(+), 121 deletions(-) create mode 100644 .husky/pre-commit create mode 100644 .vscode/extensions.json delete mode 100644 lib/del.ts diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..5a182ef --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +yarn lint-staged diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..5bc0e65 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "esbenp.prettier-vscode", + "dbaeumer.vscode-eslint" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index bebd2ea..d3b9781 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,16 +1,18 @@ // Place your settings in this file to overwrite default and user settings. { - "editor.insertSpaces": true, + "editor.insertSpaces": true, "files.eol": "\n", "files.trimTrailingWhitespace": true, - "files.exclude": { - "**/.git": true, - "**/.DS_Store": true, - "**/*.js": { - "when": "$(basename).ts" - } + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true, + "**/*.js": { + "when": "$(basename).ts" + } }, - "githubIssues.queries":[ + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "githubIssues.queries": [ { "label": "Recent Issues", "query": "state:open repo:${owner}/${repository} sort:updated-desc" diff --git a/CHANGELOG.md b/CHANGELOG.md index ca9ce6e..09c5b2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -121,7 +121,7 @@ ### 1.1.0 | 2019-08-02 - Add `resolveCliPathFromVSCodeExecutablePath` that would resolve `vscodeExecutablePath` to VS Code CLI path, which can be used -for extension management features such as `--install-extension` and `--uninstall-extension`. [#31](https://github.com/microsoft/vscode-test/issues/31). + for extension management features such as `--install-extension` and `--uninstall-extension`. [#31](https://github.com/microsoft/vscode-test/issues/31). ### 1.0.2 | 2019-07-17 @@ -144,13 +144,13 @@ for extension management features such as `--install-extension` and `--uninstall ### 1.0.0-next.0 | 2019-06-24 - Updated API: - - One single set of options. - - `extensionPath` => `extensionDevelopmentPath` to align with VS Code launch flags - - `testRunnerPath` => `extensionTestsPath` to align with VS Code launch flags - - `testRunnerEnv` => `extensionTestsEnv` to align with VS Code launch flags - - `additionalLaunchArgs` => `launchArgs` - - `testWorkspace` removed. Pass path to file/folder/workspace as first argument to `launchArgs` instead. - - `locale` removed. Pass `--locale` to `launchArgs` instead. + - One single set of options. + - `extensionPath` => `extensionDevelopmentPath` to align with VS Code launch flags + - `testRunnerPath` => `extensionTestsPath` to align with VS Code launch flags + - `testRunnerEnv` => `extensionTestsEnv` to align with VS Code launch flags + - `additionalLaunchArgs` => `launchArgs` + - `testWorkspace` removed. Pass path to file/folder/workspace as first argument to `launchArgs` instead. + - `locale` removed. Pass `--locale` to `launchArgs` instead. ### 0.4.3 | 2019-05-30 @@ -163,7 +163,7 @@ for extension management features such as `--install-extension` and `--uninstall ### 0.4.1 | 2019-05-02 - Fix Linux crash because `testRunnerEnv` is not merged with `process.env` for spawning the -testing process. [#14](https://github.com/Microsoft/vscode-test/issues/14c). + testing process. [#14](https://github.com/Microsoft/vscode-test/issues/14c). ### 0.4.0 | 2019-04-18 diff --git a/README.md b/README.md index 8a82d96..b496582 100644 --- a/README.md +++ b/README.md @@ -20,19 +20,19 @@ import { runTests } from '@vscode/test-electron'; async function go() { try { - const extensionDevelopmentPath = path.resolve(__dirname, '../../../') - const extensionTestsPath = path.resolve(__dirname, './suite') + const extensionDevelopmentPath = path.resolve(__dirname, '../../../'); + const extensionTestsPath = path.resolve(__dirname, './suite'); /** * Basic usage */ await runTests({ extensionDevelopmentPath, - extensionTestsPath - }) + extensionTestsPath, + }); - const extensionTestsPath2 = path.resolve(__dirname, './suite2') - const testWorkspace = path.resolve(__dirname, '../../../test-fixtures/fixture1') + const extensionTestsPath2 = path.resolve(__dirname, './suite2'); + const testWorkspace = path.resolve(__dirname, '../../../test-fixtures/fixture1'); /** * Running another test suite on a specific workspace @@ -40,8 +40,8 @@ async function go() { await runTests({ extensionDevelopmentPath, extensionTestsPath: extensionTestsPath2, - launchArgs: [testWorkspace] - }) + launchArgs: [testWorkspace], + }); /** * Use 1.36.1 release for testing @@ -50,8 +50,8 @@ async function go() { version: '1.36.1', extensionDevelopmentPath, extensionTestsPath, - launchArgs: [testWorkspace] - }) + launchArgs: [testWorkspace], + }); /** * Use Insiders release for testing @@ -60,24 +60,24 @@ async function go() { version: 'insiders', extensionDevelopmentPath, extensionTestsPath, - launchArgs: [testWorkspace] - }) + launchArgs: [testWorkspace], + }); /** * Noop, since 1.36.1 already downloaded to .vscode-test/vscode-1.36.1 */ - await downloadAndUnzipVSCode('1.36.1') + await downloadAndUnzipVSCode('1.36.1'); /** * Manually download VS Code 1.35.0 release for testing. */ - const vscodeExecutablePath = await downloadAndUnzipVSCode('1.35.0') + const vscodeExecutablePath = await downloadAndUnzipVSCode('1.35.0'); await runTests({ vscodeExecutablePath, extensionDevelopmentPath, extensionTestsPath, - launchArgs: [testWorkspace] - }) + launchArgs: [testWorkspace], + }); /** * Install Python extension @@ -85,7 +85,7 @@ async function go() { const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath); cp.spawnSync(cli, [...args, '--install-extension', 'ms-python.python'], { encoding: 'utf-8', - stdio: 'inherit' + stdio: 'inherit', }); /** @@ -99,11 +99,11 @@ async function go() { launchArgs: [ testWorkspace, // This disables all extensions except the one being tested - '--disable-extensions' + '--disable-extensions', ], // Custom environment variables for extension test script - extensionTestsEnv: { foo: 'bar' } - }) + extensionTestsEnv: { foo: 'bar' }, + }); /** * Use win64 instead of win32 for testing Windows @@ -113,17 +113,16 @@ async function go() { extensionDevelopmentPath, extensionTestsPath, version: '1.40.0', - platform: 'win32-x64-archive' + platform: 'win32-x64-archive', }); } - } catch (err) { - console.error('Failed to run tests') - process.exit(1) + console.error('Failed to run tests'); + process.exit(1); } } -go() +go(); ``` ## Development diff --git a/SECURITY.md b/SECURITY.md index 869fdfe..1488eb5 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,19 +12,19 @@ If you believe you have found a security vulnerability in any Microsoft-owned re Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue +- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) +- Full paths of source file(s) related to the manifestation of the issue +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- Step-by-step instructions to reproduce the issue +- Proof-of-concept or exploit code (if possible) +- Impact of the issue, including how an attacker might exploit the issue This information will help us triage your report more quickly. diff --git a/lib/del.ts b/lib/del.ts deleted file mode 100644 index 699345f..0000000 --- a/lib/del.ts +++ /dev/null @@ -1,19 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - import * as rimraf from 'rimraf'; - -// todo: rmdir supports a `recurse` option as of Node 12. Drop rimraf when 10 is EOL. -export function rmdir(dir: string) { - return new Promise((c, e) => { - rimraf(dir, err => { - if (err) { - return e(err); - } - - c(); - }); - }); -} diff --git a/lib/download.test.ts b/lib/download.test.ts index 6efa945..9bdf726 100644 --- a/lib/download.test.ts +++ b/lib/download.test.ts @@ -88,7 +88,7 @@ describe('fetchTargetInferredVersion', () => { cachePath: join(extensionsDevelopmentPath, '.cache'), platform: 'win32-archive', timeout: 5000, - extensionsDevelopmentPath: paths.map(p => join(extensionsDevelopmentPath, p)), + extensionsDevelopmentPath: paths.map((p) => join(extensionsDevelopmentPath, p)), }); test('matches stable if no workspace', async () => { diff --git a/lib/download.ts b/lib/download.ts index 6f9af34..1532e25 100644 --- a/lib/download.ts +++ b/lib/download.ts @@ -9,7 +9,6 @@ import { tmpdir } from 'os'; import * as path from 'path'; import { pipeline, Readable } from 'stream'; import { promisify } from 'util'; -import * as del from './del'; import { ConsoleReporter, ProgressReporter, ProgressReportStage } from './progress'; import * as request from './request'; import * as semver from 'semver'; @@ -101,7 +100,8 @@ export async function fetchTargetInferredVersion(options: IFetchInferredOptions) return found2; } - console.warn(`No version of VS Code satisfies all extension engine constraints (${extVersions.join(', ')}). Falling back to stable.`); + const v = extVersions.join(', '); + console.warn(`No version of VS Code satisfies all extension engine constraints (${v}). Falling back to stable.`); return stable[0]; // 🤷 } catch (e) { @@ -215,18 +215,33 @@ async function downloadVSCodeArchive(options: DownloadOptions) { const isZip = contentType ? contentType === 'application/zip' : url.endsWith('.zip'); const timeoutCtrl = new request.TimeoutController(timeout); - options.reporter?.report({ stage: ProgressReportStage.Downloading, url, bytesSoFar: 0, totalBytes }); + options.reporter?.report({ + stage: ProgressReportStage.Downloading, + url, + bytesSoFar: 0, + totalBytes, + }); let bytesSoFar = 0; download.on('data', (chunk) => { bytesSoFar += chunk.length; timeoutCtrl.touch(); - options.reporter?.report({ stage: ProgressReportStage.Downloading, url, bytesSoFar, totalBytes }); + options.reporter?.report({ + stage: ProgressReportStage.Downloading, + url, + bytesSoFar, + totalBytes, + }); }); download.on('end', () => { timeoutCtrl.dispose(); - options.reporter?.report({ stage: ProgressReportStage.Downloading, url, bytesSoFar: totalBytes, totalBytes }); + options.reporter?.report({ + stage: ProgressReportStage.Downloading, + url, + bytesSoFar: totalBytes, + totalBytes, + }); }); timeoutCtrl.signal.addEventListener('abort', () => { @@ -375,7 +390,7 @@ export async function download(options: Partial = {}): Promise< newDate: new Date(latestTimestamp), newHash: latestHash, }); - await del.rmdir(downloadedPath); + await fs.promises.rm(downloadedPath, { force: true, recursive: true }); } catch (err) { reporter.error(err); throw Error(`Failed to remove outdated Insiders at ${downloadedPath}.`); @@ -397,7 +412,13 @@ export async function download(options: Partial = {}): Promise< const downloadStaging = `${downloadedPath}.tmp`; await fs.promises.rm(downloadStaging, { recursive: true, force: true }); - const { stream, format } = await downloadVSCodeArchive({ version, platform, cachePath, reporter, timeout }); + const { stream, format } = await downloadVSCodeArchive({ + version, + platform, + cachePath, + reporter, + timeout, + }); // important! do not put anything async here, since unzipVSCode will need // to start consuming the stream immediately. await unzipVSCode(reporter, downloadStaging, extractSync, stream, format); diff --git a/lib/progress.ts b/lib/progress.ts index d91e5d3..b4f5c05 100644 --- a/lib/progress.ts +++ b/lib/progress.ts @@ -31,13 +31,20 @@ export type ProgressReport = | { stage: ProgressReportStage.FetchingVersion } | { stage: ProgressReportStage.ResolvedVersion; version: string } | { stage: ProgressReportStage.FetchingInsidersMetadata } - | { stage: ProgressReportStage.ReplacingOldInsiders; downloadedPath: string; oldHash: string; oldDate: Date; newHash: string; newDate: Date } + | { + stage: ProgressReportStage.ReplacingOldInsiders; + downloadedPath: string; + oldHash: string; + oldDate: Date; + newHash: string; + newDate: Date; + } | { stage: ProgressReportStage.FoundMatchingInstall; downloadedPath: string } | { stage: ProgressReportStage.ResolvingCDNLocation; url: string } - | { stage: ProgressReportStage.Downloading; url: string; totalBytes: number; bytesSoFar: number; } - | { stage: ProgressReportStage.Retrying; error: Error, attempt: number; totalAttempts: number } - | { stage: ProgressReportStage.ExtractingSynchonrously; } - | { stage: ProgressReportStage.NewInstallComplete, downloadedPath: string; } + | { stage: ProgressReportStage.Downloading; url: string; totalBytes: number; bytesSoFar: number } + | { stage: ProgressReportStage.Retrying; error: Error; attempt: number; totalAttempts: number } + | { stage: ProgressReportStage.ExtractingSynchonrously } + | { stage: ProgressReportStage.NewInstallComplete; downloadedPath: string }; export interface ProgressReporter { report(report: ProgressReport): void; @@ -61,7 +68,7 @@ export class ConsoleReporter implements ProgressReporter { private downloadReport?: { timeout: NodeJS.Timeout; - report: { stage: ProgressReportStage.Downloading, totalBytes: number; bytesSoFar: number; }; + report: { stage: ProgressReportStage.Downloading; totalBytes: number; bytesSoFar: number }; }; constructor(private readonly showDownloadProgress: boolean) {} @@ -71,7 +78,7 @@ export class ConsoleReporter implements ProgressReporter { case ProgressReportStage.ResolvedVersion: this.version = report.version; break; - case ProgressReportStage.ReplacingOldInsiders: + case ProgressReportStage.ReplacingOldInsiders: console.log(`Removing outdated Insiders at ${report.downloadedPath} and re-downloading.`); console.log(`Old: ${report.oldHash} | ${report.oldDate.toISOString()}`); console.log(`New: ${report.newHash} | ${report.newDate.toISOString()}`); @@ -80,7 +87,7 @@ export class ConsoleReporter implements ProgressReporter { console.log(`Found existing install in ${report.downloadedPath}. Skipping download`); break; case ProgressReportStage.ResolvingCDNLocation: - console.log(`Downloading VS Code ${this.version} from ${report.url}`) + console.log(`Downloading VS Code ${this.version} from ${report.url}`); break; case ProgressReportStage.Downloading: if (!this.showDownloadProgress && report.bytesSoFar === 0) { @@ -93,7 +100,9 @@ export class ConsoleReporter implements ProgressReporter { break; case ProgressReportStage.Retrying: this.flushDownloadReport(); - console.log(`Error downloading, retrying (attempt ${report.attempt} of ${report.totalAttempts}): ${report.error.message}`); + console.log( + `Error downloading, retrying (attempt ${report.attempt} of ${report.totalAttempts}): ${report.error.message}` + ); break; case ProgressReportStage.NewInstallComplete: this.flushDownloadReport(); diff --git a/lib/runTest.ts b/lib/runTest.ts index c80441f..25c8b80 100644 --- a/lib/runTest.ts +++ b/lib/runTest.ts @@ -133,12 +133,11 @@ export async function runTests(options: TestOptions): Promise { '--skip-welcome', '--skip-release-notes', '--disable-workspace-trust', - '--extensionTestsPath=' + options.extensionTestsPath + '--extensionTestsPath=' + options.extensionTestsPath, ]; if (Array.isArray(options.extensionDevelopmentPath)) { - args.push(...options.extensionDevelopmentPath.map(devPath => - `--extensionDevelopmentPath=${devPath}`)); + args.push(...options.extensionDevelopmentPath.map((devPath) => `--extensionDevelopmentPath=${devPath}`)); } else { args.push(`--extensionDevelopmentPath=${options.extensionDevelopmentPath}`); } @@ -158,18 +157,18 @@ export async function runTests(options: TestOptions): Promise { export function getProfileArguments(args: readonly string[]) { const out: string[] = []; if (!hasArg('extensions-dir', args)) { - out.push(`--extensions-dir=${path.join(defaultCachePath, 'extensions')}`) + out.push(`--extensions-dir=${path.join(defaultCachePath, 'extensions')}`); } if (!hasArg('user-data-dir', args)) { - out.push(`--user-data-dir=${path.join(defaultCachePath, 'user-data')}`) + out.push(`--user-data-dir=${path.join(defaultCachePath, 'user-data')}`); } return out; } function hasArg(argName: string, argList: readonly string[]) { - return argList.some(a => a === `--${argName}` || a.startsWith(`--${argName}=`)); + return argList.some((a) => a === `--${argName}` || a.startsWith(`--${argName}=`)); } async function innerRunTests( @@ -183,8 +182,8 @@ async function innerRunTests( const fullEnv = Object.assign({}, process.env, testRunnerEnv); const cmd = cp.spawn(executable, args, { env: fullEnv }); - cmd.stdout.on('data', d => process.stdout.write(d)); - cmd.stderr.on('data', d => process.stderr.write(d)); + cmd.stdout.on('data', (d) => process.stdout.write(d)); + cmd.stderr.on('data', (d) => process.stderr.write(d)); cmd.on('error', function (data) { console.log('Test error: ' + data.toString()); diff --git a/lib/util.ts b/lib/util.ts index 0b32b58..47f0138 100644 --- a/lib/util.ts +++ b/lib/util.ts @@ -23,18 +23,16 @@ switch (process.platform) { systemDefaultPlatform = process.arch === 'arm64' ? 'darwin-arm64' : 'darwin'; break; case 'win32': - systemDefaultPlatform = process.arch === 'arm64' - ? 'win32-arm64-archive' - : process.arch === 'ia32' - ? 'win32-archive' - : 'win32-x64-archive'; + systemDefaultPlatform = + process.arch === 'arm64' + ? 'win32-arm64-archive' + : process.arch === 'ia32' + ? 'win32-archive' + : 'win32-x64-archive'; break; default: - systemDefaultPlatform = process.arch === 'arm64' - ? 'linux-arm64' - : process.arch === 'arm' - ? 'linux-armhf' - : 'linux-x64'; + systemDefaultPlatform = + process.arch === 'arm64' ? 'linux-arm64' : process.arch === 'arm' ? 'linux-armhf' : 'linux-x64'; } export function isInsiderVersionIdentifier(version: string): boolean { @@ -42,7 +40,7 @@ export function isInsiderVersionIdentifier(version: string): boolean { } export function isStableVersionIdentifier(version: string): boolean { - return version === 'stable' || /^[0-9]+\.[0-9]+\.[0-9]$/.test(version); // stable or 1.2.3 version string + return version === 'stable' || /^[0-9]+\.[0-9]+\.[0-9]$/.test(version); // stable or 1.2.3 version string } export function getVSCodeDownloadUrl(version: string, platform = systemDefaultPlatform) { @@ -52,7 +50,8 @@ export function getVSCodeDownloadUrl(version: string, platform = systemDefaultPl return `https://update.code.visualstudio.com/${version}/${platform}/insider`; } else if (isStableVersionIdentifier(version)) { return `https://update.code.visualstudio.com/${version}/${platform}/stable`; - } else { // insiders commit hash + } else { + // insiders commit hash return `https://update.code.visualstudio.com/commit:${version}/${platform}/insider`; } } @@ -115,7 +114,7 @@ export function insidersDownloadDirMetadata(dir: string, platform: DownloadPlatf return { version: productJson.commit, - date: new Date(productJson.date) + date: new Date(productJson.date), }; } @@ -144,7 +143,10 @@ export async function getLatestInsidersMetadata(platform: string) { * Resolve the VS Code cli path from executable path returned from `downloadAndUnzipVSCode`. * Usually you will want {@link resolveCliArgsFromVSCodeExecutablePath} instead. */ -export function resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath: string, platform: DownloadPlatform = systemDefaultPlatform) { +export function resolveCliPathFromVSCodeExecutablePath( + vscodeExecutablePath: string, + platform: DownloadPlatform = systemDefaultPlatform +) { if (windowsPlatforms.has(platform)) { if (vscodeExecutablePath.endsWith('Code - Insiders.exe')) { return path.resolve(vscodeExecutablePath, '../bin/code-insiders.cmd'); @@ -179,8 +181,13 @@ export function resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath: str * * @param vscodeExecutablePath The `vscodeExecutablePath` from `downloadAndUnzipVSCode`. */ -export function resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath: string, options?: Pick) { - const args = [resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath, options?.platform ?? systemDefaultPlatform)]; +export function resolveCliArgsFromVSCodeExecutablePath( + vscodeExecutablePath: string, + options?: Pick +) { + const args = [ + resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath, options?.platform ?? systemDefaultPlatform), + ]; if (!options?.reuseMachineInstall) { args.push(...getProfileArguments(args)); } @@ -197,7 +204,7 @@ export function isDefined(arg: T | undefined | null): arg is T { export function streamToBuffer(readable: NodeJS.ReadableStream) { return new Promise((resolve, reject) => { const chunks: Buffer[] = []; - readable.on('data', chunk => chunks.push(chunk)); + readable.on('data', (chunk) => chunks.push(chunk)); readable.on('error', reject); readable.on('end', () => resolve(Buffer.concat(chunks))); }); @@ -213,15 +220,15 @@ export function isSubdirectory(parent: string, child: string) { * the result unless it rejects. */ export function onceWithoutRejections(fn: (...args: Args) => Promise) { - let value: Promise | undefined; + let value: Promise | undefined; return (...args: Args) => { if (!value) { - value = fn(...args).catch(err => { + value = fn(...args).catch((err) => { value = undefined; throw err; }); } - return value - } + return value; + }; } diff --git a/package.json b/package.json index 259a1cd..bce18b7 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,18 @@ "compile": "tsc -p ./", "watch": "tsc -w -p ./", "prepublish": "tsc -p ./", - "test": "eslint lib --ext ts && vitest && tsc --noEmit" + "fmt": "prettier --write \"lib/**/*.ts\" \"*.md\"", + "test": "eslint lib --ext ts && vitest && tsc --noEmit", + "prepare": "husky install" + }, + "lint-staged": { + "*.ts": [ + "eslint --fix", + "prettier --write" + ], + "*.md": [ + "prettier --write" + ] }, "main": "./out/index.js", "engines": { @@ -15,7 +26,6 @@ "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", "jszip": "^3.10.1", - "rimraf": "^3.0.2", "semver": "^7.3.8" }, "devDependencies": { @@ -26,6 +36,9 @@ "@typescript-eslint/parser": "^4.13.0", "eslint": "^7.17.0", "eslint-plugin-header": "^3.1.0", + "husky": "^8.0.3", + "lint-staged": "^13.1.2", + "prettier": "^2.8.4", "typescript": "^4.3.5", "vitest": "^0.10.2" }, diff --git a/yarn.lock b/yarn.lock index 66061ca..effb626 100644 --- a/yarn.lock +++ b/yarn.lock @@ -212,6 +212,14 @@ agent-base@6: dependencies: debug "4" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv@^6.10.0, ajv@^6.12.4: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" @@ -237,11 +245,23 @@ 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-regex@^5.0.0: +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "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.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + 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" @@ -256,6 +276,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +ansi-styles@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" @@ -291,7 +316,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.1: +braces@^3.0.1, braces@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -338,6 +363,34 @@ check-error@^1.0.2: resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= +clean-stack@^2.0.0: + version "2.2.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.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + 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.yarnpkg.com/cli-truncate/-/cli-truncate-3.1.0.tgz#3f23ab12535e3d73e839bb43e73c9de487db1389" + integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== + dependencies: + slice-ansi "^5.0.0" + string-width "^5.0.0" + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" @@ -362,6 +415,16 @@ color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^2.0.19: + version "2.0.19" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + +commander@^9.4.1: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" @@ -372,7 +435,7 @@ core-util-is@~1.0.0: resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cross-spawn@^7.0.2: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -388,6 +451,13 @@ debug@4, debug@^4.0.1, debug@^4.1.1: dependencies: ms "2.1.2" +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + deep-eql@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz" @@ -414,11 +484,21 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + emoji-regex@^8.0.0: version "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.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + enquirer@^2.3.5: version "2.3.6" resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz" @@ -674,6 +754,21 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +execa@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" + integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^3.0.1" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + fast-deep-equal@^3.1.1: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -760,6 +855,11 @@ get-func-name@^2.0.0: resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz" integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-stream@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + glob-parent@^5.0.0, glob-parent@^5.1.0: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" @@ -832,6 +932,16 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +human-signals@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" + integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== + +husky@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== + ignore@^4.0.6: version "4.0.6" resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz" @@ -860,6 +970,11 @@ imurmurhash@^0.1.4: resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" @@ -890,6 +1005,11 @@ 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.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== + is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz" @@ -902,6 +1022,11 @@ is-number@^7.0.0: resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + isarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" @@ -965,6 +1090,44 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" +lilconfig@2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" + integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg== + +lint-staged@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.1.2.tgz#443636a0cfd834d5518d57d228130dc04c83d6fb" + integrity sha512-K9b4FPbWkpnupvK3WXZLbgu9pchUJ6N7TtVZjbaPsoizkqFUDkUReUL25xdrCljJs7uLUF3tZ7nVPeo/6lp+6w== + dependencies: + cli-truncate "^3.1.0" + colorette "^2.0.19" + commander "^9.4.1" + debug "^4.3.4" + execa "^6.1.0" + lilconfig "2.0.6" + listr2 "^5.0.5" + micromatch "^4.0.5" + normalize-path "^3.0.0" + object-inspect "^1.12.2" + pidtree "^0.6.0" + string-argv "^0.3.1" + yaml "^2.1.3" + +listr2@^5.0.5: + version "5.0.7" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.7.tgz#de69ccc4caf6bea7da03c74f7a2ffecf3904bd53" + integrity sha512-MD+qXHPmtivrHIDRwPYdfNkrzqDiuaKU/rfBcec3WMyMF3xylQj3jMq344OtvQxz7zaCFViRAeqlr2AFhPvXHw== + dependencies: + cli-truncate "^2.1.0" + colorette "^2.0.19" + log-update "^4.0.0" + p-map "^4.0.0" + rfdc "^1.3.0" + rxjs "^7.8.0" + through "^2.3.8" + wrap-ansi "^7.0.0" + local-pkg@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.1.tgz" @@ -975,6 +1138,16 @@ lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20: 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.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + 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" + loupe@^2.3.1: version "2.3.4" resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz" @@ -989,6 +1162,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + merge2@^1.3.0: version "1.4.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" @@ -1002,6 +1180,24 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + minimatch@^3.0.4: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -1024,6 +1220,23 @@ natural-compare@^1.4.0: resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" + integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + dependencies: + path-key "^4.0.0" + +object-inspect@^1.12.2: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + once@^1.3.0: version "1.4.0" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" @@ -1031,6 +1244,20 @@ once@^1.3.0: dependencies: wrappy "1" +onetime@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" @@ -1043,6 +1270,13 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + pako@~1.0.2: version "1.0.11" resolved "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz" @@ -1065,6 +1299,11 @@ path-key@^3.1.0: resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" @@ -1090,6 +1329,16 @@ picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pidtree@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" + integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== + postcss@^8.4.13: version "8.4.19" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz" @@ -1104,6 +1353,11 @@ prelude-ls@^1.2.1: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier@^2.8.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" + integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" @@ -1156,11 +1410,24 @@ resolve@^1.22.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + 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" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + rimraf@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" @@ -1180,6 +1447,13 @@ run-parallel@^1.1.9: resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz" integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== +rxjs@^7.8.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" + integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== + dependencies: + tslib "^2.1.0" + safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" @@ -1216,11 +1490,25 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +signal-exit@^3.0.2, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + slash@^3.0.0: version "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.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + 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" @@ -1230,6 +1518,14 @@ 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.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== + dependencies: + ansi-styles "^6.0.0" + is-fullwidth-code-point "^4.0.0" + source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" @@ -1240,6 +1536,20 @@ sprintf-js@~1.0.2: resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +string-argv@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + +string-width@^4.1.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz" @@ -1249,6 +1559,15 @@ string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" @@ -1263,6 +1582,25 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" + integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== + dependencies: + ansi-regex "^6.0.1" + +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" @@ -1302,6 +1640,11 @@ text-table@^0.2.0: resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + tinypool@^0.1.3: version "0.1.3" resolved "https://registry.npmjs.org/tinypool/-/tinypool-0.1.3.tgz" @@ -1324,6 +1667,11 @@ tslib@^1.8.1: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.1.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + tsutils@^3.17.1: version "3.19.1" resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.19.1.tgz" @@ -1343,6 +1691,11 @@ type-detect@^4.0.0, type-detect@^4.0.5: resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + type-fest@^0.8.1: version "0.8.1" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" @@ -1407,6 +1760,24 @@ 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.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + 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.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" @@ -1416,3 +1787,8 @@ yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yaml@^2.1.3: + version "2.2.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.1.tgz#3014bf0482dcd15147aa8e56109ce8632cd60ce4" + integrity sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==