From 20b0c4420e5466a7d7ed16fb3fe4981609173187 Mon Sep 17 00:00:00 2001
From: Justin Dietz
Date: Thu, 9 Sep 2021 09:29:05 -0700
Subject: [PATCH] fix: switches to standard prettier and eslint and reformat
code
* docs: fixes contributors shield
* style: removes xo and replaces with standard eslint and prettier and applies rules to 01_bug_report
this is in preparation for switching to jest and migrated to nx
COMPLETES: #211
* test: adds "unused" const back to fix tests
* refactor: move config to files outside of package.json
* Merge branch 'master' of https://github.com/semantic-release-plus/semantic-release into update-from-master
* chore(deps): update dependency p-retry to v4.6.0
* chore(deps): update dependency codecov to v3.8.3
* chore(deps): update dependency sinon to v11.1.2
* Merge branch 'master' of https://github.com/semantic-release-plus/semantic-release into update-from-master
* fix: updates lint-staged conifg
Co-authored-by: Renovate Bot
---
.editorconfig | 13 +
.eslintrc.json | 11 +
.github/ISSUE_TEMPLATE/01_bug_report.md | 41 +-
.github/ISSUE_TEMPLATE/02_feature_request.md | 33 +-
.../ISSUE_TEMPLATE/03_plugin_suggestion.md | 25 +-
.github/workflows/main.yml | 7 +-
.husky/.gitignore | 1 +
.husky/pre-commit | 4 +
.lintstagedrc.json | 4 +
.nycrc.json | 5 +
.prettierignore | 5 +
.prettierrc | 3 +
renovate.json => .renovaterc.json | 0
.vscode/settings.json | 10 +-
CODE_OF_CONDUCT.md | 20 +-
CONTRIBUTING.md | 18 +-
README.md | 5 +
SUMMARY.md | 59 +-
bin/semantic-release.js | 10 +-
cli.js | 92 +-
docs/developer-guide/js-api.md | 79 +-
docs/developer-guide/plugin.md | 182 +-
docs/extending/plugins-list.md | 15 +-
.../shareable-configurations-list.md | 3 +-
docs/recipes/README.md | 6 +-
docs/recipes/distribution-channels.md | 1 +
docs/recipes/expected-next-version.md | 5 +-
docs/recipes/git-auth-ssh-keys.md | 5 +-
docs/recipes/github-actions.md | 7 +-
docs/recipes/gitlab-ci.md | 5 +-
docs/recipes/maintenance-releases.md | 3 +-
docs/recipes/nx-monorepo.md | 6 +-
docs/recipes/pre-releases.md | 1 +
docs/support/FAQ.md | 39 +-
docs/support/troubleshooting.md | 1 +
docs/usage/ci-configuration.md | 5 +-
docs/usage/configuration.md | 1 +
docs/usage/plugins.md | 20 +-
docs/usage/workflow-configuration.md | 46 +-
index.js | 204 +-
lib/branches/expand.js | 16 +-
lib/branches/get-tags.js | 25 +-
lib/branches/index.js | 59 +-
lib/branches/normalize.js | 41 +-
lib/definitions/branches.js | 26 +-
lib/definitions/errors.js | 160 +-
lib/definitions/plugins.js | 53 +-
lib/get-commits.js | 15 +-
lib/get-config.js | 54 +-
lib/get-error.js | 2 +-
lib/get-git-auth-url.js | 54 +-
lib/get-last-release.js | 21 +-
lib/get-logger.js | 31 +-
lib/get-next-version.js | 44 +-
lib/get-release-to-add.js | 34 +-
lib/git.js | 142 +-
lib/hide-sensitive.js | 23 +-
lib/plugins/index.js | 66 +-
lib/plugins/normalize.js | 49 +-
lib/plugins/pipeline.js | 63 +-
lib/plugins/utils.js | 31 +-
lib/utils.js | 46 +-
lib/verify.js | 21 +-
package-lock.json | 5132 +++++------------
package.json | 43 +-
recipes/git-hosted-services/README.md | 1 -
recipes/package-managers-and-languages.md | 1 -
test/branches/branches.test.js | 394 +-
test/branches/expand.test.js | 91 +-
test/branches/get-tags.test.js | 299 +-
test/branches/normalize.test.js | 354 +-
test/cli.test.js | 281 +-
test/definitions/branches.test.js | 156 +-
test/definitions/plugins.test.js | 30 +-
test/fixtures/plugin-log-env.js | 2 +-
test/fixtures/plugin-result-config.js | 2 +-
test/get-commits.test.js | 56 +-
test/get-config.test.js | 312 +-
test/get-git-auth-url.test.js | 241 +-
test/get-last-release.test.js | 79 +-
test/get-logger.test.js | 7 +-
test/get-next-version.test.js | 175 +-
test/get-release-to-add.test.js | 154 +-
test/git.test.js | 377 +-
test/helpers/git-utils.js | 142 +-
test/helpers/gitbox.js | 20 +-
test/helpers/mockserver.js | 42 +-
test/helpers/npm-registry.js | 54 +-
test/helpers/npm-utils.js | 6 +-
test/hide-sensitive.test.js | 54 +-
test/index.test.js | 1123 ++--
test/integration.test.js | 516 +-
test/plugins/normalize.test.js | 183 +-
test/plugins/pipeline.test.js | 35 +-
test/plugins/plugins.test.js | 174 +-
test/plugins/utils.test.js | 172 +-
test/utils.test.js | 85 +-
test/verify.test.js | 58 +-
98 files changed, 6387 insertions(+), 6540 deletions(-)
create mode 100644 .editorconfig
create mode 100644 .eslintrc.json
create mode 100644 .husky/.gitignore
create mode 100644 .husky/pre-commit
create mode 100644 .lintstagedrc.json
create mode 100644 .nycrc.json
create mode 100644 .prettierignore
create mode 100644 .prettierrc
rename renovate.json => .renovaterc.json (100%)
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..6e87a003da
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,13 @@
+# Editor configuration, see http://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000000..a209fcbaf1
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,11 @@
+{
+ "extends": ["eslint:recommended", "prettier"],
+ "parserOptions": {
+ "ecmaVersion": 2018
+ },
+ "env": {
+ "node": true,
+ "es6": true
+ },
+ "rules": {}
+}
diff --git a/.github/ISSUE_TEMPLATE/01_bug_report.md b/.github/ISSUE_TEMPLATE/01_bug_report.md
index c6caad9827..32ffc19563 100644
--- a/.github/ISSUE_TEMPLATE/01_bug_report.md
+++ b/.github/ISSUE_TEMPLATE/01_bug_report.md
@@ -1,21 +1,20 @@
----
-name: Bug report
-about: Something not working as expected
-
----
-
-## Current behavior
-
-
-
-## Expected behavior
-
-
-
-## Environment
-
-- **semantic-release** version:
-- CI environment:
-- Plugins used:
-- **semantic-release** configuration:
-- CI logs:
+---
+name: Bug report
+about: Something not working as expected
+---
+
+## Current behavior
+
+
+
+## Expected behavior
+
+
+
+## Environment
+
+- **semantic-release** version:
+- CI environment:
+- Plugins used:
+- **semantic-release** configuration:
+- CI logs:
diff --git a/.github/ISSUE_TEMPLATE/02_feature_request.md b/.github/ISSUE_TEMPLATE/02_feature_request.md
index 901e2227f2..97f06e5ba0 100644
--- a/.github/ISSUE_TEMPLATE/02_feature_request.md
+++ b/.github/ISSUE_TEMPLATE/02_feature_request.md
@@ -1,17 +1,16 @@
----
-name: Feature request
-about: Wouldn’t it be nice if semantic-release could ...
-
----
-
-## New feature motivation
-
-
-
-## New feature description
-
-
-
-## New feature implementation
-
-
+---
+name: Feature request
+about: Wouldn’t it be nice if semantic-release could ...
+---
+
+## New feature motivation
+
+
+
+## New feature description
+
+
+
+## New feature implementation
+
+
diff --git a/.github/ISSUE_TEMPLATE/03_plugin_suggestion.md b/.github/ISSUE_TEMPLATE/03_plugin_suggestion.md
index ed68b5a7e0..ac55426caa 100644
--- a/.github/ISSUE_TEMPLATE/03_plugin_suggestion.md
+++ b/.github/ISSUE_TEMPLATE/03_plugin_suggestion.md
@@ -1,13 +1,12 @@
----
-name: New plugin suggestion
-about: Integrate with a new platform, etc
-
----
-
-## New plugin motivation
-
-
-
-## Third-party documentation
-
-
+---
+name: New plugin suggestion
+about: Integrate with a new platform, etc
+---
+
+## New plugin motivation
+
+
+
+## Third-party documentation
+
+
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 5bc764e092..0407389bab 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -7,7 +7,7 @@ on:
- next
- beta
- alpha
- - "*.x" # maintenance releases branches
+ - '*.x' # maintenance releases branches
# renovate/** branches are generated by https://github.com/apps/renovate
- renovate/**
@@ -28,7 +28,8 @@ jobs:
cache: npm
- run: npm ci
- run: npm run lint
-
+ - run: npm run format:check
+
test:
needs: lint
strategy:
@@ -49,7 +50,7 @@ jobs:
cache: npm
- run: npm ci
- run: npm run test:ci
-
+
release:
name: release
runs-on: ubuntu-latest
diff --git a/.husky/.gitignore b/.husky/.gitignore
new file mode 100644
index 0000000000..31354ec138
--- /dev/null
+++ b/.husky/.gitignore
@@ -0,0 +1 @@
+_
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100644
index 0000000000..36af219892
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1,4 @@
+#!/bin/sh
+. "$(dirname "$0")/_/husky.sh"
+
+npx lint-staged
diff --git a/.lintstagedrc.json b/.lintstagedrc.json
new file mode 100644
index 0000000000..88732ae778
--- /dev/null
+++ b/.lintstagedrc.json
@@ -0,0 +1,4 @@
+{
+ "*.js": "eslint --fix",
+ "*": "prettier --write --ignore-unknown"
+}
diff --git a/.nycrc.json b/.nycrc.json
new file mode 100644
index 0000000000..3ba41244fe
--- /dev/null
+++ b/.nycrc.json
@@ -0,0 +1,5 @@
+{
+ "include": ["lib/**/*.js", "index.js", "cli.js"],
+ "reporter": ["json", "text", "html"],
+ "all": true
+}
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000000..eafabc516d
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,5 @@
+# Add files here to ignore them from prettier formatting
+
+/dist
+/coverage
+/.nyc_output
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000000..544138be45
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,3 @@
+{
+ "singleQuote": true
+}
diff --git a/renovate.json b/.renovaterc.json
similarity index 100%
rename from renovate.json
rename to .renovaterc.json
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 4672862dd8..0967ef424b 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,9 +1 @@
-{
- "[javascript]": {
- "editor.defaultFormatter": "samverschueren.linter-xo"
- },
- "xo.enable": true,
- "xo.format.enable": true,
- "editor.formatOnSave": false,
- "jira-plugin.workingProject": ""
-}
+{}
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 9df7262277..c3cc2cc8bd 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
Examples of behavior that contributes to creating a positive environment include:
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
+- Using welcoming and inclusive language
+- Being respectful of differing viewpoints and experiences
+- Gracefully accepting constructive criticism
+- Focusing on what is best for the community
+- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
+- The use of sexualized language or imagery and unwelcome sexual attention or advances
+- Trolling, insulting/derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or electronic address, without explicit permission
+- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5850ae7ff8..d6b24e4f94 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,6 +3,7 @@
✨ Thanks for contributing to **semantic-release**! ✨
As a contributor, here are the guidelines we would like you to follow:
+
- [Code of conduct](#code-of-conduct)
- [How can I contribute?](#how-can-i-contribute)
- [Using the issue tracker](#using-the-issue-tracker)
@@ -64,24 +65,31 @@ Here is a summary of the steps to follow:
1. [Set up the workspace](#set-up-the-workspace)
2. If you cloned a while ago, get the latest changes from upstream and update dependencies:
+
```bash
$ git checkout master
$ git pull upstream master
$ rm -rf node_modules
$ npm install
```
+
3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix:
+
```bash
$ git checkout -b
```
+
4. Make your code changes, following the [Coding rules](#coding-rules)
5. Push your topic branch up to your fork:
+
```bash
$ git push origin
```
+
6. [Open a Pull Request](https://help.github.com/articles/creating-a-pull-request/#creating-the-pull-request) with a clear title and description.
**Tips**:
+
- For ambitious tasks, open a Pull Request as soon as possible with the `[WIP]` prefix in the title, in order to get feedback and help from the community.
- [Allow semantic-release maintainers to make changes to your Pull Request branch](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork). This way, we can rebase it and make some minor changes if necessary. All changes we make will be done in new commit and we'll ask for your approval before merging them.
@@ -90,6 +98,7 @@ $ git push origin
### Source code
To ensure consistency and quality throughout the source code, all code modifications must have:
+
- No [linting](#lint) errors
- A [test](#tests) for every possible case introduced by your code change
- **100%** test coverage
@@ -100,6 +109,7 @@ To ensure consistency and quality throughout the source code, all code modificat
### Documentation
To ensure consistency and quality, all documentation modifications must:
+
- Refer to brand in [bold](https://help.github.com/articles/basic-writing-and-formatting-syntax/#styling-text) with proper capitalization, i.e. **GitHub**, **semantic-release**, **npm**
- Prefer [tables](https://help.github.com/articles/organizing-information-with-tables) over [lists](https://help.github.com/articles/basic-writing-and-formatting-syntax/#lists) when listing key values, i.e. List of options with their description
- Use [links](https://help.github.com/articles/basic-writing-and-formatting-syntax/#links) when you are referring to:
@@ -121,6 +131,7 @@ To ensure consistency and quality, all documentation modifications must:
#### Atomic commits
If possible, make [atomic commits](https://en.wikipedia.org/wiki/Atomic_commit), which means:
+
- a commit should contain exactly one self-contained functional change
- a functional change should be contained in exactly one commit
- a commit should not create an inconsistent state (such as test errors, linting errors, partial fix, feature with documentation etc...)
@@ -152,7 +163,7 @@ If the commit reverts a previous commit, it should begin with `revert: `, follow
The type must be one of the following:
| Type | Description |
-|--------------|-------------------------------------------------------------------------------------------------------------|
+| ------------ | ----------------------------------------------------------------------------------------------------------- |
| **build** | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
| **ci** | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
| **docs** | Documentation only changes |
@@ -172,10 +183,12 @@ The subject contains succinct description of the change:
- no dot (.) at the end
#### Body
+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
#### Footer
+
The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
@@ -224,6 +237,7 @@ All the [semantic-release](https://github.com/semantic-release) repositories use
Before pushing your code changes make sure there are no linting errors with `npm run lint`.
**Tips**:
+
- Most linting errors can be automatically fixed with `npm run lint -- --fix`.
- Install the [XO plugin](https://github.com/sindresorhus/xo#editor-plugins) for your editor to see linting errors directly in your editor and automatically fix them on save.
@@ -240,6 +254,7 @@ $ npm run test
```
**Tips:** During development you can:
+
- run only a subset of test files with `ava `, for example `ava test/mytestfile.test.js`
- run in watch mode with `ava -w` to automatically run a test file when you modify it
- run only the test you are working on by adding [`.only` to the test definition](https://github.com/avajs/ava#running-specific-tests)
@@ -251,6 +266,7 @@ All the [semantic-release](https://github.com/semantic-release) repositories use
After staging your changes with `git add`, run `npm run cm` to start the interactive commit message CLI.
### Merging Upstream
+
Make sure you have an upstream remote added `git remote add upstream https://github.com/semantic-release/semantic-release.git`
1. `git checkout -b merge-upstream`
diff --git a/README.md b/README.md
index 507afb171d..adf81daeed 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,11 @@
+
+
+
+
+
diff --git a/SUMMARY.md b/SUMMARY.md
index 875a7f3657..dea5592fb0 100644
--- a/SUMMARY.md
+++ b/SUMMARY.md
@@ -1,47 +1,46 @@
# Table of contents
-* [Introduction](README.md)
+- [Introduction](README.md)
## Usage
-* [Getting started](docs/usage/getting-started.md#getting-started)
-* [Installation](docs/usage/installation.md#installation)
-* [CI Configuration](docs/usage/ci-configuration.md#ci-configuration)
-* [Configuration](docs/usage/configuration.md#configuration)
-* [Plugins](docs/usage/plugins.md)
-* [Workflow configuration](docs/usage/workflow-configuration.md)
-* [Shareable configurations](docs/usage/shareable-configurations.md)
+- [Getting started](docs/usage/getting-started.md#getting-started)
+- [Installation](docs/usage/installation.md#installation)
+- [CI Configuration](docs/usage/ci-configuration.md#ci-configuration)
+- [Configuration](docs/usage/configuration.md#configuration)
+- [Plugins](docs/usage/plugins.md)
+- [Workflow configuration](docs/usage/workflow-configuration.md)
+- [Shareable configurations](docs/usage/shareable-configurations.md)
## Extending
-* [Plugins](docs/extending/plugins-list.md)
-* [Shareable configuration](docs/extending/shareable-configurations-list.md)
+- [Plugins](docs/extending/plugins-list.md)
+- [Shareable configuration](docs/extending/shareable-configurations-list.md)
## Recipes
-* [CI configurations](docs/recipes/README.md)
- * [CircleCI 2.0](docs/recipes/circleci-workflows.md)
- * [Travis CI](docs/recipes/travis.md)
- * [GitLab CI](docs/recipes/gitlab-ci.md)
-* [Git hosted services](recipes/git-hosted-services/README.md)
- * [Git authentication with SSH keys](docs/recipes/git-auth-ssh-keys.md)
-* [Package managers and languages](recipes/package-managers-and-languages.md)
-* [Monorepos](docs/recipes/README.md#Monorepos)
- * [nx monorepo](docs/recipes/nx-monorepo.md)
-* [Utility](docs/recipes/README.md#Utility)
- * [Get expected next version](docs/recipes/expected-next-version.md)
+- [CI configurations](docs/recipes/README.md)
+ - [CircleCI 2.0](docs/recipes/circleci-workflows.md)
+ - [Travis CI](docs/recipes/travis.md)
+ - [GitLab CI](docs/recipes/gitlab-ci.md)
+- [Git hosted services](recipes/git-hosted-services/README.md)
+ - [Git authentication with SSH keys](docs/recipes/git-auth-ssh-keys.md)
+- [Package managers and languages](recipes/package-managers-and-languages.md)
+- [Monorepos](docs/recipes/README.md#Monorepos)
+ - [nx monorepo](docs/recipes/nx-monorepo.md)
+- [Utility](docs/recipes/README.md#Utility)
+ - [Get expected next version](docs/recipes/expected-next-version.md)
## Developer guide
-* [JavaScript API](docs/developer-guide/js-api.md)
-* [Plugin development](docs/developer-guide/plugin.md)
-* [Shareable configuration development](docs/developer-guide/shareable-configuration.md)
+- [JavaScript API](docs/developer-guide/js-api.md)
+- [Plugin development](docs/developer-guide/plugin.md)
+- [Shareable configuration development](docs/developer-guide/shareable-configuration.md)
## Support
-* [Resources](docs/support/resources.md)
-* [Frequently Asked Questions](docs/support/FAQ.md)
-* [Troubleshooting](docs/support/troubleshooting.md)
-* [Node version requirement](docs/support/node-version.md)
-* [Node Support Policy](docs/support/node-support-policy.md)
-
+- [Resources](docs/support/resources.md)
+- [Frequently Asked Questions](docs/support/FAQ.md)
+- [Troubleshooting](docs/support/troubleshooting.md)
+- [Node version requirement](docs/support/node-version.md)
+- [Node Support Policy](docs/support/node-support-policy.md)
diff --git a/bin/semantic-release.js b/bin/semantic-release.js
index c7d928d2bb..7dedfab4ff 100755
--- a/bin/semantic-release.js
+++ b/bin/semantic-release.js
@@ -22,15 +22,19 @@ See https://github.com/semantic-release/semantic-release/blob/master/docs/suppor
}
execa('git', ['--version'])
- .then(({stdout}) => {
+ .then(({ stdout }) => {
var gitVersion = findVersions(stdout)[0];
if (semver.lt(gitVersion, MIN_GIT_VERSION)) {
- console.error(`[semantic-release]: Git version ${MIN_GIT_VERSION} is required. Found ${gitVersion}.`);
+ console.error(
+ `[semantic-release]: Git version ${MIN_GIT_VERSION} is required. Found ${gitVersion}.`
+ );
process.exit(1);
}
})
.catch((error) => {
- console.error(`[semantic-release]: Git version ${MIN_GIT_VERSION} is required. No git binary found.`);
+ console.error(
+ `[semantic-release]: Git version ${MIN_GIT_VERSION} is required. No git binary found.`
+ );
console.error(error);
process.exit(1);
});
diff --git a/cli.js b/cli.js
index 2dbf7b65d8..0dc42ffe94 100755
--- a/cli.js
+++ b/cli.js
@@ -1,4 +1,4 @@
-const {argv, env, stderr} = require('process'); // eslint-disable-line node/prefer-global/process
+const { argv, env, stderr } = require('process');
const util = require('util');
const hideSensitive = require('./lib/hide-sensitive');
@@ -8,7 +8,11 @@ const stringList = {
coerce: (values) =>
values.length === 1 && values[0].trim() === 'false'
? []
- : values.reduce((values, value) => values.concat(value.split(',').map((value) => value.trim())), []),
+ : values.reduce(
+ (values, value) =>
+ values.concat(value.split(',').map((value) => value.trim())),
+ []
+ ),
};
module.exports = async () => {
@@ -19,30 +23,72 @@ module.exports = async () => {
Usage:
semantic-release [options] [plugins]`);
})
- .option('b', {alias: 'branches', describe: 'Git branches to release from', ...stringList, group: 'Options'})
- .option('r', {alias: 'repository-url', describe: 'Git repository URL', type: 'string', group: 'Options'})
- .option('t', {alias: 'tag-format', describe: 'Git tag format', type: 'string', group: 'Options'})
- .option('p', {alias: 'plugins', describe: 'Plugins', ...stringList, group: 'Options'})
- .option('e', {alias: 'extends', describe: 'Shareable configurations', ...stringList, group: 'Options'})
- .option('ci', {describe: 'Toggle CI verifications', type: 'boolean', group: 'Options'})
- .option('verify-conditions', {...stringList, group: 'Plugins'})
- .option('analyze-commits', {type: 'string', group: 'Plugins'})
- .option('verify-release', {...stringList, group: 'Plugins'})
- .option('generate-notes', {...stringList, group: 'Plugins'})
- .option('prepare', {...stringList, group: 'Plugins'})
- .option('publish', {...stringList, group: 'Plugins'})
- .option('success', {...stringList, group: 'Plugins'})
- .option('fail', {...stringList, group: 'Plugins'})
- .option('debug', {describe: 'Output debugging information', type: 'boolean', group: 'Options'})
- .option('d', {alias: 'dry-run', describe: 'Skip publishing', type: 'boolean', group: 'Options'})
- .option('h', {alias: 'help', group: 'Options'})
- .option('v', {alias: 'version', group: 'Options'})
- .option('skip-tag', {describe: 'Prevent tagging of the git commit on release', type: 'boolean', group: 'Options'})
+ .option('b', {
+ alias: 'branches',
+ describe: 'Git branches to release from',
+ ...stringList,
+ group: 'Options',
+ })
+ .option('r', {
+ alias: 'repository-url',
+ describe: 'Git repository URL',
+ type: 'string',
+ group: 'Options',
+ })
+ .option('t', {
+ alias: 'tag-format',
+ describe: 'Git tag format',
+ type: 'string',
+ group: 'Options',
+ })
+ .option('p', {
+ alias: 'plugins',
+ describe: 'Plugins',
+ ...stringList,
+ group: 'Options',
+ })
+ .option('e', {
+ alias: 'extends',
+ describe: 'Shareable configurations',
+ ...stringList,
+ group: 'Options',
+ })
+ .option('ci', {
+ describe: 'Toggle CI verifications',
+ type: 'boolean',
+ group: 'Options',
+ })
+ .option('verify-conditions', { ...stringList, group: 'Plugins' })
+ .option('analyze-commits', { type: 'string', group: 'Plugins' })
+ .option('verify-release', { ...stringList, group: 'Plugins' })
+ .option('generate-notes', { ...stringList, group: 'Plugins' })
+ .option('prepare', { ...stringList, group: 'Plugins' })
+ .option('publish', { ...stringList, group: 'Plugins' })
+ .option('success', { ...stringList, group: 'Plugins' })
+ .option('fail', { ...stringList, group: 'Plugins' })
+ .option('debug', {
+ describe: 'Output debugging information',
+ type: 'boolean',
+ group: 'Options',
+ })
+ .option('d', {
+ alias: 'dry-run',
+ describe: 'Skip publishing',
+ type: 'boolean',
+ group: 'Options',
+ })
+ .option('h', { alias: 'help', group: 'Options' })
+ .option('v', { alias: 'version', group: 'Options' })
+ .option('skip-tag', {
+ describe: 'Prevent tagging of the git commit on release',
+ type: 'boolean',
+ group: 'Options',
+ })
.strict(false)
.exitProcess(false);
try {
- const {help, version, ...options} = cli.parse(argv.slice(2));
+ const { help, version, ...options } = cli.parse(argv.slice(2));
if (Boolean(help) || Boolean(version)) {
return 0;
@@ -57,7 +103,7 @@ Usage:
return 0;
} catch (error) {
if (error.name !== 'YError') {
- stderr.write(hideSensitive(env)(util.inspect(error, {colors: true})));
+ stderr.write(hideSensitive(env)(util.inspect(error, { colors: true })));
}
return 1;
diff --git a/docs/developer-guide/js-api.md b/docs/developer-guide/js-api.md
index ed4a261a42..8441d06da7 100644
--- a/docs/developer-guide/js-api.md
+++ b/docs/developer-guide/js-api.md
@@ -4,49 +4,56 @@
```js
const semanticRelease = require('semantic-release');
-const {WritableStreamBuffer} = require('stream-buffers');
+const { WritableStreamBuffer } = require('stream-buffers');
const stdoutBuffer = WritableStreamBuffer();
const stderrBuffer = WritableStreamBuffer();
try {
- const result = await semanticRelease({
- // Core options
- branches: [
- '+([0-9])?(.{+([0-9]),x}).x',
- 'master',
- 'next',
- 'next-major',
- {name: 'beta', prerelease: true},
- {name: 'alpha', prerelease: true}
- ],
- repositoryUrl: 'https://github.com/me/my-package.git',
- // Shareable config
- extends: 'my-shareable-config',
- // Plugin options
- githubUrl: 'https://my-ghe.com',
- githubApiPathPrefix: '/api-prefix'
- }, {
- // Run semantic-release from `/path/to/git/repo/root` without having to change local process `cwd` with `process.chdir()`
- cwd: '/path/to/git/repo/root',
- // Pass the variable `MY_ENV_VAR` to semantic-release without having to modify the local `process.env`
- env: {...process.env, MY_ENV_VAR: 'MY_ENV_VAR_VALUE'},
- // Store stdout and stderr to use later instead of writing to `process.stdout` and `process.stderr`
- stdout: stdoutBuffer,
- stderr: stderrBuffer
- });
+ const result = await semanticRelease(
+ {
+ // Core options
+ branches: [
+ '+([0-9])?(.{+([0-9]),x}).x',
+ 'master',
+ 'next',
+ 'next-major',
+ { name: 'beta', prerelease: true },
+ { name: 'alpha', prerelease: true },
+ ],
+ repositoryUrl: 'https://github.com/me/my-package.git',
+ // Shareable config
+ extends: 'my-shareable-config',
+ // Plugin options
+ githubUrl: 'https://my-ghe.com',
+ githubApiPathPrefix: '/api-prefix',
+ },
+ {
+ // Run semantic-release from `/path/to/git/repo/root` without having to change local process `cwd` with `process.chdir()`
+ cwd: '/path/to/git/repo/root',
+ // Pass the variable `MY_ENV_VAR` to semantic-release without having to modify the local `process.env`
+ env: { ...process.env, MY_ENV_VAR: 'MY_ENV_VAR_VALUE' },
+ // Store stdout and stderr to use later instead of writing to `process.stdout` and `process.stderr`
+ stdout: stdoutBuffer,
+ stderr: stderrBuffer,
+ }
+ );
if (result) {
- const {lastRelease, commits, nextRelease, releases} = result;
+ const { lastRelease, commits, nextRelease, releases } = result;
- console.log(`Published ${nextRelease.type} release version ${nextRelease.version} containing ${commits.length} commits.`);
+ console.log(
+ `Published ${nextRelease.type} release version ${nextRelease.version} containing ${commits.length} commits.`
+ );
if (lastRelease.version) {
console.log(`The last release was "${lastRelease.version}".`);
}
for (const release of releases) {
- console.log(`The release was published with plugin "${release.pluginName}".`);
+ console.log(
+ `The release was published with plugin "${release.pluginName}".`
+ );
}
} else {
console.log('No release published.');
@@ -56,7 +63,7 @@ try {
const logs = stdoutBuffer.getContentsAsString('utf8');
const errors = stderrBuffer.getContentsAsString('utf8');
} catch (err) {
- console.error('The automated release failed with %O', err)
+ console.error('The automated release failed with %O', err);
}
```
@@ -131,7 +138,7 @@ Type: `Object`
Information related to the last release found:
| Name | Type | Description |
-|---------|----------|-------------------------------------------------------------------------------------------------------------------------------------|
+| ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| version | `String` | The version of the last release. |
| gitHead | `String` | The sha of the last commit being part of the last release. |
| gitTag | `String` | The [Git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) associated with the last release. |
@@ -140,6 +147,7 @@ Information related to the last release found:
**Notes**: If no previous release is found, `lastRelease` will be an empty `Object`.
Example:
+
```js
{
gitHead: 'da39a3ee5e6b4b0d3255bfef95601890afd80709',
@@ -157,7 +165,7 @@ The list of commit included in the new release.
Each commit object has the following properties:
| Name | Type | Description |
-|-----------------|----------|-------------------------------------------------|
+| --------------- | -------- | ----------------------------------------------- |
| commit | `Object` | The commit abbreviated and full hash. |
| commit.long | `String` | The commit hash. |
| commit.short | `String` | The commit abbreviated hash. |
@@ -179,6 +187,7 @@ Each commit object has the following properties:
| committerDate | `String` | The committer date. |
Example:
+
```js
[
{
@@ -216,7 +225,7 @@ Type: `Object`
Information related to the newly published release:
| Name | Type | Description |
-|---------|----------|-------------------------------------------------------------------------------------------------------------------------------|
+| ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| type | `String` | The [semver](https://semver.org) type of the release (`patch`, `minor` or `major`). |
| version | `String` | The version of the new release. |
| gitHead | `String` | The sha of the last commit being part of the new release. |
@@ -225,6 +234,7 @@ Information related to the newly published release:
| channel | `String` | The distribution channel on which the next release will be made available (`undefined` for the default distribution channel). |
Example:
+
```js
{
type: 'minor',
@@ -244,7 +254,7 @@ The list of releases published or made available to a distribution channel.
Each release object has the following properties:
| Name | Type | Description |
-|------------|----------|----------------------------------------------------------------------------------------------------------------|
+| ---------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| name | `String` | **Optional.** The release name, only if set by the corresponding `publish` plugin. |
| url | `String` | **Optional.** The release URL, only if set by the corresponding `publish` plugin. |
| type | `String` | The [semver](https://semver.org) type of the release (`patch`, `minor` or `major`). |
@@ -256,6 +266,7 @@ Each release object has the following properties:
| channel | `String` | The distribution channel on which the release is available (`undefined` for the default distribution channel). |
Example:
+
```js
[
{
diff --git a/docs/developer-guide/plugin.md b/docs/developer-guide/plugin.md
index cb98d7c839..ca235f9636 100644
--- a/docs/developer-guide/plugin.md
+++ b/docs/developer-guide/plugin.md
@@ -80,10 +80,10 @@ Let's say we want to verify that an `option` is passed. An `option` is a configu
```js
{
- prepare: {
- path: "@semantic-release/my-special-plugin"
- message: "My cool release message"
- }
+ prepare: {
+ path: '@semantic-release/my-special-plugin';
+ message: 'My cool release message';
+ }
}
```
@@ -93,7 +93,7 @@ This `message` option will be passed to the `pluginConfig` object mentioned earl
const { message } = pluginConfig;
if (message.length) {
- //...
+ //...
}
```
@@ -101,103 +101,104 @@ if (message.length) {
### Common context keys
-* `stdout`
-* `stderr`
-* `logger`
+- `stdout`
+- `stderr`
+- `logger`
### Context object keys by lifecycle
#### verifyConditions
Initially the context object contains the following keys (`verifyConditions` lifecycle):
-* `cwd`
- * Current working directory
-* `env`
- * Environment variables
-* `envCi`
- * Information about CI environment
- * Contains (at least) the following keys:
- * `isCi`
- * Boolean, true if the environment is a CI environment
- * `commit`
- * Commit hash
- * `branch`
- * Current branch
-* `options`
- * Options passed to `semantic-release` via CLI, configuration files etc.
-* `branch`
- * Information on the current branch
- * Object keys:
- * `channel`
- * `tags`
- * `type`
- * `name`
- * `range`
- * `accept`
- * `main`
-* `branches`
- * Information on branches
- * List of branch objects (see above)
+
+- `cwd`
+ - Current working directory
+- `env`
+ - Environment variables
+- `envCi`
+ - Information about CI environment
+ - Contains (at least) the following keys:
+ - `isCi`
+ - Boolean, true if the environment is a CI environment
+ - `commit`
+ - Commit hash
+ - `branch`
+ - Current branch
+- `options`
+ - Options passed to `semantic-release` via CLI, configuration files etc.
+- `branch`
+ - Information on the current branch
+ - Object keys:
+ - `channel`
+ - `tags`
+ - `type`
+ - `name`
+ - `range`
+ - `accept`
+ - `main`
+- `branches`
+ - Information on branches
+ - List of branch objects (see above)
#### analyzeCommits
Compared to the verifyConditions, `analyzeCommits` lifecycle context has keys
-* `commits` (List)
- * List of commits taken into account when determining the new version.
- * Keys:
- * `commit` (Object)
- * Keys:
- * `long` (String, Commit hash)
- * `short` (String, Commit hash)
- * `tree` (Object)
- * Keys:
- * `long` (String, Commit hash)
- * `short` (String, Commit hash)
- * `author` (Object)
- * Keys:
- * `name` (String)
- * `email` (String)
- * `date` (String, ISO 8601 timestamp)
- * `committer` (Object)
- * Keys:
- * `name` (String)
- * `email` (String)
- * `date` (String, ISO 8601 timestamp)
- * `subject` (String, Commit message subject)
- * `body` (String, Commit message body)
- * `hash` (String, Commit hash)
- * `committerDate` (String, ISO 8601 timestamp)
- * `message` (String)
- * `gitTags` (String, List of git tags)
-* `releases` (List)
-* `lastRelease` (Object)
- * Keys
- * `version` (String)
- * `gitTag` (String)
- * `channels` (List)
- * `gitHead` (String, Commit hash)
- * `name` (String)
+- `commits` (List)
+ - List of commits taken into account when determining the new version.
+ - Keys:
+ - `commit` (Object)
+ - Keys:
+ - `long` (String, Commit hash)
+ - `short` (String, Commit hash)
+ - `tree` (Object)
+ - Keys:
+ - `long` (String, Commit hash)
+ - `short` (String, Commit hash)
+ - `author` (Object)
+ - Keys:
+ - `name` (String)
+ - `email` (String)
+ - `date` (String, ISO 8601 timestamp)
+ - `committer` (Object)
+ - Keys:
+ - `name` (String)
+ - `email` (String)
+ - `date` (String, ISO 8601 timestamp)
+ - `subject` (String, Commit message subject)
+ - `body` (String, Commit message body)
+ - `hash` (String, Commit hash)
+ - `committerDate` (String, ISO 8601 timestamp)
+ - `message` (String)
+ - `gitTags` (String, List of git tags)
+- `releases` (List)
+- `lastRelease` (Object)
+ - Keys
+ - `version` (String)
+ - `gitTag` (String)
+ - `channels` (List)
+ - `gitHead` (String, Commit hash)
+ - `name` (String)
#### verifyRelease
Additional keys:
-* `nextRelease` (Object)
- * `type` (String)
- * `channel` (String)
- * `gitHead` (String, Git hash)
- * `version` (String, version without `v`)
- * `gitTag` (String, version with `v`)
- * `name` (String)
-
+- `nextRelease` (Object)
+ - `type` (String)
+ - `channel` (String)
+ - `gitHead` (String, Git hash)
+ - `version` (String, version without `v`)
+ - `gitTag` (String, version with `v`)
+ - `name` (String)
+
#### generateNotes
No new content in the context.
#### addChannel
-*This is run only if there are releases that have been merged from a higher branch but not added on the channel of the current branch.*
+_This is run only if there are releases that have been merged from a higher branch but not added on the channel of the current branch._
Context content is similar to lifecycle `verifyRelease`.
@@ -215,8 +216,8 @@ Lifecycles `success` and `fail` are mutually exclusive, only one of them will be
Additional keys:
-* `releases`
- * Populated by `publish` lifecycle
+- `releases`
+ - Populated by `publish` lifecycle
#### fail
@@ -224,7 +225,7 @@ Lifecycles `success` and `fail` are mutually exclusive, only one of them will be
Additional keys:
-* `errors`
+- `errors`
### Supporting Environment Variables
@@ -255,12 +256,13 @@ Knowledge that might be useful for plugin developers.
While it may be trivial that multiple analyzeCommits (or any lifecycle plugins) can be defined, it is not that self-evident that the plugins executed AFTER the first one (for example, the default one: `commit-analyzer`) can change the result. This way it is possible to create more advanced rules or situations, e.g. if none of the commits would result in new release, then a default can be defined.
The commit must be a known release type, for example the commit-analyzer has the following default types:
-* major
-* premajor
-* minor
-* preminor
-* patch
-* prepatch
-* prerelease
+
+- major
+- premajor
+- minor
+- preminor
+- patch
+- prepatch
+- prerelease
If the analyzeCommits-lifecycle plugin does not return anything, then the earlier result is used, but if it returns a supported string value, then that overrides the previous result.
diff --git a/docs/extending/plugins-list.md b/docs/extending/plugins-list.md
index 5457a94cb0..ab6184669f 100644
--- a/docs/extending/plugins-list.md
+++ b/docs/extending/plugins-list.md
@@ -1,6 +1,7 @@
# Plugins list
## Official plugins
+
- [@semantic-release/commit-analyzer](https://github.com/semantic-release/commit-analyzer)
- **Note**: this is already part of semantic-release and does not have to be installed separately
- `analyzeCommits`: Determine the type of release by analyzing commits with [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog)
@@ -110,10 +111,10 @@
- [semantic-release-rubygem](https://github.com/Gusto/semantic-release-rubygem)
- `verifyConditions`: Locate and validate a `.gemspec` file, locate and validate a `lib/**/version.rb` file, verify the presence of the `GEM_HOST_API_KEY` environment variable, and create a credentials file with the API key.
- `prepare`: Update the version in the `lib/**/version.rb` version file and [build](https://guides.rubygems.org/command-reference/#gem-build) the gem.
- - `publish`: [Push the Ruby gem](https://guides.rubygems.org/command-reference/#gem-push) to the gem server.
+ - `publish`: [Push the Ruby gem](https://guides.rubygems.org/command-reference/#gem-push) to the gem server.
- [semantic-release-npm-deprecate-old-versions](https://github.com/ghusse/semantic-release-npm-deprecate-old-versions)
- `verifyConditions`: Validates configuration.
- - `publish`: Deprecates old versions, based on the declaration of supported versions in the config.
+ - `publish`: Deprecates old versions, based on the declaration of supported versions in the config.
- [amanda-mitchell/semantic-release-npm-multiple](https://github.com/amanda-mitchell/semantic-release-npm-multiple)
- **Note**: this is a thin wrapper around the built-in npm plugin that can target multiple registries
- `verifyConditions`: Verify the presence and the validity of the npm authentication and release configuration for multiple registries
@@ -123,20 +124,20 @@
- `verifyConditions`: Verify the presence of a license file
- `prepare`: Update the license file based on its type
- [semantic-release-pypi](https://github.com/abichinger/semantic-release-pypi)
- - `verifyConditions`: Verify the environment variable ```PYPI_TOKEN``` and installation of build tools
- - `prepare`: Update the version in ```setup.cfg``` and create the distribution packages
+ - `verifyConditions`: Verify the environment variable `PYPI_TOKEN` and installation of build tools
+ - `prepare`: Update the version in `setup.cfg` and create the distribution packages
- `publish`: Publish the python package to a repository (default: pypi)
- [semantic-release-helm](https://github.com/m1pl/semantic-release-helm)
- `verifyConditions`: Validate configuration and (if present) credentials
- - `prepare`: Update version and appVersion in ```Chart.yaml```
+ - `prepare`: Update version and appVersion in `Chart.yaml`
- `publish`: Publish the chart to a registry (if configured)
- [semantic-release-codeartifact](https://github.com/ryansonshine/semantic-release-codeartifact)
- `verifyConditions`: Validate configuration, get AWS CodeArtifact authentication and repository, validate `publishConfig` or `.npmrc` (if they exist), then pass the configuration to the associated plugins.
- [semantic-release-telegram](https://github.com/pustovitDmytro/semantic-release-telegram)
- - `verifyConditions`: Validate configuration and verify ```TELEGRAM_BOT_ID``` and ```TELEGRAM_BOT_TOKEN```
+ - `verifyConditions`: Validate configuration and verify `TELEGRAM_BOT_ID` and `TELEGRAM_BOT_TOKEN`
- `success`: Publish a message about the successful release to a telegram chat
- `fail`: publish a message about failure to a telegram chat
- [semantic-release-heroku](https://github.com/pustovitDmytro/semantic-release-heroku)
- - `verifyConditions`: Validate configuration and verify ```HEROKU_API_KEY```
+ - `verifyConditions`: Validate configuration and verify `HEROKU_API_KEY`
- `prepare`: Update the package.json version and create release tarball
- `publish`: Publish version to heroku
diff --git a/docs/extending/shareable-configurations-list.md b/docs/extending/shareable-configurations-list.md
index f439b2710f..f787a7c611 100644
--- a/docs/extending/shareable-configurations-list.md
+++ b/docs/extending/shareable-configurations-list.md
@@ -1,10 +1,12 @@
# Shareable configurations list
## Official configurations
+
- [@semantic-release/apm-config](https://github.com/semantic-release/apm-config) - semantic-release shareable configuration for releasing atom packages
- [@semantic-release/gitlab-config](https://github.com/semantic-release/gitlab-config) - semantic-release shareable configuration for GitLab
## Community configurations
+
- [@jedmao/semantic-release-npm-github-config](https://github.com/jedmao/semantic-release-npm-github-config)
- Provides an informative [git](https://github.com/semantic-release/git) commit message for the release commit that does not trigger continuous integration and conforms to the [conventional commits specification](https://www.conventionalcommits.org/) (e.g., "chore(release): 1.2.3 [skip ci]\n\nnotes").
- Creates a tarball that gets uploaded with each [GitHub release](https://github.com/semantic-release/github).
@@ -18,4 +20,3 @@
- Updates GitHub release with release-notes.
- Bumps a version in package.json.
- Publishes the new version to [NPM](https://npmjs.org).
-
diff --git a/docs/recipes/README.md b/docs/recipes/README.md
index ef75029f3d..242d4f61cf 100644
--- a/docs/recipes/README.md
+++ b/docs/recipes/README.md
@@ -1,6 +1,7 @@
# Recipes
## CI configurations
+
- [CircleCI 2.0 workflows](circleci-workflows.md)
- [Travis CI](travis.md)
- [GitLab CI](gitlab-ci.md)
@@ -8,18 +9,21 @@
- [Jenkins CI](jenkins-ci.md)
## Git hosted services
+
- [Git authentication with SSH keys](git-auth-ssh-keys.md)
## Release workflow
+
- [Publishing on distribution channels](distribution-channels.md)
- [Publishing maintenance releases](maintenance-releases.md)
- [Publishing pre-releases](pre-releases.md)
## Monorepos
+
- [nx mono repo](nx-mono-repo.md)
## Utility
-- [Get expected next version](expected-next-version.md)
+- [Get expected next version](expected-next-version.md)
## Package managers and languages
diff --git a/docs/recipes/distribution-channels.md b/docs/recipes/distribution-channels.md
index 49052d7a1c..122c3e142e 100644
--- a/docs/recipes/distribution-channels.md
+++ b/docs/recipes/distribution-channels.md
@@ -3,6 +3,7 @@
This recipe will walk you through a simple example that uses distribution channels to make releases available only to a subset of users, in order to collect feedbacks before distributing the release to all users.
This example uses the **semantic-release** default configuration:
+
- [branches](../usage/configuration.md#branches): `['+([0-9])?(.{+([0-9]),x}).x', 'master', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}]`
- [plugins](../usage/configuration.md#plugins): `['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github']`
diff --git a/docs/recipes/expected-next-version.md b/docs/recipes/expected-next-version.md
index 623c3f18b4..978b968cfc 100644
--- a/docs/recipes/expected-next-version.md
+++ b/docs/recipes/expected-next-version.md
@@ -3,6 +3,7 @@
There are some situations where you will need the next version prior to running semantic-release, some examples are languages that require the build number at build time. Since semantic-release is focused on releasing your built bits not building them you will need to run semantic-release twice. The following may help you setup this workflow within your solution.
## Example use case
+
In this example we are building a docker image that must include a file in the docker image that includes the build number. This is created by a custom semantic-release plugin call application-info. But you could use the exec plugin to accomplish a similar task of writing to a file or some other destination.
Create your standard release.config.js
@@ -22,9 +23,10 @@ module.exports = {
],
};
```
+
> this is just an example config you may need something more complex in your scenario
-Create a pre-release.config.js that will be run before running semantic-release that extends your base release config overriding the the skipTag property and plugins property to only include the plugins needed in the pre-release stage.
+Create a pre-release.config.js that will be run before running semantic-release that extends your base release config overriding the the skipTag property and plugins property to only include the plugins needed in the pre-release stage.
```JavaScript
// pre-release.config.js
@@ -38,4 +40,5 @@ module.exports = {
plugins: ['@semantic-release/commit-analyzer', './release-scripts/application-info'],
};
```
+
In your CI solution you should run `npx semantic-release --extends=./pre-release.config.js` prior to building your application to perform any tasks that are required as part of the build and to include the next version number.
diff --git a/docs/recipes/git-auth-ssh-keys.md b/docs/recipes/git-auth-ssh-keys.md
index f346d802ab..a099a45590 100644
--- a/docs/recipes/git-auth-ssh-keys.md
+++ b/docs/recipes/git-auth-ssh-keys.md
@@ -21,6 +21,7 @@ This will generate a public key in `git_deploy_key.pub` and a private key in `gi
## Adding the SSH public key to the Git hosted account
Step by step instructions are provided for the following Git hosted services:
+
- [GitHub](#adding-the-ssh-public-key-to-github)
### Adding the SSH public key to GitHub
@@ -44,6 +45,7 @@ See [Adding a new SSH key to your GitHub account](https://help.github.com/articl
In order to be available on the CI environment, the SSH private key must be encrypted, committed to the Git repository and decrypted by the CI service.
Step by step instructions are provided for the following environments:
+
- [Travis CI](#adding-the-ssh-private-key-to-travis-ci)
- [Circle CI](#adding-the-ssh-private-key-to-circle-ci)
@@ -109,7 +111,7 @@ $ git push
### Adding the SSH private key to Circle CI
-First we encrypt the `git_deploy_key` (private key) using a symmetric encryption (AES-256). Run the following `openssl` command and *make sure to note the output which we'll need later*:
+First we encrypt the `git_deploy_key` (private key) using a symmetric encryption (AES-256). Run the following `openssl` command and _make sure to note the output which we'll need later_:
```bash
$ openssl aes-256-cbc -e -p -in git_deploy_key -out git_deploy_key.enc -K `openssl rand -hex 32` -iv `openssl rand -hex 16`
@@ -119,6 +121,7 @@ iv =VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
```
Add the following [environment variables](https://circleci.com/docs/2.0/env-vars/#adding-environment-variables-in-the-app) to Circle CI:
+
- `SSL_PASSPHRASE` - the value set during the [SSH keys generation](#generating-the-ssh-keys) step.
- `REPO_ENC_KEY` - the `key` (KKK) value from the `openssl` step above.
- `REPO_ENC_IV` - the `iv` (VVV) value from the `openssl` step above.
diff --git a/docs/recipes/github-actions.md b/docs/recipes/github-actions.md
index 32a7ba57a6..23d71750bb 100644
--- a/docs/recipes/github-actions.md
+++ b/docs/recipes/github-actions.md
@@ -63,9 +63,11 @@ If the risk is acceptable, some extra configuration is needed. The [actions/chec
## Trigger semantic-release on demand
### Using GUI:
+
You can use [Manual Triggers](https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/) for GitHub Actions.
### Using HTTP:
+
Use [`repository_dispatch`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch) event to have control on when to generate a release by making an HTTP request, e.g.:
```yaml
@@ -84,7 +86,8 @@ $ curl -v -H "Accept: application/vnd.github.everest-preview+json" -H "Authoriza
```
### Using 3rd party apps:
+
If you'd like to use a GitHub app to manage this instead of creating a personal access token, you could consider using a project like:
-* [Actions Panel](https://www.actionspanel.app/) - A declaratively configured way for triggering GitHub Actions
-* [Action Button](https://github-action-button.web.app/#details) - A simple badge based mechanism for triggering GitHub Actions
+- [Actions Panel](https://www.actionspanel.app/) - A declaratively configured way for triggering GitHub Actions
+- [Action Button](https://github-action-button.web.app/#details) - A simple badge based mechanism for triggering GitHub Actions
diff --git a/docs/recipes/gitlab-ci.md b/docs/recipes/gitlab-ci.md
index d946ea49da..1296e1502b 100644
--- a/docs/recipes/gitlab-ci.md
+++ b/docs/recipes/gitlab-ci.md
@@ -21,8 +21,8 @@ This example is a minimal configuration for **semantic-release** with a build ru
```yaml
# The release pipeline will run only if all jobs in the test pipeline are successful
stages:
- - test
- - release
+ - test
+ - release
before_script:
- npm install
@@ -52,7 +52,6 @@ This example is a minimal configuration for **semantic-release** with a build ru
**Note**: The`semantic-release` execution command varies depending if you are using a [local](../usage/installation.md#local-installation) or [global](../usage/installation.md#global-installation) **semantic-release** installation.
-
```yaml
# The release pipeline will run only on the master branch a commit is triggered
stages:
diff --git a/docs/recipes/maintenance-releases.md b/docs/recipes/maintenance-releases.md
index 599ebb912c..ebc260747e 100644
--- a/docs/recipes/maintenance-releases.md
+++ b/docs/recipes/maintenance-releases.md
@@ -3,6 +3,7 @@
This recipe will walk you through a simple example that uses Git branches and distribution channels to publish fixes and features for old versions of a package.
This example uses the **semantic-release** default configuration:
+
- [branches](../usage/configuration.md#branches): `['+([0-9])?(.{+([0-9]),x}).x', 'master', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}]`
- [plugins](../usage/configuration.md#plugins): `['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github']`
@@ -18,7 +19,7 @@ The Git history of the repository is:
## Releasing a breaking change
-We now decide to drop Node.js 6 support for our package, and require Node.js 8 or higher, which is a breaking change.
+We now decide to drop Node.js 6 support for our package, and require Node.js 8 or higher, which is a breaking change.
We commit that change with the message `feat: drop Node.js 6 support \n\n BREAKING CHANGE: Node.js >= 8 required` to `master`. When pushing that commit, **semantic-release** will release the version `2.0.0` on the dist-tag `@latest`.
diff --git a/docs/recipes/nx-monorepo.md b/docs/recipes/nx-monorepo.md
index bcadacc4da..ed0c16509a 100644
--- a/docs/recipes/nx-monorepo.md
+++ b/docs/recipes/nx-monorepo.md
@@ -90,6 +90,6 @@ Some plugins (git) will add a commit to your repo which means you cannot run the
## Todo
-* Create an nx plugin that automates the steps above
-* for the project specific release config programmatically get the current project name, source dir, and dependencies for commitPaths.
-* Add a configPath cli argument rather than extends to specify the path to the semantic-release config
+- Create an nx plugin that automates the steps above
+- for the project specific release config programmatically get the current project name, source dir, and dependencies for commitPaths.
+- Add a configPath cli argument rather than extends to specify the path to the semantic-release config
diff --git a/docs/recipes/pre-releases.md b/docs/recipes/pre-releases.md
index e8edd4473b..928c661809 100644
--- a/docs/recipes/pre-releases.md
+++ b/docs/recipes/pre-releases.md
@@ -3,6 +3,7 @@
This recipe will walk you through a simple example that uses pre-releases to publish beta versions while working on a future major release and then make only one release on the default distribution.
This example uses the **semantic-release** default configuration:
+
- [branches](../usage/configuration.md#branches): `['+([0-9])?(.{+([0-9]),x}).x', 'master', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}]`
- [plugins](../usage/configuration.md#plugins): `['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/npm', '@semantic-release/github']`
diff --git a/docs/support/FAQ.md b/docs/support/FAQ.md
index a6eefb41c1..1cdcb926af 100644
--- a/docs/support/FAQ.md
+++ b/docs/support/FAQ.md
@@ -4,7 +4,7 @@
[`@semantic-release/npm`](https://github.com/semantic-release/npm) takes care of updating the `package.json`’s version before publishing to [npm](https://www.npmjs.com).
-By default, only the published package will contain the version, which is the only place where it is *really* required, but the updated `package.json` will not be pushed to the Git repository
+By default, only the published package will contain the version, which is the only place where it is _really_ required, but the updated `package.json` will not be pushed to the Git repository
However, the [`@semantic-release/git`](https://github.com/semantic-release/git) plugin can be used to push the updated `package.json` as well as other files to the Git repository.
@@ -17,19 +17,24 @@ The `package.json`’s version will be updated by the `semantic-release` command
As the [`@semantic-release/npm`](https://github.com/semantic-release/npm) plugin uses the [npm CLI](https://docs.npmjs.com/cli/npm) to update the `package.json` version and publish the package, all [npm hook scripts](https://docs.npmjs.com/misc/scripts#description) will be executed.
You can run your build script in:
+
- the `prepublishOnly` or `prepack` hook so it will be executed during the `publish` step of `@semantic-release/npm`
- the `postversion` hook so it will be executed during the `prepare` step of `@semantic-release/npm`, which allow for example to update files before committing them with the [`@semantic-release/git`](https://github.com/semantic-release/git) plugin
If using npm hook scripts is not possible, and alternative solution is to [`@semantic-release/exec`](https://github.com/semantic-release/exec) plugin to run your script in the `prepare` step:
+
```json
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
- ["@semantic-release/exec", {
- "prepareCmd": "./my-build-script.sh ${nextRelease.version}",
- }],
+ [
+ "@semantic-release/exec",
+ {
+ "prepareCmd": "./my-build-script.sh ${nextRelease.version}"
+ }
+ ]
]
}
```
@@ -43,6 +48,7 @@ Yes with the [dry-run options](../usage/configuration.md#dryrun) which prints to
Yes, **semantic-release** is a Node CLI application, but it can be used to publish any type of packages.
To publish a non-Node package (without a `package.json`) you would need to:
+
- Use a [global](../usage/installation.md#global-installation) **semantic-release** installation
- Set **semantic-release** [options](../usage/configuration.md#options) via [CLI arguments or rc file](../usage/configuration.md#configuration)
- Make sure your CI job executing the `semantic-release` command has access to [Node >= 10.19](#why-does-semantic-release-require-node-version--1019) to execute the `semantic-release` command
@@ -61,10 +67,13 @@ Here is a basic example to create [GitHub releases](https://help.github.com/arti
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
- ["@semantic-release/exec", {
- "prepareCmd" : "set-version ${nextRelease.version}",
- "publishCmd" : "publish-package"
- }]
+ [
+ "@semantic-release/exec",
+ {
+ "prepareCmd": "set-version ${nextRelease.version}",
+ "publishCmd": "publish-package"
+ }
+ ]
]
}
```
@@ -76,6 +85,7 @@ See the [package managers and languages recipes](../recipes/README.md#package-ma
## Can I use semantic-release with any CI service?
Yes, **semantic-release** can be used with any CI service, as long as it provides:
+
- A way to set [authentication](../usage/ci-configuration.md#authentication) via environment variables
- A way to guarantee that the `semantic-release` command is [executed only after all the tests of all the jobs in the CI build pass](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded)
@@ -99,7 +109,7 @@ See the [GitLab CI recipes](../recipes/gitlab-ci.md#using-semantic-release-with-
## Can I use semantic-release with any Git hosted environment?
-By default **semantic-release** uses the [`@semantic-release/github`](https://github.com/semantic-release/github) plugin to publish a [GitHub release](https://help.github.com/articles/about-releases). For other Git hosted environment the [`@semantic-release/git`](https://github.com/semantic-release/git) and [`@semantic-release/changelog`](https://github.com/semantic-release/changelog) plugins can be used via [plugins configuration](../usage/plugins.md).
+By default **semantic-release** uses the [`@semantic-release/github`](https://github.com/semantic-release/github) plugin to publish a [GitHub release](https://help.github.com/articles/about-releases). For other Git hosted environment the [`@semantic-release/git`](https://github.com/semantic-release/git) and [`@semantic-release/changelog`](https://github.com/semantic-release/changelog) plugins can be used via [plugins configuration](../usage/plugins.md).
See the [`@semantic-release/git`](https://github.com/semantic-release/git#semantic-releasegit) [`@semantic-release/changelog`](https://github.com/semantic-release/changelog#semantic-releasechangelog) plugins documentation for more details.
@@ -112,6 +122,7 @@ See the [`@semantic-release/npm`](https://github.com/semantic-release/npm#semant
## How can I revert a release?
If you have introduced a breaking bug in a release you have 2 options:
+
- If you have a fix immediately ready, commit and push it (or merge it via a pull request) to the release branch
- Otherwise, [revert the commit](https://git-scm.com/docs/git-revert) that introduced the bug and push the revert commit (or merge it via a pull request) to the release branch
@@ -121,7 +132,7 @@ Depending on the package manager you are using, you might be able to un-publish
In any case **do not remove the Git tag associated with the buggy version**, otherwise **semantic-release** will later try to republish that version. Publishing a version after un-publishing is not supported by most package managers.
-**Note**: If you are using the default [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) be aware that it uses a different revert commit format than the standard one created by [git revert](https://git-scm.com/docs/git-revert), contrary to what is [claimed in the convention](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#revert). Therefore, if you revert a commit with [`git revert`](https://git-scm.com/docs/git-revert), use the [`--edit` option](https://git-scm.com/docs/git-revert#git-revert---edit) to format the message according to the [Angular revert commit message format](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#revert). See [conventional-changelog/conventional-changelog#348](https://github.com/conventional-changelog/conventional-changelog/issues/348) for more details.
+**Note**: If you are using the default [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) be aware that it uses a different revert commit format than the standard one created by [git revert](https://git-scm.com/docs/git-revert), contrary to what is [claimed in the convention](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#revert). Therefore, if you revert a commit with [`git revert`](https://git-scm.com/docs/git-revert), use the [`--edit` option](https://git-scm.com/docs/git-revert#git-revert---edit) to format the message according to the [Angular revert commit message format](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#revert). See [conventional-changelog/conventional-changelog#348](https://github.com/conventional-changelog/conventional-changelog/issues/348) for more details.
## Can I use `.npmrc` options?
@@ -157,7 +168,7 @@ See [Artifactory - npm Registry](https://www.jfrog.com/confluence/display/RTF/Np
## Can I manually trigger the release of a specific version?
-You can trigger a release by pushing to your Git repository. You deliberately cannot trigger a *specific* version release, because this is the whole point of semantic-release.
+You can trigger a release by pushing to your Git repository. You deliberately cannot trigger a _specific_ version release, because this is the whole point of semantic-release.
## Can I exclude commits from the analysis?
@@ -168,7 +179,7 @@ Yes, every commits that contains `[skip release]` or `[release skip]` in their m
By default **semantic-release** uses the [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) and triggers releases based on the following rules:
| Commit | Release type |
-|-----------------------------|----------------------------|
+| --------------------------- | -------------------------- |
| Commit with breaking change | ~~Major~~ Breaking release |
| Commit with type `feat` | ~~Minor~~ Feature release |
| Commit with type `fix` | Patch release |
@@ -178,9 +189,9 @@ See the [`@semantic-release/npm`](https://github.com/semantic-release/npm#npm-co
This is fully customizable with the [`@semantic-release/commit-analyzer`](https://github.com/semantic-release/commit-analyzer) plugin's [`release-rules` option](https://github.com/semantic-release/commit-analyzer#release-rules).
-## Is it *really* a good idea to release on every push?
+## Is it _really_ a good idea to release on every push?
-It is indeed a great idea because it *forces* you to follow best practices. If you don’t feel comfortable releasing every feature or fix on your `master` you might not treat your `master` branch as intended.
+It is indeed a great idea because it _forces_ you to follow best practices. If you don’t feel comfortable releasing every feature or fix on your `master` you might not treat your `master` branch as intended.
From [Understanding the GitHub Flow](https://guides.github.com/introduction/flow/index.html):
diff --git a/docs/support/troubleshooting.md b/docs/support/troubleshooting.md
index 7c1a5f3765..892338f9cc 100644
--- a/docs/support/troubleshooting.md
+++ b/docs/support/troubleshooting.md
@@ -15,6 +15,7 @@ This is most likely related to a misconfiguration of the [npm registry authentic
It might also happen if the package name you are trying to publish already exists (in the case of npm, you may be trying to publish a new version of a package that is not yours, hence the permission error).
To verify if your package name is available you can use [npm-name-cli](https://github.com/sindresorhus/npm-name-cli):
+
```bash
$ npm install --global npm-name-cli
$ npm-name
diff --git a/docs/usage/ci-configuration.md b/docs/usage/ci-configuration.md
index 90cdb06b34..07bf009549 100644
--- a/docs/usage/ci-configuration.md
+++ b/docs/usage/ci-configuration.md
@@ -4,6 +4,7 @@
The `semantic-release` command must be executed only after all the tests in the CI build pass. If the build runs multiple jobs (for example to test on multiple Operating Systems or Node versions) the CI has to be configured to guarantee that the `semantic-release` command is executed only after all jobs are successful.
Here is a few example of the CI services that can be used to achieve this:
+
- [Travis Build Stages](https://docs.travis-ci.com/user/build-stages)
- [CircleCI Workflows](https://circleci.com/docs/2.0/workflows)
- [GitHub Actions](https://github.com/features/actions)
@@ -22,7 +23,7 @@ See [CI configuration recipes](../recipes/README.md#ci-configurations) for more
**semantic-release** requires push access to the project Git repository in order to create [Git tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging). The Git authentication can be set with one of the following environment variables:
| Variable | Description |
-|-------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GH_TOKEN` or `GITHUB_TOKEN` | A GitHub [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line). |
| `GL_TOKEN` or `GITLAB_TOKEN` | A GitLab [personal access token](https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html). |
| `BB_TOKEN` or `BITBUCKET_TOKEN` | A Bitbucket [personal access token](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html). |
@@ -36,7 +37,7 @@ Alternatively the Git authentication can be set up via [SSH keys](../recipes/git
Most **semantic-release** [plugins](plugins.md) require setting up authentication in order to publish to a package manager registry. The default [@semantic-release/npm](https://github.com/semantic-release/npm#environment-variables) and [@semantic-release/github](https://github.com/semantic-release/github#environment-variables) plugins require the following environment variables:
| Variable | Description |
-|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NPM_TOKEN` | npm token created via [npm token create](https://docs.npmjs.com/getting-started/working_with_tokens#how-to-create-new-tokens). **Note**: Only the `auth-only` [level of npm two-factor authentication](https://docs.npmjs.com/getting-started/using-two-factor-authentication#levels-of-authentication) is supported. |
| `GH_TOKEN` | GitHub authentication token. **Note**: Only the [personal token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) authentication is supported. |
diff --git a/docs/usage/configuration.md b/docs/usage/configuration.md
index 849c1d9940..a2452e06ec 100644
--- a/docs/usage/configuration.md
+++ b/docs/usage/configuration.md
@@ -143,6 +143,7 @@ The objective of the dry-run mode is to get a preview of the pending release. Dr
**Note**: The Dry-run mode verifies the repository push permission, even though nothing will be pushed. The verification is done to help user to figure out potential configuration issues.
### skipTag
+
Type: `Boolean`
Default: `false`
CLI arguments: `--skip-tag`
diff --git a/docs/usage/plugins.md b/docs/usage/plugins.md
index 351f2c256b..90198c2753 100644
--- a/docs/usage/plugins.md
+++ b/docs/usage/plugins.md
@@ -5,7 +5,7 @@ Each [release step](../../README.md#release-steps) is implemented by configurabl
A plugin is a npm module that can implement one or more of the following steps:
| Step | Required | Description |
-|--------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `verifyConditions` | No | Responsible for verifying conditions necessary to proceed with the release: configuration is correct, authentication token are valid, etc... |
| `analyzeCommits` | Yes | Responsible for determining the type of the next release (`major`, `minor` or `patch`). If multiple plugins with a `analyzeCommits` step are defined, the release type will be the highest one among plugins output. |
| `verifyRelease` | No | Responsible for verifying the parameters (version, type, dist-tag etc...) of the release that is about to be published. |
@@ -25,6 +25,7 @@ Release steps will run in that order. At each step, **semantic-release** will ru
### Default plugins
These four plugins are already part of **semantic-release** and are listed in order of execution. They do not have to be installed separately:
+
```
"@semantic-release/commit-analyzer"
"@semantic-release/release-notes-generator"
@@ -46,7 +47,11 @@ Each plugin must be configured with the [`plugins` options](./configuration.md#p
```json
{
- "plugins": ["@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/npm"]
+ "plugins": [
+ "@semantic-release/commit-analyzer",
+ "@semantic-release/release-notes-generator",
+ "@semantic-release/npm"
+ ]
}
```
@@ -66,6 +71,7 @@ For each [release step](../../README.md#release-steps) the plugins that implemen
```
With this configuration **semantic-release** will:
+
- execute the `verifyConditions` implementation of `@semantic-release/npm` then `@semantic-release/git`
- execute the `analyzeCommits` implementation of `@semantic-release/commit-analyzer`
- execute the `generateNotes` implementation of `@semantic-release/release-notes-generator`
@@ -85,9 +91,12 @@ Global plugin configuration can be defined at the root of the **semantic-release
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
- ["@semantic-release/github", {
- "assets": ["dist/**"]
- }],
+ [
+ "@semantic-release/github",
+ {
+ "assets": ["dist/**"]
+ }
+ ],
"@semantic-release/git"
],
"preset": "angular"
@@ -95,5 +104,6 @@ Global plugin configuration can be defined at the root of the **semantic-release
```
With this configuration:
+
- All plugins will receive the `preset` option, which will be used by both `@semantic-release/commit-analyzer` and `@semantic-release/release-notes-generator` (and ignored by `@semantic-release/github` and `@semantic-release/git`)
- The `@semantic-release/github` plugin will receive the `assets` options (`@semantic-release/git` will not receive it and therefore will use it's default value for that option)
diff --git a/docs/usage/workflow-configuration.md b/docs/usage/workflow-configuration.md
index e7c9af9350..c3abaf63e4 100644
--- a/docs/usage/workflow-configuration.md
+++ b/docs/usage/workflow-configuration.md
@@ -1,6 +1,7 @@
# Workflow configuration
**semantic-release** allow to manage and automate complex release workflow, based on multiple Git branches and distribution channels. This allow to:
+
- Distributes certain releases to a particular group of users via distribution channels
- Manage the availability of releases on distribution channels via branches merge
- Maintain multiple lines of releases in parallel
@@ -12,6 +13,7 @@ The release workflow is configured via the [branches option](./configuration.md#
Each branch can be defined either as a string, a [glob](https://github.com/micromatch/micromatch#matching-features) or an object. For string and glob definitions each [property](#branches-properties) will be defaulted.
A branch can defined as one of three types:
+
- [release](#release-branches): to make releases on top of the last version released
- [maintenance](#maintenance-branches): to make releases on top of an old release
- [pre-release](#pre-release-branches): to make pre-releases
@@ -21,7 +23,7 @@ The type of the branch is automatically determined based on naming convention an
## Branches properties
| Property | Branch type | Description | Default |
-|--------------|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
+| ------------ | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `name` | All | **Required.** The Git branch holding the commits to analyze and the code to release. See [name](#name). | - The value itself if defined as a `String` or the matching branches name if defined as a glob. |
| `channel` | All | The distribution channel on which to publish releases from this branch. Set to `false` to force the default distribution channel instead of using the default. See [channel](#channel). | `undefined` for the first release branch, the value of `name` for subsequent ones. |
| `range` | [maintenance](#maintenance-branches) only | **Required unless `name` is formatted like `N.N.x` or `N.x` (`N` is a number).** The range of [semantic versions](https://semver.org) to support on this branch. See [range](#range). | The value of `name`. |
@@ -35,14 +37,15 @@ It can be defined as a [glob](https://github.com/micromatch/micromatch#matching-
If `name` doesn't match to any branch existing in the repository, the definition will be ignored. For example the default configuration includes the definition `next` and `next-major` which will become active only when the branches `next` and/or `next-major` are created in the repository. This allow to define your workflow once with all potential branches you might use and have the effective configuration evolving as you create new branches.
For example the configuration `['+([0-9])?(.{+([0-9]),x}).x', 'master', 'next']` will be expanded as:
+
```js
{
branches: [
- {name: '1.x', range: '1.x', channel: '1.x'}, // Only after the `1.x` is created in the repo
- {name: '2.x', range: '2.x', channel: '2.x'}, // Only after the `2.x` is created in the repo
- {name: 'master'},
- {name: 'next', channel: 'next'}, // Only after the `next` is created in the repo
- ]
+ { name: '1.x', range: '1.x', channel: '1.x' }, // Only after the `1.x` is created in the repo
+ { name: '2.x', range: '2.x', channel: '2.x' }, // Only after the `2.x` is created in the repo
+ { name: 'master' },
+ { name: 'next', channel: 'next' }, // Only after the `next` is created in the repo
+ ];
}
```
@@ -54,12 +57,13 @@ If the `channel` property is set to `false` the default channel will be used.
The value of `channel`, if defined as a string, is generated with [Lodash template](https://lodash.com/docs#template) with the variable `name` available.
For example the configuration `['master', {name: 'next', channel: 'channel-${name}'}]` will be expanded as:
+
```js
{
branches: [
- {name: 'master'}, // `channel` is undefined so the default distribution channel will be used
- {name: 'next', channel: 'channel-next'}, // `channel` is built with the template `channel-${name}`
- ]
+ { name: 'master' }, // `channel` is undefined so the default distribution channel will be used
+ { name: 'next', channel: 'channel-next' }, // `channel` is built with the template `channel-${name}`
+ ];
}
```
@@ -68,13 +72,14 @@ For example the configuration `['master', {name: 'next', channel: 'channel-${nam
A `range` only applies to maintenance branches, is required and must be formatted like `N.N.x` or `N.x` (`N` is a number). In case the `name` is formatted as a range (for example `1.x` or `1.5.x`) the branch will be considered a maintenance branch and the `name` value will be used for the `range`.
For example the configuration `['1.1.x', '1.2.x', 'master']` will be expanded as:
+
```js
{
branches: [
- {name: '1.1.x', range: '1.1.x', channel: '1.1.x'},
- {name: '1.2.x', range: '1.2.x', channel: '1.2.x'},
- {name: 'master'},
- ]
+ { name: '1.1.x', range: '1.1.x', channel: '1.1.x' },
+ { name: '1.2.x', range: '1.2.x', channel: '1.2.x' },
+ { name: 'master' },
+ ];
}
```
@@ -86,13 +91,14 @@ If the `prerelease` property is set to `true` the `name` value will be used.
The value of `prerelease`, if defined as a string, is generated with [Lodash template](https://lodash.com/docs#template) with the variable `name` available.
For example the configuration `['master', {name: 'pre/rc', prerelease: '${name.replace(/^pre\\//g, "")}'}, {name: 'beta', prerelease: true}]` will be expanded as:
+
```js
{
branches: [
- {name: 'master'},
- {name: 'pre/rc', channel: 'pre/rc', prerelease: 'rc'}, // `prerelease` is built with the template `${name.replace(/^pre\\//g, "")}`
- {name: 'beta', channel: 'beta', prerelease: 'beta'}, // `prerelease` is set to `beta` as it is the value of `name`
- ]
+ { name: 'master' },
+ { name: 'pre/rc', channel: 'pre/rc', prerelease: 'rc' }, // `prerelease` is built with the template `${name.replace(/^pre\\//g, "")}`
+ { name: 'beta', channel: 'beta', prerelease: 'beta' }, // `prerelease` is set to `beta` as it is the value of `name`
+ ];
}
```
@@ -113,10 +119,12 @@ See [publishing on distribution channels recipe](../recipes/distribution-channel
#### Pushing to a release branch
With the configuration `"branches": ["master", "next"]`, if the last release published from `master` is `1.0.0` and the last one from `next` is `2.0.0` then:
+
- Only versions in range `1.x.x` can be published from `master`, so only `fix` and `feat` commits can be pushed to `master`
- Once `next` get merged into `master` the release `2.0.0` will be made available on the channel associated with `master` and both `master` and `next` will accept any commit type
This verification prevent scenario such as:
+
1. Create a `feat` commit on `next` which triggers the release of version `1.0.0` on the `next` channel
2. Merge `next` into `master` which adds `1.0.0` on the default channel
3. Create a `feat` commit on `next` which triggers the release of version `1.1.0` on the `next` channel
@@ -147,6 +155,7 @@ See [publishing maintenance releases recipe](../recipes/maintenance-releases.md)
#### Pushing to a maintenance branch
With the configuration `"branches": ["1.0.x", "1.x", "master"]`, if the last release published from `master` is `1.5.0` then:
+
- Only versions in range `>=1.0.0 <1.1.0` can be published from `1.0.x`, so only `fix` commits can be pushed to `1.0.x`
- Only versions in range `>=1.1.0 <1.5.0` can be published from `1.x`, so only `fix` and `feat` commits can be pushed to `1.x` as long the resulting release is lower than `1.5.0`
- Once `2.0.0` is released from `master`, versions in range `>=1.1.0 <2.0.0` can be published from `1.x`, so any number of `fix` and `feat` commits can be pushed to `1.x`
@@ -154,6 +163,7 @@ With the configuration `"branches": ["1.0.x", "1.x", "master"]`, if the last rel
#### Merging into a maintenance branch
With the configuration `"branches": ["1.0.x", "1.x", "master"]`, if the last release published from `master` is `1.0.0` then:
+
- Creating the branch `1.0.x` from `master` will make the `1.0.0` release available on the `1.0.x` distribution channel
- Pushing a `fix` commit on the `1.0.x` branch will release the version `1.0.1` on the `1.0.x` distribution channel
- Creating the branch `1.x` from `master` will make the `1.0.0` release available on the `1.x` distribution channel
@@ -176,11 +186,13 @@ See [publishing pre-releases recipe](../recipes/pre-releases.md) for a detailed
#### Pushing to a pre-release branch
With the configuration `"branches": ["master", {"name": "beta", "prerelease": true}]`, if the last release published from `master` is `1.0.0` then:
+
- Pushing a `BREAKING CHANGE` commit on the `beta` branch will release the version `2.0.0-beta.1` on the `beta` distribution channel
- Pushing either a `fix`, `feat` or a `BREAKING CHANGE` commit on the `beta` branch will release the version `2.0.0-beta.2` (then `2.0.0-beta.3`, `2.0.0-beta.4`, etc...) on the `beta` distribution channel
#### Merging into a pre-release branch
With the configuration `"branches": ["master", {"name": "beta", "prerelease": true}]`, if the last release published from `master` is `1.0.0` and the last one published from `beta` is `2.0.0-beta.1` then:
+
- Pushing a `fix` commit on the `master` branch will release the version `1.0.1` on the default distribution channel
- Merging the branch `master` into `beta` will release the version `2.0.0-beta.2` on the `beta` distribution channel
diff --git a/index.js b/index.js
index 6925abdb1f..bb661f37b7 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,4 @@
-const {pick} = require('lodash');
+const { pick } = require('lodash');
const marked = require('marked');
const TerminalRenderer = require('marked-terminal');
const envCi = require('env-ci');
@@ -13,24 +13,35 @@ const getNextVersion = require('./lib/get-next-version');
const getCommits = require('./lib/get-commits');
const getLastRelease = require('./lib/get-last-release');
const getReleaseToAdd = require('./lib/get-release-to-add');
-const {extractErrors, makeTag} = require('./lib/utils');
+const { extractErrors, makeTag } = require('./lib/utils');
const getGitAuthUrl = require('./lib/get-git-auth-url');
const getBranches = require('./lib/branches');
const getLogger = require('./lib/get-logger');
-const {verifyAuth, isBranchUpToDate, getGitHead, tag, push, pushNotes, getTagHead, addNote} = require('./lib/git');
+const {
+ verifyAuth,
+ isBranchUpToDate,
+ getGitHead,
+ tag,
+ push,
+ pushNotes,
+ getTagHead,
+ addNote,
+} = require('./lib/git');
const getError = require('./lib/get-error');
-const {COMMIT_NAME, COMMIT_EMAIL} = require('./lib/definitions/constants');
+const { COMMIT_NAME, COMMIT_EMAIL } = require('./lib/definitions/constants');
-marked.setOptions({renderer: new TerminalRenderer()});
+marked.setOptions({ renderer: new TerminalRenderer() });
/* eslint complexity: off */
async function run(context, plugins) {
- const {cwd, env, options, logger} = context;
- const {isCi, branch, prBranch, isPr} = context.envCi;
+ const { cwd, env, options, logger } = context;
+ const { isCi, branch, prBranch, isPr } = context.envCi;
const ciBranch = isPr ? prBranch : branch;
if (!isCi && !options.dryRun && !options.noCi) {
- logger.warn('This run was not triggered in a known CI environment, running in dry-run mode.');
+ logger.warn(
+ 'This run was not triggered in a known CI environment, running in dry-run mode.'
+ );
options.dryRun = true;
} else {
// When running on CI, set the commits author and commiter info and prevent the `git` CLI to prompt for username/password. See #703.
@@ -46,37 +57,54 @@ async function run(context, plugins) {
}
if (isCi && isPr && !options.noCi) {
- logger.log("This run was triggered by a pull request and therefore a new version won't be published.");
+ logger.log(
+ "This run was triggered by a pull request and therefore a new version won't be published."
+ );
return false;
}
// Verify config
await verify(context);
- options.repositoryUrl = await getGitAuthUrl({...context, branch: {name: ciBranch}});
- context.branches = await getBranches(options.repositoryUrl, ciBranch, context);
- context.branch = context.branches.find(({name}) => name === ciBranch);
+ options.repositoryUrl = await getGitAuthUrl({
+ ...context,
+ branch: { name: ciBranch },
+ });
+ context.branches = await getBranches(
+ options.repositoryUrl,
+ ciBranch,
+ context
+ );
+ context.branch = context.branches.find(({ name }) => name === ciBranch);
if (!context.branch) {
logger.log(
`This test run was triggered on the branch ${ciBranch}, while semantic-release is configured to only publish from ${context.branches
- .map(({name}) => name)
+ .map(({ name }) => name)
.join(', ')}, therefore a new version won’t be published.`
);
return false;
}
logger[options.dryRun ? 'warn' : 'success'](
- `Run automated release from branch ${ciBranch} on repository ${options.repositoryUrl}${
- options.dryRun ? ' in dry-run mode' : ''
- }`
+ `Run automated release from branch ${ciBranch} on repository ${
+ options.repositoryUrl
+ }${options.dryRun ? ' in dry-run mode' : ''}`
);
try {
try {
- await verifyAuth(options.repositoryUrl, context.branch.name, {cwd, env});
+ await verifyAuth(options.repositoryUrl, context.branch.name, {
+ cwd,
+ env,
+ });
} catch (error) {
- if (!(await isBranchUpToDate(options.repositoryUrl, context.branch.name, {cwd, env}))) {
+ if (
+ !(await isBranchUpToDate(options.repositoryUrl, context.branch.name, {
+ cwd,
+ env,
+ }))
+ ) {
logger.log(
`The local branch ${context.branch.name} is behind the remote one, therefore a new version won't be published.`
);
@@ -86,7 +114,9 @@ async function run(context, plugins) {
throw error;
}
} catch (error) {
- logger.error(`The command "${error.command}" failed with the error message ${error.stderr}.`);
+ logger.error(
+ `The command "${error.command}" failed with the error message ${error.stderr}.`
+ );
throw getError('EGITNOPERMISSION', context);
}
@@ -99,26 +129,51 @@ async function run(context, plugins) {
const releaseToAdd = getReleaseToAdd(context);
if (releaseToAdd) {
- const {lastRelease, currentRelease, nextRelease} = releaseToAdd;
+ const { lastRelease, currentRelease, nextRelease } = releaseToAdd;
- nextRelease.gitHead = await getTagHead(nextRelease.gitHead, {cwd, env});
- currentRelease.gitHead = await getTagHead(currentRelease.gitHead, {cwd, env});
- if (context.branch.mergeRange && !semver.satisfies(nextRelease.version, context.branch.mergeRange)) {
- errors.push(getError('EINVALIDMAINTENANCEMERGE', {...context, nextRelease}));
+ nextRelease.gitHead = await getTagHead(nextRelease.gitHead, { cwd, env });
+ currentRelease.gitHead = await getTagHead(currentRelease.gitHead, {
+ cwd,
+ env,
+ });
+ if (
+ context.branch.mergeRange &&
+ !semver.satisfies(nextRelease.version, context.branch.mergeRange)
+ ) {
+ errors.push(
+ getError('EINVALIDMAINTENANCEMERGE', { ...context, nextRelease })
+ );
} else {
- const commits = await getCommits({...context, lastRelease, nextRelease});
- nextRelease.notes = await plugins.generateNotes({...context, commits, lastRelease, nextRelease});
+ const commits = await getCommits({
+ ...context,
+ lastRelease,
+ nextRelease,
+ });
+ nextRelease.notes = await plugins.generateNotes({
+ ...context,
+ commits,
+ lastRelease,
+ nextRelease,
+ });
if (options.dryRun || options.skipTag) {
- logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run / skip-tag mode`);
+ logger.warn(
+ `Skip ${nextRelease.gitTag} tag creation in dry-run / skip-tag mode`
+ );
} else {
- await addNote({channels: [...currentRelease.channels, nextRelease.channel]}, nextRelease.gitHead, {cwd, env});
- await push(options.repositoryUrl, {cwd, env});
- await pushNotes(options.repositoryUrl, {cwd, env});
+ await addNote(
+ { channels: [...currentRelease.channels, nextRelease.channel] },
+ nextRelease.gitHead,
+ { cwd, env }
+ );
+ await push(options.repositoryUrl, { cwd, env });
+ await pushNotes(options.repositoryUrl, { cwd, env });
logger.success(
- `Add ${nextRelease.channel ? `channel ${nextRelease.channel}` : 'default channel'} to tag ${
- nextRelease.gitTag
- }`
+ `Add ${
+ nextRelease.channel
+ ? `channel ${nextRelease.channel}`
+ : 'default channel'
+ } to tag ${nextRelease.gitTag}`
);
}
@@ -129,9 +184,21 @@ async function run(context, plugins) {
gitHead: nextRelease.gitHead,
});
- const releases = await plugins.addChannel({...context, commits, lastRelease, currentRelease, nextRelease});
+ const releases = await plugins.addChannel({
+ ...context,
+ commits,
+ lastRelease,
+ currentRelease,
+ nextRelease,
+ });
context.releases.push(...releases);
- await plugins.success({...context, lastRelease, commits, nextRelease, releases});
+ await plugins.success({
+ ...context,
+ lastRelease,
+ commits,
+ nextRelease,
+ releases,
+ });
}
}
@@ -141,7 +208,10 @@ async function run(context, plugins) {
context.lastRelease = getLastRelease(context);
if (context.lastRelease.gitHead) {
- context.lastRelease.gitHead = await getTagHead(context.lastRelease.gitHead, {cwd, env});
+ context.lastRelease.gitHead = await getTagHead(
+ context.lastRelease.gitHead,
+ { cwd, env }
+ );
}
if (context.lastRelease.gitTag) {
@@ -157,11 +227,11 @@ async function run(context, plugins) {
const nextRelease = {
type: await plugins.analyzeCommits(context),
channel: context.branch.channel || null,
- gitHead: await getGitHead({cwd, env}),
+ gitHead: await getGitHead({ cwd, env }),
};
if (!nextRelease.type) {
logger.log('There are no relevant changes, so no new version is released.');
- return context.releases.length > 0 ? {releases: context.releases} : false;
+ return context.releases.length > 0 ? { releases: context.releases } : false;
}
context.nextRelease = nextRelease;
@@ -169,11 +239,15 @@ async function run(context, plugins) {
nextRelease.gitTag = makeTag(options.tagFormat, nextRelease.version);
nextRelease.name = nextRelease.gitTag;
- if (context.branch.type !== 'prerelease' && !semver.satisfies(nextRelease.version, context.branch.range)) {
+ if (
+ context.branch.type !== 'prerelease' &&
+ !semver.satisfies(nextRelease.version, context.branch.range)
+ ) {
throw getError('EINVALIDNEXTVERSION', {
...context,
validBranches: context.branches.filter(
- ({type, accept}) => type !== 'prerelease' && accept.includes(nextRelease.type)
+ ({ type, accept }) =>
+ type !== 'prerelease' && accept.includes(nextRelease.type)
),
});
}
@@ -185,23 +259,30 @@ async function run(context, plugins) {
await plugins.prepare(context);
if (options.dryRun || options.skipTag) {
- logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run / skip-tag mode`);
+ logger.warn(
+ `Skip ${nextRelease.gitTag} tag creation in dry-run / skip-tag mode`
+ );
} else {
// Create the tag before calling the publish plugins as some require the tag to exists
- await tag(nextRelease.gitTag, nextRelease.gitHead, {cwd, env});
- await addNote({channels: [nextRelease.channel]}, nextRelease.gitHead, {cwd, env});
- await push(options.repositoryUrl, {cwd, env});
- await pushNotes(options.repositoryUrl, {cwd, env});
+ await tag(nextRelease.gitTag, nextRelease.gitHead, { cwd, env });
+ await addNote({ channels: [nextRelease.channel] }, nextRelease.gitHead, {
+ cwd,
+ env,
+ });
+ await push(options.repositoryUrl, { cwd, env });
+ await pushNotes(options.repositoryUrl, { cwd, env });
logger.success(`Created tag ${nextRelease.gitTag}`);
}
const releases = await plugins.publish(context);
context.releases.push(...releases);
- await plugins.success({...context, releases});
+ await plugins.success({ ...context, releases });
logger.success(
- `Published release ${nextRelease.version} on ${nextRelease.channel ? nextRelease.channel : 'default'} channel`
+ `Published release ${nextRelease.version} on ${
+ nextRelease.channel ? nextRelease.channel : 'default'
+ } channel`
);
if (options.dryRun) {
@@ -214,8 +295,10 @@ async function run(context, plugins) {
return pick(context, ['lastRelease', 'commits', 'nextRelease', 'releases']);
}
-function logErrors({logger, stderr}, err) {
- const errors = extractErrors(err).sort((error) => (error.semanticRelease ? -1 : 0));
+function logErrors({ logger, stderr }, err) {
+ const errors = extractErrors(err).sort((error) =>
+ error.semanticRelease ? -1 : 0
+ );
for (const error of errors) {
if (error.semanticRelease) {
logger.error(`${error.code} ${error.message}`);
@@ -223,7 +306,10 @@ function logErrors({logger, stderr}, err) {
stderr.write(marked(error.details));
}
} else {
- logger.error('An error occurred while running semantic-release: %O', error);
+ logger.error(
+ 'An error occurred while running semantic-release: %O',
+ error
+ );
}
}
}
@@ -232,16 +318,22 @@ async function callFail(context, plugins, err) {
const errors = extractErrors(err).filter((err) => err.semanticRelease);
if (errors.length > 0) {
try {
- await plugins.fail({...context, errors});
+ await plugins.fail({ ...context, errors });
} catch (error) {
logErrors(context, error);
}
}
}
-module.exports = async (cliOptions = {}, {cwd = process.cwd(), env = process.env, stdout, stderr} = {}) => {
- const {unhook} = hookStd(
- {silent: false, streams: [process.stdout, process.stderr, stdout, stderr].filter(Boolean)},
+module.exports = async (
+ cliOptions = {},
+ { cwd = process.cwd(), env = process.env, stdout, stderr } = {}
+) => {
+ const { unhook } = hookStd(
+ {
+ silent: false,
+ streams: [process.stdout, process.stderr, stdout, stderr].filter(Boolean),
+ },
hideSensitive(env)
);
const context = {
@@ -249,12 +341,12 @@ module.exports = async (cliOptions = {}, {cwd = process.cwd(), env = process.env
env,
stdout: stdout || process.stdout,
stderr: stderr || process.stderr,
- envCi: envCi({env, cwd}),
+ envCi: envCi({ env, cwd }),
};
context.logger = getLogger(context);
context.logger.log(`Running ${pkg.name} version ${pkg.version}`);
try {
- const {plugins, options} = await getConfig(context, cliOptions);
+ const { plugins, options } = await getConfig(context, cliOptions);
context.options = options;
try {
const result = await run(context, plugins);
diff --git a/lib/branches/expand.js b/lib/branches/expand.js
index 3deea97c0e..e9f6edc0a3 100644
--- a/lib/branches/expand.js
+++ b/lib/branches/expand.js
@@ -1,16 +1,20 @@
-const {isString, remove, omit, mapValues, template} = require('lodash');
+const { isString, remove, omit, mapValues, template } = require('lodash');
const micromatch = require('micromatch');
-const {getBranches} = require('../git');
+const { getBranches } = require('../git');
-module.exports = async (repositoryUrl, {cwd}, branches) => {
- const gitBranches = await getBranches(repositoryUrl, {cwd});
+module.exports = async (repositoryUrl, { cwd }, branches) => {
+ const gitBranches = await getBranches(repositoryUrl, { cwd });
return branches.reduce(
(branches, branch) => [
...branches,
- ...remove(gitBranches, (name) => micromatch(gitBranches, branch.name).includes(name)).map((name) => ({
+ ...remove(gitBranches, (name) =>
+ micromatch(gitBranches, branch.name).includes(name)
+ ).map((name) => ({
name,
- ...mapValues(omit(branch, 'name'), (value) => (isString(value) ? template(value)({name}) : value)),
+ ...mapValues(omit(branch, 'name'), (value) =>
+ isString(value) ? template(value)({ name }) : value
+ ),
})),
],
[]
diff --git a/lib/branches/get-tags.js b/lib/branches/get-tags.js
index 8cffbeb405..2fa092b57b 100644
--- a/lib/branches/get-tags.js
+++ b/lib/branches/get-tags.js
@@ -1,32 +1,43 @@
-const {template, escapeRegExp} = require('lodash');
+const { template, escapeRegExp } = require('lodash');
const semver = require('semver');
const pReduce = require('p-reduce');
const debug = require('debug')('semantic-release:get-tags');
-const {getTags, getNote} = require('../../lib/git');
+const { getTags, getNote } = require('../../lib/git');
-module.exports = async ({cwd, env, options: {tagFormat}}, branches) => {
+module.exports = async ({ cwd, env, options: { tagFormat } }, branches) => {
// Generate a regex to parse tags formatted with `tagFormat`
// by replacing the `version` variable in the template by `(.+)`.
// The `tagFormat` is compiled with space as the `version` as it's an invalid tag character,
// so it's guaranteed to no be present in the `tagFormat`.
- const tagRegexp = `^${escapeRegExp(template(tagFormat)({version: ' '})).replace(' ', '(.+)')}`;
+ const tagRegexp = `^${escapeRegExp(
+ template(tagFormat)({ version: ' ' })
+ ).replace(' ', '(.+)')}`;
return pReduce(
branches,
async (branches, branch) => {
const branchTags = await pReduce(
- await getTags(branch.name, {cwd, env}),
+ await getTags(branch.name, { cwd, env }),
async (branchTags, tag) => {
const [, version] = tag.match(tagRegexp) || [];
return version && semver.valid(semver.clean(version))
- ? [...branchTags, {gitTag: tag, version, channels: (await getNote(tag, {cwd, env})).channels || [null]}]
+ ? [
+ ...branchTags,
+ {
+ gitTag: tag,
+ version,
+ channels: (await getNote(tag, { cwd, env })).channels || [
+ null,
+ ],
+ },
+ ]
: branchTags;
},
[]
);
debug('found tags for branch %s: %o', branch.name, branchTags);
- return [...branches, {...branch, tags: branchTags}];
+ return [...branches, { ...branch, tags: branchTags }];
},
[]
);
diff --git a/lib/branches/index.js b/lib/branches/index.js
index 0b5f397f8c..1819d5e929 100644
--- a/lib/branches/index.js
+++ b/lib/branches/index.js
@@ -1,59 +1,74 @@
-const {isString, isRegExp} = require('lodash');
+const { isString, isRegExp } = require('lodash');
const AggregateError = require('aggregate-error');
const pEachSeries = require('p-each-series');
const DEFINITIONS = require('../definitions/branches');
const getError = require('../get-error');
-const {fetch, fetchNotes, verifyBranchName} = require('../git');
+const { fetch, fetchNotes, verifyBranchName } = require('../git');
const expand = require('./expand');
const getTags = require('./get-tags');
const normalize = require('./normalize');
module.exports = async (repositoryUrl, ciBranch, context) => {
- const {cwd, env} = context;
+ const { cwd, env } = context;
const remoteBranches = await expand(
repositoryUrl,
context,
- context.options.branches.map((branch) => (isString(branch) || isRegExp(branch) ? {name: branch} : branch))
+ context.options.branches.map((branch) =>
+ isString(branch) || isRegExp(branch) ? { name: branch } : branch
+ )
);
- await pEachSeries(remoteBranches, async ({name}) => {
- await fetch(repositoryUrl, name, ciBranch, {cwd, env});
+ await pEachSeries(remoteBranches, async ({ name }) => {
+ await fetch(repositoryUrl, name, ciBranch, { cwd, env });
});
- await fetchNotes(repositoryUrl, {cwd, env});
+ await fetchNotes(repositoryUrl, { cwd, env });
const branches = await getTags(context, remoteBranches);
const errors = [];
const branchesByType = Object.entries(DEFINITIONS).reduce(
- (branchesByType, [type, {filter}]) => ({[type]: branches.filter(filter), ...branchesByType}),
+ (branchesByType, [type, { filter }]) => ({
+ [type]: branches.filter(filter),
+ ...branchesByType,
+ }),
{}
);
- const result = Object.entries(DEFINITIONS).reduce((result, [type, {branchesValidator, branchValidator}]) => {
- branchesByType[type].forEach((branch) => {
- if (branchValidator && !branchValidator(branch)) {
- errors.push(getError(`E${type.toUpperCase()}BRANCH`, {branch}));
- }
- });
+ const result = Object.entries(DEFINITIONS).reduce(
+ (result, [type, { branchesValidator, branchValidator }]) => {
+ branchesByType[type].forEach((branch) => {
+ if (branchValidator && !branchValidator(branch)) {
+ errors.push(getError(`E${type.toUpperCase()}BRANCH`, { branch }));
+ }
+ });
- const branchesOfType = normalize[type](branchesByType);
+ const branchesOfType = normalize[type](branchesByType);
- if (!branchesValidator(branchesOfType)) {
- errors.push(getError(`E${type.toUpperCase()}BRANCHES`, {branches: branchesOfType}));
- }
+ if (!branchesValidator(branchesOfType)) {
+ errors.push(
+ getError(`E${type.toUpperCase()}BRANCHES`, {
+ branches: branchesOfType,
+ })
+ );
+ }
- return {...result, [type]: branchesOfType};
- }, {});
+ return { ...result, [type]: branchesOfType };
+ },
+ {}
+ );
const duplicates = [...branches]
.map((branch) => branch.name)
.sort()
- .filter((_, idx, array) => array[idx] === array[idx + 1] && array[idx] !== array[idx - 1]);
+ .filter(
+ (_, idx, array) =>
+ array[idx] === array[idx + 1] && array[idx] !== array[idx - 1]
+ );
if (duplicates.length > 0) {
- errors.push(getError('EDUPLICATEBRANCHES', {duplicates}));
+ errors.push(getError('EDUPLICATEBRANCHES', { duplicates }));
}
await pEachSeries(branches, async (branch) => {
diff --git a/lib/branches/normalize.js b/lib/branches/normalize.js
index 369bd9d717..bc79027241 100644
--- a/lib/branches/normalize.js
+++ b/lib/branches/normalize.js
@@ -1,6 +1,6 @@
-const {sortBy, isNil} = require('lodash');
+const { sortBy, isNil } = require('lodash');
const semverDiff = require('semver-diff');
-const {FIRST_RELEASE, RELEASE_TYPE} = require('../definitions/constants');
+const { FIRST_RELEASE, RELEASE_TYPE } = require('../definitions/constants');
const {
tagsToVersions,
isMajorRange,
@@ -13,27 +13,32 @@ const {
getRange,
} = require('../utils');
-function maintenance({maintenance, release}) {
+function maintenance({ maintenance, release }) {
return sortBy(
- maintenance.map(({name, range, channel, ...rest}) => ({
+ maintenance.map(({ name, range, channel, ...rest }) => ({
...rest,
name,
range: range || name,
channel: isNil(channel) ? name : channel,
})),
'range'
- ).map(({name, range, tags, ...rest}, idx, branches) => {
+ ).map(({ name, range, tags, ...rest }, idx, branches) => {
const versions = tagsToVersions(tags);
// Find the lower bound based on Maintenance branches
const maintenanceMin =
// If the current branch has a major range (1.x or 1.x.x) and the previous doesn't
- isMajorRange(range) && branches[idx - 1] && !isMajorRange(branches[idx - 1].range)
+ isMajorRange(range) &&
+ branches[idx - 1] &&
+ !isMajorRange(branches[idx - 1].range)
? // Then the lowest bound is the upper bound of the previous branch range
getUpperBound(branches[idx - 1].range)
: // Otherwise the lowest bound is the lowest bound of the current branch range
getLowerBound(range);
// The actual lower bound is the highest version between the current branch last release and `maintenanceMin`
- const min = highest(getLatestVersion(versions) || FIRST_RELEASE, maintenanceMin);
+ const min = highest(
+ getLatestVersion(versions) || FIRST_RELEASE,
+ maintenanceMin
+ );
// Determine the first release of the default branch not present in any maintenance branch
const base =
(release[0] &&
@@ -55,15 +60,16 @@ function maintenance({maintenance, release}) {
});
}
-function release({release}) {
+function release({ release }) {
if (release.length === 0) {
return release;
}
// The intial lastVersion is the last release from the base branch of `FIRST_RELEASE` (1.0.0)
- let lastVersion = getLatestVersion(tagsToVersions(release[0].tags)) || FIRST_RELEASE;
+ let lastVersion =
+ getLatestVersion(tagsToVersions(release[0].tags)) || FIRST_RELEASE;
- return release.map(({name, tags, channel, ...rest}, idx) => {
+ return release.map(({ name, tags, channel, ...rest }, idx) => {
const versions = tagsToVersions(tags);
// The new lastVersion is the highest version between the current branch last release and the previous branch lastVersion
lastVersion = highest(getLatestVersion(versions), lastVersion);
@@ -73,7 +79,10 @@ function release({release}) {
const bound =
release.length - 1 === idx
? undefined
- : getFirstVersion(tagsToVersions(release[idx + 1].tags), release.slice(0, idx + 1));
+ : getFirstVersion(
+ tagsToVersions(release[idx + 1].tags),
+ release.slice(0, idx + 1)
+ );
const diff = bound ? semverDiff(lastVersion, bound) : null;
return {
@@ -83,14 +92,16 @@ function release({release}) {
type: 'release',
name,
range: getRange(lastVersion, bound),
- accept: bound ? RELEASE_TYPE.slice(0, RELEASE_TYPE.indexOf(diff)) : RELEASE_TYPE,
+ accept: bound
+ ? RELEASE_TYPE.slice(0, RELEASE_TYPE.indexOf(diff))
+ : RELEASE_TYPE,
main: idx === 0,
};
});
}
-function prerelease({prerelease}) {
- return prerelease.map(({name, prerelease, channel, tags, ...rest}) => {
+function prerelease({ prerelease }) {
+ return prerelease.map(({ name, prerelease, channel, tags, ...rest }) => {
const preid = prerelease === true ? name : prerelease;
return {
...rest,
@@ -103,4 +114,4 @@ function prerelease({prerelease}) {
});
}
-module.exports = {maintenance, release, prerelease};
+module.exports = { maintenance, release, prerelease };
diff --git a/lib/definitions/branches.js b/lib/definitions/branches.js
index c447661948..6a7f5dfb45 100644
--- a/lib/definitions/branches.js
+++ b/lib/definitions/branches.js
@@ -1,18 +1,24 @@
-const {isNil, uniqBy} = require('lodash');
+const { isNil, uniqBy } = require('lodash');
const semver = require('semver');
-const {isMaintenanceRange} = require('../utils');
+const { isMaintenanceRange } = require('../utils');
const maintenance = {
- filter: ({name, range}) => (!isNil(range) && range !== false) || isMaintenanceRange(name),
- branchValidator: ({range}) => (isNil(range) ? true : isMaintenanceRange(range)),
- branchesValidator: (branches) => uniqBy(branches, ({range}) => semver.validRange(range)).length === branches.length,
+ filter: ({ name, range }) =>
+ (!isNil(range) && range !== false) || isMaintenanceRange(name),
+ branchValidator: ({ range }) =>
+ isNil(range) ? true : isMaintenanceRange(range),
+ branchesValidator: (branches) =>
+ uniqBy(branches, ({ range }) => semver.validRange(range)).length ===
+ branches.length,
};
const prerelease = {
- filter: ({prerelease}) => !isNil(prerelease) && prerelease !== false,
- branchValidator: ({name, prerelease}) =>
- Boolean(prerelease) && Boolean(semver.valid(`1.0.0-${prerelease === true ? name : prerelease}.1`)),
- branchesValidator: (branches) => uniqBy(branches, 'prerelease').length === branches.length,
+ filter: ({ prerelease }) => !isNil(prerelease) && prerelease !== false,
+ branchValidator: ({ name, prerelease }) =>
+ Boolean(prerelease) &&
+ Boolean(semver.valid(`1.0.0-${prerelease === true ? name : prerelease}.1`)),
+ branchesValidator: (branches) =>
+ uniqBy(branches, 'prerelease').length === branches.length,
};
const release = {
@@ -20,4 +26,4 @@ const release = {
branchesValidator: (branches) => branches.length <= 3 && branches.length > 0,
};
-module.exports = {maintenance, prerelease, release};
+module.exports = { maintenance, prerelease, release };
diff --git a/lib/definitions/errors.js b/lib/definitions/errors.js
index c109f2afab..abeb1ec138 100644
--- a/lib/definitions/errors.js
+++ b/lib/definitions/errors.js
@@ -1,17 +1,21 @@
-const {inspect} = require('util');
-const {toLower, isString, trim} = require('lodash');
+const { inspect } = require('util');
+const { toLower, isString, trim } = require('lodash');
const pkg = require('../../package.json');
-const {RELEASE_TYPE} = require('./constants');
+const { RELEASE_TYPE } = require('./constants');
const [homepage] = pkg.homepage.split('#');
const stringify = (object) =>
- isString(object) ? object : inspect(object, {breakLength: Infinity, depth: 2, maxArrayLength: 5});
+ isString(object)
+ ? object
+ : inspect(object, { breakLength: Infinity, depth: 2, maxArrayLength: 5 });
const linkify = (file) => `${homepage}/blob/master/${file}`;
const wordsList = (words) =>
- `${words.slice(0, -1).join(', ')}${words.length > 1 ? ` or ${words[words.length - 1]}` : trim(words[0])}`;
+ `${words.slice(0, -1).join(', ')}${
+ words.length > 1 ? ` or ${words[words.length - 1]}` : trim(words[0])
+ }`;
module.exports = {
- ENOGITREPO: ({cwd}) => ({
+ ENOGITREPO: ({ cwd }) => ({
message: 'Not running from a git repository.',
details: `The \`semantic-release\` command must be executed from a Git repository.
@@ -29,42 +33,50 @@ Please make sure to add the \`repositoryUrl\` to the [semantic-release configura
'docs/usage/configuration.md'
)}).`,
}),
- EGITNOPERMISSION: ({options: {repositoryUrl}, branch: {name}}) => ({
+ EGITNOPERMISSION: ({ options: { repositoryUrl }, branch: { name } }) => ({
message: 'Cannot push to the Git repository.',
details: `**semantic-release** cannot push the version tag to the branch \`${name}\` on the remote Git repository with URL \`${repositoryUrl}\`.
This can be caused by:
- - a misconfiguration of the [repositoryUrl](${linkify('docs/usage/configuration.md#repositoryurl')}) option
+ - a misconfiguration of the [repositoryUrl](${linkify(
+ 'docs/usage/configuration.md#repositoryurl'
+ )}) option
- the repository being unavailable
- or missing push permission for the user configured via the [Git credentials on your CI environment](${linkify(
'docs/usage/ci-configuration.md#authentication'
)})`,
}),
- EINVALIDTAGFORMAT: ({options: {tagFormat}}) => ({
+ EINVALIDTAGFORMAT: ({ options: { tagFormat } }) => ({
message: 'Invalid `tagFormat` option.',
details: `The [tagFormat](${linkify(
'docs/usage/configuration.md#tagformat'
)}) must compile to a [valid Git reference](https://git-scm.com/docs/git-check-ref-format#_description).
-Your configuration for the \`tagFormat\` option is \`${stringify(tagFormat)}\`.`,
+Your configuration for the \`tagFormat\` option is \`${stringify(
+ tagFormat
+ )}\`.`,
}),
- ETAGNOVERSION: ({options: {tagFormat}}) => ({
+ ETAGNOVERSION: ({ options: { tagFormat } }) => ({
message: 'Invalid `tagFormat` option.',
details: `The [tagFormat](${linkify(
'docs/usage/configuration.md#tagformat'
)}) option must contain the variable \`version\` exactly once.
-Your configuration for the \`tagFormat\` option is \`${stringify(tagFormat)}\`.`,
+Your configuration for the \`tagFormat\` option is \`${stringify(
+ tagFormat
+ )}\`.`,
}),
- EPLUGINCONF: ({type, required, pluginConf}) => ({
+ EPLUGINCONF: ({ type, required, pluginConf }) => ({
message: `The \`${type}\` plugin configuration is invalid.`,
- details: `The [${type} plugin configuration](${linkify(`docs/usage/plugins.md#${toLower(type)}-plugin`)}) ${
+ details: `The [${type} plugin configuration](${linkify(
+ `docs/usage/plugins.md#${toLower(type)}-plugin`
+ )}) ${
required ? 'is required and ' : ''
} must be a single or an array of plugins definition. A plugin definition is an npm module name, optionally wrapped in an array with an object.
Your configuration for the \`${type}\` plugin is \`${stringify(pluginConf)}\`.`,
}),
- EPLUGINSCONF: ({plugin}) => ({
+ EPLUGINSCONF: ({ plugin }) => ({
message: 'The `plugins` configuration is invalid.',
details: `The [plugins](${linkify(
'docs/usage/configuration.md#plugins'
@@ -72,7 +84,7 @@ Your configuration for the \`${type}\` plugin is \`${stringify(pluginConf)}\`.`,
The invalid configuration is \`${stringify(plugin)}\`.`,
}),
- EPLUGIN: ({pluginName, type}) => ({
+ EPLUGIN: ({ pluginName, type }) => ({
message: `A plugin configured in the step ${type} is not a valid semantic-release plugin.`,
details: `A valid \`${type}\` **semantic-release** plugin must be a function or an object with a function in the property \`${type}\`.
@@ -82,65 +94,77 @@ Please refer to the \`${pluginName}\` and [semantic-release plugins configuratio
'docs/usage/plugins.md'
)}) documentation for more details.`,
}),
- EANALYZECOMMITSOUTPUT: ({result, pluginName}) => ({
- message: 'The `analyzeCommits` plugin returned an invalid value. It must return a valid semver release type.',
+ EANALYZECOMMITSOUTPUT: ({ result, pluginName }) => ({
+ message:
+ 'The `analyzeCommits` plugin returned an invalid value. It must return a valid semver release type.',
details: `The \`analyzeCommits\` plugin must return a valid [semver](https://semver.org) release type. The valid values are: ${RELEASE_TYPE.map(
(type) => `\`${type}\``
).join(', ')}.
-The \`analyzeCommits\` function of the \`${pluginName}\` returned \`${stringify(result)}\` instead.
+The \`analyzeCommits\` function of the \`${pluginName}\` returned \`${stringify(
+ result
+ )}\` instead.
We recommend to report the issue to the \`${pluginName}\` authors, providing the following informations:
- The **semantic-release** version: \`${pkg.version}\`
- The **semantic-release** logs from your CI job
- The value returned by the plugin: \`${stringify(result)}\`
-- A link to the **semantic-release** plugin developer guide: [${linkify('docs/developer-guide/plugin.md')}](${linkify(
+- A link to the **semantic-release** plugin developer guide: [${linkify(
'docs/developer-guide/plugin.md'
- )})`,
+ )}](${linkify('docs/developer-guide/plugin.md')})`,
}),
- EGENERATENOTESOUTPUT: ({result, pluginName}) => ({
- message: 'The `generateNotes` plugin returned an invalid value. It must return a `String`.',
+ EGENERATENOTESOUTPUT: ({ result, pluginName }) => ({
+ message:
+ 'The `generateNotes` plugin returned an invalid value. It must return a `String`.',
details: `The \`generateNotes\` plugin must return a \`String\`.
-The \`generateNotes\` function of the \`${pluginName}\` returned \`${stringify(result)}\` instead.
+The \`generateNotes\` function of the \`${pluginName}\` returned \`${stringify(
+ result
+ )}\` instead.
We recommend to report the issue to the \`${pluginName}\` authors, providing the following informations:
- The **semantic-release** version: \`${pkg.version}\`
- The **semantic-release** logs from your CI job
- The value returned by the plugin: \`${stringify(result)}\`
-- A link to the **semantic-release** plugin developer guide: [${linkify('docs/developer-guide/plugin.md')}](${linkify(
+- A link to the **semantic-release** plugin developer guide: [${linkify(
'docs/developer-guide/plugin.md'
- )})`,
+ )}](${linkify('docs/developer-guide/plugin.md')})`,
}),
- EPUBLISHOUTPUT: ({result, pluginName}) => ({
- message: 'A `publish` plugin returned an invalid value. It must return an `Object`.',
+ EPUBLISHOUTPUT: ({ result, pluginName }) => ({
+ message:
+ 'A `publish` plugin returned an invalid value. It must return an `Object`.',
details: `The \`publish\` plugins must return an \`Object\`.
-The \`publish\` function of the \`${pluginName}\` returned \`${stringify(result)}\` instead.
+The \`publish\` function of the \`${pluginName}\` returned \`${stringify(
+ result
+ )}\` instead.
We recommend to report the issue to the \`${pluginName}\` authors, providing the following informations:
- The **semantic-release** version: \`${pkg.version}\`
- The **semantic-release** logs from your CI job
- The value returned by the plugin: \`${stringify(result)}\`
-- A link to the **semantic-release** plugin developer guide: [${linkify('docs/developer-guide/plugin.md')}](${linkify(
+- A link to the **semantic-release** plugin developer guide: [${linkify(
'docs/developer-guide/plugin.md'
- )})`,
+ )}](${linkify('docs/developer-guide/plugin.md')})`,
}),
- EADDCHANNELOUTPUT: ({result, pluginName}) => ({
- message: 'A `addChannel` plugin returned an invalid value. It must return an `Object`.',
+ EADDCHANNELOUTPUT: ({ result, pluginName }) => ({
+ message:
+ 'A `addChannel` plugin returned an invalid value. It must return an `Object`.',
details: `The \`addChannel\` plugins must return an \`Object\`.
-The \`addChannel\` function of the \`${pluginName}\` returned \`${stringify(result)}\` instead.
+The \`addChannel\` function of the \`${pluginName}\` returned \`${stringify(
+ result
+ )}\` instead.
We recommend to report the issue to the \`${pluginName}\` authors, providing the following informations:
- The **semantic-release** version: \`${pkg.version}\`
- The **semantic-release** logs from your CI job
- The value returned by the plugin: \`${stringify(result)}\`
-- A link to the **semantic-release** plugin developer guide: [${linkify('docs/developer-guide/plugin.md')}](${linkify(
+- A link to the **semantic-release** plugin developer guide: [${linkify(
'docs/developer-guide/plugin.md'
- )})`,
+ )}](${linkify('docs/developer-guide/plugin.md')})`,
}),
- EINVALIDBRANCH: ({branch}) => ({
+ EINVALIDBRANCH: ({ branch }) => ({
message: 'A branch is invalid in the `branches` configuration.',
details: `Each branch in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
@@ -148,7 +172,7 @@ We recommend to report the issue to the \`${pluginName}\` authors, providing the
Your configuration for the problematic branch is \`${stringify(branch)}\`.`,
}),
- EINVALIDBRANCHNAME: ({branch}) => ({
+ EINVALIDBRANCHNAME: ({ branch }) => ({
message: 'A branch name is invalid in the `branches` configuration.',
details: `Each branch in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
@@ -156,15 +180,17 @@ Your configuration for the problematic branch is \`${stringify(branch)}\`.`,
Your configuration for the problematic branch is \`${stringify(branch)}\`.`,
}),
- EDUPLICATEBRANCHES: ({duplicates}) => ({
+ EDUPLICATEBRANCHES: ({ duplicates }) => ({
message: 'The `branches` configuration has duplicate branches.',
details: `Each branch in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
)}) must havea unique name.
-Your configuration contains duplicates for the following branch names: \`${stringify(duplicates)}\`.`,
+Your configuration contains duplicates for the following branch names: \`${stringify(
+ duplicates
+ )}\`.`,
}),
- EMAINTENANCEBRANCH: ({branch}) => ({
+ EMAINTENANCEBRANCH: ({ branch }) => ({
message: 'A maintenance branch is invalid in the `branches` configuration.',
details: `Each maintenance branch in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
@@ -172,16 +198,18 @@ Your configuration contains duplicates for the following branch names: \`${strin
Your configuration for the problematic branch is \`${stringify(branch)}\`.`,
}),
- EMAINTENANCEBRANCHES: ({branches}) => ({
- message: 'The maintenance branches are invalid in the `branches` configuration.',
+ EMAINTENANCEBRANCHES: ({ branches }) => ({
+ message:
+ 'The maintenance branches are invalid in the `branches` configuration.',
details: `Each maintenance branch in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
)}) must have a unique \`range\` property.
Your configuration for the problematic branches is \`${stringify(branches)}\`.`,
}),
- ERELEASEBRANCHES: ({branches}) => ({
- message: 'The release branches are invalid in the `branches` configuration.',
+ ERELEASEBRANCHES: ({ branches }) => ({
+ message:
+ 'The release branches are invalid in the `branches` configuration.',
details: `A minimum of 1 and a maximum of 3 release branches are required in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
)}).
@@ -190,43 +218,63 @@ This may occur if your repository does not have a release branch, such as \`mast
Your configuration for the problematic branches is \`${stringify(branches)}\`.`,
}),
- EPRERELEASEBRANCH: ({branch}) => ({
- message: 'A pre-release branch configuration is invalid in the `branches` configuration.',
+ EPRERELEASEBRANCH: ({ branch }) => ({
+ message:
+ 'A pre-release branch configuration is invalid in the `branches` configuration.',
details: `Each pre-release branch in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
)}) must have a \`prerelease\` property valid per the [Semantic Versioning Specification](https://semver.org/#spec-item-9). If the \`prerelease\` property is set to \`true\`, then the \`name\` property is used instead.
Your configuration for the problematic branch is \`${stringify(branch)}\`.`,
}),
- EPRERELEASEBRANCHES: ({branches}) => ({
- message: 'The pre-release branches are invalid in the `branches` configuration.',
+ EPRERELEASEBRANCHES: ({ branches }) => ({
+ message:
+ 'The pre-release branches are invalid in the `branches` configuration.',
details: `Each pre-release branch in the [branches configuration](${linkify(
'docs/usage/configuration.md#branches'
)}) must have a unique \`prerelease\` property. If the \`prerelease\` property is set to \`true\`, then the \`name\` property is used instead.
Your configuration for the problematic branches is \`${stringify(branches)}\`.`,
}),
- EINVALIDNEXTVERSION: ({nextRelease: {version}, branch: {name, range}, commits, validBranches}) => ({
+ EINVALIDNEXTVERSION: ({
+ nextRelease: { version },
+ branch: { name, range },
+ commits,
+ validBranches,
+ }) => ({
message: `The release \`${version}\` on branch \`${name}\` cannot be published as it is out of range.`,
details: `Based on the releases published on other branches, only versions within the range \`${range}\` can be published from branch \`${name}\`.
-The following commit${commits.length > 1 ? 's are' : ' is'} responsible for the invalid release:
-${commits.map(({commit: {short}, subject}) => `- ${subject} (${short})`).join('\n')}
+The following commit${
+ commits.length > 1 ? 's are' : ' is'
+ } responsible for the invalid release:
+${commits
+ .map(({ commit: { short }, subject }) => `- ${subject} (${short})`)
+ .join('\n')}
${
commits.length > 1 ? 'Those commits' : 'This commit'
} should be moved to a valid branch with [git merge](https://git-scm.com/docs/git-merge) or [git cherry-pick](https://git-scm.com/docs/git-cherry-pick) and removed from branch \`${name}\` with [git revert](https://git-scm.com/docs/git-revert) or [git reset](https://git-scm.com/docs/git-reset).
-A valid branch could be ${wordsList(validBranches.map(({name}) => `\`${name}\``))}.
+A valid branch could be ${wordsList(
+ validBranches.map(({ name }) => `\`${name}\``)
+ )}.
-See the [workflow configuration documentation](${linkify('docs/usage/workflow-configuration.md')}) for more details.`,
+See the [workflow configuration documentation](${linkify(
+ 'docs/usage/workflow-configuration.md'
+ )}) for more details.`,
}),
- EINVALIDMAINTENANCEMERGE: ({nextRelease: {channel, gitTag, version}, branch: {mergeRange, name}}) => ({
+ EINVALIDMAINTENANCEMERGE: ({
+ nextRelease: { channel, gitTag, version },
+ branch: { mergeRange, name },
+ }) => ({
message: `The release \`${version}\` on branch \`${name}\` cannot be published as it is out of range.`,
details: `Only releases within the range \`${mergeRange}\` can be merged into the maintenance branch \`${name}\` and published to the \`${channel}\` distribution channel.
The branch \`${name}\` head should be [reset](https://git-scm.com/docs/git-reset) to a previous commit so the commit with tag \`${gitTag}\` is removed from the branch history.
-See the [workflow configuration documentation](${linkify('docs/usage/workflow-configuration.md')}) for more details.`,
+See the [workflow configuration documentation](${linkify(
+ 'docs/usage/workflow-configuration.md'
+ )}) for more details.`,
}),
};
diff --git a/lib/definitions/plugins.js b/lib/definitions/plugins.js
index c2e536ed71..1c03c6f1f6 100644
--- a/lib/definitions/plugins.js
+++ b/lib/definitions/plugins.js
@@ -1,25 +1,27 @@
/* eslint require-atomic-updates: off */
-const {isString, isPlainObject} = require('lodash');
-const {getGitHead} = require('../git');
+const { isString, isPlainObject } = require('lodash');
+const { getGitHead } = require('../git');
const hideSensitive = require('../hide-sensitive');
-const {hideSensitiveValues} = require('../utils');
-const {RELEASE_TYPE, RELEASE_NOTES_SEPARATOR} = require('./constants');
+const { hideSensitiveValues } = require('../utils');
+const { RELEASE_TYPE, RELEASE_NOTES_SEPARATOR } = require('./constants');
module.exports = {
verifyConditions: {
required: false,
dryRun: true,
- pipelineConfig: () => ({settleAll: true}),
+ pipelineConfig: () => ({ settleAll: true }),
},
analyzeCommits: {
default: ['@semantic-release/commit-analyzer'],
required: true,
dryRun: true,
outputValidator: (output) => !output || RELEASE_TYPE.includes(output),
- preprocess: ({commits, ...inputs}) => ({
+ preprocess: ({ commits, ...inputs }) => ({
...inputs,
- commits: commits.filter((commit) => !/\[skip\s+release]|\[release\s+skip]/i.test(commit.message)),
+ commits: commits.filter(
+ (commit) => !/\[skip\s+release]|\[release\s+skip]/i.test(commit.message)
+ ),
}),
postprocess: (results) =>
RELEASE_TYPE[
@@ -32,29 +34,34 @@ module.exports = {
verifyRelease: {
required: false,
dryRun: true,
- pipelineConfig: () => ({settleAll: true}),
+ pipelineConfig: () => ({ settleAll: true }),
},
generateNotes: {
required: false,
dryRun: true,
outputValidator: (output) => !output || isString(output),
pipelineConfig: () => ({
- getNextInput: ({nextRelease, ...context}, notes) => ({
+ getNextInput: ({ nextRelease, ...context }, notes) => ({
...context,
nextRelease: {
...nextRelease,
- notes: `${nextRelease.notes ? `${nextRelease.notes}${RELEASE_NOTES_SEPARATOR}` : ''}${notes}`,
+ notes: `${
+ nextRelease.notes
+ ? `${nextRelease.notes}${RELEASE_NOTES_SEPARATOR}`
+ : ''
+ }${notes}`,
},
}),
}),
- postprocess: (results, {env}) => hideSensitive(env)(results.filter(Boolean).join(RELEASE_NOTES_SEPARATOR)),
+ postprocess: (results, { env }) =>
+ hideSensitive(env)(results.filter(Boolean).join(RELEASE_NOTES_SEPARATOR)),
},
prepare: {
required: false,
dryRun: false,
- pipelineConfig: ({generateNotes}) => ({
+ pipelineConfig: ({ generateNotes }) => ({
getNextInput: async (context) => {
- const newGitHead = await getGitHead({cwd: context.cwd});
+ const newGitHead = await getGitHead({ cwd: context.cwd });
// If previous prepare plugin has created a commit (gitHead changed)
if (context.nextRelease.gitHead !== newGitHead) {
context.nextRelease.gitHead = newGitHead;
@@ -73,7 +80,7 @@ module.exports = {
outputValidator: (output) => !output || isPlainObject(output),
pipelineConfig: () => ({
// Add `nextRelease` and plugin properties to published release
- transform: (release, step, {nextRelease}) => ({
+ transform: (release, step, { nextRelease }) => ({
...(release === false ? {} : nextRelease),
...release,
...step,
@@ -86,7 +93,7 @@ module.exports = {
outputValidator: (output) => !output || isPlainObject(output),
pipelineConfig: () => ({
// Add `nextRelease` and plugin properties to published release
- transform: (release, step, {nextRelease}) => ({
+ transform: (release, step, { nextRelease }) => ({
...(release === false ? {} : nextRelease),
...release,
...step,
@@ -96,13 +103,21 @@ module.exports = {
success: {
required: false,
dryRun: false,
- pipelineConfig: () => ({settleAll: true}),
- preprocess: ({releases, env, ...inputs}) => ({...inputs, env, releases: hideSensitiveValues(env, releases)}),
+ pipelineConfig: () => ({ settleAll: true }),
+ preprocess: ({ releases, env, ...inputs }) => ({
+ ...inputs,
+ env,
+ releases: hideSensitiveValues(env, releases),
+ }),
},
fail: {
required: false,
dryRun: false,
- pipelineConfig: () => ({settleAll: true}),
- preprocess: ({errors, env, ...inputs}) => ({...inputs, env, errors: hideSensitiveValues(env, errors)}),
+ pipelineConfig: () => ({ settleAll: true }),
+ preprocess: ({ errors, env, ...inputs }) => ({
+ ...inputs,
+ env,
+ errors: hideSensitiveValues(env, errors),
+ }),
},
};
diff --git a/lib/get-commits.js b/lib/get-commits.js
index 0c90131bbf..d1f60bb852 100644
--- a/lib/get-commits.js
+++ b/lib/get-commits.js
@@ -1,5 +1,5 @@
const debug = require('debug')('semantic-release:get-commits');
-const {getCommits} = require('./git');
+const { getCommits } = require('./git');
/**
* Retrieve the list of commits on the current branch since the commit sha associated with the last release, or all the commits of the current branch if there is no last released version.
@@ -12,10 +12,10 @@ const {getCommits} = require('./git');
module.exports = async ({
cwd,
env,
- lastRelease: {gitHead: from},
- nextRelease: {gitHead: to = 'HEAD'} = {},
+ lastRelease: { gitHead: from },
+ nextRelease: { gitHead: to = 'HEAD' } = {},
logger,
- options: {commitPaths} = {},
+ options: { commitPaths } = {},
}) => {
if (from) {
debug('Use from: %s', from);
@@ -25,11 +25,14 @@ module.exports = async ({
let paths = [];
if (Array.isArray(commitPaths) && commitPaths.length > 0) {
- logger.log('Commits are being filtered by the commitPaths property: %s', ...commitPaths);
+ logger.log(
+ 'Commits are being filtered by the commitPaths property: %s',
+ ...commitPaths
+ );
paths = ['--', ...commitPaths];
}
- const commits = await getCommits(from, to, paths, {cwd, env});
+ const commits = await getCommits(from, to, paths, { cwd, env });
logger.log(`Found ${commits.length} commits since last release`);
debug('Parsed commits: %o', commits);
diff --git a/lib/get-config.js b/lib/get-config.js
index 1f16962ac9..ab82b2d07d 100644
--- a/lib/get-config.js
+++ b/lib/get-config.js
@@ -1,32 +1,36 @@
-const {castArray, pickBy, isNil, isString, isPlainObject} = require('lodash');
+const { castArray, pickBy, isNil, isString, isPlainObject } = require('lodash');
const readPkgUp = require('read-pkg-up');
-const {cosmiconfig} = require('cosmiconfig');
+const { cosmiconfig } = require('cosmiconfig');
const resolveFrom = require('resolve-from');
const debug = require('debug')('semantic-release:config');
-const {repoUrl} = require('./git');
+const { repoUrl } = require('./git');
const PLUGINS_DEFINITIONS = require('./definitions/plugins');
const plugins = require('./plugins');
-const {validatePlugin, parseConfig} = require('./plugins/utils');
+const { validatePlugin, parseConfig } = require('./plugins/utils');
const CONFIG_NAME = 'release';
module.exports = async (context, cliOptions) => {
- const {cwd, env} = context;
- const {config, filepath} = (await cosmiconfig(CONFIG_NAME).search(cwd)) || {};
+ const { cwd, env } = context;
+ const { config, filepath } =
+ (await cosmiconfig(CONFIG_NAME).search(cwd)) || {};
debug('load config from: %s', filepath);
// Merge config file options and CLI/API options
- let options = {...config, ...cliOptions};
+ let options = { ...config, ...cliOptions };
const pluginsPath = {};
let extendPaths;
- ({extends: extendPaths, ...options} = options);
+ ({ extends: extendPaths, ...options } = options);
if (extendPaths) {
// If `extends` is defined, load and merge each shareable config with `options`
options = {
...castArray(extendPaths).reduce((result, extendPath) => {
- const extendsOptions = require(resolveFrom.silent(__dirname, extendPath) || resolveFrom(cwd, extendPath));
+ const extendsOptions = require(resolveFrom.silent(
+ __dirname,
+ extendPath
+ ) || resolveFrom(cwd, extendPath));
// For each plugin defined in a shareable config, save in `pluginsPath` the extendable config path,
// so those plugin will be loaded relatively to the config file
@@ -38,15 +42,17 @@ module.exports = async (context, cliOptions) => {
pluginsPath[parseConfig(plugin)[0]] = extendPath;
} else if (
PLUGINS_DEFINITIONS[option] &&
- (isString(plugin) || (isPlainObject(plugin) && isString(plugin.path)))
+ (isString(plugin) ||
+ (isPlainObject(plugin) && isString(plugin.path)))
) {
- pluginsPath[isString(plugin) ? plugin : plugin.path] = extendPath;
+ pluginsPath[isString(plugin) ? plugin : plugin.path] =
+ extendPath;
}
});
return pluginsPath;
}, pluginsPath);
- return {...result, ...extendsOptions};
+ return { ...result, ...extendsOptions };
}, {}),
...options,
};
@@ -59,10 +65,12 @@ module.exports = async (context, cliOptions) => {
'master',
'next',
'next-major',
- {name: 'beta', prerelease: true},
- {name: 'alpha', prerelease: true},
+ { name: 'beta', prerelease: true },
+ { name: 'alpha', prerelease: true },
],
- repositoryUrl: (await pkgRepoUrl({normalize: false, cwd})) || (await repoUrl({cwd, env})),
+ repositoryUrl:
+ (await pkgRepoUrl({ normalize: false, cwd })) ||
+ (await repoUrl({ cwd, env })),
tagFormat: `v\${version}`,
plugins: [
'@semantic-release/commit-analyzer',
@@ -72,7 +80,7 @@ module.exports = async (context, cliOptions) => {
],
// Remove `null` and `undefined` options so they can be replaced with default ones
...pickBy(options, (option) => !isNil(option)),
- ...(options.branches ? {branches: castArray(options.branches)} : {}),
+ ...(options.branches ? { branches: castArray(options.branches) } : {}),
};
if (options.ci === false) {
@@ -81,10 +89,18 @@ module.exports = async (context, cliOptions) => {
debug('options values: %O', options);
- return {options, plugins: await plugins({...context, options}, pluginsPath)};
+ return {
+ options,
+ plugins: await plugins({ ...context, options }, pluginsPath),
+ };
};
async function pkgRepoUrl(options) {
- const {packageJson} = (await readPkgUp(options)) || {};
- return packageJson && (isPlainObject(packageJson.repository) ? packageJson.repository.url : packageJson.repository);
+ const { packageJson } = (await readPkgUp(options)) || {};
+ return (
+ packageJson &&
+ (isPlainObject(packageJson.repository)
+ ? packageJson.repository.url
+ : packageJson.repository)
+ );
}
diff --git a/lib/get-error.js b/lib/get-error.js
index 56a09c0d51..61cb88b969 100644
--- a/lib/get-error.js
+++ b/lib/get-error.js
@@ -2,6 +2,6 @@ const SemanticReleaseError = require('@semantic-release/error');
const ERROR_DEFINITIONS = require('./definitions/errors');
module.exports = (code, ctx = {}) => {
- const {message, details} = ERROR_DEFINITIONS[code](ctx);
+ const { message, details } = ERROR_DEFINITIONS[code](ctx);
return new SemanticReleaseError(message, code, details);
};
diff --git a/lib/get-git-auth-url.js b/lib/get-git-auth-url.js
index 0c35cd299d..7cd78cd6e1 100644
--- a/lib/get-git-auth-url.js
+++ b/lib/get-git-auth-url.js
@@ -1,7 +1,7 @@
-const {parse, format} = require('url'); // eslint-disable-line node/no-deprecated-api
-const {isNil} = require('lodash');
+const { parse, format } = require('url');
+const { isNil } = require('lodash');
const hostedGitInfo = require('hosted-git-info');
-const {verifyAuth} = require('./git');
+const { verifyAuth } = require('./git');
const debug = require('debug')('semantic-release:get-git-auth-url');
/**
@@ -15,9 +15,15 @@ const debug = require('debug')('semantic-release:get-git-auth-url');
*/
function formatAuthUrl(protocol, repositoryUrl, gitCredentials) {
const [match, auth, host, basePort, path] =
- /^(?!.+:\/\/)(?:(?.*)@)?(?.*?):(?\d+)?:?\/?(?.*)$/.exec(repositoryUrl) || [];
- const {port, hostname, ...parsed} = parse(
- match ? `ssh://${auth ? `${auth}@` : ''}${host}${basePort ? `:${basePort}` : ''}/${path}` : repositoryUrl
+ /^(?!.+:\/\/)(?:(?.*)@)?(?.*?):(?\d+)?:?\/?(?.*)$/.exec(
+ repositoryUrl
+ ) || [];
+ const { port, hostname, ...parsed } = parse(
+ match
+ ? `ssh://${auth ? `${auth}@` : ''}${host}${
+ basePort ? `:${basePort}` : ''
+ }/${path}`
+ : repositoryUrl
);
return format({
@@ -36,9 +42,9 @@ function formatAuthUrl(protocol, repositoryUrl, gitCredentials) {
*
* @return {String} The authUrl as is if the connection was successfull, null otherwise
*/
-async function ensureValidAuthUrl({cwd, env, branch}, authUrl) {
+async function ensureValidAuthUrl({ cwd, env, branch }, authUrl) {
try {
- await verifyAuth(authUrl, branch.name, {cwd, env});
+ await verifyAuth(authUrl, branch.name, { cwd, env });
return authUrl;
} catch (error) {
debug(error);
@@ -58,7 +64,7 @@ async function ensureValidAuthUrl({cwd, env, branch}, authUrl) {
* @return {String} The formatted Git repository URL.
*/
module.exports = async (context) => {
- const {cwd, env, branch} = context;
+ const { cwd, env, branch } = context;
const GIT_TOKENS = {
GIT_CREDENTIALS: undefined,
GH_TOKEN: undefined,
@@ -73,34 +79,44 @@ module.exports = async (context) => {
BITBUCKET_TOKEN_BASIC_AUTH: '',
};
- let {repositoryUrl} = context.options;
- const info = hostedGitInfo.fromUrl(repositoryUrl, {noGitPlus: true});
- const {protocol, ...parsed} = parse(repositoryUrl);
+ let { repositoryUrl } = context.options;
+ const info = hostedGitInfo.fromUrl(repositoryUrl, { noGitPlus: true });
+ const { protocol, ...parsed } = parse(repositoryUrl);
if (info && info.getDefaultRepresentation() === 'shortcut') {
// Expand shorthand URLs (such as `owner/repo` or `gitlab:owner/repo`)
repositoryUrl = info.https();
} else if (protocol && protocol.includes('http')) {
// Replace `git+https` and `git+http` with `https` or `http`
- repositoryUrl = format({...parsed, protocol: protocol.includes('https') ? 'https' : 'http', href: null});
+ repositoryUrl = format({
+ ...parsed,
+ protocol: protocol.includes('https') ? 'https' : 'http',
+ href: null,
+ });
}
// Test if push is allowed without transforming the URL (e.g. is ssh keys are set up)
try {
debug('Verifying ssh auth by attempting to push to %s', repositoryUrl);
- await verifyAuth(repositoryUrl, branch.name, {cwd, env});
+ await verifyAuth(repositoryUrl, branch.name, { cwd, env });
} catch (_) {
debug('SSH key auth failed, falling back to https.');
- const envVars = Object.keys(GIT_TOKENS).filter((envVar) => !isNil(env[envVar]));
+ const envVars = Object.keys(GIT_TOKENS).filter(
+ (envVar) => !isNil(env[envVar])
+ );
// Skip verification if there is no ambiguity on which env var to use for authentication
if (envVars.length === 1) {
- const gitCredentials = `${GIT_TOKENS[envVars[0]] || ''}${env[envVars[0]]}`;
+ const gitCredentials = `${GIT_TOKENS[envVars[0]] || ''}${
+ env[envVars[0]]
+ }`;
return formatAuthUrl(protocol, repositoryUrl, gitCredentials);
}
if (envVars.length > 1) {
- debug(`Found ${envVars.length} credentials in environment, trying all of them`);
+ debug(
+ `Found ${envVars.length} credentials in environment, trying all of them`
+ );
const candidateRepositoryUrls = [];
for (const envVar of envVars) {
@@ -110,7 +126,9 @@ module.exports = async (context) => {
}
const validRepositoryUrls = await Promise.all(candidateRepositoryUrls);
- const chosenAuthUrlIndex = validRepositoryUrls.findIndex((url) => url !== null);
+ const chosenAuthUrlIndex = validRepositoryUrls.findIndex(
+ (url) => url !== null
+ );
if (chosenAuthUrlIndex > -1) {
debug(`Using "${envVars[chosenAuthUrlIndex]}" to authenticate`);
return validRepositoryUrls[chosenAuthUrlIndex];
diff --git a/lib/get-last-release.js b/lib/get-last-release.js
index 110fd85f4f..95104f74b8 100644
--- a/lib/get-last-release.js
+++ b/lib/get-last-release.js
@@ -1,6 +1,6 @@
-const {isUndefined} = require('lodash');
+const { isUndefined } = require('lodash');
const semver = require('semver');
-const {makeTag, isSameChannel} = require('./utils');
+const { makeTag, isSameChannel } = require('./utils');
/**
* Last release.
@@ -26,18 +26,27 @@ const {makeTag, isSameChannel} = require('./utils');
*
* @return {LastRelease} The last tagged release or empty object if none is found.
*/
-module.exports = ({branch, options: {tagFormat}}, {before} = {}) => {
- const [{version, gitTag, channels} = {}] = branch.tags
+module.exports = ({ branch, options: { tagFormat } }, { before } = {}) => {
+ const [{ version, gitTag, channels } = {}] = branch.tags
.filter(
(tag) =>
- ((branch.type === 'prerelease' && tag.channels.some((channel) => isSameChannel(branch.channel, channel))) ||
+ ((branch.type === 'prerelease' &&
+ tag.channels.some((channel) =>
+ isSameChannel(branch.channel, channel)
+ )) ||
!semver.prerelease(tag.version)) &&
(isUndefined(before) || semver.lt(tag.version, before))
)
.sort((a, b) => semver.rcompare(a.version, b.version));
if (gitTag) {
- return {version, gitTag, channels, gitHead: gitTag, name: makeTag(tagFormat, version)};
+ return {
+ version,
+ gitTag,
+ channels,
+ gitHead: gitTag,
+ name: makeTag(tagFormat, version),
+ };
}
return {};
diff --git a/lib/get-logger.js b/lib/get-logger.js
index d37da6bbb0..c6fd888892 100644
--- a/lib/get-logger.js
+++ b/lib/get-logger.js
@@ -1,16 +1,35 @@
-const {Signale} = require('signale');
+const { Signale } = require('signale');
const figures = require('figures');
-module.exports = ({stdout, stderr}) =>
+module.exports = ({ stdout, stderr }) =>
new Signale({
- config: {displayTimestamp: true, underlineMessage: false, displayLabel: false},
+ config: {
+ displayTimestamp: true,
+ underlineMessage: false,
+ displayLabel: false,
+ },
disabled: false,
interactive: false,
scope: 'semantic-release',
stream: [stdout],
types: {
- error: {badge: figures.cross, color: 'red', label: '', stream: [stderr]},
- log: {badge: figures.info, color: 'magenta', label: '', stream: [stdout]},
- success: {badge: figures.tick, color: 'green', label: '', stream: [stdout]},
+ error: {
+ badge: figures.cross,
+ color: 'red',
+ label: '',
+ stream: [stderr],
+ },
+ log: {
+ badge: figures.info,
+ color: 'magenta',
+ label: '',
+ stream: [stdout],
+ },
+ success: {
+ badge: figures.tick,
+ color: 'green',
+ label: '',
+ stream: [stdout],
+ },
},
});
diff --git a/lib/get-next-version.js b/lib/get-next-version.js
index 8734922d3e..53d0adbc1d 100644
--- a/lib/get-next-version.js
+++ b/lib/get-next-version.js
@@ -1,25 +1,42 @@
const semver = require('semver');
-const {FIRST_RELEASE, FIRSTPRERELEASE} = require('./definitions/constants');
-const {isSameChannel, getLatestVersion, tagsToVersions, highest} = require('./utils');
+const { FIRST_RELEASE, FIRSTPRERELEASE } = require('./definitions/constants');
+const {
+ isSameChannel,
+ getLatestVersion,
+ tagsToVersions,
+ highest,
+} = require('./utils');
-module.exports = ({branch, nextRelease: {type, channel}, lastRelease, logger}) => {
+module.exports = ({
+ branch,
+ nextRelease: { type, channel },
+ lastRelease,
+ logger,
+}) => {
let version;
if (lastRelease.version) {
- const {major, minor, patch} = semver.parse(lastRelease.version);
+ const { major, minor, patch } = semver.parse(lastRelease.version);
if (branch.type === 'prerelease') {
if (
semver.prerelease(lastRelease.version) &&
- lastRelease.channels.some((lastReleaseChannel) => isSameChannel(lastReleaseChannel, channel))
+ lastRelease.channels.some((lastReleaseChannel) =>
+ isSameChannel(lastReleaseChannel, channel)
+ )
) {
version = highest(
semver.inc(lastRelease.version, 'prerelease'),
- `${semver.inc(getLatestVersion(tagsToVersions(branch.tags), {withPrerelease: true}), type)}-${
- branch.prerelease
- }.${FIRSTPRERELEASE}`
+ `${semver.inc(
+ getLatestVersion(tagsToVersions(branch.tags), {
+ withPrerelease: true,
+ }),
+ type
+ )}-${branch.prerelease}.${FIRSTPRERELEASE}`
);
} else {
- version = `${semver.inc(`${major}.${minor}.${patch}`, type)}-${branch.prerelease}.${FIRSTPRERELEASE}`;
+ version = `${semver.inc(`${major}.${minor}.${patch}`, type)}-${
+ branch.prerelease
+ }.${FIRSTPRERELEASE}`;
}
} else {
version = semver.inc(lastRelease.version, type);
@@ -27,8 +44,13 @@ module.exports = ({branch, nextRelease: {type, channel}, lastRelease, logger}) =
logger.log('The next release version is %s', version);
} else {
- version = branch.type === 'prerelease' ? `${FIRST_RELEASE}-${branch.prerelease}.${FIRSTPRERELEASE}` : FIRST_RELEASE;
- logger.log(`There is no previous release, the next release version is ${version}`);
+ version =
+ branch.type === 'prerelease'
+ ? `${FIRST_RELEASE}-${branch.prerelease}.${FIRSTPRERELEASE}`
+ : FIRST_RELEASE;
+ logger.log(
+ `There is no previous release, the next release version is ${version}`
+ );
}
return version;
diff --git a/lib/get-release-to-add.js b/lib/get-release-to-add.js
index a76ce5ef20..d672a8c81a 100644
--- a/lib/get-release-to-add.js
+++ b/lib/get-release-to-add.js
@@ -1,8 +1,8 @@
-const {uniqBy, intersection} = require('lodash');
+const { uniqBy, intersection } = require('lodash');
const semver = require('semver');
const semverDiff = require('semver-diff');
const getLastRelease = require('./get-last-release');
-const {makeTag, getLowerBound} = require('./utils');
+const { makeTag, getLowerBound } = require('./utils');
/**
* Find releases that have been merged from from a higher branch but not added on the channel of the current branch.
@@ -15,38 +15,48 @@ module.exports = (context) => {
const {
branch,
branches,
- options: {tagFormat},
+ options: { tagFormat },
} = context;
const higherChannels = branches
// Consider only releases of higher branches
- .slice(branches.findIndex(({name}) => name === branch.name) + 1)
+ .slice(branches.findIndex(({ name }) => name === branch.name) + 1)
// Exclude prerelease branches
- .filter(({type}) => type !== 'prerelease')
- .map(({channel}) => channel || null);
+ .filter(({ type }) => type !== 'prerelease')
+ .map(({ channel }) => channel || null);
const versiontoAdd = uniqBy(
branch.tags.filter(
- ({channels, version}) =>
+ ({ channels, version }) =>
!channels.includes(branch.channel || null) &&
intersection(channels, higherChannels).length > 0 &&
- (branch.type !== 'maintenance' || semver.gte(version, getLowerBound(branch.mergeRange)))
+ (branch.type !== 'maintenance' ||
+ semver.gte(version, getLowerBound(branch.mergeRange)))
),
'version'
).sort((a, b) => semver.compare(b.version, a.version))[0];
if (versiontoAdd) {
- const {version, gitTag, channels} = versiontoAdd;
- const lastRelease = getLastRelease(context, {before: version});
+ const { version, gitTag, channels } = versiontoAdd;
+ const lastRelease = getLastRelease(context, { before: version });
if (semver.gt(getLastRelease(context).version, version)) {
return;
}
- const type = lastRelease.version ? semverDiff(lastRelease.version, version) : 'major';
+ const type = lastRelease.version
+ ? semverDiff(lastRelease.version, version)
+ : 'major';
const name = makeTag(tagFormat, version);
return {
lastRelease,
- currentRelease: {type, version, channels, gitTag, name, gitHead: gitTag},
+ currentRelease: {
+ type,
+ version,
+ channels,
+ gitTag,
+ name,
+ gitHead: gitTag,
+ },
nextRelease: {
type,
version,
diff --git a/lib/git.js b/lib/git.js
index 6d70162c85..ee3abb1d4e 100644
--- a/lib/git.js
+++ b/lib/git.js
@@ -2,9 +2,14 @@ const gitLogParser = require('git-log-parser');
const getStream = require('get-stream');
const execa = require('execa');
const debug = require('debug')('semantic-release:git');
-const {GIT_NOTE_REF} = require('./definitions/constants');
+const { GIT_NOTE_REF } = require('./definitions/constants');
-Object.assign(gitLogParser.fields, {hash: 'H', message: 'B', gitTags: 'd', committerDate: {key: 'ci', type: Date}});
+Object.assign(gitLogParser.fields, {
+ hash: 'H',
+ message: 'B',
+ gitTags: 'd',
+ committerDate: { key: 'ci', type: Date },
+});
/**
* Get the commit sha for a given tag.
@@ -49,10 +54,14 @@ async function getCommits(from, to, paths, execaOptions) {
{
_: [`${from ? from + '..' : ''}${to}`, ...paths],
},
- {cwd: execaOptions.cwd, env: {...process.env, ...execaOptions.env}}
+ { cwd: execaOptions.cwd, env: { ...process.env, ...execaOptions.env } }
)
)
- ).map(({message, gitTags, ...commit}) => ({...commit, message: message.trim(), gitTags: gitTags.trim()}));
+ ).map(({ message, gitTags, ...commit }) => ({
+ ...commit,
+ message: message.trim(),
+ gitTags: gitTags.trim(),
+ }));
}
/**
@@ -65,7 +74,9 @@ async function getCommits(from, to, paths, execaOptions) {
* @throws {Error} If the `git` command fails.
*/
async function getBranches(repositoryUrl, execaOptions) {
- return (await execa('git', ['ls-remote', '--heads', repositoryUrl], execaOptions)).stdout
+ return (
+ await execa('git', ['ls-remote', '--heads', repositoryUrl], execaOptions)
+ ).stdout
.split('\n')
.filter(Boolean)
.map((branch) => branch.match(/^.+refs\/heads\/(?.+)$/)[1]);
@@ -81,7 +92,10 @@ async function getBranches(repositoryUrl, execaOptions) {
*/
async function isRefExists(ref, execaOptions) {
try {
- return (await execa('git', ['rev-parse', '--verify', ref], execaOptions)).exitCode === 0;
+ return (
+ (await execa('git', ['rev-parse', '--verify', ref], execaOptions))
+ .exitCode === 0
+ );
} catch (error) {
debug(error);
}
@@ -103,7 +117,12 @@ async function isRefExists(ref, execaOptions) {
*/
async function fetch(repositoryUrl, branch, ciBranch, execaOptions) {
const isDetachedHead =
- (await execa('git', ['rev-parse', '--abbrev-ref', 'HEAD'], {...execaOptions, reject: false})).stdout === 'HEAD';
+ (
+ await execa('git', ['rev-parse', '--abbrev-ref', 'HEAD'], {
+ ...execaOptions,
+ reject: false,
+ })
+ ).stdout === 'HEAD';
try {
await execa(
@@ -114,7 +133,11 @@ async function fetch(repositoryUrl, branch, ciBranch, execaOptions) {
'--tags',
...(branch === ciBranch && !isDetachedHead
? [repositoryUrl]
- : ['--update-head-ok', repositoryUrl, `+refs/heads/${branch}:refs/heads/${branch}`]),
+ : [
+ '--update-head-ok',
+ repositoryUrl,
+ `+refs/heads/${branch}:refs/heads/${branch}`,
+ ]),
],
execaOptions
);
@@ -126,7 +149,11 @@ async function fetch(repositoryUrl, branch, ciBranch, execaOptions) {
'--tags',
...(branch === ciBranch && !isDetachedHead
? [repositoryUrl]
- : ['--update-head-ok', repositoryUrl, `+refs/heads/${branch}:refs/heads/${branch}`]),
+ : [
+ '--update-head-ok',
+ repositoryUrl,
+ `+refs/heads/${branch}:refs/heads/${branch}`,
+ ]),
],
execaOptions
);
@@ -143,14 +170,27 @@ async function fetchNotes(repositoryUrl, execaOptions) {
try {
await execa(
'git',
- ['fetch', '--unshallow', repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`],
+ [
+ 'fetch',
+ '--unshallow',
+ repositoryUrl,
+ `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`,
+ ],
execaOptions
);
} catch (_) {
- await execa('git', ['fetch', repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`], {
- ...execaOptions,
- reject: false,
- });
+ await execa(
+ 'git',
+ [
+ 'fetch',
+ repositoryUrl,
+ `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`,
+ ],
+ {
+ ...execaOptions,
+ reject: false,
+ }
+ );
}
}
@@ -174,7 +214,9 @@ async function getGitHead(execaOptions) {
*/
async function repoUrl(execaOptions) {
try {
- return (await execa('git', ['config', '--get', 'remote.origin.url'], execaOptions)).stdout;
+ return (
+ await execa('git', ['config', '--get', 'remote.origin.url'], execaOptions)
+ ).stdout;
} catch (error) {
debug(error);
}
@@ -189,7 +231,10 @@ async function repoUrl(execaOptions) {
*/
async function isGitRepo(execaOptions) {
try {
- return (await execa('git', ['rev-parse', '--git-dir'], execaOptions)).exitCode === 0;
+ return (
+ (await execa('git', ['rev-parse', '--git-dir'], execaOptions))
+ .exitCode === 0
+ );
} catch (error) {
debug(error);
}
@@ -206,7 +251,11 @@ async function isGitRepo(execaOptions) {
*/
async function verifyAuth(repositoryUrl, branch, execaOptions) {
try {
- await execa('git', ['push', '--dry-run', '--no-verify', repositoryUrl, `HEAD:${branch}`], execaOptions);
+ await execa(
+ 'git',
+ ['push', '--dry-run', '--no-verify', repositoryUrl, `HEAD:${branch}`],
+ execaOptions
+ );
} catch (error) {
debug(error);
throw error;
@@ -247,7 +296,11 @@ async function push(repositoryUrl, execaOptions) {
* @throws {Error} if the push failed.
*/
async function pushNotes(repositoryUrl, execaOptions) {
- await execa('git', ['push', repositoryUrl, `refs/notes/${GIT_NOTE_REF}`], execaOptions);
+ await execa(
+ 'git',
+ ['push', repositoryUrl, `refs/notes/${GIT_NOTE_REF}`],
+ execaOptions
+ );
}
/**
@@ -260,7 +313,15 @@ async function pushNotes(repositoryUrl, execaOptions) {
*/
async function verifyTagName(tagName, execaOptions) {
try {
- return (await execa('git', ['check-ref-format', `refs/tags/${tagName}`], execaOptions)).exitCode === 0;
+ return (
+ (
+ await execa(
+ 'git',
+ ['check-ref-format', `refs/tags/${tagName}`],
+ execaOptions
+ )
+ ).exitCode === 0
+ );
} catch (error) {
debug(error);
}
@@ -276,7 +337,15 @@ async function verifyTagName(tagName, execaOptions) {
*/
async function verifyBranchName(branch, execaOptions) {
try {
- return (await execa('git', ['check-ref-format', `refs/heads/${branch}`], execaOptions)).exitCode === 0;
+ return (
+ (
+ await execa(
+ 'git',
+ ['check-ref-format', `refs/heads/${branch}`],
+ execaOptions
+ )
+ ).exitCode === 0
+ );
} catch (error) {
debug(error);
}
@@ -294,7 +363,13 @@ async function verifyBranchName(branch, execaOptions) {
async function isBranchUpToDate(repositoryUrl, branch, execaOptions) {
return (
(await getGitHead(execaOptions)) ===
- (await execa('git', ['ls-remote', '--heads', repositoryUrl, branch], execaOptions)).stdout.match(/^(?[\w+)?/)[1]
+ (
+ await execa(
+ 'git',
+ ['ls-remote', '--heads', repositoryUrl, branch],
+ execaOptions
+ )
+ ).stdout.match(/^(?][\w+)?/)[1]
);
}
@@ -308,7 +383,15 @@ async function isBranchUpToDate(repositoryUrl, branch, execaOptions) {
*/
async function getNote(ref, execaOptions) {
try {
- return JSON.parse((await execa('git', ['notes', '--ref', GIT_NOTE_REF, 'show', ref], execaOptions)).stdout);
+ return JSON.parse(
+ (
+ await execa(
+ 'git',
+ ['notes', '--ref', GIT_NOTE_REF, 'show', ref],
+ execaOptions
+ )
+ ).stdout
+ );
} catch (error) {
if (error.exitCode === 1) {
return {};
@@ -327,7 +410,20 @@ async function getNote(ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
async function addNote(note, ref, execaOptions) {
- await execa('git', ['notes', '--ref', GIT_NOTE_REF, 'add', '-f', '-m', JSON.stringify(note), ref], execaOptions);
+ await execa(
+ 'git',
+ [
+ 'notes',
+ '--ref',
+ GIT_NOTE_REF,
+ 'add',
+ '-f',
+ '-m',
+ JSON.stringify(note),
+ ref,
+ ],
+ execaOptions
+ );
}
module.exports = {
diff --git a/lib/hide-sensitive.js b/lib/hide-sensitive.js
index 1768c5901b..ee22683d11 100644
--- a/lib/hide-sensitive.js
+++ b/lib/hide-sensitive.js
@@ -1,5 +1,8 @@
-const {escapeRegExp, size, isString} = require('lodash');
-const {SECRET_REPLACEMENT, SECRET_MIN_SIZE} = require('./definitions/constants');
+const { escapeRegExp, size, isString } = require('lodash');
+const {
+ SECRET_REPLACEMENT,
+ SECRET_MIN_SIZE,
+} = require('./definitions/constants');
module.exports = (env) => {
const toReplace = Object.keys(env).filter((envVar) => {
@@ -8,13 +11,23 @@ module.exports = (env) => {
return false;
}
- return /token|password|credential|secret|private/i.test(envVar) && size(env[envVar].trim()) >= SECRET_MIN_SIZE;
+ return (
+ /token|password|credential|secret|private/i.test(envVar) &&
+ size(env[envVar].trim()) >= SECRET_MIN_SIZE
+ );
});
const regexp = new RegExp(
- toReplace.map((envVar) => `${escapeRegExp(env[envVar])}|${escapeRegExp(encodeURI(env[envVar]))}`).join('|'),
+ toReplace
+ .map(
+ (envVar) =>
+ `${escapeRegExp(env[envVar])}|${escapeRegExp(encodeURI(env[envVar]))}`
+ )
+ .join('|'),
'g'
);
return (output) =>
- output && isString(output) && toReplace.length > 0 ? output.toString().replace(regexp, SECRET_REPLACEMENT) : output;
+ output && isString(output) && toReplace.length > 0
+ ? output.toString().replace(regexp, SECRET_REPLACEMENT)
+ : output;
};
diff --git a/lib/plugins/index.js b/lib/plugins/index.js
index 7fd2286380..a1dca19df9 100644
--- a/lib/plugins/index.js
+++ b/lib/plugins/index.js
@@ -1,20 +1,34 @@
-const {identity, isPlainObject, omit, castArray, isNil, isString} = require('lodash');
+const {
+ identity,
+ isPlainObject,
+ omit,
+ castArray,
+ isNil,
+ isString,
+} = require('lodash');
const AggregateError = require('aggregate-error');
const getError = require('../get-error');
const PLUGINS_DEFINITIONS = require('../definitions/plugins');
-const {validatePlugin, validateStep, loadPlugin, parseConfig} = require('./utils');
+const {
+ validatePlugin,
+ validateStep,
+ loadPlugin,
+ parseConfig,
+} = require('./utils');
const pipeline = require('./pipeline');
const normalize = require('./normalize');
module.exports = (context, pluginsPath) => {
- let {options, logger} = context;
+ let { options, logger } = context;
const errors = [];
const plugins = options.plugins
? castArray(options.plugins).reduce((plugins, plugin) => {
if (validatePlugin(plugin)) {
const [name, config] = parseConfig(plugin);
- plugin = isString(name) ? loadPlugin(context, name, pluginsPath) : name;
+ plugin = isString(name)
+ ? loadPlugin(context, name, pluginsPath)
+ : name;
if (isPlainObject(plugin)) {
Object.entries(plugin).forEach(([type, func]) => {
@@ -28,10 +42,10 @@ module.exports = (context, pluginsPath) => {
}
});
} else {
- errors.push(getError('EPLUGINSCONF', {plugin}));
+ errors.push(getError('EPLUGINSCONF', { plugin }));
}
} else {
- errors.push(getError('EPLUGINSCONF', {plugin}));
+ errors.push(getError('EPLUGINSCONF', { plugin }));
}
return plugins;
@@ -42,10 +56,22 @@ module.exports = (context, pluginsPath) => {
throw new AggregateError(errors);
}
- options = {...plugins, ...options};
+ options = { ...plugins, ...options };
const pluginsConf = Object.entries(PLUGINS_DEFINITIONS).reduce(
- (pluginsConf, [type, {required, default: def, pipelineConfig, postprocess = identity, preprocess = identity}]) => {
+ (
+ pluginsConf,
+ [
+ type,
+ {
+ required,
+ default: def,
+ pipelineConfig,
+ postprocess = identity,
+ preprocess = identity,
+ },
+ ]
+ ) => {
let pluginOptions;
if (isNil(options[type]) && def) {
@@ -54,12 +80,20 @@ module.exports = (context, pluginsPath) => {
// If an object is passed and the path is missing, merge it with step options
if (isPlainObject(options[type]) && !options[type].path) {
options[type] = castArray(plugins[type]).map((plugin) =>
- plugin ? [plugin[0], Object.assign(plugin[1], options[type])] : plugin
+ plugin
+ ? [plugin[0], Object.assign(plugin[1], options[type])]
+ : plugin
);
}
- if (!validateStep({required}, options[type])) {
- errors.push(getError('EPLUGINCONF', {type, required, pluginConf: options[type]}));
+ if (!validateStep({ required }, options[type])) {
+ errors.push(
+ getError('EPLUGINCONF', {
+ type,
+ required,
+ pluginConf: options[type],
+ })
+ );
return pluginsConf;
}
@@ -68,7 +102,10 @@ module.exports = (context, pluginsPath) => {
const steps = castArray(pluginOptions).map((pluginOpt) =>
normalize(
- {...context, options: omit(options, Object.keys(PLUGINS_DEFINITIONS), 'plugins')},
+ {
+ ...context,
+ options: omit(options, Object.keys(PLUGINS_DEFINITIONS), 'plugins'),
+ },
type,
pluginOpt,
pluginsPath
@@ -77,7 +114,10 @@ module.exports = (context, pluginsPath) => {
pluginsConf[type] = async (input) =>
postprocess(
- await pipeline(steps, pipelineConfig && pipelineConfig(pluginsConf, logger))(await preprocess(input)),
+ await pipeline(
+ steps,
+ pipelineConfig && pipelineConfig(pluginsConf, logger)
+ )(await preprocess(input)),
input
);
diff --git a/lib/plugins/normalize.js b/lib/plugins/normalize.js
index c9f2ab62cd..1e4f372c9d 100644
--- a/lib/plugins/normalize.js
+++ b/lib/plugins/normalize.js
@@ -1,33 +1,41 @@
-const {isPlainObject, isFunction, noop, cloneDeep, omit} = require('lodash');
+const { isPlainObject, isFunction, noop, cloneDeep, omit } = require('lodash');
const debug = require('debug')('semantic-release:plugins');
const getError = require('../get-error');
-const {extractErrors} = require('../utils');
+const { extractErrors } = require('../utils');
const PLUGINS_DEFINITIONS = require('../definitions/plugins');
-const {loadPlugin, parseConfig} = require('./utils');
+const { loadPlugin, parseConfig } = require('./utils');
module.exports = (context, type, pluginOpt, pluginsPath) => {
- const {stdout, stderr, options, logger} = context;
+ const { stdout, stderr, options, logger } = context;
if (!pluginOpt) {
return noop;
}
const [name, config] = parseConfig(pluginOpt);
- const pluginName = name.pluginName ? name.pluginName : isFunction(name) ? `[Function: ${name.name}]` : name;
+ const pluginName = name.pluginName
+ ? name.pluginName
+ : isFunction(name)
+ ? `[Function: ${name.name}]`
+ : name;
const plugin = loadPlugin(context, name, pluginsPath);
debug(`options for ${pluginName}/${type}: %O`, config);
let func;
if (isFunction(plugin)) {
- func = plugin.bind(null, cloneDeep({...options, ...config}));
- } else if (isPlainObject(plugin) && plugin[type] && isFunction(plugin[type])) {
- func = plugin[type].bind(null, cloneDeep({...options, ...config}));
+ func = plugin.bind(null, cloneDeep({ ...options, ...config }));
+ } else if (
+ isPlainObject(plugin) &&
+ plugin[type] &&
+ isFunction(plugin[type])
+ ) {
+ func = plugin[type].bind(null, cloneDeep({ ...options, ...config }));
} else {
- throw getError('EPLUGIN', {type, pluginName});
+ throw getError('EPLUGIN', { type, pluginName });
}
const validator = async (input) => {
- const {dryRun, outputValidator} = PLUGINS_DEFINITIONS[type] || {};
+ const { dryRun, outputValidator } = PLUGINS_DEFINITIONS[type] || {};
try {
if (!input.options.dryRun || dryRun) {
logger.log(`Start step "${type}" of plugin "${pluginName}"`);
@@ -38,26 +46,37 @@ module.exports = (context, type, pluginOpt, pluginsPath) => {
logger: logger.scope(logger.scopeName, pluginName),
});
if (outputValidator && !outputValidator(result)) {
- throw getError(`E${type.toUpperCase()}OUTPUT`, {result, pluginName});
+ throw getError(`E${type.toUpperCase()}OUTPUT`, {
+ result,
+ pluginName,
+ });
}
logger.success(`Completed step "${type}" of plugin "${pluginName}"`);
return result;
}
- logger.warn(`Skip step "${type}" of plugin "${pluginName}" in dry-run mode`);
+ logger.warn(
+ `Skip step "${type}" of plugin "${pluginName}" in dry-run mode`
+ );
} catch (error) {
logger.error(`Failed step "${type}" of plugin "${pluginName}"`);
- extractErrors(error).forEach((err) => Object.assign(err, {pluginName}));
+ extractErrors(error).forEach((err) => Object.assign(err, { pluginName }));
throw error;
}
};
- Reflect.defineProperty(validator, 'pluginName', {value: pluginName, writable: false, enumerable: true});
+ Reflect.defineProperty(validator, 'pluginName', {
+ value: pluginName,
+ writable: false,
+ enumerable: true,
+ });
if (!isFunction(pluginOpt)) {
if (pluginsPath[name]) {
- logger.success(`Loaded plugin "${type}" from "${pluginName}" in shareable config "${pluginsPath[name]}"`);
+ logger.success(
+ `Loaded plugin "${type}" from "${pluginName}" in shareable config "${pluginsPath[name]}"`
+ );
} else {
logger.success(`Loaded plugin "${type}" from "${pluginName}"`);
}
diff --git a/lib/plugins/pipeline.js b/lib/plugins/pipeline.js
index 3ed4f4fe8c..b92ae76b93 100644
--- a/lib/plugins/pipeline.js
+++ b/lib/plugins/pipeline.js
@@ -1,7 +1,7 @@
-const {identity} = require('lodash');
+const { identity } = require('lodash');
const pReduce = require('p-reduce');
const AggregateError = require('aggregate-error');
-const {extractErrors} = require('../utils');
+const { extractErrors } = require('../utils');
/**
* A Function that execute a list of function sequencially. If at least one Function ins the pipeline throws an Error or rejects, the pipeline function rejects as well.
@@ -25,34 +25,39 @@ const {extractErrors} = require('../utils');
*
* @return {Pipeline} A Function that execute the `steps` sequencially
*/
-module.exports = (steps, {settleAll = false, getNextInput = identity, transform = identity} = {}) => async (input) => {
- const results = [];
- const errors = [];
- await pReduce(
+module.exports =
+ (
steps,
- async (lastInput, step) => {
- let result;
- try {
- // Call the step with the input computed at the end of the previous iteration and save intermediary result
- result = await transform(await step(lastInput), step, lastInput);
- results.push(result);
- } catch (error) {
- if (settleAll) {
- errors.push(...extractErrors(error));
- result = error;
- } else {
- throw error;
+ { settleAll = false, getNextInput = identity, transform = identity } = {}
+ ) =>
+ async (input) => {
+ const results = [];
+ const errors = [];
+ await pReduce(
+ steps,
+ async (lastInput, step) => {
+ let result;
+ try {
+ // Call the step with the input computed at the end of the previous iteration and save intermediary result
+ result = await transform(await step(lastInput), step, lastInput);
+ results.push(result);
+ } catch (error) {
+ if (settleAll) {
+ errors.push(...extractErrors(error));
+ result = error;
+ } else {
+ throw error;
+ }
}
- }
- // Prepare input for the next step, passing the input of the last iteration (or initial parameter for the first iteration) and the result of the current one
- return getNextInput(lastInput, result);
- },
- input
- );
- if (errors.length > 0) {
- throw new AggregateError(errors);
- }
+ // Prepare input for the next step, passing the input of the last iteration (or initial parameter for the first iteration) and the result of the current one
+ return getNextInput(lastInput, result);
+ },
+ input
+ );
+ if (errors.length > 0) {
+ throw new AggregateError(errors);
+ }
- return results;
-};
+ return results;
+ };
diff --git a/lib/plugins/utils.js b/lib/plugins/utils.js
index 69bba2768b..8cd0bd17cd 100644
--- a/lib/plugins/utils.js
+++ b/lib/plugins/utils.js
@@ -1,5 +1,12 @@
-const {dirname} = require('path');
-const {isString, isFunction, castArray, isArray, isPlainObject, isNil} = require('lodash');
+const { dirname } = require('path');
+const {
+ isString,
+ isFunction,
+ castArray,
+ isArray,
+ isPlainObject,
+ isNil,
+} = require('lodash');
const resolveFrom = require('resolve-from');
const validateSteps = (conf) => {
@@ -31,11 +38,12 @@ function validatePlugin(conf) {
(conf.length === 1 || conf.length === 2) &&
(isString(conf[0]) || isPlainObject(conf[0])) &&
(isNil(conf[1]) || isPlainObject(conf[1]))) ||
- (isPlainObject(conf) && (isNil(conf.path) || isString(conf.path) || isPlainObject(conf.path)))
+ (isPlainObject(conf) &&
+ (isNil(conf.path) || isString(conf.path) || isPlainObject(conf.path)))
);
}
-function validateStep({required}, conf) {
+function validateStep({ required }, conf) {
conf = castArray(conf).filter(Boolean);
if (required) {
return conf.length >= 1 && validateSteps(conf);
@@ -44,11 +52,16 @@ function validateStep({required}, conf) {
return conf.length === 0 || validateSteps(conf);
}
-function loadPlugin({cwd}, name, pluginsPath) {
+function loadPlugin({ cwd }, name, pluginsPath) {
const basePath = pluginsPath[name]
- ? dirname(resolveFrom.silent(__dirname, pluginsPath[name]) || resolveFrom(cwd, pluginsPath[name]))
+ ? dirname(
+ resolveFrom.silent(__dirname, pluginsPath[name]) ||
+ resolveFrom(cwd, pluginsPath[name])
+ )
: __dirname;
- return isFunction(name) ? name : require(resolveFrom.silent(basePath, name) || resolveFrom(cwd, name));
+ return isFunction(name)
+ ? name
+ : require(resolveFrom.silent(basePath, name) || resolveFrom(cwd, name));
}
function parseConfig(plugin) {
@@ -57,7 +70,7 @@ function parseConfig(plugin) {
if (isArray(plugin)) {
[path, config] = plugin;
} else if (isPlainObject(plugin) && !isNil(plugin.path)) {
- ({path, ...config} = plugin);
+ ({ path, ...config } = plugin);
} else {
path = plugin;
}
@@ -65,4 +78,4 @@ function parseConfig(plugin) {
return [path, config || {}];
}
-module.exports = {validatePlugin, validateStep, loadPlugin, parseConfig};
+module.exports = { validatePlugin, validateStep, loadPlugin, parseConfig };
diff --git a/lib/utils.js b/lib/utils.js
index 895e9d04d4..3c93166a5b 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -1,4 +1,4 @@
-const {isFunction, union, template} = require('lodash');
+const { isFunction, union, template } = require('lodash');
const semver = require('semver');
const hideSensitive = require('./hide-sensitive');
@@ -19,7 +19,7 @@ function hideSensitiveValues(env, objs) {
}
function tagsToVersions(tags) {
- return tags.map(({version}) => version);
+ return tags.map(({ version }) => version);
}
function isMajorRange(range) {
@@ -33,7 +33,9 @@ function isMaintenanceRange(range) {
function getUpperBound(range) {
const result = semver.valid(range)
? range
- : ((semver.validRange(range) || '').match(/<(?]\d+\.\d+\.\d+(-\d+)?)$/) || [])[1];
+ : ((semver.validRange(range) || '').match(
+ /<(?\d+\.\d+\.\d+(-\d+)?)$/
+ ) || [])[1];
return result
? // https://github.com/npm/node-semver/issues/322
@@ -42,29 +44,47 @@ function getUpperBound(range) {
}
function getLowerBound(range) {
- return ((semver.validRange(range) || '').match(/(?\d+\.\d+\.\d+)/) || [])[1];
+ return ((semver.validRange(range) || '').match(
+ /(?\d+\.\d+\.\d+)/
+ ) || [])[1];
}
function highest(version1, version2) {
- return version1 && version2 ? (semver.gt(version1, version2) ? version1 : version2) : version1 || version2;
+ return version1 && version2
+ ? semver.gt(version1, version2)
+ ? version1
+ : version2
+ : version1 || version2;
}
function lowest(version1, version2) {
- return version1 && version2 ? (semver.lt(version1, version2) ? version1 : version2) : version1 || version2;
+ return version1 && version2
+ ? semver.lt(version1, version2)
+ ? version1
+ : version2
+ : version1 || version2;
}
-function getLatestVersion(versions, {withPrerelease} = {}) {
- return versions.filter((version) => withPrerelease || !semver.prerelease(version)).sort(semver.rcompare)[0];
+function getLatestVersion(versions, { withPrerelease } = {}) {
+ return versions
+ .filter((version) => withPrerelease || !semver.prerelease(version))
+ .sort(semver.rcompare)[0];
}
-function getEarliestVersion(versions, {withPrerelease} = {}) {
- return versions.filter((version) => withPrerelease || !semver.prerelease(version)).sort(semver.compare)[0];
+function getEarliestVersion(versions, { withPrerelease } = {}) {
+ return versions
+ .filter((version) => withPrerelease || !semver.prerelease(version))
+ .sort(semver.compare)[0];
}
function getFirstVersion(versions, lowerBranches) {
- const lowerVersion = union(...lowerBranches.map(({tags}) => tagsToVersions(tags))).sort(semver.rcompare);
+ const lowerVersion = union(
+ ...lowerBranches.map(({ tags }) => tagsToVersions(tags))
+ ).sort(semver.rcompare);
if (lowerVersion[0]) {
- return versions.sort(semver.compare).find((version) => semver.gt(version, lowerVersion[0]));
+ return versions
+ .sort(semver.compare)
+ .find((version) => semver.gt(version, lowerVersion[0]));
}
return getEarliestVersion(versions);
@@ -75,7 +95,7 @@ function getRange(min, max) {
}
function makeTag(tagFormat, version) {
- return template(tagFormat)({version});
+ return template(tagFormat)({ version });
}
function isSameChannel(channel, otherChannel) {
diff --git a/lib/verify.js b/lib/verify.js
index 01fc98d68f..7b5c158132 100644
--- a/lib/verify.js
+++ b/lib/verify.js
@@ -1,39 +1,42 @@
-const {template, isString, isPlainObject} = require('lodash');
+const { template, isString, isPlainObject } = require('lodash');
const AggregateError = require('aggregate-error');
-const {isGitRepo, verifyTagName} = require('./git');
+const { isGitRepo, verifyTagName } = require('./git');
const getError = require('./get-error');
module.exports = async (context) => {
const {
cwd,
env,
- options: {repositoryUrl, tagFormat, branches},
+ options: { repositoryUrl, tagFormat, branches },
} = context;
const errors = [];
- if (!(await isGitRepo({cwd, env}))) {
- errors.push(getError('ENOGITREPO', {cwd}));
+ if (!(await isGitRepo({ cwd, env }))) {
+ errors.push(getError('ENOGITREPO', { cwd }));
} else if (!repositoryUrl) {
errors.push(getError('ENOREPOURL'));
}
// Verify that compiling the `tagFormat` produce a valid Git tag
- if (!(await verifyTagName(template(tagFormat)({version: '0.0.0'})))) {
+ if (!(await verifyTagName(template(tagFormat)({ version: '0.0.0' })))) {
errors.push(getError('EINVALIDTAGFORMAT', context));
}
// Verify the `tagFormat` contains the variable `version` by compiling the `tagFormat` template
// with a space as the `version` value and verify the result contains the space.
// The space is used as it's an invalid tag character, so it's guaranteed to no be present in the `tagFormat`.
- if ((template(tagFormat)({version: ' '}).match(/ /g) || []).length !== 1) {
+ if ((template(tagFormat)({ version: ' ' }).match(/ /g) || []).length !== 1) {
errors.push(getError('ETAGNOVERSION', context));
}
branches.forEach((branch) => {
if (
- !((isString(branch) && branch.trim()) || (isPlainObject(branch) && isString(branch.name) && branch.name.trim()))
+ !(
+ (isString(branch) && branch.trim()) ||
+ (isPlainObject(branch) && isString(branch.name) && branch.name.trim())
+ )
) {
- errors.push(getError('EINVALIDBRANCH', {branch}));
+ errors.push(getError('EINVALIDBRANCH', { branch }));
}
});
diff --git a/package-lock.json b/package-lock.json
index ad9774f4fb..46a77b1a9c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -272,6 +272,79 @@
"arrify": "^1.0.1"
}
},
+ "@eslint/eslintrc": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
+ "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==",
+ "dev": true,
+ "requires": {
+ "ajv": "^6.12.4",
+ "debug": "^4.1.1",
+ "espree": "^7.3.0",
+ "globals": "^13.9.0",
+ "ignore": "^4.0.6",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^3.13.1",
+ "minimatch": "^3.0.4",
+ "strip-json-comments": "^3.1.1"
+ },
+ "dependencies": {
+ "globals": {
+ "version": "13.11.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz",
+ "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.20.2"
+ }
+ },
+ "ignore": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true
+ },
+ "type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "dev": true
+ }
+ }
+ },
+ "@humanwhocodes/config-array": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz",
+ "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==",
+ "dev": true,
+ "requires": {
+ "@humanwhocodes/object-schema": "^1.2.0",
+ "debug": "^4.1.1",
+ "minimatch": "^3.0.4"
+ }
+ },
+ "@humanwhocodes/object-schema": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz",
+ "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==",
+ "dev": true
+ },
"@istanbuljs/load-nyc-config": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@@ -303,16 +376,6 @@
"integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
"dev": true
},
- "@mrmlnc/readdir-enhanced": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
- "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
- "dev": true,
- "requires": {
- "call-me-maybe": "^1.0.1",
- "glob-to-regexp": "^0.3.0"
- }
- },
"@nodelib/fs.scandir": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
@@ -657,40 +720,12 @@
"@types/responselike": "*"
}
},
- "@types/eslint-visitor-keys": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
- "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==",
- "dev": true
- },
- "@types/glob": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz",
- "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==",
- "dev": true,
- "requires": {
- "@types/minimatch": "*",
- "@types/node": "*"
- }
- },
"@types/http-cache-semantics": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz",
"integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==",
"dev": true
},
- "@types/json-schema": {
- "version": "7.0.7",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
- "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
- "dev": true
- },
- "@types/json5": {
- "version": "0.0.29",
- "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
- "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=",
- "dev": true
- },
"@types/keyv": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz",
@@ -700,12 +735,6 @@
"@types/node": "*"
}
},
- "@types/minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==",
- "dev": true
- },
"@types/minimist": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz",
@@ -741,57 +770,6 @@
"resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz",
"integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA=="
},
- "@typescript-eslint/eslint-plugin": {
- "version": "2.34.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz",
- "integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==",
- "dev": true,
- "requires": {
- "@typescript-eslint/experimental-utils": "2.34.0",
- "functional-red-black-tree": "^1.0.1",
- "regexpp": "^3.0.0",
- "tsutils": "^3.17.1"
- }
- },
- "@typescript-eslint/experimental-utils": {
- "version": "2.34.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz",
- "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==",
- "dev": true,
- "requires": {
- "@types/json-schema": "^7.0.3",
- "@typescript-eslint/typescript-estree": "2.34.0",
- "eslint-scope": "^5.0.0",
- "eslint-utils": "^2.0.0"
- }
- },
- "@typescript-eslint/parser": {
- "version": "2.34.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.34.0.tgz",
- "integrity": "sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==",
- "dev": true,
- "requires": {
- "@types/eslint-visitor-keys": "^1.0.0",
- "@typescript-eslint/experimental-utils": "2.34.0",
- "@typescript-eslint/typescript-estree": "2.34.0",
- "eslint-visitor-keys": "^1.1.0"
- }
- },
- "@typescript-eslint/typescript-estree": {
- "version": "2.34.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz",
- "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==",
- "dev": true,
- "requires": {
- "debug": "^4.1.1",
- "eslint-visitor-keys": "^1.1.0",
- "glob": "^7.1.6",
- "is-glob": "^4.0.1",
- "lodash": "^4.17.15",
- "semver": "^7.3.2",
- "tsutils": "^3.17.1"
- }
- },
"JSONStream": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
@@ -808,9 +786,9 @@
"dev": true
},
"acorn-jsx": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz",
- "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true
},
"acorn-walk": {
@@ -897,6 +875,12 @@
}
}
},
+ "ansi-colors": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
+ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
+ "dev": true
+ },
"ansi-escapes": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -978,26 +962,17 @@
"arr-diff": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
- "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
- "dev": true
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
},
"arr-flatten": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
- "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
- "dev": true
+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
},
"arr-union": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
- "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
- "dev": true
- },
- "array-find": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz",
- "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=",
- "dev": true
+ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ="
},
"array-find-index": {
"version": "1.0.2",
@@ -1010,46 +985,15 @@
"resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
"integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4="
},
- "array-includes": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz",
- "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.18.0-next.2",
- "get-intrinsic": "^1.1.1",
- "is-string": "^1.0.5"
- }
- },
"array-union": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="
},
- "array-uniq": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
- "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
- "dev": true
- },
"array-unique": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
- "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
- "dev": true
- },
- "array.prototype.flat": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz",
- "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.0",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.18.0-next.1"
- }
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"arrgv": {
"version": "1.0.2",
@@ -1077,58 +1021,10 @@
"safer-buffer": "~2.1.0"
}
},
- "asn1.js": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
- "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
- "dev": true,
- "requires": {
- "bn.js": "^4.0.0",
- "inherits": "^2.0.1",
- "minimalistic-assert": "^1.0.0",
- "safer-buffer": "^2.1.0"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
- "dev": true
- }
- }
- },
- "assert": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
- "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==",
- "dev": true,
- "requires": {
- "object-assign": "^4.1.1",
- "util": "0.10.3"
- },
- "dependencies": {
- "inherits": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
- "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
- "dev": true
- },
- "util": {
- "version": "0.10.3",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
- "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
- "dev": true,
- "requires": {
- "inherits": "2.0.1"
- }
- }
- }
- },
"assign-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
- "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
- "dev": true
+ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
},
"astral-regex": {
"version": "2.0.0",
@@ -1139,8 +1035,7 @@
"async-each": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
- "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
- "dev": true
+ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ=="
},
"at-least-node": {
"version": "1.0.0",
@@ -1150,8 +1045,7 @@
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
- "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
- "dev": true
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
},
"ava": {
"version": "3.15.0",
@@ -1385,7 +1279,6 @@
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
"integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
- "dev": true,
"requires": {
"cache-base": "^1.0.1",
"class-utils": "^0.3.5",
@@ -1400,7 +1293,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
"integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
- "dev": true,
"requires": {
"is-descriptor": "^1.0.0"
}
@@ -1409,7 +1301,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
- "dev": true,
"requires": {
"kind-of": "^6.0.0"
}
@@ -1418,7 +1309,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
- "dev": true,
"requires": {
"kind-of": "^6.0.0"
}
@@ -1427,7 +1317,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
- "dev": true,
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -1466,7 +1355,6 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
- "dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
@@ -1489,12 +1377,6 @@
"integrity": "sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q==",
"dev": true
},
- "bn.js": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
- "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==",
- "dev": true
- },
"bottleneck": {
"version": "2.19.5",
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
@@ -1596,91 +1478,12 @@
"fill-range": "^7.0.1"
}
},
- "brorand": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
- "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
- "dev": true
- },
"browser-or-node": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-1.3.0.tgz",
"integrity": "sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg==",
"dev": true
},
- "browserify-aes": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
- "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
- "dev": true,
- "requires": {
- "buffer-xor": "^1.0.3",
- "cipher-base": "^1.0.0",
- "create-hash": "^1.1.0",
- "evp_bytestokey": "^1.0.3",
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
- }
- },
- "browserify-cipher": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
- "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
- "dev": true,
- "requires": {
- "browserify-aes": "^1.0.4",
- "browserify-des": "^1.0.0",
- "evp_bytestokey": "^1.0.0"
- }
- },
- "browserify-des": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
- "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
- "dev": true,
- "requires": {
- "cipher-base": "^1.0.1",
- "des.js": "^1.0.0",
- "inherits": "^2.0.1",
- "safe-buffer": "^5.1.2"
- }
- },
- "browserify-rsa": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz",
- "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==",
- "dev": true,
- "requires": {
- "bn.js": "^5.0.0",
- "randombytes": "^2.0.1"
- }
- },
- "browserify-sign": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz",
- "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==",
- "dev": true,
- "requires": {
- "bn.js": "^5.1.1",
- "browserify-rsa": "^4.0.1",
- "create-hash": "^1.2.0",
- "create-hmac": "^1.1.7",
- "elliptic": "^6.5.3",
- "inherits": "^2.0.4",
- "parse-asn1": "^5.1.5",
- "readable-stream": "^3.6.0",
- "safe-buffer": "^5.2.0"
- }
- },
- "browserify-zlib": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
- "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
- "dev": true,
- "requires": {
- "pako": "~1.0.5"
- }
- },
"browserslist": {
"version": "4.16.5",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.5.tgz",
@@ -1708,12 +1511,6 @@
}
}
},
- "buf-compare": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz",
- "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=",
- "dev": true
- },
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
@@ -1730,12 +1527,6 @@
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
"dev": true
},
- "buffer-xor": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
- "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
- "dev": true
- },
"bufferutil": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz",
@@ -1745,17 +1536,10 @@
"node-gyp-build": "^4.2.0"
}
},
- "builtin-status-codes": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
- "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
- "dev": true
- },
"cache-base": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
"integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
- "dev": true,
"requires": {
"collection-visit": "^1.0.0",
"component-emitter": "^1.2.1",
@@ -1824,22 +1608,6 @@
"write-file-atomic": "^3.0.0"
}
},
- "call-bind": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
- "dev": true,
- "requires": {
- "function-bind": "^1.1.1",
- "get-intrinsic": "^1.0.2"
- }
- },
- "call-me-maybe": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
- "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=",
- "dev": true
- },
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -1879,12 +1647,6 @@
"supports-color": "^5.3.0"
}
},
- "chardet": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
- "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
- "dev": true
- },
"chokidar": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
@@ -1925,21 +1687,10 @@
"integrity": "sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==",
"dev": true
},
- "cipher-base": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
- "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
- }
- },
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
"integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
- "dev": true,
"requires": {
"arr-union": "^3.1.0",
"define-property": "^0.2.5",
@@ -1951,22 +1702,12 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "dev": true,
"requires": {
"is-descriptor": "^0.1.0"
}
}
}
},
- "clean-regexp": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz",
- "integrity": "sha1-jffHquUf02h06PjQW5GAvBGj/tc=",
- "dev": true,
- "requires": {
- "escape-string-regexp": "^1.0.5"
- }
- },
"clean-stack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
@@ -2038,12 +1779,6 @@
"string-width": "^4.2.0"
}
},
- "cli-width": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
- "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==",
- "dev": true
- },
"cliui": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
@@ -2100,6 +1835,34 @@
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
+ },
+ "teeny-request": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.1.1.tgz",
+ "integrity": "sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg==",
+ "dev": true,
+ "requires": {
+ "http-proxy-agent": "^4.0.0",
+ "https-proxy-agent": "^5.0.0",
+ "node-fetch": "^2.6.1",
+ "stream-events": "^1.0.5",
+ "uuid": "^8.0.0"
+ }
+ },
+ "urlgrey": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-1.0.0.tgz",
+ "integrity": "sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w==",
+ "dev": true,
+ "requires": {
+ "fast-url-parser": "^1.1.3"
+ }
+ },
+ "uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "dev": true
}
}
},
@@ -2107,7 +1870,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
"integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
- "dev": true,
"requires": {
"map-visit": "^1.0.0",
"object-visit": "^1.0.0"
@@ -2137,6 +1899,12 @@
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
},
+ "commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true
+ },
"common-path-prefix": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
@@ -2161,8 +1929,7 @@
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
- "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
- "dev": true
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
},
"concat-map": {
"version": "0.0.1",
@@ -2199,30 +1966,6 @@
"xdg-basedir": "^4.0.0"
}
},
- "confusing-browser-globals": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz",
- "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==",
- "dev": true
- },
- "console-browserify": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
- "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==",
- "dev": true
- },
- "constants-browserify": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
- "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
- "dev": true
- },
- "contains-path": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
- "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
- "dev": true
- },
"conventional-changelog-angular": {
"version": "5.0.12",
"resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz",
@@ -2305,18 +2048,7 @@
"copy-descriptor": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
- "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
- "dev": true
- },
- "core-assert": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz",
- "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=",
- "dev": true,
- "requires": {
- "buf-compare": "^1.0.0",
- "is-error": "^2.2.0"
- }
+ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
"core-util-is": {
"version": "1.0.2",
@@ -2335,51 +2067,6 @@
"yaml": "^1.10.0"
}
},
- "create-ecdh": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
- "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==",
- "dev": true,
- "requires": {
- "bn.js": "^4.1.0",
- "elliptic": "^6.5.3"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
- "dev": true
- }
- }
- },
- "create-hash": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
- "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
- "dev": true,
- "requires": {
- "cipher-base": "^1.0.1",
- "inherits": "^2.0.1",
- "md5.js": "^1.3.4",
- "ripemd160": "^2.0.1",
- "sha.js": "^2.4.0"
- }
- },
- "create-hmac": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
- "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
- "dev": true,
- "requires": {
- "cipher-base": "^1.0.3",
- "create-hash": "^1.1.0",
- "inherits": "^2.0.1",
- "ripemd160": "^2.0.0",
- "safe-buffer": "^5.0.1",
- "sha.js": "^2.4.8"
- }
- },
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -2390,25 +2077,6 @@
"which": "^2.0.1"
}
},
- "crypto-browserify": {
- "version": "3.12.0",
- "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
- "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
- "dev": true,
- "requires": {
- "browserify-cipher": "^1.0.0",
- "browserify-sign": "^4.0.0",
- "create-ecdh": "^4.0.0",
- "create-hash": "^1.1.0",
- "create-hmac": "^1.1.0",
- "diffie-hellman": "^5.0.0",
- "inherits": "^2.0.1",
- "pbkdf2": "^3.0.3",
- "public-encrypt": "^4.0.0",
- "randombytes": "^2.0.0",
- "randomfill": "^1.0.3"
- }
- },
"crypto-random-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
@@ -2505,8 +2173,7 @@
"decode-uri-component": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
- "dev": true
+ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
},
"decompress-response": {
"version": "3.3.0",
@@ -2523,20 +2190,11 @@
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
},
"deep-is": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
- "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
"dev": true
},
- "deep-strict-equal": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz",
- "integrity": "sha1-SgeBR6irV/ag1PVUckPNIvROtOQ=",
- "dev": true,
- "requires": {
- "core-assert": "^0.2.0"
- }
- },
"default-require-extensions": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz",
@@ -2569,20 +2227,10 @@
"integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
"dev": true
},
- "define-properties": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
- "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
- "dev": true,
- "requires": {
- "object-keys": "^1.0.12"
- }
- },
"define-property": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
"integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
- "dev": true,
"requires": {
"is-descriptor": "^1.0.2",
"isobject": "^3.0.1"
@@ -2592,7 +2240,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
- "dev": true,
"requires": {
"kind-of": "^6.0.0"
}
@@ -2601,7 +2248,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
- "dev": true,
"requires": {
"kind-of": "^6.0.0"
}
@@ -2610,7 +2256,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
- "dev": true,
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -2655,16 +2300,6 @@
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
- "des.js": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
- "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.1",
- "minimalistic-assert": "^1.0.0"
- }
- },
"detect-indent": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
@@ -2686,25 +2321,6 @@
"integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
"dev": true
},
- "diffie-hellman": {
- "version": "5.0.3",
- "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
- "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
- "dev": true,
- "requires": {
- "bn.js": "^4.1.0",
- "miller-rabin": "^4.0.0",
- "randombytes": "^2.0.0"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
- "dev": true
- }
- }
- },
"dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -2744,12 +2360,6 @@
"esutils": "^2.0.2"
}
},
- "domain-browser": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
- "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
- "dev": true
- },
"dot-prop": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
@@ -2801,29 +2411,6 @@
"integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=",
"dev": true
},
- "elliptic": {
- "version": "6.5.4",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
- "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
- "dev": true,
- "requires": {
- "bn.js": "^4.11.9",
- "brorand": "^1.1.0",
- "hash.js": "^1.0.0",
- "hmac-drbg": "^1.0.1",
- "inherits": "^2.0.4",
- "minimalistic-assert": "^1.0.1",
- "minimalistic-crypto-utils": "^1.0.1"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
- "dev": true
- }
- }
- },
"emittery": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz",
@@ -2843,24 +2430,13 @@
"once": "^1.4.0"
}
},
- "enhance-visitors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/enhance-visitors/-/enhance-visitors-1.0.0.tgz",
- "integrity": "sha1-qpRdBdpGVnKh69OP7i7T2oUY6Vo=",
- "dev": true,
- "requires": {
- "lodash": "^4.13.1"
- }
- },
- "enhanced-resolve": {
- "version": "0.9.1",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz",
- "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=",
+ "enquirer": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
+ "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
"dev": true,
"requires": {
- "graceful-fs": "^4.1.2",
- "memory-fs": "^0.2.0",
- "tapable": "^0.1.8"
+ "ansi-colors": "^4.1.1"
}
},
"env-ci": {
@@ -2903,12 +2479,6 @@
}
}
},
- "env-editor": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/env-editor/-/env-editor-0.4.2.tgz",
- "integrity": "sha512-ObFo8v4rQJAE59M69QzwloxPZtd33TpYEIjtKD1rrFDcM1Gd7IkDxEBU+HriziN6HSHQnBJi8Dmy+JWkav5HKA==",
- "dev": true
- },
"equal-length": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz",
@@ -2923,41 +2493,6 @@
"is-arrayish": "^0.2.1"
}
},
- "es-abstract": {
- "version": "1.18.0",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz",
- "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "get-intrinsic": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.2",
- "is-callable": "^1.2.3",
- "is-negative-zero": "^2.0.1",
- "is-regex": "^1.1.2",
- "is-string": "^1.0.5",
- "object-inspect": "^1.9.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.2",
- "string.prototype.trimend": "^1.0.4",
- "string.prototype.trimstart": "^1.0.4",
- "unbox-primitive": "^1.0.0"
- }
- },
- "es-to-primitive": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
- "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
- "dev": true,
- "requires": {
- "is-callable": "^1.1.4",
- "is-date-object": "^1.0.1",
- "is-symbol": "^1.0.2"
- }
- },
"es5-ext": {
"version": "0.10.53",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
@@ -3019,151 +2554,137 @@
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"eslint": {
- "version": "6.8.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
- "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
+ "version": "7.32.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz",
+ "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==",
"dev": true,
"requires": {
- "@babel/code-frame": "^7.0.0",
+ "@babel/code-frame": "7.12.11",
+ "@eslint/eslintrc": "^0.4.3",
+ "@humanwhocodes/config-array": "^0.5.0",
"ajv": "^6.10.0",
- "chalk": "^2.1.0",
- "cross-spawn": "^6.0.5",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
"debug": "^4.0.1",
"doctrine": "^3.0.0",
- "eslint-scope": "^5.0.0",
- "eslint-utils": "^1.4.3",
- "eslint-visitor-keys": "^1.1.0",
- "espree": "^6.1.2",
- "esquery": "^1.0.1",
+ "enquirer": "^2.3.5",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^5.1.1",
+ "eslint-utils": "^2.1.0",
+ "eslint-visitor-keys": "^2.0.0",
+ "espree": "^7.3.1",
+ "esquery": "^1.4.0",
"esutils": "^2.0.2",
- "file-entry-cache": "^5.0.1",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^6.0.1",
"functional-red-black-tree": "^1.0.1",
- "glob-parent": "^5.0.0",
- "globals": "^12.1.0",
+ "glob-parent": "^5.1.2",
+ "globals": "^13.6.0",
"ignore": "^4.0.6",
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
- "inquirer": "^7.0.0",
"is-glob": "^4.0.0",
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.3.0",
- "lodash": "^4.17.14",
+ "levn": "^0.4.1",
+ "lodash.merge": "^4.6.2",
"minimatch": "^3.0.4",
- "mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
- "optionator": "^0.8.3",
+ "optionator": "^0.9.1",
"progress": "^2.0.0",
- "regexpp": "^2.0.1",
- "semver": "^6.1.2",
- "strip-ansi": "^5.2.0",
- "strip-json-comments": "^3.0.1",
- "table": "^5.2.3",
+ "regexpp": "^3.1.0",
+ "semver": "^7.2.1",
+ "strip-ansi": "^6.0.0",
+ "strip-json-comments": "^3.1.0",
+ "table": "^6.0.9",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
},
"dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "@babel/code-frame": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
+ "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
"dev": true,
"requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- },
- "dependencies": {
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
- }
+ "@babel/highlight": "^7.10.4"
}
},
- "eslint-utils": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
- "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
- "eslint-visitor-keys": "^1.1.0"
+ "color-convert": "^2.0.1"
}
},
- "globals": {
- "version": "12.4.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
- "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"requires": {
- "type-fest": "^0.8.1"
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
}
},
- "ignore": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
- "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
- "dev": true
- },
- "js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
+ "color-name": "~1.1.4"
}
},
- "path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
- "regexpp": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
- "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
+ "escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true
},
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "eslint-visitor-keys": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
+ "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
"dev": true
},
- "shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "globals": {
+ "version": "13.11.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz",
+ "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==",
"dev": true,
"requires": {
- "shebang-regex": "^1.0.0"
+ "type-fest": "^0.20.2"
}
},
- "shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "ignore": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dev": true,
"requires": {
- "ansi-regex": "^4.1.0"
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
}
},
"strip-json-comments": {
@@ -3172,1188 +2693,696 @@
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true
},
- "type-fest": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
- "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
- "dev": true
- },
- "which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
- "isexe": "^2.0.0"
+ "has-flag": "^4.0.0"
}
+ },
+ "type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "dev": true
}
}
},
- "eslint-ast-utils": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz",
- "integrity": "sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA==",
+ "eslint-config-prettier": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz",
+ "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==",
+ "dev": true
+ },
+ "eslint-scope": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
+ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
"dev": true,
"requires": {
- "lodash.get": "^4.4.2",
- "lodash.zip": "^4.2.0"
+ "esrecurse": "^4.3.0",
+ "estraverse": "^4.1.1"
}
},
- "eslint-config-prettier": {
- "version": "6.15.0",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz",
- "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==",
+ "eslint-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
+ "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
"dev": true,
"requires": {
- "get-stdin": "^6.0.0"
- },
- "dependencies": {
- "get-stdin": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
- "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
- "dev": true
- }
+ "eslint-visitor-keys": "^1.1.0"
}
},
- "eslint-config-xo": {
- "version": "0.29.1",
- "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.29.1.tgz",
- "integrity": "sha512-RDjeKh8CV0/EH4utW/6uOkwJJOOU+rX3uE5eUBOamcLNe4lNjyo8kSt3B6DzAm1L/1tWGikI7LFNVY9gG7PDQw==",
+ "eslint-visitor-keys": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
+ "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
+ "dev": true
+ },
+ "espree": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
+ "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==",
"dev": true,
"requires": {
- "confusing-browser-globals": "1.0.9"
+ "acorn": "^7.4.0",
+ "acorn-jsx": "^5.3.1",
+ "eslint-visitor-keys": "^1.3.0"
+ },
+ "dependencies": {
+ "acorn": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
+ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
+ "dev": true
+ }
}
},
- "eslint-config-xo-typescript": {
- "version": "0.27.0",
- "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.27.0.tgz",
- "integrity": "sha512-aBRN8Nb6sc5oFIIuJoqr9uGCPGkVAVU2sRKN/RQ3iDt0AdrI/jgbgRQXpsAf3V8oK2013satUokRbHG6e7mrkQ==",
- "dev": true
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
- "eslint-formatter-pretty": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-3.0.1.tgz",
- "integrity": "sha512-hhQ/ASD4i6BAEalcEfUxesFtJFftT8xFsimCzUpPbTzygJ4J17yCGcJ3XKCB2g7XTJTv0pi7rVTadfHVmtfSRA==",
+ "esquery": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
+ "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
"dev": true,
"requires": {
- "ansi-escapes": "^4.2.1",
- "chalk": "^3.0.0",
- "eslint-rule-docs": "^1.1.5",
- "log-symbols": "^3.0.0",
- "plur": "^3.0.1",
- "string-width": "^4.2.0",
- "supports-hyperlinks": "^2.0.0"
+ "estraverse": "^5.1.0"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "irregular-plurals": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz",
- "integrity": "sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==",
+ "estraverse": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+ "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
"dev": true
- },
- "log-symbols": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
- "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
- "dev": true,
- "requires": {
- "chalk": "^2.4.2"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "dev": true,
- "requires": {
- "color-convert": "^1.9.0"
- }
- },
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "color-convert": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
- "dev": true,
- "requires": {
- "color-name": "1.1.3"
- }
- },
- "color-name": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
- "dev": true
- },
- "has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
- "dev": true
- },
- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- }
- }
- },
- "plur": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz",
- "integrity": "sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w==",
- "dev": true,
- "requires": {
- "irregular-plurals": "^2.0.0"
- }
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
- "eslint-import-resolver-node": {
- "version": "0.3.4",
- "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz",
- "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==",
+ "esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
"dev": true,
"requires": {
- "debug": "^2.6.9",
- "resolve": "^1.13.1"
+ "estraverse": "^5.2.0"
},
"dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "estraverse": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+ "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
"dev": true
}
}
},
- "eslint-import-resolver-webpack": {
- "version": "0.12.2",
- "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.12.2.tgz",
- "integrity": "sha512-7Jnm4YAoNNkvqPaZkKdIHsKGmv8/uNnYC5QsXkiSodvX4XEEfH2AKOna98FK52fCDXm3q4HzuX+7pRMKkJ64EQ==",
- "dev": true,
+ "estraverse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true
+ },
+ "execa": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz",
+ "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==",
"requires": {
- "array-find": "^1.0.0",
- "debug": "^2.6.9",
- "enhanced-resolve": "^0.9.1",
- "find-root": "^1.1.0",
- "has": "^1.0.3",
- "interpret": "^1.2.0",
- "lodash": "^4.17.15",
- "node-libs-browser": "^1.0.0 || ^2.0.0",
- "resolve": "^1.13.1",
- "semver": "^5.7.1"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- },
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
- }
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^6.0.0",
+ "human-signals": "^2.1.0",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^4.0.1",
+ "onetime": "^5.1.2",
+ "signal-exit": "^3.0.3",
+ "strip-final-newline": "^2.0.0"
}
},
- "eslint-module-utils": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz",
- "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==",
- "dev": true,
+ "expand-brackets": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
"requires": {
- "debug": "^2.6.9",
- "pkg-dir": "^2.0.0"
+ "debug": "^2.3.3",
+ "define-property": "^0.2.5",
+ "extend-shallow": "^2.0.1",
+ "posix-character-classes": "^0.1.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.1"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
"requires": {
"ms": "2.0.0"
}
},
- "find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "dev": true,
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
- "locate-path": "^2.0.0"
+ "is-descriptor": "^0.1.0"
}
},
- "locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "dev": true,
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
+ "is-extendable": "^0.1.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- },
- "p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dev": true,
- "requires": {
- "p-try": "^1.0.0"
- }
- },
- "p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "dev": true,
- "requires": {
- "p-limit": "^1.1.0"
- }
- },
- "p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
- "dev": true
- },
- "path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "dev": true
- },
- "pkg-dir": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
- "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
- "dev": true,
- "requires": {
- "find-up": "^2.1.0"
- }
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
- "eslint-plugin-ava": {
- "version": "10.5.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-10.5.0.tgz",
- "integrity": "sha512-2I0Ze8ZtwbSlLdnzms4bsa6PxxOxGMIJ9d4yy7aRy3yc5zEO2wHJLic8l3Lrct73hb5ML+PLt5VRqvdV87xWdQ==",
+ "ext": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
+ "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
"dev": true,
"requires": {
- "deep-strict-equal": "^0.2.0",
- "enhance-visitors": "^1.0.0",
- "espree": "^7.1.0",
- "espurify": "^2.0.1",
- "import-modules": "^2.0.0",
- "micro-spelling-correcter": "^1.1.1",
- "pkg-dir": "^4.2.0",
- "resolve-from": "^5.0.0"
+ "type": "^2.0.0"
},
"dependencies": {
- "acorn": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
- "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
+ "type": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz",
+ "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==",
"dev": true
- },
- "espree": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
- "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==",
- "dev": true,
- "requires": {
- "acorn": "^7.4.0",
- "acorn-jsx": "^5.3.1",
- "eslint-visitor-keys": "^1.3.0"
- }
}
}
},
- "eslint-plugin-es": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz",
- "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==",
- "dev": true,
- "requires": {
- "eslint-utils": "^2.0.0",
- "regexpp": "^3.0.0"
- }
- },
- "eslint-plugin-eslint-comments": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz",
- "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==",
- "dev": true,
+ "extend-shallow": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
"requires": {
- "escape-string-regexp": "^1.0.5",
- "ignore": "^5.0.5"
- }
- },
- "eslint-plugin-import": {
- "version": "2.22.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz",
- "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==",
- "dev": true,
- "requires": {
- "array-includes": "^3.1.1",
- "array.prototype.flat": "^1.2.3",
- "contains-path": "^0.1.0",
- "debug": "^2.6.9",
- "doctrine": "1.5.0",
- "eslint-import-resolver-node": "^0.3.4",
- "eslint-module-utils": "^2.6.0",
- "has": "^1.0.3",
- "minimatch": "^3.0.4",
- "object.values": "^1.1.1",
- "read-pkg-up": "^2.0.0",
- "resolve": "^1.17.0",
- "tsconfig-paths": "^3.9.0"
+ "assign-symbols": "^1.0.0",
+ "is-extendable": "^1.0.1"
},
"dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "doctrine": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
- "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
- "dev": true,
- "requires": {
- "esutils": "^2.0.2",
- "isarray": "^1.0.0"
- }
- },
- "find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "dev": true,
- "requires": {
- "locate-path": "^2.0.0"
- }
- },
- "hosted-git-info": {
- "version": "2.8.8",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
- "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
- "dev": true
- },
- "load-json-file": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
- "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "strip-bom": "^3.0.0"
- }
- },
- "locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "dev": true,
+ "is-extendable": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
"requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
+ "is-plain-object": "^2.0.4"
}
},
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- },
- "normalize-package-data": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
- "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
- "dev": true,
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"requires": {
- "hosted-git-info": "^2.1.4",
- "resolve": "^1.10.0",
- "semver": "2 || 3 || 4 || 5",
- "validate-npm-package-license": "^3.0.1"
+ "isobject": "^3.0.1"
}
- },
- "p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dev": true,
+ }
+ }
+ },
+ "extglob": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+ "requires": {
+ "array-unique": "^0.3.2",
+ "define-property": "^1.0.0",
+ "expand-brackets": "^2.1.4",
+ "extend-shallow": "^2.0.1",
+ "fragment-cache": "^0.2.1",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
- "p-try": "^1.0.0"
+ "is-descriptor": "^1.0.0"
}
},
- "p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "dev": true,
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
- "p-limit": "^1.1.0"
+ "is-extendable": "^0.1.0"
}
},
- "p-try": {
+ "is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
- "dev": true
- },
- "parse-json": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
- "dev": true,
- "requires": {
- "error-ex": "^1.2.0"
- }
- },
- "path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "dev": true
- },
- "path-type": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
- "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
- "dev": true,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
- "pify": "^2.0.0"
+ "kind-of": "^6.0.0"
}
},
- "pify": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
- "dev": true
- },
- "read-pkg": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
- "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
- "dev": true,
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
- "load-json-file": "^2.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^2.0.0"
+ "kind-of": "^6.0.0"
}
},
- "read-pkg-up": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
- "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
- "dev": true,
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
- "find-up": "^2.0.0",
- "read-pkg": "^2.0.0"
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
}
- },
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
}
}
},
- "eslint-plugin-no-use-extend-native": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.4.1.tgz",
- "integrity": "sha512-tDkHM0kvxU0M2TpLRKGfFrpWXctFdTDY7VkiDTLYDaX90hMSJKkr/FiWThEXvKV0Dvffut2Z0B9Y7+h/k6suiA==",
- "dev": true,
- "requires": {
- "is-get-set-prop": "^1.0.0",
- "is-js-type": "^2.0.0",
- "is-obj-prop": "^1.0.0",
- "is-proto-prop": "^2.0.0"
- }
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
},
- "eslint-plugin-node": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
- "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
- "dev": true,
- "requires": {
- "eslint-plugin-es": "^3.0.0",
- "eslint-utils": "^2.0.0",
- "ignore": "^5.1.1",
- "minimatch": "^3.0.4",
- "resolve": "^1.10.1",
- "semver": "^6.1.0"
- },
- "dependencies": {
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "dev": true
- }
- }
+ "fast-diff": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
+ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
+ "dev": true
},
- "eslint-plugin-prettier": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz",
- "integrity": "sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==",
- "dev": true,
+ "fast-glob": {
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz",
+ "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==",
"requires": {
- "prettier-linter-helpers": "^1.0.0"
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.0",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.2",
+ "picomatch": "^2.2.1"
}
},
- "eslint-plugin-promise": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz",
- "integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==",
+ "fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true
+ },
+ "fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
"dev": true
},
- "eslint-plugin-unicorn": {
- "version": "18.0.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-18.0.1.tgz",
- "integrity": "sha512-Y4bgygek4x4ogeMcSHr6MZi3frBPZ80eIpMOsxew7jAblb53OYflpRh0an62Z6jv/fw7D3TkXauqLOBWbT9adg==",
+ "fast-url-parser": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz",
+ "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=",
"dev": true,
"requires": {
- "ci-info": "^2.0.0",
- "clean-regexp": "^1.0.0",
- "eslint-ast-utils": "^1.1.0",
- "eslint-template-visitor": "^1.1.0",
- "import-modules": "^2.0.0",
- "lodash": "^4.17.15",
- "read-pkg-up": "^7.0.1",
- "regexp-tree": "^0.1.21",
- "reserved-words": "^0.1.2",
- "safe-regex": "^2.1.1",
- "semver": "^7.1.3"
+ "punycode": "^1.3.2"
},
"dependencies": {
- "safe-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz",
- "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==",
- "dev": true,
- "requires": {
- "regexp-tree": "~0.1.1"
- }
+ "punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+ "dev": true
}
}
},
- "eslint-rule-docs": {
- "version": "1.1.223",
- "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.223.tgz",
- "integrity": "sha512-6HU1vH6b3QBI2RiFyNE1cQWr2pQ+op1zqZRsVXBZsLngF5ePBGDbkwFtr1Ye4Yq1DBKc499TMEkIzx25xVetuw==",
- "dev": true
- },
- "eslint-scope": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
- "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
- "dev": true,
+ "fastq": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz",
+ "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==",
"requires": {
- "esrecurse": "^4.3.0",
- "estraverse": "^4.1.1"
+ "reusify": "^1.0.4"
}
},
- "eslint-template-visitor": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-1.1.0.tgz",
- "integrity": "sha512-Lmy6QVlmFiIGl5fPi+8ACnov3sare+0Ouf7deJAGGhmUfeWJ5fVarELUxZRpsZ9sHejiJUq8626d0dn9uvcZTw==",
- "dev": true,
+ "figures": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"requires": {
- "eslint-visitor-keys": "^1.1.0",
- "espree": "^6.1.1",
- "multimap": "^1.0.2"
+ "escape-string-regexp": "^1.0.5"
}
},
- "eslint-utils": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
- "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
+ "file-entry-cache": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+ "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
"dev": true,
"requires": {
- "eslint-visitor-keys": "^1.1.0"
+ "flat-cache": "^3.0.4"
}
},
- "eslint-visitor-keys": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
- "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
+ "file-uri-to-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+ "optional": true
+ },
+ "file-url": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz",
+ "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==",
"dev": true
},
- "espree": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
- "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
+ "fill-keys": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz",
+ "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=",
"dev": true,
"requires": {
- "acorn": "^7.1.1",
- "acorn-jsx": "^5.2.0",
- "eslint-visitor-keys": "^1.1.0"
- },
- "dependencies": {
- "acorn": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
- "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
- "dev": true
- }
+ "is-object": "~1.0.1",
+ "merge-descriptors": "~1.0.0"
}
},
- "esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
- },
- "espurify": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/espurify/-/espurify-2.1.1.tgz",
- "integrity": "sha512-zttWvnkhcDyGOhSH4vO2qCBILpdCMv/MX8lp4cqgRkQoDRGK2oZxi2GfWhlP2dIXmk7BaKeOTuzbHhyC68o8XQ==",
- "dev": true
- },
- "esquery": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
- "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
- "dev": true,
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"requires": {
- "estraverse": "^5.1.0"
- },
- "dependencies": {
- "estraverse": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
- "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
- "dev": true
- }
+ "to-regex-range": "^5.0.1"
}
},
- "esrecurse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
- "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "find-cache-dir": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
+ "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==",
"dev": true,
"requires": {
- "estraverse": "^5.2.0"
- },
- "dependencies": {
- "estraverse": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
- "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
- "dev": true
- }
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
}
},
- "estraverse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
- "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
- "dev": true
- },
- "esutils": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
- "dev": true
- },
- "events": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
- "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
- "dev": true
- },
- "evp_bytestokey": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
- "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
- "dev": true,
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"requires": {
- "md5.js": "^1.3.4",
- "safe-buffer": "^5.1.1"
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
}
},
- "execa": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz",
- "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==",
+ "find-versions": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz",
+ "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==",
"requires": {
- "cross-spawn": "^7.0.3",
- "get-stream": "^6.0.0",
- "human-signals": "^2.1.0",
- "is-stream": "^2.0.0",
- "merge-stream": "^2.0.0",
- "npm-run-path": "^4.0.1",
- "onetime": "^5.1.2",
- "signal-exit": "^3.0.3",
- "strip-final-newline": "^2.0.0"
+ "semver-regex": "^3.1.2"
}
},
- "expand-brackets": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
- "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+ "flat-cache": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
+ "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
"dev": true,
"requires": {
- "debug": "^2.3.3",
- "define-property": "^0.2.5",
- "extend-shallow": "^2.0.1",
- "posix-character-classes": "^0.1.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
+ "flatted": "^3.1.0",
+ "rimraf": "^3.0.2"
},
"dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
+ "anymatch": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
"requires": {
- "ms": "2.0.0"
+ "micromatch": "^3.1.4",
+ "normalize-path": "^2.1.1"
+ },
+ "dependencies": {
+ "normalize-path": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+ "requires": {
+ "remove-trailing-separator": "^1.0.1"
+ }
+ }
}
},
- "define-property": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
- "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "dev": true,
- "requires": {
- "is-descriptor": "^0.1.0"
- }
+ "binary-extensions": {
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw=="
},
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "dev": true,
+ "braces": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"requires": {
- "is-extendable": "^0.1.0"
+ "arr-flatten": "^1.1.0",
+ "array-unique": "^0.3.2",
+ "extend-shallow": "^2.0.1",
+ "fill-range": "^4.0.0",
+ "isobject": "^3.0.1",
+ "repeat-element": "^1.1.2",
+ "snapdragon": "^0.8.1",
+ "snapdragon-node": "^2.0.1",
+ "split-string": "^3.0.2",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
}
},
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- }
- }
- },
- "ext": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
- "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
- "dev": true,
- "requires": {
- "type": "^2.0.0"
- },
- "dependencies": {
- "type": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz",
- "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==",
- "dev": true
- }
- }
- },
- "extend-shallow": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
- "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
- "dev": true,
- "requires": {
- "assign-symbols": "^1.0.0",
- "is-extendable": "^1.0.1"
- },
- "dependencies": {
- "is-extendable": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
- "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
- "dev": true,
+ "chokidar": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
+ "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
"requires": {
- "is-plain-object": "^2.0.4"
+ "anymatch": "^2.0.0",
+ "async-each": "^1.0.1",
+ "braces": "^2.3.2",
+ "fsevents": "^1.2.7",
+ "glob-parent": "^3.1.0",
+ "inherits": "^2.0.3",
+ "is-binary-path": "^1.0.0",
+ "is-glob": "^4.0.0",
+ "normalize-path": "^3.0.0",
+ "path-is-absolute": "^1.0.0",
+ "readdirp": "^2.2.1",
+ "upath": "^1.1.1"
}
},
- "is-plain-object": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
- "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
- "dev": true,
- "requires": {
- "isobject": "^3.0.1"
+ "fill-range": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+ "requires": {
+ "extend-shallow": "^2.0.1",
+ "is-number": "^3.0.0",
+ "repeat-string": "^1.6.1",
+ "to-regex-range": "^2.1.0"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
}
- }
- }
- },
- "external-editor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
- "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
- "dev": true,
- "requires": {
- "chardet": "^0.7.0",
- "iconv-lite": "^0.4.24",
- "tmp": "^0.0.33"
- }
- },
- "extglob": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
- "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
- "dev": true,
- "requires": {
- "array-unique": "^0.3.2",
- "define-property": "^1.0.0",
- "expand-brackets": "^2.1.4",
- "extend-shallow": "^2.0.1",
- "fragment-cache": "^0.2.1",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "define-property": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
- "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
- "dev": true,
+ },
+ "fsevents": {
+ "version": "1.2.13",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+ "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+ "optional": true,
"requires": {
- "is-descriptor": "^1.0.0"
+ "bindings": "^1.5.0",
+ "nan": "^2.12.1"
}
},
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "dev": true,
+ "glob-parent": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"requires": {
- "is-extendable": "^0.1.0"
+ "is-glob": "^3.1.0",
+ "path-dirname": "^1.0.0"
+ },
+ "dependencies": {
+ "is-glob": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+ "requires": {
+ "is-extglob": "^2.1.0"
+ }
+ }
}
},
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
- "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
- "dev": true,
+ "is-binary-path": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
"requires": {
- "kind-of": "^6.0.0"
+ "binary-extensions": "^1.0.0"
}
},
- "is-data-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
- "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
- "dev": true,
+ "is-number": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
- "kind-of": "^6.0.0"
+ "kind-of": "^3.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
}
},
- "is-descriptor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
- "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "micromatch": {
+ "version": "3.1.10",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+ "requires": {
+ "arr-diff": "^4.0.0",
+ "array-unique": "^0.3.2",
+ "braces": "^2.3.1",
+ "define-property": "^2.0.2",
+ "extend-shallow": "^3.0.2",
+ "extglob": "^2.0.4",
+ "fragment-cache": "^0.2.1",
+ "kind-of": "^6.0.2",
+ "nanomatch": "^1.2.9",
+ "object.pick": "^1.3.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.2"
+ }
+ },
+ "readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "readdirp": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+ "requires": {
+ "graceful-fs": "^4.1.11",
+ "micromatch": "^3.1.10",
+ "readable-stream": "^2.0.2"
+ }
+ },
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
+ "glob": "^7.1.3"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ },
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "strip-bom": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "requires": {
+ "is-utf8": "^0.2.0"
+ }
+ },
+ "to-regex-range": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+ "requires": {
+ "is-number": "^3.0.0",
+ "repeat-string": "^1.6.1"
}
}
}
},
- "fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "flatted": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz",
+ "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==",
"dev": true
},
- "fast-diff": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
- "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
- "dev": true
+ "for-in": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
},
- "fast-glob": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz",
- "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==",
+ "foreground-child": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz",
+ "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==",
+ "dev": true,
"requires": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.0",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.2",
- "picomatch": "^2.2.1"
+ "cross-spawn": "^7.0.0",
+ "signal-exit": "^3.0.2"
}
},
- "fast-json-stable-stringify": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
- "dev": true
- },
- "fast-levenshtein": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
- "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
- "dev": true
- },
- "fast-url-parser": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz",
- "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=",
- "dev": true,
- "requires": {
- "punycode": "^1.3.2"
- },
- "dependencies": {
- "punycode": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
- "dev": true
- }
- }
- },
- "fastq": {
- "version": "1.11.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz",
- "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==",
- "requires": {
- "reusify": "^1.0.4"
- }
- },
- "figures": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
- "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
- "requires": {
- "escape-string-regexp": "^1.0.5"
- }
- },
- "file-entry-cache": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
- "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
- "dev": true,
- "requires": {
- "flat-cache": "^2.0.1"
- }
- },
- "file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
- "dev": true,
- "optional": true
- },
- "file-url": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz",
- "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==",
- "dev": true
- },
- "fill-keys": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz",
- "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=",
- "dev": true,
- "requires": {
- "is-object": "~1.0.1",
- "merge-descriptors": "~1.0.0"
- }
- },
- "fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
- "requires": {
- "to-regex-range": "^5.0.1"
- }
- },
- "find-cache-dir": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
- "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==",
- "dev": true,
- "requires": {
- "commondir": "^1.0.1",
- "make-dir": "^3.0.2",
- "pkg-dir": "^4.1.0"
- }
- },
- "find-root": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
- "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==",
- "dev": true
- },
- "find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "requires": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- }
- },
- "find-versions": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz",
- "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==",
- "requires": {
- "semver-regex": "^3.1.2"
- }
- },
- "flat-cache": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
- "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
- "dev": true,
- "requires": {
- "flatted": "^2.0.0",
- "rimraf": "2.6.3",
- "write": "1.0.3"
- },
- "dependencies": {
- "rimraf": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
- "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
- "dev": true,
- "requires": {
- "glob": "^7.1.3"
- }
- }
- }
- },
- "flatted": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
- "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
- "dev": true
- },
- "for-in": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
- "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
- "dev": true
- },
- "foreground-child": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz",
- "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^7.0.0",
- "signal-exit": "^3.0.2"
- }
- },
- "fragment-cache": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
- "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
- "dev": true,
+ "fragment-cache": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
"requires": {
"map-cache": "^0.2.2"
}
@@ -4454,16 +3483,11 @@
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
- "get-intrinsic": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
- "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
- "dev": true,
- "requires": {
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1"
- }
+ "get-own-enumerable-property-symbols": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
+ "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
+ "dev": true
},
"get-package-type": {
"version": "0.1.0",
@@ -4471,18 +3495,6 @@
"integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
"dev": true
},
- "get-set-props": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/get-set-props/-/get-set-props-0.1.0.tgz",
- "integrity": "sha1-mYR1wXhEVobQsyJG2l3428++jqM=",
- "dev": true
- },
- "get-stdin": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz",
- "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==",
- "dev": true
- },
"get-stream": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz",
@@ -4491,8 +3503,7 @@
"get-value": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
- "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
- "dev": true
+ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
},
"git-log-parser": {
"version": "1.2.0",
@@ -4574,12 +3585,6 @@
"is-glob": "^4.0.1"
}
},
- "glob-to-regexp": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz",
- "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=",
- "dev": true
- },
"global-dirs": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz",
@@ -5043,28 +4048,15 @@
"function-bind": "^1.1.1"
}
},
- "has-bigints": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
- "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
- "dev": true
- },
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
- "has-symbols": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
- "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
- "dev": true
- },
"has-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
"integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
- "dev": true,
"requires": {
"get-value": "^2.0.6",
"has-values": "^1.0.0",
@@ -5075,7 +4067,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
"integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
- "dev": true,
"requires": {
"is-number": "^3.0.0",
"kind-of": "^4.0.0"
@@ -5085,7 +4076,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
- "dev": true,
"requires": {
"kind-of": "^3.0.2"
},
@@ -5094,7 +4084,6 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
@@ -5105,7 +4094,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
"integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
- "dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
@@ -5118,27 +4106,6 @@
"integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==",
"dev": true
},
- "hash-base": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz",
- "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.4",
- "readable-stream": "^3.6.0",
- "safe-buffer": "^5.2.0"
- }
- },
- "hash.js": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
- "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.3",
- "minimalistic-assert": "^1.0.1"
- }
- },
"hasha": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz",
@@ -5157,17 +4124,6 @@
}
}
},
- "hmac-drbg": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
- "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
- "dev": true,
- "requires": {
- "hash.js": "^1.0.3",
- "minimalistic-assert": "^1.0.0",
- "minimalistic-crypto-utils": "^1.0.1"
- }
- },
"hook-std": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/hook-std/-/hook-std-2.0.0.tgz",
@@ -5221,12 +4177,6 @@
}
}
},
- "https-browserify": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
- "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
- "dev": true
- },
"https-proxy-agent": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
@@ -5241,14 +4191,11 @@
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
},
- "iconv-lite": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
- "dev": true,
- "requires": {
- "safer-buffer": ">= 2.1.2 < 3"
- }
+ "husky": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz",
+ "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==",
+ "dev": true
},
"ieee754": {
"version": "1.2.1",
@@ -5316,12 +4263,6 @@
"resolve-cwd": "^3.0.0"
}
},
- "import-modules": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.1.0.tgz",
- "integrity": "sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A==",
- "dev": true
- },
"imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
@@ -5352,84 +4293,6 @@
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
- "inquirer": {
- "version": "7.3.3",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz",
- "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==",
- "dev": true,
- "requires": {
- "ansi-escapes": "^4.2.1",
- "chalk": "^4.1.0",
- "cli-cursor": "^3.1.0",
- "cli-width": "^3.0.0",
- "external-editor": "^3.0.3",
- "figures": "^3.0.0",
- "lodash": "^4.17.19",
- "mute-stream": "0.0.8",
- "run-async": "^2.4.0",
- "rxjs": "^6.6.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0",
- "through": "^2.3.6"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
- }
- },
- "interpret": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
- "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
- "dev": true
- },
"into-stream": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz",
@@ -5445,21 +4308,10 @@
"integrity": "sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==",
"dev": true
},
- "is-absolute": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
- "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
- "dev": true,
- "requires": {
- "is-relative": "^1.0.0",
- "is-windows": "^1.0.1"
- }
- },
"is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
- "dev": true,
"requires": {
"kind-of": "^3.0.2"
},
@@ -5468,7 +4320,6 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
@@ -5480,12 +4331,6 @@
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
- "is-bigint": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz",
- "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==",
- "dev": true
- },
"is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
@@ -5495,26 +4340,10 @@
"binary-extensions": "^2.0.0"
}
},
- "is-boolean-object": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz",
- "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.0"
- }
- },
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
- "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
- "dev": true
- },
- "is-callable": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
- "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==",
- "dev": true
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-ci": {
"version": "2.0.0",
@@ -5537,7 +4366,6 @@
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
- "dev": true,
"requires": {
"kind-of": "^3.0.2"
},
@@ -5546,24 +4374,16 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
}
}
},
- "is-date-object": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
- "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
- "dev": true
- },
"is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
"integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
- "dev": true,
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
@@ -5573,8 +4393,7 @@
"kind-of": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
- "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
- "dev": true
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
}
}
},
@@ -5587,8 +4406,7 @@
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
- "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
- "dev": true
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
},
"is-extglob": {
"version": "2.1.1",
@@ -5606,16 +4424,6 @@
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
- "is-get-set-prop": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-get-set-prop/-/is-get-set-prop-1.0.0.tgz",
- "integrity": "sha1-JzGHfk14pqae3M5rudaLB3nnYxI=",
- "dev": true,
- "requires": {
- "get-set-props": "^0.1.0",
- "lowercase-keys": "^1.0.0"
- }
- },
"is-glob": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
@@ -5640,27 +4448,6 @@
"integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
"dev": true
},
- "is-js-type": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-js-type/-/is-js-type-2.0.0.tgz",
- "integrity": "sha1-c2FwBtZZtOtHKbunR9KHgt8PfiI=",
- "dev": true,
- "requires": {
- "js-types": "^1.0.0"
- }
- },
- "is-negated-glob": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz",
- "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=",
- "dev": true
- },
- "is-negative-zero": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
- "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==",
- "dev": true
- },
"is-npm": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz",
@@ -5672,27 +4459,11 @@
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
},
- "is-number-object": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz",
- "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==",
- "dev": true
- },
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
},
- "is-obj-prop": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-obj-prop/-/is-obj-prop-1.0.0.tgz",
- "integrity": "sha1-s03nnEULjXxzqyzfZ9yHWtuF+A4=",
- "dev": true,
- "requires": {
- "lowercase-keys": "^1.0.0",
- "obj-props": "^1.0.0"
- }
- },
"is-object": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz",
@@ -5725,55 +4496,17 @@
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
"dev": true
},
- "is-proto-prop": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-proto-prop/-/is-proto-prop-2.0.0.tgz",
- "integrity": "sha512-jl3NbQ/fGLv5Jhan4uX+Ge9ohnemqyblWVVCpAvtTQzNFvV2xhJq+esnkIbYQ9F1nITXoLfDDQLp7LBw/zzncg==",
- "dev": true,
- "requires": {
- "lowercase-keys": "^1.0.0",
- "proto-props": "^2.0.0"
- }
- },
- "is-regex": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
- "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "has-symbols": "^1.0.1"
- }
- },
- "is-relative": {
+ "is-regexp": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
- "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
- "dev": true,
- "requires": {
- "is-unc-path": "^1.0.0"
- }
+ "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
+ "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=",
+ "dev": true
},
"is-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
"integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw=="
},
- "is-string": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
- "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
- "dev": true
- },
- "is-symbol": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
- "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
- "dev": true,
- "requires": {
- "has-symbols": "^1.0.1"
- }
- },
"is-text-path": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz",
@@ -5788,15 +4521,6 @@
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
- "is-unc-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
- "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
- "dev": true,
- "requires": {
- "unc-path-regex": "^0.1.2"
- }
- },
"is-unicode-supported": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
@@ -5806,20 +4530,12 @@
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
- "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
- "dev": true
+ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
- "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
- "dev": true
- },
- "is-wsl": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
- "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
- "dev": true
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
},
"is-yarn-global": {
"version": "0.3.0",
@@ -5840,8 +4556,7 @@
"isobject": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
- "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
- "dev": true
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"issue-parser": {
"version": "6.0.0",
@@ -5981,12 +4696,6 @@
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
- "js-types": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz",
- "integrity": "sha1-0kLmSU7Vcq08koCfyL7X92h8vwM=",
- "dev": true
- },
"js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
@@ -6102,36 +4811,134 @@
}
},
"levn": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
- "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
"dev": true,
"requires": {
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2"
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
}
},
- "line-column-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/line-column-path/-/line-column-path-2.0.0.tgz",
- "integrity": "sha512-nz3A+vi4bElhwd62E9+Qk/f9BDYLSzD/4Hy1rir0I4GnMxSTezSymzANyph5N1PgRZ3sSbA+yR5hOuXxc71a0Q==",
+ "lines-and-columns": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
+ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA="
+ },
+ "lint-staged": {
+ "version": "11.1.2",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-11.1.2.tgz",
+ "integrity": "sha512-6lYpNoA9wGqkL6Hew/4n1H6lRqF3qCsujVT0Oq5Z4hiSAM7S6NksPJ3gnr7A7R52xCtiZMcEUNNQ6d6X5Bvh9w==",
"dev": true,
"requires": {
- "type-fest": "^0.4.1"
+ "chalk": "^4.1.1",
+ "cli-truncate": "^2.1.0",
+ "commander": "^7.2.0",
+ "cosmiconfig": "^7.0.0",
+ "debug": "^4.3.1",
+ "enquirer": "^2.3.6",
+ "execa": "^5.0.0",
+ "listr2": "^3.8.2",
+ "log-symbols": "^4.1.0",
+ "micromatch": "^4.0.4",
+ "normalize-path": "^3.0.0",
+ "please-upgrade-node": "^3.2.0",
+ "string-argv": "0.3.1",
+ "stringify-object": "^3.3.0"
},
"dependencies": {
- "type-fest": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.4.1.tgz",
- "integrity": "sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==",
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
+ "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
+ "dev": true,
+ "requires": {
+ "braces": "^3.0.1",
+ "picomatch": "^2.2.3"
+ }
+ },
+ "picomatch": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
+ "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
"dev": true
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
}
}
},
- "lines-and-columns": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
- "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA="
+ "listr2": {
+ "version": "3.11.1",
+ "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.11.1.tgz",
+ "integrity": "sha512-ZXQvQfmH9iWLlb4n3hh31yicXDxlzB0pE7MM1zu6kgbVL4ivEsO4H8IPh4E682sC8RjnYO9anose+zT52rrpyg==",
+ "dev": true,
+ "requires": {
+ "cli-truncate": "^2.1.0",
+ "colorette": "^1.2.2",
+ "log-update": "^4.0.0",
+ "p-map": "^4.0.0",
+ "rxjs": "^6.6.7",
+ "through": "^2.3.8",
+ "wrap-ansi": "^7.0.0"
+ },
+ "dependencies": {
+ "p-map": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
+ "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
+ "dev": true,
+ "requires": {
+ "aggregate-error": "^3.0.0"
+ }
+ }
+ }
},
"load-json-file": {
"version": "4.0.0",
@@ -6173,6 +4980,12 @@
"resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz",
"integrity": "sha1-+CbJtOKoUR2E46yinbBeGk87cqk="
},
+ "lodash.clonedeep": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
+ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
+ "dev": true
+ },
"lodash.escaperegexp": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz",
@@ -6205,6 +5018,12 @@
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
"integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
},
+ "lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true
+ },
"lodash.set": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz",
@@ -6216,17 +5035,17 @@
"resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz",
"integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE="
},
+ "lodash.truncate": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
+ "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=",
+ "dev": true
+ },
"lodash.uniqby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz",
"integrity": "sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI="
},
- "lodash.zip": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz",
- "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=",
- "dev": true
- },
"log-symbols": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
@@ -6288,14 +5107,64 @@
}
}
},
- "loud-rejection": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
- "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
+ "log-update": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz",
+ "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==",
"dev": true,
"requires": {
- "currently-unhandled": "^0.4.1",
- "signal-exit": "^3.0.0"
+ "ansi-escapes": "^4.3.0",
+ "cli-cursor": "^3.1.0",
+ "slice-ansi": "^4.0.0",
+ "wrap-ansi": "^6.2.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "slice-ansi": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
+ "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
+ }
+ },
+ "wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ }
+ }
}
},
"lowercase-keys": {
@@ -6341,8 +5210,7 @@
"map-cache": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
- "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
- "dev": true
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8="
},
"map-obj": {
"version": "4.2.0",
@@ -6353,7 +5221,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
"integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
- "dev": true,
"requires": {
"object-visit": "^1.0.0"
}
@@ -6447,17 +5314,6 @@
"blueimp-md5": "^2.10.0"
}
},
- "md5.js": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
- "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
- "dev": true,
- "requires": {
- "hash-base": "^3.0.0",
- "inherits": "^2.0.1",
- "safe-buffer": "^5.1.2"
- }
- },
"mem": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-8.1.0.tgz",
@@ -6476,12 +5332,6 @@
}
}
},
- "memory-fs": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz",
- "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=",
- "dev": true
- },
"meow": {
"version": "8.1.2",
"resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz",
@@ -6516,12 +5366,6 @@
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="
},
- "micro-spelling-correcter": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/micro-spelling-correcter/-/micro-spelling-correcter-1.1.1.tgz",
- "integrity": "sha512-lkJ3Rj/mtjlRcHk6YyCbvZhyWTOzdBvTHsxMmZSk5jxN1YyVSQ+JETAom55mdzfcyDrY/49Z7UCW760BK30crg==",
- "dev": true
- },
"micromatch": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
@@ -6531,24 +5375,6 @@
"picomatch": "^2.0.5"
}
},
- "miller-rabin": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
- "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
- "dev": true,
- "requires": {
- "bn.js": "^4.0.0",
- "brorand": "^1.0.1"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
- "dev": true
- }
- }
- },
"mime": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz",
@@ -6570,18 +5396,6 @@
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
"integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="
},
- "minimalistic-assert": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
- "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
- "dev": true
- },
- "minimalistic-crypto-utils": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
- "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
- "dev": true
- },
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -6609,7 +5423,6 @@
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
"integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
- "dev": true,
"requires": {
"for-in": "^1.0.2",
"is-extendable": "^1.0.1"
@@ -6619,7 +5432,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
- "dev": true,
"requires": {
"is-plain-object": "^2.0.4"
}
@@ -6628,22 +5440,12 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
- "dev": true,
"requires": {
"isobject": "^3.0.1"
}
}
}
},
- "mkdirp": {
- "version": "0.5.5",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
- "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.5"
- }
- },
"mkdirp-classic": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
@@ -6691,30 +5493,16 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
- "multimap": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz",
- "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==",
- "dev": true
- },
- "mute-stream": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
- "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
- "dev": true
- },
"nan": {
"version": "2.14.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
- "dev": true,
"optional": true
},
"nanomatch": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
"integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
- "dev": true,
"requires": {
"arr-diff": "^4.0.0",
"array-unique": "^0.3.2",
@@ -6757,12 +5545,6 @@
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
"dev": true
},
- "nice-try": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
- "dev": true
- },
"nise": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz",
@@ -6807,88 +5589,6 @@
"integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==",
"dev": true
},
- "node-libs-browser": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz",
- "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==",
- "dev": true,
- "requires": {
- "assert": "^1.1.1",
- "browserify-zlib": "^0.2.0",
- "buffer": "^4.3.0",
- "console-browserify": "^1.1.0",
- "constants-browserify": "^1.0.0",
- "crypto-browserify": "^3.11.0",
- "domain-browser": "^1.1.1",
- "events": "^3.0.0",
- "https-browserify": "^1.0.0",
- "os-browserify": "^0.3.0",
- "path-browserify": "0.0.1",
- "process": "^0.11.10",
- "punycode": "^1.2.4",
- "querystring-es3": "^0.2.0",
- "readable-stream": "^2.3.3",
- "stream-browserify": "^2.0.1",
- "stream-http": "^2.7.2",
- "string_decoder": "^1.0.0",
- "timers-browserify": "^2.0.4",
- "tty-browserify": "0.0.0",
- "url": "^0.11.0",
- "util": "^0.11.0",
- "vm-browserify": "^1.0.1"
- },
- "dependencies": {
- "buffer": {
- "version": "4.9.2",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
- "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
- "dev": true,
- "requires": {
- "base64-js": "^1.0.2",
- "ieee754": "^1.1.4",
- "isarray": "^1.0.0"
- }
- },
- "punycode": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
- "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- },
- "dependencies": {
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- }
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
- }
- }
- },
"node-preload": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz",
@@ -6918,8 +5618,7 @@
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "dev": true
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"normalize-url": {
"version": "5.3.1",
@@ -9048,7 +7747,7 @@
"bundled": true
},
"path-parse": {
- "version": "1.0.7",
+ "version": "1.0.6",
"bundled": true
},
"performance-now": {
@@ -10155,23 +8854,10 @@
}
}
},
- "obj-props": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/obj-props/-/obj-props-1.3.0.tgz",
- "integrity": "sha512-k2Xkjx5wn6eC3537SWAXHzB6lkI81kS+icMKMkh4nG3w7shWG6MaWOBrNvhWVOszrtL5uxdfymQQfPUxwY+2eg==",
- "dev": true
- },
- "object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
- "dev": true
- },
"object-copy": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
"integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
- "dev": true,
"requires": {
"copy-descriptor": "^0.1.0",
"define-property": "^0.2.5",
@@ -10182,7 +8868,6 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "dev": true,
"requires": {
"is-descriptor": "^0.1.0"
}
@@ -10191,67 +8876,28 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
}
}
},
- "object-inspect": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
- "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==",
- "dev": true
- },
- "object-keys": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
- "dev": true
- },
"object-visit": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
"integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
- "dev": true,
"requires": {
"isobject": "^3.0.0"
}
},
- "object.assign": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
- "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.0",
- "define-properties": "^1.1.3",
- "has-symbols": "^1.0.1",
- "object-keys": "^1.1.1"
- }
- },
"object.pick": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
"integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
- "dev": true,
"requires": {
"isobject": "^3.0.1"
}
},
- "object.values": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz",
- "integrity": "sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.18.0-next.2",
- "has": "^1.0.3"
- }
- },
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -10268,38 +8914,18 @@
"mimic-fn": "^2.1.0"
}
},
- "open": {
- "version": "6.4.0",
- "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz",
- "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==",
- "dev": true,
- "requires": {
- "is-wsl": "^1.1.0"
- }
- },
- "open-editor": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/open-editor/-/open-editor-2.0.1.tgz",
- "integrity": "sha512-B3KdD7Pl8jYdpBSBBbdYaqVUI3whQjLl1G1+CvhNc8+d7GzKRUq+VuCIx1thxGiqD2oBGRvsZz7QWrBsFP2yVA==",
- "dev": true,
- "requires": {
- "env-editor": "^0.4.0",
- "line-column-path": "^2.0.0",
- "open": "^6.2.0"
- }
- },
"optionator": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
- "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
+ "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
"dev": true,
"requires": {
- "deep-is": "~0.1.3",
- "fast-levenshtein": "~2.0.6",
- "levn": "~0.3.0",
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2",
- "word-wrap": "~1.2.3"
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.3"
}
},
"ora": {
@@ -10370,18 +8996,6 @@
}
}
},
- "os-browserify": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
- "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
- "dev": true
- },
- "os-tmpdir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
- "dev": true
- },
"p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
@@ -10545,12 +9159,6 @@
}
}
},
- "pako": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
- "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
- "dev": true
- },
"parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@@ -10559,19 +9167,6 @@
"callsites": "^3.0.0"
}
},
- "parse-asn1": {
- "version": "5.1.6",
- "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz",
- "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==",
- "dev": true,
- "requires": {
- "asn1.js": "^5.2.0",
- "browserify-aes": "^1.0.0",
- "evp_bytestokey": "^1.0.0",
- "pbkdf2": "^3.0.3",
- "safe-buffer": "^5.1.1"
- }
- },
"parse-json": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
@@ -10592,20 +9187,12 @@
"pascalcase": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
- "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
- "dev": true
- },
- "path-browserify": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
- "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
- "dev": true
+ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
},
"path-dirname": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
- "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
- "dev": true
+ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA="
},
"path-exists": {
"version": "4.0.0",
@@ -10649,19 +9236,6 @@
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="
},
- "pbkdf2": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz",
- "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==",
- "dev": true,
- "requires": {
- "create-hash": "^1.1.2",
- "create-hmac": "^1.1.4",
- "ripemd160": "^2.0.1",
- "safe-buffer": "^5.0.1",
- "sha.js": "^2.4.8"
- }
- },
"picomatch": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
@@ -10735,6 +9309,15 @@
"find-up": "^4.0.0"
}
},
+ "please-upgrade-node": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz",
+ "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==",
+ "dev": true,
+ "requires": {
+ "semver-compare": "^1.0.0"
+ }
+ },
"plur": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz",
@@ -10753,13 +9336,12 @@
"posix-character-classes": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
- "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
- "dev": true
+ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
},
"prelude-ls": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
- "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
"dev": true
},
"prepend-http": {
@@ -10769,20 +9351,11 @@
"dev": true
},
"prettier": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz",
- "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz",
+ "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==",
"dev": true
},
- "prettier-linter-helpers": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
- "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
- "dev": true,
- "requires": {
- "fast-diff": "^1.1.2"
- }
- },
"pretty-ms": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz",
@@ -10792,12 +9365,6 @@
"parse-ms": "^2.1.0"
}
},
- "process": {
- "version": "0.11.10",
- "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
- "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
- "dev": true
- },
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -10824,12 +9391,6 @@
"integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==",
"dev": true
},
- "proto-props": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/proto-props/-/proto-props-2.0.0.tgz",
- "integrity": "sha512-2yma2tog9VaRZY2mn3Wq51uiSW4NcPYT1cQdBagwyrznrilKSZwIZ0UG3ZPL/mx+axEns0hE35T5ufOYZXEnBQ==",
- "dev": true
- },
"proxyquire": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz",
@@ -10841,28 +9402,6 @@
"resolve": "^1.11.1"
}
},
- "public-encrypt": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
- "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
- "dev": true,
- "requires": {
- "bn.js": "^4.1.0",
- "browserify-rsa": "^4.0.0",
- "create-hash": "^1.1.0",
- "parse-asn1": "^5.0.0",
- "randombytes": "^2.0.1",
- "safe-buffer": "^5.1.2"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
- "dev": true
- }
- }
- },
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
@@ -10892,18 +9431,6 @@
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
},
- "querystring": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
- "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
- "dev": true
- },
- "querystring-es3": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
- "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
- "dev": true
- },
"queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -10914,25 +9441,6 @@
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz",
"integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g=="
},
- "randombytes": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
- "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
- "dev": true,
- "requires": {
- "safe-buffer": "^5.1.0"
- }
- },
- "randomfill": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
- "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
- "dev": true,
- "requires": {
- "randombytes": "^2.0.5",
- "safe-buffer": "^5.1.0"
- }
- },
"rc": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
@@ -11040,18 +9548,11 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
"integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
- "dev": true,
"requires": {
"extend-shallow": "^3.0.2",
"safe-regex": "^1.1.0"
}
},
- "regexp-tree": {
- "version": "0.1.23",
- "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.23.tgz",
- "integrity": "sha512-+7HWfb4Bvu8Rs2eQTUIpX9I/PlQkYOuTNbRpKLJlQpSgwSkzFYh+pUj0gtvglnOZLKB6YgnIgRuJ2/IlpL48qw==",
- "dev": true
- },
"regexpp": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
@@ -11087,20 +9588,17 @@
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
- "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
- "dev": true
+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
},
"repeat-element": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
- "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
- "dev": true
+ "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g=="
},
"repeat-string": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
- "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
- "dev": true
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
},
"repeating": {
"version": "2.0.1",
@@ -11116,18 +9614,18 @@
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
+ "require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true
+ },
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
},
- "reserved-words": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/reserved-words/-/reserved-words-0.1.2.tgz",
- "integrity": "sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=",
- "dev": true
- },
"resolve": {
"version": "1.20.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
@@ -11160,8 +9658,7 @@
"resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
- "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
- "dev": true
+ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
},
"responselike": {
"version": "1.0.2",
@@ -11185,8 +9682,7 @@
"ret": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
- "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
- "dev": true
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
},
"retry": {
"version": "0.12.0",
@@ -11206,22 +9702,6 @@
"glob": "^7.1.3"
}
},
- "ripemd160": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
- "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
- "dev": true,
- "requires": {
- "hash-base": "^3.0.0",
- "inherits": "^2.0.1"
- }
- },
- "run-async": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
- "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
- "dev": true
- },
"run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -11248,7 +9728,6 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
- "dev": true,
"requires": {
"ret": "~0.1.10"
}
@@ -11273,6 +9752,12 @@
"lru-cache": "^6.0.0"
}
},
+ "semver-compare": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
+ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
+ "dev": true
+ },
"semver-diff": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz",
@@ -11320,7 +9805,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
"integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
- "dev": true,
"requires": {
"extend-shallow": "^2.0.1",
"is-extendable": "^0.1.1",
@@ -11332,7 +9816,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "dev": true,
"requires": {
"is-extendable": "^0.1.0"
}
@@ -11341,29 +9824,12 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
- "dev": true,
"requires": {
"isobject": "^3.0.1"
}
}
}
},
- "setimmediate": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
- "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
- "dev": true
- },
- "sha.js": {
- "version": "2.4.11",
- "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
- "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
- }
- },
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -11479,7 +9945,6 @@
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
"integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
- "dev": true,
"requires": {
"base": "^0.11.1",
"debug": "^2.2.0",
@@ -11495,7 +9960,6 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -11504,7 +9968,6 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "dev": true,
"requires": {
"is-descriptor": "^0.1.0"
}
@@ -11513,7 +9976,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "dev": true,
"requires": {
"is-extendable": "^0.1.0"
}
@@ -11521,14 +9983,12 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
}
}
},
@@ -11536,7 +9996,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
"integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
- "dev": true,
"requires": {
"define-property": "^1.0.0",
"isobject": "^3.0.0",
@@ -11547,7 +10006,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
"integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
- "dev": true,
"requires": {
"is-descriptor": "^1.0.0"
}
@@ -11556,7 +10014,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
- "dev": true,
"requires": {
"kind-of": "^6.0.0"
}
@@ -11565,7 +10022,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
- "dev": true,
"requires": {
"kind-of": "^6.0.0"
}
@@ -11574,7 +10030,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
- "dev": true,
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -11587,7 +10042,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
"integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
- "dev": true,
"requires": {
"kind-of": "^3.2.0"
},
@@ -11596,7 +10050,6 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
@@ -11612,7 +10065,6 @@
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
"integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
- "dev": true,
"requires": {
"atob": "^2.1.2",
"decode-uri-component": "^0.2.0",
@@ -11634,8 +10086,7 @@
"source-map-url": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
- "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
- "dev": true
+ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw=="
},
"spawn-error-forwarder": {
"version": "1.0.0",
@@ -11702,7 +10153,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
"integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
- "dev": true,
"requires": {
"extend-shallow": "^3.0.0"
}
@@ -11762,7 +10212,6 @@
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
"integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
- "dev": true,
"requires": {
"define-property": "^0.2.5",
"object-copy": "^0.1.0"
@@ -11772,20 +10221,24 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "dev": true,
"requires": {
"is-descriptor": "^0.1.0"
}
}
}
},
- "stream-browserify": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
- "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
- "dev": true,
+ "stream-buffers": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-3.0.2.tgz",
+ "integrity": "sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ==",
+ "dev": true
+ },
+ "stream-combiner2": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
+ "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
"requires": {
- "inherits": "~2.0.1",
+ "duplexer2": "~0.1.0",
"readable-stream": "^2.0.2"
},
"dependencies": {
@@ -11793,7 +10246,6 @@
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
- "dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -11807,53 +10259,7 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
- },
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- }
- }
- },
- "stream-buffers": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-3.0.2.tgz",
- "integrity": "sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ==",
- "dev": true
- },
- "stream-combiner2": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
- "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
- "requires": {
- "duplexer2": "~0.1.0",
- "readable-stream": "^2.0.2"
- },
- "dependencies": {
- "readable-stream": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
- "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"string_decoder": {
"version": "1.1.1",
@@ -11874,57 +10280,18 @@
"stubs": "^3.0.0"
}
},
- "stream-http": {
- "version": "2.8.3",
- "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
- "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
- "dev": true,
- "requires": {
- "builtin-status-codes": "^3.0.0",
- "inherits": "^2.0.1",
- "readable-stream": "^2.3.6",
- "to-arraybuffer": "^1.0.0",
- "xtend": "^4.0.0"
- },
- "dependencies": {
- "readable-stream": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
- "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
- },
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- }
- }
- },
"streamsearch": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz",
"integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=",
"dev": true
},
+ "string-argv": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz",
+ "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==",
+ "dev": true
+ },
"string-width": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
@@ -11935,26 +10302,6 @@
"strip-ansi": "^6.0.0"
}
},
- "string.prototype.trimend": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
- "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3"
- }
- },
- "string.prototype.trimstart": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
- "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
- "dev": true,
- "requires": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3"
- }
- },
"string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -11963,6 +10310,25 @@
"safe-buffer": "~5.2.0"
}
},
+ "stringify-object": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
+ "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
+ "dev": true,
+ "requires": {
+ "get-own-enumerable-property-symbols": "^3.0.0",
+ "is-obj": "^1.0.1",
+ "is-regexp": "^1.0.0"
+ },
+ "dependencies": {
+ "is-obj": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
+ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
+ "dev": true
+ }
+ }
+ },
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
@@ -12064,80 +10430,74 @@
}
},
"table": {
- "version": "5.4.6",
- "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
- "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+ "version": "6.7.1",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz",
+ "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==",
"dev": true,
"requires": {
- "ajv": "^6.10.2",
- "lodash": "^4.17.14",
- "slice-ansi": "^2.1.0",
- "string-width": "^3.0.0"
+ "ajv": "^8.0.1",
+ "lodash.clonedeep": "^4.5.0",
+ "lodash.truncate": "^4.4.2",
+ "slice-ansi": "^4.0.0",
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0"
},
"dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "astral-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
- "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
- "dev": true
- },
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
+ "ajv": {
+ "version": "8.6.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz",
+ "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
},
- "slice-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
- "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
- "ansi-styles": "^3.2.0",
- "astral-regex": "^1.0.0",
- "is-fullwidth-code-point": "^2.0.0"
+ "color-convert": "^2.0.1"
}
},
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
+ "color-name": "~1.1.4"
}
},
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "slice-ansi": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
+ "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
"dev": true,
"requires": {
- "ansi-regex": "^4.1.0"
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
}
}
}
},
- "tapable": {
- "version": "0.1.10",
- "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz",
- "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=",
- "dev": true
- },
"tar-fs": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz",
@@ -12163,27 +10523,6 @@
"readable-stream": "^3.1.1"
}
},
- "teeny-request": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.1.1.tgz",
- "integrity": "sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg==",
- "dev": true,
- "requires": {
- "http-proxy-agent": "^4.0.0",
- "https-proxy-agent": "^5.0.0",
- "node-fetch": "^2.6.1",
- "stream-events": "^1.0.5",
- "uuid": "^8.0.0"
- },
- "dependencies": {
- "uuid": {
- "version": "8.3.2",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
- "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
- "dev": true
- }
- }
- },
"temp-dir": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz",
@@ -12210,12 +10549,6 @@
}
}
},
- "term-size": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz",
- "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==",
- "dev": true
- },
"test-exclude": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
@@ -12257,40 +10590,6 @@
"integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=",
"dev": true
},
- "timers-browserify": {
- "version": "2.0.12",
- "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz",
- "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==",
- "dev": true,
- "requires": {
- "setimmediate": "^1.0.4"
- }
- },
- "tmp": {
- "version": "0.0.33",
- "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
- "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
- "dev": true,
- "requires": {
- "os-tmpdir": "~1.0.2"
- }
- },
- "to-absolute-glob": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
- "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=",
- "dev": true,
- "requires": {
- "is-absolute": "^1.0.0",
- "is-negated-glob": "^1.0.0"
- }
- },
- "to-arraybuffer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
- "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
- "dev": true
- },
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
@@ -12301,7 +10600,6 @@
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
"integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
- "dev": true,
"requires": {
"kind-of": "^3.0.2"
},
@@ -12310,7 +10608,6 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
@@ -12327,7 +10624,6 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
"integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
- "dev": true,
"requires": {
"define-property": "^2.0.2",
"extend-shallow": "^3.0.2",
@@ -12358,50 +10654,12 @@
"resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz",
"integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM="
},
- "tsconfig-paths": {
- "version": "3.9.0",
- "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz",
- "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==",
- "dev": true,
- "requires": {
- "@types/json5": "^0.0.29",
- "json5": "^1.0.1",
- "minimist": "^1.2.0",
- "strip-bom": "^3.0.0"
- },
- "dependencies": {
- "json5": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
- "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.0"
- }
- }
- }
- },
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
},
- "tsutils": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
- "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
- "dev": true,
- "requires": {
- "tslib": "^1.8.1"
- }
- },
- "tty-browserify": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
- "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
- "dev": true
- },
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
@@ -12415,12 +10673,12 @@
"dev": true
},
"type-check": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
- "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
"dev": true,
"requires": {
- "prelude-ls": "~1.1.2"
+ "prelude-ls": "^1.2.1"
}
},
"type-detect": {
@@ -12443,41 +10701,16 @@
"is-typedarray": "^1.0.0"
}
},
- "typescript": {
- "version": "3.9.9",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz",
- "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==",
- "dev": true
- },
"uglify-js": {
"version": "3.13.3",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.3.tgz",
"integrity": "sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==",
"optional": true
},
- "unbox-primitive": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
- "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
- "dev": true,
- "requires": {
- "function-bind": "^1.1.1",
- "has-bigints": "^1.0.1",
- "has-symbols": "^1.0.2",
- "which-boxed-primitive": "^1.0.2"
- }
- },
- "unc-path-regex": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
- "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
- "dev": true
- },
"union-value": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
"integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
- "dev": true,
"requires": {
"arr-union": "^3.1.0",
"get-value": "^2.0.6",
@@ -12507,7 +10740,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
"integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
- "dev": true,
"requires": {
"has-value": "^0.3.1",
"isobject": "^3.0.0"
@@ -12517,7 +10749,6 @@
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
"integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
- "dev": true,
"requires": {
"get-value": "^2.0.3",
"has-values": "^0.1.4",
@@ -12528,7 +10759,6 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
- "dev": true,
"requires": {
"isarray": "1.0.0"
}
@@ -12538,16 +10768,14 @@
"has-values": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
- "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
- "dev": true
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
}
}
},
"upath": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
- "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
- "dev": true
+ "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg=="
},
"update-notifier": {
"version": "5.1.0",
@@ -12581,932 +10809,34 @@
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
- }
- },
- "uri-js": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
- "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
- "dev": true,
- "requires": {
- "punycode": "^2.1.0"
- }
- },
- "urix": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
- "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
- "dev": true
- },
- "url": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
- "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
- "dev": true,
- "requires": {
- "punycode": "1.3.2",
- "querystring": "0.2.0"
- },
- "dependencies": {
- "punycode": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
- "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
- "dev": true
- }
- }
- },
- "url-join": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
- "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
- },
- "url-parse-lax": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
- "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
- "dev": true,
- "requires": {
- "prepend-http": "^2.0.0"
- }
- },
- "urlgrey": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-1.0.0.tgz",
- "integrity": "sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w==",
- "dev": true,
- "requires": {
- "fast-url-parser": "^1.1.3"
- }
- },
- "use": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
- "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
- "dev": true
- },
- "utf-8-validate": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.4.tgz",
- "integrity": "sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q==",
- "dev": true,
- "requires": {
- "node-gyp-build": "^4.2.0"
- }
- },
- "util": {
- "version": "0.11.1",
- "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
- "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
- "dev": true,
- "requires": {
- "inherits": "2.0.3"
- },
- "dependencies": {
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
- }
- }
- },
- "util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
- },
- "uuid": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
- "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
- "dev": true
- },
- "v8-compile-cache": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
- "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
- "dev": true
- },
- "validate-npm-package-license": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
- "requires": {
- "spdx-correct": "^3.0.0",
- "spdx-expression-parse": "^3.0.0"
- }
- },
- "vm-browserify": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
- "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
- "dev": true
- },
- "wcwidth": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
- "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
- "dev": true,
- "requires": {
- "defaults": "^1.0.3"
- }
- },
- "weak-map": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/weak-map/-/weak-map-1.0.5.tgz",
- "integrity": "sha1-eWkVhNmGB/UHC9O3CkDmuyLkAes=",
- "dev": true
- },
- "websocket": {
- "version": "1.0.33",
- "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.33.tgz",
- "integrity": "sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA==",
- "dev": true,
- "requires": {
- "bufferutil": "^4.0.1",
- "debug": "^2.2.0",
- "es5-ext": "^0.10.50",
- "typedarray-to-buffer": "^3.1.5",
- "utf-8-validate": "^5.0.2",
- "yaeti": "^0.0.6"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- }
- }
- },
- "well-known-symbols": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
- "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==",
- "dev": true
- },
- "which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "requires": {
- "isexe": "^2.0.0"
- }
- },
- "which-boxed-primitive": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
- "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
- "dev": true,
- "requires": {
- "is-bigint": "^1.0.1",
- "is-boolean-object": "^1.1.0",
- "is-number-object": "^1.0.4",
- "is-string": "^1.0.5",
- "is-symbol": "^1.0.3"
- }
- },
- "which-module": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
- "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
- "dev": true
- },
- "widest-line": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
- "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
- "dev": true,
- "requires": {
- "string-width": "^4.0.0"
- }
- },
- "word-wrap": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
- "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
- "dev": true
- },
- "wordwrap": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
- "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
- },
- "wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "requires": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- }
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
- },
- "write": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
- "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
- "dev": true,
- "requires": {
- "mkdirp": "^0.5.1"
- }
- },
- "write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
- "dev": true,
- "requires": {
- "imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
- }
- },
- "xdg-basedir": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
- "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
- "dev": true
- },
- "xml2js": {
- "version": "0.4.23",
- "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
- "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
- "dev": true,
- "requires": {
- "sax": ">=0.6.0",
- "xmlbuilder": "~11.0.0"
- }
- },
- "xmlbuilder": {
- "version": "11.0.1",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
- "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
- "dev": true
- },
- "xo": {
- "version": "0.29.1",
- "resolved": "https://registry.npmjs.org/xo/-/xo-0.29.1.tgz",
- "integrity": "sha512-ohlXtUatjHi4f7dRF+c/nv08zyB3+iROxwfX3xEIw2J5Tk5j4I/bPqx4tUzESVHFCh5tQbu528ZEPJmM5P3c/g==",
- "dev": true,
- "requires": {
- "@typescript-eslint/eslint-plugin": "^2.27.0",
- "@typescript-eslint/parser": "^2.27.0",
- "arrify": "^2.0.1",
- "cosmiconfig": "^6.0.0",
- "debug": "^4.1.0",
- "eslint": "^6.8.0",
- "eslint-config-prettier": "^6.10.0",
- "eslint-config-xo": "^0.29.0",
- "eslint-config-xo-typescript": "^0.27.0",
- "eslint-formatter-pretty": "^3.0.1",
- "eslint-import-resolver-webpack": "^0.12.1",
- "eslint-plugin-ava": "^10.0.1",
- "eslint-plugin-eslint-comments": "^3.1.2",
- "eslint-plugin-import": "^2.20.1",
- "eslint-plugin-no-use-extend-native": "^0.4.1",
- "eslint-plugin-node": "^11.0.0",
- "eslint-plugin-prettier": "^3.1.2",
- "eslint-plugin-promise": "^4.2.1",
- "eslint-plugin-unicorn": "^18.0.1",
- "find-cache-dir": "^3.3.1",
- "find-up": "^4.1.0",
- "fs-extra": "^9.0.0",
- "get-stdin": "^7.0.0",
- "globby": "^9.0.0",
- "has-flag": "^4.0.0",
- "imurmurhash": "^0.1.4",
- "is-path-inside": "^3.0.2",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "json5": "^2.1.1",
- "lodash": "^4.17.15",
- "meow": "^5.0.0",
- "micromatch": "^4.0.2",
- "open-editor": "^2.0.1",
- "p-reduce": "^2.1.0",
- "path-exists": "^4.0.0",
- "prettier": "^2.0.4",
- "resolve-cwd": "^3.0.0",
- "resolve-from": "^5.0.0",
- "semver": "^7.2.1",
- "slash": "^3.0.0",
- "to-absolute-glob": "^2.0.2",
- "typescript": "^3.0.0",
- "update-notifier": "^4.0.0"
- },
- "dependencies": {
- "@nodelib/fs.stat": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
- "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
- "dev": true
- },
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "array-union": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
- "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
- "dev": true,
- "requires": {
- "array-uniq": "^1.0.1"
- }
- },
- "arrify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
- "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
- "dev": true
- },
- "boxen": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz",
- "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==",
- "dev": true,
- "requires": {
- "ansi-align": "^3.0.0",
- "camelcase": "^5.3.1",
- "chalk": "^3.0.0",
- "cli-boxes": "^2.2.0",
- "string-width": "^4.1.0",
- "term-size": "^2.1.0",
- "type-fest": "^0.8.1",
- "widest-line": "^3.1.0"
- },
- "dependencies": {
- "camelcase": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
- "dev": true
- }
- }
- },
- "braces": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
- "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
- "dev": true,
- "requires": {
- "arr-flatten": "^1.1.0",
- "array-unique": "^0.3.2",
- "extend-shallow": "^2.0.1",
- "fill-range": "^4.0.0",
- "isobject": "^3.0.1",
- "repeat-element": "^1.1.2",
- "snapdragon": "^0.8.1",
- "snapdragon-node": "^2.0.1",
- "split-string": "^3.0.2",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
- "dev": true
- },
- "camelcase-keys": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
- "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
- "dev": true,
- "requires": {
- "camelcase": "^4.1.0",
- "map-obj": "^2.0.0",
- "quick-lru": "^1.0.0"
- }
- },
- "chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "cosmiconfig": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
- "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
- "dev": true,
- "requires": {
- "@types/parse-json": "^4.0.0",
- "import-fresh": "^3.1.0",
- "parse-json": "^5.0.0",
- "path-type": "^4.0.0",
- "yaml": "^1.7.2"
- }
- },
- "dir-glob": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
- "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==",
- "dev": true,
- "requires": {
- "path-type": "^3.0.0"
- },
- "dependencies": {
- "path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
- "dev": true,
- "requires": {
- "pify": "^3.0.0"
- }
- },
- "pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
- "dev": true
- }
- }
- },
- "fast-glob": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
- "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
- "dev": true,
- "requires": {
- "@mrmlnc/readdir-enhanced": "^2.2.1",
- "@nodelib/fs.stat": "^1.1.2",
- "glob-parent": "^3.1.0",
- "is-glob": "^4.0.0",
- "merge2": "^1.2.3",
- "micromatch": "^3.1.10"
- },
- "dependencies": {
- "micromatch": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
- "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
- "dev": true,
- "requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "braces": "^2.3.1",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "extglob": "^2.0.4",
- "fragment-cache": "^0.2.1",
- "kind-of": "^6.0.2",
- "nanomatch": "^1.2.9",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.2"
- }
- }
- }
- },
- "fill-range": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
- "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
- "dev": true,
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1",
- "to-regex-range": "^2.1.0"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "fs-extra": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
- "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
- "dev": true,
- "requires": {
- "at-least-node": "^1.0.0",
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- }
- },
- "glob-parent": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
- "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
- "dev": true,
- "requires": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
- },
- "dependencies": {
- "is-glob": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
- "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
- "dev": true,
- "requires": {
- "is-extglob": "^2.1.0"
- }
- }
- }
- },
- "global-dirs": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz",
- "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==",
- "dev": true,
- "requires": {
- "ini": "1.3.7"
- }
- },
- "globby": {
- "version": "9.2.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz",
- "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==",
- "dev": true,
- "requires": {
- "@types/glob": "^7.1.1",
- "array-union": "^1.0.2",
- "dir-glob": "^2.2.2",
- "fast-glob": "^2.2.6",
- "glob": "^7.1.3",
- "ignore": "^4.0.3",
- "pify": "^4.0.1",
- "slash": "^2.0.0"
- },
- "dependencies": {
- "slash": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
- "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
- "dev": true
- }
- }
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "hosted-git-info": {
- "version": "2.8.8",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
- "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
- "dev": true
- },
- "ignore": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
- "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
- "dev": true
- },
- "indent-string": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
- "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
- "dev": true
- },
- "ini": {
- "version": "1.3.7",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
- "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==",
- "dev": true
- },
- "is-installed-globally": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz",
- "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==",
- "dev": true,
- "requires": {
- "global-dirs": "^2.0.1",
- "is-path-inside": "^3.0.1"
- }
- },
- "is-npm": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz",
- "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==",
- "dev": true
- },
- "is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "dev": true,
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "dev": true,
- "requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- },
- "dependencies": {
- "path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "dev": true
- }
- }
- },
- "map-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
- "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=",
- "dev": true
- },
- "meow": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz",
- "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==",
- "dev": true,
- "requires": {
- "camelcase-keys": "^4.0.0",
- "decamelize-keys": "^1.0.0",
- "loud-rejection": "^1.0.0",
- "minimist-options": "^3.0.1",
- "normalize-package-data": "^2.3.4",
- "read-pkg-up": "^3.0.0",
- "redent": "^2.0.0",
- "trim-newlines": "^2.0.0",
- "yargs-parser": "^10.0.0"
- }
- },
- "minimist-options": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz",
- "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==",
- "dev": true,
- "requires": {
- "arrify": "^1.0.1",
- "is-plain-obj": "^1.1.0"
- },
- "dependencies": {
- "arrify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
- "dev": true
- }
- }
- },
- "normalize-package-data": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
- "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
- "dev": true,
- "requires": {
- "hosted-git-info": "^2.1.4",
- "resolve": "^1.10.0",
- "semver": "2 || 3 || 4 || 5",
- "validate-npm-package-license": "^3.0.1"
- },
- "dependencies": {
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
- }
- }
- },
- "p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dev": true,
- "requires": {
- "p-try": "^1.0.0"
- }
- },
- "p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "dev": true,
- "requires": {
- "p-limit": "^1.1.0"
- }
- },
- "p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
- "dev": true
- },
- "pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
- "dev": true
- },
- "quick-lru": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
- "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=",
- "dev": true
- },
- "read-pkg": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
- "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
- "dev": true,
- "requires": {
- "load-json-file": "^4.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^3.0.0"
- },
- "dependencies": {
- "path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
- "dev": true,
- "requires": {
- "pify": "^3.0.0"
- }
- },
- "pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
- "dev": true
- }
- }
- },
- "read-pkg-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
- "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=",
- "dev": true,
- "requires": {
- "find-up": "^2.0.0",
- "read-pkg": "^3.0.0"
- },
- "dependencies": {
- "find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "dev": true,
- "requires": {
- "locate-path": "^2.0.0"
- }
- }
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+ "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
}
},
- "redent": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
- "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=",
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
- "indent-string": "^3.0.0",
- "strip-indent": "^2.0.0"
+ "color-name": "~1.1.4"
}
},
- "strip-indent": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
- "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"supports-color": {
@@ -13517,61 +10847,235 @@
"requires": {
"has-flag": "^4.0.0"
}
- },
- "to-regex-range": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
- "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+ }
+ }
+ },
+ "uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "urix": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
+ },
+ "url-join": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
+ "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
+ },
+ "url-parse-lax": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
+ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
+ "dev": true,
+ "requires": {
+ "prepend-http": "^2.0.0"
+ }
+ },
+ "use": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
+ },
+ "utf-8-validate": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.4.tgz",
+ "integrity": "sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q==",
+ "dev": true,
+ "requires": {
+ "node-gyp-build": "^4.2.0"
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ },
+ "uuid": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+ "dev": true
+ },
+ "v8-compile-cache": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
+ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
+ "dev": true
+ },
+ "validate-npm-package-license": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+ "requires": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
+ }
+ },
+ "wcwidth": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
+ "dev": true,
+ "requires": {
+ "defaults": "^1.0.3"
+ }
+ },
+ "weak-map": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/weak-map/-/weak-map-1.0.5.tgz",
+ "integrity": "sha1-eWkVhNmGB/UHC9O3CkDmuyLkAes=",
+ "dev": true
+ },
+ "websocket": {
+ "version": "1.0.33",
+ "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.33.tgz",
+ "integrity": "sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA==",
+ "dev": true,
+ "requires": {
+ "bufferutil": "^4.0.1",
+ "debug": "^2.2.0",
+ "es5-ext": "^0.10.50",
+ "typedarray-to-buffer": "^3.1.5",
+ "utf-8-validate": "^5.0.2",
+ "yaeti": "^0.0.6"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1"
+ "ms": "2.0.0"
}
},
- "trim-newlines": {
+ "ms": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
- "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=",
- "dev": true
- },
- "type-fest": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
- "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
- },
- "update-notifier": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz",
- "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==",
- "dev": true,
+ }
+ }
+ },
+ "well-known-symbols": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
+ "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==",
+ "dev": true
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "which-module": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+ "dev": true
+ },
+ "widest-line": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
+ "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
+ "dev": true,
+ "requires": {
+ "string-width": "^4.0.0"
+ }
+ },
+ "word-wrap": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+ "dev": true
+ },
+ "wordwrap": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
+ },
+ "wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
- "boxen": "^4.2.0",
- "chalk": "^3.0.0",
- "configstore": "^5.0.1",
- "has-yarn": "^2.1.0",
- "import-lazy": "^2.1.0",
- "is-ci": "^2.0.0",
- "is-installed-globally": "^0.3.1",
- "is-npm": "^4.0.0",
- "is-yarn-global": "^0.3.0",
- "latest-version": "^5.0.0",
- "pupa": "^2.0.1",
- "semver-diff": "^3.1.1",
- "xdg-basedir": "^4.0.0"
+ "color-convert": "^2.0.1"
}
},
- "yargs-parser": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
- "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
- "dev": true,
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
- "camelcase": "^4.1.0"
+ "color-name": "~1.1.4"
}
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
}
}
},
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ },
+ "write-file-atomic": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+ "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4",
+ "is-typedarray": "^1.0.0",
+ "signal-exit": "^3.0.2",
+ "typedarray-to-buffer": "^3.1.5"
+ }
+ },
+ "xdg-basedir": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
+ "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
+ "dev": true
+ },
+ "xml2js": {
+ "version": "0.4.23",
+ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
+ "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
+ "dev": true,
+ "requires": {
+ "sax": ">=0.6.0",
+ "xmlbuilder": "~11.0.0"
+ }
+ },
+ "xmlbuilder": {
+ "version": "11.0.1",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
+ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
+ "dev": true
+ },
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
diff --git a/package.json b/package.json
index 5343e85c07..40081368c2 100644
--- a/package.json
+++ b/package.json
@@ -57,19 +57,23 @@
"codecov": "3.8.3",
"delay": "5.0.0",
"dockerode": "3.3.1",
+ "eslint": "^7.2.0",
+ "eslint-config-prettier": "8.3.0",
"file-url": "3.0.0",
"fs-extra": "9.1.0",
"got": "11.8.2",
+ "husky": "^6.0.0",
"js-yaml": "4.1.0",
+ "lint-staged": "^11.0.0",
"mockserver-client": "5.11.2",
"nock": "13.1.3",
"nyc": "15.1.0",
+ "prettier": "2.3.1",
"p-retry": "4.6.1",
"proxyquire": "2.1.3",
"sinon": "11.1.2",
"stream-buffers": "3.0.2",
- "tempy": "1.0.1",
- "xo": "0.29.1"
+ "tempy": "1.0.1"
},
"engines": {
"node": ">=10.19"
@@ -95,23 +99,6 @@
],
"license": "MIT",
"main": "index.js",
- "nyc": {
- "include": [
- "lib/**/*.js",
- "index.js",
- "cli.js"
- ],
- "reporter": [
- "json",
- "text",
- "html"
- ],
- "all": true
- },
- "prettier": {
- "printWidth": 120,
- "trailingComma": "es5"
- },
"publishConfig": {
"access": "public"
},
@@ -121,22 +108,14 @@
},
"scripts": {
"codecov": "codecov -f coverage/coverage-final.json",
- "lint": "xo",
+ "prepare": "husky install",
+ "lint": "npx eslint .",
+ "lint:fix": "npx eslint --fix .",
+ "format:check": "npx prettier --check .",
+ "format:write": "npx prettier --write .",
"pretest": "npm run lint",
"semantic-release": "node ./bin/semantic-release.js",
"test": "nyc ava -v",
"test:ci": "nyc ava -v"
- },
- "xo": {
- "prettier": true,
- "space": true,
- "rules": {
- "unicorn/string-content": "off"
- }
- },
- "renovate": {
- "extends": [
- "github>semantic-release/.github"
- ]
}
}
diff --git a/recipes/git-hosted-services/README.md b/recipes/git-hosted-services/README.md
index baba1b54f1..cf79024765 100644
--- a/recipes/git-hosted-services/README.md
+++ b/recipes/git-hosted-services/README.md
@@ -1,2 +1 @@
# Git hosted services
-
diff --git a/recipes/package-managers-and-languages.md b/recipes/package-managers-and-languages.md
index ce07dcb05a..3241f0d804 100644
--- a/recipes/package-managers-and-languages.md
+++ b/recipes/package-managers-and-languages.md
@@ -1,2 +1 @@
# Package managers and languages
-
diff --git a/test/branches/branches.test.js b/test/branches/branches.test.js
index b193514a18..e50cae7782 100644
--- a/test/branches/branches.test.js
+++ b/test/branches/branches.test.js
@@ -1,206 +1,414 @@
const test = require('ava');
-const {union} = require('lodash');
+const { union } = require('lodash');
const semver = require('semver');
const proxyquire = require('proxyquire');
-const getBranch = (branches, branch) => branches.find(({name}) => name === branch);
-const release = (branches, name, version) => getBranch(branches, name).tags.push({version});
+const getBranch = (branches, branch) =>
+ branches.find(({ name }) => name === branch);
+const release = (branches, name, version) =>
+ getBranch(branches, name).tags.push({ version });
const merge = (branches, source, target, tag) => {
getBranch(branches, target).tags = union(
- getBranch(branches, source).tags.filter(({version}) => !tag || semver.cmp(version, '<=', tag)),
+ getBranch(branches, source).tags.filter(
+ ({ version }) => !tag || semver.cmp(version, '<=', tag)
+ ),
getBranch(branches, target).tags
);
};
test('Enforce ranges with branching release workflow', async (t) => {
const branches = [
- {name: '1.x', tags: []},
- {name: '1.0.x', tags: []},
- {name: 'master', tags: []},
- {name: 'next', tags: []},
- {name: 'next-major', tags: []},
- {name: 'beta', prerelease: true, tags: []},
- {name: 'alpha', prerelease: true, tags: []},
+ { name: '1.x', tags: [] },
+ { name: '1.0.x', tags: [] },
+ { name: 'master', tags: [] },
+ { name: 'next', tags: [] },
+ { name: 'next-major', tags: [] },
+ { name: 'beta', prerelease: true, tags: [] },
+ { name: 'alpha', prerelease: true, tags: [] },
];
- const getBranches = proxyquire('../../lib/branches', {'./get-tags': () => branches, './expand': () => []});
+ const getBranches = proxyquire('../../lib/branches', {
+ './get-tags': () => branches,
+ './expand': () => [],
+ });
- let result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ let result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, '1.0.x').range, '>=1.0.0 <1.0.0', 'Cannot release on 1.0.x before a releasing on master');
- t.is(getBranch(result, '1.x').range, '>=1.1.0 <1.0.0', 'Cannot release on 1.x before a releasing on master');
+ t.is(
+ getBranch(result, '1.0.x').range,
+ '>=1.0.0 <1.0.0',
+ 'Cannot release on 1.0.x before a releasing on master'
+ );
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.1.0 <1.0.0',
+ 'Cannot release on 1.x before a releasing on master'
+ );
t.is(getBranch(result, 'master').range, '>=1.0.0');
t.is(getBranch(result, 'next').range, '>=1.0.0');
t.is(getBranch(result, 'next-major').range, '>=1.0.0');
release(branches, 'master', '1.0.0');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, '1.0.x').range, '>=1.0.0 <1.0.0', 'Cannot release on 1.0.x before a releasing on master');
- t.is(getBranch(result, '1.x').range, '>=1.1.0 <1.0.0', 'Cannot release on 1.x before a releasing on master');
+ t.is(
+ getBranch(result, '1.0.x').range,
+ '>=1.0.0 <1.0.0',
+ 'Cannot release on 1.0.x before a releasing on master'
+ );
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.1.0 <1.0.0',
+ 'Cannot release on 1.x before a releasing on master'
+ );
t.is(getBranch(result, 'master').range, '>=1.0.0');
t.is(getBranch(result, 'next').range, '>=1.0.0');
t.is(getBranch(result, 'next-major').range, '>=1.0.0');
release(branches, 'master', '1.0.1');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.0.1', 'Can release only > than 1.0.1 on master');
- t.is(getBranch(result, 'next').range, '>=1.0.1', 'Can release only > than 1.0.1 on next');
- t.is(getBranch(result, 'next-major').range, '>=1.0.1', 'Can release only > than 1.0.1 on next-major');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.0.1',
+ 'Can release only > than 1.0.1 on master'
+ );
+ t.is(
+ getBranch(result, 'next').range,
+ '>=1.0.1',
+ 'Can release only > than 1.0.1 on next'
+ );
+ t.is(
+ getBranch(result, 'next-major').range,
+ '>=1.0.1',
+ 'Can release only > than 1.0.1 on next-major'
+ );
merge(branches, 'master', 'next');
merge(branches, 'master', 'next-major');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.0.1', 'Can release only > than 1.0.1 on master');
- t.is(getBranch(result, 'next').range, '>=1.0.1', 'Can release only > than 1.0.1 on next');
- t.is(getBranch(result, 'next-major').range, '>=1.0.1', 'Can release only > than 1.0.1 on next-major');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.0.1',
+ 'Can release only > than 1.0.1 on master'
+ );
+ t.is(
+ getBranch(result, 'next').range,
+ '>=1.0.1',
+ 'Can release only > than 1.0.1 on next'
+ );
+ t.is(
+ getBranch(result, 'next-major').range,
+ '>=1.0.1',
+ 'Can release only > than 1.0.1 on next-major'
+ );
release(branches, 'next', '1.1.0');
release(branches, 'next', '1.1.1');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.0.1 <1.1.0', 'Can release only patch, > than 1.0.1 on master');
- t.is(getBranch(result, 'next').range, '>=1.1.1', 'Can release only > than 1.1.1 on next');
- t.is(getBranch(result, 'next-major').range, '>=1.1.1', 'Can release > than 1.1.1 on next-major');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.0.1 <1.1.0',
+ 'Can release only patch, > than 1.0.1 on master'
+ );
+ t.is(
+ getBranch(result, 'next').range,
+ '>=1.1.1',
+ 'Can release only > than 1.1.1 on next'
+ );
+ t.is(
+ getBranch(result, 'next-major').range,
+ '>=1.1.1',
+ 'Can release > than 1.1.1 on next-major'
+ );
release(branches, 'next-major', '2.0.0');
release(branches, 'next-major', '2.0.1');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.0.1 <1.1.0', 'Can release only patch, > than 1.0.1 on master');
- t.is(getBranch(result, 'next').range, '>=1.1.1 <2.0.0', 'Can release only patch or minor, > than 1.1.0 on next');
- t.is(getBranch(result, 'next-major').range, '>=2.0.1', 'Can release any version, > than 2.0.1 on next-major');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.0.1 <1.1.0',
+ 'Can release only patch, > than 1.0.1 on master'
+ );
+ t.is(
+ getBranch(result, 'next').range,
+ '>=1.1.1 <2.0.0',
+ 'Can release only patch or minor, > than 1.1.0 on next'
+ );
+ t.is(
+ getBranch(result, 'next-major').range,
+ '>=2.0.1',
+ 'Can release any version, > than 2.0.1 on next-major'
+ );
merge(branches, 'next-major', 'beta');
release(branches, 'beta', '3.0.0-beta.1');
merge(branches, 'beta', 'alpha');
release(branches, 'alpha', '4.0.0-alpha.1');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'next-major').range, '>=2.0.1', 'Can release any version, > than 2.0.1 on next-major');
+ t.is(
+ getBranch(result, 'next-major').range,
+ '>=2.0.1',
+ 'Can release any version, > than 2.0.1 on next-major'
+ );
merge(branches, 'master', '1.0.x');
merge(branches, 'master', '1.x');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.0.1 <1.1.0', 'Can release only patch, > than 1.0.1 on master');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.0.1 <1.1.0',
+ 'Can release only patch, > than 1.0.1 on master'
+ );
t.is(
getBranch(result, '1.0.x').range,
'>=1.0.1 <1.0.1',
'Cannot release on 1.0.x before >= 1.1.0 is released on master'
);
- t.is(getBranch(result, '1.x').range, '>=1.1.0 <1.0.1', 'Cannot release on 1.x before >= 1.2.0 is released on master');
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.1.0 <1.0.1',
+ 'Cannot release on 1.x before >= 1.2.0 is released on master'
+ );
release(branches, 'master', '1.0.2');
release(branches, 'master', '1.0.3');
release(branches, 'master', '1.0.4');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.0.4 <1.1.0', 'Can release only patch, > than 1.0.4 on master');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.0.4 <1.1.0',
+ 'Can release only patch, > than 1.0.4 on master'
+ );
t.is(
getBranch(result, '1.0.x').range,
'>=1.0.1 <1.0.2',
'Cannot release on 1.0.x before >= 1.1.0 is released on master'
);
- t.is(getBranch(result, '1.x').range, '>=1.1.0 <1.0.2', 'Cannot release on 1.x before >= 1.2.0 is released on master');
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.1.0 <1.0.2',
+ 'Cannot release on 1.x before >= 1.2.0 is released on master'
+ );
merge(branches, 'next', 'master');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.1.1', 'Can release only > than 1.1.1 on master');
- t.is(getBranch(result, 'next').range, '>=1.1.1 <2.0.0', 'Can release only patch or minor, > than 1.1.1 on next');
- t.is(getBranch(result, 'next-major').range, '>=2.0.1', 'Can release any version, > than 2.0.1 on next-major');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.1.1',
+ 'Can release only > than 1.1.1 on master'
+ );
+ t.is(
+ getBranch(result, 'next').range,
+ '>=1.1.1 <2.0.0',
+ 'Can release only patch or minor, > than 1.1.1 on next'
+ );
+ t.is(
+ getBranch(result, 'next-major').range,
+ '>=2.0.1',
+ 'Can release any version, > than 2.0.1 on next-major'
+ );
t.is(
getBranch(result, '1.0.x').range,
'>=1.0.1 <1.0.2',
'Cannot release on 1.0.x before 1.0.x version from master are merged'
);
- t.is(getBranch(result, '1.x').range, '>=1.1.0 <1.0.2', 'Cannot release on 1.x before >= 2.0.0 is released on master');
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.1.0 <1.0.2',
+ 'Cannot release on 1.x before >= 2.0.0 is released on master'
+ );
merge(branches, 'master', '1.0.x', '1.0.4');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.1.1', 'Can release only > than 1.1.1 on master');
- t.is(getBranch(result, '1.0.x').range, '>=1.0.4 <1.1.0', 'Can release on 1.0.x only within range');
- t.is(getBranch(result, '1.x').range, '>=1.1.0 <1.1.0', 'Cannot release on 1.x before >= 2.0.0 is released on master');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.1.1',
+ 'Can release only > than 1.1.1 on master'
+ );
+ t.is(
+ getBranch(result, '1.0.x').range,
+ '>=1.0.4 <1.1.0',
+ 'Can release on 1.0.x only within range'
+ );
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.1.0 <1.1.0',
+ 'Cannot release on 1.x before >= 2.0.0 is released on master'
+ );
merge(branches, 'master', '1.x');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=1.1.1', 'Can release only > than 1.1.1 on master');
- t.is(getBranch(result, '1.0.x').range, '>=1.0.4 <1.1.0', 'Can release on 1.0.x only within range');
- t.is(getBranch(result, '1.x').range, '>=1.1.1 <1.1.1', 'Cannot release on 1.x before >= 2.0.0 is released on master');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=1.1.1',
+ 'Can release only > than 1.1.1 on master'
+ );
+ t.is(
+ getBranch(result, '1.0.x').range,
+ '>=1.0.4 <1.1.0',
+ 'Can release on 1.0.x only within range'
+ );
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.1.1 <1.1.1',
+ 'Cannot release on 1.x before >= 2.0.0 is released on master'
+ );
merge(branches, 'next-major', 'next');
merge(branches, 'next', 'master');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=2.0.1', 'Can release only > than 2.0.1 on master');
- t.is(getBranch(result, 'next').range, '>=2.0.1', 'Can release only > than 2.0.1 on next');
- t.is(getBranch(result, 'next-major').range, '>=2.0.1', 'Can release only > than 2.0.1 on next-major');
- t.is(getBranch(result, '1.x').range, '>=1.1.1 <2.0.0', 'Can release on 1.x only within range');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=2.0.1',
+ 'Can release only > than 2.0.1 on master'
+ );
+ t.is(
+ getBranch(result, 'next').range,
+ '>=2.0.1',
+ 'Can release only > than 2.0.1 on next'
+ );
+ t.is(
+ getBranch(result, 'next-major').range,
+ '>=2.0.1',
+ 'Can release only > than 2.0.1 on next-major'
+ );
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.1.1 <2.0.0',
+ 'Can release on 1.x only within range'
+ );
merge(branches, 'beta', 'master');
release(branches, 'master', '3.0.0');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, 'master').range, '>=3.0.0', 'Can release only > than 3.0.0 on master');
- t.is(getBranch(result, 'next').range, '>=3.0.0', 'Can release only > than 3.0.0 on next');
- t.is(getBranch(result, 'next-major').range, '>=3.0.0', 'Can release only > than 3.0.0 on next-major');
+ t.is(
+ getBranch(result, 'master').range,
+ '>=3.0.0',
+ 'Can release only > than 3.0.0 on master'
+ );
+ t.is(
+ getBranch(result, 'next').range,
+ '>=3.0.0',
+ 'Can release only > than 3.0.0 on next'
+ );
+ t.is(
+ getBranch(result, 'next-major').range,
+ '>=3.0.0',
+ 'Can release only > than 3.0.0 on next-major'
+ );
- branches.push({name: '1.1.x', tags: []});
+ branches.push({ name: '1.1.x', tags: [] });
merge(branches, '1.x', '1.1.x');
- result = (await getBranches('repositoryUrl', 'master', {options: {branches}})).map(({name, range}) => ({
+ result = (
+ await getBranches('repositoryUrl', 'master', { options: { branches } })
+ ).map(({ name, range }) => ({
name,
range,
}));
- t.is(getBranch(result, '1.0.x').range, '>=1.0.4 <1.1.0', 'Can release on 1.0.x only within range');
- t.is(getBranch(result, '1.1.x').range, '>=1.1.1 <1.2.0', 'Can release on 1.1.x only within range');
- t.is(getBranch(result, '1.x').range, '>=1.2.0 <2.0.0', 'Can release on 1.x only within range');
+ t.is(
+ getBranch(result, '1.0.x').range,
+ '>=1.0.4 <1.1.0',
+ 'Can release on 1.0.x only within range'
+ );
+ t.is(
+ getBranch(result, '1.1.x').range,
+ '>=1.1.1 <1.2.0',
+ 'Can release on 1.1.x only within range'
+ );
+ t.is(
+ getBranch(result, '1.x').range,
+ '>=1.2.0 <2.0.0',
+ 'Can release on 1.x only within range'
+ );
});
test('Throw SemanticReleaseError for invalid configurations', async (t) => {
const branches = [
- {name: '123', range: '123', tags: []},
- {name: '1.x', tags: []},
- {name: 'maintenance-1', range: '1.x', tags: []},
- {name: '1.x.x', tags: []},
- {name: 'beta', prerelease: '', tags: []},
- {name: 'alpha', prerelease: 'alpha', tags: []},
- {name: 'preview', prerelease: 'alpha', tags: []},
+ { name: '123', range: '123', tags: [] },
+ { name: '1.x', tags: [] },
+ { name: 'maintenance-1', range: '1.x', tags: [] },
+ { name: '1.x.x', tags: [] },
+ { name: 'beta', prerelease: '', tags: [] },
+ { name: 'alpha', prerelease: 'alpha', tags: [] },
+ { name: 'preview', prerelease: 'alpha', tags: [] },
+ ];
+ const getBranches = proxyquire('../../lib/branches', {
+ './get-tags': () => branches,
+ './expand': () => [],
+ });
+ const errors = [
+ ...(await t.throwsAsync(
+ getBranches('repositoryUrl', 'master', { options: { branches } })
+ )),
];
- const getBranches = proxyquire('../../lib/branches', {'./get-tags': () => branches, './expand': () => []});
- const errors = [...(await t.throwsAsync(getBranches('repositoryUrl', 'master', {options: {branches}})))];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'EMAINTENANCEBRANCH');
@@ -226,12 +434,19 @@ test('Throw SemanticReleaseError for invalid configurations', async (t) => {
test('Throw a SemanticReleaseError if there is duplicate branches', async (t) => {
const branches = [
- {name: 'master', tags: []},
- {name: 'master', tags: []},
+ { name: 'master', tags: [] },
+ { name: 'master', tags: [] },
];
- const getBranches = proxyquire('../../lib/branches', {'./get-tags': () => branches, './expand': () => []});
+ const getBranches = proxyquire('../../lib/branches', {
+ './get-tags': () => branches,
+ './expand': () => [],
+ });
- const errors = [...(await t.throwsAsync(getBranches('repositoryUrl', 'master', {options: {branches}})))];
+ const errors = [
+ ...(await t.throwsAsync(
+ getBranches('repositoryUrl', 'master', { options: { branches } })
+ )),
+ ];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'EDUPLICATEBRANCHES');
@@ -241,12 +456,19 @@ test('Throw a SemanticReleaseError if there is duplicate branches', async (t) =>
test('Throw a SemanticReleaseError for each invalid branch name', async (t) => {
const branches = [
- {name: '~master', tags: []},
- {name: '^master', tags: []},
+ { name: '~master', tags: [] },
+ { name: '^master', tags: [] },
];
- const getBranches = proxyquire('../../lib/branches', {'./get-tags': () => branches, './expand': () => []});
+ const getBranches = proxyquire('../../lib/branches', {
+ './get-tags': () => branches,
+ './expand': () => [],
+ });
- const errors = [...(await t.throwsAsync(getBranches('repositoryUrl', 'master', {options: {branches}})))];
+ const errors = [
+ ...(await t.throwsAsync(
+ getBranches('repositoryUrl', 'master', { options: { branches } })
+ )),
+ ];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'EINVALIDBRANCHNAME');
diff --git a/test/branches/expand.test.js b/test/branches/expand.test.js
index 0318d412c0..ee16e929dd 100644
--- a/test/branches/expand.test.js
+++ b/test/branches/expand.test.js
@@ -1,54 +1,63 @@
const test = require('ava');
const expand = require('../../lib/branches/expand');
-const {gitRepo, gitCommits, gitCheckout, gitPush} = require('../helpers/git-utils');
+const {
+ gitRepo,
+ gitCommits,
+ gitCheckout,
+ gitPush,
+} = require('../helpers/git-utils');
test('Expand branches defined with globs', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('1.0.x', true, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, '1.0.x', {cwd});
- await gitCheckout('1.x.x', true, {cwd});
- await gitCommits(['Third'], {cwd});
- await gitPush(repositoryUrl, '1.x.x', {cwd});
- await gitCheckout('2.x', true, {cwd});
- await gitCommits(['Fourth'], {cwd});
- await gitPush(repositoryUrl, '2.x', {cwd});
- await gitCheckout('next', true, {cwd});
- await gitCommits(['Fifth'], {cwd});
- await gitPush(repositoryUrl, 'next', {cwd});
- await gitCheckout('pre/foo', true, {cwd});
- await gitCommits(['Sixth'], {cwd});
- await gitPush(repositoryUrl, 'pre/foo', {cwd});
- await gitCheckout('pre/bar', true, {cwd});
- await gitCommits(['Seventh'], {cwd});
- await gitPush(repositoryUrl, 'pre/bar', {cwd});
- await gitCheckout('beta', true, {cwd});
- await gitCommits(['Eighth'], {cwd});
- await gitPush(repositoryUrl, 'beta', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('1.0.x', true, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, '1.0.x', { cwd });
+ await gitCheckout('1.x.x', true, { cwd });
+ await gitCommits(['Third'], { cwd });
+ await gitPush(repositoryUrl, '1.x.x', { cwd });
+ await gitCheckout('2.x', true, { cwd });
+ await gitCommits(['Fourth'], { cwd });
+ await gitPush(repositoryUrl, '2.x', { cwd });
+ await gitCheckout('next', true, { cwd });
+ await gitCommits(['Fifth'], { cwd });
+ await gitPush(repositoryUrl, 'next', { cwd });
+ await gitCheckout('pre/foo', true, { cwd });
+ await gitCommits(['Sixth'], { cwd });
+ await gitPush(repositoryUrl, 'pre/foo', { cwd });
+ await gitCheckout('pre/bar', true, { cwd });
+ await gitCommits(['Seventh'], { cwd });
+ await gitPush(repositoryUrl, 'pre/bar', { cwd });
+ await gitCheckout('beta', true, { cwd });
+ await gitCommits(['Eighth'], { cwd });
+ await gitPush(repositoryUrl, 'beta', { cwd });
const branches = [
// Should match all maintenance type branches
- {name: '+([0-9])?(.{+([0-9]),x}).x'},
- {name: 'master', channel: 'latest'},
- {name: 'next'},
- {name: 'pre/{foo,bar}', channel: `\${name.replace(/^pre\\//g, '')}`, prerelease: true},
+ { name: '+([0-9])?(.{+([0-9]),x}).x' },
+ { name: 'master', channel: 'latest' },
+ { name: 'next' },
+ {
+ name: 'pre/{foo,bar}',
+ channel: `\${name.replace(/^pre\\//g, '')}`,
+ prerelease: true,
+ },
// Should be ignored as there is no matching branches in the repo
- {name: 'missing'},
+ { name: 'missing' },
// Should be ignored as the matching branch in the repo is already matched by `/^pre\\/(\\w+)$/gi`
- {name: '*/foo', channel: 'foo', prerelease: 'foo'},
- {name: 'beta', channel: `channel-\${name}`, prerelease: true},
+ { name: '*/foo', channel: 'foo', prerelease: 'foo' },
+ { name: 'beta', channel: `channel-\${name}`, prerelease: true },
];
- t.deepEqual(await expand(repositoryUrl, {cwd}, branches), [
- {name: '1.0.x'},
- {name: '1.x.x'},
- {name: '2.x'},
- {name: 'master', channel: 'latest'},
- {name: 'next'},
- {name: 'pre/bar', channel: 'bar', prerelease: true},
- {name: 'pre/foo', channel: 'foo', prerelease: true},
- {name: 'beta', channel: 'channel-beta', prerelease: true},
+ t.deepEqual(await expand(repositoryUrl, { cwd }, branches), [
+ { name: '1.0.x' },
+ { name: '1.x.x' },
+ { name: '2.x' },
+ { name: 'master', channel: 'latest' },
+ { name: 'next' },
+ { name: 'pre/bar', channel: 'bar', prerelease: true },
+ { name: 'pre/foo', channel: 'foo', prerelease: true },
+ { name: 'beta', channel: 'channel-beta', prerelease: true },
]);
});
diff --git a/test/branches/get-tags.test.js b/test/branches/get-tags.test.js
index 74e0bcbca3..3965ce7bbf 100644
--- a/test/branches/get-tags.test.js
+++ b/test/branches/get-tags.test.js
@@ -1,153 +1,230 @@
const test = require('ava');
const getTags = require('../../lib/branches/get-tags');
-const {gitRepo, gitCommits, gitTagVersion, gitCheckout, gitAddNote} = require('../helpers/git-utils');
+const {
+ gitRepo,
+ gitCommits,
+ gitTagVersion,
+ gitCheckout,
+ gitAddNote,
+} = require('../helpers/git-utils');
test('Get the valid tags', async (t) => {
- const {cwd} = await gitRepo();
- const commits = await gitCommits(['First'], {cwd});
- await gitTagVersion('foo', undefined, {cwd});
- await gitTagVersion('v2.0.0', undefined, {cwd});
- commits.push(...(await gitCommits(['Second'], {cwd})));
- await gitTagVersion('v1.0.0', undefined, {cwd});
- commits.push(...(await gitCommits(['Third'], {cwd})));
- await gitTagVersion('v3.0', undefined, {cwd});
- commits.push(...(await gitCommits(['Fourth'], {cwd})));
- await gitTagVersion('v3.0.0-beta.1', undefined, {cwd});
-
- const result = await getTags({cwd, options: {tagFormat: `v\${version}`}}, [{name: 'master'}]);
+ const { cwd } = await gitRepo();
+ const commits = await gitCommits(['First'], { cwd });
+ await gitTagVersion('foo', undefined, { cwd });
+ await gitTagVersion('v2.0.0', undefined, { cwd });
+ commits.push(...(await gitCommits(['Second'], { cwd })));
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ commits.push(...(await gitCommits(['Third'], { cwd })));
+ await gitTagVersion('v3.0', undefined, { cwd });
+ commits.push(...(await gitCommits(['Fourth'], { cwd })));
+ await gitTagVersion('v3.0.0-beta.1', undefined, { cwd });
+
+ const result = await getTags(
+ { cwd, options: { tagFormat: `v\${version}` } },
+ [{ name: 'master' }]
+ );
t.deepEqual(result, [
{
name: 'master',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v2.0.0', version: '2.0.0', channels: [null]},
- {gitTag: 'v3.0.0-beta.1', version: '3.0.0-beta.1', channels: [null]},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: [null] },
+ { gitTag: 'v3.0.0-beta.1', version: '3.0.0-beta.1', channels: [null] },
],
},
]);
});
test('Get the valid tags from multiple branches', async (t) => {
- const {cwd} = await gitRepo();
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, '1.x']}), 'v1.0.0', {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, '1.x']}), 'v1.1.0', {cwd});
- await gitCheckout('1.x', true, {cwd});
- await gitCheckout('master', false, {cwd});
- await gitCommits(['Third'], {cwd});
- await gitTagVersion('v2.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'next']}), 'v2.0.0', {cwd});
- await gitCheckout('next', true, {cwd});
- await gitCommits(['Fourth'], {cwd});
- await gitTagVersion('v3.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v3.0.0', {cwd});
-
- const result = await getTags({cwd, options: {tagFormat: `v\${version}`}}, [
- {name: '1.x'},
- {name: 'master'},
- {name: 'next'},
- ]);
+ const { cwd } = await gitRepo();
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, '1.x'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, '1.x'] }), 'v1.1.0', {
+ cwd,
+ });
+ await gitCheckout('1.x', true, { cwd });
+ await gitCheckout('master', false, { cwd });
+ await gitCommits(['Third'], { cwd });
+ await gitTagVersion('v2.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'next'] }), 'v2.0.0', {
+ cwd,
+ });
+ await gitCheckout('next', true, { cwd });
+ await gitCommits(['Fourth'], { cwd });
+ await gitTagVersion('v3.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v3.0.0', { cwd });
+
+ const result = await getTags(
+ { cwd, options: { tagFormat: `v\${version}` } },
+ [{ name: '1.x' }, { name: 'master' }, { name: 'next' }]
+ );
t.deepEqual(result, [
{
name: '1.x',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null, '1.x']},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: [null, '1.x']},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null, '1.x'] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: [null, '1.x'] },
],
},
{
name: 'master',
- tags: [...result[0].tags, {gitTag: 'v2.0.0', version: '2.0.0', channels: [null, 'next']}],
+ tags: [
+ ...result[0].tags,
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: [null, 'next'] },
+ ],
},
{
name: 'next',
- tags: [...result[1].tags, {gitTag: 'v3.0.0', version: '3.0.0', channels: ['next']}],
+ tags: [
+ ...result[1].tags,
+ { gitTag: 'v3.0.0', version: '3.0.0', channels: ['next'] },
+ ],
},
]);
});
test('Return branches with and empty tags array if no valid tag is found', async (t) => {
- const {cwd} = await gitRepo();
- await gitCommits(['First'], {cwd});
- await gitTagVersion('foo', undefined, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v2.0.x', undefined, {cwd});
- await gitCommits(['Third'], {cwd});
- await gitTagVersion('v3.0', undefined, {cwd});
-
- const result = await getTags({cwd, options: {tagFormat: `prefix@v\${version}`}}, [{name: 'master'}]);
-
- t.deepEqual(result, [{name: 'master', tags: []}]);
+ const { cwd } = await gitRepo();
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('foo', undefined, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v2.0.x', undefined, { cwd });
+ await gitCommits(['Third'], { cwd });
+ await gitTagVersion('v3.0', undefined, { cwd });
+
+ const result = await getTags(
+ { cwd, options: { tagFormat: `prefix@v\${version}` } },
+ [{ name: 'master' }]
+ );
+
+ t.deepEqual(result, [{ name: 'master', tags: [] }]);
});
test('Return branches with and empty tags array if no valid tag is found in history of configured branches', async (t) => {
- const {cwd} = await gitRepo();
- await gitCommits(['First'], {cwd});
- await gitCheckout('next', true, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'next']}), 'v1.0.0', {cwd});
- await gitCommits(['Third'], {cwd});
- await gitTagVersion('v2.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'next']}), 'v2.0.0', {cwd});
- await gitCommits(['Fourth'], {cwd});
- await gitTagVersion('v3.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'next']}), 'v3.0.0', {cwd});
- await gitCheckout('master', false, {cwd});
-
- const result = await getTags({cwd, options: {tagFormat: `prefix@v\${version}`}}, [{name: 'master'}, {name: 'next'}]);
+ const { cwd } = await gitRepo();
+ await gitCommits(['First'], { cwd });
+ await gitCheckout('next', true, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'next'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCommits(['Third'], { cwd });
+ await gitTagVersion('v2.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'next'] }), 'v2.0.0', {
+ cwd,
+ });
+ await gitCommits(['Fourth'], { cwd });
+ await gitTagVersion('v3.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'next'] }), 'v3.0.0', {
+ cwd,
+ });
+ await gitCheckout('master', false, { cwd });
+
+ const result = await getTags(
+ { cwd, options: { tagFormat: `prefix@v\${version}` } },
+ [{ name: 'master' }, { name: 'next' }]
+ );
t.deepEqual(result, [
- {name: 'master', tags: []},
- {name: 'next', tags: []},
+ { name: 'master', tags: [] },
+ { name: 'next', tags: [] },
]);
});
test('Get the highest valid tag corresponding to the "tagFormat"', async (t) => {
- const {cwd} = await gitRepo();
- await gitCommits(['First'], {cwd});
-
- await gitTagVersion('1.0.0', undefined, {cwd});
- t.deepEqual(await getTags({cwd, options: {tagFormat: `\${version}`}}, [{name: 'master'}]), [
- {name: 'master', tags: [{gitTag: '1.0.0', version: '1.0.0', channels: [null]}]},
- ]);
-
- await gitTagVersion('foo-1.0.0-bar', undefined, {cwd});
- t.deepEqual(await getTags({cwd, options: {tagFormat: `foo-\${version}-bar`}}, [{name: 'master'}]), [
- {name: 'master', tags: [{gitTag: 'foo-1.0.0-bar', version: '1.0.0', channels: [null]}]},
- ]);
-
- await gitTagVersion('foo-v1.0.0-bar', undefined, {cwd});
- t.deepEqual(await getTags({cwd, options: {tagFormat: `foo-v\${version}-bar`}}, [{name: 'master'}]), [
- {
- name: 'master',
- tags: [{gitTag: 'foo-v1.0.0-bar', version: '1.0.0', channels: [null]}],
- },
- ]);
-
- await gitTagVersion('(.+)/1.0.0/(a-z)', undefined, {cwd});
- t.deepEqual(await getTags({cwd, options: {tagFormat: `(.+)/\${version}/(a-z)`}}, [{name: 'master'}]), [
- {
- name: 'master',
- tags: [{gitTag: '(.+)/1.0.0/(a-z)', version: '1.0.0', channels: [null]}],
- },
- ]);
-
- await gitTagVersion('2.0.0-1.0.0-bar.1', undefined, {cwd});
- t.deepEqual(await getTags({cwd, options: {tagFormat: `2.0.0-\${version}-bar.1`}}, [{name: 'master'}]), [
- {
- name: 'master',
- tags: [{gitTag: '2.0.0-1.0.0-bar.1', version: '1.0.0', channels: [null]}],
- },
- ]);
-
- await gitTagVersion('3.0.0-bar.2', undefined, {cwd});
- t.deepEqual(await getTags({cwd, options: {tagFormat: `\${version}-bar.2`}}, [{name: 'master'}]), [
- {name: 'master', tags: [{gitTag: '3.0.0-bar.2', version: '3.0.0', channels: [null]}]},
- ]);
+ const { cwd } = await gitRepo();
+ await gitCommits(['First'], { cwd });
+
+ await gitTagVersion('1.0.0', undefined, { cwd });
+ t.deepEqual(
+ await getTags({ cwd, options: { tagFormat: `\${version}` } }, [
+ { name: 'master' },
+ ]),
+ [
+ {
+ name: 'master',
+ tags: [{ gitTag: '1.0.0', version: '1.0.0', channels: [null] }],
+ },
+ ]
+ );
+
+ await gitTagVersion('foo-1.0.0-bar', undefined, { cwd });
+ t.deepEqual(
+ await getTags({ cwd, options: { tagFormat: `foo-\${version}-bar` } }, [
+ { name: 'master' },
+ ]),
+ [
+ {
+ name: 'master',
+ tags: [{ gitTag: 'foo-1.0.0-bar', version: '1.0.0', channels: [null] }],
+ },
+ ]
+ );
+
+ await gitTagVersion('foo-v1.0.0-bar', undefined, { cwd });
+ t.deepEqual(
+ await getTags({ cwd, options: { tagFormat: `foo-v\${version}-bar` } }, [
+ { name: 'master' },
+ ]),
+ [
+ {
+ name: 'master',
+ tags: [
+ { gitTag: 'foo-v1.0.0-bar', version: '1.0.0', channels: [null] },
+ ],
+ },
+ ]
+ );
+
+ await gitTagVersion('(.+)/1.0.0/(a-z)', undefined, { cwd });
+ t.deepEqual(
+ await getTags({ cwd, options: { tagFormat: `(.+)/\${version}/(a-z)` } }, [
+ { name: 'master' },
+ ]),
+ [
+ {
+ name: 'master',
+ tags: [
+ { gitTag: '(.+)/1.0.0/(a-z)', version: '1.0.0', channels: [null] },
+ ],
+ },
+ ]
+ );
+
+ await gitTagVersion('2.0.0-1.0.0-bar.1', undefined, { cwd });
+ t.deepEqual(
+ await getTags({ cwd, options: { tagFormat: `2.0.0-\${version}-bar.1` } }, [
+ { name: 'master' },
+ ]),
+ [
+ {
+ name: 'master',
+ tags: [
+ { gitTag: '2.0.0-1.0.0-bar.1', version: '1.0.0', channels: [null] },
+ ],
+ },
+ ]
+ );
+
+ await gitTagVersion('3.0.0-bar.2', undefined, { cwd });
+ t.deepEqual(
+ await getTags({ cwd, options: { tagFormat: `\${version}-bar.2` } }, [
+ { name: 'master' },
+ ]),
+ [
+ {
+ name: 'master',
+ tags: [{ gitTag: '3.0.0-bar.2', version: '3.0.0', channels: [null] }],
+ },
+ ]
+ );
});
diff --git a/test/branches/normalize.test.js b/test/branches/normalize.test.js
index 9d8a934c64..4f2cf5bfc0 100644
--- a/test/branches/normalize.test.js
+++ b/test/branches/normalize.test.js
@@ -1,24 +1,26 @@
const test = require('ava');
const normalize = require('../../lib/branches/normalize');
-const toTags = (versions) => versions.map((version) => ({version}));
+const toTags = (versions) => versions.map((version) => ({ version }));
test('Maintenance branches - initial state', (t) => {
const maintenance = [
- {name: '1.x', channel: '1.x', tags: []},
- {name: '1.1.x', tags: []},
- {name: '1.2.x', tags: []},
+ { name: '1.x', channel: '1.x', tags: [] },
+ { name: '1.1.x', tags: [] },
+ { name: '1.2.x', tags: [] },
];
- const release = [{name: 'master', tags: []}];
+ const release = [{ name: 'master', tags: [] }];
t.deepEqual(
- normalize.maintenance({maintenance, release}).map(({type, name, range, accept, channel, mergeRange}) => ({
- type,
- name,
- range,
- accept,
- channel,
- mergeRange,
- })),
+ normalize
+ .maintenance({ maintenance, release })
+ .map(({ type, name, range, accept, channel, mergeRange }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ mergeRange,
+ })),
[
{
type: 'maintenance',
@@ -50,29 +52,71 @@ test('Maintenance branches - initial state', (t) => {
test('Maintenance branches - cap range to first release present on default branch and not in any Maintenance one', (t) => {
const maintenance = [
- {name: '1.x', tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0', '1.2.1', '1.3.0', '1.4.0', '1.5.0'])},
- {name: 'name', range: '1.1.x', tags: toTags(['1.0.0', '1.0.1', '1.1.0', '1.1.1'])},
- {name: '1.2.x', tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0', '1.2.1'])},
- {name: '2.x.x', tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0', '1.2.1', '1.5.0'])},
+ {
+ name: '1.x',
+ tags: toTags([
+ '1.0.0',
+ '1.1.0',
+ '1.1.1',
+ '1.2.0',
+ '1.2.1',
+ '1.3.0',
+ '1.4.0',
+ '1.5.0',
+ ]),
+ },
+ {
+ name: 'name',
+ range: '1.1.x',
+ tags: toTags(['1.0.0', '1.0.1', '1.1.0', '1.1.1']),
+ },
+ {
+ name: '1.2.x',
+ tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0', '1.2.1']),
+ },
+ {
+ name: '2.x.x',
+ tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0', '1.2.1', '1.5.0']),
+ },
];
const release = [
{
name: 'master',
- tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0', '1.2.1', '1.3.0', '1.4.0', '1.5.0', '1.6.0', '2.0.0']),
+ tags: toTags([
+ '1.0.0',
+ '1.1.0',
+ '1.1.1',
+ '1.2.0',
+ '1.2.1',
+ '1.3.0',
+ '1.4.0',
+ '1.5.0',
+ '1.6.0',
+ '2.0.0',
+ ]),
},
];
t.deepEqual(
normalize
- .maintenance({maintenance, release})
- .map(({type, name, range, accept, channel, mergeRange: maintenanceRange}) => ({
- type,
- name,
- range,
- accept,
- channel,
- mergeRange: maintenanceRange,
- })),
+ .maintenance({ maintenance, release })
+ .map(
+ ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ mergeRange: maintenanceRange,
+ }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ mergeRange: maintenanceRange,
+ })
+ ),
[
{
type: 'maintenance',
@@ -112,20 +156,24 @@ test('Maintenance branches - cap range to first release present on default branc
test('Maintenance branches - cap range to default branch last release if all release are also present on maintenance branch', (t) => {
const maintenance = [
- {name: '1.x', tags: toTags(['1.0.0', '1.2.0', '1.3.0'])},
- {name: '2.x.x', tags: toTags(['1.0.0', '1.2.0', '1.3.0', '2.0.0'])},
+ { name: '1.x', tags: toTags(['1.0.0', '1.2.0', '1.3.0']) },
+ { name: '2.x.x', tags: toTags(['1.0.0', '1.2.0', '1.3.0', '2.0.0']) },
+ ];
+ const release = [
+ { name: 'master', tags: toTags(['1.0.0', '1.2.0', '1.3.0', '2.0.0']) },
];
- const release = [{name: 'master', tags: toTags(['1.0.0', '1.2.0', '1.3.0', '2.0.0'])}];
t.deepEqual(
- normalize.maintenance({maintenance, release}).map(({type, name, range, accept, channel, mergeRange}) => ({
- type,
- name,
- range,
- accept,
- channel,
- mergeRange,
- })),
+ normalize
+ .maintenance({ maintenance, release })
+ .map(({ type, name, range, accept, channel, mergeRange }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ mergeRange,
+ })),
[
{
type: 'maintenance',
@@ -149,15 +197,22 @@ test('Maintenance branches - cap range to default branch last release if all rel
test('Release branches - initial state', (t) => {
const release = [
- {name: 'master', tags: []},
- {name: 'next', channel: 'next', tags: []},
- {name: 'next-major', tags: []},
+ { name: 'master', tags: [] },
+ { name: 'next', channel: 'next', tags: [] },
+ { name: 'next-major', tags: [] },
];
t.deepEqual(
normalize
- .release({release})
- .map(({type, name, range, accept, channel, main}) => ({type, name, range, accept, channel, main})),
+ .release({ release })
+ .map(({ type, name, range, accept, channel, main }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ main,
+ })),
[
{
type: 'release',
@@ -189,17 +244,46 @@ test('Release branches - initial state', (t) => {
test('Release branches - 3 release branches', (t) => {
const release = [
- {name: 'master', tags: toTags(['1.0.0', '1.0.1', '1.0.2'])},
- {name: 'next', tags: toTags(['1.0.0', '1.0.1', '1.0.2', '1.1.0', '1.2.0'])},
- {name: 'next-major', tags: toTags(['1.0.0', '1.0.1', '1.0.2', '1.1.0', '1.2.0', '2.0.0', '2.0.1', '2.1.0'])},
+ { name: 'master', tags: toTags(['1.0.0', '1.0.1', '1.0.2']) },
+ {
+ name: 'next',
+ tags: toTags(['1.0.0', '1.0.1', '1.0.2', '1.1.0', '1.2.0']),
+ },
+ {
+ name: 'next-major',
+ tags: toTags([
+ '1.0.0',
+ '1.0.1',
+ '1.0.2',
+ '1.1.0',
+ '1.2.0',
+ '2.0.0',
+ '2.0.1',
+ '2.1.0',
+ ]),
+ },
];
t.deepEqual(
normalize
- .release({release})
- .map(({type, name, range, accept, channel, main}) => ({type, name, range, accept, channel, main})),
+ .release({ release })
+ .map(({ type, name, range, accept, channel, main }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ main,
+ })),
[
- {type: 'release', name: 'master', range: '>=1.0.2 <1.1.0', accept: ['patch'], channel: undefined, main: true},
+ {
+ type: 'release',
+ name: 'master',
+ range: '>=1.0.2 <1.1.0',
+ accept: ['patch'],
+ channel: undefined,
+ main: true,
+ },
{
type: 'release',
name: 'next',
@@ -222,14 +306,36 @@ test('Release branches - 3 release branches', (t) => {
test('Release branches - 2 release branches', (t) => {
const release = [
- {name: 'master', tags: toTags(['1.0.0', '1.0.1', '1.1.0', '1.1.1', '1.2.0'])},
- {name: 'next', tags: toTags(['1.0.0', '1.0.1', '1.1.0', '1.1.1', '1.2.0', '2.0.0', '2.0.1', '2.1.0'])},
+ {
+ name: 'master',
+ tags: toTags(['1.0.0', '1.0.1', '1.1.0', '1.1.1', '1.2.0']),
+ },
+ {
+ name: 'next',
+ tags: toTags([
+ '1.0.0',
+ '1.0.1',
+ '1.1.0',
+ '1.1.1',
+ '1.2.0',
+ '2.0.0',
+ '2.0.1',
+ '2.1.0',
+ ]),
+ },
];
t.deepEqual(
normalize
- .release({release})
- .map(({type, name, range, accept, channel, main}) => ({type, name, range, accept, channel, main})),
+ .release({ release })
+ .map(({ type, name, range, accept, channel, main }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ main,
+ })),
[
{
type: 'release',
@@ -252,28 +358,73 @@ test('Release branches - 2 release branches', (t) => {
});
test('Release branches - 1 release branches', (t) => {
- const release = [{name: 'master', tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0'])}];
+ const release = [
+ { name: 'master', tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0']) },
+ ];
t.deepEqual(
- normalize.release({release}).map(({type, name, range, accept, channel}) => ({type, name, range, accept, channel})),
- [{type: 'release', name: 'master', range: '>=1.2.0', accept: ['patch', 'minor', 'major'], channel: undefined}]
+ normalize
+ .release({ release })
+ .map(({ type, name, range, accept, channel }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ })),
+ [
+ {
+ type: 'release',
+ name: 'master',
+ range: '>=1.2.0',
+ accept: ['patch', 'minor', 'major'],
+ channel: undefined,
+ },
+ ]
);
});
test('Release branches - cap ranges to first release only present on following branch', (t) => {
const release = [
- {name: 'master', tags: toTags(['1.0.0', '1.1.0', '1.2.0', '2.0.0'])},
- {name: 'next', tags: toTags(['1.0.0', '1.1.0', '1.2.0', '2.0.0', '2.1.0'])},
- {name: 'next-major', tags: toTags(['1.0.0', '1.1.0', '1.2.0', '2.0.0', '2.1.0', '2.2.0'])},
+ { name: 'master', tags: toTags(['1.0.0', '1.1.0', '1.2.0', '2.0.0']) },
+ {
+ name: 'next',
+ tags: toTags(['1.0.0', '1.1.0', '1.2.0', '2.0.0', '2.1.0']),
+ },
+ {
+ name: 'next-major',
+ tags: toTags(['1.0.0', '1.1.0', '1.2.0', '2.0.0', '2.1.0', '2.2.0']),
+ },
];
t.deepEqual(
normalize
- .release({release})
- .map(({type, name, range, accept, channel, main}) => ({type, name, range, accept, channel, main})),
+ .release({ release })
+ .map(({ type, name, range, accept, channel, main }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ main,
+ })),
[
- {type: 'release', name: 'master', range: '>=2.0.0 <2.1.0', accept: ['patch'], channel: undefined, main: true},
- {type: 'release', name: 'next', range: '>=2.1.0 <2.2.0', accept: ['patch'], channel: 'next', main: false},
+ {
+ type: 'release',
+ name: 'master',
+ range: '>=2.0.0 <2.1.0',
+ accept: ['patch'],
+ channel: undefined,
+ main: true,
+ },
+ {
+ type: 'release',
+ name: 'next',
+ range: '>=2.1.0 <2.2.0',
+ accept: ['patch'],
+ channel: 'next',
+ main: false,
+ },
{
type: 'release',
name: 'next-major',
@@ -288,14 +439,24 @@ test('Release branches - cap ranges to first release only present on following b
test('Release branches - Handle missing previous tags in branch history', (t) => {
const release = [
- {name: 'master', tags: toTags(['1.0.0', '2.0.0'])},
- {name: 'next', tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0', '2.0.0'])},
+ { name: 'master', tags: toTags(['1.0.0', '2.0.0']) },
+ {
+ name: 'next',
+ tags: toTags(['1.0.0', '1.1.0', '1.1.1', '1.2.0', '2.0.0']),
+ },
];
t.deepEqual(
normalize
- .release({release})
- .map(({type, name, range, accept, channel, main}) => ({type, name, range, accept, channel, main})),
+ .release({ release })
+ .map(({ type, name, range, accept, channel, main }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ main,
+ })),
[
{
type: 'release',
@@ -319,15 +480,22 @@ test('Release branches - Handle missing previous tags in branch history', (t) =>
test('Release branches - limit releases on 2nd and 3rd branch based on 1st branch last release', (t) => {
const release = [
- {name: 'master', tags: toTags(['1.0.0', '1.1.0', '2.0.0', '3.0.0'])},
- {name: 'next', tags: toTags(['1.0.0', '1.1.0'])},
- {name: 'next-major', tags: toTags(['1.0.0', '1.1.0', '2.0.0'])},
+ { name: 'master', tags: toTags(['1.0.0', '1.1.0', '2.0.0', '3.0.0']) },
+ { name: 'next', tags: toTags(['1.0.0', '1.1.0']) },
+ { name: 'next-major', tags: toTags(['1.0.0', '1.1.0', '2.0.0']) },
];
t.deepEqual(
normalize
- .release({release})
- .map(({type, name, range, accept, channel, main}) => ({type, name, range, accept, channel, main})),
+ .release({ release })
+ .map(({ type, name, range, accept, channel, main }) => ({
+ type,
+ name,
+ range,
+ accept,
+ channel,
+ main,
+ })),
[
{
type: 'release',
@@ -359,39 +527,49 @@ test('Release branches - limit releases on 2nd and 3rd branch based on 1st branc
test('Prerelease branches', (t) => {
const prerelease = [
- {name: 'beta', channel: 'beta', prerelease: true, tags: []},
- {name: 'alpha', prerelease: 'preview', tags: []},
+ { name: 'beta', channel: 'beta', prerelease: true, tags: [] },
+ { name: 'alpha', prerelease: 'preview', tags: [] },
];
t.deepEqual(
- normalize.prerelease({prerelease}).map(({type, name, channel}) => ({type, name, channel})),
+ normalize
+ .prerelease({ prerelease })
+ .map(({ type, name, channel }) => ({ type, name, channel })),
[
- {type: 'prerelease', name: 'beta', channel: 'beta'},
- {type: 'prerelease', name: 'alpha', channel: 'alpha'},
+ { type: 'prerelease', name: 'beta', channel: 'beta' },
+ { type: 'prerelease', name: 'alpha', channel: 'alpha' },
]
);
});
test('Allow to set channel to "false" to prevent default', (t) => {
- const maintenance = [{name: '1.x', channel: false, tags: []}];
+ const maintenance = [{ name: '1.x', channel: false, tags: [] }];
const release = [
- {name: 'master', channel: false, tags: []},
- {name: 'next', channel: false, tags: []},
+ { name: 'master', channel: false, tags: [] },
+ { name: 'next', channel: false, tags: [] },
+ ];
+ const prerelease = [
+ { name: 'beta', channel: false, prerelease: true, tags: [] },
];
- const prerelease = [{name: 'beta', channel: false, prerelease: true, tags: []}];
t.deepEqual(
- normalize.maintenance({maintenance, release}).map(({name, channel}) => ({name, channel})),
- [{name: '1.x', channel: false}]
+ normalize
+ .maintenance({ maintenance, release })
+ .map(({ name, channel }) => ({ name, channel })),
+ [{ name: '1.x', channel: false }]
);
t.deepEqual(
- normalize.release({release}).map(({name, channel}) => ({name, channel})),
+ normalize
+ .release({ release })
+ .map(({ name, channel }) => ({ name, channel })),
[
- {name: 'master', channel: false},
- {name: 'next', channel: false},
+ { name: 'master', channel: false },
+ { name: 'next', channel: false },
]
);
t.deepEqual(
- normalize.prerelease({prerelease}).map(({name, channel}) => ({name, channel})),
- [{name: 'beta', channel: false}]
+ normalize
+ .prerelease({ prerelease })
+ .map(({ name, channel }) => ({ name, channel })),
+ [{ name: 'beta', channel: false }]
);
});
diff --git a/test/cli.test.js b/test/cli.test.js
index 90715a379a..319491b44c 100644
--- a/test/cli.test.js
+++ b/test/cli.test.js
@@ -1,8 +1,8 @@
const test = require('ava');
-const {escapeRegExp} = require('lodash');
+const { escapeRegExp } = require('lodash');
const proxyquire = require('proxyquire').noPreserveCache();
-const {stub} = require('sinon');
-const {SECRET_REPLACEMENT} = require('../lib/definitions/constants');
+const { stub } = require('sinon');
+const { SECRET_REPLACEMENT } = require('../lib/definitions/constants');
test.beforeEach((t) => {
t.context.logs = '';
@@ -63,7 +63,7 @@ test.serial('Pass options to semantic-release API', async (t) => {
'--debug',
'-d',
];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
+ const cli = proxyquire('../cli', { '.': run, process: { ...process, argv } });
const exitCode = await cli();
@@ -86,43 +86,59 @@ test.serial('Pass options to semantic-release API', async (t) => {
t.is(exitCode, 0);
});
-test.serial('Pass options to semantic-release API with alias arguments', async (t) => {
+test.serial(
+ 'Pass options to semantic-release API with alias arguments',
+ async (t) => {
+ const run = stub().resolves(true);
+ const argv = [
+ '',
+ '',
+ '--branches',
+ 'master',
+ '--repository-url',
+ 'https://github/com/owner/repo.git',
+ '--tag-format',
+ `v\${version}`,
+ '--plugins',
+ 'plugin1',
+ 'plugin2',
+ '--extends',
+ 'config1',
+ 'config2',
+ '--dry-run',
+ ];
+ const cli = proxyquire('../cli', {
+ '.': run,
+ process: { ...process, argv },
+ });
+
+ const exitCode = await cli();
+
+ t.deepEqual(run.args[0][0].branches, ['master']);
+ t.is(run.args[0][0].repositoryUrl, 'https://github/com/owner/repo.git');
+ t.is(run.args[0][0].tagFormat, `v\${version}`);
+ t.deepEqual(run.args[0][0].plugins, ['plugin1', 'plugin2']);
+ t.deepEqual(run.args[0][0].extends, ['config1', 'config2']);
+ t.is(run.args[0][0].dryRun, true);
+
+ t.is(exitCode, 0);
+ }
+);
+
+test.serial('Pass unknown options to semantic-release API', async (t) => {
const run = stub().resolves(true);
const argv = [
'',
'',
- '--branches',
- 'master',
- '--repository-url',
- 'https://github/com/owner/repo.git',
- '--tag-format',
- `v\${version}`,
- '--plugins',
- 'plugin1',
- 'plugin2',
- '--extends',
- 'config1',
- 'config2',
- '--dry-run',
+ '--bool',
+ '--first-option',
+ 'value1',
+ '--second-option',
+ 'value2',
+ '--second-option',
+ 'value3',
];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
-
- const exitCode = await cli();
-
- t.deepEqual(run.args[0][0].branches, ['master']);
- t.is(run.args[0][0].repositoryUrl, 'https://github/com/owner/repo.git');
- t.is(run.args[0][0].tagFormat, `v\${version}`);
- t.deepEqual(run.args[0][0].plugins, ['plugin1', 'plugin2']);
- t.deepEqual(run.args[0][0].extends, ['config1', 'config2']);
- t.is(run.args[0][0].dryRun, true);
-
- t.is(exitCode, 0);
-});
-
-test.serial('Pass unknown options to semantic-release API', async (t) => {
- const run = stub().resolves(true);
- const argv = ['', '', '--bool', '--first-option', 'value1', '--second-option', 'value2', '--second-option', 'value3'];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
+ const cli = proxyquire('../cli', { '.': run, process: { ...process, argv } });
const exitCode = await cli();
@@ -133,39 +149,51 @@ test.serial('Pass unknown options to semantic-release API', async (t) => {
t.is(exitCode, 0);
});
-test.serial('Pass empty Array to semantic-release API for list option set to "false"', async (t) => {
- const run = stub().resolves(true);
- const argv = ['', '', '--publish', 'false'];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
-
- const exitCode = await cli();
-
- t.deepEqual(run.args[0][0].publish, []);
-
- t.is(exitCode, 0);
-});
-
-test.serial('Do not set properties in option for which arg is not in command line', async (t) => {
- const run = stub().resolves(true);
- const argv = ['', '', '-b', 'master'];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
-
- await cli();
-
- t.false('ci' in run.args[0][0]);
- t.false('d' in run.args[0][0]);
- t.false('dry-run' in run.args[0][0]);
- t.false('debug' in run.args[0][0]);
- t.false('r' in run.args[0][0]);
- t.false('t' in run.args[0][0]);
- t.false('p' in run.args[0][0]);
- t.false('e' in run.args[0][0]);
-});
+test.serial(
+ 'Pass empty Array to semantic-release API for list option set to "false"',
+ async (t) => {
+ const run = stub().resolves(true);
+ const argv = ['', '', '--publish', 'false'];
+ const cli = proxyquire('../cli', {
+ '.': run,
+ process: { ...process, argv },
+ });
+
+ const exitCode = await cli();
+
+ t.deepEqual(run.args[0][0].publish, []);
+
+ t.is(exitCode, 0);
+ }
+);
+
+test.serial(
+ 'Do not set properties in option for which arg is not in command line',
+ async (t) => {
+ const run = stub().resolves(true);
+ const argv = ['', '', '-b', 'master'];
+ const cli = proxyquire('../cli', {
+ '.': run,
+ process: { ...process, argv },
+ });
+
+ await cli();
+
+ t.false('ci' in run.args[0][0]);
+ t.false('d' in run.args[0][0]);
+ t.false('dry-run' in run.args[0][0]);
+ t.false('debug' in run.args[0][0]);
+ t.false('r' in run.args[0][0]);
+ t.false('t' in run.args[0][0]);
+ t.false('p' in run.args[0][0]);
+ t.false('e' in run.args[0][0]);
+ }
+);
test.serial('Display help', async (t) => {
const run = stub().resolves(true);
const argv = ['', '', '--help'];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
+ const cli = proxyquire('../cli', { '.': run, process: { ...process, argv } });
const exitCode = await cli();
@@ -173,49 +201,80 @@ test.serial('Display help', async (t) => {
t.is(exitCode, 0);
});
-test.serial('Return error exitCode and prints help if called with a command', async (t) => {
- const run = stub().resolves(true);
- const argv = ['', '', 'pre'];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
-
- const exitCode = await cli();
-
- t.regex(t.context.errors, /Run automated package publishing/);
- t.regex(t.context.errors, /Too many non-option arguments/);
- t.is(exitCode, 1);
-});
-
-test.serial('Return error exitCode if multiple plugin are set for single plugin', async (t) => {
- const run = stub().resolves(true);
- const argv = ['', '', '--analyze-commits', 'analyze1', 'analyze2'];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
-
- const exitCode = await cli();
-
- t.regex(t.context.errors, /Run automated package publishing/);
- t.regex(t.context.errors, /Too many non-option arguments/);
- t.is(exitCode, 1);
-});
-
-test.serial('Return error exitCode if semantic-release throw error', async (t) => {
- const run = stub().rejects(new Error('semantic-release error'));
- const argv = ['', ''];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv}});
-
- const exitCode = await cli();
-
- t.regex(t.context.errors, /semantic-release error/);
- t.is(exitCode, 1);
-});
-
-test.serial('Hide sensitive environment variable values from the logs', async (t) => {
- const env = {MY_TOKEN: 'secret token'};
- const run = stub().rejects(new Error(`Throw error: Exposing token ${env.MY_TOKEN}`));
- const argv = ['', ''];
- const cli = proxyquire('../cli', {'.': run, process: {...process, argv, env: {...process.env, ...env}}});
-
- const exitCode = await cli();
-
- t.regex(t.context.errors, new RegExp(`Throw error: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`));
- t.is(exitCode, 1);
-});
+test.serial(
+ 'Return error exitCode and prints help if called with a command',
+ async (t) => {
+ const run = stub().resolves(true);
+ const argv = ['', '', 'pre'];
+ const cli = proxyquire('../cli', {
+ '.': run,
+ process: { ...process, argv },
+ });
+
+ const exitCode = await cli();
+
+ t.regex(t.context.errors, /Run automated package publishing/);
+ t.regex(t.context.errors, /Too many non-option arguments/);
+ t.is(exitCode, 1);
+ }
+);
+
+test.serial(
+ 'Return error exitCode if multiple plugin are set for single plugin',
+ async (t) => {
+ const run = stub().resolves(true);
+ const argv = ['', '', '--analyze-commits', 'analyze1', 'analyze2'];
+ const cli = proxyquire('../cli', {
+ '.': run,
+ process: { ...process, argv },
+ });
+
+ const exitCode = await cli();
+
+ t.regex(t.context.errors, /Run automated package publishing/);
+ t.regex(t.context.errors, /Too many non-option arguments/);
+ t.is(exitCode, 1);
+ }
+);
+
+test.serial(
+ 'Return error exitCode if semantic-release throw error',
+ async (t) => {
+ const run = stub().rejects(new Error('semantic-release error'));
+ const argv = ['', ''];
+ const cli = proxyquire('../cli', {
+ '.': run,
+ process: { ...process, argv },
+ });
+
+ const exitCode = await cli();
+
+ t.regex(t.context.errors, /semantic-release error/);
+ t.is(exitCode, 1);
+ }
+);
+
+test.serial(
+ 'Hide sensitive environment variable values from the logs',
+ async (t) => {
+ const env = { MY_TOKEN: 'secret token' };
+ const run = stub().rejects(
+ new Error(`Throw error: Exposing token ${env.MY_TOKEN}`)
+ );
+ const argv = ['', ''];
+ const cli = proxyquire('../cli', {
+ '.': run,
+ process: { ...process, argv, env: { ...process.env, ...env } },
+ });
+
+ const exitCode = await cli();
+
+ t.regex(
+ t.context.errors,
+ new RegExp(
+ `Throw error: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`
+ )
+ );
+ t.is(exitCode, 1);
+ }
+);
diff --git a/test/definitions/branches.test.js b/test/definitions/branches.test.js
index 8ab6396dc3..d0b3072a51 100644
--- a/test/definitions/branches.test.js
+++ b/test/definitions/branches.test.js
@@ -1,86 +1,126 @@
const test = require('ava');
-const {maintenance, prerelease, release} = require('../../lib/definitions/branches');
+const {
+ maintenance,
+ prerelease,
+ release,
+} = require('../../lib/definitions/branches');
test('A "maintenance" branch is identified by having a "range" property or a "name" formatted like "N.x", "N.x.x" or "N.N.x"', (t) => {
- t.true(maintenance.filter({name: '1.x.x'}));
- t.true(maintenance.filter({name: '1.0.x'}));
- t.true(maintenance.filter({name: '1.x'}));
- t.true(maintenance.filter({name: 'some-name', range: '1.x.x'}));
- t.true(maintenance.filter({name: 'some-name', range: '1.1.x'}));
- t.true(maintenance.filter({name: 'some-name', range: ''}));
- t.true(maintenance.filter({name: 'some-name', range: true}));
-
- t.false(maintenance.filter({name: 'some-name', range: null}));
- t.false(maintenance.filter({name: 'some-name', range: false}));
- t.false(maintenance.filter({name: 'some-name'}));
- t.false(maintenance.filter({name: '1.0.0'}));
- t.false(maintenance.filter({name: 'x.x.x'}));
+ t.true(maintenance.filter({ name: '1.x.x' }));
+ t.true(maintenance.filter({ name: '1.0.x' }));
+ t.true(maintenance.filter({ name: '1.x' }));
+ t.true(maintenance.filter({ name: 'some-name', range: '1.x.x' }));
+ t.true(maintenance.filter({ name: 'some-name', range: '1.1.x' }));
+ t.true(maintenance.filter({ name: 'some-name', range: '' }));
+ t.true(maintenance.filter({ name: 'some-name', range: true }));
+
+ t.false(maintenance.filter({ name: 'some-name', range: null }));
+ t.false(maintenance.filter({ name: 'some-name', range: false }));
+ t.false(maintenance.filter({ name: 'some-name' }));
+ t.false(maintenance.filter({ name: '1.0.0' }));
+ t.false(maintenance.filter({ name: 'x.x.x' }));
});
test('A "maintenance" branches must have a "range" property formatted like "N.x", "N.x.x" or "N.N.x"', (t) => {
- t.true(maintenance.branchValidator({name: 'some-name', range: '1.x.x'}));
- t.true(maintenance.branchValidator({name: 'some-name', range: '1.1.x'}));
-
- t.false(maintenance.branchValidator({name: 'some-name', range: '^1.0.0'}));
- t.false(maintenance.branchValidator({name: 'some-name', range: '>=1.0.0 <2.0.0'}));
- t.false(maintenance.branchValidator({name: 'some-name', range: '1.0.0'}));
- t.false(maintenance.branchValidator({name: 'some-name', range: 'wrong-range'}));
- t.false(maintenance.branchValidator({name: 'some-name', range: true}));
- t.false(maintenance.branchValidator({name: 'some-name', range: ''}));
+ t.true(maintenance.branchValidator({ name: 'some-name', range: '1.x.x' }));
+ t.true(maintenance.branchValidator({ name: 'some-name', range: '1.1.x' }));
+
+ t.false(maintenance.branchValidator({ name: 'some-name', range: '^1.0.0' }));
+ t.false(
+ maintenance.branchValidator({ name: 'some-name', range: '>=1.0.0 <2.0.0' })
+ );
+ t.false(maintenance.branchValidator({ name: 'some-name', range: '1.0.0' }));
+ t.false(
+ maintenance.branchValidator({ name: 'some-name', range: 'wrong-range' })
+ );
+ t.false(maintenance.branchValidator({ name: 'some-name', range: true }));
+ t.false(maintenance.branchValidator({ name: 'some-name', range: '' }));
});
test('The "maintenance" branches must have unique ranges', (t) => {
- t.true(maintenance.branchesValidator([{range: '1.x.x'}, {range: '1.0.x'}]));
-
- t.false(maintenance.branchesValidator([{range: '1.x.x'}, {range: '1.x.x'}]));
- t.false(maintenance.branchesValidator([{range: '1.x.x'}, {range: '1.x'}]));
+ t.true(
+ maintenance.branchesValidator([{ range: '1.x.x' }, { range: '1.0.x' }])
+ );
+
+ t.false(
+ maintenance.branchesValidator([{ range: '1.x.x' }, { range: '1.x.x' }])
+ );
+ t.false(
+ maintenance.branchesValidator([{ range: '1.x.x' }, { range: '1.x' }])
+ );
});
test('A "prerelease" branch is identified by having a thruthy "prerelease" property', (t) => {
- t.true(prerelease.filter({name: 'some-name', prerelease: true}));
- t.true(prerelease.filter({name: 'some-name', prerelease: 'beta'}));
- t.true(prerelease.filter({name: 'some-name', prerelease: ''}));
+ t.true(prerelease.filter({ name: 'some-name', prerelease: true }));
+ t.true(prerelease.filter({ name: 'some-name', prerelease: 'beta' }));
+ t.true(prerelease.filter({ name: 'some-name', prerelease: '' }));
- t.false(prerelease.filter({name: 'some-name', prerelease: null}));
- t.false(prerelease.filter({name: 'some-name', prerelease: false}));
- t.false(prerelease.filter({name: 'some-name'}));
+ t.false(prerelease.filter({ name: 'some-name', prerelease: null }));
+ t.false(prerelease.filter({ name: 'some-name', prerelease: false }));
+ t.false(prerelease.filter({ name: 'some-name' }));
});
test('A "prerelease" branch must have a valid prerelease detonation in "prerelease" property or in "name" if "prerelease" is "true"', (t) => {
- t.true(prerelease.branchValidator({name: 'beta', prerelease: true}));
- t.true(prerelease.branchValidator({name: 'some-name', prerelease: 'beta'}));
-
- t.false(prerelease.branchValidator({name: 'some-name', prerelease: ''}));
- t.false(prerelease.branchValidator({name: 'some-name', prerelease: null}));
- t.false(prerelease.branchValidator({name: 'some-name', prerelease: false}));
- t.false(prerelease.branchValidator({name: 'some-name', prerelease: '000'}));
- t.false(prerelease.branchValidator({name: 'some-name', prerelease: '#beta'}));
- t.false(prerelease.branchValidator({name: '000', prerelease: true}));
- t.false(prerelease.branchValidator({name: '#beta', prerelease: true}));
+ t.true(prerelease.branchValidator({ name: 'beta', prerelease: true }));
+ t.true(prerelease.branchValidator({ name: 'some-name', prerelease: 'beta' }));
+
+ t.false(prerelease.branchValidator({ name: 'some-name', prerelease: '' }));
+ t.false(prerelease.branchValidator({ name: 'some-name', prerelease: null }));
+ t.false(prerelease.branchValidator({ name: 'some-name', prerelease: false }));
+ t.false(prerelease.branchValidator({ name: 'some-name', prerelease: '000' }));
+ t.false(
+ prerelease.branchValidator({ name: 'some-name', prerelease: '#beta' })
+ );
+ t.false(prerelease.branchValidator({ name: '000', prerelease: true }));
+ t.false(prerelease.branchValidator({ name: '#beta', prerelease: true }));
});
test('The "prerelease" branches must have unique "prerelease" property', (t) => {
- t.true(prerelease.branchesValidator([{prerelease: 'beta'}, {prerelease: 'alpha'}]));
-
- t.false(prerelease.branchesValidator([{range: 'beta'}, {range: 'beta'}, {range: 'alpha'}]));
+ t.true(
+ prerelease.branchesValidator([
+ { prerelease: 'beta' },
+ { prerelease: 'alpha' },
+ ])
+ );
+
+ t.false(
+ prerelease.branchesValidator([
+ { range: 'beta' },
+ { range: 'beta' },
+ { range: 'alpha' },
+ ])
+ );
});
test('A "release" branch is identified by not havin a "range" or "prerelease" property or a "name" formatted like "N.x", "N.x.x" or "N.N.x"', (t) => {
- t.true(release.filter({name: 'some-name'}));
-
- t.false(release.filter({name: '1.x.x'}));
- t.false(release.filter({name: '1.0.x'}));
- t.false(release.filter({name: 'some-name', range: '1.x.x'}));
- t.false(release.filter({name: 'some-name', range: '1.1.x'}));
- t.false(release.filter({name: 'some-name', prerelease: true}));
- t.false(release.filter({name: 'some-name', prerelease: 'beta'}));
+ t.true(release.filter({ name: 'some-name' }));
+
+ t.false(release.filter({ name: '1.x.x' }));
+ t.false(release.filter({ name: '1.0.x' }));
+ t.false(release.filter({ name: 'some-name', range: '1.x.x' }));
+ t.false(release.filter({ name: 'some-name', range: '1.1.x' }));
+ t.false(release.filter({ name: 'some-name', prerelease: true }));
+ t.false(release.filter({ name: 'some-name', prerelease: 'beta' }));
});
test('There must be between 1 and 3 release branches', (t) => {
- t.true(release.branchesValidator([{name: 'branch1'}]));
- t.true(release.branchesValidator([{name: 'branch1'}, {name: 'branch2'}]));
- t.true(release.branchesValidator([{name: 'branch1'}, {name: 'branch2'}, {name: 'branch3'}]));
+ t.true(release.branchesValidator([{ name: 'branch1' }]));
+ t.true(release.branchesValidator([{ name: 'branch1' }, { name: 'branch2' }]));
+ t.true(
+ release.branchesValidator([
+ { name: 'branch1' },
+ { name: 'branch2' },
+ { name: 'branch3' },
+ ])
+ );
t.false(release.branchesValidator([]));
- t.false(release.branchesValidator([{name: 'branch1'}, {name: 'branch2'}, {name: 'branch3'}, {name: 'branch4'}]));
+ t.false(
+ release.branchesValidator([
+ { name: 'branch1' },
+ { name: 'branch2' },
+ { name: 'branch3' },
+ { name: 'branch4' },
+ ])
+ );
});
diff --git a/test/definitions/plugins.test.js b/test/definitions/plugins.test.js
index 4b72cca6fe..51af669bf2 100644
--- a/test/definitions/plugins.test.js
+++ b/test/definitions/plugins.test.js
@@ -1,6 +1,9 @@
const test = require('ava');
const plugins = require('../../lib/definitions/plugins');
-const {RELEASE_NOTES_SEPARATOR, SECRET_REPLACEMENT} = require('../../lib/definitions/constants');
+const {
+ RELEASE_NOTES_SEPARATOR,
+ SECRET_REPLACEMENT,
+} = require('../../lib/definitions/constants');
test('The "analyzeCommits" plugin output must be either undefined or a valid semver release type', (t) => {
t.false(plugins.analyzeCommits.outputValidator('invalid'));
@@ -44,20 +47,29 @@ test('The "addChannel" plugin output, if defined, must be an object', (t) => {
});
test('The "generateNotes" plugins output are concatenated with separator and sensitive data is hidden', (t) => {
- const env = {MY_TOKEN: 'secret token'};
- t.is(plugins.generateNotes.postprocess(['note 1', 'note 2'], {env}), `note 1${RELEASE_NOTES_SEPARATOR}note 2`);
- t.is(plugins.generateNotes.postprocess(['', 'note'], {env}), 'note');
- t.is(plugins.generateNotes.postprocess([undefined, 'note'], {env}), 'note');
- t.is(plugins.generateNotes.postprocess(['note 1', '', 'note 2'], {env}), `note 1${RELEASE_NOTES_SEPARATOR}note 2`);
+ const env = { MY_TOKEN: 'secret token' };
t.is(
- plugins.generateNotes.postprocess(['note 1', undefined, 'note 2'], {env}),
+ plugins.generateNotes.postprocess(['note 1', 'note 2'], { env }),
+ `note 1${RELEASE_NOTES_SEPARATOR}note 2`
+ );
+ t.is(plugins.generateNotes.postprocess(['', 'note'], { env }), 'note');
+ t.is(plugins.generateNotes.postprocess([undefined, 'note'], { env }), 'note');
+ t.is(
+ plugins.generateNotes.postprocess(['note 1', '', 'note 2'], { env }),
+ `note 1${RELEASE_NOTES_SEPARATOR}note 2`
+ );
+ t.is(
+ plugins.generateNotes.postprocess(['note 1', undefined, 'note 2'], { env }),
`note 1${RELEASE_NOTES_SEPARATOR}note 2`
);
t.is(
plugins.generateNotes.postprocess(
- [`Note 1: Exposing token ${env.MY_TOKEN}`, `Note 2: Exposing token ${SECRET_REPLACEMENT}`],
- {env}
+ [
+ `Note 1: Exposing token ${env.MY_TOKEN}`,
+ `Note 2: Exposing token ${SECRET_REPLACEMENT}`,
+ ],
+ { env }
),
`Note 1: Exposing token ${SECRET_REPLACEMENT}${RELEASE_NOTES_SEPARATOR}Note 2: Exposing token ${SECRET_REPLACEMENT}`
);
diff --git a/test/fixtures/plugin-log-env.js b/test/fixtures/plugin-log-env.js
index cccd82ca54..c642a89626 100644
--- a/test/fixtures/plugin-log-env.js
+++ b/test/fixtures/plugin-log-env.js
@@ -1,4 +1,4 @@
-module.exports = (pluginConfig, {env, logger}) => {
+module.exports = (pluginConfig, { env, logger }) => {
console.log(`Console: Exposing token ${env.MY_TOKEN}`);
logger.log(`Log: Exposing token ${env.MY_TOKEN}`);
logger.error(`Error: Console token ${env.MY_TOKEN}`);
diff --git a/test/fixtures/plugin-result-config.js b/test/fixtures/plugin-result-config.js
index 1e85ec782c..76802898a9 100644
--- a/test/fixtures/plugin-result-config.js
+++ b/test/fixtures/plugin-result-config.js
@@ -1 +1 @@
-module.exports = (pluginConfig, context) => ({pluginConfig, context});
+module.exports = (pluginConfig, context) => ({ pluginConfig, context });
diff --git a/test/get-commits.test.js b/test/get-commits.test.js
index 61c9b4c834..f0439abf35 100644
--- a/test/get-commits.test.js
+++ b/test/get-commits.test.js
@@ -1,23 +1,27 @@
const test = require('ava');
-const {stub} = require('sinon');
+const { stub } = require('sinon');
const getCommits = require('../lib/get-commits');
-const {gitRepo, gitCommits, gitDetachedHead} = require('./helpers/git-utils');
+const { gitRepo, gitCommits, gitDetachedHead } = require('./helpers/git-utils');
test.beforeEach((t) => {
// Stub the logger functions
t.context.log = stub();
t.context.error = stub();
- t.context.logger = {log: t.context.log, error: t.context.error};
+ t.context.logger = { log: t.context.log, error: t.context.error };
});
test('Get all commits when there is no last release', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First', 'Second'], {cwd});
+ const commits = await gitCommits(['First', 'Second'], { cwd });
// Retrieve the commits with the commits module
- const result = await getCommits({cwd, lastRelease: {}, logger: t.context.logger});
+ const result = await getCommits({
+ cwd,
+ lastRelease: {},
+ logger: t.context.logger,
+ });
// Verify the commits created and retrieved by the module are identical
t.is(result.length, 2);
@@ -26,14 +30,14 @@ test('Get all commits when there is no last release', async (t) => {
test('Get all commits since gitHead (from lastRelease)', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First', 'Second', 'Third'], {cwd});
+ const commits = await gitCommits(['First', 'Second', 'Third'], { cwd });
// Retrieve the commits with the commits module, since commit 'First'
const result = await getCommits({
cwd,
- lastRelease: {gitHead: commits[commits.length - 1].hash},
+ lastRelease: { gitHead: commits[commits.length - 1].hash },
logger: t.context.logger,
});
@@ -44,16 +48,16 @@ test('Get all commits since gitHead (from lastRelease)', async (t) => {
test('Get all commits since gitHead (from lastRelease) on a detached head repo', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- let {cwd, repositoryUrl} = await gitRepo();
+ let { cwd, repositoryUrl } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First', 'Second', 'Third'], {cwd});
+ const commits = await gitCommits(['First', 'Second', 'Third'], { cwd });
// Create a detached head repo at commit 'feat: Second'
cwd = await gitDetachedHead(repositoryUrl, commits[1].hash);
// Retrieve the commits with the commits module, since commit 'First'
const result = await getCommits({
cwd,
- lastRelease: {gitHead: commits[commits.length - 1].hash},
+ lastRelease: { gitHead: commits[commits.length - 1].hash },
logger: t.context.logger,
});
@@ -68,15 +72,15 @@ test('Get all commits since gitHead (from lastRelease) on a detached head repo',
test('Get all commits between lastRelease.gitHead and a shas', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First', 'Second', 'Third'], {cwd});
+ const commits = await gitCommits(['First', 'Second', 'Third'], { cwd });
// Retrieve the commits with the commits module, between commit 'First' and 'Third'
const result = await getCommits({
cwd,
- lastRelease: {gitHead: commits[commits.length - 1].hash},
- nextRelease: {gitHead: commits[1].hash},
+ lastRelease: { gitHead: commits[commits.length - 1].hash },
+ nextRelease: { gitHead: commits[1].hash },
logger: t.context.logger,
});
@@ -87,14 +91,14 @@ test('Get all commits between lastRelease.gitHead and a shas', async (t) => {
test('Return empty array if lastRelease.gitHead is the last commit', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First', 'Second'], {cwd});
+ const commits = await gitCommits(['First', 'Second'], { cwd });
// Retrieve the commits with the commits module, since commit 'Second' (therefore none)
const result = await getCommits({
cwd,
- lastRelease: {gitHead: commits[0].hash},
+ lastRelease: { gitHead: commits[0].hash },
logger: t.context.logger,
});
@@ -104,10 +108,14 @@ test('Return empty array if lastRelease.gitHead is the last commit', async (t) =
test('Return empty array if there is no commits', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Retrieve the commits with the commits module
- const result = await getCommits({cwd, lastRelease: {}, logger: t.context.logger});
+ const result = await getCommits({
+ cwd,
+ lastRelease: {},
+ logger: t.context.logger,
+ });
// Verify no commit is retrieved
t.deepEqual(result, []);
@@ -123,15 +131,15 @@ test('Get all commits under a path when there is no last release ', async (t) =>
* */
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- await gitCommits(['First', 'Second'], {cwd});
+ await gitCommits(['First', 'Second'], { cwd });
// Retrieve the commits with the commits module
const result = await getCommits({
cwd,
lastRelease: {},
logger: t.context.logger,
- options: {commitPaths: ['i/dont/exist/*', 'still/dont/exist/*']},
+ options: { commitPaths: ['i/dont/exist/*', 'still/dont/exist/*'] },
});
// Verify the commits created and retrieved by the module are identical
diff --git a/test/get-config.test.js b/test/get-config.test.js
index 28a9ec6297..095e160b90 100644
--- a/test/get-config.test.js
+++ b/test/get-config.test.js
@@ -1,12 +1,18 @@
const path = require('path');
-const {format} = require('util');
+const { format } = require('util');
const test = require('ava');
-const {writeFile, outputJson} = require('fs-extra');
-const {omit} = require('lodash');
+const { writeFile, outputJson } = require('fs-extra');
+const { omit } = require('lodash');
const proxyquire = require('proxyquire');
-const {stub} = require('sinon');
+const { stub } = require('sinon');
const yaml = require('js-yaml');
-const {gitRepo, gitTagVersion, gitCommits, gitShallowClone, gitAddConfig} = require('./helpers/git-utils');
+const {
+ gitRepo,
+ gitTagVersion,
+ gitCommits,
+ gitShallowClone,
+ gitAddConfig,
+} = require('./helpers/git-utils');
const DEFAULT_PLUGINS = [
'@semantic-release/commit-analyzer',
@@ -17,22 +23,26 @@ const DEFAULT_PLUGINS = [
test.beforeEach((t) => {
t.context.plugins = stub().returns({});
- t.context.getConfig = proxyquire('../lib/get-config', {'./plugins': t.context.plugins});
+ t.context.getConfig = proxyquire('../lib/get-config', {
+ './plugins': t.context.plugins,
+ });
});
test('Default values, reading repositoryUrl from package.json', async (t) => {
- const pkg = {repository: 'https://host.null/owner/package.git'};
+ const pkg = { repository: 'https://host.null/owner/package.git' };
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
+ const { cwd } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
// Add remote.origin.url config
- await gitAddConfig('remote.origin.url', 'git@host.null:owner/repo.git', {cwd});
+ await gitAddConfig('remote.origin.url', 'git@host.null:owner/repo.git', {
+ cwd,
+ });
// Create package.json in repository root
await outputJson(path.resolve(cwd, 'package.json'), pkg);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
// Verify the default options are set
t.deepEqual(result.branches, [
@@ -40,8 +50,8 @@ test('Default values, reading repositoryUrl from package.json', async (t) => {
'master',
'next',
'next-major',
- {name: 'beta', prerelease: true},
- {name: 'alpha', prerelease: true},
+ { name: 'beta', prerelease: true },
+ { name: 'alpha', prerelease: true },
]);
t.is(result.repositoryUrl, 'https://host.null/owner/package.git');
t.is(result.tagFormat, `v\${version}`);
@@ -49,11 +59,15 @@ test('Default values, reading repositoryUrl from package.json', async (t) => {
test('Default values, reading repositoryUrl from repo if not set in package.json', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo(true);
+ const { cwd } = await gitRepo(true);
// Add remote.origin.url config
- await gitAddConfig('remote.origin.url', 'https://host.null/owner/module.git', {cwd});
+ await gitAddConfig(
+ 'remote.origin.url',
+ 'https://host.null/owner/module.git',
+ { cwd }
+ );
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
// Verify the default options are set
t.deepEqual(result.branches, [
@@ -61,21 +75,21 @@ test('Default values, reading repositoryUrl from repo if not set in package.json
'master',
'next',
'next-major',
- {name: 'beta', prerelease: true},
- {name: 'alpha', prerelease: true},
+ { name: 'beta', prerelease: true },
+ { name: 'alpha', prerelease: true },
]);
t.is(result.repositoryUrl, 'https://host.null/owner/module.git');
t.is(result.tagFormat, `v\${version}`);
});
test('Default values, reading repositoryUrl (http url) from package.json if not set in repo', async (t) => {
- const pkg = {repository: 'https://host.null/owner/module.git'};
+ const pkg = { repository: 'https://host.null/owner/module.git' };
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Create package.json in repository root
await outputJson(path.resolve(cwd, 'package.json'), pkg);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
// Verify the default options are set
t.deepEqual(result.branches, [
@@ -83,30 +97,33 @@ test('Default values, reading repositoryUrl (http url) from package.json if not
'master',
'next',
'next-major',
- {name: 'beta', prerelease: true},
- {name: 'alpha', prerelease: true},
+ { name: 'beta', prerelease: true },
+ { name: 'alpha', prerelease: true },
]);
t.is(result.repositoryUrl, 'https://host.null/owner/module.git');
t.is(result.tagFormat, `v\${version}`);
});
test('Convert "ci" option to "noCi"', async (t) => {
- const pkg = {repository: 'https://host.null/owner/module.git', release: {ci: false}};
+ const pkg = {
+ repository: 'https://host.null/owner/module.git',
+ release: { ci: false },
+ };
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Create package.json in repository root
await outputJson(path.resolve(cwd, 'package.json'), pkg);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
t.is(result.noCi, true);
});
test('Read options from package.json', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
generateNotes: 'generateNotes',
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
@@ -114,22 +131,22 @@ test('Read options from package.json', async (t) => {
plugins: false,
};
// Create package.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: options});
+ await outputJson(path.resolve(cwd, 'package.json'), { release: options });
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from package.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from package.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Read options from .releaserc.yml', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
tagFormat: `v\${version}`,
@@ -138,20 +155,20 @@ test('Read options from .releaserc.yml', async (t) => {
// Create package.json in repository root
await writeFile(path.resolve(cwd, '.releaserc.yml'), yaml.dump(options));
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from package.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from package.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Read options from .releaserc.json', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
tagFormat: `v\${version}`,
@@ -160,156 +177,171 @@ test('Read options from .releaserc.json', async (t) => {
// Create package.json in repository root
await outputJson(path.resolve(cwd, '.releaserc.json'), options);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from package.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from package.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Read options from .releaserc.js', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
tagFormat: `v\${version}`,
plugins: false,
};
// Create package.json in repository root
- await writeFile(path.resolve(cwd, '.releaserc.js'), `module.exports = ${JSON.stringify(options)}`);
+ await writeFile(
+ path.resolve(cwd, '.releaserc.js'),
+ `module.exports = ${JSON.stringify(options)}`
+ );
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from package.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from package.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Read options from .releaserc.cjs', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
tagFormat: `v\${version}`,
plugins: false,
};
// Create .releaserc.cjs in repository root
- await writeFile(path.resolve(cwd, '.releaserc.cjs'), `module.exports = ${JSON.stringify(options)}`);
+ await writeFile(
+ path.resolve(cwd, '.releaserc.cjs'),
+ `module.exports = ${JSON.stringify(options)}`
+ );
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from .releaserc.cjs
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from .releaserc.cjs
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Read options from release.config.js', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
tagFormat: `v\${version}`,
plugins: false,
};
// Create package.json in repository root
- await writeFile(path.resolve(cwd, 'release.config.js'), `module.exports = ${JSON.stringify(options)}`);
+ await writeFile(
+ path.resolve(cwd, 'release.config.js'),
+ `module.exports = ${JSON.stringify(options)}`
+ );
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from package.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from package.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Read options from release.config.cjs', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
tagFormat: `v\${version}`,
plugins: false,
};
// Create release.config.cjs in repository root
- await writeFile(path.resolve(cwd, 'release.config.cjs'), `module.exports = ${JSON.stringify(options)}`);
+ await writeFile(
+ path.resolve(cwd, 'release.config.cjs'),
+ `module.exports = ${JSON.stringify(options)}`
+ );
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from release.config.cjs
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from release.config.cjs
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Prioritise CLI/API parameters over file configuration and git repo', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- let {cwd, repositoryUrl} = await gitRepo();
- await gitCommits(['First'], {cwd});
+ let { cwd, repositoryUrl } = await gitRepo();
+ await gitCommits(['First'], { cwd });
// Create a clone
cwd = await gitShallowClone(repositoryUrl);
const pkgOptions = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_pkg'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_pkg' },
branches: ['branch_pkg'],
};
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_cli'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_cli' },
branches: ['branch_cli'],
repositoryUrl: 'http://cli-url.com/owner/package',
tagFormat: `cli\${version}`,
plugins: false,
};
- const pkg = {release: pkgOptions, repository: 'git@host.null:owner/module.git'};
+ const pkg = {
+ release: pkgOptions,
+ repository: 'git@host.null:owner/module.git',
+ };
// Create package.json in repository root
await outputJson(path.resolve(cwd, 'package.json'), pkg);
- const result = await t.context.getConfig({cwd}, options);
+ const result = await t.context.getConfig({ cwd }, options);
- const expected = {...options, branches: ['branch_cli']};
+ const expected = { ...options, branches: ['branch_cli'] };
// Verify the options contains the plugin config from CLI/API
t.deepEqual(result.options, expected);
// Verify the plugins module is called with the plugin options from CLI/API
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Read configuration from file path in "extends"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
- const pkgOptions = {extends: './shareable.json'};
+ const { cwd } = await gitRepo();
+ const pkgOptions = { extends: './shareable.json' };
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
generateNotes: 'generateNotes',
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
tagFormat: `v\${version}`,
- plugins: ['plugin-1', ['plugin-2', {plugin2Opt: 'value'}]],
+ plugins: ['plugin-1', ['plugin-2', { plugin2Opt: 'value' }]],
};
// Create package.json and shareable.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: pkgOptions});
+ await outputJson(path.resolve(cwd, 'package.json'), { release: pkgOptions });
await outputJson(path.resolve(cwd, 'shareable.json'), options);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from shareable.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from shareable.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
t.deepEqual(t.context.plugins.args[0][1], {
analyzeCommits: './shareable.json',
generateNotes: './shareable.json',
@@ -320,10 +352,10 @@ test('Read configuration from file path in "extends"', async (t) => {
test('Read configuration from module path in "extends"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
- const pkgOptions = {extends: 'shareable'};
+ const { cwd } = await gitRepo();
+ const pkgOptions = { extends: 'shareable' };
const options = {
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
generateNotes: 'generateNotes',
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
@@ -331,16 +363,19 @@ test('Read configuration from module path in "extends"', async (t) => {
plugins: false,
};
// Create package.json and shareable.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: pkgOptions});
- await outputJson(path.resolve(cwd, 'node_modules/shareable/index.json'), options);
+ await outputJson(path.resolve(cwd, 'package.json'), { release: pkgOptions });
+ await outputJson(
+ path.resolve(cwd, 'node_modules/shareable/index.json'),
+ options
+ );
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options, branches: ['test_branch']};
+ const expected = { ...options, branches: ['test_branch'] };
// Verify the options contains the plugin config from shareable.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from shareable.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
t.deepEqual(t.context.plugins.args[0][1], {
analyzeCommits: 'shareable',
generateNotes: 'shareable',
@@ -349,34 +384,34 @@ test('Read configuration from module path in "extends"', async (t) => {
test('Read configuration from an array of paths in "extends"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
- const pkgOptions = {extends: ['./shareable1.json', './shareable2.json']};
+ const { cwd } = await gitRepo();
+ const pkgOptions = { extends: ['./shareable1.json', './shareable2.json'] };
const options1 = {
verifyRelease: 'verifyRelease1',
- analyzeCommits: {path: 'analyzeCommits1', param: 'analyzeCommits_param1'},
+ analyzeCommits: { path: 'analyzeCommits1', param: 'analyzeCommits_param1' },
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
};
const options2 = {
verifyRelease: 'verifyRelease2',
generateNotes: 'generateNotes2',
- analyzeCommits: {path: 'analyzeCommits2', param: 'analyzeCommits_param2'},
+ analyzeCommits: { path: 'analyzeCommits2', param: 'analyzeCommits_param2' },
branches: ['test_branch'],
tagFormat: `v\${version}`,
plugins: false,
};
// Create package.json and shareable.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: pkgOptions});
+ await outputJson(path.resolve(cwd, 'package.json'), { release: pkgOptions });
await outputJson(path.resolve(cwd, 'shareable1.json'), options1);
await outputJson(path.resolve(cwd, 'shareable2.json'), options2);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = {...options1, ...options2, branches: ['test_branch']};
+ const expected = { ...options1, ...options2, branches: ['test_branch'] };
// Verify the options contains the plugin config from shareable1.json and shareable2.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from shareable1.json and shareable2.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
t.deepEqual(t.context.plugins.args[0][1], {
verifyRelease1: './shareable1.json',
verifyRelease2: './shareable2.json',
@@ -388,33 +423,36 @@ test('Read configuration from an array of paths in "extends"', async (t) => {
test('Prioritize configuration from config file over "extends"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const pkgOptions = {
extends: './shareable.json',
branches: ['test_pkg'],
generateNotes: 'generateNotes',
- publish: [{path: 'publishPkg', param: 'publishPkg_param'}],
+ publish: [{ path: 'publishPkg', param: 'publishPkg_param' }],
};
const options1 = {
analyzeCommits: 'analyzeCommits',
generateNotes: 'generateNotesShareable',
- publish: [{path: 'publishShareable', param: 'publishShareable_param'}],
+ publish: [{ path: 'publishShareable', param: 'publishShareable_param' }],
branches: ['test_branch'],
repositoryUrl: 'https://host.null/owner/module.git',
tagFormat: `v\${version}`,
plugins: false,
};
// Create package.json and shareable.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: pkgOptions});
+ await outputJson(path.resolve(cwd, 'package.json'), { release: pkgOptions });
await outputJson(path.resolve(cwd, 'shareable.json'), options1);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
- const expected = omit({...options1, ...pkgOptions, branches: ['test_pkg']}, 'extends');
+ const expected = omit(
+ { ...options1, ...pkgOptions, branches: ['test_pkg'] },
+ 'extends'
+ );
// Verify the options contains the plugin config from package.json and shareable.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from package.json and shareable.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
t.deepEqual(t.context.plugins.args[0][1], {
analyzeCommits: './shareable.json',
generateNotesShareable: './shareable.json',
@@ -424,50 +462,53 @@ test('Prioritize configuration from config file over "extends"', async (t) => {
test('Prioritize configuration from cli/API options over "extends"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const cliOptions = {
extends: './shareable2.json',
branches: ['branch_opts'],
- publish: [{path: 'publishOpts', param: 'publishOpts_param'}],
+ publish: [{ path: 'publishOpts', param: 'publishOpts_param' }],
repositoryUrl: 'https://host.null/owner/module.git',
};
const pkgOptions = {
extends: './shareable1.json',
branches: ['branch_pkg'],
generateNotes: 'generateNotes',
- publish: [{path: 'publishPkg', param: 'publishPkg_param'}],
+ publish: [{ path: 'publishPkg', param: 'publishPkg_param' }],
};
const options1 = {
analyzeCommits: 'analyzeCommits1',
generateNotes: 'generateNotesShareable1',
- publish: [{path: 'publishShareable', param: 'publishShareable_param1'}],
+ publish: [{ path: 'publishShareable', param: 'publishShareable_param1' }],
branches: ['test_branch1'],
repositoryUrl: 'https://host.null/owner/module.git',
};
const options2 = {
analyzeCommits: 'analyzeCommits2',
- publish: [{path: 'publishShareable', param: 'publishShareable_param2'}],
+ publish: [{ path: 'publishShareable', param: 'publishShareable_param2' }],
branches: ['test_branch2'],
tagFormat: `v\${version}`,
plugins: false,
};
// Create package.json, shareable1.json and shareable2.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: pkgOptions});
+ await outputJson(path.resolve(cwd, 'package.json'), { release: pkgOptions });
await outputJson(path.resolve(cwd, 'shareable1.json'), options1);
await outputJson(path.resolve(cwd, 'shareable2.json'), options2);
- const {options: result} = await t.context.getConfig({cwd}, cliOptions);
+ const { options: result } = await t.context.getConfig({ cwd }, cliOptions);
- const expected = omit({...options2, ...pkgOptions, ...cliOptions, branches: ['branch_opts']}, 'extends');
+ const expected = omit(
+ { ...options2, ...pkgOptions, ...cliOptions, branches: ['branch_opts'] },
+ 'extends'
+ );
// Verify the options contains the plugin config from package.json and shareable2.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from package.json and shareable2.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
});
test('Allow to unset properties defined in shareable config with "null"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const pkgOptions = {
extends: './shareable.json',
analyzeCommits: null,
@@ -477,15 +518,15 @@ test('Allow to unset properties defined in shareable config with "null"', async
};
const options1 = {
generateNotes: 'generateNotes',
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
tagFormat: `v\${version}`,
plugins: ['test-plugin'],
};
// Create package.json and shareable.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: pkgOptions});
+ await outputJson(path.resolve(cwd, 'package.json'), { release: pkgOptions });
await outputJson(path.resolve(cwd, 'shareable.json'), options1);
- const {options} = await t.context.getConfig({cwd});
+ const { options } = await t.context.getConfig({ cwd });
// Verify the options contains the plugin config from shareable.json and the default `plugins`
t.deepEqual(options, {
@@ -512,7 +553,7 @@ test('Allow to unset properties defined in shareable config with "null"', async
test('Allow to unset properties defined in shareable config with "undefined"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const pkgOptions = {
extends: './shareable.json',
analyzeCommits: undefined,
@@ -521,15 +562,18 @@ test('Allow to unset properties defined in shareable config with "undefined"', a
};
const options1 = {
generateNotes: 'generateNotes',
- analyzeCommits: {path: 'analyzeCommits', param: 'analyzeCommits_param'},
+ analyzeCommits: { path: 'analyzeCommits', param: 'analyzeCommits_param' },
tagFormat: `v\${version}`,
plugins: false,
};
// Create package.json and release.config.js in repository root
- await writeFile(path.resolve(cwd, 'release.config.js'), `module.exports = ${format(pkgOptions)}`);
+ await writeFile(
+ path.resolve(cwd, 'release.config.js'),
+ `module.exports = ${format(pkgOptions)}`
+ );
await outputJson(path.resolve(cwd, 'shareable.json'), options1);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
const expected = {
...omit(options1, 'analyzeCommits'),
@@ -539,7 +583,7 @@ test('Allow to unset properties defined in shareable config with "undefined"', a
// Verify the options contains the plugin config from shareable.json
t.deepEqual(result, expected);
// Verify the plugins module is called with the plugin options from shareable.json
- t.deepEqual(t.context.plugins.args[0][0], {options: expected, cwd});
+ t.deepEqual(t.context.plugins.args[0][0], { options: expected, cwd });
t.deepEqual(t.context.plugins.args[0][1], {
generateNotes: './shareable.json',
analyzeCommits: './shareable.json',
@@ -548,14 +592,14 @@ test('Allow to unset properties defined in shareable config with "undefined"', a
test('Throw an Error if one of the shareable config cannot be found', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
- const pkgOptions = {extends: ['./shareable1.json', 'non-existing-path']};
- const options1 = {analyzeCommits: 'analyzeCommits'};
+ const { cwd } = await gitRepo();
+ const pkgOptions = { extends: ['./shareable1.json', 'non-existing-path'] };
+ const options1 = { analyzeCommits: 'analyzeCommits' };
// Create package.json and shareable.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: pkgOptions});
+ await outputJson(path.resolve(cwd, 'package.json'), { release: pkgOptions });
await outputJson(path.resolve(cwd, 'shareable1.json'), options1);
- await t.throwsAsync(t.context.getConfig({cwd}), {
+ await t.throwsAsync(t.context.getConfig({ cwd }), {
message: /Cannot find module 'non-existing-path'/,
code: 'MODULE_NOT_FOUND',
});
@@ -563,16 +607,16 @@ test('Throw an Error if one of the shareable config cannot be found', async (t)
test('Convert "ci" option to "noCi" when set from extended config', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
- const pkgOptions = {extends: './no-ci.json'};
+ const { cwd } = await gitRepo();
+ const pkgOptions = { extends: './no-ci.json' };
const options = {
ci: false,
};
// Create package.json and shareable.json in repository root
- await outputJson(path.resolve(cwd, 'package.json'), {release: pkgOptions});
+ await outputJson(path.resolve(cwd, 'package.json'), { release: pkgOptions });
await outputJson(path.resolve(cwd, 'no-ci.json'), options);
- const {options: result} = await t.context.getConfig({cwd});
+ const { options: result } = await t.context.getConfig({ cwd });
t.is(result.ci, false);
t.is(result.noCi, true);
diff --git a/test/get-git-auth-url.test.js b/test/get-git-auth-url.test.js
index a5711785fb..00af28a65c 100644
--- a/test/get-git-auth-url.test.js
+++ b/test/get-git-auth-url.test.js
@@ -1,408 +1,437 @@
const test = require('ava');
const getAuthUrl = require('../lib/get-git-auth-url');
-const {gitRepo} = require('./helpers/git-utils');
+const { gitRepo } = require('./helpers/git-utils');
-const env = {GIT_ASKPASS: 'echo', GIT_TERMINAL_PROMPT: 0};
+const env = { GIT_ASKPASS: 'echo', GIT_TERMINAL_PROMPT: 0 };
test('Return the same "git" formatted URL if "gitCredentials" is not defined', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
- await getAuthUrl({cwd, env, branch: {name: 'master'}, options: {repositoryUrl: 'git@host.null:owner/repo.git'}}),
+ await getAuthUrl({
+ cwd,
+ env,
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
+ }),
'git@host.null:owner/repo.git'
);
});
test('Return the same "https" formatted URL if "gitCredentials" is not defined', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
env,
- branch: {name: 'master'},
- options: {repositoryUrl: 'https://host.null/owner/repo.git'},
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'https://host.null/owner/repo.git' },
}),
'https://host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is not defined and repositoryUrl is a "git+https" URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
env,
- branch: {name: 'master'},
- options: {repositoryUrl: 'git+https://host.null/owner/repo.git'},
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git+https://host.null/owner/repo.git' },
}),
'https://host.null/owner/repo.git'
);
});
test('Do not add trailing ".git" if not present in the origian URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
- await getAuthUrl({cwd, env, vranch: {name: 'master'}, options: {repositoryUrl: 'git@host.null:owner/repo'}}),
+ await getAuthUrl({
+ cwd,
+ env,
+ vranch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo' },
+ }),
'git@host.null:owner/repo'
);
});
test('Handle "https" URL with group and subgroup', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
env,
- branch: {name: 'master'},
- options: {repositoryUrl: 'https://host.null/group/subgroup/owner/repo.git'},
+ branch: { name: 'master' },
+ options: {
+ repositoryUrl: 'https://host.null/group/subgroup/owner/repo.git',
+ },
}),
'https://host.null/group/subgroup/owner/repo.git'
);
});
test('Handle "git" URL with group and subgroup', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
env,
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:group/subgroup/owner/repo.git'},
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:group/subgroup/owner/repo.git' },
}),
'git@host.null:group/subgroup/owner/repo.git'
);
});
test('Convert shorthand URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
env,
- branch: {name: 'master'},
- options: {repositoryUrl: 'semantic-release/semantic-release'},
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'semantic-release/semantic-release' },
}),
'https://github.com/semantic-release/semantic-release.git'
);
});
test('Convert GitLab shorthand URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
env,
- branch: {name: 'master'},
- options: {repositoryUrl: 'gitlab:semantic-release/semantic-release'},
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'gitlab:semantic-release/semantic-release' },
}),
'https://gitlab.com/semantic-release/semantic-release.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined and repositoryUrl is a "git" URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://user:pass@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined and repositoryUrl is a "git" URL without user', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- options: {branch: 'master', repositoryUrl: 'host.null:owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ options: { branch: 'master', repositoryUrl: 'host.null:owner/repo.git' },
}),
'https://user:pass@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined and repositoryUrl is a "git" URL without user and with a custom port', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- options: {branch: 'master', repositoryUrl: 'host.null:6666:owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ options: {
+ branch: 'master',
+ repositoryUrl: 'host.null:6666:owner/repo.git',
+ },
}),
'https://user:pass@host.null:6666/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined and repositoryUrl is a "git" URL without user and with a custom port followed by a slash', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- options: {branch: 'master', repositoryUrl: 'host.null:6666:/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ options: {
+ branch: 'master',
+ repositoryUrl: 'host.null:6666:/owner/repo.git',
+ },
}),
'https://user:pass@host.null:6666/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined and repositoryUrl is a "https" URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'https://host.null/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'https://host.null/owner/repo.git' },
}),
'https://user:pass@host.null/owner/repo.git'
);
});
test('Return the "http" formatted URL if "gitCredentials" is defined and repositoryUrl is a "http" URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'http://host.null/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'http://host.null/owner/repo.git' },
}),
'http://user:pass@host.null/owner/repo.git'
);
});
test('Return the "http" formatted URL if "gitCredentials" is defined and repositoryUrl is a "http" URL with custom port', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- options: {branch: 'master', repositoryUrl: 'http://host.null:8080/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ options: {
+ branch: 'master',
+ repositoryUrl: 'http://host.null:8080/owner/repo.git',
+ },
}),
'http://user:pass@host.null:8080/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined and repositoryUrl is a "git+https" URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git+https://host.null/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git+https://host.null/owner/repo.git' },
}),
'https://user:pass@host.null/owner/repo.git'
);
});
test('Return the "http" formatted URL if "gitCredentials" is defined and repositoryUrl is a "git+http" URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git+http://host.null/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git+http://host.null/owner/repo.git' },
}),
'http://user:pass@host.null/owner/repo.git'
);
});
test('Return the "http" formatted URL if "gitCredentials" is defined and repositoryUrl is a "ssh" URL', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- options: {branch: 'master', repositoryUrl: 'ssh://git@host.null:2222/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ options: {
+ branch: 'master',
+ repositoryUrl: 'ssh://git@host.null:2222/owner/repo.git',
+ },
}),
'https://user:pass@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined with "GH_TOKEN"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GH_TOKEN: 'token'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, GH_TOKEN: 'token' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://token@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined with "GITHUB_TOKEN"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GITHUB_TOKEN: 'token'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, GITHUB_TOKEN: 'token' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://token@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined with "GL_TOKEN"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GL_TOKEN: 'token'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, GL_TOKEN: 'token' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://gitlab-ci-token:token@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined with "GITLAB_TOKEN"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GITLAB_TOKEN: 'token'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, GITLAB_TOKEN: 'token' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://gitlab-ci-token:token@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined with "BB_TOKEN"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, BB_TOKEN: 'token'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, BB_TOKEN: 'token' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://x-token-auth:token@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined with "BITBUCKET_TOKEN"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, BITBUCKET_TOKEN: 'token'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, BITBUCKET_TOKEN: 'token' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://x-token-auth:token@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined with "BB_TOKEN_BASIC_AUTH"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, BB_TOKEN_BASIC_AUTH: 'username:token'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, BB_TOKEN_BASIC_AUTH: 'username:token' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://username:token@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "gitCredentials" is defined with "BITBUCKET_TOKEN_BASIC_AUTH"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, BITBUCKET_TOKEN_BASIC_AUTH: 'username:token'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, BITBUCKET_TOKEN_BASIC_AUTH: 'username:token' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:owner/repo.git' },
}),
'https://username:token@host.null/owner/repo.git'
);
});
test('Return the "https" formatted URL if "GITHUB_ACTION" is set', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GITHUB_ACTION: 'foo', GITHUB_TOKEN: 'token'},
- options: {branch: 'master', repositoryUrl: 'git@host.null:owner/repo.git'},
+ env: { ...env, GITHUB_ACTION: 'foo', GITHUB_TOKEN: 'token' },
+ options: {
+ branch: 'master',
+ repositoryUrl: 'git@host.null:owner/repo.git',
+ },
}),
'https://x-access-token:token@host.null/owner/repo.git'
);
});
test('Handle "https" URL with group and subgroup, with "GIT_CREDENTIALS"', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'https://host.null/group/subgroup/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ branch: { name: 'master' },
+ options: {
+ repositoryUrl: 'https://host.null/group/subgroup/owner/repo.git',
+ },
}),
'https://user:pass@host.null/group/subgroup/owner/repo.git'
);
});
test('Handle "git" URL with group and subgroup, with "GIT_CREDENTIALS', async (t) => {
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- branch: {name: 'master'},
- options: {repositoryUrl: 'git@host.null:group/subgroup/owner/repo.git'},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ branch: { name: 'master' },
+ options: { repositoryUrl: 'git@host.null:group/subgroup/owner/repo.git' },
}),
'https://user:pass@host.null/group/subgroup/owner/repo.git'
);
});
test('Do not add git credential to repositoryUrl if push is allowed', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
t.is(
await getAuthUrl({
cwd,
- env: {...env, GIT_CREDENTIALS: 'user:pass'},
- branch: {name: 'master'},
- options: {repositoryUrl},
+ env: { ...env, GIT_CREDENTIALS: 'user:pass' },
+ branch: { name: 'master' },
+ options: { repositoryUrl },
}),
repositoryUrl
);
diff --git a/test/get-last-release.test.js b/test/get-last-release.test.js
index 726f4cb455..7324085a89 100644
--- a/test/get-last-release.test.js
+++ b/test/get-last-release.test.js
@@ -6,16 +6,26 @@ test('Get the highest non-prerelease valid tag', (t) => {
branch: {
name: 'master',
tags: [
- {version: '2.0.0', gitTag: 'v2.0.0', gitHead: 'v2.0.0'},
- {version: '1.0.0', gitTag: 'v1.0.0', gitHead: 'v1.0.0'},
- {version: '3.0.0-beta.1', gitTag: 'v3.0.0-beta.1', gitHead: 'v3.0.0-beta.1'},
+ { version: '2.0.0', gitTag: 'v2.0.0', gitHead: 'v2.0.0' },
+ { version: '1.0.0', gitTag: 'v1.0.0', gitHead: 'v1.0.0' },
+ {
+ version: '3.0.0-beta.1',
+ gitTag: 'v3.0.0-beta.1',
+ gitHead: 'v3.0.0-beta.1',
+ },
],
type: 'release',
},
- options: {tagFormat: `v\${version}`},
+ options: { tagFormat: `v\${version}` },
});
- t.deepEqual(result, {version: '2.0.0', gitTag: 'v2.0.0', name: 'v2.0.0', gitHead: 'v2.0.0', channels: undefined});
+ t.deepEqual(result, {
+ version: '2.0.0',
+ gitTag: 'v2.0.0',
+ name: 'v2.0.0',
+ gitHead: 'v2.0.0',
+ channels: undefined,
+ });
});
test('Get the highest prerelease valid tag, ignoring other tags from other prerelease channels', (t) => {
@@ -25,13 +35,28 @@ test('Get the highest prerelease valid tag, ignoring other tags from other prere
prerelease: 'beta',
channel: 'beta',
tags: [
- {version: '1.0.0-beta.1', gitTag: 'v1.0.0-beta.1', gitHead: 'v1.0.0-beta.1', channels: ['beta']},
- {version: '1.0.0-beta.2', gitTag: 'v1.0.0-beta.2', gitHead: 'v1.0.0-beta.2', channels: ['beta']},
- {version: '1.0.0-alpha.1', gitTag: 'v1.0.0-alpha.1', gitHead: 'v1.0.0-alpha.1', channels: ['alpha']},
+ {
+ version: '1.0.0-beta.1',
+ gitTag: 'v1.0.0-beta.1',
+ gitHead: 'v1.0.0-beta.1',
+ channels: ['beta'],
+ },
+ {
+ version: '1.0.0-beta.2',
+ gitTag: 'v1.0.0-beta.2',
+ gitHead: 'v1.0.0-beta.2',
+ channels: ['beta'],
+ },
+ {
+ version: '1.0.0-alpha.1',
+ gitTag: 'v1.0.0-alpha.1',
+ gitHead: 'v1.0.0-alpha.1',
+ channels: ['alpha'],
+ },
],
type: 'prerelease',
},
- options: {tagFormat: `v\${version}`},
+ options: { tagFormat: `v\${version}` },
});
t.deepEqual(result, {
@@ -47,10 +72,16 @@ test('Return empty object if no valid tag is found', (t) => {
const result = getLastRelease({
branch: {
name: 'master',
- tags: [{version: '3.0.0-beta.1', gitTag: 'v3.0.0-beta.1', gitHead: 'v3.0.0-beta.1'}],
+ tags: [
+ {
+ version: '3.0.0-beta.1',
+ gitTag: 'v3.0.0-beta.1',
+ gitHead: 'v3.0.0-beta.1',
+ },
+ ],
type: 'release',
},
- options: {tagFormat: `v\${version}`},
+ options: { tagFormat: `v\${version}` },
});
t.deepEqual(result, {});
@@ -63,18 +94,28 @@ test('Get the highest non-prerelease valid tag before a certain version', (t) =>
name: 'master',
channel: undefined,
tags: [
- {version: '2.0.0', gitTag: 'v2.0.0', gitHead: 'v2.0.0'},
- {version: '1.0.0', gitTag: 'v1.0.0', gitHead: 'v1.0.0'},
- {version: '2.0.0-beta.1', gitTag: 'v2.0.0-beta.1', gitHead: 'v2.0.0-beta.1'},
- {version: '2.1.0', gitTag: 'v2.1.0', gitHead: 'v2.1.0'},
- {version: '2.1.1', gitTag: 'v2.1.1', gitHead: 'v2.1.1'},
+ { version: '2.0.0', gitTag: 'v2.0.0', gitHead: 'v2.0.0' },
+ { version: '1.0.0', gitTag: 'v1.0.0', gitHead: 'v1.0.0' },
+ {
+ version: '2.0.0-beta.1',
+ gitTag: 'v2.0.0-beta.1',
+ gitHead: 'v2.0.0-beta.1',
+ },
+ { version: '2.1.0', gitTag: 'v2.1.0', gitHead: 'v2.1.0' },
+ { version: '2.1.1', gitTag: 'v2.1.1', gitHead: 'v2.1.1' },
],
type: 'release',
},
- options: {tagFormat: `v\${version}`},
+ options: { tagFormat: `v\${version}` },
},
- {before: '2.1.0'}
+ { before: '2.1.0' }
);
- t.deepEqual(result, {version: '2.0.0', gitTag: 'v2.0.0', name: 'v2.0.0', gitHead: 'v2.0.0', channels: undefined});
+ t.deepEqual(result, {
+ version: '2.0.0',
+ gitTag: 'v2.0.0',
+ name: 'v2.0.0',
+ gitHead: 'v2.0.0',
+ channels: undefined,
+ });
});
diff --git a/test/get-logger.test.js b/test/get-logger.test.js
index ee64940a02..ee1c83a9af 100644
--- a/test/get-logger.test.js
+++ b/test/get-logger.test.js
@@ -1,11 +1,14 @@
const test = require('ava');
-const {spy} = require('sinon');
+const { spy } = require('sinon');
const getLogger = require('../lib/get-logger');
test('Expose "error", "success" and "log" functions', (t) => {
const stdout = spy();
const stderr = spy();
- const logger = getLogger({stdout: {write: stdout}, stderr: {write: stderr}});
+ const logger = getLogger({
+ stdout: { write: stdout },
+ stderr: { write: stderr },
+ });
logger.log('test log');
logger.success('test success');
diff --git a/test/get-next-version.test.js b/test/get-next-version.test.js
index 63c906f078..8fbac16575 100644
--- a/test/get-next-version.test.js
+++ b/test/get-next-version.test.js
@@ -1,19 +1,23 @@
const test = require('ava');
-const {stub} = require('sinon');
+const { stub } = require('sinon');
const getNextVersion = require('../lib/get-next-version');
test.beforeEach((t) => {
// Stub the logger functions
t.context.log = stub();
- t.context.logger = {log: t.context.log};
+ t.context.logger = { log: t.context.log };
});
test('Increase version for patch release', (t) => {
t.is(
getNextVersion({
- branch: {name: 'master', type: 'release', tags: [{gitTag: 'v1.0.0', version: '1.0.0', channels: [null]}]},
- nextRelease: {type: 'patch'},
- lastRelease: {version: '1.0.0', channels: [null]},
+ branch: {
+ name: 'master',
+ type: 'release',
+ tags: [{ gitTag: 'v1.0.0', version: '1.0.0', channels: [null] }],
+ },
+ nextRelease: { type: 'patch' },
+ lastRelease: { version: '1.0.0', channels: [null] },
logger: t.context.logger,
}),
'1.0.1'
@@ -23,9 +27,13 @@ test('Increase version for patch release', (t) => {
test('Increase version for minor release', (t) => {
t.is(
getNextVersion({
- branch: {name: 'master', type: 'release', tags: [{gitTag: 'v1.0.0', version: '1.0.0', channels: [null]}]},
- nextRelease: {type: 'minor'},
- lastRelease: {version: '1.0.0', channels: [null]},
+ branch: {
+ name: 'master',
+ type: 'release',
+ tags: [{ gitTag: 'v1.0.0', version: '1.0.0', channels: [null] }],
+ },
+ nextRelease: { type: 'minor' },
+ lastRelease: { version: '1.0.0', channels: [null] },
logger: t.context.logger,
}),
'1.1.0'
@@ -35,9 +43,13 @@ test('Increase version for minor release', (t) => {
test('Increase version for major release', (t) => {
t.is(
getNextVersion({
- branch: {name: 'master', type: 'release', tags: [{gitTag: 'v1.0.0', version: '1.0.0', channels: [null]}]},
- nextRelease: {type: 'major'},
- lastRelease: {version: '1.0.0', channels: [null]},
+ branch: {
+ name: 'master',
+ type: 'release',
+ tags: [{ gitTag: 'v1.0.0', version: '1.0.0', channels: [null] }],
+ },
+ nextRelease: { type: 'major' },
+ lastRelease: { version: '1.0.0', channels: [null] },
logger: t.context.logger,
}),
'2.0.0'
@@ -47,8 +59,8 @@ test('Increase version for major release', (t) => {
test('Return 1.0.0 if there is no previous release', (t) => {
t.is(
getNextVersion({
- branch: {name: 'master', type: 'release', tags: []},
- nextRelease: {type: 'minor'},
+ branch: { name: 'master', type: 'release', tags: [] },
+ nextRelease: { type: 'minor' },
lastRelease: {},
logger: t.context.logger,
}),
@@ -63,10 +75,10 @@ test('Increase version for patch release on prerelease branch', (t) => {
name: 'beta',
type: 'prerelease',
prerelease: 'beta',
- tags: [{gitTag: 'v1.0.0', version: '1.0.0', channels: [null]}],
+ tags: [{ gitTag: 'v1.0.0', version: '1.0.0', channels: [null] }],
},
- nextRelease: {type: 'patch', channel: 'beta'},
- lastRelease: {version: '1.0.0', channels: [null]},
+ nextRelease: { type: 'patch', channel: 'beta' },
+ lastRelease: { version: '1.0.0', channels: [null] },
logger: t.context.logger,
}),
'1.0.1-beta.1'
@@ -79,12 +91,16 @@ test('Increase version for patch release on prerelease branch', (t) => {
type: 'prerelease',
prerelease: 'beta',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v1.0.1-beta.1', version: '1.0.1-beta.1', channels: ['beta']},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ {
+ gitTag: 'v1.0.1-beta.1',
+ version: '1.0.1-beta.1',
+ channels: ['beta'],
+ },
],
},
- nextRelease: {type: 'patch', channel: 'beta'},
- lastRelease: {version: '1.0.1-beta.1', channels: ['beta']},
+ nextRelease: { type: 'patch', channel: 'beta' },
+ lastRelease: { version: '1.0.1-beta.1', channels: ['beta'] },
logger: t.context.logger,
}),
'1.0.1-beta.2'
@@ -96,10 +112,16 @@ test('Increase version for patch release on prerelease branch', (t) => {
name: 'alpha',
type: 'prerelease',
prerelease: 'alpha',
- tags: [{gitTag: 'v1.0.1-beta.1', version: '1.0.1-beta.1', channels: ['beta']}],
+ tags: [
+ {
+ gitTag: 'v1.0.1-beta.1',
+ version: '1.0.1-beta.1',
+ channels: ['beta'],
+ },
+ ],
},
- nextRelease: {type: 'patch', channel: 'alpha'},
- lastRelease: {version: '1.0.1-beta.1', channels: ['beta']},
+ nextRelease: { type: 'patch', channel: 'alpha' },
+ lastRelease: { version: '1.0.1-beta.1', channels: ['beta'] },
logger: t.context.logger,
}),
'1.0.2-alpha.1'
@@ -113,10 +135,10 @@ test('Increase version for minor release on prerelease branch', (t) => {
name: 'beta',
type: 'prerelease',
prerelease: 'beta',
- tags: [{gitTag: 'v1.0.0', version: '1.0.0', channels: [null]}],
+ tags: [{ gitTag: 'v1.0.0', version: '1.0.0', channels: [null] }],
},
- nextRelease: {type: 'minor', channel: 'beta'},
- lastRelease: {version: '1.0.0', channels: [null]},
+ nextRelease: { type: 'minor', channel: 'beta' },
+ lastRelease: { version: '1.0.0', channels: [null] },
logger: t.context.logger,
}),
'1.1.0-beta.1'
@@ -129,12 +151,16 @@ test('Increase version for minor release on prerelease branch', (t) => {
type: 'prerelease',
prerelease: 'beta',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v1.1.0-beta.1', version: '1.1.0-beta.1', channels: ['beta']},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ {
+ gitTag: 'v1.1.0-beta.1',
+ version: '1.1.0-beta.1',
+ channels: ['beta'],
+ },
],
},
- nextRelease: {type: 'minor', channel: 'beta'},
- lastRelease: {version: '1.1.0-beta.1', channels: ['beta']},
+ nextRelease: { type: 'minor', channel: 'beta' },
+ lastRelease: { version: '1.1.0-beta.1', channels: ['beta'] },
logger: t.context.logger,
}),
'1.1.0-beta.2'
@@ -146,10 +172,16 @@ test('Increase version for minor release on prerelease branch', (t) => {
name: 'alpha',
type: 'prerelease',
prerelease: 'alpha',
- tags: [{gitTag: 'v1.1.0-beta.1', version: '1.1.0-beta.1', channels: ['beta']}],
+ tags: [
+ {
+ gitTag: 'v1.1.0-beta.1',
+ version: '1.1.0-beta.1',
+ channels: ['beta'],
+ },
+ ],
},
- nextRelease: {type: 'minor', channel: 'alpha'},
- lastRelease: {version: '1.1.0-beta.1', channels: ['beta']},
+ nextRelease: { type: 'minor', channel: 'alpha' },
+ lastRelease: { version: '1.1.0-beta.1', channels: ['beta'] },
logger: t.context.logger,
}),
'1.2.0-alpha.1'
@@ -163,10 +195,10 @@ test('Increase version for major release on prerelease branch', (t) => {
name: 'beta',
type: 'prerelease',
prerelease: 'beta',
- tags: [{gitTag: 'v1.0.0', version: '1.0.0', channels: [null]}],
+ tags: [{ gitTag: 'v1.0.0', version: '1.0.0', channels: [null] }],
},
- nextRelease: {type: 'major', channel: 'beta'},
- lastRelease: {version: '1.0.0', channels: [null]},
+ nextRelease: { type: 'major', channel: 'beta' },
+ lastRelease: { version: '1.0.0', channels: [null] },
logger: t.context.logger,
}),
'2.0.0-beta.1'
@@ -179,12 +211,16 @@ test('Increase version for major release on prerelease branch', (t) => {
type: 'prerelease',
prerelease: 'beta',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v2.0.0-beta.1', version: '2.0.0-beta.1', channels: ['beta']},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ {
+ gitTag: 'v2.0.0-beta.1',
+ version: '2.0.0-beta.1',
+ channels: ['beta'],
+ },
],
},
- nextRelease: {type: 'major', channel: 'beta'},
- lastRelease: {version: '2.0.0-beta.1', channels: ['beta']},
+ nextRelease: { type: 'major', channel: 'beta' },
+ lastRelease: { version: '2.0.0-beta.1', channels: ['beta'] },
logger: t.context.logger,
}),
'2.0.0-beta.2'
@@ -196,10 +232,16 @@ test('Increase version for major release on prerelease branch', (t) => {
name: 'alpha',
type: 'prerelease',
prerelease: 'alpha',
- tags: [{gitTag: 'v2.0.0-beta.1', version: '2.0.0-beta.1', channels: ['beta']}],
+ tags: [
+ {
+ gitTag: 'v2.0.0-beta.1',
+ version: '2.0.0-beta.1',
+ channels: ['beta'],
+ },
+ ],
},
- nextRelease: {type: 'major', channel: 'alpha'},
- lastRelease: {version: '2.0.0-beta.1', channels: ['beta']},
+ nextRelease: { type: 'major', channel: 'alpha' },
+ lastRelease: { version: '2.0.0-beta.1', channels: ['beta'] },
logger: t.context.logger,
}),
'3.0.0-alpha.1'
@@ -209,8 +251,13 @@ test('Increase version for major release on prerelease branch', (t) => {
test('Return 1.0.0 if there is no previous release on prerelease branch', (t) => {
t.is(
getNextVersion({
- branch: {name: 'beta', type: 'prerelease', prerelease: 'beta', tags: []},
- nextRelease: {type: 'minor'},
+ branch: {
+ name: 'beta',
+ type: 'prerelease',
+ prerelease: 'beta',
+ tags: [],
+ },
+ nextRelease: { type: 'minor' },
lastRelease: {},
logger: t.context.logger,
}),
@@ -226,13 +273,17 @@ test('Increase version for release on prerelease branch after previous commits w
type: 'prerelease',
prerelease: 'beta',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: [null]}, // Version v1.1.0 released on default branch after beta was merged into master
- {gitTag: 'v1.1.0-beta.1', version: '1.1.0-beta.1', channels: [null, 'beta']},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: [null] }, // Version v1.1.0 released on default branch after beta was merged into master
+ {
+ gitTag: 'v1.1.0-beta.1',
+ version: '1.1.0-beta.1',
+ channels: [null, 'beta'],
+ },
],
},
- nextRelease: {type: 'minor'},
- lastRelease: {version: '1.1.0', channels: [null]},
+ nextRelease: { type: 'minor' },
+ lastRelease: { version: '1.1.0', channels: [null] },
logger: t.context.logger,
}),
'1.2.0-beta.1'
@@ -247,12 +298,16 @@ test('Increase version for release on prerelease branch based on highest commit
type: 'prerelease',
prerelease: 'beta',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v1.1.0-beta.1', version: '1.1.0-beta.1', channels: [null, 'beta']},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ {
+ gitTag: 'v1.1.0-beta.1',
+ version: '1.1.0-beta.1',
+ channels: [null, 'beta'],
+ },
],
},
- nextRelease: {type: 'major'},
- lastRelease: {version: 'v1.1.0-beta.1', channels: [null]},
+ nextRelease: { type: 'major' },
+ lastRelease: { version: 'v1.1.0-beta.1', channels: [null] },
logger: t.context.logger,
}),
'2.0.0-beta.1'
@@ -266,10 +321,16 @@ test('Increase version for release on prerelease branch when there is no regular
name: 'beta',
type: 'prerelease',
prerelease: 'beta',
- tags: [{gitTag: 'v1.0.0-beta.1', version: '1.0.0-beta.1', channels: ['beta']}],
+ tags: [
+ {
+ gitTag: 'v1.0.0-beta.1',
+ version: '1.0.0-beta.1',
+ channels: ['beta'],
+ },
+ ],
},
- nextRelease: {type: 'minor', channel: 'beta'},
- lastRelease: {version: 'v1.0.0-beta.1', channels: ['beta']},
+ nextRelease: { type: 'minor', channel: 'beta' },
+ lastRelease: { version: 'v1.0.0-beta.1', channels: ['beta'] },
logger: t.context.logger,
}),
'1.0.0-beta.2'
diff --git a/test/get-release-to-add.test.js b/test/get-release-to-add.test.js
index 80e2cf596c..b409fac44b 100644
--- a/test/get-release-to-add.test.js
+++ b/test/get-release-to-add.test.js
@@ -9,20 +9,26 @@ test('Return versions merged from release to maintenance branch, excluding lower
type: 'maintenance',
mergeRange: '>=2.0.0 <3.0.0',
tags: [
- {gitTag: 'v2.0.0', version: '2.0.0', channels: ['2.x']},
- {gitTag: 'v2.0.0', version: '2.0.0', channels: [null]},
- {gitTag: 'v2.1.0', version: '2.1.0', channels: [null]},
- {gitTag: 'v2.1.1', version: '2.1.1', channels: [null]},
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: [null]},
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: ['2.x'] },
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: [null] },
+ { gitTag: 'v2.1.0', version: '2.1.0', channels: [null] },
+ { gitTag: 'v2.1.1', version: '2.1.1', channels: [null] },
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: [null] },
],
},
- branches: [{name: '2.x', channel: '2.x'}, {name: 'master'}],
- options: {tagFormat: `v\${version}`},
+ branches: [{ name: '2.x', channel: '2.x' }, { name: 'master' }],
+ options: { tagFormat: `v\${version}` },
});
t.deepEqual(result, {
- lastRelease: {version: '2.1.0', channels: [null], gitTag: 'v2.1.0', name: 'v2.1.0', gitHead: 'v2.1.0'},
+ lastRelease: {
+ version: '2.1.0',
+ channels: [null],
+ gitTag: 'v2.1.0',
+ name: 'v2.1.0',
+ gitHead: 'v2.1.0',
+ },
currentRelease: {
type: 'patch',
version: '2.1.1',
@@ -47,13 +53,17 @@ test('Return versions merged between release branches', (t) => {
branch: {
name: 'master',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null, 'next']},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: ['next']},
- {gitTag: 'v2.0.0', version: '2.0.0', channels: ['next-major']},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null, 'next'] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: ['next'] },
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: ['next-major'] },
],
},
- branches: [{name: 'master'}, {name: 'next', channel: 'next'}, {name: 'next-major', channel: 'next-major'}],
- options: {tagFormat: `v\${version}`},
+ branches: [
+ { name: 'master' },
+ { name: 'next', channel: 'next' },
+ { name: 'next-major', channel: 'next-major' },
+ ],
+ options: { tagFormat: `v\${version}` },
});
t.deepEqual(result, {
@@ -88,17 +98,27 @@ test('Return releases sorted by ascending order', (t) => {
branch: {
name: 'master',
tags: [
- {gitTag: 'v2.0.0', version: '2.0.0', channels: ['next-major']},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: ['next']},
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null, 'next']},
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: ['next-major'] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: ['next'] },
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null, 'next'] },
],
},
- branches: [{name: 'master'}, {name: 'next', channel: 'next'}, {name: 'next-major', channel: 'next-major'}],
- options: {tagFormat: `v\${version}`},
+ branches: [
+ { name: 'master' },
+ { name: 'next', channel: 'next' },
+ { name: 'next-major', channel: 'next-major' },
+ ],
+ options: { tagFormat: `v\${version}` },
});
t.deepEqual(result, {
- lastRelease: {version: '1.1.0', gitTag: 'v1.1.0', name: 'v1.1.0', gitHead: 'v1.1.0', channels: ['next']},
+ lastRelease: {
+ version: '1.1.0',
+ gitTag: 'v1.1.0',
+ name: 'v1.1.0',
+ gitHead: 'v1.1.0',
+ channels: ['next'],
+ },
currentRelease: {
type: 'major',
version: '2.0.0',
@@ -122,10 +142,10 @@ test('No lastRelease', (t) => {
const result = getReleaseToAdd({
branch: {
name: 'master',
- tags: [{gitTag: 'v1.0.0', version: '1.0.0', channels: ['next']}],
+ tags: [{ gitTag: 'v1.0.0', version: '1.0.0', channels: ['next'] }],
},
- branches: [{name: 'master'}, {name: 'next', channel: 'next'}],
- options: {tagFormat: `v\${version}`},
+ branches: [{ name: 'master' }, { name: 'next', channel: 'next' }],
+ options: { tagFormat: `v\${version}` },
});
t.deepEqual(result, {
@@ -154,21 +174,31 @@ test('Ignore pre-release versions', (t) => {
branch: {
name: 'master',
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null, 'next']},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: ['next']},
- {gitTag: 'v2.0.0-alpha.1', version: '2.0.0-alpha.1', channels: ['alpha']},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null, 'next'] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: ['next'] },
+ {
+ gitTag: 'v2.0.0-alpha.1',
+ version: '2.0.0-alpha.1',
+ channels: ['alpha'],
+ },
],
},
branches: [
- {name: 'master'},
- {name: 'next', channel: 'next'},
- {name: 'alpha', type: 'prerelease', channel: 'alpha'},
+ { name: 'master' },
+ { name: 'next', channel: 'next' },
+ { name: 'alpha', type: 'prerelease', channel: 'alpha' },
],
- options: {tagFormat: `v\${version}`},
+ options: { tagFormat: `v\${version}` },
});
t.deepEqual(result, {
- lastRelease: {version: '1.0.0', channels: [null, 'next'], gitTag: 'v1.0.0', name: 'v1.0.0', gitHead: 'v1.0.0'},
+ lastRelease: {
+ version: '1.0.0',
+ channels: [null, 'next'],
+ gitTag: 'v1.0.0',
+ name: 'v1.0.0',
+ gitHead: 'v1.0.0',
+ },
currentRelease: {
type: 'minor',
version: '1.1.0',
@@ -196,19 +226,19 @@ test('Exclude versions merged from release to maintenance branch if they have th
type: 'maintenance',
mergeRange: '>=2.0.0 <3.0.0',
tags: [
- {gitTag: 'v2.0.0', version: '2.0.0', channels: [null]},
- {gitTag: 'v2.0.0', version: '2.0.0', channels: [null]},
- {gitTag: 'v2.1.0', version: '2.1.0', channels: [null]},
- {gitTag: 'v2.1.1', version: '2.1.1', channels: [null]},
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: [null]},
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: [null] },
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: [null] },
+ { gitTag: 'v2.1.0', version: '2.1.0', channels: [null] },
+ { gitTag: 'v2.1.1', version: '2.1.1', channels: [null] },
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: [null] },
],
},
branches: [
- {name: '2.x', channel: 'latest'},
- {name: 'master', channel: 'latest'},
+ { name: '2.x', channel: 'latest' },
+ { name: 'master', channel: 'latest' },
],
- options: {tagFormat: `v\${version}`},
+ options: { tagFormat: `v\${version}` },
});
t.is(result, undefined);
@@ -220,17 +250,17 @@ test('Exclude versions merged between release branches if they have the same "ch
name: 'master',
channel: 'latest',
tags: [
- {gitTag: 'v1.0.0', channels: ['latest'], version: '1.0.0'},
- {gitTag: 'v1.1.0', channels: ['latest'], version: '1.1.0'},
- {gitTag: 'v2.0.0', channels: ['latest'], version: '2.0.0'},
+ { gitTag: 'v1.0.0', channels: ['latest'], version: '1.0.0' },
+ { gitTag: 'v1.1.0', channels: ['latest'], version: '1.1.0' },
+ { gitTag: 'v2.0.0', channels: ['latest'], version: '2.0.0' },
],
},
branches: [
- {name: 'master', channel: 'latest'},
- {name: 'next', channel: 'latest'},
- {name: 'next-major', channel: 'latest'},
+ { name: 'master', channel: 'latest' },
+ { name: 'next', channel: 'latest' },
+ { name: 'next-major', channel: 'latest' },
],
- options: {tagFormat: `v\${version}`},
+ options: { tagFormat: `v\${version}` },
});
t.is(result, undefined);
@@ -242,17 +272,17 @@ test('Exclude versions merged between release branches if they all have "channel
name: 'master',
channel: false,
tags: [
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: [null]},
- {gitTag: 'v2.0.0', version: '2.0.0', channels: [null]},
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: [null] },
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: [null] },
],
},
branches: [
- {name: 'master', channel: false},
- {name: 'next', channel: false},
- {name: 'next-major', channel: false},
+ { name: 'master', channel: false },
+ { name: 'next', channel: false },
+ { name: 'next-major', channel: false },
],
- options: {tagFormat: `v\${version}`},
+ options: { tagFormat: `v\${version}` },
});
t.is(result, undefined);
@@ -266,16 +296,16 @@ test('Exclude versions number less than the latest version already released on t
type: 'maintenance',
mergeRange: '>=2.0.0 <3.0.0',
tags: [
- {gitTag: 'v2.0.0', version: '2.0.0', channels: ['2.x']},
- {gitTag: 'v2.0.0', version: '2.0.0', channels: [null]},
- {gitTag: 'v2.1.0', version: '2.1.0', channels: [null]},
- {gitTag: 'v2.1.1', version: '2.1.1', channels: [null, '2.x']},
- {gitTag: 'v1.0.0', version: '1.0.0', channels: [null]},
- {gitTag: 'v1.1.0', version: '1.1.0', channels: [null]},
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: ['2.x'] },
+ { gitTag: 'v2.0.0', version: '2.0.0', channels: [null] },
+ { gitTag: 'v2.1.0', version: '2.1.0', channels: [null] },
+ { gitTag: 'v2.1.1', version: '2.1.1', channels: [null, '2.x'] },
+ { gitTag: 'v1.0.0', version: '1.0.0', channels: [null] },
+ { gitTag: 'v1.1.0', version: '1.1.0', channels: [null] },
],
},
- branches: [{name: '2.x', channel: '2.x'}, {name: 'master'}],
- options: {tagFormat: `v\${version}`},
+ branches: [{ name: '2.x', channel: '2.x' }, { name: 'master' }],
+ options: { tagFormat: `v\${version}` },
});
t.is(result, undefined);
diff --git a/test/git.test.js b/test/git.test.js
index e56f8b6a68..b03af67d39 100644
--- a/test/git.test.js
+++ b/test/git.test.js
@@ -38,239 +38,270 @@ const {
test('Get the last commit sha', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First'], {cwd});
+ const commits = await gitCommits(['First'], { cwd });
- const result = await getGitHead({cwd});
+ const result = await getGitHead({ cwd });
t.is(result, commits[0].hash);
});
test('Throw error if the last commit sha cannot be found', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
- await t.throwsAsync(getGitHead({cwd}));
+ await t.throwsAsync(getGitHead({ cwd }));
});
test('Unshallow and fetch repository', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- let {cwd, repositoryUrl} = await gitRepo();
+ let { cwd, repositoryUrl } = await gitRepo();
// Add commits to the master branch
- await gitCommits(['First', 'Second'], {cwd});
+ await gitCommits(['First', 'Second'], { cwd });
// Create a shallow clone with only 1 commit
cwd = await gitShallowClone(repositoryUrl);
// Verify the shallow clone contains only one commit
- t.is((await gitGetCommits(undefined, {cwd})).length, 1);
+ t.is((await gitGetCommits(undefined, { cwd })).length, 1);
- await fetch(repositoryUrl, 'master', 'master', {cwd});
+ await fetch(repositoryUrl, 'master', 'master', { cwd });
// Verify the shallow clone contains all the commits
- t.is((await gitGetCommits(undefined, {cwd})).length, 2);
+ t.is((await gitGetCommits(undefined, { cwd })).length, 2);
});
test('Do not throw error when unshallow a complete repository', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('second-branch', true, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'second-branch', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('second-branch', true, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'second-branch', { cwd });
- await t.notThrowsAsync(fetch(repositoryUrl, 'master', 'master', {cwd}));
- await t.notThrowsAsync(fetch(repositoryUrl, 'second-branch', 'master', {cwd}));
+ await t.notThrowsAsync(fetch(repositoryUrl, 'master', 'master', { cwd }));
+ await t.notThrowsAsync(
+ fetch(repositoryUrl, 'second-branch', 'master', { cwd })
+ );
});
test('Fetch all tags on a detached head repository', async (t) => {
- let {cwd, repositoryUrl} = await gitRepo();
-
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.0.1', undefined, {cwd});
- const [commit] = await gitCommits(['Third'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ let { cwd, repositoryUrl } = await gitRepo();
+
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.0.1', undefined, { cwd });
+ const [commit] = await gitCommits(['Third'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
cwd = await gitDetachedHead(repositoryUrl, commit.hash);
- await fetch(repositoryUrl, 'master', 'master', {cwd});
+ await fetch(repositoryUrl, 'master', 'master', { cwd });
- t.deepEqual((await getTags('master', {cwd})).sort(), ['v1.0.0', 'v1.0.1', 'v1.1.0'].sort());
+ t.deepEqual(
+ (await getTags('master', { cwd })).sort(),
+ ['v1.0.0', 'v1.0.1', 'v1.1.0'].sort()
+ );
});
test('Fetch all tags on a repository with a detached head from branch (CircleCI)', async (t) => {
- let {cwd, repositoryUrl} = await gitRepo();
-
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.0.1', undefined, {cwd});
- const [commit] = await gitCommits(['Third'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('other-branch', true, {cwd});
- await gitPush(repositoryUrl, 'other-branch', {cwd});
- await gitCheckout('master', false, {cwd});
- await gitCommits(['Fourth'], {cwd});
- await gitTagVersion('v2.0.0', undefined, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- cwd = await gitDetachedHeadFromBranch(repositoryUrl, 'other-branch', commit.hash);
-
- await fetch(repositoryUrl, 'master', 'other-branch', {cwd});
- await fetch(repositoryUrl, 'other-branch', 'other-branch', {cwd});
-
- t.deepEqual((await getTags('other-branch', {cwd})).sort(), ['v1.0.0', 'v1.0.1', 'v1.1.0'].sort());
- t.deepEqual((await getTags('master', {cwd})).sort(), ['v1.0.0', 'v1.0.1', 'v1.1.0', 'v2.0.0'].sort());
+ let { cwd, repositoryUrl } = await gitRepo();
+
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.0.1', undefined, { cwd });
+ const [commit] = await gitCommits(['Third'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('other-branch', true, { cwd });
+ await gitPush(repositoryUrl, 'other-branch', { cwd });
+ await gitCheckout('master', false, { cwd });
+ await gitCommits(['Fourth'], { cwd });
+ await gitTagVersion('v2.0.0', undefined, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ cwd = await gitDetachedHeadFromBranch(
+ repositoryUrl,
+ 'other-branch',
+ commit.hash
+ );
+
+ await fetch(repositoryUrl, 'master', 'other-branch', { cwd });
+ await fetch(repositoryUrl, 'other-branch', 'other-branch', { cwd });
+
+ t.deepEqual(
+ (await getTags('other-branch', { cwd })).sort(),
+ ['v1.0.0', 'v1.0.1', 'v1.1.0'].sort()
+ );
+ t.deepEqual(
+ (await getTags('master', { cwd })).sort(),
+ ['v1.0.0', 'v1.0.1', 'v1.1.0', 'v2.0.0'].sort()
+ );
});
test('Fetch all tags on a detached head repository with outdated cached repo (GitLab CI)', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo();
+ const { cwd, repositoryUrl } = await gitRepo();
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.0.1', undefined, {cwd});
- let [commit] = await gitCommits(['Third'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.0.1', undefined, { cwd });
+ let [commit] = await gitCommits(['Third'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
// Create a clone (as first CI run would)
const cloneCwd = await gitShallowClone(repositoryUrl);
- await gitFetch(repositoryUrl, {cwd: cloneCwd});
- await gitCheckout(commit.hash, false, {cwd: cloneCwd});
+ await gitFetch(repositoryUrl, { cwd: cloneCwd });
+ await gitCheckout(commit.hash, false, { cwd: cloneCwd });
// Push tag to remote
- [commit] = await gitCommits(['Fourth'], {cwd});
- await gitTagVersion('v1.2.0', undefined, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ [commit] = await gitCommits(['Fourth'], { cwd });
+ await gitTagVersion('v1.2.0', undefined, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
// Fetch on the cached repo and make detached head, leaving master outdated
- await fetch(repositoryUrl, 'master', 'master', {cwd: cloneCwd});
- await gitCheckout(commit.hash, false, {cwd: cloneCwd});
+ await fetch(repositoryUrl, 'master', 'master', { cwd: cloneCwd });
+ await gitCheckout(commit.hash, false, { cwd: cloneCwd });
- t.deepEqual((await getTags('master', {cwd: cloneCwd})).sort(), ['v1.0.0', 'v1.0.1', 'v1.1.0', 'v1.2.0'].sort());
+ t.deepEqual(
+ (await getTags('master', { cwd: cloneCwd })).sort(),
+ ['v1.0.0', 'v1.0.1', 'v1.1.0', 'v1.2.0'].sort()
+ );
});
test('Verify if a branch exists', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
+ await gitCommits(['First'], { cwd });
// Create the new branch 'other-branch' from master
- await gitCheckout('other-branch', true, {cwd});
+ await gitCheckout('other-branch', true, { cwd });
// Add commits to the 'other-branch' branch
- await gitCommits(['Second'], {cwd});
+ await gitCommits(['Second'], { cwd });
- t.true(await isRefExists('master', {cwd}));
- t.true(await isRefExists('other-branch', {cwd}));
- t.falsy(await isRefExists('next', {cwd}));
+ t.true(await isRefExists('master', { cwd }));
+ t.true(await isRefExists('other-branch', { cwd }));
+ t.falsy(await isRefExists('next', { cwd }));
});
test('Get all branches', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('second-branch', true, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'second-branch', {cwd});
- await gitCheckout('third-branch', true, {cwd});
- await gitCommits(['Third'], {cwd});
- await gitPush(repositoryUrl, 'third-branch', {cwd});
-
- t.deepEqual((await getBranches(repositoryUrl, {cwd})).sort(), ['master', 'second-branch', 'third-branch'].sort());
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('second-branch', true, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'second-branch', { cwd });
+ await gitCheckout('third-branch', true, { cwd });
+ await gitCommits(['Third'], { cwd });
+ await gitPush(repositoryUrl, 'third-branch', { cwd });
+
+ t.deepEqual(
+ (await getBranches(repositoryUrl, { cwd })).sort(),
+ ['master', 'second-branch', 'third-branch'].sort()
+ );
});
test('Return empty array if there are no branches', async (t) => {
- const {cwd, repositoryUrl} = await initGit(true);
- t.deepEqual(await getBranches(repositoryUrl, {cwd}), []);
+ const { cwd, repositoryUrl } = await initGit(true);
+ t.deepEqual(await getBranches(repositoryUrl, { cwd }), []);
});
test('Get the commit sha for a given tag', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First'], {cwd});
+ const commits = await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
- t.is(await getTagHead('v1.0.0', {cwd}), commits[0].hash);
+ t.is(await getTagHead('v1.0.0', { cwd }), commits[0].hash);
});
test('Return git remote repository url from config', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add remote.origin.url config
- await gitAddConfig('remote.origin.url', 'git@hostname.com:owner/package.git', {cwd});
+ await gitAddConfig(
+ 'remote.origin.url',
+ 'git@hostname.com:owner/package.git',
+ { cwd }
+ );
- t.is(await repoUrl({cwd}), 'git@hostname.com:owner/package.git');
+ t.is(await repoUrl({ cwd }), 'git@hostname.com:owner/package.git');
});
test('Return git remote repository url set while cloning', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- let {cwd, repositoryUrl} = await gitRepo();
- await gitCommits(['First'], {cwd});
+ let { cwd, repositoryUrl } = await gitRepo();
+ await gitCommits(['First'], { cwd });
// Create a clone
cwd = await gitShallowClone(repositoryUrl);
- t.is(await repoUrl({cwd}), repositoryUrl);
+ t.is(await repoUrl({ cwd }), repositoryUrl);
});
test('Return falsy if git repository url is not set', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
- t.falsy(await repoUrl({cwd}));
+ t.falsy(await repoUrl({ cwd }));
});
test('Add tag on head commit', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
- const commits = await gitCommits(['Test commit'], {cwd});
+ const { cwd } = await gitRepo();
+ const commits = await gitCommits(['Test commit'], { cwd });
- await tag('tag_name', 'HEAD', {cwd});
+ await tag('tag_name', 'HEAD', { cwd });
- await t.is(await gitCommitTag(commits[0].hash, {cwd}), 'tag_name');
+ await t.is(await gitCommitTag(commits[0].hash, { cwd }), 'tag_name');
});
test('Push tag to remote repository', async (t) => {
// Create a git repository with a remote, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
- const commits = await gitCommits(['Test commit'], {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ const commits = await gitCommits(['Test commit'], { cwd });
- await tag('tag_name', 'HEAD', {cwd});
- await push(repositoryUrl, {cwd});
+ await tag('tag_name', 'HEAD', { cwd });
+ await push(repositoryUrl, { cwd });
- t.is(await gitRemoteTagHead(repositoryUrl, 'tag_name', {cwd}), commits[0].hash);
+ t.is(
+ await gitRemoteTagHead(repositoryUrl, 'tag_name', { cwd }),
+ commits[0].hash
+ );
});
test('Push tag to remote repository with remote branch ahead', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- const commits = await gitCommits(['First'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ const commits = await gitCommits(['First'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const temporaryRepo = await gitShallowClone(repositoryUrl);
- await gitCommits(['Second'], {cwd: temporaryRepo});
- await gitPush('origin', 'master', {cwd: temporaryRepo});
+ await gitCommits(['Second'], { cwd: temporaryRepo });
+ await gitPush('origin', 'master', { cwd: temporaryRepo });
- await tag('tag_name', 'HEAD', {cwd});
- await push(repositoryUrl, {cwd});
+ await tag('tag_name', 'HEAD', { cwd });
+ await push(repositoryUrl, { cwd });
- t.is(await gitRemoteTagHead(repositoryUrl, 'tag_name', {cwd}), commits[0].hash);
+ t.is(
+ await gitRemoteTagHead(repositoryUrl, 'tag_name', { cwd }),
+ commits[0].hash
+ );
});
test('Return "true" if in a Git repository', async (t) => {
// Create a git repository with a remote, set the current working directory at the root of the repo
- const {cwd} = await gitRepo(true);
+ const { cwd } = await gitRepo(true);
- t.true(await isGitRepo({cwd}));
+ t.true(await isGitRepo({ cwd }));
});
test('Return falsy if not in a Git repository', async (t) => {
const cwd = tempy.directory();
- t.falsy(await isGitRepo({cwd}));
+ t.falsy(await isGitRepo({ cwd }));
});
test('Return "true" for valid tag names', async (t) => {
@@ -290,128 +321,128 @@ test('Return falsy for invalid tag names', async (t) => {
test('Throws error if obtaining the tags fails', async (t) => {
const cwd = tempy.directory();
- await t.throwsAsync(getTags('master', {cwd}));
+ await t.throwsAsync(getTags('master', { cwd }));
});
test('Return "true" if repository is up to date', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
- t.true(await isBranchUpToDate(repositoryUrl, 'master', {cwd}));
+ t.true(await isBranchUpToDate(repositoryUrl, 'master', { cwd }));
});
test('Return falsy if repository is not up to date', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
- t.true(await isBranchUpToDate(repositoryUrl, 'master', {cwd}));
+ t.true(await isBranchUpToDate(repositoryUrl, 'master', { cwd }));
const temporaryRepo = await gitShallowClone(repositoryUrl);
- await gitCommits(['Third'], {cwd: temporaryRepo});
- await gitPush('origin', 'master', {cwd: temporaryRepo});
+ await gitCommits(['Third'], { cwd: temporaryRepo });
+ await gitPush('origin', 'master', { cwd: temporaryRepo });
- t.falsy(await isBranchUpToDate(repositoryUrl, 'master', {cwd}));
+ t.falsy(await isBranchUpToDate(repositoryUrl, 'master', { cwd }));
});
test('Return falsy if detached head repository is not up to date', async (t) => {
- let {cwd, repositoryUrl} = await gitRepo();
+ let { cwd, repositoryUrl } = await gitRepo();
- const [commit] = await gitCommits(['First'], {cwd});
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ const [commit] = await gitCommits(['First'], { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
cwd = await gitDetachedHead(repositoryUrl, commit.hash);
- await fetch(repositoryUrl, 'master', 'master', {cwd});
+ await fetch(repositoryUrl, 'master', 'master', { cwd });
- t.falsy(await isBranchUpToDate(repositoryUrl, 'master', {cwd}));
+ t.falsy(await isBranchUpToDate(repositoryUrl, 'master', { cwd }));
});
test('Get a commit note', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First'], {cwd});
+ const commits = await gitCommits(['First'], { cwd });
- await gitAddNote(JSON.stringify({note: 'note'}), commits[0].hash, {cwd});
+ await gitAddNote(JSON.stringify({ note: 'note' }), commits[0].hash, { cwd });
- t.deepEqual(await getNote(commits[0].hash, {cwd}), {note: 'note'});
+ t.deepEqual(await getNote(commits[0].hash, { cwd }), { note: 'note' });
});
test('Return empty object if there is no commit note', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First'], {cwd});
+ const commits = await gitCommits(['First'], { cwd });
- t.deepEqual(await getNote(commits[0].hash, {cwd}), {});
+ t.deepEqual(await getNote(commits[0].hash, { cwd }), {});
});
test('Throw error if a commit note in invalid', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First'], {cwd});
+ const commits = await gitCommits(['First'], { cwd });
- await gitAddNote('non-json note', commits[0].hash, {cwd});
+ await gitAddNote('non-json note', commits[0].hash, { cwd });
- await t.throwsAsync(getNote(commits[0].hash, {cwd}));
+ await t.throwsAsync(getNote(commits[0].hash, { cwd }));
});
test('Add a commit note', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First'], {cwd});
+ const commits = await gitCommits(['First'], { cwd });
- await addNote({note: 'note'}, commits[0].hash, {cwd});
+ await addNote({ note: 'note' }, commits[0].hash, { cwd });
- t.is(await gitGetNote(commits[0].hash, {cwd}), '{"note":"note"}');
+ t.is(await gitGetNote(commits[0].hash, { cwd }), '{"note":"note"}');
});
test('Overwrite a commit note', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First'], {cwd});
+ const commits = await gitCommits(['First'], { cwd });
- await addNote({note: 'note'}, commits[0].hash, {cwd});
- await addNote({note: 'note2'}, commits[0].hash, {cwd});
+ await addNote({ note: 'note' }, commits[0].hash, { cwd });
+ await addNote({ note: 'note2' }, commits[0].hash, { cwd });
- t.is(await gitGetNote(commits[0].hash, {cwd}), '{"note":"note2"}');
+ t.is(await gitGetNote(commits[0].hash, { cwd }), '{"note":"note2"}');
});
test('Unshallow and fetch repository with notes', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- let {cwd, repositoryUrl} = await gitRepo();
+ let { cwd, repositoryUrl } = await gitRepo();
// Add commits to the master branch
- const commits = await gitCommits(['First', 'Second'], {cwd});
- await gitAddNote(JSON.stringify({note: 'note'}), commits[0].hash, {cwd});
+ const commits = await gitCommits(['First', 'Second'], { cwd });
+ await gitAddNote(JSON.stringify({ note: 'note' }), commits[0].hash, { cwd });
// Create a shallow clone with only 1 commit
cwd = await gitShallowClone(repositoryUrl);
// Verify the shallow clone doesn't contains the note
- await t.throwsAsync(gitGetNote(commits[0].hash, {cwd}));
+ await t.throwsAsync(gitGetNote(commits[0].hash, { cwd }));
- await fetch(repositoryUrl, 'master', 'master', {cwd});
- await fetchNotes(repositoryUrl, {cwd});
+ await fetch(repositoryUrl, 'master', 'master', { cwd });
+ await fetchNotes(repositoryUrl, { cwd });
// Verify the shallow clone contains the note
- t.is(await gitGetNote(commits[0].hash, {cwd}), '{"note":"note"}');
+ t.is(await gitGetNote(commits[0].hash, { cwd }), '{"note":"note"}');
});
test('Fetch all notes on a detached head repository', async (t) => {
- let {cwd, repositoryUrl} = await gitRepo();
+ let { cwd, repositoryUrl } = await gitRepo();
- await gitCommits(['First'], {cwd});
- const [commit] = await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitAddNote(JSON.stringify({note: 'note'}), commit.hash, {cwd});
+ await gitCommits(['First'], { cwd });
+ const [commit] = await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitAddNote(JSON.stringify({ note: 'note' }), commit.hash, { cwd });
cwd = await gitDetachedHead(repositoryUrl, commit.hash);
- await fetch(repositoryUrl, 'master', 'master', {cwd});
- await fetchNotes(repositoryUrl, {cwd});
+ await fetch(repositoryUrl, 'master', 'master', { cwd });
+ await fetchNotes(repositoryUrl, { cwd });
- t.is(await gitGetNote(commit.hash, {cwd}), '{"note":"note"}');
+ t.is(await gitGetNote(commit.hash, { cwd }), '{"note":"note"}');
});
diff --git a/test/helpers/git-utils.js b/test/helpers/git-utils.js
index 85e889fba9..add41d4c58 100644
--- a/test/helpers/git-utils.js
+++ b/test/helpers/git-utils.js
@@ -4,7 +4,7 @@ const fileUrl = require('file-url');
const pEachSeries = require('p-each-series');
const gitLogParser = require('git-log-parser');
const getStream = require('get-stream');
-const {GIT_NOTE_REF} = require('../../lib/definitions/constants');
+const { GIT_NOTE_REF } = require('../../lib/definitions/constants');
/**
* Commit message information.
@@ -25,14 +25,16 @@ const {GIT_NOTE_REF} = require('../../lib/definitions/constants');
*/
async function initGit(withRemote) {
const cwd = tempy.directory();
- const args = withRemote ? ['--bare', '--initial-branch=master'] : ['--initial-branch=master'];
+ const args = withRemote
+ ? ['--bare', '--initial-branch=master']
+ : ['--initial-branch=master'];
- await execa('git', ['init', ...args], {cwd}).catch(() => {
+ await execa('git', ['init', ...args], { cwd }).catch(() => {
const args = withRemote ? ['--bare'] : [];
- return execa('git', ['init', ...args], {cwd});
+ return execa('git', ['init', ...args], { cwd });
});
const repositoryUrl = fileUrl(cwd);
- return {cwd, repositoryUrl};
+ return { cwd, repositoryUrl };
}
/**
@@ -46,17 +48,17 @@ async function initGit(withRemote) {
* @return {String} The path of the clone if `withRemote` is `true`, the path of the repository otherwise.
*/
async function gitRepo(withRemote, branch = 'master') {
- let {cwd, repositoryUrl} = await initGit(withRemote);
+ let { cwd, repositoryUrl } = await initGit(withRemote);
if (withRemote) {
await initBareRepo(repositoryUrl, branch);
cwd = await gitShallowClone(repositoryUrl, branch);
} else {
- await gitCheckout(branch, true, {cwd});
+ await gitCheckout(branch, true, { cwd });
}
- await execa('git', ['config', 'commit.gpgsign', false], {cwd});
+ await execa('git', ['config', 'commit.gpgsign', false], { cwd });
- return {cwd, repositoryUrl};
+ return { cwd, repositoryUrl };
}
/**
@@ -72,10 +74,10 @@ async function gitRepo(withRemote, branch = 'master') {
*/
async function initBareRepo(repositoryUrl, branch = 'master') {
const cwd = tempy.directory();
- await execa('git', ['clone', '--no-hardlinks', repositoryUrl, cwd], {cwd});
- await gitCheckout(branch, true, {cwd});
- await gitCommits(['Initial commit'], {cwd});
- await execa('git', ['push', repositoryUrl, branch], {cwd});
+ await execa('git', ['clone', '--no-hardlinks', repositoryUrl, cwd], { cwd });
+ await gitCheckout(branch, true, { cwd });
+ await gitCommits(['Initial commit'], { cwd });
+ await execa('git', ['push', repositoryUrl, branch], { cwd });
}
/**
@@ -90,9 +92,18 @@ async function gitCommits(messages, execaOptions) {
await pEachSeries(
messages,
async (message) =>
- (await execa('git', ['commit', '-m', message, '--allow-empty', '--no-gpg-sign'], execaOptions)).stdout
+ (
+ await execa(
+ 'git',
+ ['commit', '-m', message, '--allow-empty', '--no-gpg-sign'],
+ execaOptions
+ )
+ ).stdout
+ );
+ return (await gitGetCommits(undefined, execaOptions)).slice(
+ 0,
+ messages.length
);
- return (await gitGetCommits(undefined, execaOptions)).slice(0, messages.length);
}
/**
@@ -104,12 +115,17 @@ async function gitCommits(messages, execaOptions) {
* @return {Array} The list of parsed commits.
*/
async function gitGetCommits(from, execaOptions) {
- Object.assign(gitLogParser.fields, {hash: 'H', message: 'B', gitTags: 'd', committerDate: {key: 'ci', type: Date}});
+ Object.assign(gitLogParser.fields, {
+ hash: 'H',
+ message: 'B',
+ gitTags: 'd',
+ committerDate: { key: 'ci', type: Date },
+ });
return (
await getStream.array(
gitLogParser.parse(
- {_: `${from ? from + '..' : ''}HEAD`},
- {...execaOptions, env: {...process.env, ...execaOptions.env}}
+ { _: `${from ? from + '..' : ''}HEAD` },
+ { ...execaOptions, env: { ...process.env, ...execaOptions.env } }
)
)
).map((commit) => {
@@ -127,7 +143,11 @@ async function gitGetCommits(from, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
async function gitCheckout(branch, create, execaOptions) {
- await execa('git', create ? ['checkout', '-b', branch] : ['checkout', branch], execaOptions);
+ await execa(
+ 'git',
+ create ? ['checkout', '-b', branch] : ['checkout', branch],
+ execaOptions
+ );
}
/**
@@ -159,7 +179,11 @@ async function gitHead(execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
async function gitTagVersion(tagName, sha, execaOptions) {
- await execa('git', sha ? ['tag', '-f', tagName, sha] : ['tag', tagName], execaOptions);
+ await execa(
+ 'git',
+ sha ? ['tag', '-f', tagName, sha] : ['tag', tagName],
+ execaOptions
+ );
}
/**
@@ -174,9 +198,23 @@ async function gitTagVersion(tagName, sha, execaOptions) {
async function gitShallowClone(repositoryUrl, branch = 'master', depth = 1) {
const cwd = tempy.directory();
- await execa('git', ['clone', '--no-hardlinks', '--no-tags', '-b', branch, '--depth', depth, repositoryUrl, cwd], {
- cwd,
- });
+ await execa(
+ 'git',
+ [
+ 'clone',
+ '--no-hardlinks',
+ '--no-tags',
+ '-b',
+ branch,
+ '--depth',
+ depth,
+ repositoryUrl,
+ cwd,
+ ],
+ {
+ cwd,
+ }
+ );
return cwd;
}
@@ -190,21 +228,25 @@ async function gitShallowClone(repositoryUrl, branch = 'master', depth = 1) {
async function gitDetachedHead(repositoryUrl, head) {
const cwd = tempy.directory();
- await execa('git', ['init'], {cwd});
- await execa('git', ['remote', 'add', 'origin', repositoryUrl], {cwd});
- await execa('git', ['fetch', repositoryUrl], {cwd});
- await execa('git', ['checkout', head], {cwd});
+ await execa('git', ['init'], { cwd });
+ await execa('git', ['remote', 'add', 'origin', repositoryUrl], { cwd });
+ await execa('git', ['fetch', repositoryUrl], { cwd });
+ await execa('git', ['checkout', head], { cwd });
return cwd;
}
async function gitDetachedHeadFromBranch(repositoryUrl, branch, head) {
const cwd = tempy.directory();
- await execa('git', ['init'], {cwd});
- await execa('git', ['remote', 'add', 'origin', repositoryUrl], {cwd});
- await execa('git', ['fetch', '--force', repositoryUrl, `${branch}:remotes/origin/${branch}`], {cwd});
- await execa('git', ['reset', '--hard', head], {cwd});
- await execa('git', ['checkout', '-q', '-B', branch], {cwd});
+ await execa('git', ['init'], { cwd });
+ await execa('git', ['remote', 'add', 'origin', repositoryUrl], { cwd });
+ await execa(
+ 'git',
+ ['fetch', '--force', repositoryUrl, `${branch}:remotes/origin/${branch}`],
+ { cwd }
+ );
+ await execa('git', ['reset', '--hard', head], { cwd });
+ await execa('git', ['checkout', '-q', '-B', branch], { cwd });
return cwd;
}
@@ -241,7 +283,13 @@ async function gitTagHead(tagName, execaOptions) {
* @return {String} The sha of the commit associated with `tagName` on the remote repository.
*/
async function gitRemoteTagHead(repositoryUrl, tagName, execaOptions) {
- return (await execa('git', ['ls-remote', '--tags', repositoryUrl, tagName], execaOptions)).stdout
+ return (
+ await execa(
+ 'git',
+ ['ls-remote', '--tags', repositoryUrl, tagName],
+ execaOptions
+ )
+ ).stdout
.split('\n')
.filter((tag) => Boolean(tag))
.map((tag) => tag.match(/^(?\S+)/)[1])[0];
@@ -256,7 +304,13 @@ async function gitRemoteTagHead(repositoryUrl, tagName, execaOptions) {
* @return {String} The tag associatedwith the sha in parameter or `null`.
*/
async function gitCommitTag(gitHead, execaOptions) {
- return (await execa('git', ['describe', '--tags', '--exact-match', gitHead], execaOptions)).stdout;
+ return (
+ await execa(
+ 'git',
+ ['describe', '--tags', '--exact-match', gitHead],
+ execaOptions
+ )
+ ).stdout;
}
/**
@@ -269,7 +323,11 @@ async function gitCommitTag(gitHead, execaOptions) {
* @throws {Error} if the push failed.
*/
async function gitPush(repositoryUrl, branch, execaOptions) {
- await execa('git', ['push', '--tags', repositoryUrl, `HEAD:${branch}`], execaOptions);
+ await execa(
+ 'git',
+ ['push', '--tags', repositoryUrl, `HEAD:${branch}`],
+ execaOptions
+ );
}
/**
@@ -310,7 +368,11 @@ async function rebase(ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
async function gitAddNote(note, ref, execaOptions) {
- await execa('git', ['notes', '--ref', GIT_NOTE_REF, 'add', '-m', note, ref], execaOptions);
+ await execa(
+ 'git',
+ ['notes', '--ref', GIT_NOTE_REF, 'add', '-m', note, ref],
+ execaOptions
+ );
}
/**
@@ -320,7 +382,13 @@ async function gitAddNote(note, ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
async function gitGetNote(ref, execaOptions) {
- return (await execa('git', ['notes', '--ref', GIT_NOTE_REF, 'show', ref], execaOptions)).stdout;
+ return (
+ await execa(
+ 'git',
+ ['notes', '--ref', GIT_NOTE_REF, 'show', ref],
+ execaOptions
+ )
+ ).stdout;
}
module.exports = {
diff --git a/test/helpers/gitbox.js b/test/helpers/gitbox.js
index 284408d5cd..fa51c24a3c 100644
--- a/test/helpers/gitbox.js
+++ b/test/helpers/gitbox.js
@@ -1,7 +1,7 @@
const Docker = require('dockerode');
const getStream = require('get-stream');
const pRetry = require('p-retry');
-const {initBareRepo, gitShallowClone} = require('./git-utils');
+const { initBareRepo, gitShallowClone } = require('./git-utils');
const IMAGE = 'pvdlg/docker-gitbox:latest';
const SERVER_PORT = 80;
@@ -23,7 +23,7 @@ async function start() {
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
- PortBindings: {[`${SERVER_PORT}/tcp`]: [{HostPort: `${HOST_PORT}`}]},
+ PortBindings: { [`${SERVER_PORT}/tcp`]: [{ HostPort: `${HOST_PORT}` }] },
});
await container.start();
@@ -51,7 +51,11 @@ async function stop() {
* @param {String} [description=`Repository ${name}`] The repository description.
* @return {Object} The `repositoryUrl` (URL without auth) and `authUrl` (URL with auth).
*/
-async function createRepo(name, branch = 'master', description = `Repository ${name}`) {
+async function createRepo(
+ name,
+ branch = 'master',
+ description = `Repository ${name}`
+) {
const exec = await container.exec({
Cmd: ['repo-admin', '-n', name, '-d', description],
AttachStdout: true,
@@ -63,10 +67,14 @@ async function createRepo(name, branch = 'master', description = `Repository ${n
const authUrl = `http://${gitCredential}@${SERVER_HOST}:${HOST_PORT}/git/${name}.git`;
// Retry as the server might take a few ms to make the repo available push
- await pRetry(() => initBareRepo(authUrl, branch), {retries: 5, minTimeout: 500, factor: 2});
+ await pRetry(() => initBareRepo(authUrl, branch), {
+ retries: 5,
+ minTimeout: 500,
+ factor: 2,
+ });
const cwd = await gitShallowClone(authUrl);
- return {cwd, repositoryUrl, authUrl};
+ return { cwd, repositoryUrl, authUrl };
}
-module.exports = {start, stop, gitCredential, createRepo};
+module.exports = { start, stop, gitCredential, createRepo };
diff --git a/test/helpers/mockserver.js b/test/helpers/mockserver.js
index 51db154525..e0b4827530 100644
--- a/test/helpers/mockserver.js
+++ b/test/helpers/mockserver.js
@@ -2,7 +2,7 @@ const Docker = require('dockerode');
const getStream = require('get-stream');
const got = require('got');
const pRetry = require('p-retry');
-const {mockServerClient} = require('mockserver-client');
+const { mockServerClient } = require('mockserver-client');
const IMAGE = 'jamesdbloom/mockserver:latest';
const MOCK_SERVER_PORT = 1080;
@@ -19,17 +19,25 @@ async function start() {
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
- PortBindings: {[`${MOCK_SERVER_PORT}/tcp`]: [{HostPort: `${MOCK_SERVER_PORT}`}]},
+ PortBindings: {
+ [`${MOCK_SERVER_PORT}/tcp`]: [{ HostPort: `${MOCK_SERVER_PORT}` }],
+ },
});
await container.start();
try {
// Wait for the mock server to be ready
- await pRetry(() => got.put(`http://${MOCK_SERVER_HOST}:${MOCK_SERVER_PORT}/status`, {cache: false}), {
- retries: 7,
- minTimeout: 1000,
- factor: 2,
- });
+ await pRetry(
+ () =>
+ got.put(`http://${MOCK_SERVER_HOST}:${MOCK_SERVER_PORT}/status`, {
+ cache: false,
+ }),
+ {
+ retries: 7,
+ minTimeout: 1000,
+ factor: 2,
+ }
+ );
} catch (_) {
throw new Error(`Couldn't start mock-server after 2 min`);
}
@@ -67,17 +75,19 @@ const url = `http://${MOCK_SERVER_HOST}:${MOCK_SERVER_PORT}`;
*/
async function mock(
path,
- {body: requestBody, headers: requestHeaders},
- {method = 'POST', statusCode = 200, body: responseBody}
+ { body: requestBody, headers: requestHeaders },
+ { method = 'POST', statusCode = 200, body: responseBody }
) {
await client.mockAnyResponse({
- httpRequest: {path, method},
+ httpRequest: { path, method },
httpResponse: {
statusCode,
- headers: [{name: 'Content-Type', values: ['application/json; charset=utf-8']}],
+ headers: [
+ { name: 'Content-Type', values: ['application/json; charset=utf-8'] },
+ ],
body: JSON.stringify(responseBody),
},
- times: {remainingTimes: 1, unlimited: false},
+ times: { remainingTimes: 1, unlimited: false },
});
return {
@@ -85,7 +95,11 @@ async function mock(
path,
headers: requestHeaders,
body: requestBody
- ? {type: 'JSON', json: JSON.stringify(requestBody), matchType: 'ONLY_MATCHING_FIELDS'}
+ ? {
+ type: 'JSON',
+ json: JSON.stringify(requestBody),
+ matchType: 'ONLY_MATCHING_FIELDS',
+ }
: undefined,
};
}
@@ -100,4 +114,4 @@ function verify(expectation) {
return client.verify(expectation);
}
-module.exports = {start, stop, mock, verify, url};
+module.exports = { start, stop, mock, verify, url };
diff --git a/test/helpers/npm-registry.js b/test/helpers/npm-registry.js
index e41bc1f8ce..0d3d9999b8 100644
--- a/test/helpers/npm-registry.js
+++ b/test/helpers/npm-registry.js
@@ -25,8 +25,11 @@ async function start() {
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
- PortBindings: {[`${COUCHDB_PORT}/tcp`]: [{HostPort: `${SERVER_PORT}`}]},
- Env: [`COUCHDB_USER=${COUCHDB_USER}`, `COUCHDB_PASSWORD=${COUCHDB_PASSWORD}`],
+ PortBindings: { [`${COUCHDB_PORT}/tcp`]: [{ HostPort: `${SERVER_PORT}` }] },
+ Env: [
+ `COUCHDB_USER=${COUCHDB_USER}`,
+ `COUCHDB_PASSWORD=${COUCHDB_PASSWORD}`,
+ ],
});
await container.start();
@@ -34,29 +37,38 @@ async function start() {
try {
// Wait for the registry to be ready
- await pRetry(() => got(`http://${SERVER_HOST}:${SERVER_PORT}/registry/_design/app`, {cache: false}), {
- retries: 7,
- minTimeout: 1000,
- factor: 2,
- });
+ await pRetry(
+ () =>
+ got(`http://${SERVER_HOST}:${SERVER_PORT}/registry/_design/app`, {
+ cache: false,
+ }),
+ {
+ retries: 7,
+ minTimeout: 1000,
+ factor: 2,
+ }
+ );
} catch (_) {
throw new Error(`Couldn't start npm-registry-docker after 2 min`);
}
// Create user
- await got(`http://${SERVER_HOST}:${SERVER_PORT}/_users/org.couchdb.user:${NPM_USERNAME}`, {
- username: COUCHDB_USER,
- password: COUCHDB_PASSWORD,
- method: 'PUT',
- json: {
- _id: `org.couchdb.user:${NPM_USERNAME}`,
- name: NPM_USERNAME,
- roles: [],
- type: 'user',
- password: NPM_PASSWORD,
- email: NPM_EMAIL,
- },
- });
+ await got(
+ `http://${SERVER_HOST}:${SERVER_PORT}/_users/org.couchdb.user:${NPM_USERNAME}`,
+ {
+ username: COUCHDB_USER,
+ password: COUCHDB_PASSWORD,
+ method: 'PUT',
+ json: {
+ _id: `org.couchdb.user:${NPM_USERNAME}`,
+ name: NPM_USERNAME,
+ roles: [],
+ type: 'user',
+ password: NPM_PASSWORD,
+ email: NPM_EMAIL,
+ },
+ }
+ );
}
const url = `http://${SERVER_HOST}:${SERVER_PORT}/registry/_design/app/_rewrite/`;
@@ -76,4 +88,4 @@ async function stop() {
await container.remove();
}
-module.exports = {start, stop, authEnv, url};
+module.exports = { start, stop, authEnv, url };
diff --git a/test/helpers/npm-utils.js b/test/helpers/npm-utils.js
index 942a31ead4..92e391497d 100644
--- a/test/helpers/npm-utils.js
+++ b/test/helpers/npm-utils.js
@@ -1,7 +1,9 @@
const execa = require('execa');
async function npmView(packageName, env) {
- return JSON.parse((await execa('npm', ['view', packageName, '--json'], {env})).stdout);
+ return JSON.parse(
+ (await execa('npm', ['view', packageName, '--json'], { env })).stdout
+ );
}
-module.exports = {npmView};
+module.exports = { npmView };
diff --git a/test/hide-sensitive.test.js b/test/hide-sensitive.test.js
index 14686839e2..8a0e6e0850 100644
--- a/test/hide-sensitive.test.js
+++ b/test/hide-sensitive.test.js
@@ -1,31 +1,41 @@
const test = require('ava');
-const {repeat} = require('lodash');
+const { repeat } = require('lodash');
const hideSensitive = require('../lib/hide-sensitive');
-const {SECRET_REPLACEMENT, SECRET_MIN_SIZE} = require('../lib/definitions/constants');
+const {
+ SECRET_REPLACEMENT,
+ SECRET_MIN_SIZE,
+} = require('../lib/definitions/constants');
test('Replace multiple sensitive environment variable values', (t) => {
- const env = {SOME_PASSWORD: 'password', SOME_TOKEN: 'secret'};
+ const env = { SOME_PASSWORD: 'password', SOME_TOKEN: 'secret' };
t.is(
- hideSensitive(env)(`https://user:${env.SOME_PASSWORD}@host.com?token=${env.SOME_TOKEN}`),
+ hideSensitive(env)(
+ `https://user:${env.SOME_PASSWORD}@host.com?token=${env.SOME_TOKEN}`
+ ),
`https://user:${SECRET_REPLACEMENT}@host.com?token=${SECRET_REPLACEMENT}`
);
});
test('Replace multiple occurences of sensitive environment variable values', (t) => {
- const env = {secretKey: 'secret'};
+ const env = { secretKey: 'secret' };
t.is(
- hideSensitive(env)(`https://user:${env.secretKey}@host.com?token=${env.secretKey}`),
+ hideSensitive(env)(
+ `https://user:${env.secretKey}@host.com?token=${env.secretKey}`
+ ),
`https://user:${SECRET_REPLACEMENT}@host.com?token=${SECRET_REPLACEMENT}`
);
});
test('Replace sensitive environment variable matching specific regex for "private"', (t) => {
- const env = {privateKey: 'secret', GOPRIVATE: 'host.com'};
- t.is(hideSensitive(env)(`https://host.com?token=${env.privateKey}`), `https://host.com?token=${SECRET_REPLACEMENT}`);
+ const env = { privateKey: 'secret', GOPRIVATE: 'host.com' };
+ t.is(
+ hideSensitive(env)(`https://host.com?token=${env.privateKey}`),
+ `https://host.com?token=${SECRET_REPLACEMENT}`
+ );
});
test('Replace url-encoded environment variable', (t) => {
- const env = {privateKey: 'secret '};
+ const env = { privateKey: 'secret ' };
t.is(
hideSensitive(env)(`https://host.com?token=${encodeURI(env.privateKey)}`),
`https://host.com?token=${SECRET_REPLACEMENT}`
@@ -33,7 +43,7 @@ test('Replace url-encoded environment variable', (t) => {
});
test('Escape regexp special characters', (t) => {
- const env = {SOME_CREDENTIALS: 'p$^{.+}\\w[a-z]o.*rd'};
+ const env = { SOME_CREDENTIALS: 'p$^{.+}\\w[a-z]o.*rd' };
t.is(
hideSensitive(env)(`https://user:${env.SOME_CREDENTIALS}@host.com`),
`https://user:${SECRET_REPLACEMENT}@host.com`
@@ -41,7 +51,7 @@ test('Escape regexp special characters', (t) => {
});
test('Escape regexp special characters in url-encoded environment variable', (t) => {
- const env = {SOME_PASSWORD: 'secret password p$^{.+}\\w[a-z]o.*rd)('};
+ const env = { SOME_PASSWORD: 'secret password p$^{.+}\\w[a-z]o.*rd)(' };
t.is(
hideSensitive(env)(`https://user:${encodeURI(env.SOME_PASSWORD)}@host.com`),
`https://user:${SECRET_REPLACEMENT}@host.com`
@@ -57,7 +67,7 @@ test('Return same string if no environment variable has to be replaced', (t) =>
});
test('Exclude empty environment variables from the regexp', (t) => {
- const env = {SOME_PASSWORD: 'password', SOME_TOKEN: ''};
+ const env = { SOME_PASSWORD: 'password', SOME_TOKEN: '' };
t.is(
hideSensitive(env)(`https://user:${env.SOME_PASSWORD}@host.com?token=`),
`https://user:${SECRET_REPLACEMENT}@host.com?token=`
@@ -65,20 +75,30 @@ test('Exclude empty environment variables from the regexp', (t) => {
});
test('Exclude empty environment variables from the regexp if there is only empty ones', (t) => {
- t.is(hideSensitive({SOME_PASSWORD: '', SOME_TOKEN: ' \n '})(`https://host.com?token=`), 'https://host.com?token=');
+ t.is(
+ hideSensitive({ SOME_PASSWORD: '', SOME_TOKEN: ' \n ' })(
+ `https://host.com?token=`
+ ),
+ 'https://host.com?token='
+ );
});
test('Exclude nonsensitive GOPRIVATE environment variable for Golang projects from the regexp', (t) => {
- const env = {GOPRIVATE: 'host.com'};
- t.is(hideSensitive(env)(`https://host.com?token=`), 'https://host.com?token=');
+ const env = { GOPRIVATE: 'host.com' };
+ t.is(
+ hideSensitive(env)(`https://host.com?token=`),
+ 'https://host.com?token='
+ );
});
test('Exclude environment variables with value shorter than SECRET_MIN_SIZE from the regexp', (t) => {
const SHORT_TOKEN = repeat('a', SECRET_MIN_SIZE - 1);
const LONG_TOKEN = repeat('b', SECRET_MIN_SIZE);
- const env = {SHORT_TOKEN, LONG_TOKEN};
+ const env = { SHORT_TOKEN, LONG_TOKEN };
t.is(
- hideSensitive(env)(`https://user:${SHORT_TOKEN}@host.com?token=${LONG_TOKEN}`),
+ hideSensitive(env)(
+ `https://user:${SHORT_TOKEN}@host.com?token=${LONG_TOKEN}`
+ ),
`https://user:${SHORT_TOKEN}@host.com?token=${SECRET_REPLACEMENT}`
);
});
diff --git a/test/index.test.js b/test/index.test.js
index 0b93d43af3..62b27f0c7b 100644
--- a/test/index.test.js
+++ b/test/index.test.js
@@ -1,11 +1,15 @@
const test = require('ava');
-const {escapeRegExp, isString, sortBy, omit} = require('lodash');
+const { escapeRegExp, isString, sortBy, omit } = require('lodash');
const proxyquire = require('proxyquire');
-const {spy, stub} = require('sinon');
-const {WritableStreamBuffer} = require('stream-buffers');
+const { spy, stub } = require('sinon');
+const { WritableStreamBuffer } = require('stream-buffers');
const AggregateError = require('aggregate-error');
const SemanticReleaseError = require('@semantic-release/error');
-const {COMMIT_NAME, COMMIT_EMAIL, SECRET_REPLACEMENT} = require('../lib/definitions/constants');
+const {
+ COMMIT_NAME,
+ COMMIT_EMAIL,
+ SECRET_REPLACEMENT,
+} = require('../lib/definitions/constants');
const {
gitHead: getGitHead,
gitCheckout,
@@ -43,17 +47,17 @@ test.beforeEach((t) => {
test('Plugins are called with expected values', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- let commits = await gitCommits(['First'], {cwd});
+ let commits = await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v1.0.0', {cwd});
- commits = (await gitCommits(['Second'], {cwd})).concat(commits);
- await gitCheckout('next', true, {cwd});
- await gitPush(repositoryUrl, 'next', {cwd});
- await gitCheckout('master', false, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v1.0.0', { cwd });
+ commits = (await gitCommits(['Second'], { cwd })).concat(commits);
+ await gitCheckout('next', true, { cwd });
+ await gitPush(repositoryUrl, 'next', { cwd });
+ await gitCheckout('master', false, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const lastRelease = {
version: '1.0.0',
@@ -66,7 +70,7 @@ test('Plugins are called with expected values', async (t) => {
name: 'v1.1.0',
type: 'minor',
version: '1.1.0',
- gitHead: await getGitHead({cwd}),
+ gitHead: await getGitHead({ cwd }),
gitTag: 'v1.1.0',
channel: null,
};
@@ -80,15 +84,15 @@ test('Plugins are called with expected values', async (t) => {
const generateNotes1 = stub().resolves(notes1);
const generateNotes2 = stub().resolves(notes2);
const generateNotes3 = stub().resolves(notes3);
- const release1 = {name: 'Release 1', url: 'https://release1.com'};
- const release2 = {name: 'Release 2', url: 'https://release2.com'};
+ const release1 = { name: 'Release 1', url: 'https://release1.com' };
+ const release2 = { name: 'Release 2', url: 'https://release2.com' };
const addChannel = stub().resolves(release1);
const prepare = stub().resolves();
const publish = stub().resolves(release2);
const success = stub().resolves();
const env = {};
const config = {
- branches: [{name: 'master'}, {name: 'next'}],
+ branches: [{ name: 'master' }, { name: 'next' }],
repositoryUrl,
globalOpt: 'global',
tagFormat: `v\${version}`,
@@ -99,7 +103,7 @@ test('Plugins are called with expected values', async (t) => {
name: 'master',
range: '>=1.0.0',
accept: ['patch', 'minor', 'major'],
- tags: [{channels: ['next'], gitTag: 'v1.0.0', version: '1.0.0'}],
+ tags: [{ channels: ['next'], gitTag: 'v1.0.0', version: '1.0.0' }],
type: 'release',
main: true,
},
@@ -108,7 +112,7 @@ test('Plugins are called with expected values', async (t) => {
name: 'next',
range: '>=1.0.0',
accept: ['patch', 'minor', 'major'],
- tags: [{channels: ['next'], gitTag: 'v1.0.0', version: '1.0.0'}],
+ tags: [{ channels: ['next'], gitTag: 'v1.0.0', version: '1.0.0' }],
type: 'release',
main: false,
},
@@ -126,7 +130,7 @@ test('Plugins are called with expected values', async (t) => {
publish: [publish, pluginNoop],
success,
};
- const envCi = {branch: 'master', isCi: true, isPr: false};
+ const envCi = { branch: 'master', isCi: true, isPr: false };
const releases = [
{
@@ -139,8 +143,17 @@ test('Plugins are called with expected values', async (t) => {
notes: `${notes1}\n\n${notes2}\n\n${notes3}`,
pluginName: '[Function: functionStub]',
},
- {...nextRelease, ...release2, notes: `${notes1}\n\n${notes2}\n\n${notes3}`, pluginName: '[Function: functionStub]'},
- {...nextRelease, notes: `${notes1}\n\n${notes2}\n\n${notes3}`, pluginName: pluginNoop},
+ {
+ ...nextRelease,
+ ...release2,
+ notes: `${notes1}\n\n${notes2}\n\n${notes3}`,
+ pluginName: '[Function: functionStub]',
+ },
+ {
+ ...nextRelease,
+ notes: `${notes1}\n\n${notes2}\n\n${notes3}`,
+ pluginName: pluginNoop,
+ },
];
const semanticRelease = requireNoCache('..', {
@@ -245,7 +258,10 @@ test('Plugins are called with expected values', async (t) => {
t.deepEqual(addChannel.args[0][1].branches, branches);
t.deepEqual(addChannel.args[0][1].logger, t.context.logger);
t.deepEqual(addChannel.args[0][1].lastRelease, {});
- t.deepEqual(addChannel.args[0][1].currentRelease, {...lastRelease, type: 'major'});
+ t.deepEqual(addChannel.args[0][1].currentRelease, {
+ ...lastRelease,
+ type: 'major',
+ });
t.deepEqual(addChannel.args[0][1].nextRelease, {
...omit(lastRelease, 'channels'),
type: 'major',
@@ -301,7 +317,10 @@ test('Plugins are called with expected values', async (t) => {
t.deepEqual(generateNotes2.args[1][1].lastRelease, lastRelease);
t.deepEqual(generateNotes2.args[1][1].commits[0].hash, commits[0].hash);
t.deepEqual(generateNotes2.args[1][1].commits[0].message, commits[0].message);
- t.deepEqual(generateNotes2.args[1][1].nextRelease, {...nextRelease, notes: notes1});
+ t.deepEqual(generateNotes2.args[1][1].nextRelease, {
+ ...nextRelease,
+ notes: notes1,
+ });
t.deepEqual(generateNotes2.args[1][1].envCi, envCi);
t.deepEqual(generateNotes3.args[1][0], config);
@@ -312,7 +331,10 @@ test('Plugins are called with expected values', async (t) => {
t.deepEqual(generateNotes3.args[1][1].lastRelease, lastRelease);
t.deepEqual(generateNotes3.args[1][1].commits[0].hash, commits[0].hash);
t.deepEqual(generateNotes3.args[1][1].commits[0].message, commits[0].message);
- t.deepEqual(generateNotes3.args[1][1].nextRelease, {...nextRelease, notes: `${notes1}\n\n${notes2}`});
+ t.deepEqual(generateNotes3.args[1][1].nextRelease, {
+ ...nextRelease,
+ notes: `${notes1}\n\n${notes2}`,
+ });
t.deepEqual(generateNotes3.args[1][1].envCi, envCi);
t.is(prepare.callCount, 1);
@@ -324,7 +346,10 @@ test('Plugins are called with expected values', async (t) => {
t.deepEqual(prepare.args[0][1].lastRelease, lastRelease);
t.deepEqual(prepare.args[0][1].commits[0].hash, commits[0].hash);
t.deepEqual(prepare.args[0][1].commits[0].message, commits[0].message);
- t.deepEqual(prepare.args[0][1].nextRelease, {...nextRelease, notes: `${notes1}\n\n${notes2}\n\n${notes3}`});
+ t.deepEqual(prepare.args[0][1].nextRelease, {
+ ...nextRelease,
+ notes: `${notes1}\n\n${notes2}\n\n${notes3}`,
+ });
t.deepEqual(prepare.args[0][1].envCi, envCi);
t.is(publish.callCount, 1);
@@ -336,7 +361,10 @@ test('Plugins are called with expected values', async (t) => {
t.deepEqual(publish.args[0][1].lastRelease, lastRelease);
t.deepEqual(publish.args[0][1].commits[0].hash, commits[0].hash);
t.deepEqual(publish.args[0][1].commits[0].message, commits[0].message);
- t.deepEqual(publish.args[0][1].nextRelease, {...nextRelease, notes: `${notes1}\n\n${notes2}\n\n${notes3}`});
+ t.deepEqual(publish.args[0][1].nextRelease, {
+ ...nextRelease,
+ notes: `${notes1}\n\n${notes2}\n\n${notes3}`,
+ });
t.deepEqual(publish.args[0][1].envCi, envCi);
t.is(success.callCount, 2);
@@ -368,20 +396,29 @@ test('Plugins are called with expected values', async (t) => {
t.deepEqual(success.args[1][1].lastRelease, lastRelease);
t.deepEqual(success.args[1][1].commits[0].hash, commits[0].hash);
t.deepEqual(success.args[1][1].commits[0].message, commits[0].message);
- t.deepEqual(success.args[1][1].nextRelease, {...nextRelease, notes: `${notes1}\n\n${notes2}\n\n${notes3}`});
+ t.deepEqual(success.args[1][1].nextRelease, {
+ ...nextRelease,
+ notes: `${notes1}\n\n${notes2}\n\n${notes3}`,
+ });
t.deepEqual(success.args[1][1].releases, [releases[1], releases[2]]);
t.deepEqual(success.args[1][1].envCi, envCi);
t.deepEqual(result, {
lastRelease,
- commits: [{...commits[0], gitTags: '(HEAD -> master, next)'}],
- nextRelease: {...nextRelease, notes: `${notes1}\n\n${notes2}\n\n${notes3}`},
+ commits: [{ ...commits[0], gitTags: '(HEAD -> master, next)' }],
+ nextRelease: {
+ ...nextRelease,
+ notes: `${notes1}\n\n${notes2}\n\n${notes3}`,
+ },
releases,
});
// Verify the tag has been created on the local and remote repo and reference the gitHead
- t.is(await gitTagHead(nextRelease.gitTag, {cwd}), nextRelease.gitHead);
- t.is(await gitRemoteTagHead(repositoryUrl, nextRelease.gitTag, {cwd}), nextRelease.gitHead);
+ t.is(await gitTagHead(nextRelease.gitTag, { cwd }), nextRelease.gitHead);
+ t.is(
+ await gitRemoteTagHead(repositoryUrl, nextRelease.gitTag, { cwd }),
+ nextRelease.gitHead
+ );
// Verify the author/commiter name and email have been set
t.is(env.GIT_AUTHOR_NAME, COMMIT_NAME);
@@ -391,21 +428,26 @@ test('Plugins are called with expected values', async (t) => {
});
test('Use custom tag format', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitTagVersion('test-1.0.0', undefined, {cwd});
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('test-1.0.0', undefined, { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const nextRelease = {
name: 'test-2.0.0',
type: 'major',
version: '2.0.0',
- gitHead: await getGitHead({cwd}),
+ gitHead: await getGitHead({ cwd }),
gitTag: 'test-2.0.0',
};
const notes = 'Release notes';
- const config = {branches: 'master', repositoryUrl, globalOpt: 'global', tagFormat: `test-\${version}`};
+ const config = {
+ branches: 'master',
+ repositoryUrl,
+ globalOpt: 'global',
+ tagFormat: `test-\${version}`,
+ };
const options = {
...config,
verifyConditions: stub().resolves(),
@@ -421,7 +463,7 @@ test('Use custom tag format', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.truthy(
await semanticRelease(options, {
@@ -433,26 +475,29 @@ test('Use custom tag format', async (t) => {
);
// Verify the tag has been created on the local and remote repo and reference the gitHead
- t.is(await gitTagHead(nextRelease.gitTag, {cwd}), nextRelease.gitHead);
- t.is(await gitRemoteTagHead(repositoryUrl, nextRelease.gitTag, {cwd}), nextRelease.gitHead);
+ t.is(await gitTagHead(nextRelease.gitTag, { cwd }), nextRelease.gitHead);
+ t.is(
+ await gitRemoteTagHead(repositoryUrl, nextRelease.gitTag, { cwd }),
+ nextRelease.gitHead
+ );
});
test('Use new gitHead, and recreate release notes if a prepare plugin create a commit', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- let commits = await gitCommits(['First'], {cwd});
+ let commits = await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
// Add new commits to the master branch
- commits = (await gitCommits(['Second'], {cwd})).concat(commits);
- await gitPush(repositoryUrl, 'master', {cwd});
+ commits = (await gitCommits(['Second'], { cwd })).concat(commits);
+ await gitPush(repositoryUrl, 'master', { cwd });
const nextRelease = {
name: 'v2.0.0',
type: 'major',
version: '2.0.0',
- gitHead: await getGitHead({cwd}),
+ gitHead: await getGitHead({ cwd }),
gitTag: 'v2.0.0',
channel: null,
};
@@ -460,7 +505,7 @@ test('Use new gitHead, and recreate release notes if a prepare plugin create a c
const generateNotes = stub().resolves(notes);
const prepare1 = stub().callsFake(async () => {
- commits = (await gitCommits(['Third'], {cwd})).concat(commits);
+ commits = (await gitCommits(['Third'], { cwd })).concat(commits);
});
const prepare2 = stub().resolves();
const publish = stub().resolves();
@@ -480,7 +525,7 @@ test('Use new gitHead, and recreate release notes if a prepare plugin create a c
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.truthy(
@@ -495,37 +540,42 @@ test('Use new gitHead, and recreate release notes if a prepare plugin create a c
t.is(generateNotes.callCount, 2);
t.deepEqual(generateNotes.args[0][1].nextRelease, nextRelease);
t.is(prepare1.callCount, 1);
- t.deepEqual(prepare1.args[0][1].nextRelease, {...nextRelease, notes});
+ t.deepEqual(prepare1.args[0][1].nextRelease, { ...nextRelease, notes });
- nextRelease.gitHead = await getGitHead({cwd});
+ nextRelease.gitHead = await getGitHead({ cwd });
- t.deepEqual(generateNotes.args[1][1].nextRelease, {...nextRelease, notes});
+ t.deepEqual(generateNotes.args[1][1].nextRelease, { ...nextRelease, notes });
t.is(prepare2.callCount, 1);
- t.deepEqual(prepare2.args[0][1].nextRelease, {...nextRelease, notes});
+ t.deepEqual(prepare2.args[0][1].nextRelease, { ...nextRelease, notes });
t.is(publish.callCount, 1);
- t.deepEqual(publish.args[0][1].nextRelease, {...nextRelease, notes});
+ t.deepEqual(publish.args[0][1].nextRelease, { ...nextRelease, notes });
// Verify the tag has been created on the local and remote repo and reference the last gitHead
- t.is(await gitTagHead(nextRelease.gitTag, {cwd}), commits[0].hash);
- t.is(await gitRemoteTagHead(repositoryUrl, nextRelease.gitTag, {cwd}), commits[0].hash);
+ t.is(await gitTagHead(nextRelease.gitTag, { cwd }), commits[0].hash);
+ t.is(
+ await gitRemoteTagHead(repositoryUrl, nextRelease.gitTag, { cwd }),
+ commits[0].hash
+ );
});
test('Make a new release when a commit is forward-ported to an upper branch', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['feat: initial release'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, '1.0.x']}), 'v1.0.0', {cwd});
- await gitCheckout('1.0.x', true, {cwd});
- await gitCommits(['fix: fix on maintenance version 1.0.x'], {cwd});
- await gitTagVersion('v1.0.1', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['1.0.x']}), 'v1.0.1', {cwd});
- await gitPush('origin', '1.0.x', {cwd});
- await gitCheckout('master', false, {cwd});
- await gitCommits(['feat: new feature on master'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await merge('1.0.x', {cwd});
- await gitPush('origin', 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['feat: initial release'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, '1.0.x'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCheckout('1.0.x', true, { cwd });
+ await gitCommits(['fix: fix on maintenance version 1.0.x'], { cwd });
+ await gitTagVersion('v1.0.1', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['1.0.x'] }), 'v1.0.1', { cwd });
+ await gitPush('origin', '1.0.x', { cwd });
+ await gitCheckout('master', false, { cwd });
+ await gitCommits(['feat: new feature on master'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await merge('1.0.x', { cwd });
+ await gitPush('origin', 'master', { cwd });
const verifyConditions = stub().resolves();
const verifyRelease = stub().resolves();
@@ -534,7 +584,11 @@ test('Make a new release when a commit is forward-ported to an upper branch', as
const publish = stub().resolves();
const success = stub().resolves();
- const config = {branches: [{name: '1.0.x'}, {name: 'master'}], repositoryUrl, tagFormat: `v\${version}`};
+ const config = {
+ branches: [{ name: '1.0.x' }, { name: 'master' }],
+ repositoryUrl,
+ tagFormat: `v\${version}`,
+ };
const options = {
...config,
verifyConditions,
@@ -547,9 +601,16 @@ test('Make a new release when a commit is forward-ported to an upper branch', as
const semanticRelease = proxyquire('..', {
'./lib/logger': t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
- t.truthy(await semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}}));
+ t.truthy(
+ await semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
+ })
+ );
t.is(addChannel.callCount, 0);
t.is(publish.callCount, 1);
@@ -559,15 +620,18 @@ test('Make a new release when a commit is forward-ported to an upper branch', as
});
test('Publish a pre-release version', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['feat: initial commit'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('beta', true, {cwd});
- await gitCommits(['feat: a feature'], {cwd});
- await gitPush(repositoryUrl, 'beta', {cwd});
-
- const config = {branches: ['master', {name: 'beta', prerelease: true}], repositoryUrl};
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['feat: initial commit'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('beta', true, { cwd });
+ await gitCommits(['feat: a feature'], { cwd });
+ await gitPush(repositoryUrl, 'beta', { cwd });
+
+ const config = {
+ branches: ['master', { name: 'beta', prerelease: true }],
+ repositoryUrl,
+ };
const options = {
...config,
verifyConditions: stub().resolves(),
@@ -582,42 +646,51 @@ test('Publish a pre-release version', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'beta', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'beta', isPr: false }),
+ });
+ let { releases } = await semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
});
- let {releases} = await semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}});
t.is(releases.length, 1);
t.is(releases[0].version, '1.1.0-beta.1');
t.is(releases[0].gitTag, 'v1.1.0-beta.1');
- t.is(await gitGetNote('v1.1.0-beta.1', {cwd}), '{"channels":["beta"]}');
+ t.is(await gitGetNote('v1.1.0-beta.1', { cwd }), '{"channels":["beta"]}');
- await gitCommits(['fix: a fix'], {cwd});
- ({releases} = await semanticRelease(options, {
+ await gitCommits(['fix: a fix'], { cwd });
+ ({ releases } = await semanticRelease(options, {
cwd,
env: {},
- stdout: {write: () => {}},
- stderr: {write: () => {}},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
}));
t.is(releases.length, 1);
t.is(releases[0].version, '1.1.0-beta.2');
t.is(releases[0].gitTag, 'v1.1.0-beta.2');
- t.is(await gitGetNote('v1.1.0-beta.2', {cwd}), '{"channels":["beta"]}');
+ t.is(await gitGetNote('v1.1.0-beta.2', { cwd }), '{"channels":["beta"]}');
});
test('Publish releases from different branch on the same channel', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['feat: initial commit'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('next-major', true, {cwd});
- await gitPush(repositoryUrl, 'next-major', {cwd});
- await gitCheckout('next', true, {cwd});
- await gitCommits(['feat: a feature'], {cwd});
- await gitPush(repositoryUrl, 'next', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['feat: initial commit'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('next-major', true, { cwd });
+ await gitPush(repositoryUrl, 'next-major', { cwd });
+ await gitCheckout('next', true, { cwd });
+ await gitCommits(['feat: a feature'], { cwd });
+ await gitPush(repositoryUrl, 'next', { cwd });
const config = {
- branches: ['master', {name: 'next', channel: false}, {name: 'next-major', channel: false}],
+ branches: [
+ 'master',
+ { name: 'next', channel: false },
+ { name: 'next-major', channel: false },
+ ],
repositoryUrl,
};
const addChannel = stub().resolves({});
@@ -635,50 +708,62 @@ test('Publish releases from different branch on the same channel', async (t) =>
let semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'next', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'next', isPr: false }),
+ });
+ let { releases } = await semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
});
- let {releases} = await semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}});
t.is(releases.length, 1);
t.is(releases[0].version, '1.1.0');
t.is(releases[0].gitTag, 'v1.1.0');
- await gitCommits(['fix: a fix'], {cwd});
- ({releases} = await semanticRelease(options, {
+ await gitCommits(['fix: a fix'], { cwd });
+ ({ releases } = await semanticRelease(options, {
cwd,
env: {},
- stdout: {write: () => {}},
- stderr: {write: () => {}},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
}));
t.is(releases.length, 1);
t.is(releases[0].version, '1.1.1');
t.is(releases[0].gitTag, 'v1.1.1');
- await gitCheckout('master', false, {cwd});
- await merge('next', {cwd});
- await gitPush('origin', 'master', {cwd});
+ await gitCheckout('master', false, { cwd });
+ await merge('next', { cwd });
+ await gitPush('origin', 'master', { cwd });
semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
- t.falsy(await semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}}));
+ t.falsy(
+ await semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
+ })
+ );
t.is(addChannel.callCount, 0);
});
test('Publish pre-releases the same channel as regular releases', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['feat: initial commit'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('beta', true, {cwd});
- await gitCommits(['feat: a feature'], {cwd});
- await gitPush(repositoryUrl, 'beta', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['feat: initial commit'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('beta', true, { cwd });
+ await gitCommits(['feat: a feature'], { cwd });
+ await gitPush(repositoryUrl, 'beta', { cwd });
const config = {
- branches: ['master', {name: 'beta', channel: false, prerelease: true}],
+ branches: ['master', { name: 'beta', channel: false, prerelease: true }],
repositoryUrl,
};
const options = {
@@ -695,20 +780,25 @@ test('Publish pre-releases the same channel as regular releases', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'beta', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'beta', isPr: false }),
+ });
+ let { releases } = await semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
});
- let {releases} = await semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}});
t.is(releases.length, 1);
t.is(releases[0].version, '1.1.0-beta.1');
t.is(releases[0].gitTag, 'v1.1.0-beta.1');
- await gitCommits(['fix: a fix'], {cwd});
- ({releases} = await semanticRelease(options, {
+ await gitCommits(['fix: a fix'], { cwd });
+ ({ releases } = await semanticRelease(options, {
cwd,
env: {},
- stdout: {write: () => {}},
- stderr: {write: () => {}},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
}));
t.is(releases.length, 1);
@@ -717,33 +807,42 @@ test('Publish pre-releases the same channel as regular releases', async (t) => {
});
test('Do not add pre-releases to a different channel', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['feat: initial release'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'beta']}), 'v1.0.0', {cwd});
- await gitCheckout('beta', true, {cwd});
- await gitCommits(['feat: breaking change/n/nBREAKING CHANGE: break something'], {cwd});
- await gitTagVersion('v2.0.0-beta.1', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['beta']}), 'v2.0.0-beta.1', {cwd});
- await gitCommits(['fix: a fix'], {cwd});
- await gitTagVersion('v2.0.0-beta.2', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['beta']}), 'v2.0.0-beta.2', {cwd});
- await gitPush('origin', 'beta', {cwd});
- await gitCheckout('master', false, {cwd});
- await merge('beta', {cwd});
- await gitPush('origin', 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['feat: initial release'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'beta'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCheckout('beta', true, { cwd });
+ await gitCommits(
+ ['feat: breaking change/n/nBREAKING CHANGE: break something'],
+ { cwd }
+ );
+ await gitTagVersion('v2.0.0-beta.1', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['beta'] }), 'v2.0.0-beta.1', {
+ cwd,
+ });
+ await gitCommits(['fix: a fix'], { cwd });
+ await gitTagVersion('v2.0.0-beta.2', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['beta'] }), 'v2.0.0-beta.2', {
+ cwd,
+ });
+ await gitPush('origin', 'beta', { cwd });
+ await gitCheckout('master', false, { cwd });
+ await merge('beta', { cwd });
+ await gitPush('origin', 'master', { cwd });
const verifyConditions = stub().resolves();
const verifyRelease = stub().resolves();
const generateNotes = stub().resolves('Release notes');
- const release1 = {name: 'Release 1', url: 'https://release1.com'};
+ const release1 = { name: 'Release 1', url: 'https://release1.com' };
const addChannel = stub().resolves(release1);
const prepare = stub().resolves();
const publish = stub().resolves();
const success = stub().resolves();
const config = {
- branches: [{name: 'master'}, {name: 'beta', prerelease: 'beta'}],
+ branches: [{ name: 'master' }, { name: 'beta', prerelease: 'beta' }],
repositoryUrl,
tagFormat: `v\${version}`,
};
@@ -761,40 +860,54 @@ test('Do not add pre-releases to a different channel', async (t) => {
const semanticRelease = proxyquire('..', {
'./lib/logger': t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
- t.truthy(await semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}}));
+ t.truthy(
+ await semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
+ })
+ );
t.is(addChannel.callCount, 0);
});
async function addChannelMacro(t, mergeFunction) {
- const {cwd, repositoryUrl} = await gitRepo(true);
- const commits = await gitCommits(['feat: initial release'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'next']}), 'v1.0.0', {cwd});
- await gitCheckout('next', true, {cwd});
- commits.push(...(await gitCommits(['feat: breaking change/n/nBREAKING CHANGE: break something'], {cwd})));
- await gitTagVersion('v2.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v2.0.0', {cwd});
-
- commits.push(...(await gitCommits(['fix: a fix'], {cwd})));
- await gitTagVersion('v2.0.1', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v2.0.1', {cwd});
- commits.push(...(await gitCommits(['feat: a feature'], {cwd})));
- await gitTagVersion('v2.1.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v2.1.0', {cwd});
- await gitPush('origin', 'next', {cwd});
- await gitCheckout('master', false, {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ const commits = await gitCommits(['feat: initial release'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'next'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCheckout('next', true, { cwd });
+ commits.push(
+ ...(await gitCommits(
+ ['feat: breaking change/n/nBREAKING CHANGE: break something'],
+ { cwd }
+ ))
+ );
+ await gitTagVersion('v2.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v2.0.0', { cwd });
+
+ commits.push(...(await gitCommits(['fix: a fix'], { cwd })));
+ await gitTagVersion('v2.0.1', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v2.0.1', { cwd });
+ commits.push(...(await gitCommits(['feat: a feature'], { cwd })));
+ await gitTagVersion('v2.1.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v2.1.0', { cwd });
+ await gitPush('origin', 'next', { cwd });
+ await gitCheckout('master', false, { cwd });
// Merge all commits but last one from next to master
- await mergeFunction('next~1', {cwd});
- await gitPush('origin', 'master', {cwd});
+ await mergeFunction('next~1', { cwd });
+ await gitPush('origin', 'master', { cwd });
const notes = 'Release notes';
const verifyConditions = stub().resolves();
const verifyRelease = stub().resolves();
const generateNotes = stub().resolves(notes);
- const release1 = {name: 'Release 1', url: 'https://release1.com'};
+ const release1 = { name: 'Release 1', url: 'https://release1.com' };
const addChannel1 = stub().resolves(release1);
const addChannel2 = stub().resolves();
const prepare = stub().resolves();
@@ -803,8 +916,8 @@ async function addChannelMacro(t, mergeFunction) {
const config = {
branches: [
- {name: 'master', channel: 'latest'},
- {name: 'next', channel: 'next'},
+ { name: 'master', channel: 'latest' },
+ { name: 'next', channel: 'next' },
],
repositoryUrl,
tagFormat: `v\${version}`,
@@ -830,21 +943,35 @@ async function addChannelMacro(t, mergeFunction) {
const semanticRelease = proxyquire('..', {
'./lib/logger': t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
+ });
+ const result = await semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
});
- const result = await semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}});
t.deepEqual(result.releases, [
- {...nextRelease, ...release1, notes, pluginName: '[Function: functionStub]'},
- {...nextRelease, notes, pluginName: '[Function: functionStub]'},
+ {
+ ...nextRelease,
+ ...release1,
+ notes,
+ pluginName: '[Function: functionStub]',
+ },
+ { ...nextRelease, notes, pluginName: '[Function: functionStub]' },
]);
// Verify the tag has been created on the local and remote repo and reference
- t.is(await gitTagHead(nextRelease.gitTag, {cwd}), nextRelease.gitHead);
- t.is(await gitRemoteTagHead(repositoryUrl, nextRelease.gitTag, {cwd}), nextRelease.gitHead);
+ t.is(await gitTagHead(nextRelease.gitTag, { cwd }), nextRelease.gitHead);
+ t.is(
+ await gitRemoteTagHead(repositoryUrl, nextRelease.gitTag, { cwd }),
+ nextRelease.gitHead
+ );
}
-addChannelMacro.title = (providedTitle) => `Add version to a channel after a merge (${providedTitle})`;
+addChannelMacro.title = (providedTitle) =>
+ `Add version to a channel after a merge (${providedTitle})`;
test('fast-forward', addChannelMacro, mergeFf);
test('non fast-forward', addChannelMacro, merge);
@@ -852,20 +979,20 @@ test('rebase', addChannelMacro, rebase);
test('Call all "success" plugins even if one errors out', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
+ await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
// Add new commits to the master branch
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const nextRelease = {
name: 'v2.0.0',
type: 'major',
version: '2.0.0',
- gitHead: await getGitHead({cwd}),
+ gitHead: await getGitHead({ cwd }),
gitTag: 'v2.0.0',
channel: null,
};
@@ -874,12 +1001,12 @@ test('Call all "success" plugins even if one errors out', async (t) => {
const verifyConditions2 = stub().resolves();
const analyzeCommits = stub().resolves(nextRelease.type);
const generateNotes = stub().resolves(notes);
- const release = {name: 'Release', url: 'https://release.com'};
+ const release = { name: 'Release', url: 'https://release.com' };
const publish = stub().resolves(release);
const success1 = stub().rejects();
const success2 = stub().resolves();
const config = {
- branches: [{name: 'master'}],
+ branches: [{ name: 'master' }],
repositoryUrl,
globalOpt: 'global',
tagFormat: `v\${version}`,
@@ -897,56 +1024,91 @@ test('Call all "success" plugins even if one errors out', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ })
);
t.is(success1.callCount, 1);
t.deepEqual(success1.args[0][0], config);
t.deepEqual(success1.args[0][1].releases, [
- {...nextRelease, ...release, notes, pluginName: '[Function: functionStub]'},
+ {
+ ...nextRelease,
+ ...release,
+ notes,
+ pluginName: '[Function: functionStub]',
+ },
]);
t.is(success2.callCount, 1);
t.deepEqual(success2.args[0][1].releases, [
- {...nextRelease, ...release, notes, pluginName: '[Function: functionStub]'},
+ {
+ ...nextRelease,
+ ...release,
+ notes,
+ pluginName: '[Function: functionStub]',
+ },
]);
});
test('Log all "verifyConditions" errors', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['First'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const error1 = new Error('error 1');
const error2 = new SemanticReleaseError('error 2', 'ERR2');
const error3 = new SemanticReleaseError('error 3', 'ERR3');
const fail = stub().resolves();
- const config = {branches: [{name: 'master'}], repositoryUrl, tagFormat: `v\${version}`};
+ const config = {
+ branches: [{ name: 'master' }],
+ repositoryUrl,
+ tagFormat: `v\${version}`,
+ };
const options = {
...config,
plugins: false,
- verifyConditions: [stub().rejects(new AggregateError([error1, error2])), stub().rejects(error3)],
+ verifyConditions: [
+ stub().rejects(new AggregateError([error1, error2])),
+ stub().rejects(error3),
+ ],
fail,
};
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
const errors = [
...(await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ })
)),
];
- t.deepEqual(sortBy(errors, ['message']), sortBy([error1, error2, error3], ['message']));
- t.true(t.context.error.calledWith('An error occurred while running semantic-release: %O', error1));
+ t.deepEqual(
+ sortBy(errors, ['message']),
+ sortBy([error1, error2, error3], ['message'])
+ );
+ t.true(
+ t.context.error.calledWith(
+ 'An error occurred while running semantic-release: %O',
+ error1
+ )
+ );
t.true(t.context.error.calledWith('ERR2 error 2'));
t.true(t.context.error.calledWith('ERR3 error 3'));
t.true(t.context.error.calledAfter(t.context.log));
@@ -959,19 +1121,23 @@ test('Log all "verifyConditions" errors', async (t) => {
test('Log all "verifyRelease" errors', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
+ await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
// Add new commits to the master branch
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const error1 = new SemanticReleaseError('error 1', 'ERR1');
const error2 = new SemanticReleaseError('error 2', 'ERR2');
const fail = stub().resolves();
- const config = {branches: [{name: 'master'}], repositoryUrl, tagFormat: `v\${version}`};
+ const config = {
+ branches: [{ name: 'master' }],
+ repositoryUrl,
+ tagFormat: `v\${version}`,
+ };
const options = {
...config,
verifyConditions: stub().resolves(),
@@ -982,15 +1148,23 @@ test('Log all "verifyRelease" errors', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
const errors = [
...(await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ })
)),
];
- t.deepEqual(sortBy(errors, ['message']), sortBy([error1, error2], ['message']));
+ t.deepEqual(
+ sortBy(errors, ['message']),
+ sortBy([error1, error2], ['message'])
+ );
t.true(t.context.error.calledWith('ERR1 error 1'));
t.true(t.context.error.calledWith('ERR2 error 2'));
t.is(fail.callCount, 1);
@@ -999,17 +1173,19 @@ test('Log all "verifyRelease" errors', async (t) => {
});
test('Dry-run skips addChannel, prepare, publish and success', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'next']}), 'v1.0.0', {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v1.1.0', {cwd});
-
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('next', true, {cwd});
- await gitPush('origin', 'next', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'next'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v1.1.0', { cwd });
+
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('next', true, { cwd });
+ await gitPush('origin', 'next', { cwd });
const verifyConditions = stub().resolves();
const analyzeCommits = stub().resolves('minor');
@@ -1036,7 +1212,7 @@ test('Dry-run skips addChannel, prepare, publish and success', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.truthy(
await semanticRelease(options, {
@@ -1047,33 +1223,50 @@ test('Dry-run skips addChannel, prepare, publish and success', async (t) => {
})
);
- t.not(t.context.warn.args[0][0], 'This run was not triggered in a known CI environment, running in dry-run mode.');
+ t.not(
+ t.context.warn.args[0][0],
+ 'This run was not triggered in a known CI environment, running in dry-run mode.'
+ );
t.is(verifyConditions.callCount, 1);
t.is(analyzeCommits.callCount, 1);
t.is(verifyRelease.callCount, 1);
t.is(generateNotes.callCount, 2);
t.is(addChannel.callCount, 0);
t.true(
- t.context.warn.calledWith(`Skip step "addChannel" of plugin "[Function: ${addChannel.name}]" in dry-run mode`)
+ t.context.warn.calledWith(
+ `Skip step "addChannel" of plugin "[Function: ${addChannel.name}]" in dry-run mode`
+ )
);
t.is(prepare.callCount, 0);
- t.true(t.context.warn.calledWith(`Skip step "prepare" of plugin "[Function: ${prepare.name}]" in dry-run mode`));
+ t.true(
+ t.context.warn.calledWith(
+ `Skip step "prepare" of plugin "[Function: ${prepare.name}]" in dry-run mode`
+ )
+ );
t.is(publish.callCount, 0);
- t.true(t.context.warn.calledWith(`Skip step "publish" of plugin "[Function: ${publish.name}]" in dry-run mode`));
+ t.true(
+ t.context.warn.calledWith(
+ `Skip step "publish" of plugin "[Function: ${publish.name}]" in dry-run mode`
+ )
+ );
t.is(success.callCount, 0);
- t.true(t.context.warn.calledWith(`Skip step "success" of plugin "[Function: ${success.name}]" in dry-run mode`));
+ t.true(
+ t.context.warn.calledWith(
+ `Skip step "success" of plugin "[Function: ${success.name}]" in dry-run mode`
+ )
+ );
});
test('Dry-run skips fail', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
+ await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
// Add new commits to the master branch
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const error1 = new SemanticReleaseError('error 1', 'ERR1');
const error2 = new SemanticReleaseError('error 2', 'ERR2');
@@ -1089,37 +1282,49 @@ test('Dry-run skips fail', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
const errors = [
...(await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ })
)),
];
- t.deepEqual(sortBy(errors, ['message']), sortBy([error1, error2], ['message']));
+ t.deepEqual(
+ sortBy(errors, ['message']),
+ sortBy([error1, error2], ['message'])
+ );
t.true(t.context.error.calledWith('ERR1 error 1'));
t.true(t.context.error.calledWith('ERR2 error 2'));
t.is(fail.callCount, 0);
- t.true(t.context.warn.calledWith(`Skip step "fail" of plugin "[Function: ${fail.name}]" in dry-run mode`));
+ t.true(
+ t.context.warn.calledWith(
+ `Skip step "fail" of plugin "[Function: ${fail.name}]" in dry-run mode`
+ )
+ );
});
test('Force a dry-run if not on a CI and "noCi" is not explicitly set', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
+ await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
// Add new commits to the master branch
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const nextRelease = {
name: 'v2.0.0',
type: 'major',
version: '2.0.0',
- gitHead: await getGitHead({cwd}),
+ gitHead: await getGitHead({ cwd }),
gitTag: 'v2.0.0',
channel: undefined,
};
@@ -1149,7 +1354,7 @@ test('Force a dry-run if not on a CI and "noCi" is not explicitly set', async (t
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: false, branch: 'master'}),
+ 'env-ci': () => ({ isCi: false, branch: 'master' }),
});
t.truthy(
await semanticRelease(options, {
@@ -1160,7 +1365,11 @@ test('Force a dry-run if not on a CI and "noCi" is not explicitly set', async (t
})
);
- t.true(t.context.warn.calledWith('This run was not triggered in a known CI environment, running in dry-run mode.'));
+ t.true(
+ t.context.warn.calledWith(
+ 'This run was not triggered in a known CI environment, running in dry-run mode.'
+ )
+ );
t.is(verifyConditions.callCount, 1);
t.is(analyzeCommits.callCount, 1);
t.is(verifyRelease.callCount, 1);
@@ -1171,16 +1380,21 @@ test('Force a dry-run if not on a CI and "noCi" is not explicitly set', async (t
test('Dry-run does not print changelog if "generateNotes" return "undefined"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
+ await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
// Add new commits to the master branch
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
- const nextRelease = {type: 'major', version: '2.0.0', gitHead: await getGitHead({cwd}), gitTag: 'v2.0.0'};
+ const nextRelease = {
+ type: 'major',
+ version: '2.0.0',
+ gitHead: await getGitHead({ cwd }),
+ gitTag: 'v2.0.0',
+ };
const analyzeCommits = stub().resolves(nextRelease.type);
const generateNotes = stub().resolves();
@@ -1199,7 +1413,7 @@ test('Dry-run does not print changelog if "generateNotes" return "undefined"', a
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.truthy(
await semanticRelease(options, {
@@ -1210,25 +1424,27 @@ test('Dry-run does not print changelog if "generateNotes" return "undefined"', a
})
);
- t.deepEqual(t.context.log.args[t.context.log.args.length - 1], ['Release note for version 2.0.0:']);
+ t.deepEqual(t.context.log.args[t.context.log.args.length - 1], [
+ 'Release note for version 2.0.0:',
+ ]);
});
test('Allow local releases with "noCi" option', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
+ await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
// Add new commits to the master branch
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const nextRelease = {
name: 'v2.0.0',
type: 'major',
version: '2.0.0',
- gitHead: await getGitHead({cwd}),
+ gitHead: await getGitHead({ cwd }),
gitTag: 'v2.0.0',
channel: undefined,
};
@@ -1258,7 +1474,7 @@ test('Allow local releases with "noCi" option', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: false, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: false, branch: 'master', isPr: false }),
});
t.truthy(
await semanticRelease(options, {
@@ -1269,7 +1485,10 @@ test('Allow local releases with "noCi" option', async (t) => {
})
);
- t.not(t.context.log.args[0][0], 'This run was not triggered in a known CI environment, running in dry-run mode.');
+ t.not(
+ t.context.log.args[0][0],
+ 'This run was not triggered in a known CI environment, running in dry-run mode.'
+ );
t.not(
t.context.log.args[0][0],
"This run was triggered by a pull request and therefore a new version won't be published."
@@ -1283,23 +1502,25 @@ test('Allow local releases with "noCi" option', async (t) => {
});
test('Accept "undefined" value returned by "generateNotes" and "false" by "publish" and "addChannel"', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'next']}), 'v1.0.0', {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v1.1.0', {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('next', true, {cwd});
- await gitPush('origin', 'next', {cwd});
- await gitCheckout('master', false, {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'next'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v1.1.0', { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('next', true, { cwd });
+ await gitPush('origin', 'next', { cwd });
+ await gitCheckout('master', false, { cwd });
const nextRelease = {
name: 'v1.2.0',
type: 'minor',
version: '1.2.0',
- gitHead: await getGitHead({cwd}),
+ gitHead: await getGitHead({ cwd }),
gitTag: 'v1.2.0',
channel: null,
};
@@ -1328,7 +1549,7 @@ test('Accept "undefined" value returned by "generateNotes" and "false" by "publi
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.truthy(
await semanticRelease(options, {
@@ -1346,24 +1567,41 @@ test('Accept "undefined" value returned by "generateNotes" and "false" by "publi
t.is(addChannel.callCount, 1);
t.is(publish.callCount, 1);
t.is(success.callCount, 2);
- t.deepEqual(publish.args[0][1].nextRelease, {...nextRelease, notes: notes2});
- t.deepEqual(success.args[0][1].releases, [{pluginName: '[Function: functionStub]'}]);
- t.deepEqual(success.args[1][1].releases, [{pluginName: '[Function: functionStub]'}]);
+ t.deepEqual(publish.args[0][1].nextRelease, {
+ ...nextRelease,
+ notes: notes2,
+ });
+ t.deepEqual(success.args[0][1].releases, [
+ { pluginName: '[Function: functionStub]' },
+ ]);
+ t.deepEqual(success.args[1][1].releases, [
+ { pluginName: '[Function: functionStub]' },
+ ]);
});
test('Returns false if triggered by a PR', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', prBranch: 'patch-1', isPr: true}),
+ 'env-ci': () => ({
+ isCi: true,
+ branch: 'master',
+ prBranch: 'patch-1',
+ isPr: true,
+ }),
});
t.false(
await semanticRelease(
- {cwd, repositoryUrl},
- {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}
+ { cwd, repositoryUrl },
+ {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ }
)
);
t.is(
@@ -1373,18 +1611,20 @@ test('Returns false if triggered by a PR', async (t) => {
});
test('Throws "EINVALIDNEXTVERSION" if next release is out of range of the current maintenance branch', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['feat: initial commit'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, '1.x']}), 'v1.0.0', {cwd});
- await gitCheckout('1.x', true, {cwd});
- await gitPush('origin', '1.x', {cwd});
- await gitCheckout('master', false, {cwd});
- await gitCommits(['feat: new feature on master'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitCheckout('1.x', false, {cwd});
- await gitCommits(['feat: feature on maintenance version 1.x'], {cwd});
- await gitPush('origin', 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['feat: initial commit'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, '1.x'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCheckout('1.x', true, { cwd });
+ await gitPush('origin', '1.x', { cwd });
+ await gitCheckout('master', false, { cwd });
+ await gitCommits(['feat: new feature on master'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitCheckout('1.x', false, { cwd });
+ await gitCommits(['feat: feature on maintenance version 1.x'], { cwd });
+ await gitPush('origin', 'master', { cwd });
const verifyConditions = stub().resolves();
const verifyRelease = stub().resolves();
@@ -1394,7 +1634,7 @@ test('Throws "EINVALIDNEXTVERSION" if next release is out of range of the curren
const success = stub().resolves();
const config = {
- branches: [{name: '1.x'}, {name: 'master'}],
+ branches: [{ name: '1.x' }, { name: 'master' }],
repositoryUrl,
tagFormat: `v\${version}`,
};
@@ -1410,33 +1650,43 @@ test('Throws "EINVALIDNEXTVERSION" if next release is out of range of the curren
const semanticRelease = proxyquire('..', {
'./lib/logger': t.context.logger,
- 'env-ci': () => ({isCi: true, branch: '1.x', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: '1.x', isPr: false }),
});
const error = await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
+ })
);
t.is(error.code, 'EINVALIDNEXTVERSION');
t.is(error.name, 'SemanticReleaseError');
- t.is(error.message, 'The release `1.1.0` on branch `1.x` cannot be published as it is out of range.');
+ t.is(
+ error.message,
+ 'The release `1.1.0` on branch `1.x` cannot be published as it is out of range.'
+ );
t.regex(error.details, /A valid branch could be `master`./);
});
test('Throws "EINVALIDNEXTVERSION" if next release is out of range of the current release branch', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['feat: initial commit'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitCheckout('next', true, {cwd});
- await gitCommits(['feat: new feature on next'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v1.1.0', {cwd});
- await gitPush('origin', 'next', {cwd});
- await gitCheckout('next-major', true, {cwd});
- await gitPush('origin', 'next-major', {cwd});
- await gitCheckout('master', false, {cwd});
- await gitCommits(['feat: new feature on master', 'fix: new fix on master'], {cwd});
- await gitPush('origin', 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['feat: initial commit'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitCheckout('next', true, { cwd });
+ await gitCommits(['feat: new feature on next'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v1.1.0', { cwd });
+ await gitPush('origin', 'next', { cwd });
+ await gitCheckout('next-major', true, { cwd });
+ await gitPush('origin', 'next-major', { cwd });
+ await gitCheckout('master', false, { cwd });
+ await gitCommits(['feat: new feature on master', 'fix: new fix on master'], {
+ cwd,
+ });
+ await gitPush('origin', 'master', { cwd });
const verifyConditions = stub().resolves();
const verifyRelease = stub().resolves();
@@ -1446,7 +1696,7 @@ test('Throws "EINVALIDNEXTVERSION" if next release is out of range of the curren
const success = stub().resolves();
const config = {
- branches: [{name: 'master'}, {name: 'next'}, {name: 'next-major'}],
+ branches: [{ name: 'master' }, { name: 'next' }, { name: 'next-major' }],
repositoryUrl,
tagFormat: `v\${version}`,
};
@@ -1462,38 +1712,50 @@ test('Throws "EINVALIDNEXTVERSION" if next release is out of range of the curren
const semanticRelease = proxyquire('..', {
'./lib/logger': t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
const error = await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
+ })
);
t.is(error.code, 'EINVALIDNEXTVERSION');
t.is(error.name, 'SemanticReleaseError');
- t.is(error.message, 'The release `1.1.0` on branch `master` cannot be published as it is out of range.');
+ t.is(
+ error.message,
+ 'The release `1.1.0` on branch `master` cannot be published as it is out of range.'
+ );
t.regex(error.details, /A valid branch could be `next` or `next-major`./);
});
test('Throws "EINVALIDMAINTENANCEMERGE" if merge an out of range release in a maintenance branch', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, '1.1.x']}), 'v1.0.0', {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, '1.1.x']}), 'v1.1.0', {cwd});
- await gitCheckout('1.1.x', 'master', {cwd});
- await gitPush('origin', '1.1.x', {cwd});
- await gitCheckout('master', false, {cwd});
- await gitCommits(['Third'], {cwd});
- await gitTagVersion('v1.1.1', undefined, {cwd});
- await gitCommits(['Fourth'], {cwd});
- await gitTagVersion('v1.2.0', undefined, {cwd});
- await gitPush('origin', 'master', {cwd});
- await gitCheckout('1.1.x', false, {cwd});
- await merge('master', {cwd});
- await gitPush('origin', '1.1.x', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, '1.1.x'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, '1.1.x'] }), 'v1.1.0', {
+ cwd,
+ });
+ await gitCheckout('1.1.x', 'master', { cwd });
+ await gitPush('origin', '1.1.x', { cwd });
+ await gitCheckout('master', false, { cwd });
+ await gitCommits(['Third'], { cwd });
+ await gitTagVersion('v1.1.1', undefined, { cwd });
+ await gitCommits(['Fourth'], { cwd });
+ await gitTagVersion('v1.2.0', undefined, { cwd });
+ await gitPush('origin', 'master', { cwd });
+ await gitCheckout('1.1.x', false, { cwd });
+ await merge('master', { cwd });
+ await gitPush('origin', '1.1.x', { cwd });
const notes = 'Release notes';
const verifyConditions = stub().resolves();
@@ -1506,7 +1768,11 @@ test('Throws "EINVALIDMAINTENANCEMERGE" if merge an out of range release in a ma
const success = stub().resolves();
const fail = stub().resolves();
- const config = {branches: [{name: 'master'}, {name: '1.1.x'}], repositoryUrl, tagFormat: `v\${version}`};
+ const config = {
+ branches: [{ name: 'master' }, { name: '1.1.x' }],
+ repositoryUrl,
+ tagFormat: `v\${version}`,
+ };
const options = {
...config,
verifyConditions,
@@ -1522,11 +1788,16 @@ test('Throws "EINVALIDMAINTENANCEMERGE" if merge an out of range release in a ma
const semanticRelease = proxyquire('..', {
'./lib/logger': t.context.logger,
- 'env-ci': () => ({isCi: true, branch: '1.1.x', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: '1.1.x', isPr: false }),
});
const errors = [
...(await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: {write: () => {}}, stderr: {write: () => {}}})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: { write: () => {} },
+ stderr: { write: () => {} },
+ })
)),
];
@@ -1547,25 +1818,30 @@ test('Throws "EINVALIDMAINTENANCEMERGE" if merge an out of range release in a ma
test('Returns false value if triggered on an outdated clone', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- let {cwd, repositoryUrl} = await gitRepo(true);
+ let { cwd, repositoryUrl } = await gitRepo(true);
const repoDir = cwd;
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['First'], { cwd });
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
cwd = await gitShallowClone(repositoryUrl);
- await gitCommits(['Third'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['Third'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.false(
await semanticRelease(
- {repositoryUrl},
- {cwd: repoDir, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}
+ { repositoryUrl },
+ {
+ cwd: repoDir,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ }
)
);
t.deepEqual(t.context.log.args[t.context.log.args.length - 1], [
@@ -1575,7 +1851,7 @@ test('Returns false value if triggered on an outdated clone', async (t) => {
test('Returns false if not running from the configured branch', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
const options = {
branches: ['master'],
repositoryUrl,
@@ -1592,7 +1868,7 @@ test('Returns false if not running from the configured branch', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'other-branch', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'other-branch', isPr: false }),
});
t.false(
@@ -1611,10 +1887,10 @@ test('Returns false if not running from the configured branch', async (t) => {
test('Returns false if there is no relevant changes', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['First'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const analyzeCommits = stub().resolves();
const verifyRelease = stub().resolves();
@@ -1637,7 +1913,7 @@ test('Returns false if there is no relevant changes', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.false(
@@ -1660,7 +1936,7 @@ test('Returns false if there is no relevant changes', async (t) => {
test('Exclude commits with [skip release] or [release skip] from analysis', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
const commits = await gitCommits(
[
@@ -1673,11 +1949,11 @@ test('Exclude commits with [skip release] or [release skip] from analysis', asyn
'Test commit\n\n commit body\n[skip release]',
'Test commit\n\n commit body\n[release skip]',
],
- {cwd}
+ { cwd }
);
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitPush(repositoryUrl, 'master', { cwd });
const analyzeCommits = stub().resolves();
- const config = {branches: ['master'], repositoryUrl, globalOpt: 'global'};
+ const config = { branches: ['master'], repositoryUrl, globalOpt: 'global' };
const options = {
...config,
verifyConditions: [stub().resolves(), stub().resolves()],
@@ -1693,7 +1969,7 @@ test('Exclude commits with [skip release] or [release skip] from analysis', asyn
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
await semanticRelease(options, {
cwd,
@@ -1704,11 +1980,14 @@ test('Exclude commits with [skip release] or [release skip] from analysis', asyn
t.is(analyzeCommits.callCount, 1);
t.is(analyzeCommits.args[0][1].commits.length, 2);
- t.deepEqual(analyzeCommits.args[0][1].commits[0], commits[commits.length - 1]);
+ t.deepEqual(
+ analyzeCommits.args[0][1].commits[0],
+ commits[commits.length - 1]
+ );
});
test('Log both plugins errors and errors thrown by "fail" plugin', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
const pluginError = new SemanticReleaseError('Plugin error', 'ERR');
const failError1 = new Error('Fail error 1');
const failError2 = new Error('Fail error 2');
@@ -1721,20 +2000,28 @@ test('Log both plugins errors and errors thrown by "fail" plugin', async (t) =>
};
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ })
);
- t.is(t.context.error.args[t.context.error.args.length - 1][0], 'ERR Plugin error');
+ t.is(
+ t.context.error.args[t.context.error.args.length - 1][0],
+ 'ERR Plugin error'
+ );
t.is(t.context.error.args[t.context.error.args.length - 3][1], failError1);
t.is(t.context.error.args[t.context.error.args.length - 2][1], failError2);
});
test('Call "fail" only if a plugin returns a SemanticReleaseError', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
const pluginError = new Error('Plugin error');
const fail = stub().resolves();
@@ -1746,11 +2033,16 @@ test('Call "fail" only if a plugin returns a SemanticReleaseError', async (t) =>
};
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()})
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ })
);
t.true(fail.notCalled);
@@ -1759,15 +2051,23 @@ test('Call "fail" only if a plugin returns a SemanticReleaseError', async (t) =>
test('Throw SemanticReleaseError if repositoryUrl is not set and cannot be found from repo config', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
const errors = [
...(await t.throwsAsync(
- semanticRelease({}, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()})
+ semanticRelease(
+ {},
+ {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ }
+ )
)),
];
@@ -1780,14 +2080,14 @@ test('Throw SemanticReleaseError if repositoryUrl is not set and cannot be found
test('Throw an Error if plugin returns an unexpected value', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
- await gitCommits(['First'], {cwd});
+ await gitCommits(['First'], { cwd });
// Create the tag corresponding to version 1.0.0
- await gitTagVersion('v1.0.0', undefined, {cwd});
+ await gitTagVersion('v1.0.0', undefined, { cwd });
// Add new commits to the master branch
- await gitCommits(['Second'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ await gitCommits(['Second'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const verifyConditions = stub().resolves();
const analyzeCommits = stub().resolves('string');
@@ -1803,20 +2103,25 @@ test('Throw an Error if plugin returns an unexpected value', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
const error = await t.throwsAsync(
- semanticRelease(options, {cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()}),
- {instanceOf: SemanticReleaseError}
+ semanticRelease(options, {
+ cwd,
+ env: {},
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ }),
+ { instanceOf: SemanticReleaseError }
);
t.regex(error.details, /string/);
});
test('Hide sensitive information passed to "fail" plugin', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
const fail = stub().resolves();
- const env = {MY_TOKEN: 'secret token'};
+ const env = { MY_TOKEN: 'secret token' };
const options = {
branch: 'master',
repositoryUrl,
@@ -1833,10 +2138,15 @@ test('Hide sensitive information passed to "fail" plugin', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
await t.throwsAsync(
- semanticRelease(options, {cwd, env, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()})
+ semanticRelease(options, {
+ cwd,
+ env,
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ })
);
const error = fail.args[0][1].errors[0];
@@ -1852,14 +2162,14 @@ test('Hide sensitive information passed to "fail" plugin', async (t) => {
});
test('Hide sensitive information passed to "success" plugin', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['feat: initial release'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitCommits(['feat: new feature'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['feat: initial release'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitCommits(['feat: new feature'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
const success = stub().resolves();
- const env = {MY_TOKEN: 'secret token'};
+ const env = { MY_TOKEN: 'secret token' };
const options = {
branch: 'master',
repositoryUrl,
@@ -1878,9 +2188,14 @@ test('Hide sensitive information passed to "success" plugin', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
+ });
+ await semanticRelease(options, {
+ cwd,
+ env,
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
});
- await semanticRelease(options, {cwd, env, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()});
const release = success.args[0][1].releases[0];
@@ -1895,10 +2210,10 @@ test('Hide sensitive information passed to "success" plugin', async (t) => {
});
test('Get all commits including the ones not in the shallow clone', async (t) => {
- let {cwd, repositoryUrl} = await gitRepo(true);
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitCommits(['First', 'Second', 'Third'], {cwd});
- await gitPush(repositoryUrl, 'master', {cwd});
+ let { cwd, repositoryUrl } = await gitRepo(true);
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitCommits(['First', 'Second', 'Third'], { cwd });
+ await gitPush(repositoryUrl, 'master', { cwd });
cwd = await gitShallowClone(repositoryUrl);
@@ -1906,14 +2221,14 @@ test('Get all commits including the ones not in the shallow clone', async (t) =>
name: 'v2.0.0',
type: 'major',
version: '2.0.0',
- gitHead: await getGitHead({cwd}),
+ gitHead: await getGitHead({ cwd }),
gitTag: 'v2.0.0',
channel: undefined,
};
const notes = 'Release notes';
const analyzeCommits = stub().resolves(nextRelease.type);
- const config = {branches: ['master'], repositoryUrl, globalOpt: 'global'};
+ const config = { branches: ['master'], repositoryUrl, globalOpt: 'global' };
const options = {
...config,
verifyConditions: stub().resolves(),
@@ -1928,7 +2243,7 @@ test('Get all commits including the ones not in the shallow clone', async (t) =>
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.truthy(
await semanticRelease(options, {
@@ -1943,17 +2258,19 @@ test('Get all commits including the ones not in the shallow clone', async (t) =>
});
test('skipTag skips adding tags', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- await gitCommits(['First'], {cwd});
- await gitTagVersion('v1.0.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: [null, 'next']}), 'v1.0.0', {cwd});
- await gitCommits(['Second'], {cwd});
- await gitTagVersion('v1.1.0', undefined, {cwd});
- await gitAddNote(JSON.stringify({channels: ['next']}), 'v1.1.0', {cwd});
-
- await gitPush(repositoryUrl, 'master', {cwd});
- await gitCheckout('next', true, {cwd});
- await gitPush('origin', 'next', {cwd});
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ await gitCommits(['First'], { cwd });
+ await gitTagVersion('v1.0.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: [null, 'next'] }), 'v1.0.0', {
+ cwd,
+ });
+ await gitCommits(['Second'], { cwd });
+ await gitTagVersion('v1.1.0', undefined, { cwd });
+ await gitAddNote(JSON.stringify({ channels: ['next'] }), 'v1.1.0', { cwd });
+
+ await gitPush(repositoryUrl, 'master', { cwd });
+ await gitCheckout('next', true, { cwd });
+ await gitPush('origin', 'next', { cwd });
const verifyConditions = stub().resolves();
const analyzeCommits = stub().resolves('minor');
@@ -1984,7 +2301,7 @@ test('skipTag skips adding tags', async (t) => {
const semanticRelease = requireNoCache('..', {
'./lib/get-logger': () => t.context.logger,
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
t.truthy(
await semanticRelease(options, {
@@ -1995,8 +2312,14 @@ test('skipTag skips adding tags', async (t) => {
})
);
- t.not(t.context.warn.args[0][0], 'This run was not triggered in a known CI environment, running in dry-run mode.');
- t.is(t.context.warn.args[0][0], `Skip ${nextRelease.gitTag} tag creation in dry-run / skip-tag mode`);
+ t.not(
+ t.context.warn.args[0][0],
+ 'This run was not triggered in a known CI environment, running in dry-run mode.'
+ );
+ t.is(
+ t.context.warn.args[0][0],
+ `Skip ${nextRelease.gitTag} tag creation in dry-run / skip-tag mode`
+ );
t.is(verifyConditions.callCount, 1);
t.is(analyzeCommits.callCount, 1);
t.is(verifyRelease.callCount, 1);
diff --git a/test/integration.test.js b/test/integration.test.js
index 6ffc91dd21..ff3bbadb30 100644
--- a/test/integration.test.js
+++ b/test/integration.test.js
@@ -1,13 +1,13 @@
const path = require('path');
const test = require('ava');
const proxyquire = require('proxyquire');
-const {escapeRegExp} = require('lodash');
-const {writeJson, readJson} = require('fs-extra');
+const { escapeRegExp } = require('lodash');
+const { writeJson, readJson } = require('fs-extra');
const execa = require('execa');
-const {WritableStreamBuffer} = require('stream-buffers');
+const { WritableStreamBuffer } = require('stream-buffers');
const delay = require('delay');
const getAuthUrl = require('../lib/get-git-auth-url');
-const {SECRET_REPLACEMENT} = require('../lib/definitions/constants');
+const { SECRET_REPLACEMENT } = require('../lib/definitions/constants');
const {
gitHead,
gitTagHead,
@@ -19,7 +19,7 @@ const {
merge,
gitGetNote,
} = require('./helpers/git-utils');
-const {npmView} = require('./helpers/npm-utils');
+const { npmView } = require('./helpers/npm-utils');
const gitbox = require('./helpers/gitbox');
const mockServer = require('./helpers/mockserver');
const npmRegistry = require('./helpers/npm-registry');
@@ -29,7 +29,14 @@ const npmRegistry = require('./helpers/npm-registry');
const requireNoCache = proxyquire.noPreserveCache();
// Environment variables used with semantic-release cli (similar to what a user would setup)
-const {GITHUB_ACTION, GITHUB_TOKEN, ...processEnvWithoutGitHubActionsVariables} = process.env;
+// FIXME: even though eslint says GITHUB_ACTION and GITHUB_TOKEN is unused if you remove them the tests fail
+const {
+ // eslint-disable-next-line no-unused-vars
+ GITHUB_ACTION,
+ // eslint-disable-next-line no-unused-vars
+ GITHUB_TOKEN,
+ ...processEnvWithoutGitHubActionsVariables
+} = process.env;
const env = {
...processEnvWithoutGitHubActionsVariables,
...npmRegistry.authEnv,
@@ -46,12 +53,17 @@ const npmTestEnv = {
...process.env,
...npmRegistry.authEnv,
npm_config_registry: npmRegistry.url,
- LEGACY_TOKEN: Buffer.from(`${env.NPM_USERNAME}:${env.NPM_PASSWORD}`, 'utf8').toString('base64'),
+ LEGACY_TOKEN: Buffer.from(
+ `${env.NPM_USERNAME}:${env.NPM_PASSWORD}`,
+ 'utf8'
+ ).toString('base64'),
};
const cli = require.resolve('../bin/semantic-release');
const pluginError = require.resolve('./fixtures/plugin-error');
-const pluginInheritedError = require.resolve('./fixtures/plugin-error-inherited');
+const pluginInheritedError = require.resolve(
+ './fixtures/plugin-error-inherited'
+);
const pluginLogEnv = require.resolve('./fixtures/plugin-log-env');
test.before(async () => {
@@ -67,67 +79,84 @@ test('Release patch, minor and major versions', async (t) => {
const owner = 'git';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository and package.json');
- const {cwd, repositoryUrl, authUrl} = await gitbox.createRepo(packageName);
+ const { cwd, repositoryUrl, authUrl } = await gitbox.createRepo(packageName);
// Create package.json in repository root
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: repositoryUrl},
- publishConfig: {registry: npmRegistry.url},
- release: {branches: ['master', 'next'], success: false, fail: false},
+ repository: { url: repositoryUrl },
+ publishConfig: { registry: npmRegistry.url },
+ release: { branches: ['master', 'next'], success: false, fail: false },
});
// Create a npm-shrinkwrap.json file
- await execa('npm', ['shrinkwrap'], {env: npmTestEnv, cwd, extendEnv: false});
+ await execa('npm', ['shrinkwrap'], {
+ env: npmTestEnv,
+ cwd,
+ extendEnv: false,
+ });
/* No release */
let verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
t.log('Commit a chore');
- await gitCommits(['chore: Init repository'], {cwd});
+ await gitCommits(['chore: Init repository'], { cwd });
t.log('$ semantic-release');
- let {stdout, exitCode} = await execa(cli, [], {env, cwd, extendEnv: false});
- t.regex(stdout, /There are no relevant changes, so no new version is released/);
+ let { stdout, exitCode } = await execa(cli, [], {
+ env,
+ cwd,
+ extendEnv: false,
+ });
+ t.regex(
+ stdout,
+ /There are no relevant changes, so no new version is released/
+ );
t.is(exitCode, 0);
/* Initial release */
let version = '1.0.0';
verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
let createReleaseMock = await mockServer.mock(
`/repos/${owner}/${packageName}/releases`,
{
- body: {tag_name: `v${version}`, name: `v${version}`},
- headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}],
+ body: { tag_name: `v${version}`, name: `v${version}` },
+ headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }],
},
- {body: {html_url: `release-url/${version}`}}
+ { body: { html_url: `release-url/${version}` } }
);
t.log('Commit a feature');
- await gitCommits(['feat: Initial commit'], {cwd});
+ await gitCommits(['feat: Initial commit'], { cwd });
t.log('$ semantic-release');
- ({stdout, exitCode} = await execa(cli, [], {env, cwd, extendEnv: false}));
- t.regex(stdout, new RegExp(`Published GitHub release: release-url/${version}`));
+ ({ stdout, exitCode } = await execa(cli, [], { env, cwd, extendEnv: false }));
+ t.regex(
+ stdout,
+ new RegExp(`Published GitHub release: release-url/${version}`)
+ );
t.regex(stdout, new RegExp(`Publishing version ${version} to npm registry`));
t.is(exitCode, 0);
// Verify package.json and npm-shrinkwrap.json have been updated
t.is((await readJson(path.resolve(cwd, 'package.json'))).version, version);
- t.is((await readJson(path.resolve(cwd, 'npm-shrinkwrap.json'))).version, version);
+ t.is(
+ (await readJson(path.resolve(cwd, 'npm-shrinkwrap.json'))).version,
+ version
+ );
// Retrieve the published package from the registry and check version and gitHead
let {
- 'dist-tags': {latest: releasedVersion},
+ 'dist-tags': { latest: releasedVersion },
} = await npmView(packageName, npmTestEnv);
- let head = await gitHead({cwd});
+ let head = await gitHead({ cwd });
t.is(releasedVersion, version);
- t.is(await gitTagHead(`v${version}`, {cwd}), head);
- t.is(await gitRemoteTagHead(authUrl, `v${version}`, {cwd}), head);
+ t.is(await gitTagHead(`v${version}`, { cwd }), head);
+ t.is(await gitRemoteTagHead(authUrl, `v${version}`, { cwd }), head);
t.log(`+ released ${releasedVersion}`);
await mockServer.verify(verifyMock);
@@ -137,38 +166,44 @@ test('Release patch, minor and major versions', async (t) => {
version = '1.0.1';
verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
createReleaseMock = await mockServer.mock(
`/repos/${owner}/${packageName}/releases`,
{
- body: {tag_name: `v${version}`, name: `v${version}`},
- headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}],
+ body: { tag_name: `v${version}`, name: `v${version}` },
+ headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }],
},
- {body: {html_url: `release-url/${version}`}}
+ { body: { html_url: `release-url/${version}` } }
);
t.log('Commit a fix');
- await gitCommits(['fix: bar'], {cwd});
+ await gitCommits(['fix: bar'], { cwd });
t.log('$ semantic-release');
- ({stdout, exitCode} = await execa(cli, [], {env, cwd, extendEnv: false}));
- t.regex(stdout, new RegExp(`Published GitHub release: release-url/${version}`));
+ ({ stdout, exitCode } = await execa(cli, [], { env, cwd, extendEnv: false }));
+ t.regex(
+ stdout,
+ new RegExp(`Published GitHub release: release-url/${version}`)
+ );
t.regex(stdout, new RegExp(`Publishing version ${version} to npm registry`));
t.is(exitCode, 0);
// Verify package.json and npm-shrinkwrap.json have been updated
t.is((await readJson(path.resolve(cwd, 'package.json'))).version, version);
- t.is((await readJson(path.resolve(cwd, 'npm-shrinkwrap.json'))).version, version);
+ t.is(
+ (await readJson(path.resolve(cwd, 'npm-shrinkwrap.json'))).version,
+ version
+ );
// Retrieve the published package from the registry and check version and gitHead
({
- 'dist-tags': {latest: releasedVersion},
+ 'dist-tags': { latest: releasedVersion },
} = await npmView(packageName, npmTestEnv));
- head = await gitHead({cwd});
+ head = await gitHead({ cwd });
t.is(releasedVersion, version);
- t.is(await gitTagHead(`v${version}`, {cwd}), head);
- t.is(await gitRemoteTagHead(authUrl, `v${version}`, {cwd}), head);
+ t.is(await gitTagHead(`v${version}`, { cwd }), head);
+ t.is(await gitRemoteTagHead(authUrl, `v${version}`, { cwd }), head);
t.log(`+ released ${releasedVersion}`);
await mockServer.verify(verifyMock);
@@ -178,38 +213,44 @@ test('Release patch, minor and major versions', async (t) => {
version = '1.1.0';
verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
createReleaseMock = await mockServer.mock(
`/repos/${owner}/${packageName}/releases`,
{
- body: {tag_name: `v${version}`, name: `v${version}`},
- headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}],
+ body: { tag_name: `v${version}`, name: `v${version}` },
+ headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }],
},
- {body: {html_url: `release-url/${version}`}}
+ { body: { html_url: `release-url/${version}` } }
);
t.log('Commit a feature');
- await gitCommits(['feat: baz'], {cwd});
+ await gitCommits(['feat: baz'], { cwd });
t.log('$ semantic-release');
- ({stdout, exitCode} = await execa(cli, [], {env, cwd, extendEnv: false}));
- t.regex(stdout, new RegExp(`Published GitHub release: release-url/${version}`));
+ ({ stdout, exitCode } = await execa(cli, [], { env, cwd, extendEnv: false }));
+ t.regex(
+ stdout,
+ new RegExp(`Published GitHub release: release-url/${version}`)
+ );
t.regex(stdout, new RegExp(`Publishing version ${version} to npm registry`));
t.is(exitCode, 0);
// Verify package.json and npm-shrinkwrap.json have been updated
t.is((await readJson(path.resolve(cwd, 'package.json'))).version, version);
- t.is((await readJson(path.resolve(cwd, 'npm-shrinkwrap.json'))).version, version);
+ t.is(
+ (await readJson(path.resolve(cwd, 'npm-shrinkwrap.json'))).version,
+ version
+ );
// Retrieve the published package from the registry and check version and gitHead
({
- 'dist-tags': {latest: releasedVersion},
+ 'dist-tags': { latest: releasedVersion },
} = await npmView(packageName, npmTestEnv));
- head = await gitHead({cwd});
+ head = await gitHead({ cwd });
t.is(releasedVersion, version);
- t.is(await gitTagHead(`v${version}`, {cwd}), head);
- t.is(await gitRemoteTagHead(authUrl, `v${version}`, {cwd}), head);
+ t.is(await gitTagHead(`v${version}`, { cwd }), head);
+ t.is(await gitRemoteTagHead(authUrl, `v${version}`, { cwd }), head);
t.log(`+ released ${releasedVersion}`);
await mockServer.verify(verifyMock);
@@ -219,41 +260,51 @@ test('Release patch, minor and major versions', async (t) => {
version = '2.0.0';
verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
createReleaseMock = await mockServer.mock(
`/repos/${owner}/${packageName}/releases`,
{
- body: {tag_name: `v${version}`, name: `v${version}`},
- headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}],
+ body: { tag_name: `v${version}`, name: `v${version}` },
+ headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }],
},
- {body: {html_url: `release-url/${version}`}}
+ { body: { html_url: `release-url/${version}` } }
);
t.log('Commit a breaking change on next');
- await gitCheckout('next', true, {cwd});
- await gitPush('origin', 'next', {cwd});
- await gitCommits(['feat: foo\n\n BREAKING CHANGE: bar'], {cwd});
+ await gitCheckout('next', true, { cwd });
+ await gitPush('origin', 'next', { cwd });
+ await gitCommits(['feat: foo\n\n BREAKING CHANGE: bar'], { cwd });
t.log('$ semantic-release');
- ({stdout, exitCode} = await execa(cli, [], {env: {...env, TRAVIS_BRANCH: 'next'}, cwd, extendEnv: false}));
- t.regex(stdout, new RegExp(`Published GitHub release: release-url/${version}`));
+ ({ stdout, exitCode } = await execa(cli, [], {
+ env: { ...env, TRAVIS_BRANCH: 'next' },
+ cwd,
+ extendEnv: false,
+ }));
+ t.regex(
+ stdout,
+ new RegExp(`Published GitHub release: release-url/${version}`)
+ );
t.regex(stdout, new RegExp(`Publishing version ${version} to npm registry`));
t.is(exitCode, 0);
// Verify package.json and npm-shrinkwrap.json have been updated
t.is((await readJson(path.resolve(cwd, 'package.json'))).version, version);
- t.is((await readJson(path.resolve(cwd, 'npm-shrinkwrap.json'))).version, version);
+ t.is(
+ (await readJson(path.resolve(cwd, 'npm-shrinkwrap.json'))).version,
+ version
+ );
// Retrieve the published package from the registry and check version and gitHead
({
- 'dist-tags': {next: releasedVersion},
+ 'dist-tags': { next: releasedVersion },
} = await npmView(packageName, npmTestEnv));
- head = await gitHead({cwd});
+ head = await gitHead({ cwd });
t.is(releasedVersion, version);
- t.is(await gitGetNote(`v${version}`, {cwd}), '{"channels":["next"]}');
- t.is(await gitTagHead(`v${version}`, {cwd}), head);
- t.is(await gitRemoteTagHead(authUrl, `v${version}`, {cwd}), head);
+ t.is(await gitGetNote(`v${version}`, { cwd }), '{"channels":["next"]}');
+ t.is(await gitTagHead(`v${version}`, { cwd }), head);
+ t.is(await gitRemoteTagHead(authUrl, `v${version}`, { cwd }), head);
t.log(`+ released ${releasedVersion} on @next`);
await mockServer.verify(verifyMock);
@@ -264,43 +315,52 @@ test('Release patch, minor and major versions', async (t) => {
const releaseId = 1;
verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
const getReleaseMock = await mockServer.mock(
`/repos/${owner}/${packageName}/releases/tags/v2.0.0`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {id: releaseId}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { id: releaseId }, method: 'GET' }
);
const updateReleaseMock = await mockServer.mock(
`/repos/${owner}/${packageName}/releases/${releaseId}`,
{
- body: {name: `v${version}`, prerelease: false},
- headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}],
+ body: { name: `v${version}`, prerelease: false },
+ headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }],
},
- {body: {html_url: `release-url/${version}`}, method: 'PATCH'}
+ { body: { html_url: `release-url/${version}` }, method: 'PATCH' }
);
t.log('Merge next into master');
- await gitCheckout('master', false, {cwd});
- await merge('next', {cwd});
- await gitPush('origin', 'master', {cwd});
+ await gitCheckout('master', false, { cwd });
+ await merge('next', { cwd });
+ await gitPush('origin', 'master', { cwd });
t.log('$ semantic-release');
- ({stdout, exitCode} = await execa(cli, [], {env, cwd, extendEnv: false}));
+ ({ stdout, exitCode } = await execa(cli, [], { env, cwd, extendEnv: false }));
t.regex(stdout, new RegExp(`Updated GitHub release: release-url/${version}`));
- t.regex(stdout, new RegExp(`Adding version ${version} to npm registry on dist-tag latest`));
+ t.regex(
+ stdout,
+ new RegExp(`Adding version ${version} to npm registry on dist-tag latest`)
+ );
t.is(exitCode, 0);
// Wait for 3s as the change of dist-tag takes time to be reflected in the registry
await delay(3000);
// Retrieve the published package from the registry and check version and gitHead
({
- 'dist-tags': {latest: releasedVersion},
+ 'dist-tags': { latest: releasedVersion },
} = await npmView(packageName, npmTestEnv));
t.is(releasedVersion, version);
- t.is(await gitGetNote(`v${version}`, {cwd}), '{"channels":["next",null]}');
- t.is(await gitTagHead(`v${version}`, {cwd}), await gitTagHead(`v${version}`, {cwd}));
- t.is(await gitRemoteTagHead(authUrl, `v${version}`, {cwd}), await gitRemoteTagHead(authUrl, `v${version}`, {cwd}));
+ t.is(await gitGetNote(`v${version}`, { cwd }), '{"channels":["next",null]}');
+ t.is(
+ await gitTagHead(`v${version}`, { cwd }),
+ await gitTagHead(`v${version}`, { cwd })
+ );
+ t.is(
+ await gitRemoteTagHead(authUrl, `v${version}`, { cwd }),
+ await gitRemoteTagHead(authUrl, `v${version}`, { cwd })
+ );
t.log(`+ added ${releasedVersion}`);
await mockServer.verify(verifyMock);
@@ -313,15 +373,21 @@ test('Exit with 1 if a plugin is not found', async (t) => {
const owner = 'test-repo';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository');
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: `git+https://github.com/${owner}/${packageName}`},
- release: {analyzeCommits: 'non-existing-path', success: false, fail: false},
+ repository: { url: `git+https://github.com/${owner}/${packageName}` },
+ release: {
+ analyzeCommits: 'non-existing-path',
+ success: false,
+ fail: false,
+ },
});
- const {exitCode, stderr} = await t.throwsAsync(execa(cli, [], {env, cwd, extendEnv: false}));
+ const { exitCode, stderr } = await t.throwsAsync(
+ execa(cli, [], { env, cwd, extendEnv: false })
+ );
t.is(exitCode, 1);
t.regex(stderr, /Cannot find module/);
});
@@ -331,15 +397,17 @@ test('Exit with 1 if a shareable config is not found', async (t) => {
const owner = 'test-repo';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository');
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: `git+https://github.com/${owner}/${packageName}`},
- release: {extends: 'non-existing-path', success: false, fail: false},
+ repository: { url: `git+https://github.com/${owner}/${packageName}` },
+ release: { extends: 'non-existing-path', success: false, fail: false },
});
- const {exitCode, stderr} = await t.throwsAsync(execa(cli, [], {env, cwd, extendEnv: false}));
+ const { exitCode, stderr } = await t.throwsAsync(
+ execa(cli, [], { env, cwd, extendEnv: false })
+ );
t.is(exitCode, 1);
t.regex(stderr, /Cannot find module/);
});
@@ -347,20 +415,22 @@ test('Exit with 1 if a shareable config is not found', async (t) => {
test('Exit with 1 if a shareable config reference a not found plugin', async (t) => {
const packageName = 'test-config-ref-not-found';
const owner = 'test-repo';
- const shareable = {analyzeCommits: 'non-existing-path'};
+ const shareable = { analyzeCommits: 'non-existing-path' };
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository');
- const {cwd} = await gitRepo();
+ const { cwd } = await gitRepo();
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: `git+https://github.com/${owner}/${packageName}`},
- release: {extends: './shareable.json', success: false, fail: false},
+ repository: { url: `git+https://github.com/${owner}/${packageName}` },
+ release: { extends: './shareable.json', success: false, fail: false },
});
await writeJson(path.resolve(cwd, 'shareable.json'), shareable);
- const {exitCode, stderr} = await t.throwsAsync(execa(cli, [], {env, cwd, extendEnv: false}));
+ const { exitCode, stderr } = await t.throwsAsync(
+ execa(cli, [], { env, cwd, extendEnv: false })
+ );
t.is(exitCode, 1);
t.regex(stderr, /Cannot find module/);
});
@@ -370,75 +440,94 @@ test('Dry-run', async (t) => {
const owner = 'git';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository and package.json');
- const {cwd, repositoryUrl} = await gitbox.createRepo(packageName);
+ const { cwd, repositoryUrl } = await gitbox.createRepo(packageName);
// Create package.json in repository root
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: repositoryUrl},
- publishConfig: {registry: npmRegistry.url},
- release: {success: false, fail: false},
+ repository: { url: repositoryUrl },
+ publishConfig: { registry: npmRegistry.url },
+ release: { success: false, fail: false },
});
/* Initial release */
const verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
const version = '1.0.0';
t.log('Commit a feature');
- await gitCommits(['feat: Initial commit'], {cwd});
+ await gitCommits(['feat: Initial commit'], { cwd });
t.log('$ semantic-release -d');
- const {stdout, exitCode} = await execa(cli, ['-d'], {env, cwd, extendEnv: false});
- t.regex(stdout, new RegExp(`There is no previous release, the next release version is ${version}`));
+ const { stdout, exitCode } = await execa(cli, ['-d'], {
+ env,
+ cwd,
+ extendEnv: false,
+ });
+ t.regex(
+ stdout,
+ new RegExp(
+ `There is no previous release, the next release version is ${version}`
+ )
+ );
t.regex(stdout, new RegExp(`Release note for version ${version}`));
t.regex(stdout, /Initial commit/);
t.is(exitCode, 0);
// Verify package.json and has not been modified
- t.is((await readJson(path.resolve(cwd, 'package.json'))).version, '0.0.0-dev');
+ t.is(
+ (await readJson(path.resolve(cwd, 'package.json'))).version,
+ '0.0.0-dev'
+ );
await mockServer.verify(verifyMock);
});
test('Allow local releases with "noCi" option', async (t) => {
- const envNoCi = {...env};
+ const envNoCi = { ...env };
delete envNoCi.CI;
const packageName = 'test-no-ci';
const owner = 'git';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository and package.json');
- const {cwd, repositoryUrl, authUrl} = await gitbox.createRepo(packageName);
+ const { cwd, repositoryUrl, authUrl } = await gitbox.createRepo(packageName);
// Create package.json in repository root
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: repositoryUrl},
- publishConfig: {registry: npmRegistry.url},
- release: {success: false, fail: false},
+ repository: { url: repositoryUrl },
+ publishConfig: { registry: npmRegistry.url },
+ release: { success: false, fail: false },
});
/* Initial release */
const version = '1.0.0';
const verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
const createReleaseMock = await mockServer.mock(
`/repos/${owner}/${packageName}/releases`,
{
- body: {tag_name: `v${version}`, name: `v${version}`},
- headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}],
+ body: { tag_name: `v${version}`, name: `v${version}` },
+ headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }],
},
- {body: {html_url: `release-url/${version}`}}
+ { body: { html_url: `release-url/${version}` } }
);
t.log('Commit a feature');
- await gitCommits(['feat: Initial commit'], {cwd});
+ await gitCommits(['feat: Initial commit'], { cwd });
t.log('$ semantic-release --no-ci');
- const {stdout, exitCode} = await execa(cli, ['--no-ci'], {env: envNoCi, cwd, extendEnv: false});
- t.regex(stdout, new RegExp(`Published GitHub release: release-url/${version}`));
+ const { stdout, exitCode } = await execa(cli, ['--no-ci'], {
+ env: envNoCi,
+ cwd,
+ extendEnv: false,
+ });
+ t.regex(
+ stdout,
+ new RegExp(`Published GitHub release: release-url/${version}`)
+ );
t.regex(stdout, new RegExp(`Publishing version ${version} to npm registry`));
t.is(exitCode, 0);
@@ -446,13 +535,16 @@ test('Allow local releases with "noCi" option', async (t) => {
t.is((await readJson(path.resolve(cwd, 'package.json'))).version, version);
// Retrieve the published package from the registry and check version and gitHead
- const {version: releasedVersion, gitHead: releasedGitHead} = await npmView(packageName, npmTestEnv);
+ const { version: releasedVersion, gitHead: releasedGitHead } = await npmView(
+ packageName,
+ npmTestEnv
+ );
- const head = await gitHead({cwd});
+ const head = await gitHead({ cwd });
t.is(releasedVersion, version);
t.is(releasedGitHead, head);
- t.is(await gitTagHead(`v${version}`, {cwd}), head);
- t.is(await gitRemoteTagHead(authUrl, `v${version}`, {cwd}), head);
+ t.is(await gitTagHead(`v${version}`, { cwd }), head);
+ t.is(await gitRemoteTagHead(authUrl, `v${version}`, { cwd }), head);
t.log(`+ released ${releasedVersion} with head ${releasedGitHead}`);
await mockServer.verify(verifyMock);
@@ -463,21 +555,21 @@ test('Pass options via CLI arguments', async (t) => {
const packageName = 'test-cli';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository and package.json');
- const {cwd, repositoryUrl, authUrl} = await gitbox.createRepo(packageName);
+ const { cwd, repositoryUrl, authUrl } = await gitbox.createRepo(packageName);
// Create package.json in repository root
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: repositoryUrl},
- publishConfig: {registry: npmRegistry.url},
+ repository: { url: repositoryUrl },
+ publishConfig: { registry: npmRegistry.url },
});
/* Initial release */
const version = '1.0.0';
t.log('Commit a feature');
- await gitCommits(['feat: Initial commit'], {cwd});
+ await gitCommits(['feat: Initial commit'], { cwd });
t.log('$ semantic-release');
- const {stdout, exitCode} = await execa(
+ const { stdout, exitCode } = await execa(
cli,
[
'--verify-conditions',
@@ -490,7 +582,7 @@ test('Pass options via CLI arguments', async (t) => {
false,
'--debug',
],
- {env, cwd, extendEnv: false}
+ { env, cwd, extendEnv: false }
);
t.regex(stdout, new RegExp(`Publishing version ${version} to npm registry`));
t.is(exitCode, 0);
@@ -499,31 +591,34 @@ test('Pass options via CLI arguments', async (t) => {
t.is((await readJson(path.resolve(cwd, 'package.json'))).version, version);
// Retrieve the published package from the registry and check version and gitHead
- const {version: releasedVersion, gitHead: releasedGitHead} = await npmView(packageName, npmTestEnv);
- const head = await gitHead({cwd});
+ const { version: releasedVersion, gitHead: releasedGitHead } = await npmView(
+ packageName,
+ npmTestEnv
+ );
+ const head = await gitHead({ cwd });
t.is(releasedVersion, version);
t.is(releasedGitHead, head);
- t.is(await gitTagHead(`v${version}`, {cwd}), head);
- t.is(await gitRemoteTagHead(authUrl, `v${version}`, {cwd}), head);
+ t.is(await gitTagHead(`v${version}`, { cwd }), head);
+ t.is(await gitRemoteTagHead(authUrl, `v${version}`, { cwd }), head);
t.log(`+ released ${releasedVersion} with head ${releasedGitHead}`);
});
test('Run via JS API', async (t) => {
const semanticRelease = requireNoCache('..', {
- './lib/logger': {log: () => {}, error: () => {}, stdout: () => {}},
- 'env-ci': () => ({isCi: true, branch: 'master', isPr: false}),
+ './lib/logger': { log: () => {}, error: () => {}, stdout: () => {} },
+ 'env-ci': () => ({ isCi: true, branch: 'master', isPr: false }),
});
const packageName = 'test-js-api';
const owner = 'git';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository and package.json');
- const {cwd, repositoryUrl, authUrl} = await gitbox.createRepo(packageName);
+ const { cwd, repositoryUrl, authUrl } = await gitbox.createRepo(packageName);
// Create package.json in repository root
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: repositoryUrl},
- publishConfig: {registry: npmRegistry.url},
+ repository: { url: repositoryUrl },
+ publishConfig: { registry: npmRegistry.url },
release: {
fail: false,
success: false,
@@ -534,33 +629,41 @@ test('Run via JS API', async (t) => {
const version = '1.0.0';
const verifyMock = await mockServer.mock(
`/repos/${owner}/${packageName}`,
- {headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}]},
- {body: {permissions: {push: true}}, method: 'GET'}
+ { headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }] },
+ { body: { permissions: { push: true } }, method: 'GET' }
);
const createReleaseMock = await mockServer.mock(
`/repos/${owner}/${packageName}/releases`,
{
- body: {tag_name: `v${version}`, name: `v${version}`},
- headers: [{name: 'Authorization', values: [`token ${env.GH_TOKEN}`]}],
+ body: { tag_name: `v${version}`, name: `v${version}` },
+ headers: [{ name: 'Authorization', values: [`token ${env.GH_TOKEN}`] }],
},
- {body: {html_url: `release-url/${version}`}}
+ { body: { html_url: `release-url/${version}` } }
);
t.log('Commit a feature');
- await gitCommits(['feat: Initial commit'], {cwd});
+ await gitCommits(['feat: Initial commit'], { cwd });
t.log('$ Call semantic-release via API');
- await semanticRelease(undefined, {cwd, env, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer()});
+ await semanticRelease(undefined, {
+ cwd,
+ env,
+ stdout: new WritableStreamBuffer(),
+ stderr: new WritableStreamBuffer(),
+ });
// Verify package.json and has been updated
t.is((await readJson(path.resolve(cwd, 'package.json'))).version, version);
// Retrieve the published package from the registry and check version and gitHead
- const {version: releasedVersion, gitHead: releasedGitHead} = await npmView(packageName, npmTestEnv);
- const head = await gitHead({cwd});
+ const { version: releasedVersion, gitHead: releasedGitHead } = await npmView(
+ packageName,
+ npmTestEnv
+ );
+ const head = await gitHead({ cwd });
t.is(releasedVersion, version);
t.is(releasedGitHead, head);
- t.is(await gitTagHead(`v${version}`, {cwd}), head);
- t.is(await gitRemoteTagHead(authUrl, `v${version}`, {cwd}), head);
+ t.is(await gitTagHead(`v${version}`, { cwd }), head);
+ t.is(await gitRemoteTagHead(authUrl, `v${version}`, { cwd }), head);
t.log(`+ released ${releasedVersion} with head ${releasedGitHead}`);
await mockServer.verify(verifyMock);
@@ -571,20 +674,25 @@ test('Log unexpected errors from plugins and exit with 1', async (t) => {
const packageName = 'test-unexpected-error';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository and package.json');
- const {cwd, repositoryUrl} = await gitbox.createRepo(packageName);
+ const { cwd, repositoryUrl } = await gitbox.createRepo(packageName);
// Create package.json in repository root
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: repositoryUrl},
- release: {verifyConditions: pluginError, fail: false, success: false},
+ repository: { url: repositoryUrl },
+ release: { verifyConditions: pluginError, fail: false, success: false },
});
/* Initial release */
t.log('Commit a feature');
- await gitCommits(['feat: Initial commit'], {cwd});
+ await gitCommits(['feat: Initial commit'], { cwd });
t.log('$ semantic-release');
- const {stderr, exitCode} = await execa(cli, [], {env, cwd, reject: false, extendEnv: false});
+ const { stderr, exitCode } = await execa(cli, [], {
+ env,
+ cwd,
+ reject: false,
+ extendEnv: false,
+ });
// Verify the type and message are logged
t.regex(stderr, /Error: a/);
// Verify the the stacktrace is logged
@@ -598,20 +706,29 @@ test('Log errors inheriting SemanticReleaseError and exit with 1', async (t) =>
const packageName = 'test-inherited-error';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository and package.json');
- const {cwd, repositoryUrl} = await gitbox.createRepo(packageName);
+ const { cwd, repositoryUrl } = await gitbox.createRepo(packageName);
// Create package.json in repository root
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: repositoryUrl},
- release: {verifyConditions: pluginInheritedError, fail: false, success: false},
+ repository: { url: repositoryUrl },
+ release: {
+ verifyConditions: pluginInheritedError,
+ fail: false,
+ success: false,
+ },
});
/* Initial release */
t.log('Commit a feature');
- await gitCommits(['feat: Initial commit'], {cwd});
+ await gitCommits(['feat: Initial commit'], { cwd });
t.log('$ semantic-release');
- const {stderr, exitCode} = await execa(cli, [], {env, cwd, reject: false, extendEnv: false});
+ const { stderr, exitCode } = await execa(cli, [], {
+ env,
+ cwd,
+ reject: false,
+ extendEnv: false,
+ });
// Verify the type and message are logged
t.regex(stderr, /EINHERITED Inherited error/);
t.is(exitCode, 1);
@@ -621,18 +738,29 @@ test('Exit with 1 if missing permission to push to the remote repository', async
const packageName = 'unauthorized';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository');
- const {cwd} = await gitbox.createRepo(packageName);
- await writeJson(path.resolve(cwd, 'package.json'), {name: packageName, version: '0.0.0-dev'});
+ const { cwd } = await gitbox.createRepo(packageName);
+ await writeJson(path.resolve(cwd, 'package.json'), {
+ name: packageName,
+ version: '0.0.0-dev',
+ });
/* Initial release */
t.log('Commit a feature');
- await gitCommits(['feat: Initial commit'], {cwd});
- await gitPush('origin', 'master', {cwd});
+ await gitCommits(['feat: Initial commit'], { cwd });
+ await gitPush('origin', 'master', { cwd });
t.log('$ semantic-release');
- const {stderr, exitCode} = await execa(
+ const { stderr, exitCode } = await execa(
cli,
- ['--repository-url', 'http://user:wrong_pass@localhost:2080/git/unauthorized.git'],
- {env: {...env, GH_TOKEN: 'user:wrong_pass'}, cwd, reject: false, extendEnv: false}
+ [
+ '--repository-url',
+ 'http://user:wrong_pass@localhost:2080/git/unauthorized.git',
+ ],
+ {
+ env: { ...env, GH_TOKEN: 'user:wrong_pass' },
+ cwd,
+ reject: false,
+ extendEnv: false,
+ }
);
// Verify the type and message are logged
t.regex(stderr, /EGITNOPERMISSION/);
@@ -643,30 +771,42 @@ test('Hide sensitive environment variable values from the logs', async (t) => {
const packageName = 'log-secret';
// Create a git repository, set the current working directory at the root of the repo
t.log('Create git repository');
- const {cwd, repositoryUrl} = await gitbox.createRepo(packageName);
+ const { cwd, repositoryUrl } = await gitbox.createRepo(packageName);
await writeJson(path.resolve(cwd, 'package.json'), {
name: packageName,
version: '0.0.0-dev',
- repository: {url: repositoryUrl},
- release: {verifyConditions: [pluginLogEnv], fail: false, success: false},
+ repository: { url: repositoryUrl },
+ release: { verifyConditions: [pluginLogEnv], fail: false, success: false },
});
t.log('$ semantic-release');
- const {stdout, stderr} = await execa(cli, [], {
- env: {...env, MY_TOKEN: 'secret token'},
+ const { stdout, stderr } = await execa(cli, [], {
+ env: { ...env, MY_TOKEN: 'secret token' },
cwd,
reject: false,
extendEnv: false,
});
- t.regex(stdout, new RegExp(`Console: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`));
- t.regex(stdout, new RegExp(`Log: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`));
- t.regex(stderr, new RegExp(`Error: Console token ${escapeRegExp(SECRET_REPLACEMENT)}`));
- t.regex(stderr, new RegExp(`Throw error: Exposing ${escapeRegExp(SECRET_REPLACEMENT)}`));
+ t.regex(
+ stdout,
+ new RegExp(`Console: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`)
+ );
+ t.regex(
+ stdout,
+ new RegExp(`Log: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`)
+ );
+ t.regex(
+ stderr,
+ new RegExp(`Error: Console token ${escapeRegExp(SECRET_REPLACEMENT)}`)
+ );
+ t.regex(
+ stderr,
+ new RegExp(`Throw error: Exposing ${escapeRegExp(SECRET_REPLACEMENT)}`)
+ );
});
test('Use the valid git credentials when multiple are provided', async (t) => {
- const {cwd, authUrl} = await gitbox.createRepo('test-auth');
+ const { cwd, authUrl } = await gitbox.createRepo('test-auth');
t.is(
await getAuthUrl({
@@ -678,15 +818,17 @@ test('Use the valid git credentials when multiple are provided', async (t) => {
GIT_ASKPASS: 'echo',
GIT_TERMINAL_PROMPT: 0,
},
- branch: {name: 'master'},
- options: {repositoryUrl: 'http://toto@localhost:2080/git/test-auth.git'},
+ branch: { name: 'master' },
+ options: {
+ repositoryUrl: 'http://toto@localhost:2080/git/test-auth.git',
+ },
}),
authUrl
);
});
test('Use the repository URL as is if none of the given git credentials are valid', async (t) => {
- const {cwd} = await gitbox.createRepo('test-invalid-auth');
+ const { cwd } = await gitbox.createRepo('test-invalid-auth');
const dummyUrl = 'http://toto@localhost:2080/git/test-invalid-auth.git';
t.is(
@@ -698,8 +840,8 @@ test('Use the repository URL as is if none of the given git credentials are vali
GIT_ASKPASS: 'echo',
GIT_TERMINAL_PROMPT: 0,
},
- branch: {name: 'master'},
- options: {repositoryUrl: dummyUrl},
+ branch: { name: 'master' },
+ options: { repositoryUrl: dummyUrl },
}),
dummyUrl
);
diff --git a/test/plugins/normalize.test.js b/test/plugins/normalize.test.js
index 784714b010..9f0474f03f 100644
--- a/test/plugins/normalize.test.js
+++ b/test/plugins/normalize.test.js
@@ -1,6 +1,6 @@
const test = require('ava');
-const {noop} = require('lodash');
-const {stub} = require('sinon');
+const { noop } = require('lodash');
+const { stub } = require('sinon');
const normalize = require('../../lib/plugins/normalize');
const cwd = process.cwd();
@@ -10,7 +10,7 @@ test.beforeEach((t) => {
t.context.log = stub();
t.context.error = stub();
t.context.success = stub();
- t.context.stderr = {write: stub()};
+ t.context.stderr = { write: stub() };
t.context.logger = {
log: t.context.log,
error: t.context.error,
@@ -21,7 +21,7 @@ test.beforeEach((t) => {
test('Normalize and load plugin from string', (t) => {
const plugin = normalize(
- {cwd, options: {}, logger: t.context.logger},
+ { cwd, options: {}, logger: t.context.logger },
'verifyConditions',
'./test/fixtures/plugin-noop',
{}
@@ -29,26 +29,35 @@ test('Normalize and load plugin from string', (t) => {
t.is(plugin.pluginName, './test/fixtures/plugin-noop');
t.is(typeof plugin, 'function');
- t.deepEqual(t.context.success.args[0], ['Loaded plugin "verifyConditions" from "./test/fixtures/plugin-noop"']);
+ t.deepEqual(t.context.success.args[0], [
+ 'Loaded plugin "verifyConditions" from "./test/fixtures/plugin-noop"',
+ ]);
});
test('Normalize and load plugin from object', (t) => {
const plugin = normalize(
- {cwd, options: {}, logger: t.context.logger},
+ { cwd, options: {}, logger: t.context.logger },
'publish',
- {path: './test/fixtures/plugin-noop'},
+ { path: './test/fixtures/plugin-noop' },
{}
);
t.is(plugin.pluginName, './test/fixtures/plugin-noop');
t.is(typeof plugin, 'function');
- t.deepEqual(t.context.success.args[0], ['Loaded plugin "publish" from "./test/fixtures/plugin-noop"']);
+ t.deepEqual(t.context.success.args[0], [
+ 'Loaded plugin "publish" from "./test/fixtures/plugin-noop"',
+ ]);
});
test('Normalize and load plugin from a base file path', (t) => {
- const plugin = normalize({cwd, options: {}, logger: t.context.logger}, 'verifyConditions', './plugin-noop', {
- './plugin-noop': './test/fixtures',
- });
+ const plugin = normalize(
+ { cwd, options: {}, logger: t.context.logger },
+ 'verifyConditions',
+ './plugin-noop',
+ {
+ './plugin-noop': './test/fixtures',
+ }
+ );
t.is(plugin.pluginName, './plugin-noop');
t.is(typeof plugin, 'function');
@@ -58,21 +67,31 @@ test('Normalize and load plugin from a base file path', (t) => {
});
test('Wrap plugin in a function that add the "pluginName" to the error"', async (t) => {
- const plugin = normalize({cwd, options: {}, logger: t.context.logger}, 'verifyConditions', './plugin-error', {
- './plugin-error': './test/fixtures',
- });
+ const plugin = normalize(
+ { cwd, options: {}, logger: t.context.logger },
+ 'verifyConditions',
+ './plugin-error',
+ {
+ './plugin-error': './test/fixtures',
+ }
+ );
- const error = await t.throwsAsync(plugin({options: {}}));
+ const error = await t.throwsAsync(plugin({ options: {} }));
t.is(error.pluginName, './plugin-error');
});
test('Wrap plugin in a function that add the "pluginName" to multiple errors"', async (t) => {
- const plugin = normalize({cwd, options: {}, logger: t.context.logger}, 'verifyConditions', './plugin-errors', {
- './plugin-errors': './test/fixtures',
- });
+ const plugin = normalize(
+ { cwd, options: {}, logger: t.context.logger },
+ 'verifyConditions',
+ './plugin-errors',
+ {
+ './plugin-errors': './test/fixtures',
+ }
+ );
- const errors = [...(await t.throwsAsync(plugin({options: {}})))];
+ const errors = [...(await t.throwsAsync(plugin({ options: {} })))];
for (const error of errors) {
t.is(error.pluginName, './plugin-errors');
}
@@ -80,7 +99,12 @@ test('Wrap plugin in a function that add the "pluginName" to multiple errors"',
test('Normalize and load plugin from function', (t) => {
const pluginFunction = () => {};
- const plugin = normalize({cwd, options: {}, logger: t.context.logger}, '', pluginFunction, {});
+ const plugin = normalize(
+ { cwd, options: {}, logger: t.context.logger },
+ '',
+ pluginFunction,
+ {}
+ );
t.is(plugin.pluginName, '[Function: pluginFunction]');
t.is(typeof plugin, 'function');
@@ -88,26 +112,28 @@ test('Normalize and load plugin from function', (t) => {
test('Normalize and load plugin that retuns multiple functions', (t) => {
const plugin = normalize(
- {cwd, options: {}, logger: t.context.logger},
+ { cwd, options: {}, logger: t.context.logger },
'verifyConditions',
'./test/fixtures/multi-plugin',
{}
);
t.is(typeof plugin, 'function');
- t.deepEqual(t.context.success.args[0], ['Loaded plugin "verifyConditions" from "./test/fixtures/multi-plugin"']);
+ t.deepEqual(t.context.success.args[0], [
+ 'Loaded plugin "verifyConditions" from "./test/fixtures/multi-plugin"',
+ ]);
});
test('Wrap "analyzeCommits" plugin in a function that validate the output of the plugin', async (t) => {
const analyzeCommits = stub().resolves(2);
const plugin = normalize(
- {cwd, options: {}, stderr: t.context.stderr, logger: t.context.logger},
+ { cwd, options: {}, stderr: t.context.stderr, logger: t.context.logger },
'analyzeCommits',
analyzeCommits,
{}
);
- const error = await t.throwsAsync(plugin({options: {}}));
+ const error = await t.throwsAsync(plugin({ options: {} }));
t.is(error.code, 'EANALYZECOMMITSOUTPUT');
t.is(error.name, 'SemanticReleaseError');
@@ -119,13 +145,13 @@ test('Wrap "analyzeCommits" plugin in a function that validate the output of the
test('Wrap "generateNotes" plugin in a function that validate the output of the plugin', async (t) => {
const generateNotes = stub().resolves(2);
const plugin = normalize(
- {cwd, options: {}, stderr: t.context.stderr, logger: t.context.logger},
+ { cwd, options: {}, stderr: t.context.stderr, logger: t.context.logger },
'generateNotes',
generateNotes,
{}
);
- const error = await t.throwsAsync(plugin({options: {}}));
+ const error = await t.throwsAsync(plugin({ options: {} }));
t.is(error.code, 'EGENERATENOTESOUTPUT');
t.is(error.name, 'SemanticReleaseError');
@@ -137,13 +163,13 @@ test('Wrap "generateNotes" plugin in a function that validate the output of the
test('Wrap "publish" plugin in a function that validate the output of the plugin', async (t) => {
const publish = stub().resolves(2);
const plugin = normalize(
- {cwd, options: {}, stderr: t.context.stderr, logger: t.context.logger},
+ { cwd, options: {}, stderr: t.context.stderr, logger: t.context.logger },
'publish',
publish,
{}
);
- const error = await t.throwsAsync(plugin({options: {}}));
+ const error = await t.throwsAsync(plugin({ options: {} }));
t.is(error.code, 'EPUBLISHOUTPUT');
t.is(error.name, 'SemanticReleaseError');
@@ -155,13 +181,13 @@ test('Wrap "publish" plugin in a function that validate the output of the plugin
test('Wrap "addChannel" plugin in a function that validate the output of the plugin', async (t) => {
const addChannel = stub().resolves(2);
const plugin = normalize(
- {cwd, options: {}, stderr: t.context.stderr, logger: t.context.logger},
+ { cwd, options: {}, stderr: t.context.stderr, logger: t.context.logger },
'addChannel',
addChannel,
{}
);
- const error = await t.throwsAsync(plugin({options: {}}));
+ const error = await t.throwsAsync(plugin({ options: {} }));
t.is(error.code, 'EADDCHANNELOUTPUT');
t.is(error.name, 'SemanticReleaseError');
@@ -172,30 +198,40 @@ test('Wrap "addChannel" plugin in a function that validate the output of the plu
test('Plugin is called with "pluginConfig" (with object definition) and input', async (t) => {
const pluginFunction = stub().resolves();
- const pluginConf = {path: pluginFunction, conf: 'confValue'};
- const options = {global: 'globalValue'};
- const plugin = normalize({cwd, options, logger: t.context.logger}, '', pluginConf, {});
- await plugin({options: {}, param: 'param'});
+ const pluginConf = { path: pluginFunction, conf: 'confValue' };
+ const options = { global: 'globalValue' };
+ const plugin = normalize(
+ { cwd, options, logger: t.context.logger },
+ '',
+ pluginConf,
+ {}
+ );
+ await plugin({ options: {}, param: 'param' });
t.true(
pluginFunction.calledWithMatch(
- {conf: 'confValue', global: 'globalValue'},
- {param: 'param', logger: t.context.logger}
+ { conf: 'confValue', global: 'globalValue' },
+ { param: 'param', logger: t.context.logger }
)
);
});
test('Plugin is called with "pluginConfig" (with array definition) and input', async (t) => {
const pluginFunction = stub().resolves();
- const pluginConf = [pluginFunction, {conf: 'confValue'}];
- const options = {global: 'globalValue'};
- const plugin = normalize({cwd, options, logger: t.context.logger}, '', pluginConf, {});
- await plugin({options: {}, param: 'param'});
+ const pluginConf = [pluginFunction, { conf: 'confValue' }];
+ const options = { global: 'globalValue' };
+ const plugin = normalize(
+ { cwd, options, logger: t.context.logger },
+ '',
+ pluginConf,
+ {}
+ );
+ await plugin({ options: {}, param: 'param' });
t.true(
pluginFunction.calledWithMatch(
- {conf: 'confValue', global: 'globalValue'},
- {param: 'param', logger: t.context.logger}
+ { conf: 'confValue', global: 'globalValue' },
+ { param: 'param', logger: t.context.logger }
)
);
});
@@ -204,10 +240,18 @@ test('Prevent plugins to modify "pluginConfig"', async (t) => {
const pluginFunction = stub().callsFake((pluginConfig) => {
pluginConfig.conf.subConf = 'otherConf';
});
- const pluginConf = {path: pluginFunction, conf: {subConf: 'originalConf'}};
- const options = {globalConf: {globalSubConf: 'originalGlobalConf'}};
- const plugin = normalize({cwd, options, logger: t.context.logger}, '', pluginConf, {});
- await plugin({options: {}});
+ const pluginConf = {
+ path: pluginFunction,
+ conf: { subConf: 'originalConf' },
+ };
+ const options = { globalConf: { globalSubConf: 'originalGlobalConf' } };
+ const plugin = normalize(
+ { cwd, options, logger: t.context.logger },
+ '',
+ pluginConf,
+ {}
+ );
+ await plugin({ options: {} });
t.is(pluginConf.conf.subConf, 'originalConf');
t.is(options.globalConf.globalSubConf, 'originalGlobalConf');
@@ -217,15 +261,20 @@ test('Prevent plugins to modify its input', async (t) => {
const pluginFunction = stub().callsFake((pluginConfig, options) => {
options.param.subParam = 'otherParam';
});
- const input = {param: {subParam: 'originalSubParam'}, options: {}};
- const plugin = normalize({cwd, options: {}, logger: t.context.logger}, '', pluginFunction, {});
+ const input = { param: { subParam: 'originalSubParam' }, options: {} };
+ const plugin = normalize(
+ { cwd, options: {}, logger: t.context.logger },
+ '',
+ pluginFunction,
+ {}
+ );
await plugin(input);
t.is(input.param.subParam, 'originalSubParam');
});
test('Return noop if the plugin is not defined', (t) => {
- const plugin = normalize({cwd, options: {}, logger: t.context.logger});
+ const plugin = normalize({ cwd, options: {}, logger: t.context.logger });
t.is(plugin, noop);
});
@@ -233,12 +282,12 @@ test('Return noop if the plugin is not defined', (t) => {
test('Always pass a defined "pluginConfig" for plugin defined with string', async (t) => {
// Call the normalize function with the path of a plugin that returns its config
const plugin = normalize(
- {cwd, options: {}, logger: t.context.logger},
+ { cwd, options: {}, logger: t.context.logger },
'',
'./test/fixtures/plugin-result-config',
{}
);
- const pluginResult = await plugin({options: {}});
+ const pluginResult = await plugin({ options: {} });
t.deepEqual(pluginResult.pluginConfig, {});
});
@@ -246,19 +295,24 @@ test('Always pass a defined "pluginConfig" for plugin defined with string', asyn
test('Always pass a defined "pluginConfig" for plugin defined with path', async (t) => {
// Call the normalize function with the path of a plugin that returns its config
const plugin = normalize(
- {cwd, options: {}, logger: t.context.logger},
+ { cwd, options: {}, logger: t.context.logger },
'',
- {path: './test/fixtures/plugin-result-config'},
+ { path: './test/fixtures/plugin-result-config' },
{}
);
- const pluginResult = await plugin({options: {}});
+ const pluginResult = await plugin({ options: {} });
t.deepEqual(pluginResult.pluginConfig, {});
});
test('Throws an error if the plugin return an object without the expected plugin function', (t) => {
const error = t.throws(() =>
- normalize({cwd, options: {}, logger: t.context.logger}, 'inexistantPlugin', './test/fixtures/multi-plugin', {})
+ normalize(
+ { cwd, options: {}, logger: t.context.logger },
+ 'inexistantPlugin',
+ './test/fixtures/multi-plugin',
+ {}
+ )
);
t.is(error.code, 'EPLUGIN');
@@ -268,9 +322,18 @@ test('Throws an error if the plugin return an object without the expected plugin
});
test('Throws an error if the plugin is not found', (t) => {
- t.throws(() => normalize({cwd, options: {}, logger: t.context.logger}, 'inexistantPlugin', 'non-existing-path', {}), {
- message: /Cannot find module 'non-existing-path'/,
- code: 'MODULE_NOT_FOUND',
- instanceOf: Error,
- });
+ t.throws(
+ () =>
+ normalize(
+ { cwd, options: {}, logger: t.context.logger },
+ 'inexistantPlugin',
+ 'non-existing-path',
+ {}
+ ),
+ {
+ message: /Cannot find module 'non-existing-path'/,
+ code: 'MODULE_NOT_FOUND',
+ instanceOf: Error,
+ }
+ );
});
diff --git a/test/plugins/pipeline.test.js b/test/plugins/pipeline.test.js
index 5af2a6c26d..81d08a1c36 100644
--- a/test/plugins/pipeline.test.js
+++ b/test/plugins/pipeline.test.js
@@ -1,5 +1,5 @@
const test = require('ava');
-const {stub} = require('sinon');
+const { stub } = require('sinon');
const AggregateError = require('aggregate-error');
const pipeline = require('../../lib/plugins/pipeline');
@@ -25,7 +25,10 @@ test('Execute each function in series passing a transformed input from "getNextI
const step4 = stub().resolves(4);
const getNextInput = (lastResult, result) => lastResult + result;
- const result = await pipeline([step1, step2, step3, step4], {settleAll: false, getNextInput})(0);
+ const result = await pipeline([step1, step2, step3, step4], {
+ settleAll: false,
+ getNextInput,
+ })(0);
t.deepEqual(result, [1, 2, 3, 4]);
t.true(step1.calledWith(0));
@@ -44,7 +47,10 @@ test('Execute each function in series passing the "lastResult" and "result" to "
const step4 = stub().resolves(4);
const getNextInput = stub().returnsArg(0);
- const result = await pipeline([step1, step2, step3, step4], {settleAll: false, getNextInput})(5);
+ const result = await pipeline([step1, step2, step3, step4], {
+ settleAll: false,
+ getNextInput,
+ })(5);
t.deepEqual(result, [1, 2, 3, 4]);
t.deepEqual(getNextInput.args, [
@@ -63,7 +69,10 @@ test('Execute each function in series calling "transform" to modify the results'
const getNextInput = stub().returnsArg(0);
const transform = stub().callsFake((result) => result + 1);
- const result = await pipeline([step1, step2, step3, step4], {getNextInput, transform})(5);
+ const result = await pipeline([step1, step2, step3, step4], {
+ getNextInput,
+ transform,
+ })(5);
t.deepEqual(result, [1 + 1, 2 + 1, 3 + 1, 4 + 1]);
t.deepEqual(getNextInput.args, [
@@ -82,7 +91,11 @@ test('Execute each function in series calling "transform" to modify the results
const getNextInput = stub().returnsArg(0);
const transform = stub().callsFake((result) => result + 1);
- const result = await pipeline([step1, step2, step3, step4], {settleAll: true, getNextInput, transform})(5);
+ const result = await pipeline([step1, step2, step3, step4], {
+ settleAll: true,
+ getNextInput,
+ transform,
+ })(5);
t.deepEqual(result, [1 + 1, 2 + 1, 3 + 1, 4 + 1]);
t.deepEqual(getNextInput.args, [
@@ -131,7 +144,9 @@ test('Execute all even if a Promise rejects', async (t) => {
const step2 = stub().rejects(error1);
const step3 = stub().rejects(error2);
- const errors = await t.throwsAsync(pipeline([step1, step2, step3], {settleAll: true})(0));
+ const errors = await t.throwsAsync(
+ pipeline([step1, step2, step3], { settleAll: true })(0)
+ );
t.deepEqual([...errors], [error1, error2]);
t.true(step1.calledWith(0));
@@ -147,7 +162,9 @@ test('Throw all errors from all steps throwing an AggregateError', async (t) =>
const step1 = stub().rejects(new AggregateError([error1, error2]));
const step2 = stub().rejects(new AggregateError([error3, error4]));
- const errors = await t.throwsAsync(pipeline([step1, step2], {settleAll: true})(0));
+ const errors = await t.throwsAsync(
+ pipeline([step1, step2], { settleAll: true })(0)
+ );
t.deepEqual([...errors], [error1, error2, error3, error4]);
t.true(step1.calledWith(0));
@@ -163,7 +180,9 @@ test('Execute each function in series passing a transformed input even if a step
const step4 = stub().resolves(4);
const getNextInput = (previousResult, result) => previousResult + result;
- const errors = await t.throwsAsync(pipeline([step1, step2, step3, step4], {settleAll: true, getNextInput})(0));
+ const errors = await t.throwsAsync(
+ pipeline([step1, step2, step3, step4], { settleAll: true, getNextInput })(0)
+ );
t.deepEqual([...errors], [error2, error3]);
t.true(step1.calledWith(0));
diff --git a/test/plugins/plugins.test.js b/test/plugins/plugins.test.js
index 417e7b0cbe..60295d2a3b 100644
--- a/test/plugins/plugins.test.js
+++ b/test/plugins/plugins.test.js
@@ -1,7 +1,7 @@
const path = require('path');
const test = require('ava');
-const {copy, outputFile} = require('fs-extra');
-const {stub} = require('sinon');
+const { copy, outputFile } = require('fs-extra');
+const { stub } = require('sinon');
const tempy = require('tempy');
const getPlugins = require('../../lib/plugins');
@@ -12,11 +12,18 @@ test.beforeEach((t) => {
// Stub the logger functions
t.context.log = stub();
t.context.success = stub();
- t.context.logger = {log: t.context.log, success: t.context.success, scope: () => t.context.logger};
+ t.context.logger = {
+ log: t.context.log,
+ success: t.context.success,
+ scope: () => t.context.logger,
+ };
});
test('Export default plugins', (t) => {
- const plugins = getPlugins({cwd, options: {}, logger: t.context.logger}, {});
+ const plugins = getPlugins(
+ { cwd, options: {}, logger: t.context.logger },
+ {}
+ );
// Verify the module returns a function for each plugin
t.is(typeof plugins.verifyConditions, 'function');
@@ -35,9 +42,12 @@ test('Export plugins based on steps config', (t) => {
cwd,
logger: t.context.logger,
options: {
- verifyConditions: ['./test/fixtures/plugin-noop', {path: './test/fixtures/plugin-noop'}],
+ verifyConditions: [
+ './test/fixtures/plugin-noop',
+ { path: './test/fixtures/plugin-noop' },
+ ],
generateNotes: './test/fixtures/plugin-noop',
- analyzeCommits: {path: './test/fixtures/plugin-noop'},
+ analyzeCommits: { path: './test/fixtures/plugin-noop' },
verifyRelease: () => {},
},
},
@@ -56,21 +66,25 @@ test('Export plugins based on steps config', (t) => {
});
test('Export plugins based on "plugins" config (array)', async (t) => {
- const plugin1 = {verifyConditions: stub(), publish: stub()};
- const plugin2 = {verifyConditions: stub(), verifyRelease: stub()};
+ const plugin1 = { verifyConditions: stub(), publish: stub() };
+ const plugin2 = { verifyConditions: stub(), verifyRelease: stub() };
const plugins = getPlugins(
- {cwd, logger: t.context.logger, options: {plugins: [plugin1, [plugin2, {}]], verifyRelease: () => {}}},
+ {
+ cwd,
+ logger: t.context.logger,
+ options: { plugins: [plugin1, [plugin2, {}]], verifyRelease: () => {} },
+ },
{}
);
- await plugins.verifyConditions({options: {}});
+ await plugins.verifyConditions({ options: {} });
t.true(plugin1.verifyConditions.calledOnce);
t.true(plugin2.verifyConditions.calledOnce);
- await plugins.publish({options: {}});
+ await plugins.publish({ options: {} });
t.true(plugin1.publish.calledOnce);
- await plugins.verifyRelease({options: {}});
+ await plugins.verifyRelease({ options: {} });
t.true(plugin2.verifyRelease.notCalled);
// Verify the module returns a function for each plugin
@@ -85,13 +99,16 @@ test('Export plugins based on "plugins" config (array)', async (t) => {
});
test('Export plugins based on "plugins" config (single definition)', async (t) => {
- const plugin1 = {verifyConditions: stub(), publish: stub()};
- const plugins = getPlugins({cwd, logger: t.context.logger, options: {plugins: plugin1}}, {});
+ const plugin1 = { verifyConditions: stub(), publish: stub() };
+ const plugins = getPlugins(
+ { cwd, logger: t.context.logger, options: { plugins: plugin1 } },
+ {}
+ );
- await plugins.verifyConditions({options: {}});
+ await plugins.verifyConditions({ options: {} });
t.true(plugin1.verifyConditions.calledOnce);
- await plugins.publish({options: {}});
+ await plugins.publish({ options: {} });
t.true(plugin1.publish.calledOnce);
// Verify the module returns a function for each plugin
@@ -106,32 +123,54 @@ test('Export plugins based on "plugins" config (single definition)', async (t) =
});
test('Merge global options, "plugins" options and step options', async (t) => {
- const plugin1 = [{verifyConditions: stub(), publish: stub()}, {pluginOpt1: 'plugin1'}];
- const plugin2 = [{verifyConditions: stub()}, {pluginOpt2: 'plugin2'}];
- const plugin3 = [stub(), {pluginOpt3: 'plugin3'}];
+ const plugin1 = [
+ { verifyConditions: stub(), publish: stub() },
+ { pluginOpt1: 'plugin1' },
+ ];
+ const plugin2 = [{ verifyConditions: stub() }, { pluginOpt2: 'plugin2' }];
+ const plugin3 = [stub(), { pluginOpt3: 'plugin3' }];
const plugins = getPlugins(
{
cwd,
logger: t.context.logger,
- options: {globalOpt: 'global', plugins: [plugin1, plugin2], verifyRelease: [plugin3]},
+ options: {
+ globalOpt: 'global',
+ plugins: [plugin1, plugin2],
+ verifyRelease: [plugin3],
+ },
},
{}
);
- await plugins.verifyConditions({options: {}});
- t.deepEqual(plugin1[0].verifyConditions.args[0][0], {globalOpt: 'global', pluginOpt1: 'plugin1'});
- t.deepEqual(plugin2[0].verifyConditions.args[0][0], {globalOpt: 'global', pluginOpt2: 'plugin2'});
-
- await plugins.publish({options: {}});
- t.deepEqual(plugin1[0].publish.args[0][0], {globalOpt: 'global', pluginOpt1: 'plugin1'});
-
- await plugins.verifyRelease({options: {}});
- t.deepEqual(plugin3[0].args[0][0], {globalOpt: 'global', pluginOpt3: 'plugin3'});
+ await plugins.verifyConditions({ options: {} });
+ t.deepEqual(plugin1[0].verifyConditions.args[0][0], {
+ globalOpt: 'global',
+ pluginOpt1: 'plugin1',
+ });
+ t.deepEqual(plugin2[0].verifyConditions.args[0][0], {
+ globalOpt: 'global',
+ pluginOpt2: 'plugin2',
+ });
+
+ await plugins.publish({ options: {} });
+ t.deepEqual(plugin1[0].publish.args[0][0], {
+ globalOpt: 'global',
+ pluginOpt1: 'plugin1',
+ });
+
+ await plugins.verifyRelease({ options: {} });
+ t.deepEqual(plugin3[0].args[0][0], {
+ globalOpt: 'global',
+ pluginOpt3: 'plugin3',
+ });
});
test('Unknown steps of plugins configured in "plugins" are ignored', (t) => {
- const plugin1 = {verifyConditions: () => {}, unknown: () => {}};
- const plugins = getPlugins({cwd, logger: t.context.logger, options: {plugins: [plugin1]}}, {});
+ const plugin1 = { verifyConditions: () => {}, unknown: () => {} };
+ const plugins = getPlugins(
+ { cwd, logger: t.context.logger, options: { plugins: [plugin1] } },
+ {}
+ );
t.is(typeof plugins.verifyConditions, 'function');
t.is(plugins.unknown, undefined);
@@ -141,22 +180,28 @@ test('Export plugins loaded from the dependency of a shareable config module', a
const cwd = tempy.directory();
await copy(
'./test/fixtures/plugin-noop.js',
- path.resolve(cwd, 'node_modules/shareable-config/node_modules/custom-plugin/index.js')
+ path.resolve(
+ cwd,
+ 'node_modules/shareable-config/node_modules/custom-plugin/index.js'
+ )
+ );
+ await outputFile(
+ path.resolve(cwd, 'node_modules/shareable-config/index.js'),
+ ''
);
- await outputFile(path.resolve(cwd, 'node_modules/shareable-config/index.js'), '');
const plugins = getPlugins(
{
cwd,
logger: t.context.logger,
options: {
- verifyConditions: ['custom-plugin', {path: 'custom-plugin'}],
+ verifyConditions: ['custom-plugin', { path: 'custom-plugin' }],
generateNotes: 'custom-plugin',
- analyzeCommits: {path: 'custom-plugin'},
+ analyzeCommits: { path: 'custom-plugin' },
verifyRelease: () => {},
},
},
- {'custom-plugin': 'shareable-config'}
+ { 'custom-plugin': 'shareable-config' }
);
// Verify the module returns a function for each plugin
@@ -172,7 +217,10 @@ test('Export plugins loaded from the dependency of a shareable config module', a
test('Export plugins loaded from the dependency of a shareable config file', async (t) => {
const cwd = tempy.directory();
- await copy('./test/fixtures/plugin-noop.js', path.resolve(cwd, 'plugin/plugin-noop.js'));
+ await copy(
+ './test/fixtures/plugin-noop.js',
+ path.resolve(cwd, 'plugin/plugin-noop.js')
+ );
await outputFile(path.resolve(cwd, 'shareable-config.js'), '');
const plugins = getPlugins(
@@ -180,13 +228,16 @@ test('Export plugins loaded from the dependency of a shareable config file', asy
cwd,
logger: t.context.logger,
options: {
- verifyConditions: ['./plugin/plugin-noop', {path: './plugin/plugin-noop'}],
+ verifyConditions: [
+ './plugin/plugin-noop',
+ { path: './plugin/plugin-noop' },
+ ],
generateNotes: './plugin/plugin-noop',
- analyzeCommits: {path: './plugin/plugin-noop'},
+ analyzeCommits: { path: './plugin/plugin-noop' },
verifyRelease: () => {},
},
},
- {'./plugin/plugin-noop': './shareable-config.js'}
+ { './plugin/plugin-noop': './shareable-config.js' }
);
// Verify the module returns a function for each plugin
@@ -212,7 +263,10 @@ test('Use default when only options are passed for a single plugin', (t) => {
cwd,
logger: t.context.logger,
options: {
- plugins: ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator'],
+ plugins: [
+ '@semantic-release/commit-analyzer',
+ '@semantic-release/release-notes-generator',
+ ],
analyzeCommits,
generateNotes,
publish,
@@ -242,15 +296,23 @@ test('Merge global options with plugin options', async (t) => {
options: {
globalOpt: 'global',
otherOpt: 'globally-defined',
- verifyRelease: {path: './test/fixtures/plugin-result-config', localOpt: 'local', otherOpt: 'locally-defined'},
+ verifyRelease: {
+ path: './test/fixtures/plugin-result-config',
+ localOpt: 'local',
+ otherOpt: 'locally-defined',
+ },
},
},
{}
);
- const [result] = await plugins.verifyRelease({options: {}});
+ const [result] = await plugins.verifyRelease({ options: {} });
- t.deepEqual(result.pluginConfig, {localOpt: 'local', globalOpt: 'global', otherOpt: 'locally-defined'});
+ t.deepEqual(result.pluginConfig, {
+ localOpt: 'local',
+ globalOpt: 'global',
+ otherOpt: 'locally-defined',
+ });
});
test('Throw an error for each invalid plugin configuration', (t) => {
@@ -261,11 +323,14 @@ test('Throw an error for each invalid plugin configuration', (t) => {
cwd,
logger: t.context.logger,
options: {
- plugins: ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator'],
+ plugins: [
+ '@semantic-release/commit-analyzer',
+ '@semantic-release/release-notes-generator',
+ ],
verifyConditions: 1,
analyzeCommits: [],
verifyRelease: [{}],
- generateNotes: [{path: null}],
+ generateNotes: [{ path: null }],
},
},
{}
@@ -290,7 +355,13 @@ test('Throw EPLUGINSCONF error if the "plugins" option contains an old plugin de
{
cwd,
logger: t.context.logger,
- options: {plugins: ['./test/fixtures/multi-plugin', './test/fixtures/plugin-noop', () => {}]},
+ options: {
+ plugins: [
+ './test/fixtures/multi-plugin',
+ './test/fixtures/plugin-noop',
+ () => {},
+ ],
+ },
},
{}
)
@@ -306,7 +377,14 @@ test('Throw EPLUGINSCONF error if the "plugins" option contains an old plugin de
test('Throw EPLUGINSCONF error for each invalid definition if the "plugins" option', (t) => {
const errors = [
...t.throws(() =>
- getPlugins({cwd, logger: t.context.logger, options: {plugins: [1, {path: 1}, [() => {}, {}, {}]]}}, {})
+ getPlugins(
+ {
+ cwd,
+ logger: t.context.logger,
+ options: { plugins: [1, { path: 1 }, [() => {}, {}, {}]] },
+ },
+ {}
+ )
),
];
diff --git a/test/plugins/utils.test.js b/test/plugins/utils.test.js
index 99fa42d93b..b945164c8b 100644
--- a/test/plugins/utils.test.js
+++ b/test/plugins/utils.test.js
@@ -1,32 +1,46 @@
const test = require('ava');
-const {validatePlugin, validateStep, loadPlugin, parseConfig} = require('../../lib/plugins/utils');
+const {
+ validatePlugin,
+ validateStep,
+ loadPlugin,
+ parseConfig,
+} = require('../../lib/plugins/utils');
test('validatePlugin', (t) => {
const path = 'plugin-module';
- const options = {option1: 'value1', option2: 'value2'};
+ const options = { option1: 'value1', option2: 'value2' };
t.true(validatePlugin(path), 'String definition');
- t.true(validatePlugin({publish: () => {}}), 'Object definition');
+ t.true(validatePlugin({ publish: () => {} }), 'Object definition');
t.true(validatePlugin([path]), 'Array definition');
t.true(validatePlugin([path, options]), 'Array definition with options');
- t.true(validatePlugin([{publish: () => {}}, options]), 'Array definition with options and path as object');
- t.true(validatePlugin({path}), 'Object with path definition');
- t.true(validatePlugin({path, ...options}), 'Object with path definition with options');
t.true(
- validatePlugin({path: {publish: () => {}}, ...options}),
+ validatePlugin([{ publish: () => {} }, options]),
+ 'Array definition with options and path as object'
+ );
+ t.true(validatePlugin({ path }), 'Object with path definition');
+ t.true(
+ validatePlugin({ path, ...options }),
+ 'Object with path definition with options'
+ );
+ t.true(
+ validatePlugin({ path: { publish: () => {} }, ...options }),
'Object with path definition with options and path as object'
);
t.false(validatePlugin(1), 'String definition, wrong path');
t.false(validatePlugin([]), 'Array definition, missing path');
- t.false(validatePlugin([path, options, {}]), 'Array definition, additional parameter');
+ t.false(
+ validatePlugin([path, options, {}]),
+ 'Array definition, additional parameter'
+ );
t.false(validatePlugin([1]), 'Array definition, wrong path');
t.false(validatePlugin([path, 1]), 'Array definition, wrong options');
- t.false(validatePlugin({path: 1}), 'Object definition, wrong path');
+ t.false(validatePlugin({ path: 1 }), 'Object definition, wrong path');
});
test('validateStep: optional plugin configuration', (t) => {
- const type = {multiple: true, required: false};
+ const type = { multiple: true, required: false };
// Empty config
t.true(validateStep(type));
@@ -42,19 +56,19 @@ test('validateStep: optional plugin configuration', (t) => {
// Array type definition
t.true(validateStep(type, [['plugin-path.js']]));
- t.true(validateStep(type, [['plugin-path.js', {options: 'value'}]]));
- t.true(validateStep(type, [[() => {}, {options: 'value'}]]));
+ t.true(validateStep(type, [['plugin-path.js', { options: 'value' }]]));
+ t.true(validateStep(type, [[() => {}, { options: 'value' }]]));
t.false(validateStep(type, [['plugin-path.js', 1]]));
// Object type definition
- t.true(validateStep(type, {path: 'plugin-path.js'}));
- t.true(validateStep(type, {path: 'plugin-path.js', options: 'value'}));
- t.true(validateStep(type, {path: () => {}, options: 'value'}));
- t.false(validateStep(type, {path: null}));
+ t.true(validateStep(type, { path: 'plugin-path.js' }));
+ t.true(validateStep(type, { path: 'plugin-path.js', options: 'value' }));
+ t.true(validateStep(type, { path: () => {}, options: 'value' }));
+ t.false(validateStep(type, { path: null }));
// Considered as an Array of 2 definitions and not as one Array definition in case of a muliple plugin type
- t.false(validateStep(type, [() => {}, {options: 'value'}]));
- t.false(validateStep(type, ['plugin-path.js', {options: 'value'}]));
+ t.false(validateStep(type, [() => {}, { options: 'value' }]));
+ t.false(validateStep(type, ['plugin-path.js', { options: 'value' }]));
// Multiple definitions
t.true(
@@ -62,11 +76,11 @@ test('validateStep: optional plugin configuration', (t) => {
'plugin-path.js',
() => {},
['plugin-path.js'],
- ['plugin-path.js', {options: 'value'}],
- [() => {}, {options: 'value'}],
- {path: 'plugin-path.js'},
- {path: 'plugin-path.js', options: 'value'},
- {path: () => {}, options: 'value'},
+ ['plugin-path.js', { options: 'value' }],
+ [() => {}, { options: 'value' }],
+ { path: 'plugin-path.js' },
+ { path: 'plugin-path.js', options: 'value' },
+ { path: () => {}, options: 'value' },
])
);
t.false(
@@ -75,10 +89,10 @@ test('validateStep: optional plugin configuration', (t) => {
() => {},
['plugin-path.js'],
['plugin-path.js', 1],
- [() => {}, {options: 'value'}],
- {path: 'plugin-path.js'},
- {path: 'plugin-path.js', options: 'value'},
- {path: () => {}, options: 'value'},
+ [() => {}, { options: 'value' }],
+ { path: 'plugin-path.js' },
+ { path: 'plugin-path.js', options: 'value' },
+ { path: () => {}, options: 'value' },
])
);
t.false(
@@ -86,11 +100,11 @@ test('validateStep: optional plugin configuration', (t) => {
'plugin-path.js',
{},
['plugin-path.js'],
- ['plugin-path.js', {options: 'value'}],
- [() => {}, {options: 'value'}],
- {path: 'plugin-path.js'},
- {path: 'plugin-path.js', options: 'value'},
- {path: () => {}, options: 'value'},
+ ['plugin-path.js', { options: 'value' }],
+ [() => {}, { options: 'value' }],
+ { path: 'plugin-path.js' },
+ { path: 'plugin-path.js', options: 'value' },
+ { path: () => {}, options: 'value' },
])
);
t.false(
@@ -98,17 +112,17 @@ test('validateStep: optional plugin configuration', (t) => {
'plugin-path.js',
() => {},
['plugin-path.js'],
- ['plugin-path.js', {options: 'value'}],
- [() => {}, {options: 'value'}],
- {path: null},
- {path: 'plugin-path.js', options: 'value'},
- {path: () => {}, options: 'value'},
+ ['plugin-path.js', { options: 'value' }],
+ [() => {}, { options: 'value' }],
+ { path: null },
+ { path: 'plugin-path.js', options: 'value' },
+ { path: () => {}, options: 'value' },
])
);
});
test('validateStep: required plugin configuration', (t) => {
- const type = {required: true};
+ const type = { required: true };
// Empty config
t.false(validateStep(type));
@@ -124,19 +138,19 @@ test('validateStep: required plugin configuration', (t) => {
// Array type definition
t.true(validateStep(type, [['plugin-path.js']]));
- t.true(validateStep(type, [['plugin-path.js', {options: 'value'}]]));
- t.true(validateStep(type, [[() => {}, {options: 'value'}]]));
+ t.true(validateStep(type, [['plugin-path.js', { options: 'value' }]]));
+ t.true(validateStep(type, [[() => {}, { options: 'value' }]]));
t.false(validateStep(type, [['plugin-path.js', 1]]));
// Object type definition
- t.true(validateStep(type, {path: 'plugin-path.js'}));
- t.true(validateStep(type, {path: 'plugin-path.js', options: 'value'}));
- t.true(validateStep(type, {path: () => {}, options: 'value'}));
- t.false(validateStep(type, {path: null}));
+ t.true(validateStep(type, { path: 'plugin-path.js' }));
+ t.true(validateStep(type, { path: 'plugin-path.js', options: 'value' }));
+ t.true(validateStep(type, { path: () => {}, options: 'value' }));
+ t.false(validateStep(type, { path: null }));
// Considered as an Array of 2 definitions and not as one Array definition in the case of a muliple plugin type
- t.false(validateStep(type, [() => {}, {options: 'value'}]));
- t.false(validateStep(type, ['plugin-path.js', {options: 'value'}]));
+ t.false(validateStep(type, [() => {}, { options: 'value' }]));
+ t.false(validateStep(type, ['plugin-path.js', { options: 'value' }]));
// Multiple definitions
t.true(
@@ -144,11 +158,11 @@ test('validateStep: required plugin configuration', (t) => {
'plugin-path.js',
() => {},
['plugin-path.js'],
- ['plugin-path.js', {options: 'value'}],
- [() => {}, {options: 'value'}],
- {path: 'plugin-path.js'},
- {path: 'plugin-path.js', options: 'value'},
- {path: () => {}, options: 'value'},
+ ['plugin-path.js', { options: 'value' }],
+ [() => {}, { options: 'value' }],
+ { path: 'plugin-path.js' },
+ { path: 'plugin-path.js', options: 'value' },
+ { path: () => {}, options: 'value' },
])
);
t.false(
@@ -157,10 +171,10 @@ test('validateStep: required plugin configuration', (t) => {
() => {},
['plugin-path.js'],
['plugin-path.js', 1],
- [() => {}, {options: 'value'}],
- {path: 'plugin-path.js'},
- {path: 'plugin-path.js', options: 'value'},
- {path: () => {}, options: 'value'},
+ [() => {}, { options: 'value' }],
+ { path: 'plugin-path.js' },
+ { path: 'plugin-path.js', options: 'value' },
+ { path: () => {}, options: 'value' },
])
);
t.false(
@@ -168,11 +182,11 @@ test('validateStep: required plugin configuration', (t) => {
'plugin-path.js',
{},
['plugin-path.js'],
- ['plugin-path.js', {options: 'value'}],
- [() => {}, {options: 'value'}],
- {path: 'plugin-path.js'},
- {path: 'plugin-path.js', options: 'value'},
- {path: () => {}, options: 'value'},
+ ['plugin-path.js', { options: 'value' }],
+ [() => {}, { options: 'value' }],
+ { path: 'plugin-path.js' },
+ { path: 'plugin-path.js', options: 'value' },
+ { path: () => {}, options: 'value' },
])
);
t.false(
@@ -180,11 +194,11 @@ test('validateStep: required plugin configuration', (t) => {
'plugin-path.js',
() => {},
['plugin-path.js'],
- ['plugin-path.js', {options: 'value'}],
- [() => {}, {options: 'value'}],
- {path: null},
- {path: 'plugin-path.js', options: 'value'},
- {path: () => {}, options: 'value'},
+ ['plugin-path.js', { options: 'value' }],
+ [() => {}, { options: 'value' }],
+ { path: null },
+ { path: 'plugin-path.js', options: 'value' },
+ { path: () => {}, options: 'value' },
])
);
});
@@ -193,22 +207,36 @@ test('loadPlugin', (t) => {
const cwd = process.cwd();
const func = () => {};
- t.is(require('../fixtures/plugin-noop'), loadPlugin({cwd: './test/fixtures'}, './plugin-noop', {}), 'From cwd');
t.is(
require('../fixtures/plugin-noop'),
- loadPlugin({cwd}, './plugin-noop', {'./plugin-noop': './test/fixtures'}),
+ loadPlugin({ cwd: './test/fixtures' }, './plugin-noop', {}),
+ 'From cwd'
+ );
+ t.is(
+ require('../fixtures/plugin-noop'),
+ loadPlugin({ cwd }, './plugin-noop', {
+ './plugin-noop': './test/fixtures',
+ }),
'From a shareable config context'
);
- t.is(func, loadPlugin({cwd}, func, {}), 'Defined as a function');
+ t.is(func, loadPlugin({ cwd }, func, {}), 'Defined as a function');
});
test('parseConfig', (t) => {
const path = 'plugin-module';
- const options = {option1: 'value1', option2: 'value2'};
+ const options = { option1: 'value1', option2: 'value2' };
t.deepEqual(parseConfig(path), [path, {}], 'String definition');
- t.deepEqual(parseConfig({path}), [path, {}], 'Object definition');
- t.deepEqual(parseConfig({path, ...options}), [path, options], 'Object definition with options');
+ t.deepEqual(parseConfig({ path }), [path, {}], 'Object definition');
+ t.deepEqual(
+ parseConfig({ path, ...options }),
+ [path, options],
+ 'Object definition with options'
+ );
t.deepEqual(parseConfig([path]), [path, {}], 'Array definition');
- t.deepEqual(parseConfig([path, options]), [path, options], 'Array definition with options');
+ t.deepEqual(
+ parseConfig([path, options]),
+ [path, options],
+ 'Array definition with options'
+ );
});
diff --git a/test/utils.test.js b/test/utils.test.js
index 7ff6d2429c..ba1f24afed 100644
--- a/test/utils.test.js
+++ b/test/utils.test.js
@@ -25,11 +25,14 @@ test('extractErrors', (t) => {
});
test('tagsToVersions', (t) => {
- t.deepEqual(tagsToVersions([{version: '1.0.0'}, {version: '1.1.0'}, {version: '1.2.0'}]), [
- '1.0.0',
- '1.1.0',
- '1.2.0',
- ]);
+ t.deepEqual(
+ tagsToVersions([
+ { version: '1.0.0' },
+ { version: '1.1.0' },
+ { version: '1.2.0' },
+ ]),
+ ['1.0.0', '1.1.0', '1.2.0']
+ );
});
test('isMajorRange', (t) => {
@@ -115,42 +118,81 @@ test('lowest', (t) => {
});
test.serial('getLatestVersion', (t) => {
- t.is(getLatestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.1', '1.0.0-alpha.1']), '1.2.0');
+ t.is(
+ getLatestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.1', '1.0.0-alpha.1']),
+ '1.2.0'
+ );
t.is(getLatestVersion(['1.2.3-alpha.3', '1.2.3-alpha.2']), undefined);
- t.is(getLatestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.1', '1.0.0-alpha.1']), '1.2.0');
+ t.is(
+ getLatestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.1', '1.0.0-alpha.1']),
+ '1.2.0'
+ );
t.is(getLatestVersion(['1.2.3-alpha.3', '1.2.3-alpha.2']), undefined);
- t.is(getLatestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.1', '1.0.0-alpha.1'], {withPrerelease: true}), '1.2.3-alpha.3');
- t.is(getLatestVersion(['1.2.3-alpha.3', '1.2.3-alpha.2'], {withPrerelease: true}), '1.2.3-alpha.3');
+ t.is(
+ getLatestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.1', '1.0.0-alpha.1'], {
+ withPrerelease: true,
+ }),
+ '1.2.3-alpha.3'
+ );
+ t.is(
+ getLatestVersion(['1.2.3-alpha.3', '1.2.3-alpha.2'], {
+ withPrerelease: true,
+ }),
+ '1.2.3-alpha.3'
+ );
t.is(getLatestVersion([]), undefined);
});
test.serial('getEarliestVersion', (t) => {
- t.is(getEarliestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.0', '1.0.1-alpha.1']), '1.0.0');
+ t.is(
+ getEarliestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.0', '1.0.1-alpha.1']),
+ '1.0.0'
+ );
t.is(getEarliestVersion(['1.2.3-alpha.3', '1.2.3-alpha.2']), undefined);
- t.is(getEarliestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.0', '1.0.1-alpha.1']), '1.0.0');
+ t.is(
+ getEarliestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.0', '1.0.1-alpha.1']),
+ '1.0.0'
+ );
t.is(getEarliestVersion(['1.2.3-alpha.3', '1.2.3-alpha.2']), undefined);
t.is(
- getEarliestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.1', '1.0.0-alpha.1'], {withPrerelease: true}),
+ getEarliestVersion(['1.2.3-alpha.3', '1.2.0', '1.0.1', '1.0.0-alpha.1'], {
+ withPrerelease: true,
+ }),
'1.0.0-alpha.1'
);
- t.is(getEarliestVersion(['1.2.3-alpha.3', '1.2.3-alpha.2'], {withPrerelease: true}), '1.2.3-alpha.2');
+ t.is(
+ getEarliestVersion(['1.2.3-alpha.3', '1.2.3-alpha.2'], {
+ withPrerelease: true,
+ }),
+ '1.2.3-alpha.2'
+ );
t.is(getEarliestVersion([]), undefined);
});
test('getFirstVersion', (t) => {
- t.is(getFirstVersion(['1.2.0', '1.0.0', '1.3.0', '1.1.0', '1.4.0'], []), '1.0.0');
+ t.is(
+ getFirstVersion(['1.2.0', '1.0.0', '1.3.0', '1.1.0', '1.4.0'], []),
+ '1.0.0'
+ );
t.is(
getFirstVersion(
['1.2.0', '1.0.0', '1.3.0', '1.1.0', '1.4.0'],
[
- {name: 'master', tags: [{version: '1.0.0'}, {version: '1.1.0'}]},
- {name: 'next', tags: [{version: '1.0.0'}, {version: '1.1.0'}, {version: '1.2.0'}]},
+ { name: 'master', tags: [{ version: '1.0.0' }, { version: '1.1.0' }] },
+ {
+ name: 'next',
+ tags: [
+ { version: '1.0.0' },
+ { version: '1.1.0' },
+ { version: '1.2.0' },
+ ],
+ },
]
),
'1.3.0'
@@ -159,8 +201,15 @@ test('getFirstVersion', (t) => {
getFirstVersion(
['1.2.0', '1.0.0', '1.1.0'],
[
- {name: 'master', tags: [{version: '1.0.0'}, {version: '1.1.0'}]},
- {name: 'next', tags: [{version: '1.0.0'}, {version: '1.1.0'}, {version: '1.2.0'}]},
+ { name: 'master', tags: [{ version: '1.0.0' }, { version: '1.1.0' }] },
+ {
+ name: 'next',
+ tags: [
+ { version: '1.0.0' },
+ { version: '1.1.0' },
+ { version: '1.2.0' },
+ ],
+ },
]
),
undefined
diff --git a/test/verify.test.js b/test/verify.test.js
index c200025676..64000a79a7 100644
--- a/test/verify.test.js
+++ b/test/verify.test.js
@@ -1,13 +1,13 @@
const test = require('ava');
const tempy = require('tempy');
const verify = require('../lib/verify');
-const {gitRepo} = require('./helpers/git-utils');
+const { gitRepo } = require('./helpers/git-utils');
test('Throw a AggregateError', async (t) => {
- const {cwd} = await gitRepo();
- const options = {branches: [{name: 'master'}, {name: ''}]};
+ const { cwd } = await gitRepo();
+ const options = { branches: [{ name: 'master' }, { name: '' }] };
- const errors = [...(await t.throwsAsync(verify({cwd, options})))];
+ const errors = [...(await t.throwsAsync(verify({ cwd, options })))];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'ENOREPOURL');
@@ -29,9 +29,9 @@ test('Throw a AggregateError', async (t) => {
test('Throw a SemanticReleaseError if does not run on a git repository', async (t) => {
const cwd = tempy.directory();
- const options = {branches: []};
+ const options = { branches: [] };
- const errors = [...(await t.throwsAsync(verify({cwd, options})))];
+ const errors = [...(await t.throwsAsync(verify({ cwd, options })))];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'ENOGITREPO');
@@ -40,10 +40,10 @@ test('Throw a SemanticReleaseError if does not run on a git repository', async (
});
test('Throw a SemanticReleaseError if the "tagFormat" is not valid', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- const options = {repositoryUrl, tagFormat: `?\${version}`, branches: []};
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ const options = { repositoryUrl, tagFormat: `?\${version}`, branches: [] };
- const errors = [...(await t.throwsAsync(verify({cwd, options})))];
+ const errors = [...(await t.throwsAsync(verify({ cwd, options })))];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'EINVALIDTAGFORMAT');
@@ -52,10 +52,10 @@ test('Throw a SemanticReleaseError if the "tagFormat" is not valid', async (t) =
});
test('Throw a SemanticReleaseError if the "tagFormat" does not contains the "version" variable', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- const options = {repositoryUrl, tagFormat: 'test', branches: []};
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ const options = { repositoryUrl, tagFormat: 'test', branches: [] };
- const errors = [...(await t.throwsAsync(verify({cwd, options})))];
+ const errors = [...(await t.throwsAsync(verify({ cwd, options })))];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'ETAGNOVERSION');
@@ -64,10 +64,14 @@ test('Throw a SemanticReleaseError if the "tagFormat" does not contains the "ver
});
test('Throw a SemanticReleaseError if the "tagFormat" contains multiple "version" variables', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- const options = {repositoryUrl, tagFormat: `\${version}v\${version}`, branches: []};
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ const options = {
+ repositoryUrl,
+ tagFormat: `\${version}v\${version}`,
+ branches: [],
+ };
- const errors = [...(await t.throwsAsync(verify({cwd, options})))];
+ const errors = [...(await t.throwsAsync(verify({ cwd, options })))];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'ETAGNOVERSION');
@@ -76,14 +80,22 @@ test('Throw a SemanticReleaseError if the "tagFormat" contains multiple "version
});
test('Throw a SemanticReleaseError for each invalid branch', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
+ const { cwd, repositoryUrl } = await gitRepo(true);
const options = {
repositoryUrl,
tagFormat: `v\${version}`,
- branches: [{name: ''}, {name: ' '}, {name: 1}, {}, {name: ''}, 1, 'master'],
+ branches: [
+ { name: '' },
+ { name: ' ' },
+ { name: 1 },
+ {},
+ { name: '' },
+ 1,
+ 'master',
+ ],
};
- const errors = [...(await t.throwsAsync(verify({cwd, options})))];
+ const errors = [...(await t.throwsAsync(verify({ cwd, options })))];
t.is(errors[0].name, 'SemanticReleaseError');
t.is(errors[0].code, 'EINVALIDBRANCH');
@@ -110,8 +122,12 @@ test('Throw a SemanticReleaseError for each invalid branch', async (t) => {
});
test('Return "true" if all verification pass', async (t) => {
- const {cwd, repositoryUrl} = await gitRepo(true);
- const options = {repositoryUrl, tagFormat: `v\${version}`, branches: [{name: 'master'}]};
+ const { cwd, repositoryUrl } = await gitRepo(true);
+ const options = {
+ repositoryUrl,
+ tagFormat: `v\${version}`,
+ branches: [{ name: 'master' }],
+ };
- await t.notThrowsAsync(verify({cwd, options}));
+ await t.notThrowsAsync(verify({ cwd, options }));
});