From 07ca34d4e8ddcd83e4b028fa0f9d066ab683471b Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 15 Jun 2022 23:16:35 +0800 Subject: [PATCH] chore: update lint --- .eslintrc | 8 + .eslintrc.yml | 12 - .github/workflows/CI-CD.yaml | 6 +- .npmrc | 1 + .vscode/launch.json | 7 +- .vscode/tasks.json | 4 +- README.md | 8 +- bin/bumpp.js | 6 +- package.json | 48 +- pnpm-lock.yaml | 1606 +++++++++++++++++++++++----- src/changelog.ts | 1 - src/cli/exit-code.ts | 2 +- src/cli/help.ts | 6 +- src/cli/index.ts | 74 +- src/cli/parse-args.ts | 80 +- src/cli/run.ts | 5 +- src/fs.ts | 66 +- src/get-new-version.ts | 141 ++- src/get-old-version.ts | 36 +- src/git.ts | 81 +- src/index.ts | 14 +- src/manifest.ts | 27 +- src/normalize-options.ts | 177 ++- src/operation.ts | 69 +- src/release-type.ts | 13 +- src/run-npm-script.ts | 31 +- src/types/version-bump-options.ts | 35 +- src/types/version-bump-progress.ts | 24 +- src/types/version-bump-results.ts | 16 +- src/update-files.ts | 72 +- src/version-bump.ts | 61 +- test/fixtures/files/script1.js | 9 +- test/fixtures/files/script2.js | 11 +- test/fixtures/mocha-hooks.js | 16 +- test/fixtures/setup-mocks.js | 28 +- test/specs/api.spec.js | 203 ++-- test/specs/cli.spec.js | 224 ++-- test/specs/exports.spec.js | 48 +- test/specs/files.spec.js | 304 +++--- test/specs/git-commit.spec.js | 208 ++-- test/specs/git-push.spec.js | 153 ++- test/specs/git-tag.spec.js | 181 ++-- test/specs/minor.spec.js | 108 +- test/specs/npm.spec.js | 216 ++-- test/specs/patch.spec.js | 108 +- test/specs/premajor.spec.js | 108 +- test/specs/preminor.spec.js | 108 +- test/specs/prepatch.spec.js | 108 +- test/specs/prerelease.spec.js | 108 +- test/specs/release.spec.js | 188 ++-- test/utils/bump.js | 18 +- test/utils/files.js | 39 +- test/utils/fixtures.js | 18 +- test/utils/index.js | 16 +- test/utils/mocks.js | 51 +- test/utils/symbols.js | 8 +- 56 files changed, 3178 insertions(+), 2146 deletions(-) create mode 100644 .eslintrc delete mode 100644 .eslintrc.yml create mode 100644 .npmrc delete mode 100644 src/changelog.ts diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..004061a --- /dev/null +++ b/.eslintrc @@ -0,0 +1,8 @@ +{ + "extends": "@antfu", + "rules": { + "no-console": "off", + "no-undef": "off", + "promise/param-names": "off" + } +} diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index 03efaf4..0000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,12 +0,0 @@ -# ESLint config -# http://eslint.org/docs/user-guide/configuring -# https://jstools.dev/eslint-config/ - -root: true -extends: "@jsdevtools" - -env: - node: true - -rules: - '@typescript-eslint/ban-ts-comment': 'off' diff --git a/.github/workflows/CI-CD.yaml b/.github/workflows/CI-CD.yaml index 7f4ed0a..a5c39a1 100644 --- a/.github/workflows/CI-CD.yaml +++ b/.github/workflows/CI-CD.yaml @@ -8,12 +8,12 @@ name: CI-CD on: push: branches: - - "*" + - '*' tags-ignore: - - "*" + - '*' schedule: - - cron: "0 0 1 * *" + - cron: '0 0 1 * *' jobs: test: diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..bf2e764 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +shamefully-hoist=true diff --git a/.vscode/launch.json b/.vscode/launch.json index c42f980..11e7f24 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -19,7 +19,7 @@ "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", "args": [ "--timeout=60000", - "--retries=0", + "--retries=0" ], "console": "integratedTerminal", "outFiles": [ @@ -28,10 +28,9 @@ "smartStep": true, "skipFiles": [ "/**/*.js" - ], + ] }, - { "type": "node", "request": "launch", @@ -52,7 +51,7 @@ "smartStep": true, "skipFiles": [ "/**/*.js" - ], + ] } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 34299c6..401d4d2 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -28,7 +28,7 @@ "group": { "kind": "test", "isDefault": true - }, - }, + } + } ] } diff --git a/README.md b/README.md index 87af4e9..0857c11 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,11 @@ Forked from [`version-bump-prompt`](https://github.com/JS-DevTools/version-bump- ###### Changes in this fork -- Renamed to `bumpp` - so you can use `npx bumpp` directly -- Ships ESM and CJS bundles -- Add a new argument `--execute` to execute the command before committing +- Renamed to `bumpp` - so you can use `npx bumpp` directly. +- Ships ESM and CJS bundles. +- Add a new argument `--execute` to execute the command before committing. +- Use current version's `preid` when avaliable. +- Enable `--commit` `--tag` `--push` by default. (opt-out by `--no-push`, etc.)
Original README diff --git a/bin/bumpp.js b/bin/bumpp.js index 7eb9957..be608ce 100644 --- a/bin/bumpp.js +++ b/bin/bumpp.js @@ -1,4 +1,4 @@ #!/usr/bin/env node -"use strict"; -const { main } = require("../dist/cli"); -main(process.argv.slice(2)); +'use strict' +const { main } = require('../dist/cli') +main(process.argv.slice(2)) diff --git a/package.json b/package.json index 38472b7..8034944 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,16 @@ "version": "7.2.0", "packageManager": "pnpm@7.2.1", "description": "Automatically (or with prompts) bump your version number, commit changes, tag, and push to Git", + "author": { + "name": "James Messinger", + "url": "https://jamesmessinger.com" + }, + "license": "MIT", + "homepage": "https://jstools.dev/version-bump-prompt", + "repository": { + "type": "git", + "url": "https://github.com/antfu/bumpp.git" + }, "keywords": [ "version", "bump", @@ -15,16 +25,6 @@ "push", "prompt" ], - "author": { - "name": "James Messinger", - "url": "https://jamesmessinger.com" - }, - "license": "MIT", - "homepage": "https://jstools.dev/version-bump-prompt", - "repository": { - "type": "git", - "url": "https://github.com/antfu/bumpp.git" - }, "main": "dist/index.js", "types": "dist/index.d.ts", "bin": { @@ -34,9 +34,12 @@ "bin", "dist" ], + "engines": { + "node": ">=10" + }, "scripts": { "clean": "rimraf .nyc_output coverage dist", - "lint": "eslint src test", + "lint": "eslint .", "build": "tsup src/index.ts src/cli/index.ts --format esm,cjs --dts --clean", "watch": "npm run build -- --watch src", "start": "esno src/cli/run.ts", @@ -47,9 +50,17 @@ "prepublishOnly": "npm run clean && npm run build", "release": "npm run bumpp && npm publish" }, + "dependencies": { + "@jsdevtools/ez-spawn": "^3.0.4", + "cac": "^6.7.12", + "chalk": "^4.1.2", + "globby": "^11.0.4", + "prompts": "^2.4.1", + "semver": "^7.3.5" + }, "devDependencies": { + "@antfu/eslint-config": "^0.25.1", "@jsdevtools/chai-exec": "^2.1.1", - "@jsdevtools/eslint-config": "^1.1.4", "@types/chai": "^4.2.21", "@types/inquirer": "^7.3.3", "@types/mocha": "^8.2.3", @@ -59,7 +70,7 @@ "chai": "^4.3.4", "detect-indent": "^7.0.0", "detect-newline": "^3.1.0", - "eslint": "^7.32.0", + "eslint": "^8.8.0", "esno": "^0.9.1", "log-symbols": "^4.1.0", "mocha": "^8.4.0", @@ -70,16 +81,5 @@ "tsup": "^5.11.9", "typescript": "^4.4.2" }, - "dependencies": { - "@jsdevtools/ez-spawn": "^3.0.4", - "cac": "^6.7.12", - "chalk": "^4.1.2", - "globby": "^11.0.4", - "prompts": "^2.4.1", - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - }, "engineStrict": true } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 466cd71..436c6d6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,8 +1,8 @@ lockfileVersion: 5.4 specifiers: + '@antfu/eslint-config': ^0.25.1 '@jsdevtools/chai-exec': ^2.1.1 - '@jsdevtools/eslint-config': ^1.1.4 '@jsdevtools/ez-spawn': ^3.0.4 '@types/chai': ^4.2.21 '@types/inquirer': ^7.3.3 @@ -15,7 +15,7 @@ specifiers: chalk: ^4.1.2 detect-indent: ^7.0.0 detect-newline: ^3.1.0 - eslint: ^7.32.0 + eslint: ^8.8.0 esno: ^0.9.1 globby: ^11.0.4 log-symbols: ^4.1.0 @@ -38,8 +38,8 @@ dependencies: semver: 7.3.5 devDependencies: + '@antfu/eslint-config': 0.25.1_pn4c2euezwjqh4cpvwz4zteq6u '@jsdevtools/chai-exec': 2.1.1 - '@jsdevtools/eslint-config': 1.1.4_ek2rpc4knwwiwkb7dlup4o3xyy '@types/chai': 4.3.0 '@types/inquirer': 7.3.3 '@types/mocha': 8.2.3 @@ -49,7 +49,7 @@ devDependencies: chai: 4.3.4 detect-indent: 7.0.0 detect-newline: 3.1.0 - eslint: 7.32.0 + eslint: 8.17.0 esno: 0.9.1 log-symbols: 4.1.0 mocha: 8.4.0 @@ -62,10 +62,105 @@ devDependencies: packages: - /@babel/code-frame/7.12.11: - resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} + /@antfu/eslint-config-basic/0.25.1_4mnst4p6z4afxkjeigpcxgenxa: + resolution: {integrity: sha512-FiOC33yoqHJCElFjSPJ9rHIjGSvJSqbYE58PgRXtJE9E4MM00vwzbA9iKILLnj27o3r3V+1sngHWlIeGaQu/iA==} + peerDependencies: + eslint: '>=7.4.0' + dependencies: + eslint: 8.17.0 + eslint-plugin-antfu: 0.25.1_pn4c2euezwjqh4cpvwz4zteq6u + eslint-plugin-eslint-comments: 3.2.0_eslint@8.17.0 + eslint-plugin-html: 6.2.0 + eslint-plugin-import: 2.26.0_wyrfqmvemfacbroyi3ypviy7f4 + eslint-plugin-jsonc: 2.3.0_eslint@8.17.0 + eslint-plugin-markdown: 2.2.1_eslint@8.17.0 + eslint-plugin-n: 15.2.2_eslint@8.17.0 + eslint-plugin-promise: 6.0.0_eslint@8.17.0 + eslint-plugin-unicorn: 42.0.0_eslint@8.17.0 + eslint-plugin-yml: 1.0.0_eslint@8.17.0 + jsonc-eslint-parser: 2.1.0 + yaml-eslint-parser: 1.0.1 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - typescript + dev: true + + /@antfu/eslint-config-react/0.25.1_pn4c2euezwjqh4cpvwz4zteq6u: + resolution: {integrity: sha512-gLdRj4nmOk4W9ORzvkwf8kklCkSxY7ox7BKE97HYcGtaq5oAQjibYC+WPkLklj2+BQuOXcZdGbqJgx/+qHfRrw==} + peerDependencies: + eslint: '>=7.4.0' dependencies: - '@babel/highlight': 7.16.0 + '@antfu/eslint-config-ts': 0.25.1_pn4c2euezwjqh4cpvwz4zteq6u + eslint: 8.17.0 + eslint-plugin-react: 7.30.0_eslint@8.17.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - typescript + dev: true + + /@antfu/eslint-config-ts/0.25.1_pn4c2euezwjqh4cpvwz4zteq6u: + resolution: {integrity: sha512-bKaSOah8Qb5ND0i14x3kcpfMA5euxy/9VYVwZQ2XJgY6hkjEY1wTyC0Jw6JQvTYglEycEc2SDrtEZ0+0SKA/jg==} + peerDependencies: + eslint: '>=7.4.0' + typescript: '>=3.9' + dependencies: + '@antfu/eslint-config-basic': 0.25.1_4mnst4p6z4afxkjeigpcxgenxa + '@typescript-eslint/eslint-plugin': 5.28.0_4mnst4p6z4afxkjeigpcxgenxa + '@typescript-eslint/parser': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + eslint: 8.17.0 + typescript: 4.5.4 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + + /@antfu/eslint-config-vue/0.25.1_pn4c2euezwjqh4cpvwz4zteq6u: + resolution: {integrity: sha512-Z9MCGYKZO50eU8YwgqBYWx+GVSOfDHxbIf6+BLxpDmrVGUuJQMqT5CIcihSRkQMeH/drQwPmQKbSSmVdjOLHrg==} + peerDependencies: + eslint: '>=7.4.0' + dependencies: + '@antfu/eslint-config-ts': 0.25.1_pn4c2euezwjqh4cpvwz4zteq6u + eslint: 8.17.0 + eslint-plugin-vue: 9.1.1_eslint@8.17.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - typescript + dev: true + + /@antfu/eslint-config/0.25.1_pn4c2euezwjqh4cpvwz4zteq6u: + resolution: {integrity: sha512-CRg2LL6bh+lWWfG5TDJh3TUQTh+immu6IWkiVaJJn4jVD7jFQSewvIQUoPo7/YEPFpL2TTCCUjmT2YpmSbnedg==} + peerDependencies: + eslint: '>=7.4.0' + dependencies: + '@antfu/eslint-config-react': 0.25.1_pn4c2euezwjqh4cpvwz4zteq6u + '@antfu/eslint-config-vue': 0.25.1_pn4c2euezwjqh4cpvwz4zteq6u + '@typescript-eslint/eslint-plugin': 5.28.0_4mnst4p6z4afxkjeigpcxgenxa + '@typescript-eslint/parser': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + eslint: 8.17.0 + eslint-plugin-eslint-comments: 3.2.0_eslint@8.17.0 + eslint-plugin-html: 6.2.0 + eslint-plugin-import: 2.26.0_wyrfqmvemfacbroyi3ypviy7f4 + eslint-plugin-jsonc: 2.3.0_eslint@8.17.0 + eslint-plugin-n: 15.2.2_eslint@8.17.0 + eslint-plugin-promise: 6.0.0_eslint@8.17.0 + eslint-plugin-unicorn: 42.0.0_eslint@8.17.0 + eslint-plugin-vue: 9.1.1_eslint@8.17.0 + eslint-plugin-yml: 1.0.0_eslint@8.17.0 + jsonc-eslint-parser: 2.1.0 + yaml-eslint-parser: 1.0.1 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - typescript dev: true /@babel/code-frame/7.16.0: @@ -94,7 +189,7 @@ packages: '@babel/traverse': 7.16.5 '@babel/types': 7.16.0 convert-source-map: 1.8.0 - debug: 4.3.3 + debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.0 semver: 6.3.0 @@ -251,7 +346,7 @@ packages: '@babel/helper-split-export-declaration': 7.16.0 '@babel/parser': 7.16.6 '@babel/types': 7.16.0 - debug: 4.3.3 + debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -265,30 +360,30 @@ packages: to-fast-properties: 2.0.0 dev: true - /@eslint/eslintrc/0.4.3: - resolution: {integrity: sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==} - engines: {node: ^10.12.0 || >=12.0.0} + /@eslint/eslintrc/1.3.0: + resolution: {integrity: sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.3 - espree: 7.3.1 - globals: 13.12.0 - ignore: 4.0.6 + debug: 4.3.4 + espree: 9.3.2 + globals: 13.15.0 + ignore: 5.2.0 import-fresh: 3.3.0 - js-yaml: 3.14.1 - minimatch: 3.0.4 + js-yaml: 4.1.0 + minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color dev: true - /@humanwhocodes/config-array/0.5.0: - resolution: {integrity: sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==} + /@humanwhocodes/config-array/0.9.5: + resolution: {integrity: sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.3 - minimatch: 3.0.4 + debug: 4.3.4 + minimatch: 3.1.2 transitivePeerDependencies: - supports-color dev: true @@ -320,21 +415,6 @@ packages: '@jsdevtools/ez-spawn': 3.0.4 dev: true - /@jsdevtools/eslint-config/1.1.4_ek2rpc4knwwiwkb7dlup4o3xyy: - resolution: {integrity: sha512-Q4LI11Z2duYcKt0VXOnc3TA2JpK9s8LEA6s+45k2g5hNRGAmCCrAcIFrR0unhJt7DDcQ6qfYdXSLaYmSiLnlNA==} - engines: {node: '>=10'} - peerDependencies: - eslint: '>=7' - dependencies: - '@typescript-eslint/eslint-plugin': 3.10.1_qcgegsuzsb5ggxb6jgklquhiyu - '@typescript-eslint/parser': 3.10.1_ek2rpc4knwwiwkb7dlup4o3xyy - eslint: 7.32.0 - eslint-plugin-jsdoc: 30.7.13_eslint@7.32.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@jsdevtools/ez-spawn/3.0.4: resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} engines: {node: '>=10'} @@ -366,10 +446,6 @@ packages: resolution: {integrity: sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==} dev: true - /@types/eslint-visitor-keys/1.0.0: - resolution: {integrity: sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==} - dev: true - /@types/inquirer/7.3.3: resolution: {integrity: sha512-HhxyLejTHMfohAuhRun4csWigAMjXTmRyiJTU1Y/I1xmggikFMkOUoMQRlFm+zQcPEGHSs3io/0FAmNZf8EymQ==} dependencies: @@ -381,12 +457,22 @@ packages: resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==} dev: true + /@types/json5/0.0.29: + resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + dev: true + /@types/keyv/3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: '@types/node': 14.18.3 dev: true + /@types/mdast/3.0.10: + resolution: {integrity: sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==} + dependencies: + '@types/unist': 2.0.6 + dev: true + /@types/mocha/8.2.3: resolution: {integrity: sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==} dev: true @@ -395,6 +481,10 @@ packages: resolution: {integrity: sha512-GtTH2crF4MtOIrrAa+jgTV9JX/PfoUCYr6MiZw7O/dkZu5b6gm5dc1nAL0jwGo4ortSBBtGyeVaxdC8X6V+pLg==} dev: true + /@types/normalize-package-data/2.4.1: + resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + dev: true + /@types/prompts/2.0.14: resolution: {integrity: sha512-HZBd99fKxRWpYCErtm2/yxUZv6/PBI9J7N4TNFffl5JbrYMHBwF25DjQGTW3b3jmXq+9P6/8fCIb2ee57BFfYA==} dependencies: @@ -417,116 +507,150 @@ packages: '@types/node': 14.18.3 dev: true - /@typescript-eslint/eslint-plugin/3.10.1_qcgegsuzsb5ggxb6jgklquhiyu: - resolution: {integrity: sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==} - engines: {node: ^10.12.0 || >=12.0.0} + /@types/unist/2.0.6: + resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} + dev: true + + /@typescript-eslint/eslint-plugin/5.28.0_4mnst4p6z4afxkjeigpcxgenxa: + resolution: {integrity: sha512-DXVU6Cg29H2M6EybqSg2A+x8DgO9TCUBRp4QEXQHJceLS7ogVDP0g3Lkg/SZCqcvkAP/RruuQqK0gdlkgmhSUA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - '@typescript-eslint/parser': ^3.0.0 - eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 3.10.1_ek2rpc4knwwiwkb7dlup4o3xyy - '@typescript-eslint/parser': 3.10.1_ek2rpc4knwwiwkb7dlup4o3xyy - debug: 4.3.3 - eslint: 7.32.0 + '@typescript-eslint/parser': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + '@typescript-eslint/scope-manager': 5.28.0 + '@typescript-eslint/type-utils': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + '@typescript-eslint/utils': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + debug: 4.3.4 + eslint: 8.17.0 functional-red-black-tree: 1.0.1 + ignore: 5.2.0 regexpp: 3.2.0 - semver: 7.3.5 + semver: 7.3.7 tsutils: 3.21.0_typescript@4.5.4 typescript: 4.5.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/experimental-utils/3.10.1_ek2rpc4knwwiwkb7dlup4o3xyy: - resolution: {integrity: sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==} - engines: {node: ^10.12.0 || >=12.0.0} + /@typescript-eslint/parser/5.28.0_pn4c2euezwjqh4cpvwz4zteq6u: + resolution: {integrity: sha512-ekqoNRNK1lAcKhZESN/PdpVsWbP9jtiNqzFWkp/yAUdZvJalw2heCYuqRmM5eUJSIYEkgq5sGOjq+ZqsLMjtRA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: '*' + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@types/json-schema': 7.0.9 - '@typescript-eslint/types': 3.10.1 - '@typescript-eslint/typescript-estree': 3.10.1_typescript@4.5.4 - eslint: 7.32.0 - eslint-scope: 5.1.1 - eslint-utils: 2.1.0 + '@typescript-eslint/scope-manager': 5.28.0 + '@typescript-eslint/types': 5.28.0 + '@typescript-eslint/typescript-estree': 5.28.0_typescript@4.5.4 + debug: 4.3.4 + eslint: 8.17.0 + typescript: 4.5.4 transitivePeerDependencies: - supports-color - - typescript dev: true - /@typescript-eslint/parser/3.10.1_ek2rpc4knwwiwkb7dlup4o3xyy: - resolution: {integrity: sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==} - engines: {node: ^10.12.0 || >=12.0.0} + /@typescript-eslint/scope-manager/5.28.0: + resolution: {integrity: sha512-LeBLTqF/he1Z+boRhSqnso6YrzcKMTQ8bO/YKEe+6+O/JGof9M0g3IJlIsqfrK/6K03MlFIlycbf1uQR1IjE+w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.28.0 + '@typescript-eslint/visitor-keys': 5.28.0 + dev: true + + /@typescript-eslint/type-utils/5.28.0_pn4c2euezwjqh4cpvwz4zteq6u: + resolution: {integrity: sha512-SyKjKh4CXPglueyC6ceAFytjYWMoPHMswPQae236zqe1YbhvCVQyIawesYywGiu98L9DwrxsBN69vGIVxJ4mQQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 + eslint: '*' typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@types/eslint-visitor-keys': 1.0.0 - '@typescript-eslint/experimental-utils': 3.10.1_ek2rpc4knwwiwkb7dlup4o3xyy - '@typescript-eslint/types': 3.10.1 - '@typescript-eslint/typescript-estree': 3.10.1_typescript@4.5.4 - eslint: 7.32.0 - eslint-visitor-keys: 1.3.0 + '@typescript-eslint/utils': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + debug: 4.3.4 + eslint: 8.17.0 + tsutils: 3.21.0_typescript@4.5.4 typescript: 4.5.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/3.10.1: - resolution: {integrity: sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==} - engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + /@typescript-eslint/types/5.28.0: + resolution: {integrity: sha512-2OOm8ZTOQxqkPbf+DAo8oc16sDlVR5owgJfKheBkxBKg1vAfw2JsSofH9+16VPlN9PWtv8Wzhklkqw3k/zCVxA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/3.10.1_typescript@4.5.4: - resolution: {integrity: sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==} - engines: {node: ^10.12.0 || >=12.0.0} + /@typescript-eslint/typescript-estree/5.28.0_typescript@4.5.4: + resolution: {integrity: sha512-9GX+GfpV+F4hdTtYc6OV9ZkyYilGXPmQpm6AThInpBmKJEyRSIjORJd1G9+bknb7OTFYL+Vd4FBJAO6T78OVqA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 3.10.1 - '@typescript-eslint/visitor-keys': 3.10.1 - debug: 4.3.3 - glob: 7.2.0 + '@typescript-eslint/types': 5.28.0 + '@typescript-eslint/visitor-keys': 5.28.0 + debug: 4.3.4 + globby: 11.1.0 is-glob: 4.0.3 - lodash: 4.17.21 - semver: 7.3.5 + semver: 7.3.7 tsutils: 3.21.0_typescript@4.5.4 typescript: 4.5.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/visitor-keys/3.10.1: - resolution: {integrity: sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==} - engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} + /@typescript-eslint/utils/5.28.0_pn4c2euezwjqh4cpvwz4zteq6u: + resolution: {integrity: sha512-E60N5L0fjv7iPJV3UGc4EC+A3Lcj4jle9zzR0gW7vXhflO7/J29kwiTGITA2RlrmPokKiZbBy2DgaclCaEUs6g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.9 + '@typescript-eslint/scope-manager': 5.28.0 + '@typescript-eslint/types': 5.28.0 + '@typescript-eslint/typescript-estree': 5.28.0_typescript@4.5.4 + eslint: 8.17.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.17.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys/5.28.0: + resolution: {integrity: sha512-BtfP1vCor8cWacovzzPFOoeW4kBQxzmhxGoOpt0v1SFvG+nJ0cWaVdJk7cky1ArTcFHHKNIxyo2LLr3oNkSuXA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - eslint-visitor-keys: 1.3.0 + '@typescript-eslint/types': 5.28.0 + eslint-visitor-keys: 3.3.0 dev: true /@ungap/promise-all-settled/1.1.2: resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} dev: true - /acorn-jsx/5.3.2_acorn@7.4.1: + /acorn-jsx/5.3.2_acorn@8.7.1: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 7.4.1 + acorn: 8.7.1 dev: true - /acorn/7.4.1: - resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} + /acorn/8.7.1: + resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -548,15 +672,6 @@ packages: uri-js: 4.4.1 dev: true - /ajv/8.8.2: - resolution: {integrity: sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==} - dependencies: - fast-deep-equal: 3.1.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - uri-js: 4.4.1 - dev: true - /ansi-align/2.0.0: resolution: {integrity: sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=} dependencies: @@ -594,7 +709,7 @@ packages: dev: true /ansi-styles/2.2.1: - resolution: {integrity: sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=} + resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} engines: {node: '>=0.10.0'} dev: true @@ -649,8 +764,19 @@ packages: engines: {node: '>=0.10.0'} dev: true + /array-includes/3.1.5: + resolution: {integrity: sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + get-intrinsic: 1.1.2 + is-string: 1.0.7 + dev: true + /array-union/1.0.2: - resolution: {integrity: sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=} + resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} engines: {node: '>=0.10.0'} dependencies: array-uniq: 1.0.3 @@ -665,6 +791,26 @@ packages: engines: {node: '>=0.10.0'} dev: true + /array.prototype.flat/1.3.0: + resolution: {integrity: sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + es-shim-unscopables: 1.0.0 + dev: true + + /array.prototype.flatmap/1.3.0: + resolution: {integrity: sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + es-shim-unscopables: 1.0.0 + dev: true + /arrify/1.0.1: resolution: {integrity: sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=} engines: {node: '>=0.10.0'} @@ -674,11 +820,6 @@ packages: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true - /astral-regex/2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - dev: true - /babel-runtime/6.26.0: resolution: {integrity: sha1-llxwWGaOgrVde/4E/yM3vItWR/4=} dependencies: @@ -695,6 +836,10 @@ packages: engines: {node: '>=8'} dev: true + /boolbase/1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + dev: true + /boxen/1.3.0: resolution: {integrity: sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==} engines: {node: '>=4'} @@ -742,6 +887,12 @@ packages: engines: {node: '>=6'} dev: true + /builtins/5.0.1: + resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} + dependencies: + semver: 7.3.7 + dev: true + /bundle-require/2.2.0_esbuild@0.14.8: resolution: {integrity: sha512-JDVxYEAxEX1g8AWtadiIkCkFf42RulEl5AOIvUa4cpuEL/VKpK2lJwogyswHnp+qizNQxM0Ylamw7CjPRaJZuA==} peerDependencies: @@ -764,6 +915,13 @@ packages: write-file-atomic: 3.0.3 dev: true + /call-bind/1.0.2: + resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + dependencies: + function-bind: 1.1.1 + get-intrinsic: 1.1.2 + dev: true + /call-me-maybe/1.0.1: resolution: {integrity: sha1-JtII6onje1y95gJQoV8DHBak1ms=} @@ -863,6 +1021,18 @@ packages: ansi-styles: 4.3.0 supports-color: 7.2.0 + /character-entities-legacy/1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + dev: true + + /character-entities/1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + dev: true + + /character-reference-invalid/1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + dev: true + /check-error/1.0.2: resolution: {integrity: sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=} dev: true @@ -901,6 +1071,17 @@ packages: resolution: {integrity: sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==} dev: true + /ci-info/3.3.2: + resolution: {integrity: sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==} + dev: true + + /clean-regexp/1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /clean-stack/2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -974,7 +1155,7 @@ packages: color-name: 1.1.4 /color-name/1.1.3: - resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} dev: true /color-name/1.1.4: @@ -985,11 +1166,6 @@ packages: engines: {node: '>= 6'} dev: true - /comment-parser/0.7.6: - resolution: {integrity: sha512-GKNxVA7/iuTnAqGADlTWX4tkhzxZKXp5fLJqKTlQLHkE65XDUKutZ3BHaJC5IGcper2tT3QRD1xr4o3jNpgXXg==} - engines: {node: '>= 6.0.0'} - dev: true - /commondir/1.0.1: resolution: {integrity: sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=} dev: true @@ -1038,7 +1214,7 @@ packages: dev: true /cross-spawn/5.1.0: - resolution: {integrity: sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=} + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: lru-cache: 4.1.5 shebang-command: 1.2.0 @@ -1058,6 +1234,12 @@ packages: engines: {node: '>=4'} dev: true + /cssesc/3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + dev: true + /currently-unhandled/0.4.1: resolution: {integrity: sha1-mI3zP+qxke95mmE2nddsF635V+o=} engines: {node: '>=0.10.0'} @@ -1069,6 +1251,28 @@ packages: resolution: {integrity: sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=} dev: true + /debug/2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.0.0 + dev: true + + /debug/3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + dev: true + /debug/4.3.1_supports-color@8.1.1: resolution: {integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==} engines: {node: '>=6.0'} @@ -1094,6 +1298,18 @@ packages: ms: 2.1.2 dev: true + /debug/4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + /decamelize/1.2.0: resolution: {integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=} engines: {node: '>=0.10.0'} @@ -1127,6 +1343,14 @@ packages: strip-bom: 4.0.0 dev: true + /define-properties/1.1.4: + resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} + engines: {node: '>= 0.4'} + dependencies: + has-property-descriptors: 1.0.0 + object-keys: 1.1.1 + dev: true + /depcheck/0.8.3: resolution: {integrity: sha512-xcLTnaovCFFTts5Ge7mUUhMGHSu6eRfftvVvOjN7gXO5EFUhJfX6UQa1b08a0SIwKfzG9eKNn5mzZlXp0mZARA==} engines: {node: '>=6'} @@ -1139,11 +1363,11 @@ packages: deps-regex: 0.1.4 js-yaml: 3.14.1 lodash: 4.17.21 - minimatch: 3.0.4 + minimatch: 3.1.2 node-sass-tilde-importer: 1.0.2 please-upgrade-node: 3.2.0 require-package-name: 2.0.1 - resolve: 1.20.0 + resolve: 1.22.0 vue-template-compiler: 2.6.14 walkdir: 0.3.2 yargs: 13.3.2 @@ -1180,6 +1404,13 @@ packages: dependencies: path-type: 4.0.0 + /doctrine/2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} + dependencies: + esutils: 2.0.3 + dev: true + /doctrine/3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -1187,6 +1418,33 @@ packages: esutils: 2.0.3 dev: true + /dom-serializer/1.4.1: + resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} + dependencies: + domelementtype: 2.3.0 + domhandler: 4.3.1 + entities: 2.2.0 + dev: true + + /domelementtype/2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + dev: true + + /domhandler/4.3.1: + resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} + engines: {node: '>= 4'} + dependencies: + domelementtype: 2.3.0 + dev: true + + /domutils/2.8.0: + resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==} + dependencies: + dom-serializer: 1.4.1 + domelementtype: 2.3.0 + domhandler: 4.3.1 + dev: true + /dot-prop/4.2.1: resolution: {integrity: sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==} engines: {node: '>=4'} @@ -1210,11 +1468,13 @@ packages: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /enquirer/2.3.6: - resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} - engines: {node: '>=8.6'} - dependencies: - ansi-colors: 4.1.1 + /entities/2.2.0: + resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} + dev: true + + /entities/3.0.1: + resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==} + engines: {node: '>=0.12'} dev: true /error-ex/1.3.2: @@ -1229,6 +1489,50 @@ packages: stackframe: 0.3.1 dev: true + /es-abstract/1.20.1: + resolution: {integrity: sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + es-to-primitive: 1.2.1 + function-bind: 1.1.1 + function.prototype.name: 1.1.5 + get-intrinsic: 1.1.2 + get-symbol-description: 1.0.0 + has: 1.0.3 + has-property-descriptors: 1.0.0 + has-symbols: 1.0.3 + internal-slot: 1.0.3 + is-callable: 1.2.4 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + is-string: 1.0.7 + is-weakref: 1.0.2 + object-inspect: 1.12.2 + object-keys: 1.1.1 + object.assign: 4.1.2 + regexp.prototype.flags: 1.4.3 + string.prototype.trimend: 1.0.5 + string.prototype.trimstart: 1.0.5 + unbox-primitive: 1.0.2 + dev: true + + /es-shim-unscopables/1.0.0: + resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} + dependencies: + has: 1.0.3 + dev: true + + /es-to-primitive/1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.4 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + dev: true + /es6-error/4.1.1: resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} dev: true @@ -1588,7 +1892,7 @@ packages: dev: true /escape-string-regexp/1.0.5: - resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} dev: true @@ -1597,20 +1901,235 @@ packages: engines: {node: '>=10'} dev: true - /eslint-plugin-jsdoc/30.7.13_eslint@7.32.0: - resolution: {integrity: sha512-YM4WIsmurrp0rHX6XiXQppqKB8Ne5ATiZLJe2+/fkp9l9ExXFr43BbAbjZaVrpCT+tuPYOZ8k1MICARHnURUNQ==} - engines: {node: '>=10'} + /eslint-import-resolver-node/0.3.6: + resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==} + dependencies: + debug: 3.2.7 + resolve: 1.22.0 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-module-utils/2.7.3_cfsupm63rr3qvqifljk6nmy67u: + resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} + engines: {node: '>=4'} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 + '@typescript-eslint/parser': '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true dependencies: - comment-parser: 0.7.6 - debug: 4.3.3 - eslint: 7.32.0 - jsdoctypeparser: 9.0.0 + '@typescript-eslint/parser': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + debug: 3.2.7 + eslint-import-resolver-node: 0.3.6 + find-up: 2.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-antfu/0.25.1_pn4c2euezwjqh4cpvwz4zteq6u: + resolution: {integrity: sha512-xZrk0BIHZFfrUkr2Ff1uZdnzTmCM6ZQccOxpn7/IKfUENe16sSMuZ8YHKaVrUSAMIPoUOFKG2Qpu2UxwIRTd9w==} + dependencies: + '@typescript-eslint/utils': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + + /eslint-plugin-es/4.1.0_eslint@8.17.0: + resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} + engines: {node: '>=8.10.0'} + peerDependencies: + eslint: '>=4.19.1' + dependencies: + eslint: 8.17.0 + eslint-utils: 2.1.0 + regexpp: 3.2.0 + dev: true + + /eslint-plugin-eslint-comments/3.2.0_eslint@8.17.0: + resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} + engines: {node: '>=6.5.0'} + peerDependencies: + eslint: '>=4.19.1' + dependencies: + escape-string-regexp: 1.0.5 + eslint: 8.17.0 + ignore: 5.2.0 + dev: true + + /eslint-plugin-html/6.2.0: + resolution: {integrity: sha512-vi3NW0E8AJombTvt8beMwkL1R/fdRWl4QSNRNMhVQKWm36/X0KF0unGNAY4mqUF06mnwVWZcIcerrCnfn9025g==} + dependencies: + htmlparser2: 7.2.0 + dev: true + + /eslint-plugin-import/2.26.0_wyrfqmvemfacbroyi3ypviy7f4: + resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + dependencies: + '@typescript-eslint/parser': 5.28.0_pn4c2euezwjqh4cpvwz4zteq6u + array-includes: 3.1.5 + array.prototype.flat: 1.3.0 + debug: 2.6.9 + doctrine: 2.1.0 + eslint: 8.17.0 + eslint-import-resolver-node: 0.3.6 + eslint-module-utils: 2.7.3_cfsupm63rr3qvqifljk6nmy67u + has: 1.0.3 + is-core-module: 2.9.0 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.values: 1.1.5 + resolve: 1.22.0 + tsconfig-paths: 3.14.1 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + + /eslint-plugin-jsonc/2.3.0_eslint@8.17.0: + resolution: {integrity: sha512-QqHj7Chw8vsALsCOhFxecRIepxpbcpmMon9yA1+GaYk1Am0GanHAwnTkeVX+/ysAb4QTkeGMZ+ZPK4TKrZ/VSw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + eslint: 8.17.0 + eslint-utils: 3.0.0_eslint@8.17.0 + jsonc-eslint-parser: 2.1.0 + natural-compare: 1.4.0 + dev: true + + /eslint-plugin-markdown/2.2.1_eslint@8.17.0: + resolution: {integrity: sha512-FgWp4iyYvTFxPwfbxofTvXxgzPsDuSKHQy2S+a8Ve6savbujey+lgrFFbXQA0HPygISpRYWYBjooPzhYSF81iA==} + engines: {node: ^8.10.0 || ^10.12.0 || >= 12.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + eslint: 8.17.0 + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-n/15.2.2_eslint@8.17.0: + resolution: {integrity: sha512-MLjZVAv4TiCIoXqjibNqCJjLkGHfrOY3XZ0ZBLoW0OnS3o98PUBnzB/kfp8dCz/4A4Y18jjX50PRnqI4ACFY1Q==} + engines: {node: '>=12.22.0'} + peerDependencies: + eslint: '>=7.0.0' + dependencies: + builtins: 5.0.1 + eslint: 8.17.0 + eslint-plugin-es: 4.1.0_eslint@8.17.0 + eslint-utils: 3.0.0_eslint@8.17.0 + ignore: 5.2.0 + is-core-module: 2.9.0 + minimatch: 3.1.2 + resolve: 1.20.0 + semver: 7.3.7 + dev: true + + /eslint-plugin-promise/6.0.0_eslint@8.17.0: + resolution: {integrity: sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.17.0 + dev: true + + /eslint-plugin-react/7.30.0_eslint@8.17.0: + resolution: {integrity: sha512-RgwH7hjW48BleKsYyHK5vUAvxtE9SMPDKmcPRQgtRCYaZA0XQPt5FSkrU3nhz5ifzMZcA8opwmRJ2cmOO8tr5A==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + dependencies: + array-includes: 3.1.5 + array.prototype.flatmap: 1.3.0 + doctrine: 2.1.0 + eslint: 8.17.0 + estraverse: 5.3.0 + jsx-ast-utils: 3.3.0 + minimatch: 3.1.2 + object.entries: 1.1.5 + object.fromentries: 2.0.5 + object.hasown: 1.1.1 + object.values: 1.1.5 + prop-types: 15.8.1 + resolve: 2.0.0-next.3 + semver: 6.3.0 + string.prototype.matchall: 4.0.7 + dev: true + + /eslint-plugin-unicorn/42.0.0_eslint@8.17.0: + resolution: {integrity: sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg==} + engines: {node: '>=12'} + peerDependencies: + eslint: '>=8.8.0' + dependencies: + '@babel/helper-validator-identifier': 7.15.7 + ci-info: 3.3.2 + clean-regexp: 1.0.0 + eslint: 8.17.0 + eslint-utils: 3.0.0_eslint@8.17.0 + esquery: 1.4.0 + indent-string: 4.0.0 + is-builtin-module: 3.1.0 lodash: 4.17.21 - regextras: 0.7.1 - semver: 7.3.5 - spdx-expression-parse: 3.0.1 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.24 + safe-regex: 2.1.1 + semver: 7.3.7 + strip-indent: 3.0.0 + dev: true + + /eslint-plugin-vue/9.1.1_eslint@8.17.0: + resolution: {integrity: sha512-W9n5PB1X2jzC7CK6riG0oAcxjmKrjTF6+keL1rni8n57DZeilx/Fulz+IRJK3lYseLNAygN0I62L7DvioW40Tw==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.17.0 + eslint-utils: 3.0.0_eslint@8.17.0 + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.0.10 + semver: 7.3.7 + vue-eslint-parser: 9.0.2_eslint@8.17.0 + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-yml/1.0.0_eslint@8.17.0: + resolution: {integrity: sha512-0RVoUFh5vpznE2DIP5agSpWO/nU8GgAWwoTAHWopU2X+1SCB5ykHU6DwS0GrZ5Hvejtk6CcADQllpQQJB4C5QA==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.17.0 + lodash: 4.17.21 + natural-compare: 1.4.0 + yaml-eslint-parser: 1.0.1 transitivePeerDependencies: - supports-color dev: true @@ -1623,6 +2142,14 @@ packages: estraverse: 4.3.0 dev: true + /eslint-scope/7.1.1: + resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + /eslint-utils/2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} engines: {node: '>=6'} @@ -1630,6 +2157,16 @@ packages: eslint-visitor-keys: 1.3.0 dev: true + /eslint-utils/3.0.0_eslint@8.17.0: + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.17.0 + eslint-visitor-keys: 2.1.0 + dev: true + /eslint-visitor-keys/1.3.0: resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} engines: {node: '>=4'} @@ -1640,49 +2177,49 @@ packages: engines: {node: '>=10'} dev: true - /eslint/7.32.0: - resolution: {integrity: sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==} - engines: {node: ^10.12.0 || >=12.0.0} + /eslint-visitor-keys/3.3.0: + resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint/8.17.0: + resolution: {integrity: sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@babel/code-frame': 7.12.11 - '@eslint/eslintrc': 0.4.3 - '@humanwhocodes/config-array': 0.5.0 + '@eslint/eslintrc': 1.3.0 + '@humanwhocodes/config-array': 0.9.5 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.3 + debug: 4.3.4 doctrine: 3.0.0 - enquirer: 2.3.6 escape-string-regexp: 4.0.0 - eslint-scope: 5.1.1 - eslint-utils: 2.1.0 - eslint-visitor-keys: 2.1.0 - espree: 7.3.1 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.17.0 + eslint-visitor-keys: 3.3.0 + espree: 9.3.2 esquery: 1.4.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 functional-red-black-tree: 1.0.1 - glob-parent: 5.1.2 - globals: 13.12.0 - ignore: 4.0.6 + glob-parent: 6.0.2 + globals: 13.15.0 + ignore: 5.2.0 import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 - js-yaml: 3.14.1 + js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 - minimatch: 3.0.4 + minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.1 - progress: 2.0.3 regexpp: 3.2.0 - semver: 7.3.5 strip-ansi: 6.0.1 strip-json-comments: 3.1.1 - table: 6.7.5 text-table: 0.2.0 v8-compile-cache: 2.3.0 transitivePeerDependencies: @@ -1699,13 +2236,13 @@ packages: esbuild-register: 3.3.1_esbuild@0.12.29 dev: true - /espree/7.3.1: - resolution: {integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==} - engines: {node: ^10.12.0 || >=12.0.0} + /espree/9.3.2: + resolution: {integrity: sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 7.4.1 - acorn-jsx: 5.3.2_acorn@7.4.1 - eslint-visitor-keys: 1.3.0 + acorn: 8.7.1 + acorn-jsx: 5.3.2_acorn@8.7.1 + eslint-visitor-keys: 3.3.0 dev: true /esprima/4.0.1: @@ -1798,6 +2335,17 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true + /fast-glob/3.2.11: + resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.4 + dev: true + /fast-glob/3.2.7: resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==} engines: {node: '>=8'} @@ -1813,7 +2361,7 @@ packages: dev: true /fast-levenshtein/2.0.6: - resolution: {integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=} + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true /fastq/1.13.0: @@ -1856,13 +2404,20 @@ packages: dev: true /find-up/1.1.2: - resolution: {integrity: sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=} + resolution: {integrity: sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==} engines: {node: '>=0.10.0'} dependencies: path-exists: 2.1.0 pinkie-promise: 2.0.1 dev: true + /find-up/2.1.0: + resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} + engines: {node: '>=4'} + dependencies: + locate-path: 2.0.0 + dev: true + /find-up/3.0.0: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} engines: {node: '>=6'} @@ -1931,8 +2486,22 @@ packages: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true + /function.prototype.name/1.1.5: + resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + functions-have-names: 1.2.3 + dev: true + /functional-red-black-tree/1.0.1: - resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=} + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + dev: true + + /functions-have-names/1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true /gensync/1.0.0-beta.2: @@ -1949,6 +2518,14 @@ packages: resolution: {integrity: sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=} dev: true + /get-intrinsic/1.1.2: + resolution: {integrity: sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-symbols: 1.0.3 + dev: true + /get-package-type/0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} @@ -1969,6 +2546,14 @@ packages: engines: {node: '>=10'} dev: true + /get-symbol-description/1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.1.2 + dev: true + /giturl/1.0.1: resolution: {integrity: sha512-wQourBdI13n8tbjcZTDl6k+ZrCRMU6p9vfp9jknZq+zfWc8xXNztpZFM4XkPHVzHcMSUZxEMYYKZjIGkPlei6Q==} engines: {node: '>= 0.10.0'} @@ -1980,12 +2565,19 @@ packages: dependencies: is-glob: 4.0.3 + /glob-parent/6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true + /glob/6.0.4: resolution: {integrity: sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=} dependencies: inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: true @@ -1996,7 +2588,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: true @@ -2007,7 +2599,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: true @@ -2044,8 +2636,8 @@ packages: engines: {node: '>=4'} dev: true - /globals/13.12.0: - resolution: {integrity: sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==} + /globals/13.15.0: + resolution: {integrity: sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -2062,6 +2654,18 @@ packages: merge2: 1.4.1 slash: 3.0.0 + /globby/11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.11 + ignore: 5.2.0 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + /globby/4.1.0: resolution: {integrity: sha1-CA9UVJ7BuCpsYOYx/ILhIR2+lfg=} engines: {node: '>=0.10.0'} @@ -2109,8 +2713,12 @@ packages: ansi-regex: 2.1.1 dev: true + /has-bigints/1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: true + /has-flag/3.0.0: - resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=} + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} dev: true @@ -2118,6 +2726,24 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + /has-property-descriptors/1.0.0: + resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + dependencies: + get-intrinsic: 1.1.2 + dev: true + + /has-symbols/1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: true + + /has-tostringtag/1.0.0: + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + /has/1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} @@ -2161,16 +2787,20 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true + /htmlparser2/7.2.0: + resolution: {integrity: sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==} + dependencies: + domelementtype: 2.3.0 + domhandler: 4.3.1 + domutils: 2.8.0 + entities: 3.0.1 + dev: true + /human-signals/2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} dev: true - /ignore/4.0.6: - resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} - engines: {node: '>= 4'} - dev: true - /ignore/5.2.0: resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} engines: {node: '>= 4'} @@ -2203,12 +2833,12 @@ packages: dev: true /imurmurhash/0.1.4: - resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=} + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} dev: true /indent-string/2.1.0: - resolution: {integrity: sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=} + resolution: {integrity: sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg==} engines: {node: '>=0.10.0'} dependencies: repeating: 2.0.1 @@ -2252,8 +2882,34 @@ packages: through: 2.3.8 dev: true + /internal-slot/1.0.3: + resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.1.2 + has: 1.0.3 + side-channel: 1.0.4 + dev: true + + /is-alphabetical/1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + dev: true + + /is-alphanumerical/1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + dev: true + /is-arrayish/0.2.1: - resolution: {integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=} + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + dev: true + + /is-bigint/1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + dependencies: + has-bigints: 1.0.2 dev: true /is-binary-path/2.1.0: @@ -2263,6 +2919,26 @@ packages: binary-extensions: 2.2.0 dev: true + /is-boolean-object/1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-builtin-module/3.1.0: + resolution: {integrity: sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.2.0 + dev: true + + /is-callable/1.2.4: + resolution: {integrity: sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==} + engines: {node: '>= 0.4'} + dev: true + /is-ci/1.2.1: resolution: {integrity: sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==} hasBin: true @@ -2270,18 +2946,29 @@ packages: ci-info: 1.6.0 dev: true - /is-core-module/2.8.0: - resolution: {integrity: sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==} + /is-core-module/2.9.0: + resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==} dependencies: has: 1.0.3 dev: true + /is-date-object/1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-decimal/1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + dev: true + /is-es2016-keyword/1.0.0: resolution: {integrity: sha1-9uVOEQxeT40mXmnS7Q6vjPX0dxg=} dev: true /is-extglob/2.1.1: - resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} /is-finite/1.1.0: @@ -2312,6 +2999,10 @@ packages: dependencies: is-extglob: 2.1.1 + /is-hexadecimal/1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + dev: true + /is-installed-globally/0.1.0: resolution: {integrity: sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=} engines: {node: '>=4'} @@ -2320,11 +3011,23 @@ packages: is-path-inside: 1.0.1 dev: true + /is-negative-zero/2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} + dev: true + /is-npm/1.0.0: resolution: {integrity: sha1-8vtjpl5JBbQGyGBydloaTceTufQ=} engines: {node: '>=0.10.0'} dev: true + /is-number-object/1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + /is-number/7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -2351,11 +3054,25 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-regex/1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + /is-retry-allowed/1.2.0: resolution: {integrity: sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==} engines: {node: '>=0.10.0'} dev: true + /is-shared-array-buffer/1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + dependencies: + call-bind: 1.0.2 + dev: true + /is-stream/1.1.0: resolution: {integrity: sha1-EtSj3U5o4Lec6428hBc66A2RykQ=} engines: {node: '>=0.10.0'} @@ -2366,6 +3083,20 @@ packages: engines: {node: '>=8'} dev: true + /is-string/1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-symbol/1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + /is-typedarray/1.0.0: resolution: {integrity: sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=} dev: true @@ -2379,13 +3110,19 @@ packages: resolution: {integrity: sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=} dev: true + /is-weakref/1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.2 + dev: true + /is-windows/1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} dev: true /isexe/2.0.0: - resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} /istanbul-lib-coverage/3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} @@ -2437,7 +3174,7 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.3 + debug: 4.3.4 istanbul-lib-coverage: 3.2.0 source-map: 0.6.1 transitivePeerDependencies: @@ -2458,7 +3195,7 @@ packages: dev: true /js-tokens/3.0.2: - resolution: {integrity: sha1-mGbfOVECEw449/mWvOtlRDIJwls=} + resolution: {integrity: sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==} dev: true /js-tokens/4.0.0: @@ -2480,10 +3217,11 @@ packages: argparse: 2.0.1 dev: true - /jsdoctypeparser/9.0.0: - resolution: {integrity: sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==} - engines: {node: '>=10'} + /js-yaml/4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + dependencies: + argparse: 2.0.1 dev: true /jsesc/2.5.2: @@ -2492,16 +3230,23 @@ packages: hasBin: true dev: true + /json-parse-even-better-errors/2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + dev: true + /json-schema-traverse/0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true - /json-schema-traverse/1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + /json-stable-stringify-without-jsonify/1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true - /json-stable-stringify-without-jsonify/1.0.1: - resolution: {integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=} + /json5/1.0.1: + resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} + hasBin: true + dependencies: + minimist: 1.2.6 dev: true /json5/2.2.0: @@ -2509,7 +3254,25 @@ packages: engines: {node: '>=6'} hasBin: true dependencies: - minimist: 1.2.5 + minimist: 1.2.6 + dev: true + + /jsonc-eslint-parser/2.1.0: + resolution: {integrity: sha512-qCRJWlbP2v6HbmKW7R3lFbeiVWHo+oMJ0j+MizwvauqnCV/EvtAeEeuCgoc/ErtsuoKgYB8U4Ih8AxJbXoE6/g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.7.1 + eslint-visitor-keys: 3.3.0 + espree: 9.3.2 + semver: 7.3.7 + dev: true + + /jsx-ast-utils/3.3.0: + resolution: {integrity: sha512-XzO9luP6L0xkxwhIJMTJQpZo/eeN60K08jHdexfD569AGxeNug6UketeHXEhROoM8aR7EcUoOQmIhcJQjcuq8Q==} + engines: {node: '>=4.0'} + dependencies: + array-includes: 3.1.5 + object.assign: 4.1.2 dev: true /kleur/3.0.3: @@ -2562,6 +3325,14 @@ packages: strip-bom: 3.0.0 dev: true + /locate-path/2.0.0: + resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} + engines: {node: '>=4'} + dependencies: + p-locate: 2.0.0 + path-exists: 3.0.0 + dev: true + /locate-path/3.0.0: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} @@ -2592,10 +3363,6 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true - /lodash.truncate/4.4.2: - resolution: {integrity: sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=} - dev: true - /lodash/4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true @@ -2615,6 +3382,13 @@ packages: is-unicode-supported: 0.1.0 dev: true + /loose-envify/1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + dependencies: + js-tokens: 4.0.0 + dev: true + /loud-rejection/1.6.0: resolution: {integrity: sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=} engines: {node: '>=0.10.0'} @@ -2660,6 +3434,22 @@ packages: engines: {node: '>=0.10.0'} dev: true + /mdast-util-from-markdown/0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + dependencies: + '@types/mdast': 3.0.10 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-to-string/2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + dev: true + /meow/3.7.0: resolution: {integrity: sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=} engines: {node: '>=0.10.0'} @@ -2668,7 +3458,7 @@ packages: decamelize: 1.2.0 loud-rejection: 1.6.0 map-obj: 1.0.1 - minimist: 1.2.5 + minimist: 1.2.6 normalize-package-data: 2.5.0 object-assign: 4.1.1 read-pkg-up: 1.0.1 @@ -2684,6 +3474,15 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + /micromark/2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + dependencies: + debug: 4.3.4 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /micromatch/4.0.4: resolution: {integrity: sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==} engines: {node: '>=8.6'} @@ -2696,14 +3495,25 @@ packages: engines: {node: '>=6'} dev: true + /min-indent/1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: true + /minimatch/3.0.4: resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} dependencies: brace-expansion: 1.1.11 dev: true - /minimist/1.2.5: - resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} + /minimatch/3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimist/1.2.6: + resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} dev: true /mocha/8.4.0: @@ -2738,6 +3548,10 @@ packages: yargs-unparser: 2.0.0 dev: true + /ms/2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + dev: true + /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true @@ -2765,7 +3579,7 @@ packages: dev: true /natural-compare/1.4.0: - resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=} + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true /node-emoji/1.11.0: @@ -2795,7 +3609,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.20.0 + resolve: 1.22.0 semver: 5.7.1 validate-npm-package-license: 3.0.4 dev: true @@ -2861,6 +3675,12 @@ packages: path-key: 3.1.1 dev: true + /nth-check/2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + dependencies: + boolbase: 1.0.0 + dev: true + /number-is-nan/1.0.1: resolution: {integrity: sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=} engines: {node: '>=0.10.0'} @@ -2903,10 +3723,63 @@ packages: dev: true /object-assign/4.1.1: - resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} dev: true + /object-inspect/1.12.2: + resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} + dev: true + + /object-keys/1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: true + + /object.assign/4.1.2: + resolution: {integrity: sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: true + + /object.entries/1.1.5: + resolution: {integrity: sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + dev: true + + /object.fromentries/2.0.5: + resolution: {integrity: sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + dev: true + + /object.hasown/1.1.1: + resolution: {integrity: sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==} + dependencies: + define-properties: 1.1.4 + es-abstract: 1.20.1 + dev: true + + /object.values/1.1.5: + resolution: {integrity: sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + dev: true + /once/1.4.0: resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} dependencies: @@ -2952,6 +3825,13 @@ packages: engines: {node: '>=4'} dev: true + /p-limit/1.3.0: + resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} + engines: {node: '>=4'} + dependencies: + p-try: 1.0.0 + dev: true + /p-limit/2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -2966,6 +3846,13 @@ packages: yocto-queue: 0.1.0 dev: true + /p-locate/2.0.0: + resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} + engines: {node: '>=4'} + dependencies: + p-limit: 1.3.0 + dev: true + /p-locate/3.0.0: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} @@ -2994,6 +3881,11 @@ packages: aggregate-error: 3.1.0 dev: true + /p-try/1.0.0: + resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} + engines: {node: '>=4'} + dev: true + /p-try/2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -3026,13 +3918,34 @@ packages: callsites: 3.1.0 dev: true + /parse-entities/2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + dev: true + /parse-json/2.2.0: - resolution: {integrity: sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=} + resolution: {integrity: sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==} engines: {node: '>=0.10.0'} dependencies: error-ex: 1.3.2 dev: true + /parse-json/5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + dependencies: + '@babel/code-frame': 7.16.0 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + dev: true + /parse-passwd/1.0.0: resolution: {integrity: sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=} engines: {node: '>=0.10.0'} @@ -3046,7 +3959,7 @@ packages: dev: true /path-exists/3.0.0: - resolution: {integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=} + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} dev: true @@ -3065,12 +3978,12 @@ packages: dev: true /path-key/1.0.0: - resolution: {integrity: sha1-XVPVeAGWRsDWiADbThRua9wqx68=} + resolution: {integrity: sha512-T3hWy7tyXlk3QvPFnT+o2tmXRzU4GkitkUWLp/WZ0S/FXd7XMx176tRurgTvHTNMJOQzTcesHNpBqetH86mQ9g==} engines: {node: '>=0.10.0'} dev: true /path-key/2.0.1: - resolution: {integrity: sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=} + resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} engines: {node: '>=4'} dev: true @@ -3083,7 +3996,7 @@ packages: dev: true /path-type/1.1.0: - resolution: {integrity: sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=} + resolution: {integrity: sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==} engines: {node: '>=0.10.0'} dependencies: graceful-fs: 4.2.8 @@ -3154,6 +4067,11 @@ packages: semver-compare: 1.0.0 dev: true + /pluralize/8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + dev: true + /postcss-load-config/3.1.0: resolution: {integrity: sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==} engines: {node: '>= 10'} @@ -3168,6 +4086,14 @@ packages: yaml: 1.10.2 dev: true + /postcss-selector-parser/6.0.10: + resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + /preferred-pm/1.0.1: resolution: {integrity: sha512-9Uxgin5Xnsl67DBvlNFsmDIlBuG9/XKK2cVBTj//7/7wW6ZY+IC9/GlLqxyHABpoasAsJ1MARFOdYPxMUtndxA==} engines: {node: '>=4'} @@ -3193,11 +4119,6 @@ packages: fromentries: 1.3.2 dev: true - /progress/2.0.3: - resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} - engines: {node: '>=0.4.0'} - dev: true - /prompts/2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -3206,6 +4127,14 @@ packages: sisteransi: 1.0.5 dev: false + /prop-types/15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.13.1 + dev: true + /pseudomap/1.0.2: resolution: {integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM=} dev: true @@ -3230,20 +4159,33 @@ packages: dependencies: deep-extend: 0.6.0 ini: 1.3.8 - minimist: 1.2.5 + minimist: 1.2.6 strip-json-comments: 2.0.1 dev: true + /react-is/16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + dev: true + /read-pkg-up/1.0.1: - resolution: {integrity: sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=} + resolution: {integrity: sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==} engines: {node: '>=0.10.0'} dependencies: find-up: 1.1.2 read-pkg: 1.1.0 dev: true + /read-pkg-up/7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + dev: true + /read-pkg/1.1.0: - resolution: {integrity: sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=} + resolution: {integrity: sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==} engines: {node: '>=0.10.0'} dependencies: load-json-file: 1.1.0 @@ -3251,6 +4193,16 @@ packages: path-type: 1.1.0 dev: true + /read-pkg/5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + dependencies: + '@types/normalize-package-data': 2.4.1 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + dev: true + /readdirp/3.5.0: resolution: {integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==} engines: {node: '>=8.10.0'} @@ -3285,16 +4237,25 @@ packages: resolution: {integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==} dev: true + /regexp-tree/0.1.24: + resolution: {integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==} + hasBin: true + dev: true + + /regexp.prototype.flags/1.4.3: + resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + functions-have-names: 1.2.3 + dev: true + /regexpp/3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} dev: true - /regextras/0.7.1: - resolution: {integrity: sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==} - engines: {node: '>=0.1.14'} - dev: true - /registry-auth-token/3.4.0: resolution: {integrity: sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==} dependencies: @@ -3328,11 +4289,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /require-from-string/2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - dev: true - /require-main-filename/2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} dev: true @@ -3362,7 +4318,23 @@ packages: /resolve/1.20.0: resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==} dependencies: - is-core-module: 2.8.0 + is-core-module: 2.9.0 + path-parse: 1.0.7 + dev: true + + /resolve/1.22.0: + resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} + hasBin: true + dependencies: + is-core-module: 2.9.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /resolve/2.0.0-next.3: + resolution: {integrity: sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==} + dependencies: + is-core-module: 2.9.0 path-parse: 1.0.7 dev: true @@ -3423,6 +4395,12 @@ packages: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true + /safe-regex/2.1.1: + resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} + dependencies: + regexp-tree: 0.1.24 + dev: true + /semver-compare/1.0.0: resolution: {integrity: sha1-De4hahyUGrN+nvsXiPavxf9VN/w=} dev: true @@ -3450,6 +4428,15 @@ packages: hasBin: true dependencies: lru-cache: 6.0.0 + dev: false + + /semver/7.3.7: + resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true /serialize-javascript/5.0.1: resolution: {integrity: sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==} @@ -3462,7 +4449,7 @@ packages: dev: true /shebang-command/1.2.0: - resolution: {integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=} + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} dependencies: shebang-regex: 1.0.0 @@ -3475,7 +4462,7 @@ packages: shebang-regex: 3.0.0 /shebang-regex/1.0.0: - resolution: {integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=} + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} engines: {node: '>=0.10.0'} dev: true @@ -3483,6 +4470,14 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + /side-channel/1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.1.2 + object-inspect: 1.12.2 + dev: true + /signal-exit/3.0.6: resolution: {integrity: sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==} dev: true @@ -3495,15 +4490,6 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - /slice-ansi/4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - dev: true - /source-map/0.5.7: resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=} engines: {node: '>=0.10.0'} @@ -3600,15 +4586,44 @@ packages: strip-ansi: 6.0.1 dev: true + /string.prototype.matchall/4.0.7: + resolution: {integrity: sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + get-intrinsic: 1.1.2 + has-symbols: 1.0.3 + internal-slot: 1.0.3 + regexp.prototype.flags: 1.4.3 + side-channel: 1.0.4 + dev: true + + /string.prototype.trimend/1.0.5: + resolution: {integrity: sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + dev: true + + /string.prototype.trimstart/1.0.5: + resolution: {integrity: sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.1 + dev: true + /strip-ansi/3.0.1: - resolution: {integrity: sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=} + resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} engines: {node: '>=0.10.0'} dependencies: ansi-regex: 2.1.1 dev: true /strip-ansi/4.0.0: - resolution: {integrity: sha1-qEeQIusaw2iocTibY1JixQXuNo8=} + resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} engines: {node: '>=4'} dependencies: ansi-regex: 3.0.0 @@ -3629,14 +4644,14 @@ packages: dev: true /strip-bom/2.0.0: - resolution: {integrity: sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=} + resolution: {integrity: sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==} engines: {node: '>=0.10.0'} dependencies: is-utf8: 0.2.1 dev: true /strip-bom/3.0.0: - resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=} + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} dev: true @@ -3656,15 +4671,22 @@ packages: dev: true /strip-indent/1.0.1: - resolution: {integrity: sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=} + resolution: {integrity: sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA==} engines: {node: '>=0.10.0'} hasBin: true dependencies: get-stdin: 4.0.1 dev: true + /strip-indent/3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + /strip-json-comments/2.0.1: - resolution: {integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo=} + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} dev: true @@ -3687,7 +4709,7 @@ packages: dev: true /supports-color/2.0.0: - resolution: {integrity: sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=} + resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} engines: {node: '>=0.8.0'} dev: true @@ -3711,15 +4733,9 @@ packages: has-flag: 4.0.0 dev: true - /table/6.7.5: - resolution: {integrity: sha512-LFNeryOqiQHqCVKzhkymKwt6ozeRhlm8IL1mE8rNUurkir4heF6PzMyRgaTa4tlyPTGGgXuvVOF/OLWiH09Lqw==} - engines: {node: '>=10.0.0'} - dependencies: - ajv: 8.8.2 - lodash.truncate: 4.4.2 - slice-ansi: 4.0.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 + /supports-preserve-symlinks-flag/1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} dev: true /term-size/1.2.0: @@ -3735,11 +4751,11 @@ packages: dependencies: '@istanbuljs/schema': 0.1.3 glob: 7.2.0 - minimatch: 3.0.4 + minimatch: 3.1.2 dev: true /text-table/0.2.0: - resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=} + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true /thenify-all/1.6.0: @@ -3793,6 +4809,15 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true + /tsconfig-paths/3.14.1: + resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==} + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.1 + minimist: 1.2.6 + strip-bom: 3.0.0 + dev: true + /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -3852,6 +4877,11 @@ packages: engines: {node: '>=10'} dev: true + /type-fest/0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + dev: true + /type-fest/0.8.1: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} @@ -3869,6 +4899,15 @@ packages: hasBin: true dev: true + /unbox-primitive/1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + dependencies: + call-bind: 1.0.2 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + dev: true + /unique-string/1.0.0: resolution: {integrity: sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=} engines: {node: '>=4'} @@ -3876,6 +4915,12 @@ packages: crypto-random-string: 1.0.0 dev: true + /unist-util-stringify-position/2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + dependencies: + '@types/unist': 2.0.6 + dev: true + /unzip-response/2.0.1: resolution: {integrity: sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=} engines: {node: '>=4'} @@ -3910,6 +4955,10 @@ packages: prepend-http: 1.0.4 dev: true + /util-deprecate/1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + /uuid/3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. @@ -3927,6 +4976,24 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /vue-eslint-parser/9.0.2_eslint@8.17.0: + resolution: {integrity: sha512-uCPQwTGjOtAYrwnU+76pYxalhjsh7iFBsHwBqDHiOPTxtICDaraO4Szw54WFTNZTAEsgHHzqFOu1mmnBOBRzDA==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.17.0 + eslint-scope: 7.1.1 + eslint-visitor-keys: 3.3.0 + espree: 9.3.2 + esquery: 1.4.0 + lodash: 4.17.21 + semver: 7.3.7 + transitivePeerDependencies: + - supports-color + dev: true + /vue-template-compiler/2.6.14: resolution: {integrity: sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==} dependencies: @@ -3939,6 +5006,16 @@ packages: engines: {node: '>=6.0.0'} dev: true + /which-boxed-primitive/1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + dev: true + /which-module/2.0.0: resolution: {integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=} dev: true @@ -4040,6 +5117,11 @@ packages: engines: {node: '>=4'} dev: true + /xml-name-validator/4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + dev: true + /xtend/4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -4055,17 +5137,31 @@ packages: dev: true /yallist/2.1.2: - resolution: {integrity: sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=} + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} dev: true /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + /yaml-eslint-parser/1.0.1: + resolution: {integrity: sha512-acQYWneSXwnJgPQbTyJvDxWx9zlJ/rq267p/zzQMSCE7ljJxQ8elefsQase1gEIJMo+pIqmLRczoo7fPt6VbKQ==} + engines: {node: ^14.17.0 || >=16.0.0} + dependencies: + eslint-visitor-keys: 3.3.0 + lodash: 4.17.21 + yaml: 2.1.1 + dev: true + /yaml/1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} dev: true + /yaml/2.1.1: + resolution: {integrity: sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==} + engines: {node: '>= 14'} + dev: true + /yargs-parser/13.1.2: resolution: {integrity: sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==} dependencies: diff --git a/src/changelog.ts b/src/changelog.ts deleted file mode 100644 index 0661841..0000000 --- a/src/changelog.ts +++ /dev/null @@ -1 +0,0 @@ -import conventionalChangelog from 'conventional-changelog' diff --git a/src/cli/exit-code.ts b/src/cli/exit-code.ts index c47b961..5341f42 100644 --- a/src/cli/exit-code.ts +++ b/src/cli/exit-code.ts @@ -6,5 +6,5 @@ export enum ExitCode { Success = 0, FatalError = 1, - InvalidArgument = 9 + InvalidArgument = 9, } diff --git a/src/cli/help.ts b/src/cli/help.ts index 84db8f2..dc55a43 100644 --- a/src/cli/help.ts +++ b/src/cli/help.ts @@ -1,4 +1,4 @@ -import { version, name, description } from "../../package.json"; +import { description, name, version } from '../../package.json' /** * Text explaining how to use the CLI @@ -73,11 +73,11 @@ Examples: Sets the version number to 4.27.9934 in package.json, package-lock.json, bower.json, and all markdown files in the "docs" directory. Commits the updated files to git, and tags the commit as "Version 4.27.9934". -`; +` /** * Text describing the program and how to use it */ export const helpText = ` ${name} v${version} - ${description} -${usageText}`; +${usageText}` diff --git a/src/cli/index.ts b/src/cli/index.ts index ac47622..7b0226c 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -1,10 +1,11 @@ -import { info, success } from "log-symbols"; -import { version as packageVersion } from "../../package.json"; -import { ProgressEvent, VersionBumpProgress } from "../types/version-bump-progress"; -import { versionBump } from "../version-bump"; -import { ExitCode } from "./exit-code"; -import { helpText } from "./help"; -import { parseArgs } from "./parse-args"; +import { info, success } from 'log-symbols' +import { version as packageVersion } from '../../package.json' +import type { VersionBumpProgress } from '../types/version-bump-progress' +import { ProgressEvent } from '../types/version-bump-progress' +import { versionBump } from '../version-bump' +import { ExitCode } from './exit-code' +import { helpText } from './help' +import { parseArgs } from './parse-args' /** * The main entry point of the CLI @@ -14,71 +15,68 @@ import { parseArgs } from "./parse-args"; export async function main(args: string[]): Promise { try { // Setup global error handlers - process.on("uncaughtException", errorHandler); - process.on("unhandledRejection", errorHandler); + process.on('uncaughtException', errorHandler) + process.on('unhandledRejection', errorHandler) // Parse the command-line arguments - let { help, version, quiet, options } = parseArgs(args); + const { help, version, quiet, options } = parseArgs(args) if (help) { // Show the help text and exit - console.log(helpText); - process.exit(ExitCode.Success); + console.log(helpText) + process.exit(ExitCode.Success) } else if (version) { // Show the version number and exit - console.log(packageVersion); - process.exit(ExitCode.Success); + console.log(packageVersion) + process.exit(ExitCode.Success) } else { - if (!quiet) { - options.progress = progress; - } + if (!quiet) + options.progress = progress - await versionBump(options); + await versionBump(options) } } catch (error) { - errorHandler(error as Error); + errorHandler(error as Error) } } function progress({ event, script, updatedFiles, skippedFiles, newVersion }: VersionBumpProgress): void { switch (event) { case ProgressEvent.FileUpdated: - console.log(success, `Updated ${updatedFiles.pop()} to ${newVersion}`); - break; + console.log(success, `Updated ${updatedFiles.pop()} to ${newVersion}`) + break case ProgressEvent.FileSkipped: - console.log(info, `${skippedFiles.pop()} did not need to be updated`); - break; + console.log(info, `${skippedFiles.pop()} did not need to be updated`) + break case ProgressEvent.GitCommit: - console.log(success, "Git commit"); - break; + console.log(success, 'Git commit') + break case ProgressEvent.GitTag: - console.log(success, "Git tag"); - break; + console.log(success, 'Git tag') + break case ProgressEvent.GitPush: - console.log(success, "Git push"); - break; + console.log(success, 'Git push') + break case ProgressEvent.NpmScript: - console.log(success, `Npm run ${script}`); - break; + console.log(success, `Npm run ${script}`) + break } } - function errorHandler(error: Error): void { - let message = error.message || String(error); + let message = error.message || String(error) - if (process.env.DEBUG || process.env.NODE_ENV === "development") { - message = error.stack || message; - } + if (process.env.DEBUG || process.env.NODE_ENV === 'development') + message = error.stack || message - console.error(message); - process.exit(ExitCode.FatalError); + console.error(message) + process.exit(ExitCode.FatalError) } diff --git a/src/cli/parse-args.ts b/src/cli/parse-args.ts index 1518690..316e2d6 100644 --- a/src/cli/parse-args.ts +++ b/src/cli/parse-args.ts @@ -1,19 +1,19 @@ -import { valid as isValidVersion } from "semver"; -import { isReleaseType } from "../release-type"; -import { VersionBumpOptions } from "../types/version-bump-options"; -import { ExitCode } from "./exit-code"; -import { usageText } from "./help"; +import { valid as isValidVersion } from 'semver' import cac from 'cac' -import {version} from '../../package.json' +import { isReleaseType } from '../release-type' +import type { VersionBumpOptions } from '../types/version-bump-options' +import { version } from '../../package.json' +import { ExitCode } from './exit-code' +import { usageText } from './help' /** * The parsed command-line arguments */ export interface ParsedArgs { - help?: boolean; - version?: boolean; - quiet?: boolean; - options: VersionBumpOptions; + help?: boolean + version?: boolean + quiet?: boolean + options: VersionBumpOptions } /** @@ -21,28 +21,26 @@ export interface ParsedArgs { */ export function parseArgs(argv: string[]): ParsedArgs { try { + const cli = cac('bumpp') -const cli = cac('bumpp') + cli + .version(version) + .usage('[...files]') + .option('--preid ', 'ID for prerelease') + .option('--all', 'Include all files') + .option('-c, --commit [msg]', 'Commit message', { default: true }) + .option('-t, --tag [tag]', 'Tag name', { default: true }) + .option('-p, --push', 'Push to remote', { default: true }) + .option('--no-verify', 'Skip git verification') + .option('--ignore-scripts', 'Ignore scripts', { default: false }) + .option('-q, --quiet', 'Quiet mode') + .option('-v, --version ', 'Tagert version') + .option('-x, --execute ', 'Commands to execute after version bumps') + .help() -cli - .version(version) - .usage('[...files]') - .option('--preid ', 'ID for prerelease') - .option('--all', 'Include all files') - .option('-c, --commit [msg]', 'Commit message', {default: true}) - .option('-t, --tag [tag]', 'Tag name', {default: true}) - .option('-p, --push', 'Push to remote', {default: true}) - .option('--no-verify', 'Skip git verification') - .option('--ignore-scripts', 'Ignore scripts', {default: false}) - .option('-q, --quiet', 'Quiet mode') - .option('-v, --version ', 'Tagert version') - .option('-x, --execute ', 'Commands to execute after version bumps') - .help() + const args = cli.parse(argv).options - const args = cli.parse().options - - - let parsedArgs: ParsedArgs = { + const parsedArgs: ParsedArgs = { help: args.help as boolean, version: args.version as boolean, quiet: args.quiet as boolean, @@ -56,31 +54,29 @@ cli files: args['--'], ignoreScripts: args.ignoreScripts, execute: args.execute, - } - }; - + }, + } // If a version number or release type was specified, then it will mistakenly be added to the "files" array if (parsedArgs.options.files && parsedArgs.options.files.length > 0) { - let firstArg = parsedArgs.options.files[0]; + const firstArg = parsedArgs.options.files[0] - if (firstArg === "prompt" || isReleaseType(firstArg) || isValidVersion(firstArg)) { - parsedArgs.options.release = firstArg; - parsedArgs.options.files.shift(); + if (firstArg === 'prompt' || isReleaseType(firstArg) || isValidVersion(firstArg)) { + parsedArgs.options.release = firstArg + parsedArgs.options.files.shift() } } - - return parsedArgs; + return parsedArgs } catch (error) { // There was an error parsing the command-line args - return errorHandler(error as Error); + return errorHandler(error as Error) } } function errorHandler(error: Error): never { - console.error(error.message); - console.error(usageText); - return process.exit(ExitCode.InvalidArgument); + console.error(error.message) + console.error(usageText) + return process.exit(ExitCode.InvalidArgument) } diff --git a/src/cli/run.ts b/src/cli/run.ts index 32ad92e..85d16a4 100644 --- a/src/cli/run.ts +++ b/src/cli/run.ts @@ -1,4 +1,3 @@ -import { main } from "."; +import { main } from '.' -// eslint-disable-next-line @typescript-eslint/no-floating-promises -main(process.argv.slice(2)); +main(process.argv.slice(2)) diff --git a/src/fs.ts b/src/fs.ts index 994e7d9..a0f4180 100644 --- a/src/fs.ts +++ b/src/fs.ts @@ -1,49 +1,48 @@ -import detectIndent from "detect-indent"; -import detectNewline from "detect-newline"; -import fs from "fs"; -import path from "path"; +import fs from 'fs' +import path from 'path' +import detectIndent from 'detect-indent' +import detectNewline from 'detect-newline' /** * Describes a plain-text file. */ export interface TextFile { - path: string; - data: string; + path: string + data: string } /** * Describes a JSON file. */ interface JsonFile { - path: string; - data: unknown; - indent: string; - newline: string | undefined; + path: string + data: unknown + indent: string + newline: string | undefined } /** * Reads a JSON file and returns the parsed data. */ export async function readJsonFile(name: string, cwd: string): Promise { - let file = await readTextFile(name, cwd); - let data = JSON.parse(file.data) as unknown; - let indent = detectIndent(file.data).indent; - let newline = detectNewline(file.data); + const file = await readTextFile(name, cwd) + const data = JSON.parse(file.data) as unknown + const indent = detectIndent(file.data).indent + const newline = detectNewline(file.data) - return { ...file, data, indent, newline }; + return { ...file, data, indent, newline } } /** * Writes the given data to the specified JSON file. */ export async function writeJsonFile(file: JsonFile): Promise { - let json = JSON.stringify(file.data, undefined, file.indent); + let json = JSON.stringify(file.data, undefined, file.indent) - if (file.newline) { - json += file.newline; - } + if (file.newline) + json += file.newline - return writeTextFile({ ...file, data: json }); + return writeTextFile({ ...file, data: json }) } /** @@ -51,20 +50,20 @@ export async function writeJsonFile(file: JsonFile): Promise { */ export function readTextFile(name: string, cwd: string): Promise { return new Promise((resolve, reject) => { - let filePath = path.join(cwd, name); + const filePath = path.join(cwd, name) - fs.readFile(filePath, "utf8", (err, text) => { + fs.readFile(filePath, 'utf8', (err, text) => { if (err) { - reject(err); + reject(err) } else { resolve({ path: filePath, data: text, - }); + }) } - }); - }); + }) + }) } /** @@ -73,12 +72,11 @@ export function readTextFile(name: string, cwd: string): Promise { export function writeTextFile(file: TextFile): Promise { return new Promise((resolve, reject) => { fs.writeFile(file.path, file.data, (err) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); + if (err) + reject(err) + + else + resolve() + }) + }) } diff --git a/src/get-new-version.ts b/src/get-new-version.ts index a317073..b401513 100644 --- a/src/get-new-version.ts +++ b/src/get-new-version.ts @@ -1,33 +1,32 @@ -import { bold, green } from "chalk"; -import prompts from "prompts"; -import { valid as isValidVersion, clean as cleanVersion } from "semver"; -import semver, { ReleaseType, SemVer } from "semver"; -import { BumpRelease, PromptRelease } from "./normalize-options"; -import { Operation } from "./operation"; -import { isPrerelease, releaseTypes } from "./release-type"; +import { bold, green } from 'chalk' +import prompts from 'prompts' +import semver, { SemVer, clean as cleanVersion, valid as isValidVersion } from 'semver' +import type { BumpRelease, PromptRelease } from './normalize-options' +import type { Operation } from './operation' +import type { ReleaseType } from './release-type' +import { isPrerelease, releaseTypes } from './release-type' /** * Determines the new version number, possibly by prompting the user for it. */ export async function getNewVersion(operation: Operation): Promise { - let { release } = operation.options; - let { oldVersion } = operation.state; + const { release } = operation.options + const { oldVersion } = operation.state switch (release.type) { - case "prompt": - return promptForNewVersion(operation); + case 'prompt': + return promptForNewVersion(operation) - case "version": - let newSemVer = new SemVer(release.version, true); + case 'version': return operation.update({ - newVersion: newSemVer.version, - }); + newVersion: new SemVer(release.version, true).version, + }) default: return operation.update({ release: release.type, newVersion: getNextVersion(oldVersion, release), - }); + }) } } @@ -35,46 +34,44 @@ export async function getNewVersion(operation: Operation): Promise { * Returns the next version number of the specified type. */ function getNextVersion(oldVersion: string, bump: BumpRelease): string { - let oldSemVer = new SemVer(oldVersion); - let newSemVer = oldSemVer.inc(bump.type, bump.preid); + const oldSemVer = new SemVer(oldVersion) + const newSemVer = oldSemVer.inc(bump.type as any, bump.preid) if ( - isPrerelease(bump.type) && - newSemVer.prerelease.length === 2 && - newSemVer.prerelease[0] === bump.preid && - String(newSemVer.prerelease[1]) === "0" + isPrerelease(bump.type) + && newSemVer.prerelease.length === 2 + && newSemVer.prerelease[0] === bump.preid + && String(newSemVer.prerelease[1]) === '0' ) { // This is a special case when going from a non-prerelease version to a prerelease version. // SemVer sets the prerelease version to zero (e.g. "1.23.456" => "1.23.456-beta.0"). // But the user probably expected it to be "1.23.456-beta.1" instead. // @ts-expect-error - TypeScript thinks this array is read-only - newSemVer.prerelease[1] = "1"; - newSemVer.format(); + newSemVer.prerelease[1] = '1' + newSemVer.format() } - return newSemVer.version; + return newSemVer.version } /** * Returns the next version number for all release types. */ -function getNextVersions(oldVersion: string, preid: string): Record { - let next: Record = {}; +function getNextVersions(oldVersion: string, preid: string): Record { + const next: Record = {} - const parse = semver.parse(oldVersion); - if (typeof parse?.prerelease[0] === "string") { - preid = parse?.prerelease[0] || "preid"; - } + const parse = semver.parse(oldVersion) + if (typeof parse?.prerelease[0] === 'string') + preid = parse?.prerelease[0] || 'preid' - for (let type of releaseTypes) { - next[type] = semver.inc(oldVersion, type, preid)!; - } + for (const type of releaseTypes) + next[type] = semver.inc(oldVersion, type, preid)! next.next = parse?.prerelease?.length - ? semver.inc(oldVersion, "prerelease", preid)! - : semver.inc(oldVersion, "patch")!; + ? semver.inc(oldVersion, 'prerelease', preid)! + : semver.inc(oldVersion, 'patch')! - return next; + return next } /** @@ -83,59 +80,57 @@ function getNextVersions(oldVersion: string, preid: string): Record { - let { oldVersion } = operation.state; - let release = operation.options.release as PromptRelease; - - let next = getNextVersions(oldVersion, release.preid); + const { oldVersion } = operation.state + const release = operation.options.release as PromptRelease - let answers: { - release: ReleaseType | "none" | "custom"; - custom?: string; - }; + const next = getNextVersions(oldVersion, release.preid) - answers = await prompts([ + const answers = await prompts([ { - type: "autocomplete", - name: "release", + type: 'autocomplete', + name: 'release', message: `Current version: ${green(oldVersion)}`, - initial: "next", + initial: 'next', choices: [ - { value: "major", title: "major - " + bold(next.major) }, - { value: "minor", title: "minor - " + bold(next.minor) }, - { value: "patch", title: "patch - " + bold(next.patch) }, - { value: "next", title: "next - " + bold(next.next) }, - { value: "prerelease", title: "pre-release - " + bold(next.prerelease) }, - { value: "none", title: "as-is - " + bold(oldVersion) }, - { value: "custom", title: "custom..." }, - ] + { value: 'major', title: `major - ${bold(next.major)}` }, + { value: 'minor', title: `minor - ${bold(next.minor)}` }, + { value: 'patch', title: `patch - ${bold(next.patch)}` }, + { value: 'next', title: `next - ${bold(next.next)}` }, + { value: 'prerelease', title: `pre-release - ${bold(next.prerelease)}` }, + { value: 'none', title: `as-is - ${bold(oldVersion)}` }, + { value: 'custom', title: 'custom...' }, + ], }, { - type: (prev) => prev === "custom" ? "text" : null, - name: "custom", - message: "Enter the new version number:", + type: prev => prev === 'custom' ? 'text' : null, + name: 'custom', + message: 'Enter the new version number:', initial: oldVersion, validate: (custom: string) => { - return isValidVersion(custom) ? true : "That's not a valid version number"; + return isValidVersion(custom) ? true : 'That\'s not a valid version number' }, - } - ]); + }, + ]) as { + release: ReleaseType | 'next' | 'none' | 'custom' + custom?: string + } - const newVersion = answers.release === "none" + const newVersion = answers.release === 'none' ? oldVersion - : answers.release === "custom" + : answers.release === 'custom' ? cleanVersion(answers.custom!)! - : next[answers.release]; + : next[answers.release] - if (!newVersion) { - process.exit(1); - } + if (!newVersion) + process.exit(1) switch (answers.release) { - case "custom": - case "none": - return operation.update({ newVersion }); + case 'custom': + case 'next': + case 'none': + return operation.update({ newVersion }) default: - return operation.update({ release: answers.release, newVersion, }); + return operation.update({ release: answers.release, newVersion }) } } diff --git a/src/get-old-version.ts b/src/get-old-version.ts index ef9eaeb..eebc992 100644 --- a/src/get-old-version.ts +++ b/src/get-old-version.ts @@ -1,40 +1,39 @@ -import { valid as isValidVersion } from "semver"; -import { readJsonFile } from "./fs"; -import { isManifest } from "./manifest"; -import { Operation } from "./operation"; +import { valid as isValidVersion } from 'semver' +import { readJsonFile } from './fs' +import { isManifest } from './manifest' +import type { Operation } from './operation' /** * Finds the current version number from files such as package.json. * An error is thrown if no version number can be found. */ export async function getOldVersion(operation: Operation): Promise { - let { cwd, files } = operation.options; + const { cwd, files } = operation.options // Check all JSON files in the files list - let filesToCheck = files.filter((file) => file.endsWith(".json")); + const filesToCheck = files.filter(file => file.endsWith('.json')) // Always check package.json - if (!filesToCheck.includes("package.json")) { - filesToCheck.push("package.json"); - } + if (!filesToCheck.includes('package.json')) + filesToCheck.push('package.json') // Check each file, in order, and return the first valid version number we find - for (let file of filesToCheck) { - let version = await readVersion(file, cwd); + for (const file of filesToCheck) { + const version = await readVersion(file, cwd) if (version) { // We found the current version number! return operation.update({ oldVersionSource: file, oldVersion: version, - }); + }) } } // If we get here, then no version number was found throw new Error( - `Unable to determine the current version number. Checked ${filesToCheck.join(", ")}.` - ); + `Unable to determine the current version number. Checked ${filesToCheck.join(', ')}.`, + ) } /** @@ -44,17 +43,16 @@ export async function getOldVersion(operation: Operation): Promise { */ async function readVersion(file: string, cwd: string): Promise { try { - let { data: manifest } = await readJsonFile(file, cwd); + const { data: manifest } = await readJsonFile(file, cwd) if (isManifest(manifest)) { - if (isValidVersion(manifest.version)) { - return manifest.version; - } + if (isValidVersion(manifest.version)) + return manifest.version } } catch (error) { // Ignore errors (no such file, not valid JSON, etc.) // Just try the next file instead. - return undefined; + return undefined } } diff --git a/src/git.ts b/src/git.ts index ea6eed2..95280b4 100644 --- a/src/git.ts +++ b/src/git.ts @@ -1,89 +1,85 @@ -import * as ezSpawn from "@jsdevtools/ez-spawn"; -import { Operation } from "./operation"; -import { ProgressEvent } from "./types/version-bump-progress"; +import * as ezSpawn from '@jsdevtools/ez-spawn' +import type { Operation } from './operation' +import { ProgressEvent } from './types/version-bump-progress' /** * Commits the modififed files to Git, if the `commit` option is enabled. */ export async function gitCommit(operation: Operation): Promise { - if (!operation.options.commit) { - return operation; - } + if (!operation.options.commit) + return operation - let { all, noVerify, message } = operation.options.commit; - let { updatedFiles, newVersion } = operation.state; - let args = []; + const { all, noVerify, message } = operation.options.commit + const { updatedFiles, newVersion } = operation.state + let args = [] if (all) { // Commit ALL files, not just the ones that were bumped - args.push("--all"); + args.push('--all') } if (noVerify) { // Bypass git commit hooks - args.push("--no-verify"); + args.push('--no-verify') } // Create the commit message - let commitMessage = formatVersionString(message, newVersion); - args.push("--message", commitMessage); + const commitMessage = formatVersionString(message, newVersion) + args.push('--message', commitMessage) // Append the file names last, as variadic arguments - if (!all) { - args = args.concat(updatedFiles); - } + if (!all) + args = args.concat(updatedFiles) - await ezSpawn.async("git", ["commit", ...args]); + await ezSpawn.async('git', ['commit', ...args]) - return operation.update({ event: ProgressEvent.GitCommit, commitMessage }); + return operation.update({ event: ProgressEvent.GitCommit, commitMessage }) } /** * Tags the Git commit, if the `tag` option is enabled. */ export async function gitTag(operation: Operation): Promise { - if (!operation.options.tag) { - return operation; - } + if (!operation.options.tag) + return operation - let { commit, tag } = operation.options; - let { newVersion } = operation.state; + const { commit, tag } = operation.options + const { newVersion } = operation.state - let args = [ + const args = [ // Create an annotated tag, which is recommended for releases. // See https://git-scm.com/docs/git-tag - "--annotate", + '--annotate', // Use the same commit message for the tag - "--message", formatVersionString(commit!.message, newVersion), - ]; + '--message', formatVersionString(commit!.message, newVersion), + ] // Create the Tag name - let tagName = formatVersionString(tag.name, newVersion); - args.push(tagName); + const tagName = formatVersionString(tag.name, newVersion) + args.push(tagName) - await ezSpawn.async("git", ["tag", ...args]); + await ezSpawn.async('git', ['tag', ...args]) - return operation.update({ event: ProgressEvent.GitTag, tagName }); + return operation.update({ event: ProgressEvent.GitTag, tagName }) } /** * Pushes the Git commit and tag, if the `push` option is enabled. */ export async function gitPush(operation: Operation): Promise { - if (!operation.options.push) { - return operation; - } + if (!operation.options.push) + return operation // Push the commit - await ezSpawn.async("git", "push"); + await ezSpawn.async('git', 'push') if (operation.options.tag) { // Push the tag - await ezSpawn.async("git", ["push", "--tags"]); + await ezSpawn.async('git', ['push', '--tags']) } - return operation.update({ event: ProgressEvent.GitPush }); + return operation.update({ event: ProgressEvent.GitPush }) } /** @@ -92,10 +88,9 @@ export async function gitPush(operation: Operation): Promise { * otherwise, the version number is appended to the string. */ function formatVersionString(template: string, newVersion: string): string { - if (template.includes("%s")) { - return template.replace(/%s/g, newVersion); - } - else { - return template + newVersion; - } + if (template.includes('%s')) + return template.replace(/%s/g, newVersion) + + else + return template + newVersion } diff --git a/src/index.ts b/src/index.ts index 27dffeb..c69e050 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,11 +1,11 @@ -import { versionBump } from "./version-bump"; +import { versionBump } from './version-bump' // Exprot the external type definitions as named exports -export { ReleaseType } from "./release-type"; -export * from "./types/version-bump-options"; -export * from "./types/version-bump-results"; -export * from "./types/version-bump-progress"; +export { ReleaseType } from './release-type' +export * from './types/version-bump-options' +export * from './types/version-bump-results' +export * from './types/version-bump-progress' // Export `versionBump` as a named export and the default export -export { versionBump }; -export default versionBump; +export { versionBump } +export default versionBump diff --git a/src/manifest.ts b/src/manifest.ts index 5365bc5..1fc56ff 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -2,30 +2,29 @@ * The npm package manifest (package.json) */ export interface Manifest { - name: string; - version: string; - description: string; - [key: string]: unknown; + name: string + version: string + description: string + [key: string]: unknown } - /** * Determines whether the specified value is a package manifest. */ export function isManifest(obj: any): obj is Manifest { - return obj && - typeof obj === "object" && - isOptionalString(obj.name) && - isOptionalString(obj.version) && - isOptionalString(obj.description); + return obj + && typeof obj === 'object' + && isOptionalString(obj.name) + && isOptionalString(obj.version) + && isOptionalString(obj.description) } /** * Determines whether the specified value is a string, null, or undefined. */ function isOptionalString(value: any): value is string | undefined { - let type = typeof value; - return value === null || - type === "undefined" || - type === "string"; + const type = typeof value + return value === null + || type === 'undefined' + || type === 'string' } diff --git a/src/normalize-options.ts b/src/normalize-options.ts index bc769d8..c2dc0f8 100644 --- a/src/normalize-options.ts +++ b/src/normalize-options.ts @@ -1,62 +1,62 @@ -import globby from "globby"; -import { hasMagic } from "globby"; -import { isReleaseType, ReleaseType } from "./release-type"; -import { VersionBumpOptions } from "./types/version-bump-options"; +import globby, { hasMagic } from 'globby' +import type { ReleaseType } from './release-type' +import { isReleaseType } from './release-type' +import type { VersionBumpOptions } from './types/version-bump-options' interface Interface { - input?: NodeJS.ReadableStream | NodeJS.ReadStream | false; - output?: NodeJS.WritableStream | NodeJS.WriteStream | false; - [key: string]: unknown; + input?: NodeJS.ReadableStream | NodeJS.ReadStream | false + output?: NodeJS.WritableStream | NodeJS.WriteStream | false + [key: string]: unknown } /** * A specific version release. */ export interface VersionRelease { - type: "version"; - version: string; + type: 'version' + version: string } /** * Prompt the user for the release number. */ export interface PromptRelease { - type: "prompt"; - preid: string; + type: 'prompt' + preid: string } /** * A bump release, relative to the current version number. */ export interface BumpRelease { - type: ReleaseType; - preid: string; + type: ReleaseType + preid: string } /** * One of the possible Release types. */ -export type Release = VersionRelease | PromptRelease | BumpRelease; +export type Release = VersionRelease | PromptRelease | BumpRelease /** * Normalized and sanitized options */ export interface NormalizedOptions { - release: Release; + release: Release commit?: { - message: string; - noVerify: boolean; - all: boolean; - }; + message: string + noVerify: boolean + all: boolean + } tag?: { - name: string; - }; - push: boolean; - files: string[]; - cwd: string; - interface: Interface; - ignoreScripts: boolean; - execute?: string; + name: string + } + push: boolean + files: string[] + cwd: string + interface: Interface + ignoreScripts: boolean + execute?: string } /** @@ -64,78 +64,73 @@ export interface NormalizedOptions { */ export async function normalizeOptions(raw: VersionBumpOptions): Promise { // Set the simple properties first - let preid = typeof raw.preid === "string" ? raw.preid : "beta"; - let push = Boolean(raw.push); - let all = Boolean(raw.all); - let noVerify = Boolean(raw.noVerify); - let cwd = raw.cwd || process.cwd(); - let ignoreScripts = Boolean(raw.ignoreScripts); - let execute = raw.execute; - - let release: Release; - if (!raw.release || raw.release === "prompt") { - release = { type: "prompt", preid }; - } - else if (isReleaseType(raw.release)) { - release = { type: raw.release, preid }; - } - else { - release = { type: "version", version: raw.release }; - } + const preid = typeof raw.preid === 'string' ? raw.preid : 'beta' + const push = Boolean(raw.push) + const all = Boolean(raw.all) + const noVerify = Boolean(raw.noVerify) + const cwd = raw.cwd || process.cwd() + const ignoreScripts = Boolean(raw.ignoreScripts) + const execute = raw.execute - let tag; - if (typeof raw.tag === "string") { - tag = { name: raw.tag }; - } - else if (raw.tag) { - tag = { name: "v" }; - } + let release: Release + if (!raw.release || raw.release === 'prompt') + release = { type: 'prompt', preid } + + else if (isReleaseType(raw.release)) + release = { type: raw.release, preid } + + else + release = { type: 'version', version: raw.release } + + let tag + if (typeof raw.tag === 'string') + tag = { name: raw.tag } + + else if (raw.tag) + tag = { name: 'v' } // NOTE: This must come AFTER `tag` and `push`, because it relies on them - let commit; - if (typeof raw.commit === "string") { - commit = { all, noVerify, message: raw.commit }; - } - else if (raw.commit || tag || push) { - commit = { all, noVerify, message: "release v" }; - } + let commit + if (typeof raw.commit === 'string') + commit = { all, noVerify, message: raw.commit } + + else if (raw.commit || tag || push) + commit = { all, noVerify, message: 'release v' } - let files; + let files if (Array.isArray(raw.files) && raw.files.length > 0) { - files = await strictGlobMatches(raw.files, { cwd }); + files = await strictGlobMatches(raw.files, { cwd }) } else { // Try to find these files by default. // If they don't exist, then they will NOT be included in the `files` array. - files = await globby(["package.json", "package-lock.json"], { cwd }); + files = await globby(['package.json', 'package-lock.json'], { cwd }) } - let ui: Interface; + let ui: Interface if (raw.interface === false) { - ui = { input: false, outut: false }; + ui = { input: false, outut: false } } else if (raw.interface === true || !raw.interface) { - ui = { input: process.stdin, output: process.stdout }; + ui = { input: process.stdin, output: process.stdout } } else { - let { input, output, ...other } = raw.interface; + // eslint-disable-next-line prefer-const + let { input, output, ...other } = raw.interface - if (input === true || (input !== false && !input)) { - input = process.stdin; - } + if (input === true || (input !== false && !input)) + input = process.stdin - if (output === true || (output !== false && !output)) { - output = process.stdout; - } + if (output === true || (output !== false && !output)) + output = process.stdout - ui = { input, output, ...other }; + ui = { input, output, ...other } } - if (release.type === "prompt" && !(ui.input && ui.output)) { - throw new Error("Cannot prompt for the version number because input or output has been disabled."); - } + if (release.type === 'prompt' && !(ui.input && ui.output)) + throw new Error('Cannot prompt for the version number because input or output has been disabled.') - return { release, commit, tag, push, files, cwd, interface: ui, ignoreScripts, execute }; + return { release, commit, tag, push, files, cwd, interface: ui, ignoreScripts, execute } } /** @@ -144,17 +139,16 @@ export async function normalizeOptions(raw: VersionBumpOptions): Promise { // Match all glob patterns simultaneously - let matches = await Promise.all(files.map((file) => strictGlobMatch(file, options))); + const matches = await Promise.all(files.map(file => strictGlobMatch(file, options))) // Get all the unique files - let matchedFiles = new Set(); - for (let match of matches) { - for (let file of match) { - matchedFiles.add(file); - } + const matchedFiles = new Set() + for (const match of matches) { + for (const file of match) + matchedFiles.add(file) } - return [...matchedFiles]; + return [...matchedFiles] } /** @@ -162,17 +156,16 @@ async function strictGlobMatches(files: string[], options: object): Promise { - let matches = await globby(file, options); + const matches = await globby(file, options) if (matches.length === 0) { - if (hasMagic(file)) { - throw new Error(`Could not find any files matching "${file}".`); - } - else { - throw new Error(`Could not find file: ${file}.`); - } + if (hasMagic(file)) + throw new Error(`Could not find any files matching "${file}".`) + + else + throw new Error(`Could not find file: ${file}.`) } // Return files in a predictable order - return matches.sort(); + return matches.sort() } diff --git a/src/operation.ts b/src/operation.ts index d829603..c66a928 100644 --- a/src/operation.ts +++ b/src/operation.ts @@ -1,25 +1,26 @@ -import { NormalizedOptions, normalizeOptions } from "./normalize-options"; -import { ReleaseType } from "./release-type"; -import { VersionBumpOptions } from "./types/version-bump-options"; -import { NpmScript, ProgressEvent, VersionBumpProgress } from "./types/version-bump-progress"; -import { VersionBumpResults } from "./types/version-bump-results"; +import type { NormalizedOptions } from './normalize-options' +import { normalizeOptions } from './normalize-options' +import type { ReleaseType } from './release-type' +import type { VersionBumpOptions } from './types/version-bump-options' +import type { NpmScript, ProgressEvent, VersionBumpProgress } from './types/version-bump-progress' +import type { VersionBumpResults } from './types/version-bump-results' -type ProgressCallback = (progress: VersionBumpProgress) => void; +type ProgressCallback = (progress: VersionBumpProgress) => void interface OperationState { - release: ReleaseType | undefined; - oldVersionSource: string; - oldVersion: string; - newVersion: string; - commitMessage: string; - tagName: string; - updatedFiles: string[]; - skippedFiles: string[]; + release: ReleaseType | undefined + oldVersionSource: string + oldVersion: string + newVersion: string + commitMessage: string + tagName: string + updatedFiles: string[] + skippedFiles: string[] } interface UpdateOperationState extends Partial { - event?: ProgressEvent; - script?: NpmScript; + event?: ProgressEvent + script?: NpmScript } /** @@ -29,28 +30,28 @@ export class Operation { /** * The options for this operation. */ - public options: NormalizedOptions; + public options: NormalizedOptions /** * The current state of the operation. */ public readonly state: Readonly = { release: undefined, - oldVersion: "", - oldVersionSource: "", - newVersion: "", - commitMessage: "", - tagName: "", + oldVersion: '', + oldVersionSource: '', + newVersion: '', + commitMessage: '', + tagName: '', updatedFiles: [], skippedFiles: [], - }; + } /** * The results of the operation. */ public get results(): VersionBumpResults { - let options = this.options; - let state = this.state; + const options = this.options + const state = this.state return { release: state.release, @@ -60,20 +61,20 @@ export class Operation { tag: options.tag ? state.tagName : false, updatedFiles: state.updatedFiles.slice(), skippedFiles: state.skippedFiles.slice(), - }; + } } /** * The callback that's used to report the progress of the operation. */ - private readonly _progress?: ProgressCallback; + private readonly _progress?: ProgressCallback /** * Private constructor. Use the `Operation.start()` static method instead. */ private constructor(options: NormalizedOptions, progress?: ProgressCallback) { - this.options = options; - this._progress = progress; + this.options = options + this._progress = progress } /** @@ -81,9 +82,9 @@ export class Operation { */ public static async start(input: VersionBumpOptions): Promise { // Validate and normalize the options - let options = await normalizeOptions(input); + const options = await normalizeOptions(input) - return new Operation(options, input.progress); + return new Operation(options, input.progress) } /** @@ -91,13 +92,13 @@ export class Operation { */ public update({ event, script, ...newState }: UpdateOperationState): this { // Update the operation state - Object.assign(this.state, newState); + Object.assign(this.state, newState) if (event && this._progress) { // Report the progress to the user - this._progress({ event, script, ...this.results }); + this._progress({ event, script, ...this.results }) } - return this; + return this } } diff --git a/src/release-type.ts b/src/release-type.ts index eec8a11..c2a5578 100644 --- a/src/release-type.ts +++ b/src/release-type.ts @@ -1,28 +1,27 @@ -import { ReleaseType } from "semver"; +import { ReleaseType } from 'semver' -export { ReleaseType }; +export { ReleaseType } /** * The different types of pre-releases. */ -export const prereleaseTypes: ReleaseType[] =["premajor", "preminor", "prepatch", "prerelease"]; +export const prereleaseTypes: ReleaseType[] = ['premajor', 'preminor', 'prepatch', 'prerelease'] /** * All possible release types. */ -export const releaseTypes: ReleaseType[] = prereleaseTypes.concat(["major", "minor", "patch"]); - +export const releaseTypes: ReleaseType[] = prereleaseTypes.concat(['major', 'minor', 'patch']) /** * Determines whether the specified value is a pre-release. */ export function isPrerelease(value: any): boolean { - return prereleaseTypes.includes(value); + return prereleaseTypes.includes(value) } /** * Determines whether the specified value is a valid ReleaseType string. */ export function isReleaseType(value: any): value is ReleaseType { - return releaseTypes.includes(value); + return releaseTypes.includes(value) } diff --git a/src/run-npm-script.ts b/src/run-npm-script.ts index f1ceeb4..cb0605a 100644 --- a/src/run-npm-script.ts +++ b/src/run-npm-script.ts @@ -1,36 +1,37 @@ -import * as ezSpawn from "@jsdevtools/ez-spawn"; -import { readJsonFile } from "./fs"; -import { isManifest, Manifest } from "./manifest"; -import { Operation } from "./operation"; -import { NpmScript, ProgressEvent } from "./types/version-bump-progress"; +import * as ezSpawn from '@jsdevtools/ez-spawn' +import { readJsonFile } from './fs' +import type { Manifest } from './manifest' +import { isManifest } from './manifest' +import type { Operation } from './operation' +import type { NpmScript } from './types/version-bump-progress' +import { ProgressEvent } from './types/version-bump-progress' /** * Runs the specified NPM script in the package.json file. */ export async function runNpmScript(script: NpmScript, operation: Operation): Promise { - let { cwd, ignoreScripts } = operation.options; + const { cwd, ignoreScripts } = operation.options if (!ignoreScripts) { - let { data: manifest } = await readJsonFile("package.json", cwd); + const { data: manifest } = await readJsonFile('package.json', cwd) if (isManifest(manifest) && hasScript(manifest, script)) { - await ezSpawn.async("npm", ["run", script, "--silent"], { stdio: "inherit" }); - operation.update({ event: ProgressEvent.NpmScript, script }); + await ezSpawn.async('npm', ['run', script, '--silent'], { stdio: 'inherit' }) + operation.update({ event: ProgressEvent.NpmScript, script }) } } - return operation; + return operation } /** * Determines whether the specified NPM script exists in the given manifest. */ function hasScript(manifest: Manifest, script: NpmScript): boolean { - let scripts = manifest.scripts as Record | undefined; + const scripts = manifest.scripts as Record | undefined - if (scripts && typeof scripts === "object") { - return Boolean(scripts[script]); - } + if (scripts && typeof scripts === 'object') + return Boolean(scripts[script]) - return false; + return false } diff --git a/src/types/version-bump-options.ts b/src/types/version-bump-options.ts index eb273bc..0c70952 100644 --- a/src/types/version-bump-options.ts +++ b/src/types/version-bump-options.ts @@ -1,4 +1,4 @@ -import { VersionBumpProgress } from "./version-bump-progress"; +import type { VersionBumpProgress } from './version-bump-progress' /** * Options for the `versionBump()` function. @@ -13,14 +13,14 @@ export interface VersionBumpOptions { * * Defaults to "prompt". */ - release?: string; + release?: string /** * The prerelease type (e.g. "alpha", "beta", "next"). * * Defaults to "beta". */ - preid?: string; + preid?: string /** * Indicates whether to create a git commit. Can be set to a custom commit message string @@ -30,7 +30,7 @@ export interface VersionBumpOptions { * * Defaults to `false`. */ - commit?: boolean | string; + commit?: boolean | string /** * Indicates whether to tag the git commit. Can be set to a custom tag string @@ -40,14 +40,14 @@ export interface VersionBumpOptions { * * Defaults to `false`. */ - tag?: boolean | string; + tag?: boolean | string /** * Indicates whether to push the git commit and tag. * * Defaults to `false`. */ - push?: boolean; + push?: boolean /** * Indicates whether the git commit should include ALL files (`git commit --all`) @@ -55,14 +55,14 @@ export interface VersionBumpOptions { * * Defaults to `false`. */ - all?: boolean; + all?: boolean /** * Indicates whether to bypass git commit hooks (`git commit --no-verify`). * * Defaults to `false`. */ - noVerify?: boolean; + noVerify?: boolean /** * The files to be updated. For certain known files ("package.json", "bower.json", etc.) @@ -72,14 +72,14 @@ export interface VersionBumpOptions { * * Defaults to ["package.json", "package-lock.json"] */ - files?: string[]; + files?: string[] /** * The working directory, which is used as the basis for locating all files. * * Defaults to `process.cwd()` */ - cwd?: string; + cwd?: string /** * Options for the command-line interface. Can be one of the following: @@ -90,25 +90,24 @@ export interface VersionBumpOptions { * * Defaults to `true`. */ - interface?: boolean | InterfaceOptions; + interface?: boolean | InterfaceOptions /** * Indicates whether to ignore version scripts. * * Defaults to `false`. */ - ignoreScripts?: boolean; + ignoreScripts?: boolean /** * A callback that is provides information about the progress of the `versionBump()` function. */ - progress?(progress: VersionBumpProgress): void; - + progress?(progress: VersionBumpProgress): void /** * Excute additional command after bumping and before commiting */ - execute?: string; + execute?: string } /** @@ -124,7 +123,7 @@ export interface InterfaceOptions { * * Defaults to `true`. */ - input?: NodeJS.ReadableStream | NodeJS.ReadStream | boolean; + input?: NodeJS.ReadableStream | NodeJS.ReadStream | boolean /** * The stream that will be used to write output, such as prompts and progress. @@ -136,11 +135,11 @@ export interface InterfaceOptions { * * Defaults to `true`. */ - output?: NodeJS.WritableStream | NodeJS.WriteStream | boolean; + output?: NodeJS.WritableStream | NodeJS.WriteStream | boolean /** * Any other properties will be passed directly to `readline.createInterface()`. * See the `ReadLineOptions` interface for possible options. */ - [key: string]: unknown; + [key: string]: unknown } diff --git a/src/types/version-bump-progress.ts b/src/types/version-bump-progress.ts index edfeecf..ff85ce1 100644 --- a/src/types/version-bump-progress.ts +++ b/src/types/version-bump-progress.ts @@ -1,15 +1,15 @@ -import { VersionBumpResults } from "./version-bump-results"; +import type { VersionBumpResults } from './version-bump-results' /** * Progress events that indicate the progress of the `versionBump()` function. */ export const enum ProgressEvent { - FileUpdated = "file updated", - FileSkipped = "file skipped", - GitCommit = "git commit", - GitTag = "git tag", - GitPush = "git push", - NpmScript = "npm script", + FileUpdated = 'file updated', + FileSkipped = 'file skipped', + GitCommit = 'git commit', + GitTag = 'git tag', + GitPush = 'git push', + NpmScript = 'npm script', } /** @@ -18,15 +18,15 @@ export const enum ProgressEvent { * @see https://docs.npmjs.com/cli/version.html */ export const enum NpmScript { - PreVersion = "preversion", - Version = "version", - PostVersion = "postversion", + PreVersion = 'preversion', + Version = 'version', + PostVersion = 'postversion', } /** * Information about the progress of the `versionBump()` function. */ export interface VersionBumpProgress extends VersionBumpResults { - event: ProgressEvent; - script?: NpmScript; + event: ProgressEvent + script?: NpmScript } diff --git a/src/types/version-bump-results.ts b/src/types/version-bump-results.ts index 78391dd..3d6b23b 100644 --- a/src/types/version-bump-results.ts +++ b/src/types/version-bump-results.ts @@ -1,4 +1,4 @@ -import { ReleaseType } from "../release-type"; +import type { ReleaseType } from '../release-type' /** * Information about the work that was performed by the `versionBump()` function. @@ -7,39 +7,39 @@ export interface VersionBumpResults { /** * The release type that was used, or `undefined` if an explicit version number was used. */ - release?: ReleaseType; + release?: ReleaseType /** * The previous version number in package.json. */ - oldVersion: string; + oldVersion: string /** * The new version number. */ - newVersion: string; + newVersion: string /** * The commit message that was used for the git commit, or `false` if no git commit was created. * * NOTE: This will never be an empty string. It will always contain at least the new version number. */ - commit: string | false; + commit: string | false /** * The tag name that was used for the git tag, or `false` if no git tag was created. * * NOTE: This will never be an empty string. It will always contain at least the new version number. */ - tag: string | false; + tag: string | false /** * The files that were actually modified. */ - updatedFiles: string[]; + updatedFiles: string[] /** * The files that were not updated because they did not contain the old version number. */ - skippedFiles: string[]; + skippedFiles: string[] } diff --git a/src/update-files.ts b/src/update-files.ts index 92bf38b..bf0bf0b 100644 --- a/src/update-files.ts +++ b/src/update-files.ts @@ -1,33 +1,33 @@ -import * as path from "path"; -import { readJsonFile, readTextFile, writeJsonFile, writeTextFile } from "./fs"; -import { isManifest } from "./manifest"; -import { Operation } from "./operation"; -import { ProgressEvent } from "./types/version-bump-progress"; +import * as path from 'path' +import { readJsonFile, readTextFile, writeJsonFile, writeTextFile } from './fs' +import { isManifest } from './manifest' +import type { Operation } from './operation' +import { ProgressEvent } from './types/version-bump-progress' /** * Updates the version number in the specified files. */ export async function updateFiles(operation: Operation): Promise { - let { files } = operation.options; + const { files } = operation.options - for (let relPath of files) { - let modified = await updateFile(relPath, operation); + for (const relPath of files) { + const modified = await updateFile(relPath, operation) if (modified) { operation.update({ event: ProgressEvent.FileUpdated, updatedFiles: operation.state.updatedFiles.concat(relPath), - }); + }) } else { operation.update({ event: ProgressEvent.FileSkipped, skippedFiles: operation.state.skippedFiles.concat(relPath), - }); + }) } } - return operation; + return operation } /** @@ -36,17 +36,17 @@ export async function updateFiles(operation: Operation): Promise { * @returns - `true` if the file was actually modified */ async function updateFile(relPath: string, operation: Operation): Promise { - let name = path.basename(relPath).trim().toLowerCase(); + const name = path.basename(relPath).trim().toLowerCase() switch (name) { - case "package.json": - case "package-lock.json": - case "bower.json": - case "component.json": - return updateManifestFile(relPath, operation); + case 'package.json': + case 'package-lock.json': + case 'bower.json': + case 'component.json': + return updateManifestFile(relPath, operation) default: - return updateTextFile(relPath, operation); + return updateTextFile(relPath, operation) } } @@ -59,19 +59,19 @@ async function updateFile(relPath: string, operation: Operation): Promise { - let { cwd } = operation.options; - let { newVersion } = operation.state; - let modified = false; + const { cwd } = operation.options + const { newVersion } = operation.state + let modified = false - let file = await readJsonFile(relPath, cwd); + const file = await readJsonFile(relPath, cwd) if (isManifest(file.data) && file.data.version !== newVersion) { - file.data.version = newVersion; - await writeJsonFile(file); - modified = true; + file.data.version = newVersion + await writeJsonFile(file) + modified = true } - return modified; + return modified } /** @@ -80,26 +80,26 @@ async function updateManifestFile(relPath: string, operation: Operation): Promis * @returns - `true` if the file was actually modified */ async function updateTextFile(relPath: string, operation: Operation): Promise { - let { cwd } = operation.options; - let { oldVersion, newVersion } = operation.state; - let modified = false; + const { cwd } = operation.options + const { oldVersion, newVersion } = operation.state + const modified = false - let file = await readTextFile(relPath, cwd); + const file = await readTextFile(relPath, cwd) // Only update the file if it contains at least one occurrence of the old version if (file.data.includes(oldVersion)) { // Escape all non-alphanumeric characters in the version - let sanitizedVersion = oldVersion.replace(/(\W)/g, "\\$1"); + const sanitizedVersion = oldVersion.replace(/(\W)/g, '\\$1') // Replace occurrences of the old version number that are surrounded by word boundaries. // This ensures that it matches "1.23.456" or "v1.23.456", but not "321.23.456". - let replacePattern = new RegExp("(\\b|v)" + sanitizedVersion + "\\b", "g"); + const replacePattern = new RegExp(`(\\b|v)${sanitizedVersion}\\b`, 'g') - file.data = file.data.replace(replacePattern, "$1" + newVersion); - await writeTextFile(file); + file.data = file.data.replace(replacePattern, `$1${newVersion}`) + await writeTextFile(file) - return true; + return true } - return modified; + return modified } diff --git a/src/version-bump.ts b/src/version-bump.ts index 459bcf3..8e2e140 100644 --- a/src/version-bump.ts +++ b/src/version-bump.ts @@ -1,21 +1,21 @@ -import * as ezSpawn from "@jsdevtools/ez-spawn"; -import { getNewVersion } from "./get-new-version"; -import { getOldVersion } from "./get-old-version"; -import { gitCommit, gitPush, gitTag } from "./git"; -import { Operation } from "./operation"; -import { runNpmScript } from "./run-npm-script"; -import { VersionBumpOptions } from "./types/version-bump-options"; -import { NpmScript } from "./types/version-bump-progress"; -import { VersionBumpResults } from "./types/version-bump-results"; -import { updateFiles } from "./update-files"; -import { info, success } from "log-symbols"; +import * as ezSpawn from '@jsdevtools/ez-spawn' +import { info, success } from 'log-symbols' +import { getNewVersion } from './get-new-version' +import { getOldVersion } from './get-old-version' +import { gitCommit, gitPush, gitTag } from './git' +import { Operation } from './operation' +import { runNpmScript } from './run-npm-script' +import type { VersionBumpOptions } from './types/version-bump-options' +import { NpmScript } from './types/version-bump-progress' +import type { VersionBumpResults } from './types/version-bump-results' +import { updateFiles } from './update-files' /** * Prompts the user for a version number and updates package.json and package-lock.json. * * @returns - The new version number */ -export async function versionBump(): Promise; +export async function versionBump(): Promise /** * Bumps the version number in package.json, package-lock.json. @@ -27,53 +27,52 @@ export async function versionBump(): Promise; * - A release type (e.g. "major", "minor", "patch", "prerelease", etc.) * - "prompt" to prompt the user for the version number */ -export async function versionBump(release: string): Promise; +export async function versionBump(release: string): Promise /** * Bumps the version number in one or more files, prompting the user if necessary. * Optionally also commits, tags, and pushes to git. */ -export async function versionBump(options: VersionBumpOptions): Promise; +export async function versionBump(options: VersionBumpOptions): Promise /** * Bumps the version number in one or more files, prompting the user if necessary. * Optionally also commits, tags, and pushes to git. */ export async function versionBump(arg: VersionBumpOptions | string = {}): Promise { - if (typeof arg === "string") { - arg = { release: arg }; - } + if (typeof arg === 'string') + arg = { release: arg } - let operation = await Operation.start(arg); + const operation = await Operation.start(arg) // Get the old and new version numbers - await getOldVersion(operation); - await getNewVersion(operation); + await getOldVersion(operation) + await getNewVersion(operation) // Run npm preversion script, if any - await runNpmScript(NpmScript.PreVersion, operation); + await runNpmScript(NpmScript.PreVersion, operation) // Update the version number in all files - await updateFiles(operation); + await updateFiles(operation) if (operation.options.execute) { - console.log(info, "Executing script", operation.options.execute); - await ezSpawn.async(operation.options.execute, { stdio: "inherit" }); - console.log(success, "Script finished"); + console.log(info, 'Executing script', operation.options.execute) + await ezSpawn.async(operation.options.execute, { stdio: 'inherit' }) + console.log(success, 'Script finished') } // Run npm version script, if any - await runNpmScript(NpmScript.Version, operation); + await runNpmScript(NpmScript.Version, operation) // Git commit and tag, if enabled - await gitCommit(operation); - await gitTag(operation); + await gitCommit(operation) + await gitTag(operation) // Run npm postversion script, if any - await runNpmScript(NpmScript.PostVersion, operation); + await runNpmScript(NpmScript.PostVersion, operation) // Push the git commit and tag, if enabled - await gitPush(operation); + await gitPush(operation) - return operation.results; + return operation.results } diff --git a/test/fixtures/files/script1.js b/test/fixtures/files/script1.js index d93bca3..a4bace7 100644 --- a/test/fixtures/files/script1.js +++ b/test/fixtures/files/script1.js @@ -1,9 +1,8 @@ /* eslint strict:off */ (function () { - "use strict"; + 'use strict' // Testing to make sure v1.2.3 gets replaced in code files - let version = "1.2.3"; - return version; - -}()); + const version = '1.2.3' + return version +}()) diff --git a/test/fixtures/files/script2.js b/test/fixtures/files/script2.js index 7f3fdba..6eef364 100644 --- a/test/fixtures/files/script2.js +++ b/test/fixtures/files/script2.js @@ -1,11 +1,10 @@ /* eslint strict:off */ (function () { - "use strict"; + 'use strict' // This file should not get updated because // version 3.2.1 and v8.9.10 don't match the old version number - let version = "3.2.1"; - let someNumbers = "8.9.10"; - return version + someNumbers; - -}()); + const version = '3.2.1' + const someNumbers = '8.9.10' + return version + someNumbers +}()) diff --git a/test/fixtures/mocha-hooks.js b/test/fixtures/mocha-hooks.js index e4376b8..8694f7f 100644 --- a/test/fixtures/mocha-hooks.js +++ b/test/fixtures/mocha-hooks.js @@ -1,17 +1,17 @@ -"use strict"; +'use strict' -const fs = require("fs"); -const rimraf = require("rimraf"); +const fs = require('fs') +const rimraf = require('rimraf') /** * Clean the .tmp directory before each test */ -beforeEach("clean the .tmp directory", async () => { +beforeEach('clean the .tmp directory', async () => { // Delete the .tmp directory, if it exists - await new Promise(r => rimraf("test/.tmp", r)); + await new Promise(r => rimraf('test/.tmp', r)) // Re-create the .tmp directory await new Promise((resolve, reject) => { - fs.mkdir("test/.tmp", (err) => err ? reject(err) : resolve()); - }); -}); + fs.mkdir('test/.tmp', err => err ? reject(err) : resolve()) + }) +}) diff --git a/test/fixtures/setup-mocks.js b/test/fixtures/setup-mocks.js index 16669bc..af6a544 100644 --- a/test/fixtures/setup-mocks.js +++ b/test/fixtures/setup-mocks.js @@ -1,30 +1,28 @@ -"use strict"; +'use strict' -const fs = require("fs"); -const path = require("path"); +const fs = require('fs') +const path = require('path') -const mocksDir = path.resolve("test", "fixtures", "mocks"); +const mocksDir = path.resolve('test', 'fixtures', 'mocks') // Ensure that the mock binaries are executable -fs.chmodSync(path.join(mocksDir, "git"), "0777"); -fs.chmodSync(path.join(mocksDir, "npm"), "0777"); +fs.chmodSync(path.join(mocksDir, 'git'), '0777') +fs.chmodSync(path.join(mocksDir, 'npm'), '0777') // Inject our mocks directory path into the PATH variable, // so that version-bump-prompt runs our mock `git` and `npm` binaries // instead of the real ones. -let otherPaths = getEnvPath(); -process.env.PATH = mocksDir + path.delimiter + otherPaths; // eslint-disable-line no-path-concat - +const otherPaths = getEnvPath() +process.env.PATH = mocksDir + path.delimiter + otherPaths /** * Returns the PATH environment variable, case-insensitively */ -function getEnvPath () { - let keys = Object.keys(process.env); +function getEnvPath() { + const keys = Object.keys(process.env) - for (let key of keys) { - if (key.toUpperCase() === "PATH") { - return process.env[key]; - } + for (const key of keys) { + if (key.toUpperCase() === 'PATH') + return process.env[key] } } diff --git a/test/specs/api.spec.js b/test/specs/api.spec.js index 6d5a728..057e255 100644 --- a/test/specs/api.spec.js +++ b/test/specs/api.spec.js @@ -1,176 +1,175 @@ -"use strict"; +'use strict' -const { versionBump } = require("../../dist/index.js"); -const { files, mocks } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { versionBump } = require('../../dist/index.js') +const { files, mocks } = require('../utils') -const ORIGINAL_CWD = process.cwd(); +const ORIGINAL_CWD = process.cwd() -describe("versionBup() API", () => { - afterEach("restore the CWD", () => { +describe('versionBup() API', () => { + afterEach('restore the CWD', () => { // Many of the tests in this file change the CWD, so change it back after each test - process.chdir(ORIGINAL_CWD); - }); + process.chdir(ORIGINAL_CWD) + }) - it("should accept a specific version number", async () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept a specific version number', async () => { + files.create('package.json', { version: '1.0.0' }) // Change the cwd, since we're not setting the `cwd` option - process.chdir("test/.tmp"); + process.chdir('test/.tmp') - let results = await versionBump("2.34.567"); + const results = await versionBump('2.34.567') expect(results).to.deep.equal({ release: undefined, - oldVersion: "1.0.0", - newVersion: "2.34.567", + oldVersion: '1.0.0', + newVersion: '2.34.567', commit: false, tag: false, - updatedFiles: ["package.json"], + updatedFiles: ['package.json'], skippedFiles: [], - }); + }) // The package.json file should have been updated - expect(files.json("package.json")).to.deep.equal({ version: "2.34.567" }); + expect(files.json('package.json')).to.deep.equal({ version: '2.34.567' }) // Git and NPM should NOT have been called - expect(mocks.git()).to.have.lengthOf(0); - expect(mocks.npm()).to.have.lengthOf(0); - }); + expect(mocks.git()).to.have.lengthOf(0) + expect(mocks.npm()).to.have.lengthOf(0) + }) - it("should accept a bump type", async () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept a bump type', async () => { + files.create('package.json', { version: '1.0.0' }) // Change the cwd, since we're not setting the `cwd` option - process.chdir("test/.tmp"); + process.chdir('test/.tmp') - let results = await versionBump("minor"); + const results = await versionBump('minor') expect(results).to.deep.equal({ - release: "minor", - oldVersion: "1.0.0", - newVersion: "1.1.0", + release: 'minor', + oldVersion: '1.0.0', + newVersion: '1.1.0', commit: false, tag: false, - updatedFiles: ["package.json"], + updatedFiles: ['package.json'], skippedFiles: [], - }); + }) // The package.json file should have been updated - expect(files.json("package.json")).to.deep.equal({ version: "1.1.0" }); + expect(files.json('package.json')).to.deep.equal({ version: '1.1.0' }) // Git and NPM should NOT have been called - expect(mocks.git()).to.have.lengthOf(0); - expect(mocks.npm()).to.have.lengthOf(0); - }); - - it("should accept options", async () => { - files.create("package.json", { version: "1.0.0" }); - files.create("README.md", "The latest release is v1.0.0\n"); - files.create("subdir/deep/changelog.md", "# Changelog\n\n## v1.0.0\n\n## v0.0.1\n"); - files.create("random-file.json", { - name: "v1.0.0", - version: "1.0.0", - desc: "This is version 1.0.0.", - }); - - let results = await versionBump({ - release: "preminor", - preid: "test", - commit: "A test of the upcoming v", - tag: "", - cwd: "test/.tmp", + expect(mocks.git()).to.have.lengthOf(0) + expect(mocks.npm()).to.have.lengthOf(0) + }) + + it('should accept options', async () => { + files.create('package.json', { version: '1.0.0' }) + files.create('README.md', 'The latest release is v1.0.0\n') + files.create('subdir/deep/changelog.md', '# Changelog\n\n## v1.0.0\n\n## v0.0.1\n') + files.create('random-file.json', { + name: 'v1.0.0', + version: '1.0.0', + desc: 'This is version 1.0.0.', + }) + + const results = await versionBump({ + release: 'preminor', + preid: 'test', + commit: 'A test of the upcoming v', + tag: '', + cwd: 'test/.tmp', files: [ - "random-file.json", - "**/*.md", + 'random-file.json', + '**/*.md', ], - }); + }) expect(results).to.deep.equal({ - release: "preminor", - oldVersion: "1.0.0", - newVersion: "1.1.0-test.1", - commit: "A test of the upcoming v1.1.0-test.1", - tag: "1.1.0-test.1", + release: 'preminor', + oldVersion: '1.0.0', + newVersion: '1.1.0-test.1', + commit: 'A test of the upcoming v1.1.0-test.1', + tag: '1.1.0-test.1', updatedFiles: [ - "random-file.json", - "README.md", - "subdir/deep/changelog.md" + 'random-file.json', + 'README.md', + 'subdir/deep/changelog.md', ], skippedFiles: [], - }); + }) // The CWD should not have changed - expect(process.cwd()).to.equal(ORIGINAL_CWD); + expect(process.cwd()).to.equal(ORIGINAL_CWD) // The package.json file should NOT have been updated, because it wasn't in the `files` list - expect(files.json("package.json")).to.deep.equal({ version: "1.0.0" }); + expect(files.json('package.json')).to.deep.equal({ version: '1.0.0' }) // The other files should have been updated - files.text("README.md", "The latest release is v1.1.0-test.1\n"); + files.text('README.md', 'The latest release is v1.1.0-test.1\n') - files.text("subdir/deep/changelog.md", "# Changelog\n\n## v1.1.0-test.1\n\n## v0.0.1\n"); + files.text('subdir/deep/changelog.md', '# Changelog\n\n## v1.1.0-test.1\n\n## v0.0.1\n') - expect(files.json("random-file.json")).to.deep.equal({ - name: "v1.1.0-test.1", - version: "1.1.0-test.1", - desc: "This is version 1.1.0-test.1.", - }); + expect(files.json('random-file.json')).to.deep.equal({ + name: 'v1.1.0-test.1', + version: '1.1.0-test.1', + desc: 'This is version 1.1.0-test.1.', + }) // A git commit and tag should have been created expect(mocks.git()).to.deep.equal([ 'git commit --message "A test of the upcoming v1.1.0-test.1" random-file.json README.md subdir/deep/changelog.md', 'git tag --annotate --message "A test of the upcoming v1.1.0-test.1" 1.1.0-test.1', - ]); + ]) // NPM should NOT have been called - expect(mocks.npm()).to.have.lengthOf(0); - }); + expect(mocks.npm()).to.have.lengthOf(0) + }) - it("should throw an error if the options are invalid", async () => { + it('should throw an error if the options are invalid', async () => { try { - let results = await versionBump({ release: "hello world" }); + const results = await versionBump({ release: 'hello world' }) throw new Error( - "An error should have been thrown, but results were returned:\n" + - JSON.stringify(results, null, 2) - ); + `An error should have been thrown, but results were returned:\n${ + JSON.stringify(results, null, 2)}`, + ) } catch (error) { - expect(error).to.be.an.instanceOf(Error); - expect(error.message).to.equal("Invalid Version: hello world"); + expect(error).to.be.an.instanceOf(Error) + expect(error.message).to.equal('Invalid Version: hello world') } - }); + }) - it("should throw an error if the current version number is invalid", async () => { - files.create("package.json", { version: "hello world" }); + it('should throw an error if the current version number is invalid', async () => { + files.create('package.json', { version: 'hello world' }) try { - let results = await versionBump({ - release: "major", - cwd: "test/.tmp", - }); + const results = await versionBump({ + release: 'major', + cwd: 'test/.tmp', + }) throw new Error( - "An error should have been thrown, but results were returned:\n" + - JSON.stringify(results, null, 2) - ); + `An error should have been thrown, but results were returned:\n${ + JSON.stringify(results, null, 2)}`, + ) } catch (error) { - expect(error).to.be.an.instanceOf(Error); + expect(error).to.be.an.instanceOf(Error) expect(error.message).to.equal( - "Unable to determine the current version number. Checked package.json." - ); + 'Unable to determine the current version number. Checked package.json.', + ) // The CWD should not have changed - expect(process.cwd()).to.equal(ORIGINAL_CWD); + expect(process.cwd()).to.equal(ORIGINAL_CWD) // The package.json file should not have changed - expect(files.json("package.json")).to.deep.equal({ version: "hello world" }); + expect(files.json('package.json')).to.deep.equal({ version: 'hello world' }) // Git and NPM should NOT have been called - expect(mocks.git()).to.have.lengthOf(0); - expect(mocks.npm()).to.have.lengthOf(0); + expect(mocks.git()).to.have.lengthOf(0) + expect(mocks.npm()).to.have.lengthOf(0) } - }); - -}); + }) +}) diff --git a/test/specs/cli.spec.js b/test/specs/cli.spec.js index 39e2ea2..7beb10c 100644 --- a/test/specs/cli.spec.js +++ b/test/specs/cli.spec.js @@ -1,131 +1,131 @@ -"use strict"; +'use strict' -const { files, bump } = require("../utils"); -const { expect } = require("chai"); -const manifest = require("../../package.json"); +const { expect } = require('chai') +const { files, bump } = require('../utils') +const manifest = require('../../package.json') -describe("bump", () => { - it("should run without any arguments", () => { +describe('bump', () => { + it('should run without any arguments', () => { // Create a dummy package.json, otherwise an error will occur - files.create("package.json", { version: "1.0.0" }); + files.create('package.json', { version: '1.0.0' }) // Run the CLI without any arguments. // It will prompt the user and wait forever, so add a timeout. - let cli = bump(""); + const cli = bump('') - expect(cli.stdout).to.match(/The current version in package.json is 1.0.0\nHow would you like to bump it\?/); - }); + expect(cli.stdout).to.match(/The current version in package.json is 1.0.0\nHow would you like to bump it\?/) + }) - it("should error if an invalid argument is used", () => { - let cli = bump("--commit --help --fizzbuzz --quiet"); + it('should error if an invalid argument is used', () => { + const cli = bump('--commit --help --fizzbuzz --quiet') - expect(cli).to.have.exitCode(9); - expect(cli).to.have.stdout(""); - expect(cli.stderr).to.match(/^Unknown option: --fizzbuzz\n\nUsage: bump \[release\] \[options\] \[files...\]\n/); - }); + expect(cli).to.have.exitCode(9) + expect(cli).to.have.stdout('') + expect(cli.stderr).to.match(/^Unknown option: --fizzbuzz\n\nUsage: bump \[release\] \[options\] \[files...\]\n/) + }) - it("should error if an invalid shorthand argument is used", () => { - let cli = bump("-cqhzt"); + it('should error if an invalid shorthand argument is used', () => { + const cli = bump('-cqhzt') - expect(cli).to.have.exitCode(9); - expect(cli).to.have.stdout(""); - expect(cli.stderr).to.match(/^Unknown option: -z\n\nUsage: bump \[release\] \[options\] \[files...\]\n/); - }); + expect(cli).to.have.exitCode(9) + expect(cli).to.have.stdout('') + expect(cli.stderr).to.match(/^Unknown option: -z\n\nUsage: bump \[release\] \[options\] \[files...\]\n/) + }) - it("should error if an argument is missing its value", () => { - let cli = bump("--commit --help --preid --quiet"); + it('should error if an argument is missing its value', () => { + const cli = bump('--commit --help --preid --quiet') - expect(cli).to.have.exitCode(9); - expect(cli).to.have.stdout(""); + expect(cli).to.have.exitCode(9) + expect(cli).to.have.stdout('') expect(cli.stderr).to.match( - /^The --preid option requires a value, such as "alpha", "beta", etc\.\n\nUsage: bump \[release\] \[options\] \[files...\]\n/ - ); - }); + /^The --preid option requires a value, such as "alpha", "beta", etc\.\n\nUsage: bump \[release\] \[options\] \[files...\]\n/, + ) + }) - it("should print a more detailed error if DEBUG is set", () => { - files.create("package.json", { version: "" }); + it('should print a more detailed error if DEBUG is set', () => { + files.create('package.json', { version: '' }) - let cli = bump("major", { env: { ...process.env, DEBUG: "true", NODE_OPTIONS: "" }}); + const cli = bump('major', { env: { ...process.env, DEBUG: 'true', NODE_OPTIONS: '' } }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.exitCode(1); + expect(cli).to.have.stdout('') + expect(cli).to.have.exitCode(1) expect(cli).to.have.stderr.that.matches( - /^Error: Unable to determine the current version number. Checked package.json.\n\s+at \w+/ - ); - - expect(files.json("package.json")).to.deep.equal({ version: "" }); - }); - - describe("bump --help", () => { - it("should show usage text", () => { - let cli = bump("--help"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli.stdout).to.contain(manifest.description); - expect(cli.stdout).to.match(/\nUsage: bump \[release\] \[options\] \[files...\]\n/); - }); - - it("should support -h shorthand", () => { - let cli = bump("-h"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli.stdout).to.contain(manifest.description); - expect(cli.stdout).to.match(/\nUsage: bump \[release\] \[options\] \[files...\]\n/); - }); - - it("should ignore other arguments", () => { - let cli = bump("--quiet --help --tag"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli.stdout).to.contain(manifest.description); - expect(cli.stdout).to.match(/\nUsage: bump \[release\] \[options\] \[files...\]\n/); - }); - - it("should ignore other shorthand arguments", () => { - let cli = bump("-cht"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli.stdout).to.contain(manifest.description); - expect(cli.stdout).to.match(/\nUsage: bump \[release\] \[options\] \[files...\]\n/); - }); - }); - - describe("bump --version", () => { - it("should show the version number", () => { - let cli = bump("--version"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli).to.have.stdout(manifest.version + "\n"); - }); - - it("should support -v shorthand", () => { - let cli = bump("-v"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli).to.have.stdout(manifest.version + "\n"); - }); - - it("should ignore other arguments", () => { - let cli = bump("--quiet --version --tag"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli).to.have.stdout(manifest.version + "\n"); - }); - - it("should ignore other shorthand arguments", () => { - let cli = bump("-cvt"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli).to.have.stdout(manifest.version + "\n"); - }); - }); -}); + /^Error: Unable to determine the current version number. Checked package.json.\n\s+at \w+/, + ) + + expect(files.json('package.json')).to.deep.equal({ version: '' }) + }) + + describe('bump --help', () => { + it('should show usage text', () => { + const cli = bump('--help') + + expect(cli).to.have.exitCode(0) + expect(cli).to.have.stderr('') + expect(cli.stdout).to.contain(manifest.description) + expect(cli.stdout).to.match(/\nUsage: bump \[release\] \[options\] \[files...\]\n/) + }) + + it('should support -h shorthand', () => { + const cli = bump('-h') + + expect(cli).to.have.exitCode(0) + expect(cli).to.have.stderr('') + expect(cli.stdout).to.contain(manifest.description) + expect(cli.stdout).to.match(/\nUsage: bump \[release\] \[options\] \[files...\]\n/) + }) + + it('should ignore other arguments', () => { + const cli = bump('--quiet --help --tag') + + expect(cli).to.have.exitCode(0) + expect(cli).to.have.stderr('') + expect(cli.stdout).to.contain(manifest.description) + expect(cli.stdout).to.match(/\nUsage: bump \[release\] \[options\] \[files...\]\n/) + }) + + it('should ignore other shorthand arguments', () => { + const cli = bump('-cht') + + expect(cli).to.have.exitCode(0) + expect(cli).to.have.stderr('') + expect(cli.stdout).to.contain(manifest.description) + expect(cli.stdout).to.match(/\nUsage: bump \[release\] \[options\] \[files...\]\n/) + }) + }) + + describe('bump --version', () => { + it('should show the version number', () => { + const cli = bump('--version') + + expect(cli).to.have.exitCode(0) + expect(cli).to.have.stderr('') + expect(cli).to.have.stdout(`${manifest.version}\n`) + }) + + it('should support -v shorthand', () => { + const cli = bump('-v') + + expect(cli).to.have.exitCode(0) + expect(cli).to.have.stderr('') + expect(cli).to.have.stdout(`${manifest.version}\n`) + }) + + it('should ignore other arguments', () => { + const cli = bump('--quiet --version --tag') + + expect(cli).to.have.exitCode(0) + expect(cli).to.have.stderr('') + expect(cli).to.have.stdout(`${manifest.version}\n`) + }) + + it('should ignore other shorthand arguments', () => { + const cli = bump('-cvt') + + expect(cli).to.have.exitCode(0) + expect(cli).to.have.stderr('') + expect(cli).to.have.stdout(`${manifest.version}\n`) + }) + }) +}) diff --git a/test/specs/exports.spec.js b/test/specs/exports.spec.js index a30e79f..9b8d31c 100644 --- a/test/specs/exports.spec.js +++ b/test/specs/exports.spec.js @@ -1,31 +1,29 @@ -"use strict"; +'use strict' -const commonJSExport = require("../../"); -const { expect } = require("chai"); -const { default: defaultExport, versionBump: namedExport } = require("../../"); +const { expect } = require('chai') +const commonJSExport = require('../../') +const { default: defaultExport, versionBump: namedExport } = require('../../') -describe("version-bump-prompt package exports", () => { +describe('version-bump-prompt package exports', () => { + it('should export the versionBump() function as the default CommonJS export', () => { + expect(commonJSExport).to.be.a('function') + expect(commonJSExport.name).to.equal('versionBump') + }) - it("should export the versionBump() function as the default CommonJS export", () => { - expect(commonJSExport).to.be.a("function"); - expect(commonJSExport.name).to.equal("versionBump"); - }); + it('should export the versionBump() function as the default ESM export', () => { + expect(defaultExport).to.be.a('function') + expect(defaultExport).to.equal(commonJSExport) + }) - it("should export the versionBump() function as the default ESM export", () => { - expect(defaultExport).to.be.a("function"); - expect(defaultExport).to.equal(commonJSExport); - }); + it('should export the versionBump() function as a named export', () => { + expect(namedExport).to.be.a('function') + expect(namedExport).to.equal(commonJSExport) + }) - it("should export the versionBump() function as a named export", () => { - expect(namedExport).to.be.a("function"); - expect(namedExport).to.equal(commonJSExport); - }); - - it("should not export anything else", () => { + it('should not export anything else', () => { expect(Object.keys(commonJSExport)).to.have.same.members([ - "default", - "versionBump", - ]); - }); - -}); + 'default', + 'versionBump', + ]) + }) +}) diff --git a/test/specs/files.spec.js b/test/specs/files.spec.js index 0278d32..703d229 100644 --- a/test/specs/files.spec.js +++ b/test/specs/files.spec.js @@ -1,206 +1,204 @@ -"use strict"; +'use strict' -const { check, info, files, fixtures, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, info, files, fixtures, bump } = require('../utils') -describe("bump [files...]", () => { +describe('bump [files...]', () => { + it('should update the package.json and package-lock.json by default', () => { + files.create('package.json', { version: '1.2.3' }) + files.create('package-lock.json', { version: '1.2.3' }) - it("should update the package.json and package-lock.json by default", () => { - files.create("package.json", { version: "1.2.3" }); - files.create("package-lock.json", { version: "1.2.3" }); + const cli = bump('major') - let cli = bump("major"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Updated package-lock.json to 2.0.0\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Updated package-lock.json to 2.0.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "2.0.0" }); - expect(files.json("package-lock.json")).to.deep.equal({ version: "2.0.0" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '2.0.0' }) + expect(files.json('package-lock.json')).to.deep.equal({ version: '2.0.0' }) + }) - it("should not update package-lock.json if package.json is explicitly specified", () => { - files.create("package.json", { version: "1.2.3" }); - files.create("package-lock.json", { version: "1.2.3" }); + it('should not update package-lock.json if package.json is explicitly specified', () => { + files.create('package.json', { version: '1.2.3' }) + files.create('package-lock.json', { version: '1.2.3' }) - let cli = bump("major package.json"); + const cli = bump('major package.json') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` - ); + `${check} Updated package.json to 2.0.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "2.0.0" }); - expect(files.json("package-lock.json")).to.deep.equal({ version: "1.2.3" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '2.0.0' }) + expect(files.json('package-lock.json')).to.deep.equal({ version: '1.2.3' }) + }) - it("should not update package.json if package-lock.json is explicitly specified", () => { - files.create("package.json", { version: "1.2.3" }); - files.create("package-lock.json", { version: "1.2.3" }); + it('should not update package.json if package-lock.json is explicitly specified', () => { + files.create('package.json', { version: '1.2.3' }) + files.create('package-lock.json', { version: '1.2.3' }) - let cli = bump("major package-lock.json"); + const cli = bump('major package-lock.json') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package-lock.json to 2.0.0\n` - ); + `${check} Updated package-lock.json to 2.0.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3" }); - expect(files.json("package-lock.json")).to.deep.equal({ version: "2.0.0" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3' }) + expect(files.json('package-lock.json')).to.deep.equal({ version: '2.0.0' }) + }) - it("should not update package.json or package-lock.json if another file is explicitly specified", () => { - files.create("package.json", { version: "1.2.3" }); - files.create("package-lock.json", { version: "1.2.3" }); - files.create("bower.json", { version: "1.2.3" }); + it('should not update package.json or package-lock.json if another file is explicitly specified', () => { + files.create('package.json', { version: '1.2.3' }) + files.create('package-lock.json', { version: '1.2.3' }) + files.create('bower.json', { version: '1.2.3' }) - let cli = bump("major bower.json"); + const cli = bump('major bower.json') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated bower.json to 2.0.0\n` - ); + `${check} Updated bower.json to 2.0.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3" }); - expect(files.json("package-lock.json")).to.deep.equal({ version: "1.2.3" }); - expect(files.json("bower.json")).to.deep.equal({ version: "2.0.0" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3' }) + expect(files.json('package-lock.json')).to.deep.equal({ version: '1.2.3' }) + expect(files.json('bower.json')).to.deep.equal({ version: '2.0.0' }) + }) - it("should replace the version number in non-manifest files", () => { - files.create("package.json", { version: "1.2.3" }); - files.create("LICENSE", fixtures.license); - files.create("README.md", fixtures.readme); - files.create("script1.js", fixtures.script1); - files.create("script2.js", fixtures.script2); - files.create("subdir/deep/script1.js", fixtures.script1); - files.create("subdir/deep/script2.js", fixtures.script2); + it('should replace the version number in non-manifest files', () => { + files.create('package.json', { version: '1.2.3' }) + files.create('LICENSE', fixtures.license) + files.create('README.md', fixtures.readme) + files.create('script1.js', fixtures.script1) + files.create('script2.js', fixtures.script2) + files.create('subdir/deep/script1.js', fixtures.script1) + files.create('subdir/deep/script2.js', fixtures.script2) - let cli = bump("major LICENSE README.* **/*.js"); + const cli = bump('major LICENSE README.* **/*.js') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated LICENSE to 2.0.0\n` + - `${check} Updated README.md to 2.0.0\n` + - `${check} Updated script1.js to 2.0.0\n` + - `${info} script2.js did not need to be updated\n` + - `${check} Updated subdir/deep/script1.js to 2.0.0\n` + - `${info} subdir/deep/script2.js did not need to be updated\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3" }); - expect(files.text("LICENSE")).to.match(/MyApp v2.0.0 Copyright/); - expect(files.text("README.md")).to.match(/version 2.0.0 and v2.0.0 should both get updated/); - expect(files.text("script1.js")).to.match(/make sure v2.0.0 gets replaced/); - expect(files.text("script1.js")).to.match(/let version = "2.0.0";/); - expect(files.text("script2.js")).to.match(/version 3.2.1 and v8.9.10 don't match the old version number/); - expect(files.text("subdir/deep/script1.js")).to.match(/make sure v2.0.0 gets replaced/); - expect(files.text("subdir/deep/script1.js")).to.match(/let version = "2.0.0";/); - expect(files.text("subdir/deep/script2.js")).to.match(/version 3.2.1 and v8.9.10 don't match the old version number/); - }); - - it("should not replace other version fields in manifest files", () => { - files.create("package.json", { version: "1.2.3", notTheVersion: "1.2.3" }); - files.create("package-lock.json", { version: "1.2.3", notTheVersion: "1.2.3" }); - - let cli = bump("major"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + `${check} Updated LICENSE to 2.0.0\n` + + `${check} Updated README.md to 2.0.0\n` + + `${check} Updated script1.js to 2.0.0\n` + + `${info} script2.js did not need to be updated\n` + + `${check} Updated subdir/deep/script1.js to 2.0.0\n` + + `${info} subdir/deep/script2.js did not need to be updated\n`, + ) + + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3' }) + expect(files.text('LICENSE')).to.match(/MyApp v2.0.0 Copyright/) + expect(files.text('README.md')).to.match(/version 2.0.0 and v2.0.0 should both get updated/) + expect(files.text('script1.js')).to.match(/make sure v2.0.0 gets replaced/) + expect(files.text('script1.js')).to.match(/let version = "2.0.0";/) + expect(files.text('script2.js')).to.match(/version 3.2.1 and v8.9.10 don't match the old version number/) + expect(files.text('subdir/deep/script1.js')).to.match(/make sure v2.0.0 gets replaced/) + expect(files.text('subdir/deep/script1.js')).to.match(/let version = "2.0.0";/) + expect(files.text('subdir/deep/script2.js')).to.match(/version 3.2.1 and v8.9.10 don't match the old version number/) + }) + + it('should not replace other version fields in manifest files', () => { + files.create('package.json', { version: '1.2.3', notTheVersion: '1.2.3' }) + files.create('package-lock.json', { version: '1.2.3', notTheVersion: '1.2.3' }) + + const cli = bump('major') + + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Updated package-lock.json to 2.0.0\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Updated package-lock.json to 2.0.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "2.0.0", notTheVersion: "1.2.3" }); - expect(files.json("package-lock.json")).to.deep.equal({ version: "2.0.0", notTheVersion: "1.2.3" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '2.0.0', notTheVersion: '1.2.3' }) + expect(files.json('package-lock.json')).to.deep.equal({ version: '2.0.0', notTheVersion: '1.2.3' }) + }) - it("should not replace other version numbers in non-manifest files", () => { - files.create("package.json", { version: "1.2.3" }); - files.create("LICENSE", fixtures.license); - files.create("README.md", fixtures.readme); - files.create("script1.js", fixtures.script1); - files.create("script2.js", fixtures.script2); + it('should not replace other version numbers in non-manifest files', () => { + files.create('package.json', { version: '1.2.3' }) + files.create('LICENSE', fixtures.license) + files.create('README.md', fixtures.readme) + files.create('script1.js', fixtures.script1) + files.create('script2.js', fixtures.script2) - let cli = bump("major LICENSE README.* *.js"); + const cli = bump('major LICENSE README.* *.js') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated LICENSE to 2.0.0\n` + - `${check} Updated README.md to 2.0.0\n` + - `${check} Updated script1.js to 2.0.0\n` + - `${info} script2.js did not need to be updated\n` - ); + `${check} Updated LICENSE to 2.0.0\n` + + `${check} Updated README.md to 2.0.0\n` + + `${check} Updated script1.js to 2.0.0\n` + + `${info} script2.js did not need to be updated\n`, + ) - expect(files.text("LICENSE")).to.match(/MyApp v2.0.0 Copyright/); - expect(files.text("README.md")).to.match(/version 5.6.7 and v8.9.10 should not be changed/); - expect(files.text("script2.js")).to.match(/version 3.2.1 and v8.9.10 don't match the old version number/); - }); + expect(files.text('LICENSE')).to.match(/MyApp v2.0.0 Copyright/) + expect(files.text('README.md')).to.match(/version 5.6.7 and v8.9.10 should not be changed/) + expect(files.text('script2.js')).to.match(/version 3.2.1 and v8.9.10 don't match the old version number/) + }) - it("should not not modify non-manifest files that don't contain the old version number", () => { - files.create("package.json", { version: "4.5.6" }); - files.create("LICENSE", fixtures.license); - files.create("README.md", fixtures.readme); - files.create("script1.js", fixtures.script1); - files.create("script2.js", fixtures.script2); + it('should not not modify non-manifest files that don\'t contain the old version number', () => { + files.create('package.json', { version: '4.5.6' }) + files.create('LICENSE', fixtures.license) + files.create('README.md', fixtures.readme) + files.create('script1.js', fixtures.script1) + files.create('script2.js', fixtures.script2) - let cli = bump("major LICENSE README.* *.js"); + const cli = bump('major LICENSE README.* *.js') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${info} LICENSE did not need to be updated\n` + - `${info} README.md did not need to be updated\n` + - `${info} script1.js did not need to be updated\n` + - `${info} script2.js did not need to be updated\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "4.5.6" }); - expect(files.text("LICENSE")).to.match(/MyApp v1.2.3 Copyright/); - expect(files.text("README.md")).to.match(/version 5.6.7 and v8.9.10 should not be changed/); - expect(files.text("README.md")).to.match(/version 1.2.3 and v1.2.3 should both get updated/); - expect(files.text("script1.js")).to.match(/make sure v1.2.3 gets replaced/); - expect(files.text("script1.js")).to.match(/let version = "1.2.3";/); - expect(files.text("script1.js")).to.match(/let version = "1.2.3";/); - expect(files.text("script2.js")).to.match(/version 3.2.1 and v8.9.10 don't match the old version number/); - }); + `${info} LICENSE did not need to be updated\n` + + `${info} README.md did not need to be updated\n` + + `${info} script1.js did not need to be updated\n` + + `${info} script2.js did not need to be updated\n`, + ) - it("should error if an explicitly-specified file doesn't exist", () => { - files.create("package.json", { version: "1.2.3" }); + expect(files.json('package.json')).to.deep.equal({ version: '4.5.6' }) + expect(files.text('LICENSE')).to.match(/MyApp v1.2.3 Copyright/) + expect(files.text('README.md')).to.match(/version 5.6.7 and v8.9.10 should not be changed/) + expect(files.text('README.md')).to.match(/version 1.2.3 and v1.2.3 should both get updated/) + expect(files.text('script1.js')).to.match(/make sure v1.2.3 gets replaced/) + expect(files.text('script1.js')).to.match(/let version = "1.2.3";/) + expect(files.text('script1.js')).to.match(/let version = "1.2.3";/) + expect(files.text('script2.js')).to.match(/version 3.2.1 and v8.9.10 don't match the old version number/) + }) - let cli = bump("major README.md"); + it('should error if an explicitly-specified file doesn\'t exist', () => { + files.create('package.json', { version: '1.2.3' }) - expect(cli).to.have.stderr("Could not find file: README.md.\n"); - expect(cli).to.have.exitCode(1); + const cli = bump('major README.md') - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3" }); - }); + expect(cli).to.have.stderr('Could not find file: README.md.\n') + expect(cli).to.have.exitCode(1) - it("should error if a glob pattern doesn't match any files", () => { - files.create("package.json", { version: "1.2.3" }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3' }) + }) - let cli = bump("major **/*.js"); + it('should error if a glob pattern doesn\'t match any files', () => { + files.create('package.json', { version: '1.2.3' }) - expect(cli).to.have.stderr('Could not find any files matching "**/*.js".\n'); - expect(cli).to.have.exitCode(1); + const cli = bump('major **/*.js') - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3" }); - }); + expect(cli).to.have.stderr('Could not find any files matching "**/*.js".\n') + expect(cli).to.have.exitCode(1) -}); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3' }) + }) +}) diff --git a/test/specs/git-commit.spec.js b/test/specs/git-commit.spec.js index e83b9c6..039a418 100644 --- a/test/specs/git-commit.spec.js +++ b/test/specs/git-commit.spec.js @@ -1,155 +1,153 @@ -"use strict"; +'use strict' -const { check, files, mocks, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, mocks, bump } = require('../utils') -describe("bump --commit", () => { +describe('bump --commit', () => { + it('should not commit by default', () => { + files.create('package.json', { version: '1.0.0' }) - it("should not commit by default", () => { - files.create("package.json", { version: "1.0.0" }); + const cli = bump('major') - let cli = bump("major"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` - ); + `${check} Updated package.json to 2.0.0\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(0); - }); + const git = mocks.git() + expect(git.length).to.equal(0) + }) - it("should commit the manifest file to git", () => { - files.create("package.json", { version: "1.0.0" }); + it('should commit the manifest file to git', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("major --commit"); + const cli = bump('major --commit') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Git commit\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Git commit\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(1); - expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json'); - }); + const git = mocks.git() + expect(git.length).to.equal(1) + expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json') + }) - it("should commit multiple manifest files to git", () => { - files.create("package.json", { version: "1.0.0" }); - files.create("bower.json", { version: "1.0.0" }); - files.create("component.json", { version: "1.0.0" }); + it('should commit multiple manifest files to git', () => { + files.create('package.json', { version: '1.0.0' }) + files.create('bower.json', { version: '1.0.0' }) + files.create('component.json', { version: '1.0.0' }) - let cli = bump("minor *.json --commit"); + const cli = bump('minor *.json --commit') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated bower.json to 1.1.0\n` + - `${check} Updated component.json to 1.1.0\n` + - `${check} Updated package.json to 1.1.0\n` + - `${check} Git commit\n` - ); + `${check} Updated bower.json to 1.1.0\n` + + `${check} Updated component.json to 1.1.0\n` + + `${check} Updated package.json to 1.1.0\n` + + `${check} Git commit\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(1); - expect(git[0]).to.equal('git commit --message "release v1.1.0" bower.json component.json package.json'); - }); + const git = mocks.git() + expect(git.length).to.equal(1) + expect(git[0]).to.equal('git commit --message "release v1.1.0" bower.json component.json package.json') + }) - it("should commit all files to git", () => { - files.create("package.json", { version: "1.0.0" }); + it('should commit all files to git', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("minor --commit --all"); + const cli = bump('minor --commit --all') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.1.0\n` + - `${check} Git commit\n` - ); + `${check} Updated package.json to 1.1.0\n` + + `${check} Git commit\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(1); - expect(git[0]).to.equal('git commit --all --message "release v1.1.0"'); - }); + const git = mocks.git() + expect(git.length).to.equal(1) + expect(git[0]).to.equal('git commit --all --message "release v1.1.0"') + }) - it("should commit without running pre-commit hooks", () => { - files.create("package.json", { version: "1.0.0" }); + it('should commit without running pre-commit hooks', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("minor --commit --all --no-verify"); + const cli = bump('minor --commit --all --no-verify') - expect(cli.stderr).to.have.lengthOf(0); - expect(cli).to.have.exitCode(0); + expect(cli.stderr).to.have.lengthOf(0) + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.1.0\n` + - `${check} Git commit\n` - ); + `${check} Updated package.json to 1.1.0\n` + + `${check} Git commit\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(1); - expect(git[0]).to.equal('git commit --all --no-verify --message "release v1.1.0"'); - }); + const git = mocks.git() + expect(git.length).to.equal(1) + expect(git[0]).to.equal('git commit --all --no-verify --message "release v1.1.0"') + }) - it("should append the version number to the commit message", () => { - files.create("package.json", { version: "1.0.0" }); + it('should append the version number to the commit message', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump('patch --all --commit "this is release v"'); + const cli = bump('patch --all --commit "this is release v"') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.0.1\n` + - `${check} Git commit\n` - ); + `${check} Updated package.json to 1.0.1\n` + + `${check} Git commit\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(1); - expect(git[0]).to.equal('git commit --all --message "this is release v1.0.1"'); - }); + const git = mocks.git() + expect(git.length).to.equal(1) + expect(git[0]).to.equal('git commit --all --message "this is release v1.0.1"') + }) - it("should replace version number placeholders in the commit message", () => { - files.create("package.json", { version: "1.0.0" }); + it('should replace version number placeholders in the commit message', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump('patch --all --commit "Releasing v%s. This is release v%s."'); + const cli = bump('patch --all --commit "Releasing v%s. This is release v%s."') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.0.1\n` + - `${check} Git commit\n` - ); + `${check} Updated package.json to 1.0.1\n` + + `${check} Git commit\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(1); - expect(git[0]).to.equal('git commit --all --message "Releasing v1.0.1. This is release v1.0.1."'); - }); + const git = mocks.git() + expect(git.length).to.equal(1) + expect(git[0]).to.equal('git commit --all --message "Releasing v1.0.1. This is release v1.0.1."') + }) - it("should accept an empty commit message", () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept an empty commit message', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump(["patch", "--all", "--commit", ""]); + const cli = bump(['patch', '--all', '--commit', '']) - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.0.1\n` + - `${check} Git commit\n` - ); - - let git = mocks.git(); - expect(git.length).to.equal(1); + `${check} Updated package.json to 1.0.1\n` + + `${check} Git commit\n`, + ) - expect(git[0]).to.equal("git commit --all --message 1.0.1"); - }); + const git = mocks.git() + expect(git.length).to.equal(1) -}); + expect(git[0]).to.equal('git commit --all --message 1.0.1') + }) +}) diff --git a/test/specs/git-push.spec.js b/test/specs/git-push.spec.js index c5d9a4a..6b17baa 100644 --- a/test/specs/git-push.spec.js +++ b/test/specs/git-push.spec.js @@ -1,110 +1,109 @@ -"use strict"; +'use strict' -const { check, files, mocks, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, mocks, bump } = require('../utils') -describe("bump --push", () => { +describe('bump --push', () => { + it('should not push by default', () => { + files.create('package.json', { version: '1.0.0' }) - it("should not push by default", () => { - files.create("package.json", { version: "1.0.0" }); + const cli = bump('major') - let cli = bump("major"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` - ); + `${check} Updated package.json to 2.0.0\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(0); - }); + const git = mocks.git() + expect(git.length).to.equal(0) + }) - it("should not push by default, even if --commit or --tag is used", () => { - files.create("package.json", { version: "1.0.0" }); + it('should not push by default, even if --commit or --tag is used', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("major --commit --tag"); + const cli = bump('major --commit --tag') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Git commit\n` + - `${check} Git tag\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Git commit\n` + + `${check} Git tag\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(2); + const git = mocks.git() + expect(git.length).to.equal(2) - expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json'); - expect(git[1]).to.equal('git tag --annotate --message "release v2.0.0" v2.0.0'); - }); + expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json') + expect(git[1]).to.equal('git tag --annotate --message "release v2.0.0" v2.0.0') + }) - it("should commit and push to git", () => { - files.create("package.json", { version: "1.0.0" }); + it('should commit and push to git', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("major --push"); + const cli = bump('major --push') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Git commit\n` + - `${check} Git push\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Git commit\n` + + `${check} Git push\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(2); + const git = mocks.git() + expect(git.length).to.equal(2) - expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json'); - expect(git[1]).to.equal("git push"); - }); + expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json') + expect(git[1]).to.equal('git push') + }) - it("should push all files", () => { - files.create("package.json", { version: "1.0.0" }); + it('should push all files', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("minor --push --all"); + const cli = bump('minor --push --all') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.1.0\n` + - `${check} Git commit\n` + - `${check} Git push\n` - ); + `${check} Updated package.json to 1.1.0\n` + + `${check} Git commit\n` + + `${check} Git push\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(2); + const git = mocks.git() + expect(git.length).to.equal(2) - expect(git[0]).to.equal('git commit --all --message "release v1.1.0"'); - expect(git[1]).to.equal("git push"); - }); + expect(git[0]).to.equal('git commit --all --message "release v1.1.0"') + expect(git[1]).to.equal('git push') + }) - it("should push git tags", () => { - files.create("package.json", { version: "1.0.0" }); + it('should push git tags', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("premajor --tag --push"); + const cli = bump('premajor --tag --push') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0-beta.1\n` + - `${check} Git commit\n` + - `${check} Git tag\n` + - `${check} Git push\n` - ); - - let git = mocks.git(); - expect(git.length).to.equal(4); - - expect(git[0]).to.equal('git commit --message "release v2.0.0-beta.1" package.json'); - expect(git[1]).to.equal('git tag --annotate --message "release v2.0.0-beta.1" v2.0.0-beta.1'); - expect(git[2]).to.equal("git push"); - expect(git[3]).to.equal("git push --tags"); - }); -}); + `${check} Updated package.json to 2.0.0-beta.1\n` + + `${check} Git commit\n` + + `${check} Git tag\n` + + `${check} Git push\n`, + ) + + const git = mocks.git() + expect(git.length).to.equal(4) + + expect(git[0]).to.equal('git commit --message "release v2.0.0-beta.1" package.json') + expect(git[1]).to.equal('git tag --annotate --message "release v2.0.0-beta.1" v2.0.0-beta.1') + expect(git[2]).to.equal('git push') + expect(git[3]).to.equal('git push --tags') + }) +}) diff --git a/test/specs/git-tag.spec.js b/test/specs/git-tag.spec.js index 04db4a4..61dbb26 100644 --- a/test/specs/git-tag.spec.js +++ b/test/specs/git-tag.spec.js @@ -1,130 +1,129 @@ -"use strict"; +'use strict' -const { check, files, mocks, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, mocks, bump } = require('../utils') -describe("bump --tag", () => { +describe('bump --tag', () => { + it('should not tag by default', () => { + files.create('package.json', { version: '1.0.0' }) - it("should not tag by default", () => { - files.create("package.json", { version: "1.0.0" }); + const cli = bump('major') - let cli = bump("major"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` - ); + `${check} Updated package.json to 2.0.0\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(0); - }); + const git = mocks.git() + expect(git.length).to.equal(0) + }) - it("should not tag by default, even if --commit is used", () => { - files.create("package.json", { version: "1.0.0" }); + it('should not tag by default, even if --commit is used', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("major --commit"); + const cli = bump('major --commit') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Git commit\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Git commit\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(1); - expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json'); - }); + const git = mocks.git() + expect(git.length).to.equal(1) + expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json') + }) - it("should add a git tag", () => { - files.create("package.json", { version: "1.0.0" }); + it('should add a git tag', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("major --commit --tag"); + const cli = bump('major --commit --tag') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Git commit\n` + - `${check} Git tag\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Git commit\n` + + `${check} Git tag\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(2); + const git = mocks.git() + expect(git.length).to.equal(2) - expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json'); - expect(git[1]).to.equal('git tag --annotate --message "release v2.0.0" v2.0.0'); - }); + expect(git[0]).to.equal('git commit --message "release v2.0.0" package.json') + expect(git[1]).to.equal('git tag --annotate --message "release v2.0.0" v2.0.0') + }) - it("should add a git tag, even if --commit is not specified", () => { - files.create("package.json", { version: "1.0.0" }); + it('should add a git tag, even if --commit is not specified', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("minor --tag"); + const cli = bump('minor --tag') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.1.0\n` + - `${check} Git commit\n` + - `${check} Git tag\n` - ); + `${check} Updated package.json to 1.1.0\n` + + `${check} Git commit\n` + + `${check} Git tag\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(2); + const git = mocks.git() + expect(git.length).to.equal(2) - expect(git[0]).to.equal('git commit --message "release v1.1.0" package.json'); - expect(git[1]).to.equal('git tag --annotate --message "release v1.1.0" v1.1.0'); - }); + expect(git[0]).to.equal('git commit --message "release v1.1.0" package.json') + expect(git[1]).to.equal('git tag --annotate --message "release v1.1.0" v1.1.0') + }) - it("should tag all files", () => { - files.create("package.json", { version: "1.0.0" }); + it('should tag all files', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("patch --tag --all"); + const cli = bump('patch --tag --all') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.0.1\n` + - `${check} Git commit\n` + - `${check} Git tag\n` - ); + `${check} Updated package.json to 1.0.1\n` + + `${check} Git commit\n` + + `${check} Git tag\n`, + ) - let git = mocks.git(); - expect(git.length).to.equal(2); + const git = mocks.git() + expect(git.length).to.equal(2) - expect(git[0]).to.equal('git commit --all --message "release v1.0.1"'); - expect(git[1]).to.equal('git tag --annotate --message "release v1.0.1" v1.0.1'); - }); + expect(git[0]).to.equal('git commit --all --message "release v1.0.1"') + expect(git[1]).to.equal('git tag --annotate --message "release v1.0.1" v1.0.1') + }) - it("should push git tags", () => { - files.create("package.json", { version: "1.0.0" }); - files.create("bower.json", { version: "1.0.0" }); + it('should push git tags', () => { + files.create('package.json', { version: '1.0.0' }) + files.create('bower.json', { version: '1.0.0' }) - let cli = bump("premajor --tag --push *.json"); + const cli = bump('premajor --tag --push *.json') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated bower.json to 2.0.0-beta.1\n` + - `${check} Updated package.json to 2.0.0-beta.1\n` + - `${check} Git commit\n` + - `${check} Git tag\n` + - `${check} Git push\n` - ); - - let git = mocks.git(); - expect(git.length).to.equal(4); - - expect(git[0]).to.equal('git commit --message "release v2.0.0-beta.1" bower.json package.json'); - expect(git[1]).to.equal('git tag --annotate --message "release v2.0.0-beta.1" v2.0.0-beta.1'); - expect(git[2]).to.equal("git push"); - expect(git[3]).to.equal("git push --tags"); - }); -}); + `${check} Updated bower.json to 2.0.0-beta.1\n` + + `${check} Updated package.json to 2.0.0-beta.1\n` + + `${check} Git commit\n` + + `${check} Git tag\n` + + `${check} Git push\n`, + ) + + const git = mocks.git() + expect(git.length).to.equal(4) + + expect(git[0]).to.equal('git commit --message "release v2.0.0-beta.1" bower.json package.json') + expect(git[1]).to.equal('git tag --annotate --message "release v2.0.0-beta.1" v2.0.0-beta.1') + expect(git[2]).to.equal('git push') + expect(git[3]).to.equal('git push --tags') + }) +}) diff --git a/test/specs/minor.spec.js b/test/specs/minor.spec.js index 7b393b4..ca2f5fe 100644 --- a/test/specs/minor.spec.js +++ b/test/specs/minor.spec.js @@ -1,84 +1,82 @@ -"use strict"; +'use strict' -const { check, files, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, bump } = require('../utils') -describe("bump minor", () => { +describe('bump minor', () => { + it('should increment an all-zero version number', () => { + files.create('package.json', { version: '0.0.0' }) - it("should increment an all-zero version number", () => { - files.create("package.json", { version: "0.0.0" }); + const cli = bump('minor') - let cli = bump("minor"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 0.1.0\n` - ); + `${check} Updated package.json to 0.1.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "0.1.0" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '0.1.0' }) + }) - it("should reset the patch", () => { - files.create("package.json", { version: "1.2.3" }); + it('should reset the patch', () => { + files.create('package.json', { version: '1.2.3' }) - let cli = bump("minor"); + const cli = bump('minor') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.3.0\n` - ); + `${check} Updated package.json to 1.3.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.3.0" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.3.0' }) + }) - it("should reset the prerelease version", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should reset the prerelease version', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("minor"); + const cli = bump('minor') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.3.0\n` - ); + `${check} Updated package.json to 1.3.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.3.0" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.3.0' }) + }) - it("should not be affected by the --preid flag", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should not be affected by the --preid flag', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("minor --preid alpha"); + const cli = bump('minor --preid alpha') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.3.0\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "1.3.0" }); - }); + `${check} Updated package.json to 1.3.0\n`, + ) - it("should error if there is no existing version number", () => { - files.create("package.json", { name: "my-app" }); - files.create("bower.json", { version: "" }); - files.create("component.json", { version: 0 }); + expect(files.json('package.json')).to.deep.equal({ version: '1.3.0' }) + }) - let cli = bump("minor *.json"); + it('should error if there is no existing version number', () => { + files.create('package.json', { name: 'my-app' }) + files.create('bower.json', { version: '' }) + files.create('component.json', { version: 0 }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr("Unable to determine the current version number. Checked bower.json, component.json, package.json.\n"); - expect(cli).to.have.exitCode(1); + const cli = bump('minor *.json') - expect(files.json("package.json")).to.deep.equal({ name: "my-app" }); - expect(files.json("bower.json")).to.deep.equal({ version: "" }); - expect(files.json("component.json")).to.deep.equal({ version: 0 }); - }); + expect(cli).to.have.stdout('') + expect(cli).to.have.stderr('Unable to determine the current version number. Checked bower.json, component.json, package.json.\n') + expect(cli).to.have.exitCode(1) -}); + expect(files.json('package.json')).to.deep.equal({ name: 'my-app' }) + expect(files.json('bower.json')).to.deep.equal({ version: '' }) + expect(files.json('component.json')).to.deep.equal({ version: 0 }) + }) +}) diff --git a/test/specs/npm.spec.js b/test/specs/npm.spec.js index 16a8202..7a371c9 100644 --- a/test/specs/npm.spec.js +++ b/test/specs/npm.spec.js @@ -1,165 +1,163 @@ -"use strict"; +'use strict' -const { check, files, mocks, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, mocks, bump } = require('../utils') -describe("npm version hooks", () => { - - it("should run the preversion script before updating the version number", () => { - files.create("package.json", { - version: "1.0.0", +describe('npm version hooks', () => { + it('should run the preversion script before updating the version number', () => { + files.create('package.json', { + version: '1.0.0', scripts: { - preversion: "echo hello world", + preversion: 'echo hello world', }, - }); + }) - let cli = bump("major"); + const cli = bump('major') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Npm run preversion\n` + - `${check} Updated package.json to 2.0.0\n` - ); + `${check} Npm run preversion\n` + + `${check} Updated package.json to 2.0.0\n`, + ) - let npm = mocks.npmDetails(); - expect(npm.length).to.equal(1); + const npm = mocks.npmDetails() + expect(npm.length).to.equal(1) - expect(npm[0].cmd).to.equal("npm run preversion --silent"); - expect(npm[0].version).to.equal("1.0.0"); - }); + expect(npm[0].cmd).to.equal('npm run preversion --silent') + expect(npm[0].version).to.equal('1.0.0') + }) - it("should run the version script after updating the version number", () => { - files.create("package.json", { - version: "1.0.0", + it('should run the version script after updating the version number', () => { + files.create('package.json', { + version: '1.0.0', scripts: { - version: "echo hello world", + version: 'echo hello world', }, - }); + }) - let cli = bump("major"); + const cli = bump('major') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Npm run version\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Npm run version\n`, + ) - let npm = mocks.npmDetails(); - expect(npm.length).to.equal(1); + const npm = mocks.npmDetails() + expect(npm.length).to.equal(1) - expect(npm[0].cmd).to.equal("npm run version --silent"); - expect(npm[0].version).to.equal("2.0.0"); - }); + expect(npm[0].cmd).to.equal('npm run version --silent') + expect(npm[0].version).to.equal('2.0.0') + }) - it("should run the postversion script after updating the version number", () => { - files.create("package.json", { - version: "1.0.0", + it('should run the postversion script after updating the version number', () => { + files.create('package.json', { + version: '1.0.0', scripts: { - postversion: "echo hello world", + postversion: 'echo hello world', }, - }); + }) - let cli = bump("major"); + const cli = bump('major') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Npm run postversion\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Npm run postversion\n`, + ) - let npm = mocks.npmDetails(); - expect(npm.length).to.equal(1); + const npm = mocks.npmDetails() + expect(npm.length).to.equal(1) - expect(npm[0].cmd).to.equal("npm run postversion --silent"); - expect(npm[0].version).to.equal("2.0.0"); - }); + expect(npm[0].cmd).to.equal('npm run postversion --silent') + expect(npm[0].version).to.equal('2.0.0') + }) - it("should run all the version scripts and git commands in the correct order", () => { - files.create("package.json", { - version: "1.0.0", + it('should run all the version scripts and git commands in the correct order', () => { + files.create('package.json', { + version: '1.0.0', scripts: { - preversion: "echo hello world", - version: "echo hello world", - postversion: "echo hello world", + preversion: 'echo hello world', + version: 'echo hello world', + postversion: 'echo hello world', }, - }); + }) - let cli = bump("major --commit --tag --push"); + const cli = bump('major --commit --tag --push') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Npm run preversion\n` + - `${check} Updated package.json to 2.0.0\n` + - `${check} Npm run version\n` + - `${check} Git commit\n` + - `${check} Git tag\n` + - `${check} Npm run postversion\n` + - `${check} Git push\n` - ); - - let bin = mocks.all(); - expect(bin.length).to.equal(7); + `${check} Npm run preversion\n` + + `${check} Updated package.json to 2.0.0\n` + + `${check} Npm run version\n` + + `${check} Git commit\n` + + `${check} Git tag\n` + + `${check} Npm run postversion\n` + + `${check} Git push\n`, + ) + + const bin = mocks.all() + expect(bin.length).to.equal(7) // The preversion script runs before anything - expect(bin[0].cmd).to.equal("npm run preversion --silent"); - expect(bin[0].version).to.equal("1.0.0"); + expect(bin[0].cmd).to.equal('npm run preversion --silent') + expect(bin[0].version).to.equal('1.0.0') // The version script runs after the version has been updated, - expect(bin[1].cmd).to.equal("npm run version --silent"); - expect(bin[1].version).to.equal("2.0.0"); + expect(bin[1].cmd).to.equal('npm run version --silent') + expect(bin[1].version).to.equal('2.0.0') // Git commit happens after the version has been updated - expect(bin[2].cmd).to.equal('git commit --message "release v2.0.0" package.json'); - expect(bin[2].version).to.equal("2.0.0"); + expect(bin[2].cmd).to.equal('git commit --message "release v2.0.0" package.json') + expect(bin[2].version).to.equal('2.0.0') // Git tag happens after the version has been updated - expect(bin[3].cmd).to.equal('git tag --annotate --message "release v2.0.0" v2.0.0'); - expect(bin[3].version).to.equal("2.0.0"); + expect(bin[3].cmd).to.equal('git tag --annotate --message "release v2.0.0" v2.0.0') + expect(bin[3].version).to.equal('2.0.0') // The postversion script runs AFTER "git commit" and "git tag", but BEFORE "git push" - expect(bin[4].cmd).to.equal("npm run postversion --silent"); - expect(bin[4].version).to.equal("2.0.0"); + expect(bin[4].cmd).to.equal('npm run postversion --silent') + expect(bin[4].version).to.equal('2.0.0') // Git push happens after everything else - expect(bin[5].cmd).to.equal("git push"); - expect(bin[5].version).to.equal("2.0.0"); + expect(bin[5].cmd).to.equal('git push') + expect(bin[5].version).to.equal('2.0.0') - expect(bin[6].cmd).to.equal("git push --tags"); - expect(bin[6].version).to.equal("2.0.0"); - }); + expect(bin[6].cmd).to.equal('git push --tags') + expect(bin[6].version).to.equal('2.0.0') + }) - it("should skip all version scripts when --ignore-scripts is used", () => { - files.create("package.json", { - version: "1.2.3", + it('should skip all version scripts when --ignore-scripts is used', () => { + files.create('package.json', { + version: '1.2.3', scripts: { - preversion: "echo preversion", - version: "echo version", - postversion: "echo postversion", - } - }); - files.create("package-lock.json", { version: "1.2.3" }); + preversion: 'echo preversion', + version: 'echo version', + postversion: 'echo postversion', + }, + }) + files.create('package-lock.json', { version: '1.2.3' }) - let cli = bump("major --ignore-scripts"); + const cli = bump('major --ignore-scripts') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0\n` + - `${check} Updated package-lock.json to 2.0.0\n` - ); + `${check} Updated package.json to 2.0.0\n` + + `${check} Updated package-lock.json to 2.0.0\n`, + ) // NPM should not have been run at all - let npm = mocks.npm(); - expect(npm.length).to.equal(0); - }); - -}); + const npm = mocks.npm() + expect(npm.length).to.equal(0) + }) +}) diff --git a/test/specs/patch.spec.js b/test/specs/patch.spec.js index 566302e..c110afa 100644 --- a/test/specs/patch.spec.js +++ b/test/specs/patch.spec.js @@ -1,84 +1,82 @@ -"use strict"; +'use strict' -const { check, files, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, bump } = require('../utils') -describe("bump patch", () => { +describe('bump patch', () => { + it('should increment an all-zero version number', () => { + files.create('package.json', { version: '0.0.0' }) - it("should increment an all-zero version number", () => { - files.create("package.json", { version: "0.0.0" }); + const cli = bump('patch') - let cli = bump("patch"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 0.0.1\n` - ); + `${check} Updated package.json to 0.0.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "0.0.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '0.0.1' }) + }) - it("should increment the patch", () => { - files.create("package.json", { version: "1.2.3" }); + it('should increment the patch', () => { + files.create('package.json', { version: '1.2.3' }) - let cli = bump("patch"); + const cli = bump('patch') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.4\n` - ); + `${check} Updated package.json to 1.2.4\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.2.4" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.4' }) + }) - it("should reset the prerelease version", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should reset the prerelease version', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("patch"); + const cli = bump('patch') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.3\n` - ); + `${check} Updated package.json to 1.2.3\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3' }) + }) - it("should not be affected by the --preid flag", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should not be affected by the --preid flag', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("patch --preid alpha"); + const cli = bump('patch --preid alpha') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.3\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3" }); - }); + `${check} Updated package.json to 1.2.3\n`, + ) - it("should error if there is no existing version number", () => { - files.create("package.json", { name: "my-app" }); - files.create("bower.json", { version: "" }); - files.create("component.json", { version: 0 }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3' }) + }) - let cli = bump("patch *.json"); + it('should error if there is no existing version number', () => { + files.create('package.json', { name: 'my-app' }) + files.create('bower.json', { version: '' }) + files.create('component.json', { version: 0 }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr("Unable to determine the current version number. Checked bower.json, component.json, package.json.\n"); - expect(cli).to.have.exitCode(1); + const cli = bump('patch *.json') - expect(files.json("package.json")).to.deep.equal({ name: "my-app" }); - expect(files.json("bower.json")).to.deep.equal({ version: "" }); - expect(files.json("component.json")).to.deep.equal({ version: 0 }); - }); + expect(cli).to.have.stdout('') + expect(cli).to.have.stderr('Unable to determine the current version number. Checked bower.json, component.json, package.json.\n') + expect(cli).to.have.exitCode(1) -}); + expect(files.json('package.json')).to.deep.equal({ name: 'my-app' }) + expect(files.json('bower.json')).to.deep.equal({ version: '' }) + expect(files.json('component.json')).to.deep.equal({ version: 0 }) + }) +}) diff --git a/test/specs/premajor.spec.js b/test/specs/premajor.spec.js index e6d3a88..539ccf2 100644 --- a/test/specs/premajor.spec.js +++ b/test/specs/premajor.spec.js @@ -1,84 +1,82 @@ -"use strict"; +'use strict' -const { check, files, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, bump } = require('../utils') -describe("bump premajor", () => { +describe('bump premajor', () => { + it('should increment an all-zero version number', () => { + files.create('package.json', { version: '0.0.0' }) - it("should increment an all-zero version number", () => { - files.create("package.json", { version: "0.0.0" }); + const cli = bump('premajor') - let cli = bump("premajor"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.0.0-beta.1\n` - ); + `${check} Updated package.json to 1.0.0-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.0.0-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.0.0-beta.1' }) + }) - it("should reset the minor and patch", () => { - files.create("package.json", { version: "1.2.3" }); + it('should reset the minor and patch', () => { + files.create('package.json', { version: '1.2.3' }) - let cli = bump("premajor"); + const cli = bump('premajor') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0-beta.1\n` - ); + `${check} Updated package.json to 2.0.0-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "2.0.0-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '2.0.0-beta.1' }) + }) - it("should reset the prerelease version", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should reset the prerelease version', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("premajor"); + const cli = bump('premajor') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0-beta.1\n` - ); + `${check} Updated package.json to 2.0.0-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "2.0.0-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '2.0.0-beta.1' }) + }) - it("should honor the --preid flag", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should honor the --preid flag', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("premajor --preid alpha"); + const cli = bump('premajor --preid alpha') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 2.0.0-alpha.1\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "2.0.0-alpha.1" }); - }); + `${check} Updated package.json to 2.0.0-alpha.1\n`, + ) - it("should error if there is no existing version number", () => { - files.create("package.json", { name: "my-app" }); - files.create("bower.json", { version: "" }); - files.create("component.json", { version: 0 }); + expect(files.json('package.json')).to.deep.equal({ version: '2.0.0-alpha.1' }) + }) - let cli = bump("premajor *.json"); + it('should error if there is no existing version number', () => { + files.create('package.json', { name: 'my-app' }) + files.create('bower.json', { version: '' }) + files.create('component.json', { version: 0 }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr("Unable to determine the current version number. Checked bower.json, component.json, package.json.\n"); - expect(cli).to.have.exitCode(1); + const cli = bump('premajor *.json') - expect(files.json("package.json")).to.deep.equal({ name: "my-app" }); - expect(files.json("bower.json")).to.deep.equal({ version: "" }); - expect(files.json("component.json")).to.deep.equal({ version: 0 }); - }); + expect(cli).to.have.stdout('') + expect(cli).to.have.stderr('Unable to determine the current version number. Checked bower.json, component.json, package.json.\n') + expect(cli).to.have.exitCode(1) -}); + expect(files.json('package.json')).to.deep.equal({ name: 'my-app' }) + expect(files.json('bower.json')).to.deep.equal({ version: '' }) + expect(files.json('component.json')).to.deep.equal({ version: 0 }) + }) +}) diff --git a/test/specs/preminor.spec.js b/test/specs/preminor.spec.js index 65df293..d8a8526 100644 --- a/test/specs/preminor.spec.js +++ b/test/specs/preminor.spec.js @@ -1,84 +1,82 @@ -"use strict"; +'use strict' -const { check, files, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, bump } = require('../utils') -describe("bump preminor", () => { +describe('bump preminor', () => { + it('should increment an all-zero version number', () => { + files.create('package.json', { version: '0.0.0' }) - it("should increment an all-zero version number", () => { - files.create("package.json", { version: "0.0.0" }); + const cli = bump('preminor') - let cli = bump("preminor"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 0.1.0-beta.1\n` - ); + `${check} Updated package.json to 0.1.0-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "0.1.0-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '0.1.0-beta.1' }) + }) - it("should reset the minor and patch", () => { - files.create("package.json", { version: "1.2.3" }); + it('should reset the minor and patch', () => { + files.create('package.json', { version: '1.2.3' }) - let cli = bump("preminor"); + const cli = bump('preminor') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.3.0-beta.1\n` - ); + `${check} Updated package.json to 1.3.0-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.3.0-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.3.0-beta.1' }) + }) - it("should reset the prerelease version", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should reset the prerelease version', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("preminor"); + const cli = bump('preminor') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.3.0-beta.1\n` - ); + `${check} Updated package.json to 1.3.0-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.3.0-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.3.0-beta.1' }) + }) - it("should honor the --preid flag", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should honor the --preid flag', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("preminor --preid alpha"); + const cli = bump('preminor --preid alpha') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.3.0-alpha.1\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "1.3.0-alpha.1" }); - }); + `${check} Updated package.json to 1.3.0-alpha.1\n`, + ) - it("should error if there is no existing version number", () => { - files.create("package.json", { name: "my-app" }); - files.create("bower.json", { version: "" }); - files.create("component.json", { version: 0 }); + expect(files.json('package.json')).to.deep.equal({ version: '1.3.0-alpha.1' }) + }) - let cli = bump("preminor *.json"); + it('should error if there is no existing version number', () => { + files.create('package.json', { name: 'my-app' }) + files.create('bower.json', { version: '' }) + files.create('component.json', { version: 0 }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr("Unable to determine the current version number. Checked bower.json, component.json, package.json.\n"); - expect(cli).to.have.exitCode(1); + const cli = bump('preminor *.json') - expect(files.json("package.json")).to.deep.equal({ name: "my-app" }); - expect(files.json("bower.json")).to.deep.equal({ version: "" }); - expect(files.json("component.json")).to.deep.equal({ version: 0 }); - }); + expect(cli).to.have.stdout('') + expect(cli).to.have.stderr('Unable to determine the current version number. Checked bower.json, component.json, package.json.\n') + expect(cli).to.have.exitCode(1) -}); + expect(files.json('package.json')).to.deep.equal({ name: 'my-app' }) + expect(files.json('bower.json')).to.deep.equal({ version: '' }) + expect(files.json('component.json')).to.deep.equal({ version: 0 }) + }) +}) diff --git a/test/specs/prepatch.spec.js b/test/specs/prepatch.spec.js index c801a78..2e75b63 100644 --- a/test/specs/prepatch.spec.js +++ b/test/specs/prepatch.spec.js @@ -1,84 +1,82 @@ -"use strict"; +'use strict' -const { check, files, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, bump } = require('../utils') -describe("bump prepatch", () => { +describe('bump prepatch', () => { + it('should increment an all-zero version number', () => { + files.create('package.json', { version: '0.0.0' }) - it("should increment an all-zero version number", () => { - files.create("package.json", { version: "0.0.0" }); + const cli = bump('prepatch') - let cli = bump("prepatch"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 0.0.1-beta.1\n` - ); + `${check} Updated package.json to 0.0.1-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "0.0.1-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '0.0.1-beta.1' }) + }) - it("should reset the minor and patch", () => { - files.create("package.json", { version: "1.2.3" }); + it('should reset the minor and patch', () => { + files.create('package.json', { version: '1.2.3' }) - let cli = bump("prepatch"); + const cli = bump('prepatch') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.4-beta.1\n` - ); + `${check} Updated package.json to 1.2.4-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.2.4-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.4-beta.1' }) + }) - it("should reset the prerelease version", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should reset the prerelease version', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("prepatch"); + const cli = bump('prepatch') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.4-beta.1\n` - ); + `${check} Updated package.json to 1.2.4-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.2.4-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.4-beta.1' }) + }) - it("should honor the --preid flag", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should honor the --preid flag', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("prepatch --preid alpha"); + const cli = bump('prepatch --preid alpha') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.4-alpha.1\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "1.2.4-alpha.1" }); - }); + `${check} Updated package.json to 1.2.4-alpha.1\n`, + ) - it("should error if there is no existing version number", () => { - files.create("package.json", { name: "my-app" }); - files.create("bower.json", { version: "" }); - files.create("component.json", { version: 0 }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.4-alpha.1' }) + }) - let cli = bump("prepatch *.json"); + it('should error if there is no existing version number', () => { + files.create('package.json', { name: 'my-app' }) + files.create('bower.json', { version: '' }) + files.create('component.json', { version: 0 }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr("Unable to determine the current version number. Checked bower.json, component.json, package.json.\n"); - expect(cli).to.have.exitCode(1); + const cli = bump('prepatch *.json') - expect(files.json("package.json")).to.deep.equal({ name: "my-app" }); - expect(files.json("bower.json")).to.deep.equal({ version: "" }); - expect(files.json("component.json")).to.deep.equal({ version: 0 }); - }); + expect(cli).to.have.stdout('') + expect(cli).to.have.stderr('Unable to determine the current version number. Checked bower.json, component.json, package.json.\n') + expect(cli).to.have.exitCode(1) -}); + expect(files.json('package.json')).to.deep.equal({ name: 'my-app' }) + expect(files.json('bower.json')).to.deep.equal({ version: '' }) + expect(files.json('component.json')).to.deep.equal({ version: 0 }) + }) +}) diff --git a/test/specs/prerelease.spec.js b/test/specs/prerelease.spec.js index fce20fa..997db4f 100644 --- a/test/specs/prerelease.spec.js +++ b/test/specs/prerelease.spec.js @@ -1,84 +1,82 @@ -"use strict"; +'use strict' -const { check, files, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, bump } = require('../utils') -describe("bump prerelease", () => { +describe('bump prerelease', () => { + it('should increment an all-zero version number', () => { + files.create('package.json', { version: '0.0.0' }) - it("should increment an all-zero version number", () => { - files.create("package.json", { version: "0.0.0" }); + const cli = bump('prerelease') - let cli = bump("prerelease"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 0.0.1-beta.1\n` - ); + `${check} Updated package.json to 0.0.1-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "0.0.1-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '0.0.1-beta.1' }) + }) - it("should reset the minor and patch", () => { - files.create("package.json", { version: "1.2.3" }); + it('should reset the minor and patch', () => { + files.create('package.json', { version: '1.2.3' }) - let cli = bump("prerelease"); + const cli = bump('prerelease') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.4-beta.1\n` - ); + `${check} Updated package.json to 1.2.4-beta.1\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.2.4-beta.1" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.4-beta.1' }) + }) - it("should reset the prerelease version", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should reset the prerelease version', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("prerelease"); + const cli = bump('prerelease') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.3-beta.5\n` - ); + `${check} Updated package.json to 1.2.3-beta.5\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3-beta.5" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3-beta.5' }) + }) - it("should honor the --preid flag", () => { - files.create("package.json", { version: "1.2.3-beta.4" }); + it('should honor the --preid flag', () => { + files.create('package.json', { version: '1.2.3-beta.4' }) - let cli = bump("prerelease --preid alpha"); + const cli = bump('prerelease --preid alpha') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.3-alpha.1\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3-alpha.1" }); - }); + `${check} Updated package.json to 1.2.3-alpha.1\n`, + ) - it("should error if there is no existing version number", () => { - files.create("package.json", { name: "my-app" }); - files.create("bower.json", { version: "" }); - files.create("component.json", { version: 0 }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3-alpha.1' }) + }) - let cli = bump("prerelease *.json"); + it('should error if there is no existing version number', () => { + files.create('package.json', { name: 'my-app' }) + files.create('bower.json', { version: '' }) + files.create('component.json', { version: 0 }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr("Unable to determine the current version number. Checked bower.json, component.json, package.json.\n"); - expect(cli).to.have.exitCode(1); + const cli = bump('prerelease *.json') - expect(files.json("package.json")).to.deep.equal({ name: "my-app" }); - expect(files.json("bower.json")).to.deep.equal({ version: "" }); - expect(files.json("component.json")).to.deep.equal({ version: 0 }); - }); + expect(cli).to.have.stdout('') + expect(cli).to.have.stderr('Unable to determine the current version number. Checked bower.json, component.json, package.json.\n') + expect(cli).to.have.exitCode(1) -}); + expect(files.json('package.json')).to.deep.equal({ name: 'my-app' }) + expect(files.json('bower.json')).to.deep.equal({ version: '' }) + expect(files.json('component.json')).to.deep.equal({ version: 0 }) + }) +}) diff --git a/test/specs/release.spec.js b/test/specs/release.spec.js index 8588b82..082c879 100644 --- a/test/specs/release.spec.js +++ b/test/specs/release.spec.js @@ -1,152 +1,150 @@ -"use strict"; +'use strict' -const { check, files, bump } = require("../utils"); -const { expect } = require("chai"); +const { expect } = require('chai') +const { check, files, bump } = require('../utils') -describe("bump [version]", () => { +describe('bump [version]', () => { + it('should accept an #.#.# version number', () => { + files.create('package.json', { version: '1.0.0' }) - it("should accept an #.#.# version number", () => { - files.create("package.json", { version: "1.0.0" }); + const cli = bump('123.45.678') - let cli = bump("123.45.678"); - - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 123.45.678\n` - ); + `${check} Updated package.json to 123.45.678\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "123.45.678" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '123.45.678' }) + }) - it("should accept an #.#.# version number that's all zeroes", () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept an #.#.# version number that\'s all zeroes', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("0.0.0"); + const cli = bump('0.0.0') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 0.0.0\n` - ); + `${check} Updated package.json to 0.0.0\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "0.0.0" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '0.0.0' }) + }) - it("should accept an #.#.#-X version number", () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept an #.#.#-X version number', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("123.45.678-beta"); + const cli = bump('123.45.678-beta') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 123.45.678-beta\n` - ); + `${check} Updated package.json to 123.45.678-beta\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "123.45.678-beta" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '123.45.678-beta' }) + }) - it("should accept an #.#.#-# version number", () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept an #.#.#-# version number', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("123.45.678-910"); + const cli = bump('123.45.678-910') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 123.45.678-910\n` - ); + `${check} Updated package.json to 123.45.678-910\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "123.45.678-910" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '123.45.678-910' }) + }) - it("should accept an #.#.#-X.# version number", () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept an #.#.#-X.# version number', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("123.45.678-beta.910"); + const cli = bump('123.45.678-beta.910') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 123.45.678-beta.910\n` - ); + `${check} Updated package.json to 123.45.678-beta.910\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "123.45.678-beta.910" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '123.45.678-beta.910' }) + }) - it("should accept an #.#.#-#.# version number", () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept an #.#.#-#.# version number', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("123.45.678-987.654"); + const cli = bump('123.45.678-987.654') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 123.45.678-987.654\n` - ); + `${check} Updated package.json to 123.45.678-987.654\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "123.45.678-987.654" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '123.45.678-987.654' }) + }) - it("should accept an #.#.#-X.X version number", () => { - files.create("package.json", { version: "1.0.0" }); + it('should accept an #.#.#-X.X version number', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("123.45.678-alpha.beta"); + const cli = bump('123.45.678-alpha.beta') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 123.45.678-alpha.beta\n` - ); + `${check} Updated package.json to 123.45.678-alpha.beta\n`, + ) - expect(files.json("package.json")).to.deep.equal({ version: "123.45.678-alpha.beta" }); - }); + expect(files.json('package.json')).to.deep.equal({ version: '123.45.678-alpha.beta' }) + }) - it("should not be affected by the --preid flag", () => { - files.create("package.json", { version: "1.0.0" }); + it('should not be affected by the --preid flag', () => { + files.create('package.json', { version: '1.0.0' }) - let cli = bump("1.2.3-beta.1 --preid alpha"); + const cli = bump('1.2.3-beta.1 --preid alpha') - expect(cli).to.have.stderr(""); - expect(cli).to.have.exitCode(0); + expect(cli).to.have.stderr('') + expect(cli).to.have.exitCode(0) expect(cli).to.have.stdout( - `${check} Updated package.json to 1.2.3-beta.1\n` - ); - - expect(files.json("package.json")).to.deep.equal({ version: "1.2.3-beta.1" }); - }); + `${check} Updated package.json to 1.2.3-beta.1\n`, + ) - it("should error if there's no current version number", () => { - files.create("package.json", { version: "" }); + expect(files.json('package.json')).to.deep.equal({ version: '1.2.3-beta.1' }) + }) - let cli = bump("1.2.3"); + it('should error if there\'s no current version number', () => { + files.create('package.json', { version: '' }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.exitCode(1); - expect(cli).to.have.stderr("Unable to determine the current version number. Checked package.json.\n"); + const cli = bump('1.2.3') - expect(files.json("package.json")).to.deep.equal({ version: "" }); - }); + expect(cli).to.have.stdout('') + expect(cli).to.have.exitCode(1) + expect(cli).to.have.stderr('Unable to determine the current version number. Checked package.json.\n') - it("should error on an X.X.X version number", () => { - files.create("package.json", { version: "1.0.0" }); + expect(files.json('package.json')).to.deep.equal({ version: '' }) + }) - let cli = bump("A.B.C"); + it('should error on an X.X.X version number', () => { + files.create('package.json', { version: '1.0.0' }) - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr("Could not find file: A.B.C.\n"); - expect(cli).to.have.exitCode(1); + const cli = bump('A.B.C') - expect(files.json("package.json")).to.deep.equal({ version: "1.0.0" }); - }); + expect(cli).to.have.stdout('') + expect(cli).to.have.stderr('Could not find file: A.B.C.\n') + expect(cli).to.have.exitCode(1) -}); + expect(files.json('package.json')).to.deep.equal({ version: '1.0.0' }) + }) +}) diff --git a/test/utils/bump.js b/test/utils/bump.js index f6f1ab4..c96c18e 100644 --- a/test/utils/bump.js +++ b/test/utils/bump.js @@ -1,16 +1,16 @@ -"use strict"; +'use strict' -const chai = require("chai"); -const chaiExec = require("@jsdevtools/chai-exec"); +const chai = require('chai') +const chaiExec = require('@jsdevtools/chai-exec') -chai.use(chaiExec); +chai.use(chaiExec) chaiExec.defaults = { - command: "node", - args: "../../bin/bumpp.js", + command: 'node', + args: '../../bin/bumpp.js', options: { - cwd: "test/.tmp", + cwd: 'test/.tmp', }, -}; +} -module.exports = chaiExec; +module.exports = chaiExec diff --git a/test/utils/files.js b/test/utils/files.js index 95a41c6..17b4947 100644 --- a/test/utils/files.js +++ b/test/utils/files.js @@ -1,9 +1,9 @@ -"use strict"; +'use strict' -const fs = require("fs"); -const path = require("path"); +const fs = require('fs') +const path = require('path') -const tempDir = path.resolve(__dirname, "..", ".tmp"); +const tempDir = path.resolve(__dirname, '..', '.tmp') const files = module.exports = { /** @@ -12,16 +12,15 @@ const files = module.exports = { * @param {string} name - The file name (e.g. "package.json") * @param {string|object} [contents] - The file contents */ - create (name, contents) { - if (typeof contents === "object") { - contents = JSON.stringify(contents, null, 2); - } + create(name, contents) { + if (typeof contents === 'object') + contents = JSON.stringify(contents, null, 2) - let filePath = path.join(tempDir, name); - let dirPath = path.dirname(filePath); + const filePath = path.join(tempDir, name) + const dirPath = path.dirname(filePath) - fs.mkdirSync(dirPath, { recursive: true }); - fs.writeFileSync(filePath, contents); + fs.mkdirSync(dirPath, { recursive: true }) + fs.writeFileSync(filePath, contents) }, /** @@ -30,12 +29,12 @@ const files = module.exports = { * @param {string} name - The file name (e.g. "README.md", "script1.js") * @returns {object} */ - text (name) { + text(name) { try { - return fs.readFileSync(path.join(tempDir, name), "utf8"); + return fs.readFileSync(path.join(tempDir, name), 'utf8') } catch (e) { - return ""; + return '' } }, @@ -46,13 +45,13 @@ const files = module.exports = { * @param {string} name - The file name (e.g. "package.json") * @returns {object|undefined} */ - json (name) { + json(name) { try { - let json = files.text(name); - return JSON.parse(json); + const json = files.text(name) + return JSON.parse(json) } catch (e) { - return undefined; + return undefined } }, -}; +} diff --git a/test/utils/fixtures.js b/test/utils/fixtures.js index 4f32a2c..eeb638a 100644 --- a/test/utils/fixtures.js +++ b/test/utils/fixtures.js @@ -1,13 +1,13 @@ -"use strict"; +'use strict' -const fs = require("fs"); -const path = require("path"); +const fs = require('fs') +const path = require('path') -const filesDir = path.resolve("test", "fixtures", "files"); +const filesDir = path.resolve('test', 'fixtures', 'files') module.exports = { - license: fs.readFileSync(path.join(filesDir, "LICENSE"), "utf8"), - readme: fs.readFileSync(path.join(filesDir, "README.md"), "utf8"), - script1: fs.readFileSync(path.join(filesDir, "script1.js"), "utf8"), - script2: fs.readFileSync(path.join(filesDir, "script2.js"), "utf8"), -}; + license: fs.readFileSync(path.join(filesDir, 'LICENSE'), 'utf8'), + readme: fs.readFileSync(path.join(filesDir, 'README.md'), 'utf8'), + script1: fs.readFileSync(path.join(filesDir, 'script1.js'), 'utf8'), + script2: fs.readFileSync(path.join(filesDir, 'script2.js'), 'utf8'), +} diff --git a/test/utils/index.js b/test/utils/index.js index 681161a..49566b0 100644 --- a/test/utils/index.js +++ b/test/utils/index.js @@ -1,10 +1,10 @@ -"use strict"; +'use strict' module.exports = { - bump: require("./bump"), - check: require("./symbols").check, - info: require("./symbols").info, - files: require("./files"), - fixtures: require("./fixtures"), - mocks: require("./mocks"), -}; + bump: require('./bump'), + check: require('./symbols').check, + info: require('./symbols').info, + files: require('./files'), + fixtures: require('./fixtures'), + mocks: require('./mocks'), +} diff --git a/test/utils/mocks.js b/test/utils/mocks.js index 27c5ee7..96b27eb 100644 --- a/test/utils/mocks.js +++ b/test/utils/mocks.js @@ -1,6 +1,6 @@ -"use strict"; +'use strict' -const files = require("./files"); +const files = require('./files') const mocks = module.exports = { /** @@ -8,8 +8,8 @@ const mocks = module.exports = { * * @returns {string[]} */ - git () { - return mocks.gitDetails().map(mock => mock.cmd); + git() { + return mocks.gitDetails().map(mock => mock.cmd) }, /** @@ -17,8 +17,8 @@ const mocks = module.exports = { * * @returns {object[]} */ - gitDetails () { - return mocks.all().filter(mock => mock.bin === "git"); + gitDetails() { + return mocks.all().filter(mock => mock.bin === 'git') }, /** @@ -26,8 +26,8 @@ const mocks = module.exports = { * * @returns {string[]} */ - npm () { - return mocks.npmDetails().map(mock => mock.cmd); + npm() { + return mocks.npmDetails().map(mock => mock.cmd) }, /** @@ -35,8 +35,8 @@ const mocks = module.exports = { * * @returns {object[]} */ - npmDetails () { - return mocks.all().filter(mock => mock.bin === "npm"); + npmDetails() { + return mocks.all().filter(mock => mock.bin === 'npm') }, /** @@ -44,8 +44,8 @@ const mocks = module.exports = { * * @returns {object[]} */ - all () { - return files.json("mocks.json") || []; + all() { + return files.json('mocks.json') || [] }, /** @@ -54,9 +54,9 @@ const mocks = module.exports = { * @param {string} bin - The binary that was executed (e.g. "git", "npm") * @param {string[]} args - The CLI arguments */ - record (bin, args) { + record(bin, args) { // Open the existing file, if any - let array = files.json("mocks.json") || []; + const array = files.json('mocks.json') || [] // Add an entry for this execution array.push({ @@ -65,16 +65,16 @@ const mocks = module.exports = { args, // Record the command that was executed - cmd: bin + " " + args.map(quoteArgs).join(" "), + cmd: `${bin} ${args.map(quoteArgs).join(' ')}`, // Record the version number at the time that the command was executed - version: files.json("package.json").version, - }); + version: files.json('package.json').version, + }) // Save the changes - files.create("mocks.json", array); + files.create('mocks.json', array) }, -}; +} /** * Adds quotes around an argument if it contains whitespace characters @@ -82,11 +82,10 @@ const mocks = module.exports = { * @param {string} arg * @returns {string} */ -function quoteArgs (arg) { - if (/\s+/.test(arg)) { - return `"${arg}"`; - } - else { - return arg; - } +function quoteArgs(arg) { + if (/\s+/.test(arg)) + return `"${arg}"` + + else + return arg } diff --git a/test/utils/symbols.js b/test/utils/symbols.js index 0d7873c..67c7efb 100644 --- a/test/utils/symbols.js +++ b/test/utils/symbols.js @@ -1,7 +1,7 @@ -"use strict"; +'use strict' -const stripAnsi = require("strip-ansi"); -const logSymbols = require("log-symbols"); +const stripAnsi = require('strip-ansi') +const logSymbols = require('log-symbols') module.exports = { /** @@ -15,4 +15,4 @@ module.exports = { * with the ANSI color sequences removed */ info: stripAnsi(logSymbols.info), -}; +}