Changing front

This commit is contained in:
2023-01-16 17:44:37 +01:00
parent 0b8a93b256
commit 4fe4be7730
48586 changed files with 4725790 additions and 17464 deletions

539
front/app/node_modules/karma-coverage/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,539 @@
# [2.2.0](https://github.com/karma-runner/karma-coverage/compare/v2.1.1...v2.2.0) (2022-02-10)
### Features
* update Istanbul packages ([24aac11](https://github.com/karma-runner/karma-coverage/commit/24aac11aacef75aab720f69aabaa9651cc770630))
## [2.1.1](https://github.com/karma-runner/karma-coverage/compare/v2.1.0...v2.1.1) (2022-02-05)
### Bug Fixes
* handle unexpected error when generating code coverage ([bca2c69](https://github.com/karma-runner/karma-coverage/commit/bca2c69d43332598acb30d8e5d6e26d783bc06fb)), closes [/github.com/karma-runner/karma/blob/c985155a4eac95c525e1217e98d4013ac5f53305/lib/server.js#L392](https://github.com//github.com/karma-runner/karma/blob/c985155a4eac95c525e1217e98d4013ac5f53305/lib/server.js/issues/L392)
* race condition between the Karma shutdown and coverage writing ([44b31eb](https://github.com/karma-runner/karma-coverage/commit/44b31eba5a221e6e049b6dff426207f555b379e2)), closes [#434](https://github.com/karma-runner/karma-coverage/issues/434)
# [2.1.0](https://github.com/karma-runner/karma-coverage/compare/v2.0.3...v2.1.0) (2021-12-01)
### Bug Fixes
* **deps:** update main and dev dependencies ([c20d982](https://github.com/karma-runner/karma-coverage/commit/c20d982607168ccc302f1cca576dbbbdac0a1af6))
### Features
* **reporter:** log coverage threshold as a warning fixed [#432](https://github.com/karma-runner/karma-coverage/issues/432) ([a6c95d8](https://github.com/karma-runner/karma-coverage/commit/a6c95d8fb932a4191474e6504174df7bc9a6fe60))
## [2.0.3](https://github.com/karma-runner/karma-coverage/compare/v2.0.2...v2.0.3) (2020-07-24)
### Bug Fixes
* **report:** waiting promise resolve in onExist method fix [#418](https://github.com/karma-runner/karma-coverage/issues/418) ([c93f061](https://github.com/karma-runner/karma-coverage/commit/c93f0612da6898fb5cfbb9ece57556a2704c4397))
## [2.0.2](https://github.com/karma-runner/karma-coverage/compare/v2.0.1...v2.0.2) (2020-04-13)
### Bug Fixes
* **reporter:** update calls to match new API in istanbul-lib-report fix [#398](https://github.com/karma-runner/karma-coverage/issues/398) ([#403](https://github.com/karma-runner/karma-coverage/issues/403)) ([4962a70](https://github.com/karma-runner/karma-coverage/commit/4962a70026efbbd77e9fa7b6bfd6be29047c1082))
* remove information about old istanbul lib ([#404](https://github.com/karma-runner/karma-coverage/issues/404)) ([5cf931a](https://github.com/karma-runner/karma-coverage/commit/5cf931afe331cfcebf7cf934ec52de933344091d))
<a name="2.0.1"></a>
## [2.0.1](https://github.com/karma-runner/karma-coverage/compare/v2.0.0...v2.0.1) (2019-08-20)
<a name="2.0.0"></a>
# [2.0.0](https://github.com/karma-runner/karma-coverage/compare/v1.1.1...v2.0.0) (2019-08-20)
### Bug Fixes
* **build:** Update to lodash 4 ([d6d21d2](https://github.com/karma-runner/karma-coverage/commit/d6d21d2)), closes [#242](https://github.com/karma-runner/karma-coverage/issues/242)
* **reporter:** replace colons in the output path ([3b2bffa](https://github.com/karma-runner/karma-coverage/commit/3b2bffa))
* bump lodash for CVE-2018-16487 ([15f8b12](https://github.com/karma-runner/karma-coverage/commit/15f8b12))
### Chores
* Update travis config ([00090ea](https://github.com/karma-runner/karma-coverage/commit/00090ea))
* **deps:** Use latest istanbul lib packages ([#377](https://github.com/karma-runner/karma-coverage/issues/377)) ([f40d6af](https://github.com/karma-runner/karma-coverage/commit/f40d6af))
### BREAKING CHANGES
* **deps:** This set of changes may impact some use cases.
* chore: Add Updated Istanbul Dependencies
The istanbul package is deprecated in favor several split packages that
control different aspects of how istanbul works. This commit adds the
recommended packages that will be used in future commits as
karma-coverage's usage of istanbul is updated to the latest api.
* refactor(reporter): Follow new report API
This commit refactors the in memory report implementation to use the new
istanbul report API.
Report creation is removed from newer versions of the istanbul API, so
this commit adds a set of utility functions to wrap around the new API
and provide similar functionality as the old API. The top level export
uses the new utility function to register the in-memory report.
* refactor(preprocessor): Switch to istanbul-lib-instrument
This commit updates the preprocessor to use istanbul-lib-instrument
instead of the deprecated istanbul package. The biggest change in this
refactor is using a callable function instead of a constructor when
creating instrumenters
The old istanbul package exposed the Instrumenter directly, allowing the
preprocessor to create an instance of it. istanbul-lib-instrument,
however, exposes a callable function that creates an Instrumenter.
This commit updates the preprocessor to follow this new pattern of using
a callable function. In order to ensure backwards compatibility, a
utility function is added to wrap constructors with a callable function
for creation automatically.
This change allows the following configuration for creating instrumenters:
1. An object that contains an Instrumenter constructor
2. An Instrumenter constructor itself
3. A callable function that returns an Instrumenter instance.
This commit also uses the istanbul-lib-source-maps package to handle
storing source maps. A global source map store registers source maps so
they can be used later on in the reporter.
* refactor(reporter): Switch to istanbul-lib-coverage
This commit updates the reporter by using the istanbul-lib-coverage
package api for handling coverage checking/management and the
istanbul-lib-report package api for handling reporting.
The new apis remove the need for collectors and remove the need to
handle disposing collectors.
* refactor: Remove unused source cache utilities
This commit removes the source-cache-store and source-cache files as
they are no longer being used. The source-map-store and
istanbul-lib-source-maps are used instead, so these files are no longer
needed.
* feat(util): Add Reset Functionality
This commit updates the report creator utility to allow resetting the
custom reporter map.
* fix(preprocessor): Track Coverage Maps Properly
This commit updates the preprocessor to properly access file coverage
when storing it in the global coverage map (when includeAllSources is
true). The previous method did not work because the returned
instrumented code from the default istanbul instrumenter returns the
coverage map in a POJO object instead of JSON notation. This breaks the
coverage regex used to match and parse the coverage map.
The istanbul instrumenter offers the ability to receive the coverage map
for the last instrumented file through a separate function, so that is
tested for and used if it is supported. The original method is used as a
fallback for backwards compatibility.
This commit also addresses changes from the v0 instanbul instrumenter
options. The changes are additive only to maintain backwards compatibility
for other instrumenters.
* fix(reporter): Access Data Properly to Check Coverage
This commit fixes errors with accessing data properly during the
checkCoverage method. A previous commit updated the implementation to
use istanbul-lib-coverage, but this involved an api change to access the
raw coverage data (which checkCoverage uses).
This commit also fixes the checking coverage for each file by using a
map to store file coverage summaries instead of merging summaries like
the global results. Per file coverage now works as expected.
* test: Update Unit Tests to use new Istanbul API
This commit updates the mocking done in unit tests to properly mock the
new istanbul API. Additionally, new unit test suites are added for the
utility methods report-creator and source-map-store.
* drop support for node < 8
* **reporter:** the output folder names change, they no longer contain `:`
<a name="1.1.2"></a>
## [1.1.2](https://github.com/karma-runner/karma-coverage/compare/v1.1.1...v1.1.2) (2018-05-03)
### Bug Fixes
* **build:** Update to lodash 4 ([d6d21d2](https://github.com/karma-runner/karma-coverage/commit/d6d21d2)), closes [#242](https://github.com/karma-runner/karma-coverage/issues/242)
* **reporter:** replace colons in the output path ([3b2bffa](https://github.com/karma-runner/karma-coverage/commit/3b2bffa))
### BREAKING CHANGES
* **reporter:** the output folder names change, they no longer contain `:`
<a name="1.1.1"></a>
## [1.1.1](https://github.com/karma-runner/karma-coverage/compare/v1.1.0...v1.1.1) (2016-07-23)
### Bug Fixes
* remove usage of the deprecated helper._ ([dacf9e9](https://github.com/karma-runner/karma-coverage/commit/dacf9e9))
<a name="1.1.0"></a>
# [1.1.0](https://github.com/karma-runner/karma-coverage/compare/v0.5.5...v1.1.0) (2016-07-07)
### Features
* **reporter:** Add callbacks for "writeReport" and "onExit" methods ([7e20759](https://github.com/karma-runner/karma-coverage/commit/7e20759))
<a name="1.0.0"></a>
# [1.0.0](https://github.com/karma-runner/karma-coverage/compare/v0.5.5...v1.0.0) (2016-05-04)
<a name="0.5.5"></a>
## [0.5.5](https://github.com/karma-runner/karma-coverage/compare/v0.5.4...v0.5.5) (2016-03-07)
### Bug Fixes
* **in-memory-reporter:** Fix bug in new InMemoryReport, now using null-checks ([051cffd](https://github.com/karma-runner/karma-coverage/commit/051cffd))
<a name="0.5.4"></a>
## [0.5.4](https://github.com/karma-runner/karma-coverage/compare/v0.5.3...v0.5.4) (2016-03-03)
### Bug Fixes
* **preprocessor:** Call done with error message instead of populating instrumentedCode ([c56e4de](https://github.com/karma-runner/karma-coverage/commit/c56e4de))
* **preprocessor:** Support CoffeeScript when using RequireJS ([e941e0c](https://github.com/karma-runner/karma-coverage/commit/e941e0c)), closes [#177](https://github.com/karma-runner/karma-coverage/issues/177)
* **preprocessor:** Use _.includes instead of _.contains ([3c769d5](https://github.com/karma-runner/karma-coverage/commit/3c769d5)), closes [#212](https://github.com/karma-runner/karma-coverage/issues/212)
<a name="0.5.3"></a>
## 0.5.3 (2015-10-20)
### Bug Fixes
* Update (dev)dependencies, include missing peer dependency and fix linter errors ([bb73158](https://github.com/karma-runner/karma-coverage/commit/bb73158))
<a name="0.5.2"></a>
## 0.5.2 (2015-09-08)
### Bug Fixes
* **preprocessor:** Reset coverageObjRegex before each use ([ef3f45c](https://github.com/karma-runner/karma-coverage/commit/ef3f45c))
<a name="0.5.1"></a>
## 0.5.1 (2015-08-28)
### Bug Fixes
* **preprocessor:** Change paths in windows to use backslash ([b0eecbe](https://github.com/karma-runner/karma-coverage/commit/b0eecbe)), closes [#178](https://github.com/karma-runner/karma-coverage/issues/178)
* **preprocessor:** Resolve all paths properly ([098182f](https://github.com/karma-runner/karma-coverage/commit/098182f)), closes [#65](https://github.com/karma-runner/karma-coverage/issues/65)
<a name="0.5.0"></a>
# 0.5.0 (2015-08-06)
### Bug Fixes
* **preprocessor:** use absolute paths ([27e0b09](https://github.com/karma-runner/karma-coverage/commit/27e0b09))
<a name"0.4.2"></a>
### 0.4.2 (2015-06-12)
#### Bug Fixes
* **preprocessor:** Use `_.contains` instead of `_.includes` to avoid braking with `lodash@2` ([411beb1f](https://github.com/karma-runner/karma-coverage/commit/411beb1f))
<a name"0.4.1"></a>
### 0.4.1 (2015-06-09)
#### Features
* **preprocessor:** Add sourcemap support ([de3b738b](https://github.com/karma-runner/karma-coverage/commit/de3b738b), closes [#109](https://github.com/karma-runner/karma-coverage/issues/109))
* **reporter:** add check coverage thresholds ([bc63b158](https://github.com/karma-runner/karma-coverage/commit/bc63b158), closes [#21](https://github.com/karma-runner/karma-coverage/issues/21))
<a name"0.4.0"></a>
## 0.4.0 (2015-06-09)
#### Bug Fixes
* Drop karma from peerDependencies ([eebcc989](https://github.com/karma-runner/karma-coverage/commit/eebcc989))
* do not dispose collectors before they are written ([9816cd14](https://github.com/karma-runner/karma-coverage/commit/9816cd14))
* reporter allow using a externally provided source cachere for reporters change ` ([781c126f](https://github.com/karma-runner/karma-coverage/commit/781c126f))
* watermarks are not passed to reporters ([a9044055](https://github.com/karma-runner/karma-coverage/commit/a9044055), closes [#143](https://github.com/karma-runner/karma-coverage/issues/143), [#144](https://github.com/karma-runner/karma-coverage/issues/144))
* when using browserify dont create source code caching ([50030df1](https://github.com/karma-runner/karma-coverage/commit/50030df1))
#### Breaking Changes
* Karma is no longer a `peerDependency` so it needs to be installed
manually. Ref https://github.com/karma-runner/integration-tests/issues/5 ([eebcc989](https://github.com/karma-runner/karma-coverage/commit/eebcc989))
<a name"0.3.1"></a>
### 0.3.1 (2015-06-09)
#### Bug Fixes
* skip directory creation when reporting to console ([42c9e0a8](https://github.com/karma-runner/karma-coverage/commit/42c9e0a8), closes [#24](https://github.com/karma-runner/karma-coverage/issues/24))
#### Features
* adding support for including all sources in coverage data ([18091753](https://github.com/karma-runner/karma-coverage/commit/18091753))
<a name"0.3.0"></a>
## 0.3.0 (2015-06-09)
#### Features
* **preprocessor:** free instrumenter ([626e7b0c](https://github.com/karma-runner/karma-coverage/commit/626e7b0c), closes [#101](https://github.com/karma-runner/karma-coverage/issues/101))
#### Breaking Changes
* Karma-coverage does not ship with additional instrumenter. You need to explicitly install the instrumenter you need.
Removed **Ibrik** instrumenter that need to be installed explicitly.
Quick list of known community instrumenters :
- [Ibrik](https://github.com/Constellation/ibrik) (CoffeeScript files instrumenter).
- [Ismailia](https://github.com/Spote/ismailia) (ES6 files instrumenter using Traceur).
- [Isparta](https://github.com/douglasduteil/isparta) (ES6 files instrumenter using 6to5).
([626e7b0c](https://github.com/karma-runner/karma-coverage/commit/626e7b0c))
<a name"0.2.7"></a>
### 0.2.7 (2015-06-09)
#### Bug Fixes
* add in-memory source code caching to support detail reports on compiled CoffeeSc ([c1e542a5](https://github.com/karma-runner/karma-coverage/commit/c1e542a5))
<a name"0.2.6"></a>
### 0.2.6 (2015-06-09)
#### Bug Fixes
* reporters can be configured individually ([adcb8e69](https://github.com/karma-runner/karma-coverage/commit/adcb8e69))
<a name"0.2.5"></a>
### 0.2.5 (2015-06-09)
#### Features
* new `subdir` option ([309dad4e](https://github.com/karma-runner/karma-coverage/commit/309dad4e))
<a name"0.2.4"></a>
### 0.2.4 (2015-06-09)
#### Bug Fixes
* optional option no longer trigger an error when omitted ([a2cdf569](https://github.com/karma-runner/karma-coverage/commit/a2cdf569))
<a name"0.2.3"></a>
### 0.2.3 (2015-06-09)
#### Features
* **config:** instrumenter override option ([ee3e68e8](https://github.com/karma-runner/karma-coverage/commit/ee3e68e8))
<a name"0.2.2"></a>
### 0.2.2 (2015-06-09)
#### Features
* update the dependencies ([77d73e2b](https://github.com/karma-runner/karma-coverage/commit/77d73e2b))
<a name"0.2.1"></a>
### 0.2.1 (2015-06-09)
#### Features
* update istanbul to 0.2.3, ibrik to 1.1.1 ([9064ec1e](https://github.com/karma-runner/karma-coverage/commit/9064ec1e))
<a name"0.2.0"></a>
## 0.2.0 (2015-06-09)
#### Features
* no longer write json unless configured ([1256fb8b](https://github.com/karma-runner/karma-coverage/commit/1256fb8b))
#### Breaking Changes
* No json coverage is generated by default. If you want that, please use `json` reporter:
```js
coverageReporter: {
type: 'json'
}
// or with multiple reporters
coverageReporter: {
reporters: [
{type: 'html', dir: 'coverage'},
{type: 'json', dir: 'coverage'},
]
}
```
([1256fb8b](https://github.com/karma-runner/karma-coverage/commit/1256fb8b))
<a name"0.1.5"></a>
### 0.1.5 (2015-06-09)
#### Bug Fixes
* use output dir per reporter ([dac46788](https://github.com/karma-runner/karma-coverage/commit/dac46788), closes [#42](https://github.com/karma-runner/karma-coverage/issues/42))
#### Features
* revert update istanbul ([5b8937ab](https://github.com/karma-runner/karma-coverage/commit/5b8937ab))
* update istanbul ([b696c3e3](https://github.com/karma-runner/karma-coverage/commit/b696c3e3))
<a name"0.1.4"></a>
### 0.1.4 (2015-06-09)
#### Features
* Update ibrik version to 1.0.1 ([b50f2d53](https://github.com/karma-runner/karma-coverage/commit/b50f2d53), closes [#39](https://github.com/karma-runner/karma-coverage/issues/39))
<a name"0.1.3"></a>
### 0.1.3 (2015-06-09)
#### Bug Fixes
* update to work with Karma 0.11 ([89c98177](https://github.com/karma-runner/karma-coverage/commit/89c98177))
#### Features
* update instanbul ([24126e72](https://github.com/karma-runner/karma-coverage/commit/24126e72))
* support coverage for coffee script ([9f802c1c](https://github.com/karma-runner/karma-coverage/commit/9f802c1c))
* log where the coverage reports are generated ([c9ef5c9f](https://github.com/karma-runner/karma-coverage/commit/c9ef5c9f))
* add a default config and normalize outputFile path ([027fa4fc](https://github.com/karma-runner/karma-coverage/commit/027fa4fc))
<a name"0.1.2"></a>
### 0.1.2 (2015-06-09)
<a name"0.1.1"></a>
### 0.1.1 (2015-06-09)
#### Bug Fixes
* update to work with Karma 0.11 ([b744d6f2](https://github.com/karma-runner/karma-coverage/commit/b744d6f2))
<a name"0.1.0"></a>
## 0.1.0 (2015-06-09)
<a name"0.0.5"></a>
### 0.0.5 (2015-06-09)
#### Bug Fixes
* delay collector disposal until all file writing has completed. ([75c4db0e](https://github.com/karma-runner/karma-coverage/commit/75c4db0e))
#### Features
* allow multiple report types ([4a9afb62](https://github.com/karma-runner/karma-coverage/commit/4a9afb62))
<a name"0.0.4"></a>
### 0.0.4 (2015-06-09)
#### Features
* do not preprocess files if coverage reporter is not used ([277a1ad9](https://github.com/karma-runner/karma-coverage/commit/277a1ad9), closes [#7](https://github.com/karma-runner/karma-coverage/issues/7))
<a name"0.0.3"></a>
### 0.0.3 (2015-06-09)
#### Bug Fixes
* handle no result ([5eca4882](https://github.com/karma-runner/karma-coverage/commit/5eca4882))
#### Features
* support coverage per spec ([385b6e1f](https://github.com/karma-runner/karma-coverage/commit/385b6e1f))
<a name"0.0.2"></a>
### 0.0.2 (2015-06-09)
* Initial release

20
front/app/node_modules/karma-coverage/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License
Copyright (C) 2011-2013 Google, Inc.
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.

122
front/app/node_modules/karma-coverage/README.md generated vendored Normal file
View File

@@ -0,0 +1,122 @@
# karma-coverage
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/karma-runner/karma-coverage)
[![npm version](https://img.shields.io/npm/v/karma-coverage.svg?style=flat-square)](https://www.npmjs.com/package/karma-coverage) [![npm downloads](https://img.shields.io/npm/dm/karma-coverage.svg?style=flat-square)](https://www.npmjs.com/package/karma-coverage)
[![Build Status](https://img.shields.io/travis/karma-runner/karma-coverage/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma-coverage) [![Dependency Status](https://img.shields.io/david/karma-runner/karma-coverage.svg?style=flat-square)](https://david-dm.org/karma-runner/karma-coverage) [![devDependency Status](https://img.shields.io/david/dev/karma-runner/karma-coverage.svg?style=flat-square)](https://david-dm.org/karma-runner/karma-coverage#info=devDependencies)
> Generate code coverage using [Istanbul].
## Installation
The easiest way is to install `karma-coverage` as a `devDependency`,
by running
```bash
npm install karma karma-coverage --save-dev
```
## Configuration
For configuration details see [docs/configuration](docs/configuration.md).
## Examples
### Basic
```javascript
// karma.conf.js
module.exports = function(config) {
config.set({
files: [
'src/**/*.js',
'test/**/*.js'
],
// coverage reporter generates the coverage
reporters: ['progress', 'coverage'],
preprocessors: {
// source files, that you wanna generate coverage for
// do not include tests or libraries
// (these files will be instrumented by Istanbul)
'src/**/*.js': ['coverage']
},
// optionally, configure the reporter
coverageReporter: {
type : 'html',
dir : 'coverage/'
}
});
};
```
### CoffeeScript
For an example on how to use with [CoffeeScript](http://coffeescript.org/)
see [examples/coffee](examples/coffee). For an example of how to use with
CoffeeScript and the RequireJS module loader, see
[examples/coffee-requirejs](examples/coffee-requirejs) (and also see
the `useJSExtensionForCoffeeScript` option in
[docs/configuration.md](docs/configuration.md)).
### Advanced, multiple reporters
```javascript
// karma.conf.js
module.exports = function(config) {
config.set({
files: [
'src/**/*.js',
'test/**/*.js'
],
reporters: ['progress', 'coverage'],
preprocessors: {
'src/**/*.js': ['coverage']
},
coverageReporter: {
// specify a common output directory
dir: 'build/reports/coverage',
reporters: [
// reporters not supporting the `file` property
{ type: 'html', subdir: 'report-html' },
{ type: 'lcov', subdir: 'report-lcov' },
// reporters supporting the `file` property, use `subdir` to directly
// output them in the `dir` directory
{ type: 'cobertura', subdir: '.', file: 'cobertura.txt' },
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' },
{ type: 'teamcity', subdir: '.', file: 'teamcity.txt' },
{ type: 'text', subdir: '.', file: 'text.txt' },
{ type: 'text-summary', subdir: '.', file: 'text-summary.txt' },
]
}
});
};
```
### FAQ
#### Don't minify instrumenter output
When using the istanbul instrumenter (default), you can disable code compaction by adding the following to your configuration.
```javascript
// karma.conf.js
module.exports = function(config) {
config.set({
coverageReporter: {
instrumenterOptions: {
istanbul: { noCompact: true }
}
}
});
};
```
----
For more information on Karma see the [homepage].
[homepage]: https://karma-runner.github.io
[Istanbul]: https://istanbul.js.org

View File

@@ -0,0 +1,275 @@
# Configuration
### `type`
**Type:** String
**Description:** Specify a reporter type.
**Possible Values:**
* `html` (default)
* `lcov` (lcov and html)
* `lcovonly`
* `text`
* `text-summary`
* `cobertura` (xml format supported by Jenkins)
* `teamcity` (code coverage System Messages for TeamCity)
* `json` (json format supported by [`grunt-istanbul-coverage`](https://github.com/daniellmb/grunt-istanbul-coverage))
* `json-summary`
* `in-memory` (supported since v0.5.4)
* `none` (Does nothing. Use to specify that no reporting is needed)
### `dir`
**Type:** String
**Description:** This will be used to output coverage reports. When
you set a relative path, the directory is resolved against the `basePath`.
### `subdir`
**Type:** String
**Description**: This will be used in complement of the `coverageReporter.dir`
option to generate the full output directory path. By default, the output
directory is set to `./config.dir/BROWSER_NAME/`, this option allows you to
custom the second part. You can either pass a `string` or a `function` which will be
called with the browser name passed as the only argument.
```javascript
coverageReporter: {
dir: 'coverage',
subdir: '.'
// Would output the results into: .'/coverage/'
}
```
```javascript
coverageReporter: {
dir: 'coverage',
subdir: 'report'
// Would output the results into: .'/coverage/report/'
}
```
```javascript
coverageReporter: {
dir: 'coverage',
subdir: function(browser) {
// normalization process to keep a consistent browser name across different
// OS
return browser.toLowerCase().split(/[ /-]/)[0];
}
// Would output the results into: './coverage/firefox/'
}
```
### `file`
**Type:** String
**Description:** If you use one of these reporters, `cobertura`, `lcovonly`, `teamcity`, `text` or `text-summary`,you may set the `file` option to specify the output file.
```javascript
coverageReporter: {
type : 'text',
dir : 'coverage/',
file : 'coverage.txt'
}
```
### `check`
**Type:** Object
**Description:** This will be used to configure minimum threshold enforcement for coverage results. If the thresholds are not met, karma will return failure. Thresholds, when specified as a positive number are taken to be the minimum percentage required. When a threshold is specified as a negative number it represents the maximum number of uncovered entities allowed.
For example, `statements: 90` implies minimum statement coverage is 90%. `statements: -10` implies that no more than 10 uncovered statements are allowed.
`global` applies to all files together and `each` on a per-file basis. A list of files or patterns can be excluded from enforcement via the `excludes` property. On a per-file or pattern basis, per-file thresholds can be overridden via the `overrides` property.
`emitWarning` allows to log exceeding coverage threshold into console as warning and not fail tests.
```javascript
coverageReporter: {
check: {
emitWarning: false,
global: {
statements: 50,
branches: 50,
functions: 50,
lines: 50,
excludes: [
'foo/bar/**/*.js'
]
},
each: {
statements: 50,
branches: 50,
functions: 50,
lines: 50,
excludes: [
'other/directory/**/*.js'
],
overrides: {
'baz/component/**/*.js': {
statements: 98
}
}
}
}
}
```
### `watermarks`
**Type:** Object
**Description:** This will be used to set the coverage threshold colors. The first number is the threshold between Red and Yellow. The second number is the threshold between Yellow and Green.
```javascript
coverageReporter: {
watermarks: {
statements: [ 50, 75 ],
functions: [ 50, 75 ],
branches: [ 50, 75 ],
lines: [ 50, 75 ]
}
}
```
### `includeAllSources`
**Type:** Boolean
**Description:** You can opt to include all sources files, as indicated by the coverage preprocessor, in your code coverage data, even if there are no tests covering them. (Default `false`)
```javascript
coverageReporter: {
type : 'text',
dir : 'coverage/',
file : 'coverage.txt',
includeAllSources: true
}
```
### `sourceStore`
**Type:** istanbul.Store
**Description:** You can opt to specify a source store allowing for external coverage collectors access to the instrumented code.
```javascript
coverageReporter: {
type : 'text',
dir : 'coverage/',
file : 'coverage.txt',
sourceStore : require('istanbul').Store.create('fslookup')
}
```
### `reporters`
**Type:** Array of Objects
**Description:** You can use multiple reporters, by providing array of options.
```javascript
coverageReporter: {
reporters:[
{type: 'html', dir:'coverage/'},
{type: 'teamcity'},
{type: 'text-summary'}
],
}
```
### `instrumenter`
**Type:** Object
**Description:** Karma-coverage can infers the instrumenter regarding of the file extension. It is possible to override this behavior and point out an
instrumenter for the files matching a specific pattern.
To do so, you need to declare an object under with the keys represents the
pattern to match, and the instrumenter to apply. The matching will be done
using [minimatch](https://github.com/isaacs/minimatch).
If two patterns match, the last one will take the precedence.
For example you can use [Ibrik](https://github.com/Constellation/ibrik) (an
[Istanbul](https://github.com/gotwarlost/istanbul) analog for
CoffeeScript files) with:
```javascript
coverageReporter: {
instrumenters: { ibrik : require('ibrik') },
instrumenter: {
'**/*.coffee': 'ibrik'
},
// ...
}
```
You can pass options additional options to specific instrumenter with:
```javascript
var to5Options = { experimental: true };
// [...]
coverageReporter: {
instrumenters: { isparta : require('isparta') },
instrumenter: {
'**/*.js': 'isparta'
},
instrumenterOptions: {
isparta: { to5 : to5Options }
}
}
```
### `useJSExtensionForCoffeeScript`
**Type:** boolean
**Description:** If set to `true`, then CoffeeScript files instrumented
with [Ibrik](https://github.com/Constellation/ibrik) will use the `.js`
extension for the transpiled source (without this option, the JavaScript
files will keep the original `.coffee` extension). This option is required
if you use a module loader such as [RequireJS](http://requirejs.org/) that
expects files to use a `.js` extension.
Example of using RequireJS with CoffeeScript:
```coffeescript
coverageReporter:
useJSExtensionForCoffeeScript: true
instrumenters:
ibrik : require('ibrik')
instrumenter:
'**/*.coffee': 'ibrik'
# ...
```
### `reporter[type='in-memory']`
This is a different kind of reporter. Instead of writing a report physicaly
to disk, it raises an event `coverage_complete`. This event can only be caught
when using karma via the [public api](http://karma-runner.github.io/0.13/dev/public-api.html)
```javascript
var Server = require('karma').Server
var server = new Server({files: [/*...*/], port: 9876, coverageReporter: { type: 'in-memory' }, preprocessors: { '**/*.js': 'coverage' }, reporters: ['coverage'] }, function(exitCode) {
console.log('Karma has exited with ' + exitCode)
process.exit(exitCode)
})
server.on('coverage_complete', function (browser, coverageReport) {
console.log('Covrage report: ', coverageReport)
})
server.start();
karma.runner.run({port: 9876});
```
The coverage report will be a merged result in json format.

View File

@@ -0,0 +1,9 @@
define [], ->
# Some code under test
plus: (a, b) ->
a + b
# not covered
minus: (a, b) ->
a - b

View File

@@ -0,0 +1,53 @@
module.exports = (config) ->
config.set
frameworks: ['mocha', 'requirejs']
files: [
# We do not want any files to execute automatically
{pattern: 'calculator.coffee', included: false}
{pattern: 'test.coffee', included: false}
# Except for this one. This one shall execute.
'requirejs.karma.coffee'
]
browsers: ['Firefox']
coffeePreprocessor:
options:
sourceMap: true
preprocessors:
# source files, that you wanna generate coverage for
# do not include tests or libraries
# (these files will be instrumented by Istanbul via Ibrik unless
# specified otherwise in coverageReporter.instrumenter)
'calculator.coffee': 'coverage'
# note: project files will already be converted to
# JavaScript via coverage preprocessor.
# Thus, you'll have to limit the CoffeeScript preprocessor
# to uncovered files.
'test.coffee': 'coffee'
'requirejs.karma.coffee': 'coffee'
coverageReporter:
type: 'text-summary'
useJSExtensionForCoffeeScript: true
instrumenters:
ibrik : require('ibrik')
instrumenter:
'**/*.coffee': 'ibrik'
# coverage reporter generates the coverage
reporters: ['dots', 'coverage']
plugins: [
require('../../lib/index')
'karma-mocha'
'karma-requirejs'
'karma-coffee-preprocessor'
'karma-firefox-launcher'
]
singleRun: true

View File

@@ -0,0 +1,22 @@
{
"name": "karma-coverage-coffee-example",
"version": "1.0.0",
"description": "Demonstrate the usage of karma-coverage with CoffeeScript",
"main": "",
"scripts": {
"test": "./node_modules/karma/bin/karma start"
},
"author": "Lloyd Smith II <lloyd.smith@gmail.com>",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"coffee-script": "latest",
"ibrik": "^2.0.0",
"karma": "^0.13.9",
"karma-coffee-preprocessor": "latest",
"karma-firefox-launcher": "latest",
"karma-mocha": "latest",
"karma-requirejs": "^0.2.2",
"requirejs": "^2.1.20"
}
}

View File

@@ -0,0 +1,6 @@
# A minimal requirejs configuration
require.config
baseUrl: '/base'
deps: ['test']
callback: ->
window.__karma__.start()

View File

@@ -0,0 +1,9 @@
define ['calculator'], (calculator) ->
describe 'calculator', ->
it 'should pass', ->
true is true
it 'should work', ->
calculator.plus(1, 2) is 3

View File

@@ -0,0 +1,45 @@
module.exports = (config) ->
config.set
frameworks: ['mocha']
files: [
'*.coffee'
]
browsers: ['Firefox']
coffeePreprocessor:
options:
sourceMap: true
preprocessors:
# source files, that you wanna generate coverage for
# do not include tests or libraries
# (these files will be instrumented by Istanbul via Ibrik unless
# specified otherwise in coverageReporter.instrumenter)
'plus.coffee': 'coverage'
# note: project files will already be converted to
# JavaScript via coverage preprocessor.
# Thus, you'll have to limit the CoffeeScript preprocessor
# to uncovered files.
'test.coffee': 'coffee'
coverageReporter:
type: 'html'
instrumenters:
ibrik : require('ibrik')
instrumenter:
'**/*.coffee': 'ibrik'
# coverage reporter generates the coverage
reporters: ['dots', 'coverage']
plugins: [
require('../../lib/index')
'karma-mocha'
'karma-coffee-preprocessor'
'karma-firefox-launcher'
]
singleRun: true

View File

@@ -0,0 +1,20 @@
{
"name": "karma-coverage-coffee-example",
"version": "1.0.0",
"description": "Demonstrate the usage of karma-coverage with CoffeeScript",
"main": "",
"scripts": {
"test": "./node_modules/karma/bin/karma start"
},
"author": "Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"karma": "latest",
"karma-mocha": "latest",
"karma-coffee-preprocessor": "latest",
"karma-firefox-launcher": "latest",
"coffee-script": "latest",
"ibrik": "^2.0.0"
}
}

View File

@@ -0,0 +1,7 @@
# Some code under test
window.plus = (a, b) ->
a + b
# this one is not coveraged
window.minus = (a, b) ->
a - b

View File

@@ -0,0 +1,7 @@
describe 'plus', ->
it 'should pass', ->
true is true
it 'should work', ->
plus(1, 2) is 3

20
front/app/node_modules/karma-coverage/gruntfile.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-npm')
grunt.loadNpmTasks('grunt-karma')
grunt.initConfig({
pkgFile: 'package.json',
'npm-contributors': {
options: {
commitMessage: 'chore: update contributors'
}
},
karma: {
coffee: {
configFile: 'examples/coffee/karma.conf.coffee'
},
coffeeRequireJS: {
configFile: 'examples/coffee-requirejs/karma.conf.coffee'
}
}
})
}

View File

@@ -0,0 +1,22 @@
// Coverage Map
// ============
var coverageMap = {}
function add (coverageObj) {
coverageMap[coverageObj.path] = coverageObj
}
function get () {
return coverageMap
}
function reset () {
coverageMap = {}
}
module.exports = {
add: add,
get: get,
reset: reset
}

View File

@@ -0,0 +1,29 @@
const { ReportBase } = require('istanbul-lib-report')
class InMemoryReport extends ReportBase {
constructor (opt) {
super(opt)
this.opt = opt
}
onStart () {
this.data = {}
}
onDetail (node) {
const fc = node.getFileCoverage()
const key = fc.path
this.data[key] = fc.toJSON()
}
onEnd () {
if (!this.opt || !this.opt.emitter || !this.opt.emitter.emit) {
console.error('Could not raise "coverage_complete" event, missing emitter because it was not supplied during initialization of the reporter')
return
}
this.opt.emitter.emit('coverage_complete', this.opt.browser, this.data)
}
}
InMemoryReport.TYPE = 'in-memory'
module.exports = InMemoryReport

13
front/app/node_modules/karma-coverage/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
// karma-coverage
// ==============
//
// Main entry point for the karma-coverage module.
// Exposes the preprocessor and reporter plugins.
// Registering one additional (karma specific) reporter: in-memory
require('./report-creator').register(require('./in-memory-report'))
module.exports = {
'preprocessor:coverage': ['factory', require('./preprocessor')],
'reporter:coverage': ['type', require('./reporter')]
}

View File

@@ -0,0 +1,201 @@
// Coverage Preprocessor
// =====================
//
// Depends on the the reporter to generate an actual report
// Dependencies
// ------------
const { createInstrumenter } = require('istanbul-lib-instrument')
const minimatch = require('minimatch')
const path = require('path')
const globalSourceMapStore = require('./source-map-store')
const globalCoverageMap = require('./coverage-map')
// Regexes
// -------
const coverageObjRegex = /\{.*"path".*"fnMap".*"statementMap".*"branchMap".*\}/g
// Preprocessor creator function
function createCoveragePreprocessor (logger, basePath, reporters = [], coverageReporter = {}) {
const log = logger.create('preprocessor.coverage')
// Options
// -------
function isConstructor (Func) {
try {
// eslint-disable-next-line
new Func()
} catch (err) {
// error message should be of the form: "TypeError: func is not a constructor"
// test for this type of message to ensure we failed due to the function not being
// constructable
if (/TypeError.*constructor/.test(err.message)) {
return false
}
}
return true
}
function getCreatorFunction (Obj) {
if (Obj.Instrumenter) {
return function (opts) {
return new Obj.Instrumenter(opts)
}
}
if (typeof Obj !== 'function') {
// Object doesn't have old instrumenter variable and isn't a
// constructor, so we can't use it to create an instrumenter
return null
}
if (isConstructor(Obj)) {
return function (opts) {
return new Obj(opts)
}
}
return Obj
}
const instrumenters = { istanbul: createInstrumenter }
const instrumenterOverrides = coverageReporter.instrumenter || {}
const { includeAllSources = false, useJSExtensionForCoffeeScript = false } = coverageReporter
Object.entries(coverageReporter.instrumenters || {}).forEach(([literal, instrumenter]) => {
const creatorFunction = getCreatorFunction(instrumenter)
if (creatorFunction) {
instrumenters[literal] = creatorFunction
}
})
const sourceMapStore = globalSourceMapStore.get(basePath)
const instrumentersOptions = Object.keys(instrumenters).reduce((memo, key) => {
memo[key] = {}
if (coverageReporter.instrumenterOptions) {
memo[key] = coverageReporter.instrumenterOptions[key]
}
return memo
}, {})
// if coverage reporter is not used, do not preprocess the files
if (!reporters.includes('coverage')) {
log.info('coverage not included in reporters %s', reporters)
return function (content, _, done) {
done(content)
}
}
log.debug('coverage included in reporters %s', reporters)
// check instrumenter override requests
function checkInstrumenters () {
const keys = Object.keys(instrumenters)
return Object.values(instrumenterOverrides).some(literal => {
const notIncluded = !keys.includes(String(literal))
if (notIncluded) {
log.error('Unknown instrumenter: %s', literal)
}
return notIncluded
})
}
if (checkInstrumenters()) {
return function (content, _, done) {
return done(1)
}
}
return function (content, file, done) {
log.debug('Processing "%s".', file.originalPath)
const jsPath = path.resolve(file.originalPath)
// 'istanbul' is default instrumenters
const instrumenterLiteral = Object.keys(instrumenterOverrides).reduce((res, pattern) => {
if (minimatch(file.originalPath, pattern, { dot: true })) {
return instrumenterOverrides[pattern]
}
return res
}, 'istanbul')
const instrumenterCreator = instrumenters[instrumenterLiteral]
const constructOptions = instrumentersOptions[instrumenterLiteral] || {}
let options = Object.assign({}, constructOptions)
let codeGenerationOptions = null
options.autoWrap = options.autoWrap || !options.noAutoWrap
if (file.sourceMap) {
log.debug('Enabling source map generation for "%s".', file.originalPath)
codeGenerationOptions = Object.assign({}, {
format: {
compact: !constructOptions.noCompact
},
sourceMap: file.sourceMap.file,
sourceMapWithCode: true,
file: file.path
}, constructOptions.codeGenerationOptions || {})
options.produceSourceMap = true
}
options = Object.assign({}, options, { codeGenerationOptions: codeGenerationOptions })
const instrumenter = instrumenterCreator(options)
instrumenter.instrument(content, jsPath, function (err, instrumentedCode) {
if (err) {
log.error('%s\n at %s', err.message, file.originalPath)
done(err.message)
} else {
// Register the incoming sourceMap for transformation during reporting (if it exists)
if (file.sourceMap) {
sourceMapStore.registerMap(jsPath, file.sourceMap)
}
// Add merged source map (if it merged correctly)
const lastSourceMap = instrumenter.lastSourceMap()
if (lastSourceMap) {
log.debug('Adding source map to instrumented file for "%s".', file.originalPath)
file.sourceMap = lastSourceMap
instrumentedCode += '\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,'
instrumentedCode += Buffer.from(JSON.stringify(lastSourceMap)).toString('base64') + '\n'
}
if (includeAllSources) {
let coverageObj
// Check if the file coverage object is exposed from the instrumenter directly
if (instrumenter.lastFileCoverage) {
coverageObj = instrumenter.lastFileCoverage()
globalCoverageMap.add(coverageObj)
} else {
// Attempt to match and parse coverage object from instrumented code
// reset stateful regex
coverageObjRegex.lastIndex = 0
const coverageObjMatch = coverageObjRegex.exec(instrumentedCode)
if (coverageObjMatch !== null) {
coverageObj = JSON.parse(coverageObjMatch[0])
globalCoverageMap.add(coverageObj)
}
}
}
// RequireJS expects JavaScript files to end with `.js`
if (useJSExtensionForCoffeeScript && instrumenterLiteral === 'ibrik') {
file.path = file.path.replace(/\.coffee$/, '.js')
}
done(instrumentedCode)
}
}, file.sourceMap)
}
}
createCoveragePreprocessor.$inject = [
'logger',
'config.basePath',
'config.reporters',
'config.coverageReporter'
]
module.exports = createCoveragePreprocessor

View File

@@ -0,0 +1,41 @@
// Report Creator
// ==============
//
// Wrapper of Istanbul's report creator to allow registering
// custom reporters
// Dependencies
// ------------
var istanbulReports = require('istanbul-reports')
var customReporterMap = {}
function register (reporter) {
var registeredType = reporter.TYPE
if (!registeredType) {
throw new Error('Registering a custom reporter requires a type!')
}
customReporterMap[registeredType] = reporter
return registeredType
}
function create (type, opts) {
var Reporter = customReporterMap[type]
if (Reporter) {
return new Reporter(opts)
}
// fallback to istanbul's report creator if reporter isn't found
return istanbulReports.create(type, opts)
}
function reset () {
customReporterMap = {}
}
module.exports = {
create: create,
register: register,
reset: reset
}

314
front/app/node_modules/karma-coverage/lib/reporter.js generated vendored Normal file
View File

@@ -0,0 +1,314 @@
// Coverage Reporter
// Part of this code is based on [1], which is licensed under the New BSD License.
// For more information see the See the accompanying LICENSE-istanbul file for terms.
//
// [1]: https://github.com/gotwarlost/istanbul/blob/master/lib/command/check-coverage.js
// =====================
//
// Generates the report
// Dependencies
// ------------
var path = require('path')
const { promisify } = require('util')
var istanbulLibCoverage = require('istanbul-lib-coverage')
var istanbulLibReport = require('istanbul-lib-report')
var minimatch = require('minimatch')
var globalSourceMapStore = require('./source-map-store')
var globalCoverageMap = require('./coverage-map')
var reports = require('./report-creator')
const hasOwnProperty = Object.prototype.hasOwnProperty
// TODO(vojta): inject only what required (config.basePath, config.coverageReporter)
var CoverageReporter = function (rootConfig, helper, logger, emitter) {
var log = logger.create('coverage')
// Instance variables
// ------------------
this.adapters = []
// Options
// -------
var config = rootConfig.coverageReporter || {}
var basePath = rootConfig.basePath
var reporters = config.reporters
var sourceMapStore = globalSourceMapStore.get(basePath)
var includeAllSources = config.includeAllSources === true
if (config.watermarks) {
config.watermarks = helper.merge({}, istanbulLibReport.getDefaultWatermarks(), config.watermarks)
}
if (!helper.isDefined(reporters)) {
reporters = [config]
}
var coverageMaps
function normalize (key) {
// Exclude keys will always be relative, but covObj keys can be absolute or relative
var excludeKey = path.isAbsolute(key) ? path.relative(basePath, key) : key
// Also normalize for files that start with `./`, etc.
excludeKey = path.normalize(excludeKey)
return excludeKey
}
function getTrackedFiles (coverageMap, patterns) {
var files = []
coverageMap.files().forEach(function (key) {
// Do any patterns match the resolved key
var found = patterns.some(function (pattern) {
return minimatch(normalize(key), pattern, { dot: true })
})
// if no patterns match, keep the key
if (!found) {
files.push(key)
}
})
return files
}
function overrideThresholds (key, overrides) {
var thresholds = {}
// First match wins
Object.keys(overrides).some(function (pattern) {
if (minimatch(normalize(key), pattern, { dot: true })) {
thresholds = overrides[pattern]
return true
}
})
return thresholds
}
function checkCoverage (browser, coverageMap) {
var defaultThresholds = {
global: {
statements: 0,
branches: 0,
lines: 0,
functions: 0,
excludes: []
},
each: {
statements: 0,
branches: 0,
lines: 0,
functions: 0,
excludes: [],
overrides: {}
}
}
var thresholds = helper.merge({}, defaultThresholds, config.check)
var globalTrackedFiles = getTrackedFiles(coverageMap, thresholds.global.excludes)
var eachTrackedFiles = getTrackedFiles(coverageMap, thresholds.each.excludes)
var globalResults = istanbulLibCoverage.createCoverageSummary()
var eachResults = {}
globalTrackedFiles.forEach(function (f) {
var fileCoverage = coverageMap.fileCoverageFor(f)
var summary = fileCoverage.toSummary()
globalResults.merge(summary)
})
eachTrackedFiles.forEach(function (f) {
var fileCoverage = coverageMap.fileCoverageFor(f)
var summary = fileCoverage.toSummary()
eachResults[f] = summary
})
var coverageFailed = false
const { emitWarning = false } = thresholds
function check (name, thresholds, actuals) {
var keys = [
'statements',
'branches',
'lines',
'functions'
]
keys.forEach(function (key) {
var actual = actuals[key].pct
var actualUncovered = actuals[key].total - actuals[key].covered
var threshold = thresholds[key]
if (threshold < 0) {
if (threshold * -1 < actualUncovered) {
coverageFailed = true
log.error(browser.name + ': Uncovered count for ' + key + ' (' + actualUncovered +
') exceeds ' + name + ' threshold (' + -1 * threshold + ')')
}
} else if (actual < threshold) {
const message = `${browser.name}: Coverage for ${key} (${actual}%) does not meet ${name} threshold (${threshold}%)`
if (emitWarning) {
log.warn(message)
} else {
coverageFailed = true
log.error(message)
}
}
})
}
check('global', thresholds.global, globalResults.toJSON())
eachTrackedFiles.forEach(function (key) {
var keyThreshold = helper.merge(thresholds.each, overrideThresholds(key, thresholds.each.overrides))
check('per-file' + ' (' + key + ') ', keyThreshold, eachResults[key].toJSON())
})
return coverageFailed
}
// Generate the output path from the `coverageReporter.dir` and
// `coverageReporter.subdir` options.
function generateOutputPath (basePath, browserName, dir = 'coverage', subdir) {
if (subdir && typeof subdir === 'function') {
subdir = subdir(browserName)
}
if (browserName) {
browserName = browserName.replace(':', '')
}
let outPutPath = path.join(dir, subdir || browserName)
outPutPath = path.resolve(basePath, outPutPath)
return helper.normalizeWinPath(outPutPath)
}
this.onRunStart = function (browsers) {
coverageMaps = Object.create(null)
// TODO(vojta): remove once we don't care about Karma 0.10
if (browsers) {
browsers.forEach(this.onBrowserStart.bind(this))
}
}
this.onBrowserStart = function (browser) {
var startingMap = {}
if (includeAllSources) {
startingMap = globalCoverageMap.get()
}
coverageMaps[browser.id] = istanbulLibCoverage.createCoverageMap(startingMap)
}
this.onBrowserComplete = function (browser, result) {
var coverageMap = coverageMaps[browser.id]
if (!coverageMap) return
if (!result || !result.coverage) return
coverageMap.merge(result.coverage)
}
this.onSpecComplete = function (browser, result) {
var coverageMap = coverageMaps[browser.id]
if (!coverageMap) return
if (!result.coverage) return
coverageMap.merge(result.coverage)
}
let checkedCoverage = {}
let promiseComplete = null
this.executeReport = async function (reporterConfig, browser) {
const results = { exitCode: 0 }
const coverageMap = coverageMaps[browser.id]
if (!coverageMap) {
return
}
const mainDir = reporterConfig.dir || config.dir
const subDir = reporterConfig.subdir || config.subdir
const outputPath = generateOutputPath(basePath, browser.name, mainDir, subDir)
const remappedCoverageMap = await sourceMapStore.transformCoverage(coverageMap)
const options = helper.merge(config, reporterConfig, {
dir: outputPath,
subdir: '',
browser: browser,
emitter: emitter,
coverageMap: remappedCoverageMap
})
// If config.check is defined, check coverage levels for each browser
if (hasOwnProperty.call(config, 'check') && !checkedCoverage[browser.id]) {
checkedCoverage[browser.id] = true
var coverageFailed = checkCoverage(browser, remappedCoverageMap)
if (coverageFailed && results) {
results.exitCode = 1
}
}
const context = istanbulLibReport.createContext(options)
const report = reports.create(reporterConfig.type || 'html', options)
// // If reporting to console or in-memory skip directory creation
const toDisk = !reporterConfig.type || !reporterConfig.type.match(/^(text|text-summary|in-memory)$/)
if (!toDisk && reporterConfig.file === undefined) {
report.execute(context)
return
}
const mkdirIfNotExists = promisify(helper.mkdirIfNotExists)
await mkdirIfNotExists(outputPath)
log.debug('Writing coverage to %s', outputPath)
report.execute(context)
return results
}
this.onRunComplete = function (browsers) {
checkedCoverage = {}
let results = { exitCode: 0 }
const promiseCollection = reporters.map(reporterConfig =>
Promise.all(browsers.map(async (browser) => {
const res = await this.executeReport(reporterConfig, browser)
if (res && res.exitCode === 1) {
results = res
}
})))
promiseComplete = Promise.all(promiseCollection).then(() => results)
return promiseComplete
}
this.onExit = async function (done) {
try {
const results = await promiseComplete
if (results && results.exitCode === 1) {
done(results.exitCode)
return
}
if (typeof config._onExit === 'function') {
config._onExit(done)
} else {
done()
}
} catch (e) {
log.error('Unexpected error while generating coverage report.\n', e)
done(1)
}
}
}
CoverageReporter.$inject = ['config', 'helper', 'logger', 'emitter']
// PUBLISH
module.exports = CoverageReporter

View File

@@ -0,0 +1,14 @@
var istanbulLibSourceMaps = require('istanbul-lib-source-maps')
var cache = {}
function get (basePath, opts) {
if (!cache[basePath]) {
cache[basePath] = istanbulLibSourceMaps.createSourceMapStore(opts)
}
return cache[basePath]
}
module.exports = {
get: get
}

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.

View File

@@ -0,0 +1,129 @@
# brace-expansion
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
as known from sh/bash, in JavaScript.
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
## Example
```js
var expand = require('brace-expansion');
expand('file-{a,b,c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('-v{,,}')
// => ['-v', '-v', '-v']
expand('file{0..2}.jpg')
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
expand('file-{a..c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('file{2..0}.jpg')
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
expand('file{0..4..2}.jpg')
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
expand('file-{a..e..2}.jpg')
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
expand('file{00..10..5}.jpg')
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
expand('{{A..C},{a..c}}')
// => ['A', 'B', 'C', 'a', 'b', 'c']
expand('ppp{,config,oe{,conf}}')
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
```
## API
```js
var expand = require('brace-expansion');
```
### var expanded = expand(str)
Return an array of all possible and valid expansions of `str`. If none are
found, `[str]` is returned.
Valid expansions are:
```js
/^(.*,)+(.+)?$/
// {a,b,...}
```
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
A numeric sequence from `x` to `y` inclusive, with optional increment.
If `x` or `y` start with a leading `0`, all the numbers will be padded
to have equal length. Negative numbers and backwards iteration work too.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
`x` and `y` must be exactly one character, and if given, `incr` must be a
number.
For compatibility reasons, the string `${` is not eligible for brace expansion.
## Installation
With [npm](https://npmjs.org) do:
```bash
npm install brace-expansion
```
## Contributors
- [Julian Gruber](https://github.com/juliangruber)
- [Isaac Z. Schlueter](https://github.com/isaacs)
## Sponsors
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
## License
(MIT)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
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.

View File

@@ -0,0 +1,201 @@
var concatMap = require('concat-map');
var balanced = require('balanced-match');
module.exports = expandTop;
var escSlash = '\0SLASH'+Math.random()+'\0';
var escOpen = '\0OPEN'+Math.random()+'\0';
var escClose = '\0CLOSE'+Math.random()+'\0';
var escComma = '\0COMMA'+Math.random()+'\0';
var escPeriod = '\0PERIOD'+Math.random()+'\0';
function numeric(str) {
return parseInt(str, 10) == str
? parseInt(str, 10)
: str.charCodeAt(0);
}
function escapeBraces(str) {
return str.split('\\\\').join(escSlash)
.split('\\{').join(escOpen)
.split('\\}').join(escClose)
.split('\\,').join(escComma)
.split('\\.').join(escPeriod);
}
function unescapeBraces(str) {
return str.split(escSlash).join('\\')
.split(escOpen).join('{')
.split(escClose).join('}')
.split(escComma).join(',')
.split(escPeriod).join('.');
}
// Basically just str.split(","), but handling cases
// where we have nested braced sections, which should be
// treated as individual members, like {a,{b,c},d}
function parseCommaParts(str) {
if (!str)
return [''];
var parts = [];
var m = balanced('{', '}', str);
if (!m)
return str.split(',');
var pre = m.pre;
var body = m.body;
var post = m.post;
var p = pre.split(',');
p[p.length-1] += '{' + body + '}';
var postParts = parseCommaParts(post);
if (post.length) {
p[p.length-1] += postParts.shift();
p.push.apply(p, postParts);
}
parts.push.apply(parts, p);
return parts;
}
function expandTop(str) {
if (!str)
return [];
// I don't know why Bash 4.3 does this, but it does.
// Anything starting with {} will have the first two bytes preserved
// but *only* at the top level, so {},a}b will not expand to anything,
// but a{},b}c will be expanded to [a}c,abc].
// One could argue that this is a bug in Bash, but since the goal of
// this module is to match Bash's rules, we escape a leading {}
if (str.substr(0, 2) === '{}') {
str = '\\{\\}' + str.substr(2);
}
return expand(escapeBraces(str), true).map(unescapeBraces);
}
function identity(e) {
return e;
}
function embrace(str) {
return '{' + str + '}';
}
function isPadded(el) {
return /^-?0\d/.test(el);
}
function lte(i, y) {
return i <= y;
}
function gte(i, y) {
return i >= y;
}
function expand(str, isTop) {
var expansions = [];
var m = balanced('{', '}', str);
if (!m || /\$$/.test(m.pre)) return [str];
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
var isSequence = isNumericSequence || isAlphaSequence;
var isOptions = m.body.indexOf(',') >= 0;
if (!isSequence && !isOptions) {
// {a},b}
if (m.post.match(/,.*\}/)) {
str = m.pre + '{' + m.body + escClose + m.post;
return expand(str);
}
return [str];
}
var n;
if (isSequence) {
n = m.body.split(/\.\./);
} else {
n = parseCommaParts(m.body);
if (n.length === 1) {
// x{{a,b}}y ==> x{a}y x{b}y
n = expand(n[0], false).map(embrace);
if (n.length === 1) {
var post = m.post.length
? expand(m.post, false)
: [''];
return post.map(function(p) {
return m.pre + n[0] + p;
});
}
}
}
// at this point, n is the parts, and we know it's not a comma set
// with a single entry.
// no need to expand pre, since it is guaranteed to be free of brace-sets
var pre = m.pre;
var post = m.post.length
? expand(m.post, false)
: [''];
var N;
if (isSequence) {
var x = numeric(n[0]);
var y = numeric(n[1]);
var width = Math.max(n[0].length, n[1].length)
var incr = n.length == 3
? Math.abs(numeric(n[2]))
: 1;
var test = lte;
var reverse = y < x;
if (reverse) {
incr *= -1;
test = gte;
}
var pad = n.some(isPadded);
N = [];
for (var i = x; test(i, y); i += incr) {
var c;
if (isAlphaSequence) {
c = String.fromCharCode(i);
if (c === '\\')
c = '';
} else {
c = String(i);
if (pad) {
var need = width - c.length;
if (need > 0) {
var z = new Array(need + 1).join('0');
if (i < 0)
c = '-' + z + c.slice(1);
else
c = z + c;
}
}
}
N.push(c);
}
} else {
N = concatMap(n, function(el) { return expand(el, false) });
}
for (var j = 0; j < N.length; j++) {
for (var k = 0; k < post.length; k++) {
var expansion = pre + N[j] + post[k];
if (!isTop || isSequence || expansion)
expansions.push(expansion);
}
}
return expansions;
}

View File

@@ -0,0 +1,47 @@
{
"name": "brace-expansion",
"description": "Brace expansion as known from sh/bash",
"version": "1.1.11",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/brace-expansion.git"
},
"homepage": "https://github.com/juliangruber/brace-expansion",
"main": "index.js",
"scripts": {
"test": "tape test/*.js",
"gentest": "bash test/generate.sh",
"bench": "matcha test/perf/bench.js"
},
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
},
"devDependencies": {
"matcha": "^0.7.0",
"tape": "^4.6.0"
},
"keywords": [],
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
"url": "http://juliangruber.com"
},
"license": "MIT",
"testling": {
"files": "test/*.js",
"browsers": [
"ie/8..latest",
"firefox/20..latest",
"firefox/nightly",
"chrome/25..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
}
}

View File

@@ -0,0 +1,15 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -0,0 +1,230 @@
# minimatch
A minimal matching utility.
[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch)
This is the matching library used internally by npm.
It works by converting glob expressions into JavaScript `RegExp`
objects.
## Usage
```javascript
var minimatch = require("minimatch")
minimatch("bar.foo", "*.foo") // true!
minimatch("bar.foo", "*.bar") // false!
minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
```
## Features
Supports these glob features:
* Brace Expansion
* Extended glob matching
* "Globstar" `**` matching
See:
* `man sh`
* `man bash`
* `man 3 fnmatch`
* `man 5 gitignore`
## Minimatch Class
Create a minimatch object by instantiating the `minimatch.Minimatch` class.
```javascript
var Minimatch = require("minimatch").Minimatch
var mm = new Minimatch(pattern, options)
```
### Properties
* `pattern` The original pattern the minimatch object represents.
* `options` The options supplied to the constructor.
* `set` A 2-dimensional array of regexp or string expressions.
Each row in the
array corresponds to a brace-expanded pattern. Each item in the row
corresponds to a single path-part. For example, the pattern
`{a,b/c}/d` would expand to a set of patterns like:
[ [ a, d ]
, [ b, c, d ] ]
If a portion of the pattern doesn't have any "magic" in it
(that is, it's something like `"foo"` rather than `fo*o?`), then it
will be left as a string rather than converted to a regular
expression.
* `regexp` Created by the `makeRe` method. A single regular expression
expressing the entire pattern. This is useful in cases where you wish
to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
* `negate` True if the pattern is negated.
* `comment` True if the pattern is a comment.
* `empty` True if the pattern is `""`.
### Methods
* `makeRe` Generate the `regexp` member if necessary, and return it.
Will return `false` if the pattern is invalid.
* `match(fname)` Return true if the filename matches the pattern, or
false otherwise.
* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
filename, and match it against a single row in the `regExpSet`. This
method is mainly for internal use, but is exposed so that it can be
used by a glob-walker that needs to avoid excessive filesystem calls.
All other methods are internal, and will be called as necessary.
### minimatch(path, pattern, options)
Main export. Tests a path against the pattern using the options.
```javascript
var isJS = minimatch(file, "*.js", { matchBase: true })
```
### minimatch.filter(pattern, options)
Returns a function that tests its
supplied argument, suitable for use with `Array.filter`. Example:
```javascript
var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
```
### minimatch.match(list, pattern, options)
Match against the list of
files, in the style of fnmatch or glob. If nothing is matched, and
options.nonull is set, then return a list containing the pattern itself.
```javascript
var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
```
### minimatch.makeRe(pattern, options)
Make a regular expression object from the pattern.
## Options
All options are `false` by default.
### debug
Dump a ton of stuff to stderr.
### nobrace
Do not expand `{a,b}` and `{1..3}` brace sets.
### noglobstar
Disable `**` matching against multiple folder names.
### dot
Allow patterns to match filenames starting with a period, even if
the pattern does not explicitly have a period in that spot.
Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
is set.
### noext
Disable "extglob" style patterns like `+(a|b)`.
### nocase
Perform a case-insensitive match.
### nonull
When a match is not found by `minimatch.match`, return a list containing
the pattern itself if this option is set. When not set, an empty list
is returned if there are no matches.
### matchBase
If set, then patterns without slashes will be matched
against the basename of the path if it contains slashes. For example,
`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
### nocomment
Suppress the behavior of treating `#` at the start of a pattern as a
comment.
### nonegate
Suppress the behavior of treating a leading `!` character as negation.
### flipNegate
Returns from negate expressions the same as if they were not negated.
(Ie, true on a hit, false on a miss.)
### partial
Compare a partial path to a pattern. As long as the parts of the path that
are present are not contradicted by the pattern, it will be treated as a
match. This is useful in applications where you're walking through a
folder structure, and don't yet have the full path, but want to ensure that
you do not walk down paths that can never be a match.
For example,
```js
minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d
minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
```
### allowWindowsEscape
Windows path separator `\` is by default converted to `/`, which
prohibits the usage of `\` as a escape character. This flag skips that
behavior and allows using the escape character.
## Comparisons to other fnmatch/glob implementations
While strict compliance with the existing standards is a worthwhile
goal, some discrepancies exist between minimatch and other
implementations, and are intentional.
If the pattern starts with a `!` character, then it is negated. Set the
`nonegate` flag to suppress this behavior, and treat leading `!`
characters normally. This is perhaps relevant if you wish to start the
pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
characters at the start of a pattern will negate the pattern multiple
times.
If a pattern starts with `#`, then it is treated as a comment, and
will not match anything. Use `\#` to match a literal `#` at the
start of a line, or set the `nocomment` flag to suppress this behavior.
The double-star character `**` is supported by default, unless the
`noglobstar` flag is set. This is supported in the manner of bsdglob
and bash 4.1, where `**` only has special significance if it is the only
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
`a/**b` will not.
If an escaped pattern has no matches, and the `nonull` flag is set,
then minimatch.match returns the pattern as-provided, rather than
interpreting the character escapes. For example,
`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
that it does not resolve escaped pattern characters.
If brace expansion is not disabled, then it is performed before any
other interpretation of the glob pattern. Thus, a pattern like
`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
checked for validity. Since those two are valid, matching proceeds.

View File

@@ -0,0 +1,947 @@
module.exports = minimatch
minimatch.Minimatch = Minimatch
var path = (function () { try { return require('path') } catch (e) {}}()) || {
sep: '/'
}
minimatch.sep = path.sep
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
var expand = require('brace-expansion')
var plTypes = {
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
'?': { open: '(?:', close: ')?' },
'+': { open: '(?:', close: ')+' },
'*': { open: '(?:', close: ')*' },
'@': { open: '(?:', close: ')' }
}
// any single thing other than /
// don't need to escape / when using new RegExp()
var qmark = '[^/]'
// * => any number of characters
var star = qmark + '*?'
// ** when dots are allowed. Anything goes, except .. and .
// not (^ or / followed by one or two dots followed by $ or /),
// followed by anything, any number of times.
var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
// not a ^ or / followed by a dot,
// followed by anything, any number of times.
var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
// characters that need to be escaped in RegExp.
var reSpecials = charSet('().*{}+?[]^$\\!')
// "abc" -> { a:true, b:true, c:true }
function charSet (s) {
return s.split('').reduce(function (set, c) {
set[c] = true
return set
}, {})
}
// normalizes slashes.
var slashSplit = /\/+/
minimatch.filter = filter
function filter (pattern, options) {
options = options || {}
return function (p, i, list) {
return minimatch(p, pattern, options)
}
}
function ext (a, b) {
b = b || {}
var t = {}
Object.keys(a).forEach(function (k) {
t[k] = a[k]
})
Object.keys(b).forEach(function (k) {
t[k] = b[k]
})
return t
}
minimatch.defaults = function (def) {
if (!def || typeof def !== 'object' || !Object.keys(def).length) {
return minimatch
}
var orig = minimatch
var m = function minimatch (p, pattern, options) {
return orig(p, pattern, ext(def, options))
}
m.Minimatch = function Minimatch (pattern, options) {
return new orig.Minimatch(pattern, ext(def, options))
}
m.Minimatch.defaults = function defaults (options) {
return orig.defaults(ext(def, options)).Minimatch
}
m.filter = function filter (pattern, options) {
return orig.filter(pattern, ext(def, options))
}
m.defaults = function defaults (options) {
return orig.defaults(ext(def, options))
}
m.makeRe = function makeRe (pattern, options) {
return orig.makeRe(pattern, ext(def, options))
}
m.braceExpand = function braceExpand (pattern, options) {
return orig.braceExpand(pattern, ext(def, options))
}
m.match = function (list, pattern, options) {
return orig.match(list, pattern, ext(def, options))
}
return m
}
Minimatch.defaults = function (def) {
return minimatch.defaults(def).Minimatch
}
function minimatch (p, pattern, options) {
assertValidPattern(pattern)
if (!options) options = {}
// shortcut: comments match nothing.
if (!options.nocomment && pattern.charAt(0) === '#') {
return false
}
return new Minimatch(pattern, options).match(p)
}
function Minimatch (pattern, options) {
if (!(this instanceof Minimatch)) {
return new Minimatch(pattern, options)
}
assertValidPattern(pattern)
if (!options) options = {}
pattern = pattern.trim()
// windows support: need to use /, not \
if (!options.allowWindowsEscape && path.sep !== '/') {
pattern = pattern.split(path.sep).join('/')
}
this.options = options
this.set = []
this.pattern = pattern
this.regexp = null
this.negate = false
this.comment = false
this.empty = false
this.partial = !!options.partial
// make the set of regexps etc.
this.make()
}
Minimatch.prototype.debug = function () {}
Minimatch.prototype.make = make
function make () {
var pattern = this.pattern
var options = this.options
// empty patterns and comments match nothing.
if (!options.nocomment && pattern.charAt(0) === '#') {
this.comment = true
return
}
if (!pattern) {
this.empty = true
return
}
// step 1: figure out negation, etc.
this.parseNegate()
// step 2: expand braces
var set = this.globSet = this.braceExpand()
if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
this.debug(this.pattern, set)
// step 3: now we have a set, so turn each one into a series of path-portion
// matching patterns.
// These will be regexps, except in the case of "**", which is
// set to the GLOBSTAR object for globstar behavior,
// and will not contain any / characters
set = this.globParts = set.map(function (s) {
return s.split(slashSplit)
})
this.debug(this.pattern, set)
// glob --> regexps
set = set.map(function (s, si, set) {
return s.map(this.parse, this)
}, this)
this.debug(this.pattern, set)
// filter out everything that didn't compile properly.
set = set.filter(function (s) {
return s.indexOf(false) === -1
})
this.debug(this.pattern, set)
this.set = set
}
Minimatch.prototype.parseNegate = parseNegate
function parseNegate () {
var pattern = this.pattern
var negate = false
var options = this.options
var negateOffset = 0
if (options.nonegate) return
for (var i = 0, l = pattern.length
; i < l && pattern.charAt(i) === '!'
; i++) {
negate = !negate
negateOffset++
}
if (negateOffset) this.pattern = pattern.substr(negateOffset)
this.negate = negate
}
// Brace expansion:
// a{b,c}d -> abd acd
// a{b,}c -> abc ac
// a{0..3}d -> a0d a1d a2d a3d
// a{b,c{d,e}f}g -> abg acdfg acefg
// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
//
// Invalid sets are not expanded.
// a{2..}b -> a{2..}b
// a{b}c -> a{b}c
minimatch.braceExpand = function (pattern, options) {
return braceExpand(pattern, options)
}
Minimatch.prototype.braceExpand = braceExpand
function braceExpand (pattern, options) {
if (!options) {
if (this instanceof Minimatch) {
options = this.options
} else {
options = {}
}
}
pattern = typeof pattern === 'undefined'
? this.pattern : pattern
assertValidPattern(pattern)
// Thanks to Yeting Li <https://github.com/yetingli> for
// improving this regexp to avoid a ReDOS vulnerability.
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
// shortcut. no need to expand.
return [pattern]
}
return expand(pattern)
}
var MAX_PATTERN_LENGTH = 1024 * 64
var assertValidPattern = function (pattern) {
if (typeof pattern !== 'string') {
throw new TypeError('invalid pattern')
}
if (pattern.length > MAX_PATTERN_LENGTH) {
throw new TypeError('pattern is too long')
}
}
// parse a component of the expanded set.
// At this point, no pattern may contain "/" in it
// so we're going to return a 2d array, where each entry is the full
// pattern, split on '/', and then turned into a regular expression.
// A regexp is made at the end which joins each array with an
// escaped /, and another full one which joins each regexp with |.
//
// Following the lead of Bash 4.1, note that "**" only has special meaning
// when it is the *only* thing in a path portion. Otherwise, any series
// of * is equivalent to a single *. Globstar behavior is enabled by
// default, and can be disabled by setting options.noglobstar.
Minimatch.prototype.parse = parse
var SUBPARSE = {}
function parse (pattern, isSub) {
assertValidPattern(pattern)
var options = this.options
// shortcuts
if (pattern === '**') {
if (!options.noglobstar)
return GLOBSTAR
else
pattern = '*'
}
if (pattern === '') return ''
var re = ''
var hasMagic = !!options.nocase
var escaping = false
// ? => one single character
var patternListStack = []
var negativeLists = []
var stateChar
var inClass = false
var reClassStart = -1
var classStart = -1
// . and .. never match anything that doesn't start with .,
// even when options.dot is set.
var patternStart = pattern.charAt(0) === '.' ? '' // anything
// not (start or / followed by . or .. followed by / or end)
: options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
: '(?!\\.)'
var self = this
function clearStateChar () {
if (stateChar) {
// we had some state-tracking character
// that wasn't consumed by this pass.
switch (stateChar) {
case '*':
re += star
hasMagic = true
break
case '?':
re += qmark
hasMagic = true
break
default:
re += '\\' + stateChar
break
}
self.debug('clearStateChar %j %j', stateChar, re)
stateChar = false
}
}
for (var i = 0, len = pattern.length, c
; (i < len) && (c = pattern.charAt(i))
; i++) {
this.debug('%s\t%s %s %j', pattern, i, re, c)
// skip over any that are escaped.
if (escaping && reSpecials[c]) {
re += '\\' + c
escaping = false
continue
}
switch (c) {
/* istanbul ignore next */
case '/': {
// completely not allowed, even escaped.
// Should already be path-split by now.
return false
}
case '\\':
clearStateChar()
escaping = true
continue
// the various stateChar values
// for the "extglob" stuff.
case '?':
case '*':
case '+':
case '@':
case '!':
this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
// all of those are literals inside a class, except that
// the glob [!a] means [^a] in regexp
if (inClass) {
this.debug(' in class')
if (c === '!' && i === classStart + 1) c = '^'
re += c
continue
}
// if we already have a stateChar, then it means
// that there was something like ** or +? in there.
// Handle the stateChar, then proceed with this one.
self.debug('call clearStateChar %j', stateChar)
clearStateChar()
stateChar = c
// if extglob is disabled, then +(asdf|foo) isn't a thing.
// just clear the statechar *now*, rather than even diving into
// the patternList stuff.
if (options.noext) clearStateChar()
continue
case '(':
if (inClass) {
re += '('
continue
}
if (!stateChar) {
re += '\\('
continue
}
patternListStack.push({
type: stateChar,
start: i - 1,
reStart: re.length,
open: plTypes[stateChar].open,
close: plTypes[stateChar].close
})
// negation is (?:(?!js)[^/]*)
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
this.debug('plType %j %j', stateChar, re)
stateChar = false
continue
case ')':
if (inClass || !patternListStack.length) {
re += '\\)'
continue
}
clearStateChar()
hasMagic = true
var pl = patternListStack.pop()
// negation is (?:(?!js)[^/]*)
// The others are (?:<pattern>)<type>
re += pl.close
if (pl.type === '!') {
negativeLists.push(pl)
}
pl.reEnd = re.length
continue
case '|':
if (inClass || !patternListStack.length || escaping) {
re += '\\|'
escaping = false
continue
}
clearStateChar()
re += '|'
continue
// these are mostly the same in regexp and glob
case '[':
// swallow any state-tracking char before the [
clearStateChar()
if (inClass) {
re += '\\' + c
continue
}
inClass = true
classStart = i
reClassStart = re.length
re += c
continue
case ']':
// a right bracket shall lose its special
// meaning and represent itself in
// a bracket expression if it occurs
// first in the list. -- POSIX.2 2.8.3.2
if (i === classStart + 1 || !inClass) {
re += '\\' + c
escaping = false
continue
}
// handle the case where we left a class open.
// "[z-a]" is valid, equivalent to "\[z-a\]"
// split where the last [ was, make sure we don't have
// an invalid re. if so, re-walk the contents of the
// would-be class to re-translate any characters that
// were passed through as-is
// TODO: It would probably be faster to determine this
// without a try/catch and a new RegExp, but it's tricky
// to do safely. For now, this is safe and works.
var cs = pattern.substring(classStart + 1, i)
try {
RegExp('[' + cs + ']')
} catch (er) {
// not a valid class!
var sp = this.parse(cs, SUBPARSE)
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
hasMagic = hasMagic || sp[1]
inClass = false
continue
}
// finish up the class.
hasMagic = true
inClass = false
re += c
continue
default:
// swallow any state char that wasn't consumed
clearStateChar()
if (escaping) {
// no need
escaping = false
} else if (reSpecials[c]
&& !(c === '^' && inClass)) {
re += '\\'
}
re += c
} // switch
} // for
// handle the case where we left a class open.
// "[abc" is valid, equivalent to "\[abc"
if (inClass) {
// split where the last [ was, and escape it
// this is a huge pita. We now have to re-walk
// the contents of the would-be class to re-translate
// any characters that were passed through as-is
cs = pattern.substr(classStart + 1)
sp = this.parse(cs, SUBPARSE)
re = re.substr(0, reClassStart) + '\\[' + sp[0]
hasMagic = hasMagic || sp[1]
}
// handle the case where we had a +( thing at the *end*
// of the pattern.
// each pattern list stack adds 3 chars, and we need to go through
// and escape any | chars that were passed through as-is for the regexp.
// Go through and escape them, taking care not to double-escape any
// | chars that were already escaped.
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
var tail = re.slice(pl.reStart + pl.open.length)
this.debug('setting tail', re, pl)
// maybe some even number of \, then maybe 1 \, followed by a |
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
if (!$2) {
// the | isn't already escaped, so escape it.
$2 = '\\'
}
// need to escape all those slashes *again*, without escaping the
// one that we need for escaping the | character. As it works out,
// escaping an even number of slashes can be done by simply repeating
// it exactly after itself. That's why this trick works.
//
// I am sorry that you have to see this.
return $1 + $1 + $2 + '|'
})
this.debug('tail=%j\n %s', tail, tail, pl, re)
var t = pl.type === '*' ? star
: pl.type === '?' ? qmark
: '\\' + pl.type
hasMagic = true
re = re.slice(0, pl.reStart) + t + '\\(' + tail
}
// handle trailing things that only matter at the very end.
clearStateChar()
if (escaping) {
// trailing \\
re += '\\\\'
}
// only need to apply the nodot start if the re starts with
// something that could conceivably capture a dot
var addPatternStart = false
switch (re.charAt(0)) {
case '[': case '.': case '(': addPatternStart = true
}
// Hack to work around lack of negative lookbehind in JS
// A pattern like: *.!(x).!(y|z) needs to ensure that a name
// like 'a.xyz.yz' doesn't match. So, the first negative
// lookahead, has to look ALL the way ahead, to the end of
// the pattern.
for (var n = negativeLists.length - 1; n > -1; n--) {
var nl = negativeLists[n]
var nlBefore = re.slice(0, nl.reStart)
var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
var nlAfter = re.slice(nl.reEnd)
nlLast += nlAfter
// Handle nested stuff like *(*.js|!(*.json)), where open parens
// mean that we should *not* include the ) in the bit that is considered
// "after" the negated section.
var openParensBefore = nlBefore.split('(').length - 1
var cleanAfter = nlAfter
for (i = 0; i < openParensBefore; i++) {
cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
}
nlAfter = cleanAfter
var dollar = ''
if (nlAfter === '' && isSub !== SUBPARSE) {
dollar = '$'
}
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
re = newRe
}
// if the re is not "" at this point, then we need to make sure
// it doesn't match against an empty path part.
// Otherwise a/* will match a/, which it should not.
if (re !== '' && hasMagic) {
re = '(?=.)' + re
}
if (addPatternStart) {
re = patternStart + re
}
// parsing just a piece of a larger pattern.
if (isSub === SUBPARSE) {
return [re, hasMagic]
}
// skip the regexp for non-magical patterns
// unescape anything in it, though, so that it'll be
// an exact match against a file etc.
if (!hasMagic) {
return globUnescape(pattern)
}
var flags = options.nocase ? 'i' : ''
try {
var regExp = new RegExp('^' + re + '$', flags)
} catch (er) /* istanbul ignore next - should be impossible */ {
// If it was an invalid regular expression, then it can't match
// anything. This trick looks for a character after the end of
// the string, which is of course impossible, except in multi-line
// mode, but it's not a /m regex.
return new RegExp('$.')
}
regExp._glob = pattern
regExp._src = re
return regExp
}
minimatch.makeRe = function (pattern, options) {
return new Minimatch(pattern, options || {}).makeRe()
}
Minimatch.prototype.makeRe = makeRe
function makeRe () {
if (this.regexp || this.regexp === false) return this.regexp
// at this point, this.set is a 2d array of partial
// pattern strings, or "**".
//
// It's better to use .match(). This function shouldn't
// be used, really, but it's pretty convenient sometimes,
// when you just want to work with a regex.
var set = this.set
if (!set.length) {
this.regexp = false
return this.regexp
}
var options = this.options
var twoStar = options.noglobstar ? star
: options.dot ? twoStarDot
: twoStarNoDot
var flags = options.nocase ? 'i' : ''
var re = set.map(function (pattern) {
return pattern.map(function (p) {
return (p === GLOBSTAR) ? twoStar
: (typeof p === 'string') ? regExpEscape(p)
: p._src
}).join('\\\/')
}).join('|')
// must match entire pattern
// ending in a * or ** will make it less strict.
re = '^(?:' + re + ')$'
// can match anything, as long as it's not this.
if (this.negate) re = '^(?!' + re + ').*$'
try {
this.regexp = new RegExp(re, flags)
} catch (ex) /* istanbul ignore next - should be impossible */ {
this.regexp = false
}
return this.regexp
}
minimatch.match = function (list, pattern, options) {
options = options || {}
var mm = new Minimatch(pattern, options)
list = list.filter(function (f) {
return mm.match(f)
})
if (mm.options.nonull && !list.length) {
list.push(pattern)
}
return list
}
Minimatch.prototype.match = function match (f, partial) {
if (typeof partial === 'undefined') partial = this.partial
this.debug('match', f, this.pattern)
// short-circuit in the case of busted things.
// comments, etc.
if (this.comment) return false
if (this.empty) return f === ''
if (f === '/' && partial) return true
var options = this.options
// windows: need to use /, not \
if (path.sep !== '/') {
f = f.split(path.sep).join('/')
}
// treat the test path as a set of pathparts.
f = f.split(slashSplit)
this.debug(this.pattern, 'split', f)
// just ONE of the pattern sets in this.set needs to match
// in order for it to be valid. If negating, then just one
// match means that we have failed.
// Either way, return on the first hit.
var set = this.set
this.debug(this.pattern, 'set', set)
// Find the basename of the path by looking for the last non-empty segment
var filename
var i
for (i = f.length - 1; i >= 0; i--) {
filename = f[i]
if (filename) break
}
for (i = 0; i < set.length; i++) {
var pattern = set[i]
var file = f
if (options.matchBase && pattern.length === 1) {
file = [filename]
}
var hit = this.matchOne(file, pattern, partial)
if (hit) {
if (options.flipNegate) return true
return !this.negate
}
}
// didn't get any hits. this is success if it's a negative
// pattern, failure otherwise.
if (options.flipNegate) return false
return this.negate
}
// set partial to true to test if, for example,
// "/a/b" matches the start of "/*/b/*/d"
// Partial means, if you run out of file before you run
// out of pattern, then that's fine, as long as all
// the parts match.
Minimatch.prototype.matchOne = function (file, pattern, partial) {
var options = this.options
this.debug('matchOne',
{ 'this': this, file: file, pattern: pattern })
this.debug('matchOne', file.length, pattern.length)
for (var fi = 0,
pi = 0,
fl = file.length,
pl = pattern.length
; (fi < fl) && (pi < pl)
; fi++, pi++) {
this.debug('matchOne loop')
var p = pattern[pi]
var f = file[fi]
this.debug(pattern, p, f)
// should be impossible.
// some invalid regexp stuff in the set.
/* istanbul ignore if */
if (p === false) return false
if (p === GLOBSTAR) {
this.debug('GLOBSTAR', [pattern, p, f])
// "**"
// a/**/b/**/c would match the following:
// a/b/x/y/z/c
// a/x/y/z/b/c
// a/b/x/b/x/c
// a/b/c
// To do this, take the rest of the pattern after
// the **, and see if it would match the file remainder.
// If so, return success.
// If not, the ** "swallows" a segment, and try again.
// This is recursively awful.
//
// a/**/b/**/c matching a/b/x/y/z/c
// - a matches a
// - doublestar
// - matchOne(b/x/y/z/c, b/**/c)
// - b matches b
// - doublestar
// - matchOne(x/y/z/c, c) -> no
// - matchOne(y/z/c, c) -> no
// - matchOne(z/c, c) -> no
// - matchOne(c, c) yes, hit
var fr = fi
var pr = pi + 1
if (pr === pl) {
this.debug('** at the end')
// a ** at the end will just swallow the rest.
// We have found a match.
// however, it will not swallow /.x, unless
// options.dot is set.
// . and .. are *never* matched by **, for explosively
// exponential reasons.
for (; fi < fl; fi++) {
if (file[fi] === '.' || file[fi] === '..' ||
(!options.dot && file[fi].charAt(0) === '.')) return false
}
return true
}
// ok, let's see if we can swallow whatever we can.
while (fr < fl) {
var swallowee = file[fr]
this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
// XXX remove this slice. Just pass the start index.
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
this.debug('globstar found match!', fr, fl, swallowee)
// found a match.
return true
} else {
// can't swallow "." or ".." ever.
// can only swallow ".foo" when explicitly asked.
if (swallowee === '.' || swallowee === '..' ||
(!options.dot && swallowee.charAt(0) === '.')) {
this.debug('dot detected!', file, fr, pattern, pr)
break
}
// ** swallows a segment, and continue.
this.debug('globstar swallow a segment, and continue')
fr++
}
}
// no match was found.
// However, in partial mode, we can't say this is necessarily over.
// If there's more *pattern* left, then
/* istanbul ignore if */
if (partial) {
// ran out of file
this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
if (fr === fl) return true
}
return false
}
// something other than **
// non-magic patterns just have to match exactly
// patterns with magic have been turned into regexps.
var hit
if (typeof p === 'string') {
hit = f === p
this.debug('string match', p, f, hit)
} else {
hit = f.match(p)
this.debug('pattern match', p, f, hit)
}
if (!hit) return false
}
// Note: ending in / means that we'll get a final ""
// at the end of the pattern. This can only match a
// corresponding "" at the end of the file.
// If the file ends in /, then it can only match a
// a pattern that ends in /, unless the pattern just
// doesn't have any more for it. But, a/b/ should *not*
// match "a/b/*", even though "" matches against the
// [^/]*? pattern, except in partial mode, where it might
// simply not be reached yet.
// However, a/b/ should still satisfy a/*
// now either we fell off the end of the pattern, or we're done.
if (fi === fl && pi === pl) {
// ran out of pattern and filename at the same time.
// an exact hit!
return true
} else if (fi === fl) {
// ran out of file, but still had pattern left.
// this is ok if we're doing the match as part of
// a glob fs traversal.
return partial
} else /* istanbul ignore else */ if (pi === pl) {
// ran out of pattern, still have file left.
// this is only acceptable if we're on the very last
// empty segment of a file with a trailing slash.
// a/* should match a/b/
return (fi === fl - 1) && (file[fi] === '')
}
// should be unreachable.
/* istanbul ignore next */
throw new Error('wtf?')
}
// replace stuff like \* with *
function globUnescape (s) {
return s.replace(/\\(.)/g, '$1')
}
function regExpEscape (s) {
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
}

View File

@@ -0,0 +1,33 @@
{
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"name": "minimatch",
"description": "a glob matcher in javascript",
"version": "3.1.2",
"publishConfig": {
"tag": "v3-legacy"
},
"repository": {
"type": "git",
"url": "git://github.com/isaacs/minimatch.git"
},
"main": "minimatch.js",
"scripts": {
"test": "tap",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --all; git push origin --tags"
},
"engines": {
"node": "*"
},
"dependencies": {
"brace-expansion": "^1.1.7"
},
"devDependencies": {
"tap": "^15.1.6"
},
"license": "ISC",
"files": [
"minimatch.js"
]
}

156
front/app/node_modules/karma-coverage/package.json generated vendored Normal file
View File

@@ -0,0 +1,156 @@
{
"name": "karma-coverage",
"version": "2.2.0",
"description": "A Karma plugin. Generate code coverage.",
"main": "lib/index.js",
"scripts": {
"lint": "eslint **/*.js",
"test": "mocha",
"update-contributors": "grunt contributors",
"examples": "grunt karma",
"semantic-release": "semantic-release",
"release": "npm run update-contributors && semantic-release",
"commitlint": "commitlint"
},
"repository": {
"type": "git",
"url": "git://github.com/karma-runner/karma-coverage.git"
},
"keywords": [
"karma-plugin",
"karma-preprocessor",
"karma-reporter",
"coverage",
"istanbul"
],
"author": "SATO taichi <ryushi@gmail.com>",
"dependencies": {
"istanbul-lib-coverage": "^3.2.0",
"istanbul-lib-instrument": "^5.1.0",
"istanbul-lib-report": "^3.0.0",
"istanbul-lib-source-maps": "^4.0.1",
"istanbul-reports": "^3.0.5",
"minimatch": "^3.0.4"
},
"license": "MIT",
"devDependencies": {
"@commitlint/cli": "^8.3.6",
"@commitlint/config-conventional": "^8.3.6",
"@commitlint/travis-cli": "^8.3.6",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/npm": "^7.0.5",
"chai": "^4.3.4",
"coffeescript": "^2.6.1",
"eslint": "^6.5.1",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^4.1.0",
"grunt": "^1.4.1",
"grunt-cli": "^1.4.3",
"grunt-karma": "^3.0.2",
"grunt-npm": "^0.0.2",
"husky": "^4.3.8",
"ibrik": "^2.0.0",
"karma": "^4.2.0",
"karma-coffee-preprocessor": "^1.0.1",
"karma-firefox-launcher": "1.x || ^0.1.6",
"karma-mocha": "^2.0.1",
"karma-requirejs": "1.x || ^0.2.2",
"mocha": "^7.2.0",
"mocks": "0.0.15",
"requirejs": "^2.1.20",
"semantic-release": "^17.0.1",
"sinon": "^7.2.7",
"sinon-chai": "^3.7.0"
},
"engines": {
"node": ">=10.0.0"
},
"mocha": {
"ui": "bdd",
"require": [
"test/mocha-globals.js"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"contributors": [
"dignifiedquire <dignifiedquire@gmail.com>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Aymeric Beaumet <aymeric@beaumet.me>",
"Anton <anton.redfox@gmail.com>",
"johnjbarton <johnjbarton@johnjbarton.com>",
"dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>",
"Jonathan Ginsburg <jon@than.ml>",
"Mark Ethan Trostler <mark@zzo.com>",
"Tim Kang <timkang@ucla.edu>",
"hicom150 <hicom150@gmail.com>",
"Anton Shchekota <anton.redfox@gmail.com>",
"Maksim Ryzhikov <rv.maksim@gmail.com>",
"Nick Malaguti <nmalaguti@palantir.com>",
"semantic-release-bot <semantic-release-bot@martynus.net>",
"Mark Trostler <mark@zzo.com>",
"nicojs <jansennico@gmail.com>",
"Allen Bierbaum <abierbaum@gmail.com>",
"Douglas Duteil <douglasduteil@gmail.com>",
"Julen Garcia Leunda <hicom150@gmail.com>",
"Matt Winchester <m_winche@yahoo.com>",
"Srinivas Dhanwada <dhanwada.dev@gmail.com>",
"Tanguy Krotoff <tkrotoff@gmail.com>",
"Wei Kin Huang <weikin.huang04@gmail.com>",
"Yaroslav Admin <devoto13@gmail.com>",
"Adam Heath <adam-h@users.noreply.github.com>",
"Andrew Lane <AndrewLane@users.noreply.github.com>",
"Chris Gladd <chris.m.gladd@gmail.com>",
"Clayton Watts <cletusw@gmail.com>",
"Dan Watling <dan@synaptik.com>",
"Darryl Pogue <darryl@dpogue.ca>",
"Diogo Nicoleti <diogo.nicoleti@gmail.com>",
"Dmitry Petrov <dpetroff@gmail.com>",
"Greg Varsanyi <gvarsanyi@gmail.com>",
"Ian Rufus <ian.j.rufus@gmail.com>",
"James Talmage <james@talmage.io>",
"Joseph Connolly <joec@avinetworks.com>",
"Joshua Appelman <jappelman@xebia.com>",
"Julie <ju.ralph@gmail.com>",
"Kyle Welsby <kyle@mekyle.com>",
"Lloyd Smith II <lloyd@trove.com>",
"Maciej Rzepiński <maciej.rzepinski@gmail.com>",
"Marceli.no <me@marceli.no>",
"Matt Lewis <matthew.lewis@socialsignin.co.uk>",
"Michael Noack <michael.noack@sealink.com.au>",
"Michael Stramel <m.stramel89@gmail.com>",
"Nick Matantsev <nick.matantsev@gmail.com>",
"Petar Manev <petar.manev2010@gmail.com>",
"Robin Böhm <robinboehm@googlemail.com>",
"Ron Derksen <ron.derksen@informaat.nl>",
"Ruben Bridgewater <ruben.bridgewater@fintura.de>",
"Sahat Yalkabov <sakhat@gmail.com>",
"Tanjo, Hiroyuki <expheno@gmail.com>",
"Taylor Hakes <taylor@taylorhakes.com>",
"Taylor McGann <tmcgann@users.noreply.github.com>",
"Tim van der Lippe <tvanderlippe@google.com>",
"Timo Tijhof <krinklemail@gmail.com>",
"Tom Kirkpatrick <tom@systemseed.com>",
"Tyler Waters <tyler.waters@gmail.com>",
"Vincent Lemeunier <vincent.lemeunier+git@gmail.com>",
"Yusuke Suzuki <utatane.tea@gmail.com>",
"abbr <abbr@users.noreply.github.com>",
"aprooks <alexander.prooks@gmail.com>",
"carlos <cafesanu@gmail.com>",
"fbergr <fbergr@gmail.com>",
"piecyk <piecyk@gmail.com>",
"terussell85 <terussell85@gmail.com>"
]
}

View File

@@ -0,0 +1,24 @@
module.exports = {
debug: true,
branches: 'master',
verifyConditions: [
'@semantic-release/changelog',
'@semantic-release/github',
'@semantic-release/npm'
],
prepare: [
'@semantic-release/changelog',
'@semantic-release/git',
'@semantic-release/npm'
],
publish: [
'@semantic-release/github',
'@semantic-release/npm'
],
success: [
'@semantic-release/github'
],
fail: [
'@semantic-release/github'
]
}