nyc 13.2.0 → 13.3.0
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/CHANGELOG.md +15 -0
- package/lib/commands/report.js +40 -0
- package/lib/instrumenters/istanbul.js +6 -12
- package/lib/instrumenters/noop.js +5 -5
- package/node_modules/arrify/package.json +1 -2
- package/node_modules/async/CHANGELOG.md +3 -0
- package/node_modules/async/package.json +11 -11
- package/node_modules/handlebars/dist/amd/handlebars/base.js +2 -2
- package/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +4 -1
- package/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js +3 -5
- package/node_modules/handlebars/dist/cjs/handlebars/base.js +2 -2
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +4 -1
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +3 -5
- package/node_modules/handlebars/dist/handlebars.amd.js +10 -9
- package/node_modules/handlebars/dist/handlebars.amd.min.js +4 -4
- package/node_modules/handlebars/dist/handlebars.js +7 -6
- package/node_modules/handlebars/dist/handlebars.min.js +4 -4
- package/node_modules/handlebars/dist/handlebars.runtime.amd.js +3 -3
- package/node_modules/handlebars/dist/handlebars.runtime.amd.min.js +2 -2
- package/node_modules/handlebars/dist/handlebars.runtime.js +2 -2
- package/node_modules/handlebars/dist/handlebars.runtime.min.js +2 -2
- package/node_modules/handlebars/lib/handlebars/base.js +1 -1
- package/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +3 -0
- package/node_modules/handlebars/lib/handlebars/compiler/parser.js +9 -9
- package/node_modules/handlebars/lib/handlebars.d.ts +356 -0
- package/node_modules/handlebars/package.json +12 -11
- package/node_modules/handlebars/release-notes.md +38 -1
- package/node_modules/istanbul-reports/CHANGELOG.md +11 -0
- package/node_modules/istanbul-reports/package.json +12 -12
- package/node_modules/mem/index.js +5 -1
- package/node_modules/mem/package.json +14 -14
- package/node_modules/normalize-package-data/README.md +1 -1
- package/node_modules/normalize-package-data/lib/fixer.js +3 -2
- package/node_modules/normalize-package-data/package.json +13 -13
- package/node_modules/p-is-promise/index.d.ts +13 -0
- package/node_modules/p-is-promise/index.js +10 -6
- package/node_modules/p-is-promise/license +4 -16
- package/node_modules/p-is-promise/package.json +17 -18
- package/node_modules/p-is-promise/readme.md +1 -1
- package/node_modules/path-parse/.travis.yml +9 -0
- package/node_modules/{is-builtin-module/license → path-parse/LICENSE} +5 -5
- package/node_modules/path-parse/README.md +42 -0
- package/node_modules/path-parse/index.js +93 -0
- package/node_modules/path-parse/package.json +64 -0
- package/node_modules/path-parse/test.js +77 -0
- package/node_modules/resolve/.editorconfig +20 -0
- package/node_modules/resolve/.eslintignore +1 -0
- package/node_modules/resolve/.eslintrc +31 -0
- package/node_modules/resolve/.travis.yml +269 -0
- package/node_modules/resolve/CHANGELOG.md +629 -0
- package/node_modules/resolve/LICENSE +18 -0
- package/node_modules/resolve/appveyor.yml +47 -0
- package/node_modules/resolve/changelog.hbs +36 -0
- package/node_modules/resolve/example/async.js +5 -0
- package/node_modules/resolve/example/sync.js +3 -0
- package/node_modules/resolve/index.js +8 -0
- package/node_modules/resolve/lib/async.js +229 -0
- package/node_modules/resolve/lib/caller.js +8 -0
- package/node_modules/resolve/lib/core.js +53 -0
- package/node_modules/resolve/lib/core.json +73 -0
- package/node_modules/resolve/lib/node-modules-paths.js +42 -0
- package/node_modules/resolve/lib/normalize-options.js +10 -0
- package/node_modules/resolve/lib/sync.js +154 -0
- package/node_modules/resolve/package.json +77 -0
- package/node_modules/resolve/readme.markdown +179 -0
- package/node_modules/resolve/test/.eslintrc +5 -0
- package/node_modules/resolve/test/core.js +82 -0
- package/node_modules/resolve/test/dotdot/abc/index.js +2 -0
- package/node_modules/resolve/test/dotdot/index.js +1 -0
- package/node_modules/resolve/test/dotdot.js +29 -0
- package/node_modules/resolve/test/faulty_basedir.js +29 -0
- package/node_modules/resolve/test/filter.js +34 -0
- package/node_modules/resolve/test/filter_sync.js +26 -0
- package/node_modules/resolve/test/mock.js +143 -0
- package/node_modules/resolve/test/mock_sync.js +67 -0
- package/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
- package/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
- package/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
- package/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
- package/node_modules/resolve/test/module_dir.js +56 -0
- package/node_modules/resolve/test/node-modules-paths.js +121 -0
- package/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
- package/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
- package/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
- package/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
- package/node_modules/resolve/test/node_path.js +70 -0
- package/node_modules/resolve/test/nonstring.js +9 -0
- package/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
- package/node_modules/resolve/test/pathfilter.js +75 -0
- package/node_modules/resolve/test/precedence/aaa/index.js +1 -0
- package/node_modules/resolve/test/precedence/aaa/main.js +1 -0
- package/node_modules/resolve/test/precedence/aaa.js +1 -0
- package/node_modules/resolve/test/precedence/bbb/main.js +1 -0
- package/node_modules/resolve/test/precedence/bbb.js +1 -0
- package/node_modules/resolve/test/precedence.js +23 -0
- package/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- package/node_modules/resolve/test/resolver/baz/package.json +3 -0
- package/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- package/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
- package/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
- package/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
- package/node_modules/resolve/test/resolver/cup.coffee +1 -0
- package/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
- package/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
- package/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
- package/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
- package/node_modules/resolve/test/resolver/foo.js +1 -0
- package/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
- package/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
- package/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
- package/node_modules/resolve/test/resolver/mug.coffee +0 -0
- package/node_modules/resolve/test/resolver/mug.js +0 -0
- package/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
- package/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
- package/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
- package/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
- package/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
- package/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
- package/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- package/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- package/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
- package/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
- package/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
- package/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
- package/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
- package/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
- package/node_modules/resolve/test/resolver.js +429 -0
- package/node_modules/resolve/test/resolver_sync.js +340 -0
- package/node_modules/resolve/test/subdirs.js +13 -0
- package/node_modules/resolve/test/symlinks.js +56 -0
- package/package.json +3 -3
- package/node_modules/builtin-modules/builtin-modules.json +0 -35
- package/node_modules/builtin-modules/index.js +0 -10
- package/node_modules/builtin-modules/license +0 -21
- package/node_modules/builtin-modules/package.json +0 -75
- package/node_modules/builtin-modules/readme.md +0 -41
- package/node_modules/builtin-modules/static.js +0 -2
- package/node_modules/is-builtin-module/index.js +0 -10
- package/node_modules/is-builtin-module/package.json +0 -78
- package/node_modules/is-builtin-module/readme.md +0 -33
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.1.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.1.0...istanbul-reports@2.1.1) (2019-02-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update dependendencies due to vulnerabilities ([#294](https://github.com/istanbuljs/istanbuljs/issues/294)) ([4c14fed](https://github.com/istanbuljs/istanbuljs/commit/4c14fed))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [2.1.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.0.3...istanbul-reports@2.1.0) (2019-01-26)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
|
-
"istanbul-reports@2.1.
|
|
4
|
+
"istanbul-reports@2.1.1",
|
|
5
5
|
"/usr/src/npm/nyc"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
|
-
"_from": "istanbul-reports@2.1.
|
|
9
|
-
"_id": "istanbul-reports@2.1.
|
|
8
|
+
"_from": "istanbul-reports@2.1.1",
|
|
9
|
+
"_id": "istanbul-reports@2.1.1",
|
|
10
10
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-
|
|
11
|
+
"_integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==",
|
|
12
12
|
"_location": "/istanbul-reports",
|
|
13
13
|
"_phantomChildren": {},
|
|
14
14
|
"_requested": {
|
|
15
15
|
"type": "version",
|
|
16
16
|
"registry": true,
|
|
17
|
-
"raw": "istanbul-reports@2.1.
|
|
17
|
+
"raw": "istanbul-reports@2.1.1",
|
|
18
18
|
"name": "istanbul-reports",
|
|
19
19
|
"escapedName": "istanbul-reports",
|
|
20
|
-
"rawSpec": "2.1.
|
|
20
|
+
"rawSpec": "2.1.1",
|
|
21
21
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "2.1.
|
|
22
|
+
"fetchSpec": "2.1.1"
|
|
23
23
|
},
|
|
24
24
|
"_requiredBy": [
|
|
25
25
|
"/"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.
|
|
28
|
-
"_spec": "2.1.
|
|
27
|
+
"_resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz",
|
|
28
|
+
"_spec": "2.1.1",
|
|
29
29
|
"_where": "/usr/src/npm/nyc",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Krishnan Anantheswaran",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/istanbuljs/istanbuljs/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"handlebars": "^4.0
|
|
38
|
+
"handlebars": "^4.1.0"
|
|
39
39
|
},
|
|
40
40
|
"description": "istanbul reports",
|
|
41
41
|
"devDependencies": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"index.js",
|
|
50
50
|
"lib"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "c02990692153f87670b3d59ba21a19bcf6fb8e51",
|
|
53
53
|
"homepage": "https://github.com/istanbuljs/istanbuljs",
|
|
54
54
|
"keywords": [
|
|
55
55
|
"istanbul",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"scripts": {
|
|
66
66
|
"test": "mocha --recursive"
|
|
67
67
|
},
|
|
68
|
-
"version": "2.1.
|
|
68
|
+
"version": "2.1.1"
|
|
69
69
|
}
|
|
@@ -66,7 +66,11 @@ module.exports = (fn, options) => {
|
|
|
66
66
|
return ret;
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
try {
|
|
70
|
+
// The below call will throw in some host environments
|
|
71
|
+
// See https://github.com/sindresorhus/mimic-fn/issues/10
|
|
72
|
+
mimicFn(memoized, fn);
|
|
73
|
+
} catch (_) {}
|
|
70
74
|
|
|
71
75
|
cacheStore.set(memoized, options.cache);
|
|
72
76
|
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
|
-
"mem@4.
|
|
4
|
+
"mem@4.1.0",
|
|
5
5
|
"/usr/src/npm/nyc"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
|
-
"_from": "mem@4.
|
|
9
|
-
"_id": "mem@4.
|
|
8
|
+
"_from": "mem@4.1.0",
|
|
9
|
+
"_id": "mem@4.1.0",
|
|
10
10
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-
|
|
11
|
+
"_integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==",
|
|
12
12
|
"_location": "/mem",
|
|
13
13
|
"_phantomChildren": {},
|
|
14
14
|
"_requested": {
|
|
15
15
|
"type": "version",
|
|
16
16
|
"registry": true,
|
|
17
|
-
"raw": "mem@4.
|
|
17
|
+
"raw": "mem@4.1.0",
|
|
18
18
|
"name": "mem",
|
|
19
19
|
"escapedName": "mem",
|
|
20
|
-
"rawSpec": "4.
|
|
20
|
+
"rawSpec": "4.1.0",
|
|
21
21
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "4.
|
|
22
|
+
"fetchSpec": "4.1.0"
|
|
23
23
|
},
|
|
24
24
|
"_requiredBy": [
|
|
25
25
|
"/os-locale"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/mem/-/mem-4.
|
|
28
|
-
"_spec": "4.
|
|
27
|
+
"_resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz",
|
|
28
|
+
"_spec": "4.1.0",
|
|
29
29
|
"_where": "/usr/src/npm/nyc",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Sindre Sorhus",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"map-age-cleaner": "^0.1.1",
|
|
40
40
|
"mimic-fn": "^1.0.0",
|
|
41
|
-
"p-is-promise": "^
|
|
41
|
+
"p-is-promise": "^2.0.0"
|
|
42
42
|
},
|
|
43
43
|
"description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"ava": "
|
|
46
|
-
"delay": "^
|
|
47
|
-
"xo": "
|
|
45
|
+
"ava": "^1.0.1",
|
|
46
|
+
"delay": "^4.1.0",
|
|
47
|
+
"xo": "^0.23.0"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=6"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"scripts": {
|
|
76
76
|
"test": "xo && ava"
|
|
77
77
|
},
|
|
78
|
-
"version": "4.
|
|
78
|
+
"version": "4.1.0"
|
|
79
79
|
}
|
|
@@ -94,7 +94,7 @@ If `version` field is given, the value of the version field must be a valid *sem
|
|
|
94
94
|
|
|
95
95
|
### Rules for license field
|
|
96
96
|
|
|
97
|
-
The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/
|
|
97
|
+
The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/package/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license).
|
|
98
98
|
|
|
99
99
|
## Credits
|
|
100
100
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var semver = require("semver")
|
|
2
2
|
var validateLicense = require('validate-npm-package-license');
|
|
3
3
|
var hostedGitInfo = require("hosted-git-info")
|
|
4
|
-
var isBuiltinModule = require("
|
|
4
|
+
var isBuiltinModule = require("resolve").isCore
|
|
5
5
|
var depTypes = ["dependencies","devDependencies","optionalDependencies"]
|
|
6
6
|
var extractDescription = require("./extract_description")
|
|
7
7
|
var url = require("url")
|
|
@@ -299,7 +299,8 @@ var fixer = module.exports = {
|
|
|
299
299
|
} else{
|
|
300
300
|
if (
|
|
301
301
|
typeof(data.license) !== 'string' ||
|
|
302
|
-
data.license.length < 1
|
|
302
|
+
data.license.length < 1 ||
|
|
303
|
+
data.license.trim() === ''
|
|
303
304
|
) {
|
|
304
305
|
this.warn("invalidLicense")
|
|
305
306
|
} else {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
|
-
"normalize-package-data@2.
|
|
4
|
+
"normalize-package-data@2.5.0",
|
|
5
5
|
"/usr/src/npm/nyc"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
|
-
"_from": "normalize-package-data@2.
|
|
9
|
-
"_id": "normalize-package-data@2.
|
|
8
|
+
"_from": "normalize-package-data@2.5.0",
|
|
9
|
+
"_id": "normalize-package-data@2.5.0",
|
|
10
10
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512
|
|
11
|
+
"_integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
|
|
12
12
|
"_location": "/normalize-package-data",
|
|
13
13
|
"_phantomChildren": {},
|
|
14
14
|
"_requested": {
|
|
15
15
|
"type": "version",
|
|
16
16
|
"registry": true,
|
|
17
|
-
"raw": "normalize-package-data@2.
|
|
17
|
+
"raw": "normalize-package-data@2.5.0",
|
|
18
18
|
"name": "normalize-package-data",
|
|
19
19
|
"escapedName": "normalize-package-data",
|
|
20
|
-
"rawSpec": "2.
|
|
20
|
+
"rawSpec": "2.5.0",
|
|
21
21
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "2.
|
|
22
|
+
"fetchSpec": "2.5.0"
|
|
23
23
|
},
|
|
24
24
|
"_requiredBy": [
|
|
25
25
|
"/conventional-changelog-core",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/read-pkg",
|
|
35
35
|
"/standard-version/read-pkg"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.
|
|
38
|
-
"_spec": "2.
|
|
37
|
+
"_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
|
|
38
|
+
"_spec": "2.5.0",
|
|
39
39
|
"_where": "/usr/src/npm/nyc",
|
|
40
40
|
"author": {
|
|
41
41
|
"name": "Meryn Stol",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
],
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"hosted-git-info": "^2.1.4",
|
|
63
|
-
"
|
|
63
|
+
"resolve": "^1.10.0",
|
|
64
64
|
"semver": "2 || 3 || 4 || 5",
|
|
65
65
|
"validate-npm-package-license": "^3.0.1"
|
|
66
66
|
},
|
|
67
67
|
"description": "Normalizes data that can be found in package.json files.",
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"async": "^
|
|
70
|
-
"tap": "^
|
|
69
|
+
"async": "^2.6.1",
|
|
70
|
+
"tap": "^12.4.0",
|
|
71
71
|
"underscore": "^1.8.3"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"scripts": {
|
|
87
87
|
"test": "tap test/*.js"
|
|
88
88
|
},
|
|
89
|
-
"version": "2.
|
|
89
|
+
"version": "2.5.0"
|
|
90
90
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if `input` is a ES2015 promise.
|
|
3
|
+
*
|
|
4
|
+
* @param input - Value to be checked.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
*
|
|
8
|
+
* import isPromise from 'p-is-promise';
|
|
9
|
+
*
|
|
10
|
+
* isPromise(Promise.resolve('🦄'));
|
|
11
|
+
* //=> true
|
|
12
|
+
*/
|
|
13
|
+
export default function(input: unknown): input is Promise<unknown>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
const isPromise = input => (
|
|
4
|
+
input instanceof Promise ||
|
|
4
5
|
(
|
|
5
|
-
|
|
6
|
-
typeof
|
|
7
|
-
typeof
|
|
8
|
-
typeof
|
|
6
|
+
input !== null &&
|
|
7
|
+
typeof input === 'object' &&
|
|
8
|
+
typeof input.then === 'function' &&
|
|
9
|
+
typeof input.catch === 'function'
|
|
9
10
|
)
|
|
10
11
|
);
|
|
12
|
+
|
|
13
|
+
module.exports = isPromise;
|
|
14
|
+
module.exports.default = isPromise;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
4
|
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
11
6
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
14
8
|
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
|
-
"p-is-promise@
|
|
4
|
+
"p-is-promise@2.0.0",
|
|
5
5
|
"/usr/src/npm/nyc"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
|
-
"_from": "p-is-promise@
|
|
9
|
-
"_id": "p-is-promise@
|
|
8
|
+
"_from": "p-is-promise@2.0.0",
|
|
9
|
+
"_id": "p-is-promise@2.0.0",
|
|
10
10
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "
|
|
11
|
+
"_integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==",
|
|
12
12
|
"_location": "/p-is-promise",
|
|
13
13
|
"_phantomChildren": {},
|
|
14
14
|
"_requested": {
|
|
15
15
|
"type": "version",
|
|
16
16
|
"registry": true,
|
|
17
|
-
"raw": "p-is-promise@
|
|
17
|
+
"raw": "p-is-promise@2.0.0",
|
|
18
18
|
"name": "p-is-promise",
|
|
19
19
|
"escapedName": "p-is-promise",
|
|
20
|
-
"rawSpec": "
|
|
20
|
+
"rawSpec": "2.0.0",
|
|
21
21
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "
|
|
22
|
+
"fetchSpec": "2.0.0"
|
|
23
23
|
},
|
|
24
24
|
"_requiredBy": [
|
|
25
25
|
"/mem"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-
|
|
28
|
-
"_spec": "
|
|
27
|
+
"_resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz",
|
|
28
|
+
"_spec": "2.0.0",
|
|
29
29
|
"_where": "/usr/src/npm/nyc",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Sindre Sorhus",
|
|
@@ -37,15 +37,17 @@
|
|
|
37
37
|
},
|
|
38
38
|
"description": "Check if something is a promise",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"ava": "
|
|
40
|
+
"ava": "^0.25.0",
|
|
41
41
|
"bluebird": "^3.4.6",
|
|
42
|
-
"
|
|
42
|
+
"tsd-check": "^0.2.1",
|
|
43
|
+
"xo": "^0.23.0"
|
|
43
44
|
},
|
|
44
45
|
"engines": {
|
|
45
|
-
"node": ">=
|
|
46
|
+
"node": ">=6"
|
|
46
47
|
},
|
|
47
48
|
"files": [
|
|
48
|
-
"index.js"
|
|
49
|
+
"index.js",
|
|
50
|
+
"index.d.ts"
|
|
49
51
|
],
|
|
50
52
|
"homepage": "https://github.com/sindresorhus/p-is-promise#readme",
|
|
51
53
|
"keywords": [
|
|
@@ -69,10 +71,7 @@
|
|
|
69
71
|
"url": "git+https://github.com/sindresorhus/p-is-promise.git"
|
|
70
72
|
},
|
|
71
73
|
"scripts": {
|
|
72
|
-
"test": "xo && ava"
|
|
74
|
+
"test": "xo && ava && tsd-check"
|
|
73
75
|
},
|
|
74
|
-
"version": "
|
|
75
|
-
"xo": {
|
|
76
|
-
"esnext": true
|
|
77
|
-
}
|
|
76
|
+
"version": "2.0.0"
|
|
78
77
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2015 Javier Blanco
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# path-parse [](https://travis-ci.org/jbgutierrez/path-parse)
|
|
2
|
+
|
|
3
|
+
> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
$ npm install --save path-parse
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
var pathParse = require('path-parse');
|
|
15
|
+
|
|
16
|
+
pathParse('/home/user/dir/file.txt');
|
|
17
|
+
//=> {
|
|
18
|
+
// root : "/",
|
|
19
|
+
// dir : "/home/user/dir",
|
|
20
|
+
// base : "file.txt",
|
|
21
|
+
// ext : ".txt",
|
|
22
|
+
// name : "file"
|
|
23
|
+
// }
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## API
|
|
27
|
+
|
|
28
|
+
See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs.
|
|
29
|
+
|
|
30
|
+
### pathParse(path)
|
|
31
|
+
|
|
32
|
+
### pathParse.posix(path)
|
|
33
|
+
|
|
34
|
+
The Posix specific version.
|
|
35
|
+
|
|
36
|
+
### pathParse.win32(path)
|
|
37
|
+
|
|
38
|
+
The Windows specific version.
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
MIT © [Javier Blanco](http://jbgutierrez.info)
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var isWindows = process.platform === 'win32';
|
|
4
|
+
|
|
5
|
+
// Regex to split a windows path into three parts: [*, device, slash,
|
|
6
|
+
// tail] windows-only
|
|
7
|
+
var splitDeviceRe =
|
|
8
|
+
/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
9
|
+
|
|
10
|
+
// Regex to split the tail part of the above into [*, dir, basename, ext]
|
|
11
|
+
var splitTailRe =
|
|
12
|
+
/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
|
|
13
|
+
|
|
14
|
+
var win32 = {};
|
|
15
|
+
|
|
16
|
+
// Function to split a filename into [root, dir, basename, ext]
|
|
17
|
+
function win32SplitPath(filename) {
|
|
18
|
+
// Separate device+slash from tail
|
|
19
|
+
var result = splitDeviceRe.exec(filename),
|
|
20
|
+
device = (result[1] || '') + (result[2] || ''),
|
|
21
|
+
tail = result[3] || '';
|
|
22
|
+
// Split the tail into dir, basename and extension
|
|
23
|
+
var result2 = splitTailRe.exec(tail),
|
|
24
|
+
dir = result2[1],
|
|
25
|
+
basename = result2[2],
|
|
26
|
+
ext = result2[3];
|
|
27
|
+
return [device, dir, basename, ext];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
win32.parse = function(pathString) {
|
|
31
|
+
if (typeof pathString !== 'string') {
|
|
32
|
+
throw new TypeError(
|
|
33
|
+
"Parameter 'pathString' must be a string, not " + typeof pathString
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
var allParts = win32SplitPath(pathString);
|
|
37
|
+
if (!allParts || allParts.length !== 4) {
|
|
38
|
+
throw new TypeError("Invalid path '" + pathString + "'");
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
root: allParts[0],
|
|
42
|
+
dir: allParts[0] + allParts[1].slice(0, -1),
|
|
43
|
+
base: allParts[2],
|
|
44
|
+
ext: allParts[3],
|
|
45
|
+
name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
// Split a filename into [root, dir, basename, ext], unix version
|
|
52
|
+
// 'root' is just a slash, or nothing.
|
|
53
|
+
var splitPathRe =
|
|
54
|
+
/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
|
55
|
+
var posix = {};
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
function posixSplitPath(filename) {
|
|
59
|
+
return splitPathRe.exec(filename).slice(1);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
posix.parse = function(pathString) {
|
|
64
|
+
if (typeof pathString !== 'string') {
|
|
65
|
+
throw new TypeError(
|
|
66
|
+
"Parameter 'pathString' must be a string, not " + typeof pathString
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
var allParts = posixSplitPath(pathString);
|
|
70
|
+
if (!allParts || allParts.length !== 4) {
|
|
71
|
+
throw new TypeError("Invalid path '" + pathString + "'");
|
|
72
|
+
}
|
|
73
|
+
allParts[1] = allParts[1] || '';
|
|
74
|
+
allParts[2] = allParts[2] || '';
|
|
75
|
+
allParts[3] = allParts[3] || '';
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
root: allParts[0],
|
|
79
|
+
dir: allParts[0] + allParts[1].slice(0, -1),
|
|
80
|
+
base: allParts[2],
|
|
81
|
+
ext: allParts[3],
|
|
82
|
+
name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
if (isWindows)
|
|
88
|
+
module.exports = win32.parse;
|
|
89
|
+
else /* posix */
|
|
90
|
+
module.exports = posix.parse;
|
|
91
|
+
|
|
92
|
+
module.exports.posix = posix.parse;
|
|
93
|
+
module.exports.win32 = win32.parse;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_args": [
|
|
3
|
+
[
|
|
4
|
+
"path-parse@1.0.6",
|
|
5
|
+
"/usr/src/npm/nyc"
|
|
6
|
+
]
|
|
7
|
+
],
|
|
8
|
+
"_from": "path-parse@1.0.6",
|
|
9
|
+
"_id": "path-parse@1.0.6",
|
|
10
|
+
"_inBundle": false,
|
|
11
|
+
"_integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
|
12
|
+
"_location": "/path-parse",
|
|
13
|
+
"_phantomChildren": {},
|
|
14
|
+
"_requested": {
|
|
15
|
+
"type": "version",
|
|
16
|
+
"registry": true,
|
|
17
|
+
"raw": "path-parse@1.0.6",
|
|
18
|
+
"name": "path-parse",
|
|
19
|
+
"escapedName": "path-parse",
|
|
20
|
+
"rawSpec": "1.0.6",
|
|
21
|
+
"saveSpec": null,
|
|
22
|
+
"fetchSpec": "1.0.6"
|
|
23
|
+
},
|
|
24
|
+
"_requiredBy": [
|
|
25
|
+
"/resolve"
|
|
26
|
+
],
|
|
27
|
+
"_resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
|
28
|
+
"_spec": "1.0.6",
|
|
29
|
+
"_where": "/usr/src/npm/nyc",
|
|
30
|
+
"author": {
|
|
31
|
+
"name": "Javier Blanco",
|
|
32
|
+
"email": "http://jbgutierrez.info"
|
|
33
|
+
},
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/jbgutierrez/path-parse/issues"
|
|
36
|
+
},
|
|
37
|
+
"description": "Node.js path.parse() ponyfill",
|
|
38
|
+
"homepage": "https://github.com/jbgutierrez/path-parse#readme",
|
|
39
|
+
"keywords": [
|
|
40
|
+
"path",
|
|
41
|
+
"paths",
|
|
42
|
+
"file",
|
|
43
|
+
"dir",
|
|
44
|
+
"parse",
|
|
45
|
+
"built-in",
|
|
46
|
+
"util",
|
|
47
|
+
"utils",
|
|
48
|
+
"core",
|
|
49
|
+
"ponyfill",
|
|
50
|
+
"polyfill",
|
|
51
|
+
"shim"
|
|
52
|
+
],
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"main": "index.js",
|
|
55
|
+
"name": "path-parse",
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/jbgutierrez/path-parse.git"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"test": "node test.js"
|
|
62
|
+
},
|
|
63
|
+
"version": "1.0.6"
|
|
64
|
+
}
|