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.
Files changed (140) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/commands/report.js +40 -0
  3. package/lib/instrumenters/istanbul.js +6 -12
  4. package/lib/instrumenters/noop.js +5 -5
  5. package/node_modules/arrify/package.json +1 -2
  6. package/node_modules/async/CHANGELOG.md +3 -0
  7. package/node_modules/async/package.json +11 -11
  8. package/node_modules/handlebars/dist/amd/handlebars/base.js +2 -2
  9. package/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +4 -1
  10. package/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js +3 -5
  11. package/node_modules/handlebars/dist/cjs/handlebars/base.js +2 -2
  12. package/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +4 -1
  13. package/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +3 -5
  14. package/node_modules/handlebars/dist/handlebars.amd.js +10 -9
  15. package/node_modules/handlebars/dist/handlebars.amd.min.js +4 -4
  16. package/node_modules/handlebars/dist/handlebars.js +7 -6
  17. package/node_modules/handlebars/dist/handlebars.min.js +4 -4
  18. package/node_modules/handlebars/dist/handlebars.runtime.amd.js +3 -3
  19. package/node_modules/handlebars/dist/handlebars.runtime.amd.min.js +2 -2
  20. package/node_modules/handlebars/dist/handlebars.runtime.js +2 -2
  21. package/node_modules/handlebars/dist/handlebars.runtime.min.js +2 -2
  22. package/node_modules/handlebars/lib/handlebars/base.js +1 -1
  23. package/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +3 -0
  24. package/node_modules/handlebars/lib/handlebars/compiler/parser.js +9 -9
  25. package/node_modules/handlebars/lib/handlebars.d.ts +356 -0
  26. package/node_modules/handlebars/package.json +12 -11
  27. package/node_modules/handlebars/release-notes.md +38 -1
  28. package/node_modules/istanbul-reports/CHANGELOG.md +11 -0
  29. package/node_modules/istanbul-reports/package.json +12 -12
  30. package/node_modules/mem/index.js +5 -1
  31. package/node_modules/mem/package.json +14 -14
  32. package/node_modules/normalize-package-data/README.md +1 -1
  33. package/node_modules/normalize-package-data/lib/fixer.js +3 -2
  34. package/node_modules/normalize-package-data/package.json +13 -13
  35. package/node_modules/p-is-promise/index.d.ts +13 -0
  36. package/node_modules/p-is-promise/index.js +10 -6
  37. package/node_modules/p-is-promise/license +4 -16
  38. package/node_modules/p-is-promise/package.json +17 -18
  39. package/node_modules/p-is-promise/readme.md +1 -1
  40. package/node_modules/path-parse/.travis.yml +9 -0
  41. package/node_modules/{is-builtin-module/license → path-parse/LICENSE} +5 -5
  42. package/node_modules/path-parse/README.md +42 -0
  43. package/node_modules/path-parse/index.js +93 -0
  44. package/node_modules/path-parse/package.json +64 -0
  45. package/node_modules/path-parse/test.js +77 -0
  46. package/node_modules/resolve/.editorconfig +20 -0
  47. package/node_modules/resolve/.eslintignore +1 -0
  48. package/node_modules/resolve/.eslintrc +31 -0
  49. package/node_modules/resolve/.travis.yml +269 -0
  50. package/node_modules/resolve/CHANGELOG.md +629 -0
  51. package/node_modules/resolve/LICENSE +18 -0
  52. package/node_modules/resolve/appveyor.yml +47 -0
  53. package/node_modules/resolve/changelog.hbs +36 -0
  54. package/node_modules/resolve/example/async.js +5 -0
  55. package/node_modules/resolve/example/sync.js +3 -0
  56. package/node_modules/resolve/index.js +8 -0
  57. package/node_modules/resolve/lib/async.js +229 -0
  58. package/node_modules/resolve/lib/caller.js +8 -0
  59. package/node_modules/resolve/lib/core.js +53 -0
  60. package/node_modules/resolve/lib/core.json +73 -0
  61. package/node_modules/resolve/lib/node-modules-paths.js +42 -0
  62. package/node_modules/resolve/lib/normalize-options.js +10 -0
  63. package/node_modules/resolve/lib/sync.js +154 -0
  64. package/node_modules/resolve/package.json +77 -0
  65. package/node_modules/resolve/readme.markdown +179 -0
  66. package/node_modules/resolve/test/.eslintrc +5 -0
  67. package/node_modules/resolve/test/core.js +82 -0
  68. package/node_modules/resolve/test/dotdot/abc/index.js +2 -0
  69. package/node_modules/resolve/test/dotdot/index.js +1 -0
  70. package/node_modules/resolve/test/dotdot.js +29 -0
  71. package/node_modules/resolve/test/faulty_basedir.js +29 -0
  72. package/node_modules/resolve/test/filter.js +34 -0
  73. package/node_modules/resolve/test/filter_sync.js +26 -0
  74. package/node_modules/resolve/test/mock.js +143 -0
  75. package/node_modules/resolve/test/mock_sync.js +67 -0
  76. package/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
  77. package/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
  78. package/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
  79. package/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
  80. package/node_modules/resolve/test/module_dir.js +56 -0
  81. package/node_modules/resolve/test/node-modules-paths.js +121 -0
  82. package/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
  83. package/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
  84. package/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
  85. package/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
  86. package/node_modules/resolve/test/node_path.js +70 -0
  87. package/node_modules/resolve/test/nonstring.js +9 -0
  88. package/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
  89. package/node_modules/resolve/test/pathfilter.js +75 -0
  90. package/node_modules/resolve/test/precedence/aaa/index.js +1 -0
  91. package/node_modules/resolve/test/precedence/aaa/main.js +1 -0
  92. package/node_modules/resolve/test/precedence/aaa.js +1 -0
  93. package/node_modules/resolve/test/precedence/bbb/main.js +1 -0
  94. package/node_modules/resolve/test/precedence/bbb.js +1 -0
  95. package/node_modules/resolve/test/precedence.js +23 -0
  96. package/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  97. package/node_modules/resolve/test/resolver/baz/package.json +3 -0
  98. package/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  99. package/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
  100. package/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
  101. package/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
  102. package/node_modules/resolve/test/resolver/cup.coffee +1 -0
  103. package/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
  104. package/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
  105. package/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
  106. package/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
  107. package/node_modules/resolve/test/resolver/foo.js +1 -0
  108. package/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
  109. package/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
  110. package/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
  111. package/node_modules/resolve/test/resolver/mug.coffee +0 -0
  112. package/node_modules/resolve/test/resolver/mug.js +0 -0
  113. package/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
  114. package/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
  115. package/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
  116. package/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
  117. package/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
  118. package/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
  119. package/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  120. package/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  121. package/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
  122. package/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
  123. package/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
  124. package/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
  125. package/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
  126. package/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
  127. package/node_modules/resolve/test/resolver.js +429 -0
  128. package/node_modules/resolve/test/resolver_sync.js +340 -0
  129. package/node_modules/resolve/test/subdirs.js +13 -0
  130. package/node_modules/resolve/test/symlinks.js +56 -0
  131. package/package.json +3 -3
  132. package/node_modules/builtin-modules/builtin-modules.json +0 -35
  133. package/node_modules/builtin-modules/index.js +0 -10
  134. package/node_modules/builtin-modules/license +0 -21
  135. package/node_modules/builtin-modules/package.json +0 -75
  136. package/node_modules/builtin-modules/readme.md +0 -41
  137. package/node_modules/builtin-modules/static.js +0 -2
  138. package/node_modules/is-builtin-module/index.js +0 -10
  139. package/node_modules/is-builtin-module/package.json +0 -78
  140. 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.0",
4
+ "istanbul-reports@2.1.1",
5
5
  "/usr/src/npm/nyc"
6
6
  ]
7
7
  ],
8
- "_from": "istanbul-reports@2.1.0",
9
- "_id": "istanbul-reports@2.1.0",
8
+ "_from": "istanbul-reports@2.1.1",
9
+ "_id": "istanbul-reports@2.1.1",
10
10
  "_inBundle": false,
11
- "_integrity": "sha512-azQdSX+dtTtkQEfqq20ICxWi6eOHXyHIgMFw1VOOVi8iIPWeCWRgCyFh/CsBKIhcgskMI8ExXmU7rjXTRCIJ+A==",
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.0",
17
+ "raw": "istanbul-reports@2.1.1",
18
18
  "name": "istanbul-reports",
19
19
  "escapedName": "istanbul-reports",
20
- "rawSpec": "2.1.0",
20
+ "rawSpec": "2.1.1",
21
21
  "saveSpec": null,
22
- "fetchSpec": "2.1.0"
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.0.tgz",
28
- "_spec": "2.1.0",
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.11"
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": "7875defdc3c3640787ac5d83700246de119e8b83",
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.0"
68
+ "version": "2.1.1"
69
69
  }
@@ -66,7 +66,11 @@ module.exports = (fn, options) => {
66
66
  return ret;
67
67
  };
68
68
 
69
- mimicFn(memoized, fn);
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.0.0",
4
+ "mem@4.1.0",
5
5
  "/usr/src/npm/nyc"
6
6
  ]
7
7
  ],
8
- "_from": "mem@4.0.0",
9
- "_id": "mem@4.0.0",
8
+ "_from": "mem@4.1.0",
9
+ "_id": "mem@4.1.0",
10
10
  "_inBundle": false,
11
- "_integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==",
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.0.0",
17
+ "raw": "mem@4.1.0",
18
18
  "name": "mem",
19
19
  "escapedName": "mem",
20
- "rawSpec": "4.0.0",
20
+ "rawSpec": "4.1.0",
21
21
  "saveSpec": null,
22
- "fetchSpec": "4.0.0"
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.0.0.tgz",
28
- "_spec": "4.0.0",
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": "^1.1.0"
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": "^3.0.0",
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.0.0"
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/packages/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license).
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("is-builtin-module")
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.0",
4
+ "normalize-package-data@2.5.0",
5
5
  "/usr/src/npm/nyc"
6
6
  ]
7
7
  ],
8
- "_from": "normalize-package-data@2.4.0",
9
- "_id": "normalize-package-data@2.4.0",
8
+ "_from": "normalize-package-data@2.5.0",
9
+ "_id": "normalize-package-data@2.5.0",
10
10
  "_inBundle": false,
11
- "_integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
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.4.0",
17
+ "raw": "normalize-package-data@2.5.0",
18
18
  "name": "normalize-package-data",
19
19
  "escapedName": "normalize-package-data",
20
- "rawSpec": "2.4.0",
20
+ "rawSpec": "2.5.0",
21
21
  "saveSpec": null,
22
- "fetchSpec": "2.4.0"
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.4.0.tgz",
38
- "_spec": "2.4.0",
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
- "is-builtin-module": "^1.0.0",
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": "^1.5.0",
70
- "tap": "^2.2.0",
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.4.0"
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
- module.exports = x => (
3
- x instanceof Promise ||
2
+
3
+ const isPromise = input => (
4
+ input instanceof Promise ||
4
5
  (
5
- x !== null &&
6
- typeof x === 'object' &&
7
- typeof x.then === 'function' &&
8
- typeof x.catch === 'function'
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
- The MIT License (MIT)
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@1.1.0",
4
+ "p-is-promise@2.0.0",
5
5
  "/usr/src/npm/nyc"
6
6
  ]
7
7
  ],
8
- "_from": "p-is-promise@1.1.0",
9
- "_id": "p-is-promise@1.1.0",
8
+ "_from": "p-is-promise@2.0.0",
9
+ "_id": "p-is-promise@2.0.0",
10
10
  "_inBundle": false,
11
- "_integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=",
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@1.1.0",
17
+ "raw": "p-is-promise@2.0.0",
18
18
  "name": "p-is-promise",
19
19
  "escapedName": "p-is-promise",
20
- "rawSpec": "1.1.0",
20
+ "rawSpec": "2.0.0",
21
21
  "saveSpec": null,
22
- "fetchSpec": "1.1.0"
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-1.1.0.tgz",
28
- "_spec": "1.1.0",
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
- "xo": "*"
42
+ "tsd-check": "^0.2.1",
43
+ "xo": "^0.23.0"
43
44
  },
44
45
  "engines": {
45
- "node": ">=4"
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": "1.1.0",
75
- "xo": {
76
- "esnext": true
77
- }
76
+ "version": "2.0.0"
78
77
  }
@@ -12,7 +12,7 @@ Can be useful if you need to create a fast path for a synchronous operation.
12
12
  ## Install
13
13
 
14
14
  ```
15
- $ npm install --save p-is-promise
15
+ $ npm install p-is-promise
16
16
  ```
17
17
 
18
18
 
@@ -0,0 +1,9 @@
1
+ language: node_js
2
+ node_js:
3
+ - "0.12"
4
+ - "0.11"
5
+ - "0.10"
6
+ - "0.10.12"
7
+ - "0.8"
8
+ - "0.6"
9
+ - "iojs"
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
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
- all copies or substantial portions of the Software.
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
- THE SOFTWARE.
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 [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](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
+ }