replace jest with ava
This commit is contained in:
parent
27cc8b23fe
commit
0347b72305
11775 changed files with 84546 additions and 1440575 deletions
19
node_modules/ci-parallel-vars/LICENSE
generated
vendored
Normal file
19
node_modules/ci-parallel-vars/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) 2017-present Jamie Kyle <me@thejameskyle.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
36
node_modules/ci-parallel-vars/README.md
generated
vendored
Normal file
36
node_modules/ci-parallel-vars/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# ci-parallel-vars
|
||||
|
||||
> Get CI environment variables for parallelizing builds
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
yarn add ci-parallel-vars
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const ciParallelVars = require('ci-parallel-vars');
|
||||
|
||||
console.log(ciParallelVars); // { index: 3, total: 10 } || null
|
||||
```
|
||||
|
||||
## Supports
|
||||
|
||||
> If you want to add support for another pair, please open a pull request and
|
||||
> add them to `index.js` and to this list.
|
||||
|
||||
- [Knapsack] / [TravisCI]: `CI_NODE_INDEX`/`CI_NODE_TOTAL`
|
||||
- [CircleCI]: `CIRCLE_NODE_INDEX`/`CIRCLE_NODE_TOTAL`
|
||||
- [Bitbucket Pipelines]: `BITBUCKET_PARALLEL_STEP`/`BITBUCKET_PARALLEL_STEP_COUNT`',
|
||||
- [Buildkite]: `BUILDKITE_PARALLEL_JOB`/`BUILDKITE_PARALLEL_JOB_COUNT`
|
||||
|
||||
One of these pairs must both be defined as numbers or `ci-parallel-vars` will
|
||||
be `null`.
|
||||
|
||||
[Knapsack]: http://docs.knapsackpro.com/ruby/knapsack#info-about-env-variables
|
||||
[TravisCI]: https://docs.travis-ci.com/user/speeding-up-the-build/#Parallelizing-RSpec%2C-Cucumber-and-Minitest-on-multiple-VMs
|
||||
[CircleCI]: https://circleci.com/docs/1.0/parallel-manual-setup/#using-environment-variables
|
||||
[Bitbucket Pipelines]: https://confluence.atlassian.com/bitbucket/parallel-steps-946606807.html
|
||||
[Buildkite]: https://buildkite.com/docs/builds/parallel-builds
|
||||
48
node_modules/ci-parallel-vars/index.js
generated
vendored
Normal file
48
node_modules/ci-parallel-vars/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
// @flow
|
||||
'use strict';
|
||||
|
||||
/*::
|
||||
type Match = null | { index: number, total: number };
|
||||
*/
|
||||
|
||||
const envs = [
|
||||
// Knapsack / TravisCI
|
||||
{
|
||||
index: 'CI_NODE_INDEX',
|
||||
total: 'CI_NODE_TOTAL',
|
||||
},
|
||||
// CircleCI
|
||||
{
|
||||
index: 'CIRCLE_NODE_INDEX',
|
||||
total: 'CIRCLE_NODE_TOTAL',
|
||||
},
|
||||
// Bitbucket Pipelines
|
||||
{
|
||||
index: 'BITBUCKET_PARALLEL_STEP',
|
||||
total: 'BITBUCKET_PARALLEL_STEP_COUNT',
|
||||
},
|
||||
// Buildkite
|
||||
{
|
||||
index: 'BUILDKITE_PARALLEL_JOB',
|
||||
total: 'BUILDKITE_PARALLEL_JOB_COUNT',
|
||||
},
|
||||
];
|
||||
|
||||
let maybeNum = val => {
|
||||
let num = parseInt(val, 10);
|
||||
return Number.isNaN(num) ? null : num;
|
||||
};
|
||||
|
||||
let match /*: Match */ = null;
|
||||
|
||||
for (let env of envs) {
|
||||
let index = maybeNum(process.env[env.index]);
|
||||
let total = maybeNum(process.env[env.total]);
|
||||
|
||||
if (index !== null && total !== null) {
|
||||
match = { index, total };
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = match;
|
||||
36
node_modules/ci-parallel-vars/package.json
generated
vendored
Normal file
36
node_modules/ci-parallel-vars/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "ci-parallel-vars",
|
||||
"version": "1.0.0",
|
||||
"description": "Get CI environment variables for parallelizing builds",
|
||||
"main": "index.js",
|
||||
"repository": "https://github.com/jamiebuilds/ci-parallel-vars",
|
||||
"author": "Jamie Kyle <me@thejameskyle.com>",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"ci",
|
||||
"env",
|
||||
"vars",
|
||||
"index",
|
||||
"total",
|
||||
"parallel",
|
||||
"builds",
|
||||
"tests",
|
||||
"travis",
|
||||
"circle",
|
||||
"buildkite",
|
||||
"bitbucket",
|
||||
"pipelines",
|
||||
"knapsack"
|
||||
],
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "ava"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^0.25.0",
|
||||
"flow-bin": "^0.73.0",
|
||||
"spawndamnit": "^2.0.0"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue