js-build-tools 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addToReadme.js +1 -10
- package/dist/build.js +1 -11
- package/dist/bundle.js +1 -5
- package/dist/bundleLint.js +1 -5
- package/dist/bundleMinify.js +1 -6
- package/dist/clean.js +4 -6
- package/dist/compileReadme.js +1 -3
- package/dist/default.js +1 -4
- package/dist/dist.js +1 -2
- package/dist/distFor.js +1 -4
- package/dist/distLint.js +1 -4
- package/dist/distMinify.js +1 -5
- package/dist/readmeTemplate.js +1 -4
- package/dist/testFull.js +3 -32
- package/dist/testFull.min.js +1 -1
- package/dist/testHelpers.js +7 -11
- package/dist/testQuick.js +3 -32
- package/dist/testQuick.min.js +1 -1
- package/dist/watchFull.js +1 -13
- package/dist/watchTest.js +1 -4
- package/functions/clean.js +10 -10
- package/package.json +1 -1
package/dist/addToReadme.js
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/es.array.map.js')
|
|
4
|
-
|
|
5
4
|
require('core-js/modules/esnext.async-iterator.map.js')
|
|
6
|
-
|
|
7
5
|
require('core-js/modules/esnext.iterator.map.js')
|
|
8
|
-
|
|
9
6
|
require('core-js/modules/es.array.concat.js')
|
|
10
|
-
|
|
11
7
|
var filenames = require('gulp-filenames')
|
|
12
|
-
|
|
13
8
|
var fs = require('fs')
|
|
14
|
-
|
|
15
9
|
var gulpConfig = require('../gulp.config.js')
|
|
16
|
-
|
|
17
10
|
var jsdoc2md = require('jsdoc-to-markdown')
|
|
18
|
-
|
|
19
11
|
var _require = require('gulp')
|
|
20
12
|
var src = _require.src
|
|
13
|
+
|
|
21
14
|
/**
|
|
22
15
|
* Appends all the jsdoc comments to the readme file. Assumes empty or templated file.
|
|
23
16
|
* @returns {string|Uint8Array}
|
|
24
17
|
*/
|
|
25
|
-
|
|
26
18
|
var addToReadme = function addToReadme () {
|
|
27
19
|
return src(gulpConfig.srcSearch).pipe(filenames('readme')).on('end', function () {
|
|
28
20
|
var readme = jsdoc2md.renderSync({
|
|
@@ -34,5 +26,4 @@ var addToReadme = function addToReadme () {
|
|
|
34
26
|
return readme
|
|
35
27
|
})
|
|
36
28
|
}
|
|
37
|
-
|
|
38
29
|
module.exports = addToReadme
|
package/dist/build.js
CHANGED
|
@@ -1,32 +1,22 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
var bundle = require('./bundle')
|
|
4
|
-
|
|
5
4
|
var bundleLint = require('./bundleLint')
|
|
6
|
-
|
|
7
5
|
var bundleMinify = require('./bundleMinify')
|
|
8
|
-
|
|
9
6
|
var clean = require('./clean')
|
|
10
|
-
|
|
11
7
|
var compileReadme = require('./compileReadme')
|
|
12
|
-
|
|
13
8
|
var dist = require('./dist')
|
|
14
|
-
|
|
15
9
|
var distLint = require('./distLint')
|
|
16
|
-
|
|
17
10
|
var distMinify = require('./distMinify')
|
|
18
|
-
|
|
19
11
|
var _require = require('gulp')
|
|
20
12
|
var parallel = _require.parallel
|
|
21
13
|
var series = _require.series
|
|
22
|
-
|
|
23
14
|
var gulpConfig = require('../gulp.config.js')
|
|
24
|
-
|
|
25
15
|
var testFull = require('./testFull')
|
|
16
|
+
|
|
26
17
|
/**
|
|
27
18
|
* Runs several processes to build and validate the project.
|
|
28
19
|
* Cleans, distributes (lint and minify), bundles (lint and minify), creates the readme, then runs the tests.
|
|
29
20
|
*/
|
|
30
|
-
|
|
31
21
|
var build = parallel(gulpConfig.nodeOnly ? series(clean, dist, parallel(distLint, distMinify)) : series(clean, dist, parallel(distLint, distMinify), bundle, parallel(bundleLint, bundleMinify)), compileReadme, testFull)
|
|
32
22
|
module.exports = build
|
package/dist/bundle.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
var browserify = require('browserify')
|
|
4
|
-
|
|
5
4
|
var _require = require('gulp')
|
|
6
5
|
var dest = _require.dest
|
|
7
|
-
|
|
8
6
|
var gulpConfig = require('../gulp.config.js')
|
|
9
|
-
|
|
10
7
|
var source = require('vinyl-source-stream')
|
|
8
|
+
|
|
11
9
|
/**
|
|
12
10
|
* Starting at the distribution entry point, bundle all the files into a single file and store them in the specified output directory.
|
|
13
11
|
* @returns {*}
|
|
14
12
|
*/
|
|
15
|
-
|
|
16
13
|
var bundle = function bundle () {
|
|
17
14
|
return browserify(gulpConfig.distMain).bundle().pipe(source(''.concat(gulpConfig.browserName, '.js'))).pipe(dest(gulpConfig.browserPath))
|
|
18
15
|
}
|
|
19
|
-
|
|
20
16
|
module.exports = bundle
|
package/dist/bundleLint.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/es.array.concat.js')
|
|
4
|
-
|
|
5
4
|
var _require = require('gulp')
|
|
6
5
|
var dest = _require.dest
|
|
7
6
|
var src = _require.src
|
|
8
|
-
|
|
9
7
|
var gulpConfig = require('../gulp.config.js')
|
|
10
|
-
|
|
11
8
|
var standard = require('gulp-standard')
|
|
9
|
+
|
|
12
10
|
/**
|
|
13
11
|
* Applies Standard code style linting to bundled file.
|
|
14
12
|
* @returns {*}
|
|
15
13
|
*/
|
|
16
|
-
|
|
17
14
|
var bundleLint = function bundleLint () {
|
|
18
15
|
return src(''.concat(gulpConfig.browserPath, '/').concat(gulpConfig.browserName, '.js')).pipe(standard({
|
|
19
16
|
fix: true
|
|
@@ -22,5 +19,4 @@ var bundleLint = function bundleLint () {
|
|
|
22
19
|
quiet: true
|
|
23
20
|
})).pipe(dest(gulpConfig.browserPath))
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
module.exports = bundleLint
|
package/dist/bundleMinify.js
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/es.array.concat.js')
|
|
4
|
-
|
|
5
4
|
var _require = require('gulp')
|
|
6
5
|
var dest = _require.dest
|
|
7
6
|
var src = _require.src
|
|
8
|
-
|
|
9
7
|
var gulpConfig = require('../gulp.config.js')
|
|
10
|
-
|
|
11
8
|
var _require2 = require('gulp-uglify-es')
|
|
12
9
|
var uglify = _require2.default
|
|
13
|
-
|
|
14
10
|
var rename = require('gulp-rename')
|
|
11
|
+
|
|
15
12
|
/**
|
|
16
13
|
* Creates the minified bundle file.
|
|
17
14
|
* @returns {*}
|
|
18
15
|
*/
|
|
19
|
-
|
|
20
16
|
var bundleMinify = function bundleMinify () {
|
|
21
17
|
return src(''.concat(gulpConfig.browserPath, '/').concat(gulpConfig.browserName, '.js')).pipe(uglify()).pipe(rename({
|
|
22
18
|
extname: '.min.js'
|
|
23
19
|
})).pipe(dest(gulpConfig.browserPath))
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
module.exports = bundleMinify
|
package/dist/clean.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
var del = require('del')
|
|
4
|
-
|
|
5
4
|
var gulpConfig = require('../gulp.config.js')
|
|
6
|
-
/**
|
|
7
|
-
* Deletes all the distribution and browser files (used before create a new build).
|
|
8
|
-
* @returns {Promise<string[]> | *}
|
|
9
|
-
*/
|
|
10
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Deletes all the distribution and browser files (used before create a new build).
|
|
8
|
+
* @returns {Promise<string[]> | *}
|
|
9
|
+
*/
|
|
11
10
|
var clean = function clean () {
|
|
12
11
|
return del([gulpConfig.distPath, gulpConfig.browserPath])
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
module.exports = clean
|
package/dist/compileReadme.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
var addToReadme = require('./addToReadme')
|
|
4
|
-
|
|
5
4
|
var readmeTemplate = require('./readmeTemplate')
|
|
6
|
-
|
|
7
5
|
var _require = require('gulp')
|
|
8
6
|
var series = _require.series
|
|
7
|
+
|
|
9
8
|
/**
|
|
10
9
|
* Generate the README.md file based off of the template, then append the generated documentation.
|
|
11
10
|
*/
|
|
12
|
-
|
|
13
11
|
var compileReadme = series(readmeTemplate, addToReadme)
|
|
14
12
|
module.exports = compileReadme
|
package/dist/default.js
CHANGED
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var _require = require('gulp')
|
|
4
4
|
var series = _require.series
|
|
5
|
-
|
|
6
5
|
var dist = require('./dist')
|
|
7
|
-
|
|
8
6
|
var bundle = require('./bundle')
|
|
9
|
-
|
|
10
7
|
var gulpConfig = require('../gulp.config')
|
|
8
|
+
|
|
11
9
|
/**
|
|
12
10
|
* Recommended as the default task, runs the simple dist and bundle tasks.
|
|
13
11
|
*/
|
|
14
|
-
|
|
15
12
|
var defaultCmd = gulpConfig.nodeOnly ? series(dist) : series(dist, bundle)
|
|
16
13
|
module.exports = defaultCmd
|
package/dist/dist.js
CHANGED
package/dist/distFor.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
var babel = require('gulp-babel')
|
|
4
|
-
|
|
5
4
|
var _require = require('gulp')
|
|
6
5
|
var dest = _require.dest
|
|
7
6
|
var src = _require.src
|
|
8
|
-
|
|
9
7
|
var gulpConfig = require('../gulp.config.js')
|
|
8
|
+
|
|
10
9
|
/**
|
|
11
10
|
* Build the distribution for a given source pattern.
|
|
12
11
|
* @param {string|array} srcPath
|
|
13
12
|
* @param {string} destPath
|
|
14
13
|
* @returns {*}
|
|
15
14
|
*/
|
|
16
|
-
|
|
17
15
|
var distFor = function distFor () {
|
|
18
16
|
var srcPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : gulpConfig.srcSearch
|
|
19
17
|
var destPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : gulpConfig.distPath
|
|
20
18
|
return src(srcPath).pipe(babel()).pipe(dest(destPath))
|
|
21
19
|
}
|
|
22
|
-
|
|
23
20
|
module.exports = distFor
|
package/dist/distLint.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
var gulpConfig = require('../gulp.config.js')
|
|
4
|
-
|
|
5
4
|
var _require = require('gulp')
|
|
6
5
|
var dest = _require.dest
|
|
7
6
|
var src = _require.src
|
|
8
|
-
|
|
9
7
|
var standard = require('gulp-standard')
|
|
8
|
+
|
|
10
9
|
/**
|
|
11
10
|
* Applies Standard code style linting to distribution files.
|
|
12
11
|
* @returns {*}
|
|
13
12
|
*/
|
|
14
|
-
|
|
15
13
|
var distLint = function distLint () {
|
|
16
14
|
return src(gulpConfig.distSearch).pipe(standard({
|
|
17
15
|
fix: true
|
|
@@ -20,5 +18,4 @@ var distLint = function distLint () {
|
|
|
20
18
|
quiet: true
|
|
21
19
|
})).pipe(dest(gulpConfig.distPath))
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
module.exports = distLint
|
package/dist/distMinify.js
CHANGED
|
@@ -3,22 +3,18 @@
|
|
|
3
3
|
var _require = require('gulp')
|
|
4
4
|
var dest = _require.dest
|
|
5
5
|
var src = _require.src
|
|
6
|
-
|
|
7
6
|
var gulpConfig = require('../gulp.config.js')
|
|
8
|
-
|
|
9
7
|
var _require2 = require('gulp-uglify-es')
|
|
10
8
|
var uglify = _require2.default
|
|
11
|
-
|
|
12
9
|
var rename = require('gulp-rename')
|
|
10
|
+
|
|
13
11
|
/**
|
|
14
12
|
* Creates minified versions of the dist files.
|
|
15
13
|
* @returns {*}
|
|
16
14
|
*/
|
|
17
|
-
|
|
18
15
|
var distMinify = function distMinify () {
|
|
19
16
|
return src(gulpConfig.distSearch).pipe(uglify()).pipe(rename({
|
|
20
17
|
extname: '.min.js'
|
|
21
18
|
})).pipe(dest(gulpConfig.distPath))
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
module.exports = distMinify
|
package/dist/readmeTemplate.js
CHANGED
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
var _require = require('gulp')
|
|
4
4
|
var dest = _require.dest
|
|
5
5
|
var src = _require.src
|
|
6
|
-
|
|
7
6
|
var gulpConfig = require('../gulp.config.js')
|
|
8
|
-
|
|
9
7
|
var rename = require('gulp-rename')
|
|
8
|
+
|
|
10
9
|
/**
|
|
11
10
|
* Copy a readme template into the README.md file.
|
|
12
11
|
* @returns {*}
|
|
13
12
|
*/
|
|
14
|
-
|
|
15
13
|
var readmeTemplate = function readmeTemplate () {
|
|
16
14
|
return src(gulpConfig.readmeTemplate).pipe(rename('README.md')).pipe(dest('.'))
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
module.exports = readmeTemplate
|
package/dist/testFull.js
CHANGED
|
@@ -1,62 +1,37 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
function _typeof (obj) { '@babel/helpers - typeof'; return _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) { return typeof obj } : function (obj) { return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj }, _typeof(obj) }
|
|
4
|
-
|
|
4
|
+
require('core-js/modules/es.object.define-property.js')
|
|
5
5
|
require('core-js/modules/es.symbol.js')
|
|
6
|
-
|
|
7
6
|
require('core-js/modules/es.symbol.description.js')
|
|
8
|
-
|
|
9
7
|
require('core-js/modules/es.symbol.iterator.js')
|
|
10
|
-
|
|
11
8
|
require('core-js/modules/es.array.iterator.js')
|
|
12
|
-
|
|
13
9
|
require('core-js/modules/es.string.iterator.js')
|
|
14
|
-
|
|
15
10
|
require('core-js/modules/web.dom-collections.iterator.js')
|
|
16
|
-
|
|
17
11
|
require('core-js/modules/es.symbol.async-iterator.js')
|
|
18
|
-
|
|
19
12
|
require('core-js/modules/es.symbol.to-string-tag.js')
|
|
20
|
-
|
|
21
13
|
require('core-js/modules/es.json.to-string-tag.js')
|
|
22
|
-
|
|
23
14
|
require('core-js/modules/es.math.to-string-tag.js')
|
|
24
|
-
|
|
25
|
-
require('core-js/modules/es.object.define-property.js')
|
|
26
|
-
|
|
27
15
|
require('core-js/modules/es.object.get-prototype-of.js')
|
|
28
|
-
|
|
29
16
|
require('core-js/modules/esnext.async-iterator.for-each.js')
|
|
30
|
-
|
|
31
17
|
require('core-js/modules/esnext.iterator.constructor.js')
|
|
32
|
-
|
|
33
18
|
require('core-js/modules/esnext.iterator.for-each.js')
|
|
34
|
-
|
|
35
19
|
require('core-js/modules/web.dom-collections.for-each.js')
|
|
36
|
-
|
|
37
20
|
require('core-js/modules/es.object.set-prototype-of.js')
|
|
38
|
-
|
|
39
21
|
require('core-js/modules/es.array.slice.js')
|
|
40
|
-
|
|
41
22
|
require('core-js/modules/es.object.to-string.js')
|
|
42
|
-
|
|
43
23
|
require('core-js/modules/es.promise.js')
|
|
44
|
-
|
|
45
|
-
function _regeneratorRuntime () { 'use strict'; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime () { return exports }; var exports = {}; var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; var $Symbol = typeof Symbol === 'function' ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || '@@iterator'; var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator'; var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; function define (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key] } try { define({}, '') } catch (err) { define = function define (obj, key, value) { return obj[key] = value } } function wrap (innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); return generator._invoke = (function (innerFn, self, context) { var state = 'suspendedStart'; return function (method, arg) { if (state === 'executing') throw new Error('Generator is already running'); if (state === 'completed') { if (method === 'throw') throw arg; return doneResult() } for (context.method = method, context.arg = arg; ;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult } } if (context.method === 'next') context.sent = context._sent = context.arg; else if (context.method === 'throw') { if (state === 'suspendedStart') throw state = 'completed', context.arg; context.dispatchException(context.arg) } else context.method === 'return' && context.abrupt('return', context.arg); state = 'executing'; var record = tryCatch(innerFn, self, context); if (record.type === 'normal') { if (state = context.done ? 'completed' : 'suspendedYield', record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done } } record.type === 'throw' && (state = 'completed', context.method = 'throw', context.arg = record.arg) } } }(innerFn, self, context)), generator } function tryCatch (fn, obj, arg) { try { return { type: 'normal', arg: fn.call(obj, arg) } } catch (err) { return { type: 'throw', arg: err } } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator () {} function GeneratorFunction () {} function GeneratorFunctionPrototype () {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this }); var getProto = Object.getPrototypeOf; var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods (prototype) { ['next', 'throw', 'return'].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg) }) }) } function AsyncIterator (generator, PromiseImpl) { function invoke (method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (record.type !== 'throw') { var result = record.arg; var value = result.value; return value && _typeof(value) == 'object' && hasOwn.call(value, '__await') ? PromiseImpl.resolve(value.__await).then(function (value) { invoke('next', value, resolve, reject) }, function (err) { invoke('throw', err, resolve, reject) }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result) }, function (error) { return invoke('throw', error, resolve, reject) }) } reject(record.arg) } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg () { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject) }) } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg() } } function maybeInvokeDelegate (delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, context.method === 'throw') { if (delegate.iterator.return && (context.method = 'return', context.arg = undefined, maybeInvokeDelegate(delegate, context), context.method === 'throw')) return ContinueSentinel; context.method = 'throw', context.arg = new TypeError("The iterator does not provide a 'throw' method") } return ContinueSentinel } var record = tryCatch(method, delegate.iterator, context.arg); if (record.type === 'throw') return context.method = 'throw', context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, context.method !== 'return' && (context.method = 'next', context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = 'throw', context.arg = new TypeError('iterator result is not an object'), context.delegate = null, ContinueSentinel) } function pushTryEntry (locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry) } function resetTryEntry (entry) { var record = entry.completion || {}; record.type = 'normal', delete record.arg, entry.completion = record } function Context (tryLocsList) { this.tryEntries = [{ tryLoc: 'root' }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0) } function values (iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if (typeof iterable.next === 'function') return iterable; if (!isNaN(iterable.length)) { var i = -1; var next = function next () { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next } return next.value = undefined, next.done = !0, next }; return next.next = next } } return { next: doneResult } } function doneResult () { return { value: undefined, done: !0 } } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, 'constructor', GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, 'constructor', GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, 'GeneratorFunction'), exports.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === 'function' && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || (ctor.displayName || ctor.name) === 'GeneratorFunction') }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, 'GeneratorFunction')), genFun.prototype = Object.create(Gp), genFun }, exports.awrap = function (arg) { return { __await: arg } }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next() }) }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, 'Generator'), define(Gp, iteratorSymbol, function () { return this }), define(Gp, 'toString', function () { return '[object Generator]' }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key) } return keys.reverse(), function next () { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next } return next.done = !0, next } }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset (skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = 'next', this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined) } }, stop: function stop () { this.done = !0; var rootRecord = this.tryEntries[0].completion; if (rootRecord.type === 'throw') throw rootRecord.arg; return this.rval }, dispatchException: function dispatchException (exception) { if (this.done) throw exception; var context = this; function handle (loc, caught) { return record.type = 'throw', record.arg = exception, context.next = loc, caught && (context.method = 'next', context.arg = undefined), !!caught } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === 'root') return handle('end'); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, 'catchLoc'); var hasFinally = hasOwn.call(entry, 'finallyLoc'); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc) } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0) } else { if (!hasFinally) throw new Error('try statement without catch or finally'); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc) } } } }, abrupt: function abrupt (type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, 'finallyLoc') && this.prev < entry.finallyLoc) { var finallyEntry = entry; break } } finallyEntry && (type === 'break' || type === 'continue') && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = 'next', this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record) }, complete: function complete (record, afterLoc) { if (record.type === 'throw') throw record.arg; return record.type === 'break' || record.type === 'continue' ? this.next = record.arg : record.type === 'return' ? (this.rval = this.arg = record.arg, this.method = 'return', this.next = 'end') : record.type === 'normal' && afterLoc && (this.next = afterLoc), ContinueSentinel }, finish: function finish (finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel } }, catch: function _catch (tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === 'throw') { var thrown = record.arg; resetTryEntry(entry) } return thrown } } throw new Error('illegal catch attempt') }, delegateYield: function delegateYield (iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, this.method === 'next' && (this.arg = undefined), ContinueSentinel } }, exports }
|
|
46
|
-
|
|
24
|
+
function _regeneratorRuntime () { 'use strict'; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime () { return exports }; var exports = {}; var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value }; var $Symbol = typeof Symbol === 'function' ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || '@@iterator'; var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator'; var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; function define (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key] } try { define({}, '') } catch (err) { define = function define (obj, key, value) { return obj[key] = value } } function wrap (innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); return defineProperty(generator, '_invoke', { value: makeInvokeMethod(innerFn, self, context) }), generator } function tryCatch (fn, obj, arg) { try { return { type: 'normal', arg: fn.call(obj, arg) } } catch (err) { return { type: 'throw', arg: err } } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator () {} function GeneratorFunction () {} function GeneratorFunctionPrototype () {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this }); var getProto = Object.getPrototypeOf; var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods (prototype) { ['next', 'throw', 'return'].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg) }) }) } function AsyncIterator (generator, PromiseImpl) { function invoke (method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (record.type !== 'throw') { var result = record.arg; var value = result.value; return value && _typeof(value) == 'object' && hasOwn.call(value, '__await') ? PromiseImpl.resolve(value.__await).then(function (value) { invoke('next', value, resolve, reject) }, function (err) { invoke('throw', err, resolve, reject) }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result) }, function (error) { return invoke('throw', error, resolve, reject) }) } reject(record.arg) } var previousPromise; defineProperty(this, '_invoke', { value: function value (method, arg) { function callInvokeWithMethodAndArg () { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject) }) } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg() } }) } function makeInvokeMethod (innerFn, self, context) { var state = 'suspendedStart'; return function (method, arg) { if (state === 'executing') throw new Error('Generator is already running'); if (state === 'completed') { if (method === 'throw') throw arg; return doneResult() } for (context.method = method, context.arg = arg; ;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult } } if (context.method === 'next') context.sent = context._sent = context.arg; else if (context.method === 'throw') { if (state === 'suspendedStart') throw state = 'completed', context.arg; context.dispatchException(context.arg) } else context.method === 'return' && context.abrupt('return', context.arg); state = 'executing'; var record = tryCatch(innerFn, self, context); if (record.type === 'normal') { if (state = context.done ? 'completed' : 'suspendedYield', record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done } } record.type === 'throw' && (state = 'completed', context.method = 'throw', context.arg = record.arg) } } } function maybeInvokeDelegate (delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, context.method === 'throw') { if (delegate.iterator.return && (context.method = 'return', context.arg = undefined, maybeInvokeDelegate(delegate, context), context.method === 'throw')) return ContinueSentinel; context.method = 'throw', context.arg = new TypeError("The iterator does not provide a 'throw' method") } return ContinueSentinel } var record = tryCatch(method, delegate.iterator, context.arg); if (record.type === 'throw') return context.method = 'throw', context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, context.method !== 'return' && (context.method = 'next', context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = 'throw', context.arg = new TypeError('iterator result is not an object'), context.delegate = null, ContinueSentinel) } function pushTryEntry (locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry) } function resetTryEntry (entry) { var record = entry.completion || {}; record.type = 'normal', delete record.arg, entry.completion = record } function Context (tryLocsList) { this.tryEntries = [{ tryLoc: 'root' }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0) } function values (iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if (typeof iterable.next === 'function') return iterable; if (!isNaN(iterable.length)) { var i = -1; var next = function next () { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next } return next.value = undefined, next.done = !0, next }; return next.next = next } } return { next: doneResult } } function doneResult () { return { value: undefined, done: !0 } } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, 'constructor', { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, 'constructor', { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, 'GeneratorFunction'), exports.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === 'function' && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || (ctor.displayName || ctor.name) === 'GeneratorFunction') }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, 'GeneratorFunction')), genFun.prototype = Object.create(Gp), genFun }, exports.awrap = function (arg) { return { __await: arg } }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next() }) }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, 'Generator'), define(Gp, iteratorSymbol, function () { return this }), define(Gp, 'toString', function () { return '[object Generator]' }), exports.keys = function (val) { var object = Object(val); var keys = []; for (var key in object) { keys.push(key) } return keys.reverse(), function next () { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next } return next.done = !0, next } }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset (skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = 'next', this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined) } }, stop: function stop () { this.done = !0; var rootRecord = this.tryEntries[0].completion; if (rootRecord.type === 'throw') throw rootRecord.arg; return this.rval }, dispatchException: function dispatchException (exception) { if (this.done) throw exception; var context = this; function handle (loc, caught) { return record.type = 'throw', record.arg = exception, context.next = loc, caught && (context.method = 'next', context.arg = undefined), !!caught } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === 'root') return handle('end'); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, 'catchLoc'); var hasFinally = hasOwn.call(entry, 'finallyLoc'); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc) } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0) } else { if (!hasFinally) throw new Error('try statement without catch or finally'); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc) } } } }, abrupt: function abrupt (type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, 'finallyLoc') && this.prev < entry.finallyLoc) { var finallyEntry = entry; break } } finallyEntry && (type === 'break' || type === 'continue') && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = 'next', this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record) }, complete: function complete (record, afterLoc) { if (record.type === 'throw') throw record.arg; return record.type === 'break' || record.type === 'continue' ? this.next = record.arg : record.type === 'return' ? (this.rval = this.arg = record.arg, this.method = 'return', this.next = 'end') : record.type === 'normal' && afterLoc && (this.next = afterLoc), ContinueSentinel }, finish: function finish (finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel } }, catch: function _catch (tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === 'throw') { var thrown = record.arg; resetTryEntry(entry) } return thrown } } throw new Error('illegal catch attempt') }, delegateYield: function delegateYield (iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, this.method === 'next' && (this.arg = undefined), ContinueSentinel } }, exports }
|
|
47
25
|
function asyncGeneratorStep (gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value } catch (error) { reject(error); return } if (info.done) { resolve(value) } else { Promise.resolve(value).then(_next, _throw) } }
|
|
48
|
-
|
|
49
26
|
function _asyncToGenerator (fn) { return function () { var self = this; var args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next (value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value) } function _throw (err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err) } _next(undefined) }) } }
|
|
50
|
-
|
|
51
27
|
var gulpConfig = require('../gulp.config.js')
|
|
52
|
-
|
|
53
28
|
var _require = require('jest')
|
|
54
29
|
var jest = _require.runCLI
|
|
30
|
+
|
|
55
31
|
/**
|
|
56
32
|
* Run all tests with jest.
|
|
57
33
|
* @returns {Promise<*>}
|
|
58
34
|
*/
|
|
59
|
-
|
|
60
35
|
var testFull = /* #__PURE__ */(function () {
|
|
61
36
|
var _ref = _asyncToGenerator(/* #__PURE__ */_regeneratorRuntime().mark(function _callee () {
|
|
62
37
|
return _regeneratorRuntime().wrap(function _callee$ (_context) {
|
|
@@ -65,10 +40,8 @@ var testFull = /* #__PURE__ */(function () {
|
|
|
65
40
|
case 0:
|
|
66
41
|
_context.next = 2
|
|
67
42
|
return jest({}, gulpConfig.testPath)
|
|
68
|
-
|
|
69
43
|
case 2:
|
|
70
44
|
return _context.abrupt('return', _context.sent)
|
|
71
|
-
|
|
72
45
|
case 3:
|
|
73
46
|
case 'end':
|
|
74
47
|
return _context.stop()
|
|
@@ -76,10 +49,8 @@ var testFull = /* #__PURE__ */(function () {
|
|
|
76
49
|
}
|
|
77
50
|
}, _callee)
|
|
78
51
|
}))
|
|
79
|
-
|
|
80
52
|
return function testFull () {
|
|
81
53
|
return _ref.apply(this, arguments)
|
|
82
54
|
}
|
|
83
55
|
}())
|
|
84
|
-
|
|
85
56
|
module.exports = testFull
|
package/dist/testFull.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},n
|
|
1
|
+
"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new q(n||[]);return o(a,"_invoke",{value:b(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function h(){}function p(){}function y(){}var d={};s(d,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(E([])));m&&m!==e&&r.call(m,i)&&(d=m);var g=y.prototype=h.prototype=Object.create(d);function j(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==_typeof(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function b(t,e,r){var o="suspendedStart";return function(n,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw i;return S()}for(r.method=n,r.arg=i;;){var a=r.delegate;if(a){var u=x(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=l(t,e,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var n=o.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,n=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,o(g,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:p,configurable:!0}),p.displayName=s(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,s(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},j(w.prototype),s(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,o,n,i){void 0===i&&(i=Promise);var a=new w(c(e,r,o,n),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(g),s(g,u,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var o in e)r.push(o);return r.reverse(),function t(){for(;r.length;){var o=r.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},t.values=E,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(r,o){return a.type="throw",a.arg=t,e.next=r,o&&(e.method="next",e.arg=void 0),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;_(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function asyncGeneratorStep(t,e,r,o,n,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(o,n)}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(o,n){var i=t.apply(e,r);function a(t){asyncGeneratorStep(i,o,n,a,u,"next",t)}function u(t){asyncGeneratorStep(i,o,n,a,u,"throw",t)}a(void 0)}))}}require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.symbol.async-iterator.js"),require("core-js/modules/es.symbol.to-string-tag.js"),require("core-js/modules/es.json.to-string-tag.js"),require("core-js/modules/es.math.to-string-tag.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/esnext.async-iterator.for-each.js"),require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.for-each.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js");var gulpConfig=require("../gulp.config.js"),_require=require("jest"),jest=_require.runCLI,testFull=function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(){return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,jest({},gulpConfig.testPath);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();module.exports=testFull;
|
package/dist/testHelpers.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/es.object.define-property.js')
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, '__esModule', {
|
|
6
5
|
value: true
|
|
7
6
|
})
|
|
8
7
|
exports.nodeTree = exports.multiReferenceObject = exports.logObject = exports.linkedList = exports.jsonDom = exports.domItem = exports.deepReferenceObject = exports.circularObject = void 0
|
|
9
|
-
|
|
10
8
|
/**
|
|
11
9
|
* Log out an object in a nicely formatted way.
|
|
12
10
|
* @param {Object} object
|
|
@@ -14,19 +12,17 @@ exports.nodeTree = exports.multiReferenceObject = exports.logObject = exports.li
|
|
|
14
12
|
*/
|
|
15
13
|
var logObject = function logObject (object) {
|
|
16
14
|
var label = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'logging'
|
|
17
|
-
|
|
18
15
|
if (typeof require === 'undefined') {
|
|
19
16
|
console.log(label, object)
|
|
20
17
|
return
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
console.log(label, require('util').inspect(object, false, null, true))
|
|
24
20
|
}
|
|
21
|
+
|
|
25
22
|
/**
|
|
26
23
|
* Multilayered node tree-like structure with parent references
|
|
27
24
|
* @type {Object.<string, string|Object|Array>}
|
|
28
25
|
*/
|
|
29
|
-
|
|
30
26
|
exports.logObject = logObject
|
|
31
27
|
var circularObject = {
|
|
32
28
|
name: 'root',
|
|
@@ -71,11 +67,11 @@ circularObject.head.children = [{
|
|
|
71
67
|
}]
|
|
72
68
|
circularObject.head.children[0].parent = circularObject.head
|
|
73
69
|
circularObject.head.children[1].parent = circularObject.head
|
|
70
|
+
|
|
74
71
|
/**
|
|
75
72
|
* Sample object with deep references.
|
|
76
73
|
* @type {Object.<string, string|number|Object>}
|
|
77
74
|
*/
|
|
78
|
-
|
|
79
75
|
var deepReferenceObject = {
|
|
80
76
|
object1: {
|
|
81
77
|
name: 'someName',
|
|
@@ -88,11 +84,11 @@ var deepReferenceObject = {
|
|
|
88
84
|
title: 'Some Title',
|
|
89
85
|
item: 45
|
|
90
86
|
}
|
|
87
|
+
|
|
91
88
|
/**
|
|
92
89
|
* Sample LinkedList for testing circular references.
|
|
93
90
|
* @type {Object.<string, string|Object>}
|
|
94
91
|
*/
|
|
95
|
-
|
|
96
92
|
exports.deepReferenceObject = deepReferenceObject
|
|
97
93
|
var linkedList = {
|
|
98
94
|
name: 'one',
|
|
@@ -110,10 +106,10 @@ linkedList.next.next = {
|
|
|
110
106
|
prev: linkedList.next,
|
|
111
107
|
next: null
|
|
112
108
|
}
|
|
109
|
+
|
|
113
110
|
/**
|
|
114
111
|
* Sample of jsonDom object containing empty nested array and objects
|
|
115
112
|
*/
|
|
116
|
-
|
|
117
113
|
var jsonDom = {
|
|
118
114
|
tagName: 'div',
|
|
119
115
|
attributes: {
|
|
@@ -126,10 +122,10 @@ var jsonDom = {
|
|
|
126
122
|
children: [],
|
|
127
123
|
axis: 'x'
|
|
128
124
|
}
|
|
125
|
+
|
|
129
126
|
/**
|
|
130
127
|
* Sample of domItem child with nested child and optional details
|
|
131
128
|
*/
|
|
132
|
-
|
|
133
129
|
exports.jsonDom = jsonDom
|
|
134
130
|
var domItem = [{
|
|
135
131
|
attributes: {
|
|
@@ -156,11 +152,11 @@ var domItem = [{
|
|
|
156
152
|
parentItem: {},
|
|
157
153
|
tagName: 'div'
|
|
158
154
|
}]
|
|
155
|
+
|
|
159
156
|
/**
|
|
160
157
|
* Sample of object containing multiple references.
|
|
161
158
|
* @type {Object.<string, string|number|Object>}
|
|
162
159
|
*/
|
|
163
|
-
|
|
164
160
|
exports.domItem = domItem
|
|
165
161
|
var multiReferenceObject = {
|
|
166
162
|
object1: {
|
|
@@ -174,11 +170,11 @@ var multiReferenceObject = {
|
|
|
174
170
|
title: 'Some Title',
|
|
175
171
|
item: 45
|
|
176
172
|
}
|
|
173
|
+
|
|
177
174
|
/**
|
|
178
175
|
* Sample NodeTree for testing circular references and arrays.
|
|
179
176
|
* @type {Object.<string, string|Object|Array>}
|
|
180
177
|
*/
|
|
181
|
-
|
|
182
178
|
exports.multiReferenceObject = multiReferenceObject
|
|
183
179
|
var nodeTree = {
|
|
184
180
|
name: 'one',
|
package/dist/testQuick.js
CHANGED
|
@@ -1,62 +1,37 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
function _typeof (obj) { '@babel/helpers - typeof'; return _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) { return typeof obj } : function (obj) { return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj }, _typeof(obj) }
|
|
4
|
-
|
|
4
|
+
require('core-js/modules/es.object.define-property.js')
|
|
5
5
|
require('core-js/modules/es.symbol.js')
|
|
6
|
-
|
|
7
6
|
require('core-js/modules/es.symbol.description.js')
|
|
8
|
-
|
|
9
7
|
require('core-js/modules/es.symbol.iterator.js')
|
|
10
|
-
|
|
11
8
|
require('core-js/modules/es.array.iterator.js')
|
|
12
|
-
|
|
13
9
|
require('core-js/modules/es.string.iterator.js')
|
|
14
|
-
|
|
15
10
|
require('core-js/modules/web.dom-collections.iterator.js')
|
|
16
|
-
|
|
17
11
|
require('core-js/modules/es.symbol.async-iterator.js')
|
|
18
|
-
|
|
19
12
|
require('core-js/modules/es.symbol.to-string-tag.js')
|
|
20
|
-
|
|
21
13
|
require('core-js/modules/es.json.to-string-tag.js')
|
|
22
|
-
|
|
23
14
|
require('core-js/modules/es.math.to-string-tag.js')
|
|
24
|
-
|
|
25
|
-
require('core-js/modules/es.object.define-property.js')
|
|
26
|
-
|
|
27
15
|
require('core-js/modules/es.object.get-prototype-of.js')
|
|
28
|
-
|
|
29
16
|
require('core-js/modules/esnext.async-iterator.for-each.js')
|
|
30
|
-
|
|
31
17
|
require('core-js/modules/esnext.iterator.constructor.js')
|
|
32
|
-
|
|
33
18
|
require('core-js/modules/esnext.iterator.for-each.js')
|
|
34
|
-
|
|
35
19
|
require('core-js/modules/web.dom-collections.for-each.js')
|
|
36
|
-
|
|
37
20
|
require('core-js/modules/es.object.set-prototype-of.js')
|
|
38
|
-
|
|
39
21
|
require('core-js/modules/es.array.slice.js')
|
|
40
|
-
|
|
41
22
|
require('core-js/modules/es.object.to-string.js')
|
|
42
|
-
|
|
43
23
|
require('core-js/modules/es.promise.js')
|
|
44
|
-
|
|
45
|
-
function _regeneratorRuntime () { 'use strict'; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime () { return exports }; var exports = {}; var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; var $Symbol = typeof Symbol === 'function' ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || '@@iterator'; var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator'; var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; function define (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key] } try { define({}, '') } catch (err) { define = function define (obj, key, value) { return obj[key] = value } } function wrap (innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); return generator._invoke = (function (innerFn, self, context) { var state = 'suspendedStart'; return function (method, arg) { if (state === 'executing') throw new Error('Generator is already running'); if (state === 'completed') { if (method === 'throw') throw arg; return doneResult() } for (context.method = method, context.arg = arg; ;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult } } if (context.method === 'next') context.sent = context._sent = context.arg; else if (context.method === 'throw') { if (state === 'suspendedStart') throw state = 'completed', context.arg; context.dispatchException(context.arg) } else context.method === 'return' && context.abrupt('return', context.arg); state = 'executing'; var record = tryCatch(innerFn, self, context); if (record.type === 'normal') { if (state = context.done ? 'completed' : 'suspendedYield', record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done } } record.type === 'throw' && (state = 'completed', context.method = 'throw', context.arg = record.arg) } } }(innerFn, self, context)), generator } function tryCatch (fn, obj, arg) { try { return { type: 'normal', arg: fn.call(obj, arg) } } catch (err) { return { type: 'throw', arg: err } } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator () {} function GeneratorFunction () {} function GeneratorFunctionPrototype () {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this }); var getProto = Object.getPrototypeOf; var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods (prototype) { ['next', 'throw', 'return'].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg) }) }) } function AsyncIterator (generator, PromiseImpl) { function invoke (method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (record.type !== 'throw') { var result = record.arg; var value = result.value; return value && _typeof(value) == 'object' && hasOwn.call(value, '__await') ? PromiseImpl.resolve(value.__await).then(function (value) { invoke('next', value, resolve, reject) }, function (err) { invoke('throw', err, resolve, reject) }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result) }, function (error) { return invoke('throw', error, resolve, reject) }) } reject(record.arg) } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg () { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject) }) } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg() } } function maybeInvokeDelegate (delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, context.method === 'throw') { if (delegate.iterator.return && (context.method = 'return', context.arg = undefined, maybeInvokeDelegate(delegate, context), context.method === 'throw')) return ContinueSentinel; context.method = 'throw', context.arg = new TypeError("The iterator does not provide a 'throw' method") } return ContinueSentinel } var record = tryCatch(method, delegate.iterator, context.arg); if (record.type === 'throw') return context.method = 'throw', context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, context.method !== 'return' && (context.method = 'next', context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = 'throw', context.arg = new TypeError('iterator result is not an object'), context.delegate = null, ContinueSentinel) } function pushTryEntry (locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry) } function resetTryEntry (entry) { var record = entry.completion || {}; record.type = 'normal', delete record.arg, entry.completion = record } function Context (tryLocsList) { this.tryEntries = [{ tryLoc: 'root' }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0) } function values (iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if (typeof iterable.next === 'function') return iterable; if (!isNaN(iterable.length)) { var i = -1; var next = function next () { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next } return next.value = undefined, next.done = !0, next }; return next.next = next } } return { next: doneResult } } function doneResult () { return { value: undefined, done: !0 } } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, 'constructor', GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, 'constructor', GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, 'GeneratorFunction'), exports.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === 'function' && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || (ctor.displayName || ctor.name) === 'GeneratorFunction') }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, 'GeneratorFunction')), genFun.prototype = Object.create(Gp), genFun }, exports.awrap = function (arg) { return { __await: arg } }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next() }) }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, 'Generator'), define(Gp, iteratorSymbol, function () { return this }), define(Gp, 'toString', function () { return '[object Generator]' }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key) } return keys.reverse(), function next () { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next } return next.done = !0, next } }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset (skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = 'next', this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined) } }, stop: function stop () { this.done = !0; var rootRecord = this.tryEntries[0].completion; if (rootRecord.type === 'throw') throw rootRecord.arg; return this.rval }, dispatchException: function dispatchException (exception) { if (this.done) throw exception; var context = this; function handle (loc, caught) { return record.type = 'throw', record.arg = exception, context.next = loc, caught && (context.method = 'next', context.arg = undefined), !!caught } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === 'root') return handle('end'); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, 'catchLoc'); var hasFinally = hasOwn.call(entry, 'finallyLoc'); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc) } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0) } else { if (!hasFinally) throw new Error('try statement without catch or finally'); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc) } } } }, abrupt: function abrupt (type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, 'finallyLoc') && this.prev < entry.finallyLoc) { var finallyEntry = entry; break } } finallyEntry && (type === 'break' || type === 'continue') && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = 'next', this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record) }, complete: function complete (record, afterLoc) { if (record.type === 'throw') throw record.arg; return record.type === 'break' || record.type === 'continue' ? this.next = record.arg : record.type === 'return' ? (this.rval = this.arg = record.arg, this.method = 'return', this.next = 'end') : record.type === 'normal' && afterLoc && (this.next = afterLoc), ContinueSentinel }, finish: function finish (finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel } }, catch: function _catch (tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === 'throw') { var thrown = record.arg; resetTryEntry(entry) } return thrown } } throw new Error('illegal catch attempt') }, delegateYield: function delegateYield (iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, this.method === 'next' && (this.arg = undefined), ContinueSentinel } }, exports }
|
|
46
|
-
|
|
24
|
+
function _regeneratorRuntime () { 'use strict'; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime () { return exports }; var exports = {}; var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value }; var $Symbol = typeof Symbol === 'function' ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || '@@iterator'; var asyncIteratorSymbol = $Symbol.asyncIterator || '@@asyncIterator'; var toStringTagSymbol = $Symbol.toStringTag || '@@toStringTag'; function define (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key] } try { define({}, '') } catch (err) { define = function define (obj, key, value) { return obj[key] = value } } function wrap (innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); return defineProperty(generator, '_invoke', { value: makeInvokeMethod(innerFn, self, context) }), generator } function tryCatch (fn, obj, arg) { try { return { type: 'normal', arg: fn.call(obj, arg) } } catch (err) { return { type: 'throw', arg: err } } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator () {} function GeneratorFunction () {} function GeneratorFunctionPrototype () {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this }); var getProto = Object.getPrototypeOf; var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods (prototype) { ['next', 'throw', 'return'].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg) }) }) } function AsyncIterator (generator, PromiseImpl) { function invoke (method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (record.type !== 'throw') { var result = record.arg; var value = result.value; return value && _typeof(value) == 'object' && hasOwn.call(value, '__await') ? PromiseImpl.resolve(value.__await).then(function (value) { invoke('next', value, resolve, reject) }, function (err) { invoke('throw', err, resolve, reject) }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result) }, function (error) { return invoke('throw', error, resolve, reject) }) } reject(record.arg) } var previousPromise; defineProperty(this, '_invoke', { value: function value (method, arg) { function callInvokeWithMethodAndArg () { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject) }) } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg() } }) } function makeInvokeMethod (innerFn, self, context) { var state = 'suspendedStart'; return function (method, arg) { if (state === 'executing') throw new Error('Generator is already running'); if (state === 'completed') { if (method === 'throw') throw arg; return doneResult() } for (context.method = method, context.arg = arg; ;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult } } if (context.method === 'next') context.sent = context._sent = context.arg; else if (context.method === 'throw') { if (state === 'suspendedStart') throw state = 'completed', context.arg; context.dispatchException(context.arg) } else context.method === 'return' && context.abrupt('return', context.arg); state = 'executing'; var record = tryCatch(innerFn, self, context); if (record.type === 'normal') { if (state = context.done ? 'completed' : 'suspendedYield', record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done } } record.type === 'throw' && (state = 'completed', context.method = 'throw', context.arg = record.arg) } } } function maybeInvokeDelegate (delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, context.method === 'throw') { if (delegate.iterator.return && (context.method = 'return', context.arg = undefined, maybeInvokeDelegate(delegate, context), context.method === 'throw')) return ContinueSentinel; context.method = 'throw', context.arg = new TypeError("The iterator does not provide a 'throw' method") } return ContinueSentinel } var record = tryCatch(method, delegate.iterator, context.arg); if (record.type === 'throw') return context.method = 'throw', context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, context.method !== 'return' && (context.method = 'next', context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = 'throw', context.arg = new TypeError('iterator result is not an object'), context.delegate = null, ContinueSentinel) } function pushTryEntry (locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry) } function resetTryEntry (entry) { var record = entry.completion || {}; record.type = 'normal', delete record.arg, entry.completion = record } function Context (tryLocsList) { this.tryEntries = [{ tryLoc: 'root' }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0) } function values (iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if (typeof iterable.next === 'function') return iterable; if (!isNaN(iterable.length)) { var i = -1; var next = function next () { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next } return next.value = undefined, next.done = !0, next }; return next.next = next } } return { next: doneResult } } function doneResult () { return { value: undefined, done: !0 } } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, 'constructor', { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, 'constructor', { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, 'GeneratorFunction'), exports.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === 'function' && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || (ctor.displayName || ctor.name) === 'GeneratorFunction') }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, 'GeneratorFunction')), genFun.prototype = Object.create(Gp), genFun }, exports.awrap = function (arg) { return { __await: arg } }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next() }) }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, 'Generator'), define(Gp, iteratorSymbol, function () { return this }), define(Gp, 'toString', function () { return '[object Generator]' }), exports.keys = function (val) { var object = Object(val); var keys = []; for (var key in object) { keys.push(key) } return keys.reverse(), function next () { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next } return next.done = !0, next } }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset (skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = 'next', this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { name.charAt(0) === 't' && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined) } }, stop: function stop () { this.done = !0; var rootRecord = this.tryEntries[0].completion; if (rootRecord.type === 'throw') throw rootRecord.arg; return this.rval }, dispatchException: function dispatchException (exception) { if (this.done) throw exception; var context = this; function handle (loc, caught) { return record.type = 'throw', record.arg = exception, context.next = loc, caught && (context.method = 'next', context.arg = undefined), !!caught } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === 'root') return handle('end'); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, 'catchLoc'); var hasFinally = hasOwn.call(entry, 'finallyLoc'); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc) } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0) } else { if (!hasFinally) throw new Error('try statement without catch or finally'); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc) } } } }, abrupt: function abrupt (type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, 'finallyLoc') && this.prev < entry.finallyLoc) { var finallyEntry = entry; break } } finallyEntry && (type === 'break' || type === 'continue') && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = 'next', this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record) }, complete: function complete (record, afterLoc) { if (record.type === 'throw') throw record.arg; return record.type === 'break' || record.type === 'continue' ? this.next = record.arg : record.type === 'return' ? (this.rval = this.arg = record.arg, this.method = 'return', this.next = 'end') : record.type === 'normal' && afterLoc && (this.next = afterLoc), ContinueSentinel }, finish: function finish (finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel } }, catch: function _catch (tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === 'throw') { var thrown = record.arg; resetTryEntry(entry) } return thrown } } throw new Error('illegal catch attempt') }, delegateYield: function delegateYield (iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, this.method === 'next' && (this.arg = undefined), ContinueSentinel } }, exports }
|
|
47
25
|
function asyncGeneratorStep (gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value } catch (error) { reject(error); return } if (info.done) { resolve(value) } else { Promise.resolve(value).then(_next, _throw) } }
|
|
48
|
-
|
|
49
26
|
function _asyncToGenerator (fn) { return function () { var self = this; var args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next (value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value) } function _throw (err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err) } _next(undefined) }) } }
|
|
50
|
-
|
|
51
27
|
var gulpConfig = require('../gulp.config.js')
|
|
52
|
-
|
|
53
28
|
var _require = require('jest')
|
|
54
29
|
var jest = _require.runCLI
|
|
30
|
+
|
|
55
31
|
/**
|
|
56
32
|
* Run the Jest tests for files which have been modified (based on git status).
|
|
57
33
|
* @returns {Promise<*>}
|
|
58
34
|
*/
|
|
59
|
-
|
|
60
35
|
var testQuick = /* #__PURE__ */(function () {
|
|
61
36
|
var _ref = _asyncToGenerator(/* #__PURE__ */_regeneratorRuntime().mark(function _callee () {
|
|
62
37
|
return _regeneratorRuntime().wrap(function _callee$ (_context) {
|
|
@@ -67,10 +42,8 @@ var testQuick = /* #__PURE__ */(function () {
|
|
|
67
42
|
return jest({
|
|
68
43
|
onlyChanged: true
|
|
69
44
|
}, gulpConfig.testPath)
|
|
70
|
-
|
|
71
45
|
case 2:
|
|
72
46
|
return _context.abrupt('return', _context.sent)
|
|
73
|
-
|
|
74
47
|
case 3:
|
|
75
48
|
case 'end':
|
|
76
49
|
return _context.stop()
|
|
@@ -78,10 +51,8 @@ var testQuick = /* #__PURE__ */(function () {
|
|
|
78
51
|
}
|
|
79
52
|
}, _callee)
|
|
80
53
|
}))
|
|
81
|
-
|
|
82
54
|
return function testQuick () {
|
|
83
55
|
return _ref.apply(this, arguments)
|
|
84
56
|
}
|
|
85
57
|
}())
|
|
86
|
-
|
|
87
58
|
module.exports = testQuick
|
package/dist/testQuick.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},n
|
|
1
|
+
"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),u=new q(n||[]);return o(a,"_invoke",{value:b(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function p(){}function y(){}var d={};c(d,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(E([])));m&&m!==e&&r.call(m,i)&&(d=m);var g=y.prototype=h.prototype=Object.create(d);function j(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,u){var c=l(t[o],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==_typeof(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function b(t,e,r){var o="suspendedStart";return function(n,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw i;return S()}for(r.method=n,r.arg=i;;){var a=r.delegate;if(a){var u=x(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var c=l(t,e,r);if("normal"===c.type){if(o=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o="completed",r.method="throw",r.arg=c.arg)}}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var n=o.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,n=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=y,o(g,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:p,configurable:!0}),p.displayName=c(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},j(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,o,n,i){void 0===i&&(i=Promise);var a=new w(s(e,r,o,n),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var o in e)r.push(o);return r.reverse(),function t(){for(;r.length;){var o=r.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},t.values=E,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(r,o){return a.type="throw",a.arg=t,e.next=r,o&&(e.method="next",e.arg=void 0),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;_(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function asyncGeneratorStep(t,e,r,o,n,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(o,n)}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(o,n){var i=t.apply(e,r);function a(t){asyncGeneratorStep(i,o,n,a,u,"next",t)}function u(t){asyncGeneratorStep(i,o,n,a,u,"throw",t)}a(void 0)}))}}require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.symbol.async-iterator.js"),require("core-js/modules/es.symbol.to-string-tag.js"),require("core-js/modules/es.json.to-string-tag.js"),require("core-js/modules/es.math.to-string-tag.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/esnext.async-iterator.for-each.js"),require("core-js/modules/esnext.iterator.constructor.js"),require("core-js/modules/esnext.iterator.for-each.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js");var gulpConfig=require("../gulp.config.js"),_require=require("jest"),jest=_require.runCLI,testQuick=function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(){return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,jest({onlyChanged:!0},gulpConfig.testPath);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();module.exports=testQuick;
|
package/dist/watchFull.js
CHANGED
|
@@ -1,42 +1,30 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
require('core-js/modules/es.regexp.constructor.js')
|
|
4
|
-
|
|
5
4
|
require('core-js/modules/es.regexp.exec.js')
|
|
6
|
-
|
|
7
5
|
require('core-js/modules/es.regexp.sticky.js')
|
|
8
|
-
|
|
9
6
|
require('core-js/modules/es.regexp.to-string.js')
|
|
10
|
-
|
|
11
7
|
require('core-js/modules/es.string.replace.js')
|
|
12
|
-
|
|
13
8
|
var bundle = require('./bundle')
|
|
14
|
-
|
|
15
9
|
var distFor = require('./distFor')
|
|
16
|
-
|
|
17
10
|
var gulpConfig = require('../gulp.config.js')
|
|
18
|
-
|
|
19
11
|
var _require = require('gulp')
|
|
20
12
|
var parallel = _require.parallel
|
|
21
13
|
var series = _require.series
|
|
22
14
|
var watch = _require.watch
|
|
23
|
-
|
|
24
15
|
var testQuick = require('./testQuick')
|
|
16
|
+
|
|
25
17
|
/**
|
|
26
18
|
* Watch for changes and run the distribution for the changed files, then bundle and test the changed files.
|
|
27
19
|
* @returns {*}
|
|
28
20
|
*/
|
|
29
|
-
|
|
30
21
|
var watchFull = function watchFull () {
|
|
31
22
|
return watch(gulpConfig.watchSearch).on('change', function (path) {
|
|
32
23
|
var pathRegex = new RegExp('^'.concat(gulpConfig.srcPath, '(.*\\/).+\\.js$'), 'i')
|
|
33
|
-
|
|
34
24
|
var distForPath = function distForPath () {
|
|
35
25
|
return distFor(path, path.replace(pathRegex, ''.concat(gulpConfig.distPath, '$1')))
|
|
36
26
|
}
|
|
37
|
-
|
|
38
27
|
return parallel(testQuick, series(distForPath, bundle))()
|
|
39
28
|
})
|
|
40
29
|
}
|
|
41
|
-
|
|
42
30
|
module.exports = watchFull
|
package/dist/watchTest.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
var gulpConfig = require('../gulp.config.js')
|
|
4
|
-
|
|
5
4
|
var _require = require('gulp')
|
|
6
5
|
var series = _require.series
|
|
7
6
|
var watch = _require.watch
|
|
8
|
-
|
|
9
7
|
var testQuick = require('./testQuick')
|
|
8
|
+
|
|
10
9
|
/**
|
|
11
10
|
* Watch for changes and run the tests.
|
|
12
11
|
* @returns {*}
|
|
13
12
|
*/
|
|
14
|
-
|
|
15
13
|
var watchTest = function watchTest () {
|
|
16
14
|
return watch(gulpConfig.watchSearch, {
|
|
17
15
|
ignoreInitial: false
|
|
18
16
|
}, series(testQuick))
|
|
19
17
|
}
|
|
20
|
-
|
|
21
18
|
module.exports = watchTest
|
package/functions/clean.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const del = require('del')
|
|
2
|
-
const gulpConfig = require('../gulp.config.js')
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Deletes all the distribution and browser files (used before create a new build).
|
|
6
|
-
* @returns {Promise<string[]> | *}
|
|
7
|
-
*/
|
|
8
|
-
const clean = () => del([gulpConfig.distPath, gulpConfig.browserPath])
|
|
9
|
-
|
|
10
|
-
module.exports = clean
|
|
1
|
+
const del = require('del')
|
|
2
|
+
const gulpConfig = require('../gulp.config.js')
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Deletes all the distribution and browser files (used before create a new build).
|
|
6
|
+
* @returns {Promise<string[]> | *}
|
|
7
|
+
*/
|
|
8
|
+
const clean = () => del([gulpConfig.distPath, gulpConfig.browserPath])
|
|
9
|
+
|
|
10
|
+
module.exports = clean
|