jest-watcher
Advanced tools
Comparing version 24.0.0 to 24.2.0-alpha.0
@@ -13,4 +13,2 @@ 'use strict'; | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
@@ -23,11 +21,11 @@ class BaseWatchPlugin { | ||
apply(hooks) {} | ||
apply(_hooks) {} | ||
getUsageInfo(globalConfig) { | ||
getUsageInfo(_globalConfig) { | ||
return null; | ||
} | ||
onKey(value) {} | ||
onKey(_key) {} | ||
run(globalConfig, updateConfigAndRun) { | ||
run(_globalConfig, _updateConfigAndRun) { | ||
return Promise.resolve(); | ||
@@ -34,0 +32,0 @@ } |
@@ -13,4 +13,2 @@ 'use strict'; | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
@@ -17,0 +15,0 @@ const isWindows = process.platform === 'win32'; |
@@ -10,2 +10,10 @@ 'use strict'; | ||
PatternPrompt: true, | ||
AllowedConfigOptions: true, | ||
JestHookEmitter: true, | ||
JestHookSubscriber: true, | ||
ScrollOptions: true, | ||
UpdateConfigCallback: true, | ||
UsageData: true, | ||
WatchPlugin: true, | ||
WatchPluginClass: true, | ||
Prompt: true | ||
@@ -31,2 +39,50 @@ }; | ||
}); | ||
Object.defineProperty(exports, 'AllowedConfigOptions', { | ||
enumerable: true, | ||
get: function get() { | ||
return _types.AllowedConfigOptions; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'JestHookEmitter', { | ||
enumerable: true, | ||
get: function get() { | ||
return _types.JestHookEmitter; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'JestHookSubscriber', { | ||
enumerable: true, | ||
get: function get() { | ||
return _types.JestHookSubscriber; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'ScrollOptions', { | ||
enumerable: true, | ||
get: function get() { | ||
return _types.ScrollOptions; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'UpdateConfigCallback', { | ||
enumerable: true, | ||
get: function get() { | ||
return _types.UpdateConfigCallback; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'UsageData', { | ||
enumerable: true, | ||
get: function get() { | ||
return _types.UsageData; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'WatchPlugin', { | ||
enumerable: true, | ||
get: function get() { | ||
return _types.WatchPlugin; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'WatchPluginClass', { | ||
enumerable: true, | ||
get: function get() { | ||
return _types.WatchPluginClass; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'Prompt', { | ||
@@ -58,2 +114,4 @@ enumerable: true, | ||
var _types = require('./types'); | ||
var _Prompt = _interopRequireDefault(require('./lib/Prompt')); | ||
@@ -60,0 +118,0 @@ |
@@ -45,4 +45,2 @@ 'use strict'; | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
@@ -88,9 +86,8 @@ class JestHooks { | ||
var _shouldRunTestSuite = _asyncToGenerator(function*(testSuiteInfo) { | ||
return Promise.all( | ||
const result = yield Promise.all( | ||
_this._listeners.shouldRunTestSuite.map(listener => | ||
listener(testSuiteInfo) | ||
) | ||
).then(result => | ||
result.every(shouldRunTestSuite => shouldRunTestSuite) | ||
); | ||
return result.every(Boolean); | ||
}); | ||
@@ -97,0 +94,0 @@ |
@@ -27,4 +27,2 @@ 'use strict'; | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
@@ -31,0 +29,0 @@ var _default = (str, start, end) => |
@@ -29,4 +29,2 @@ 'use strict'; | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
@@ -52,3 +50,3 @@ const DOTS = '...'; | ||
const startPatternIndex = Math.max(match.index, 0); | ||
const startPatternIndex = Math.max(match.index || 0, 0); | ||
const endPatternIndex = startPatternIndex + match[0].length; | ||
@@ -55,0 +53,0 @@ |
@@ -1,9 +0,1 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
'use strict'; | ||
@@ -50,2 +42,8 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
const printPatternCaret = (pattern, pipe) => { | ||
@@ -52,0 +50,0 @@ const inputText = `${_chalk().default.dim(' pattern \u203A')} ${pattern}`; |
@@ -15,7 +15,18 @@ 'use strict'; | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
class Prompt { | ||
constructor() { | ||
// Copied from `enter` to satisfy TS | ||
this._entering = true; | ||
this._value = ''; | ||
this._selection = null; | ||
this._offset = -1; | ||
this._promptLength = 0; | ||
this._onChange = () => {}; | ||
this._onSuccess = () => {}; | ||
this._onCancel = () => {}; | ||
this._onResize = this._onResize.bind(this); | ||
@@ -25,3 +36,3 @@ } | ||
_onResize() { | ||
this._onChange(this._value); | ||
this._onChange(); | ||
} | ||
@@ -28,0 +39,0 @@ |
@@ -1,9 +0,1 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
'use strict'; | ||
@@ -16,2 +8,8 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
function scroll(size, {offset, max}) { | ||
@@ -18,0 +16,0 @@ let start = 0; |
@@ -1,9 +0,1 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* | ||
*/ | ||
'use strict'; | ||
@@ -46,4 +38,2 @@ | ||
var _Prompt = _interopRequireDefault(require('./lib/Prompt')); | ||
function _interopRequireDefault(obj) { | ||
@@ -53,2 +43,8 @@ return obj && obj.__esModule ? obj : {default: obj}; | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
const CLEAR = _jestUtil().specialChars.CLEAR; | ||
@@ -69,2 +65,4 @@ | ||
constructor(pipe, prompt) { | ||
// TODO: Should come in the constructor | ||
this._entityName = ''; | ||
this._pipe = pipe; | ||
@@ -95,3 +93,3 @@ this._prompt = prompt; | ||
_onChange(pattern, options) { | ||
_onChange(_pattern, _options) { | ||
this._pipe.write(_ansiEscapes().default.eraseLine); | ||
@@ -98,0 +96,0 @@ |
{ | ||
"name": "jest-watcher", | ||
"description": "Delightful JavaScript Testing.", | ||
"version": "24.0.0", | ||
"version": "24.2.0-alpha.0", | ||
"main": "build/index.js", | ||
"dependencies": { | ||
"@jest/test-result": "^24.2.0-alpha.0", | ||
"@jest/types": "^24.2.0-alpha.0", | ||
"@types/node": "*", | ||
"@types/yargs": "^12.0.9", | ||
"ansi-escapes": "^3.0.0", | ||
"chalk": "^2.0.1", | ||
"jest-util": "^24.0.0", | ||
"jest-util": "^24.2.0-alpha.0", | ||
"string-length": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/ansi-escapes": "^3.0.0", | ||
"@types/string-length": "^2.0.0" | ||
}, | ||
"repository": { | ||
@@ -25,3 +33,6 @@ "type": "git", | ||
"license": "MIT", | ||
"gitHead": "634e5a54f46b2a62d1dc81a170562e6f4e55ad60" | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "800f2f803d01c8ae194d71b251e4965dd70e5bf2" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32589
35
827
8
2
1
+ Added@jest/types@^24.2.0-alpha.0
+ Added@types/node@*
+ Added@types/yargs@^12.0.9
+ Added@types/node@22.9.0(transitive)
+ Added@types/yargs@12.0.20(transitive)
+ Addedundici-types@6.19.8(transitive)
Updatedjest-util@^24.2.0-alpha.0