snyk-nodejs-lockfile-parser 1.14.0 → 1.17.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.
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var InvalidUserInputError = /** @class */ (function (_super) {
5
- tslib_1.__extends(InvalidUserInputError, _super);
6
- function InvalidUserInputError() {
7
- var args = [];
8
- for (var _i = 0; _i < arguments.length; _i++) {
9
- args[_i] = arguments[_i];
10
- }
11
- var _this = _super.apply(this, args) || this;
12
- _this.code = 422;
13
- _this.name = 'InvalidUserInputError';
14
- Error.captureStackTrace(_this, InvalidUserInputError);
15
- return _this;
3
+ class InvalidUserInputError extends Error {
4
+ constructor(...args) {
5
+ super(...args);
6
+ this.code = 422;
7
+ this.name = 'InvalidUserInputError';
8
+ Error.captureStackTrace(this, InvalidUserInputError);
16
9
  }
17
- return InvalidUserInputError;
18
- }(Error));
10
+ }
19
11
  exports.InvalidUserInputError = InvalidUserInputError;
20
12
  //# sourceMappingURL=invalid-user-input-error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-user-input-error.js","sourceRoot":"","sources":["../../lib/errors/invalid-user-input-error.ts"],"names":[],"mappings":";;;AAAA;IAA2C,iDAAK;IAI9C;QAAY,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAAnB,+BACW,IAAI,UAEd;QANM,UAAI,GAAG,GAAG,CAAC;QACX,UAAI,GAAG,uBAAuB,CAAC;QAIpC,KAAK,CAAC,iBAAiB,CAAC,KAAI,EAAE,qBAAqB,CAAC,CAAC;;IACvD,CAAC;IACH,4BAAC;AAAD,CAAC,AARD,CAA2C,KAAK,GAQ/C;AARY,sDAAqB"}
1
+ {"version":3,"file":"invalid-user-input-error.js","sourceRoot":"","sources":["../../lib/errors/invalid-user-input-error.ts"],"names":[],"mappings":";;AAAA,MAAa,qBAAsB,SAAQ,KAAK;IAI9C,YAAY,GAAG,IAAI;QACjB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QAJV,SAAI,GAAG,GAAG,CAAC;QACX,SAAI,GAAG,uBAAuB,CAAC;QAIpC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IACvD,CAAC;CACF;AARD,sDAQC"}
@@ -1,29 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var LOCK_FILE_NAME = {
3
+ const LOCK_FILE_NAME = {
5
4
  npm: 'package-lock.json',
6
5
  yarn: 'yarn.lock',
7
6
  };
8
- var INSTALL_COMMAND = {
7
+ const INSTALL_COMMAND = {
9
8
  npm: 'npm install',
10
9
  yarn: 'yarn install',
11
10
  };
12
- var OutOfSyncError = /** @class */ (function (_super) {
13
- tslib_1.__extends(OutOfSyncError, _super);
14
- function OutOfSyncError(dependencyName, lockFileType) {
15
- var _this = _super.call(this, "Dependency " + dependencyName + " was not found in " +
16
- (LOCK_FILE_NAME[lockFileType] + ". Your package.json and ") +
17
- (LOCK_FILE_NAME[lockFileType] + " are probably out of sync. Please run ") +
18
- ("\"" + INSTALL_COMMAND[lockFileType] + "\" and try again.")) || this;
19
- _this.code = 422;
20
- _this.name = 'OutOfSyncError';
21
- _this.dependencyName = dependencyName;
22
- _this.lockFileType = lockFileType;
23
- Error.captureStackTrace(_this, OutOfSyncError);
24
- return _this;
11
+ class OutOfSyncError extends Error {
12
+ constructor(dependencyName, lockFileType) {
13
+ super(`Dependency ${dependencyName} was not found in ` +
14
+ `${LOCK_FILE_NAME[lockFileType]}. Your package.json and ` +
15
+ `${LOCK_FILE_NAME[lockFileType]} are probably out of sync. Please run ` +
16
+ `"${INSTALL_COMMAND[lockFileType]}" and try again.`);
17
+ this.code = 422;
18
+ this.name = 'OutOfSyncError';
19
+ this.dependencyName = dependencyName;
20
+ this.lockFileType = lockFileType;
21
+ Error.captureStackTrace(this, OutOfSyncError);
25
22
  }
26
- return OutOfSyncError;
27
- }(Error));
23
+ }
28
24
  exports.OutOfSyncError = OutOfSyncError;
29
25
  //# sourceMappingURL=out-of-sync-error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"out-of-sync-error.js","sourceRoot":"","sources":["../../lib/errors/out-of-sync-error.ts"],"names":[],"mappings":";;;AAAA,IAAM,cAAc,GAAG;IACrB,GAAG,EAAE,mBAAmB;IACxB,IAAI,EAAE,WAAW;CAClB,CAAC;AAEF,IAAM,eAAe,GAAG;IACtB,GAAG,EAAE,aAAa;IAClB,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF;IAAoC,0CAAK;IAMvC,wBAAY,cAAsB,EAAE,YAA4B;QAAhE,YACE,kBAAM,gBAAc,cAAc,uBAAoB;aACjD,cAAc,CAAC,YAAY,CAAC,6BAA0B,CAAA;aACtD,cAAc,CAAC,YAAY,CAAC,2CAAwC,CAAA;aACvE,OAAI,eAAe,CAAC,YAAY,CAAC,sBAAkB,CAAA,CAAC,SAIvD;QAbM,UAAI,GAAG,GAAG,CAAC;QACX,UAAI,GAAG,gBAAgB,CAAC;QAS7B,KAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,KAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAK,CAAC,iBAAiB,CAAC,KAAI,EAAE,cAAc,CAAC,CAAC;;IAChD,CAAC;IACH,qBAAC;AAAD,CAAC,AAfD,CAAoC,KAAK,GAexC;AAfY,wCAAc"}
1
+ {"version":3,"file":"out-of-sync-error.js","sourceRoot":"","sources":["../../lib/errors/out-of-sync-error.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG;IACrB,GAAG,EAAE,mBAAmB;IACxB,IAAI,EAAE,WAAW;CAClB,CAAC;AAEF,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,aAAa;IAClB,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF,MAAa,cAAe,SAAQ,KAAK;IAMvC,YAAY,cAAsB,EAAE,YAA4B;QAC9D,KAAK,CAAC,cAAc,cAAc,oBAAoB;YACpD,GAAG,cAAc,CAAC,YAAY,CAAC,0BAA0B;YACzD,GAAG,cAAc,CAAC,YAAY,CAAC,wCAAwC;YACvE,IAAI,eAAe,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;QATlD,SAAI,GAAG,GAAG,CAAC;QACX,SAAI,GAAG,gBAAgB,CAAC;QAS7B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC;CACF;AAfD,wCAeC"}
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var UnsupportedRuntimeError = /** @class */ (function (_super) {
5
- tslib_1.__extends(UnsupportedRuntimeError, _super);
6
- function UnsupportedRuntimeError() {
7
- var args = [];
8
- for (var _i = 0; _i < arguments.length; _i++) {
9
- args[_i] = arguments[_i];
10
- }
11
- var _this = _super.apply(this, args) || this;
12
- _this.name = 'UnsupportedRuntimeError';
13
- _this.code = 500;
14
- Error.captureStackTrace(_this, UnsupportedRuntimeError);
15
- return _this;
3
+ class UnsupportedRuntimeError extends Error {
4
+ constructor(...args) {
5
+ super(...args);
6
+ this.name = 'UnsupportedRuntimeError';
7
+ this.code = 500;
8
+ Error.captureStackTrace(this, UnsupportedRuntimeError);
16
9
  }
17
- return UnsupportedRuntimeError;
18
- }(Error));
10
+ }
19
11
  exports.UnsupportedRuntimeError = UnsupportedRuntimeError;
20
12
  //# sourceMappingURL=unsupported-runtime-error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unsupported-runtime-error.js","sourceRoot":"","sources":["../../lib/errors/unsupported-runtime-error.ts"],"names":[],"mappings":";;;AAAA;IAA6C,mDAAK;IAIhD;QAAY,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAAnB,+BACW,IAAI,UAEd;QANM,UAAI,GAAG,yBAAyB,CAAC;QACjC,UAAI,GAAG,GAAG,CAAC;QAIhB,KAAK,CAAC,iBAAiB,CAAC,KAAI,EAAE,uBAAuB,CAAC,CAAC;;IACzD,CAAC;IACH,8BAAC;AAAD,CAAC,AARD,CAA6C,KAAK,GAQjD;AARY,0DAAuB"}
1
+ {"version":3,"file":"unsupported-runtime-error.js","sourceRoot":"","sources":["../../lib/errors/unsupported-runtime-error.ts"],"names":[],"mappings":";;AAAA,MAAa,uBAAwB,SAAQ,KAAK;IAIhD,YAAY,GAAG,IAAI;QACjB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QAJV,SAAI,GAAG,yBAAyB,CAAC;QACjC,SAAI,GAAG,GAAG,CAAC;QAIhB,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC;IACzD,CAAC;CACF;AARD,0DAQC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import 'source-map-support/register';
2
- import { PkgTree, DepType, LockfileType, getYarnWorkspaces } from './parsers';
2
+ import { PkgTree, Scope, LockfileType, getYarnWorkspaces } from './parsers';
3
3
  import { UnsupportedRuntimeError, InvalidUserInputError, OutOfSyncError } from './errors';
4
- export { buildDepTree, buildDepTreeFromFiles, getYarnWorkspacesFromFiles, getYarnWorkspaces, PkgTree, DepType, LockfileType, UnsupportedRuntimeError, InvalidUserInputError, OutOfSyncError, };
4
+ export { buildDepTree, buildDepTreeFromFiles, getYarnWorkspacesFromFiles, getYarnWorkspaces, PkgTree, Scope, LockfileType, UnsupportedRuntimeError, InvalidUserInputError, OutOfSyncError, };
5
5
  declare function buildDepTree(manifestFileContents: string, lockFileContents: string, includeDev?: boolean, lockfileType?: LockfileType, strict?: boolean, defaultManifestFileName?: string): Promise<PkgTree>;
6
6
  declare function buildDepTreeFromFiles(root: string, manifestFilePath: string, lockFilePath: string, includeDev?: boolean, strict?: boolean): Promise<PkgTree>;
7
7
  declare function getYarnWorkspacesFromFiles(root: any, manifestFilePath: string): string[] | false;
package/dist/index.js CHANGED
@@ -1,98 +1,85 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
3
+ const tslib_1 = require("tslib");
4
4
  require("source-map-support/register");
5
- var fs = require("fs");
6
- var path = require("path");
7
- var _ = require("lodash");
8
- var parsers_1 = require("./parsers");
9
- exports.DepType = parsers_1.DepType;
5
+ const fs = require("fs");
6
+ const path = require("path");
7
+ const _ = require("lodash");
8
+ const parsers_1 = require("./parsers");
9
+ exports.Scope = parsers_1.Scope;
10
10
  exports.LockfileType = parsers_1.LockfileType;
11
11
  exports.getYarnWorkspaces = parsers_1.getYarnWorkspaces;
12
- var package_lock_parser_1 = require("./parsers/package-lock-parser");
13
- var yarn_lock_parse_1 = require("./parsers/yarn-lock-parse");
14
- var get_node_runtime_version_1 = require("./get-node-runtime-version");
15
- var errors_1 = require("./errors");
12
+ const package_lock_parser_1 = require("./parsers/package-lock-parser");
13
+ const yarn_lock_parse_1 = require("./parsers/yarn-lock-parse");
14
+ const get_node_runtime_version_1 = require("./get-node-runtime-version");
15
+ const errors_1 = require("./errors");
16
16
  exports.UnsupportedRuntimeError = errors_1.UnsupportedRuntimeError;
17
17
  exports.InvalidUserInputError = errors_1.InvalidUserInputError;
18
18
  exports.OutOfSyncError = errors_1.OutOfSyncError;
19
- function buildDepTree(manifestFileContents, lockFileContents, includeDev, lockfileType, strict, defaultManifestFileName) {
20
- if (includeDev === void 0) { includeDev = false; }
21
- if (strict === void 0) { strict = true; }
22
- if (defaultManifestFileName === void 0) { defaultManifestFileName = 'package.json'; }
23
- return tslib_1.__awaiter(this, void 0, void 0, function () {
24
- var lockfileParser, manifestFile, lockFile;
25
- return tslib_1.__generator(this, function (_a) {
26
- if (!lockfileType) {
27
- lockfileType = parsers_1.LockfileType.npm;
28
- }
29
- switch (lockfileType) {
30
- case parsers_1.LockfileType.npm:
31
- lockfileParser = new package_lock_parser_1.PackageLockParser();
32
- break;
33
- case parsers_1.LockfileType.yarn:
34
- // parsing yarn.lock is supported for Node.js v6 and higher
35
- if (get_node_runtime_version_1.default() >= 6) {
36
- lockfileParser = new yarn_lock_parse_1.YarnLockParser();
37
- }
38
- else {
39
- throw new errors_1.UnsupportedRuntimeError('Parsing `yarn.lock` is not ' +
40
- 'supported on Node.js version less than 6. Please upgrade your ' +
41
- 'Node.js environment or use `package-lock.json`');
42
- }
43
- break;
44
- default:
45
- throw new errors_1.InvalidUserInputError('Unsupported lockfile type ' +
46
- (lockfileType + " provided. Only 'npm' or 'yarn' is currently ") +
47
- 'supported.');
48
- }
49
- manifestFile = parsers_1.parseManifestFile(manifestFileContents);
50
- if (!manifestFile.name) {
51
- manifestFile.name = defaultManifestFileName;
52
- }
53
- lockFile = lockfileParser.parseLockFile(lockFileContents);
54
- return [2 /*return*/, lockfileParser.getDependencyTree(manifestFile, lockFile, includeDev, strict)];
55
- });
19
+ function buildDepTree(manifestFileContents, lockFileContents, includeDev = false, lockfileType, strict = true, defaultManifestFileName = 'package.json') {
20
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
21
+ if (!lockfileType) {
22
+ lockfileType = parsers_1.LockfileType.npm;
23
+ }
24
+ let lockfileParser;
25
+ switch (lockfileType) {
26
+ case parsers_1.LockfileType.npm:
27
+ lockfileParser = new package_lock_parser_1.PackageLockParser();
28
+ break;
29
+ case parsers_1.LockfileType.yarn:
30
+ // parsing yarn.lock is supported for Node.js v6 and higher
31
+ if (get_node_runtime_version_1.default() >= 6) {
32
+ lockfileParser = new yarn_lock_parse_1.YarnLockParser();
33
+ }
34
+ else {
35
+ throw new errors_1.UnsupportedRuntimeError('Parsing `yarn.lock` is not ' +
36
+ 'supported on Node.js version less than 6. Please upgrade your ' +
37
+ 'Node.js environment or use `package-lock.json`');
38
+ }
39
+ break;
40
+ default:
41
+ throw new errors_1.InvalidUserInputError('Unsupported lockfile type ' +
42
+ `${lockfileType} provided. Only 'npm' or 'yarn' is currently ` +
43
+ 'supported.');
44
+ }
45
+ const manifestFile = parsers_1.parseManifestFile(manifestFileContents);
46
+ if (!manifestFile.name) {
47
+ manifestFile.name = defaultManifestFileName;
48
+ }
49
+ const lockFile = lockfileParser.parseLockFile(lockFileContents);
50
+ return lockfileParser.getDependencyTree(manifestFile, lockFile, includeDev, strict);
56
51
  });
57
52
  }
58
53
  exports.buildDepTree = buildDepTree;
59
- function buildDepTreeFromFiles(root, manifestFilePath, lockFilePath, includeDev, strict) {
60
- if (includeDev === void 0) { includeDev = false; }
61
- if (strict === void 0) { strict = true; }
62
- return tslib_1.__awaiter(this, void 0, void 0, function () {
63
- var lockFileType, manifestFileFullPath, lockFileFullPath, manifestFileContents, lockFileContents;
64
- return tslib_1.__generator(this, function (_a) {
65
- switch (_a.label) {
66
- case 0:
67
- if (!root || !manifestFilePath || !lockFilePath) {
68
- throw new Error('Missing required parameters for buildDepTreeFromFiles()');
69
- }
70
- if (_.endsWith(lockFilePath, 'package-lock.json')) {
71
- lockFileType = parsers_1.LockfileType.npm;
72
- }
73
- else if (_.endsWith(lockFilePath, 'yarn.lock')) {
74
- lockFileType = parsers_1.LockfileType.yarn;
75
- }
76
- else {
77
- throw new errors_1.InvalidUserInputError("Unknown lockfile " + lockFilePath + ". " +
78
- 'Please provide either package-lock.json or yarn.lock.');
79
- }
80
- manifestFileFullPath = path.resolve(root, manifestFilePath);
81
- lockFileFullPath = path.resolve(root, lockFilePath);
82
- if (!fs.existsSync(manifestFileFullPath)) {
83
- throw new errors_1.InvalidUserInputError('Target file package.json not found at ' +
84
- ("location: " + manifestFileFullPath));
85
- }
86
- if (!fs.existsSync(lockFileFullPath)) {
87
- throw new errors_1.InvalidUserInputError('Lockfile not found at location: ' +
88
- lockFileFullPath);
89
- }
90
- manifestFileContents = fs.readFileSync(manifestFileFullPath, 'utf-8');
91
- lockFileContents = fs.readFileSync(lockFileFullPath, 'utf-8');
92
- return [4 /*yield*/, buildDepTree(manifestFileContents, lockFileContents, includeDev, lockFileType, strict, manifestFilePath)];
93
- case 1: return [2 /*return*/, _a.sent()];
94
- }
95
- });
54
+ function buildDepTreeFromFiles(root, manifestFilePath, lockFilePath, includeDev = false, strict = true) {
55
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
56
+ if (!root || !manifestFilePath || !lockFilePath) {
57
+ throw new Error('Missing required parameters for buildDepTreeFromFiles()');
58
+ }
59
+ let lockFileType;
60
+ if (_.endsWith(lockFilePath, 'package-lock.json')) {
61
+ lockFileType = parsers_1.LockfileType.npm;
62
+ }
63
+ else if (_.endsWith(lockFilePath, 'yarn.lock')) {
64
+ lockFileType = parsers_1.LockfileType.yarn;
65
+ }
66
+ else {
67
+ throw new errors_1.InvalidUserInputError(`Unknown lockfile ${lockFilePath}. ` +
68
+ 'Please provide either package-lock.json or yarn.lock.');
69
+ }
70
+ const manifestFileFullPath = path.resolve(root, manifestFilePath);
71
+ const lockFileFullPath = path.resolve(root, lockFilePath);
72
+ if (!fs.existsSync(manifestFileFullPath)) {
73
+ throw new errors_1.InvalidUserInputError('Target file package.json not found at ' +
74
+ `location: ${manifestFileFullPath}`);
75
+ }
76
+ if (!fs.existsSync(lockFileFullPath)) {
77
+ throw new errors_1.InvalidUserInputError('Lockfile not found at location: ' +
78
+ lockFileFullPath);
79
+ }
80
+ const manifestFileContents = fs.readFileSync(manifestFileFullPath, 'utf-8');
81
+ const lockFileContents = fs.readFileSync(lockFileFullPath, 'utf-8');
82
+ return yield buildDepTree(manifestFileContents, lockFileContents, includeDev, lockFileType, strict, manifestFilePath);
96
83
  });
97
84
  }
98
85
  exports.buildDepTreeFromFiles = buildDepTreeFromFiles;
@@ -100,12 +87,12 @@ function getYarnWorkspacesFromFiles(root, manifestFilePath) {
100
87
  if (!root || !manifestFilePath) {
101
88
  throw new Error('Missing required parameters for getYarnWorkspacesFromFiles()');
102
89
  }
103
- var manifestFileFullPath = path.resolve(root, manifestFilePath);
90
+ const manifestFileFullPath = path.resolve(root, manifestFilePath);
104
91
  if (!fs.existsSync(manifestFileFullPath)) {
105
92
  throw new errors_1.InvalidUserInputError('Target file package.json not found at ' +
106
- ("location: " + manifestFileFullPath));
93
+ `location: ${manifestFileFullPath}`);
107
94
  }
108
- var manifestFileContents = fs.readFileSync(manifestFileFullPath, 'utf-8');
95
+ const manifestFileContents = fs.readFileSync(manifestFileFullPath, 'utf-8');
109
96
  return parsers_1.getYarnWorkspaces(manifestFileContents);
110
97
  }
111
98
  exports.getYarnWorkspacesFromFiles = getYarnWorkspacesFromFiles;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AACrC,uBAAyB;AACzB,2BAA6B;AAC7B,0BAA4B;AAC5B,qCASmB;AAYjB,kBAhBA,iBAAO,CAgBA;AACP,uBAfA,sBAAY,CAeA;AAHZ,4BAXA,2BAAiB,CAWA;AATnB,qEAAgE;AAChE,6DAAyD;AACzD,uEAA2D;AAC3D,mCAAwF;AAUtF,kCAVM,gCAAuB,CAUN;AACvB,gCAX+B,8BAAqB,CAW/B;AACrB,yBAZsD,uBAAc,CAYtD;AAGhB,SAAe,YAAY,CACzB,oBAA4B,EAAE,gBAAwB,EACtD,UAAkB,EAAE,YAA2B,EAC/C,MAAsB,EAAE,uBAAgD;IADxE,2BAAA,EAAA,kBAAkB;IAClB,uBAAA,EAAA,aAAsB;IAAE,wCAAA,EAAA,wCAAgD;;;;YACxE,IAAI,CAAC,YAAY,EAAE;gBACjB,YAAY,GAAG,sBAAY,CAAC,GAAG,CAAC;aACjC;YAGD,QAAQ,YAAY,EAAE;gBACpB,KAAK,sBAAY,CAAC,GAAG;oBACnB,cAAc,GAAG,IAAI,uCAAiB,EAAE,CAAC;oBACzC,MAAM;gBACR,KAAK,sBAAY,CAAC,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,CAAC;SACxC;QACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;YACpC,MAAM,IAAI,8BAAqB,CAAC,kCAAkC;gBAChE,gBAAgB,CAAC,CAAC;SACrB;QAED,MAAM,oBAAoB,GAAG,EAAE,CAAC,YAAY,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAC5E,MAAM,gBAAgB,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAEpE,OAAO,MAAM,YAAY,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,UAAU,EAC1E,YAAY,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAAA;AAnFC,sDAAqB;AAqFvB,SAAS,0BAA0B,CAAC,IAAI,EAAE,gBAAwB;IAChE,IAAI,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;KACjF;IACD,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAClE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE;QACxC,MAAM,IAAI,8BAAqB,CAAC,wCAAwC;YACtE,aAAa,oBAAoB,EAAE,CAAC,CAAC;KACxC;IACD,MAAM,oBAAoB,GAAG,EAAE,CAAC,YAAY,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAE5E,OAAO,2BAAiB,CAAC,oBAAoB,CAAC,CAAC;AACjD,CAAC;AAhGC,gEAA0B"}
@@ -20,24 +20,33 @@ export interface ManifestFile {
20
20
  };
21
21
  version?: string;
22
22
  }
23
- export interface PkgTree {
24
- name: string;
25
- version: string;
23
+ export interface DepTreeDep {
24
+ name?: string;
25
+ version?: string;
26
+ dependencies?: {
27
+ [depName: string]: DepTreeDep;
28
+ };
29
+ labels?: {
30
+ [key: string]: string | undefined;
31
+ scope?: 'dev' | 'prod';
32
+ pruned?: 'cyclic' | 'true';
33
+ missingLockFileEntry?: 'true';
34
+ };
35
+ }
36
+ export interface PkgTree extends DepTreeDep {
37
+ type?: string;
38
+ packageFormatVersion?: string;
26
39
  dependencies: {
27
- [dep: string]: PkgTree;
40
+ [depName: string]: DepTreeDep;
28
41
  };
29
42
  meta?: {
30
43
  nodeVersion: string;
31
44
  };
32
- labels?: {
33
- depType: DepType;
34
- };
35
45
  hasDevDependencies?: boolean;
36
46
  cyclic?: boolean;
37
- missingLockFileEntry?: boolean;
38
47
  size?: number;
39
48
  }
40
- export declare enum DepType {
49
+ export declare enum Scope {
41
50
  prod = "prod",
42
51
  dev = "dev"
43
52
  }
@@ -52,5 +61,5 @@ export interface LockfileParser {
52
61
  export declare type Lockfile = PackageLock | YarnLock;
53
62
  export declare function parseManifestFile(manifestFileContents: string): ManifestFile;
54
63
  export declare function getTopLevelDeps(targetFile: ManifestFile, includeDev: boolean): Dep[];
55
- export declare function createPkgTreeFromDep(dep: Dep): PkgTree;
64
+ export declare function createDepTreeDepFromDep(dep: Dep): DepTreeDep;
56
65
  export declare function getYarnWorkspaces(targetFile: string): string[] | false;
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var _ = require("lodash");
5
- var errors_1 = require("../errors");
6
- var DepType;
7
- (function (DepType) {
8
- DepType["prod"] = "prod";
9
- DepType["dev"] = "dev";
10
- })(DepType = exports.DepType || (exports.DepType = {}));
3
+ const _ = require("lodash");
4
+ const errors_1 = require("../errors");
5
+ var Scope;
6
+ (function (Scope) {
7
+ Scope["prod"] = "prod";
8
+ Scope["dev"] = "dev";
9
+ })(Scope = exports.Scope || (exports.Scope = {}));
11
10
  var LockfileType;
12
11
  (function (LockfileType) {
13
12
  LockfileType["npm"] = "npm";
@@ -24,43 +23,40 @@ function parseManifestFile(manifestFileContents) {
24
23
  }
25
24
  exports.parseManifestFile = parseManifestFile;
26
25
  function getTopLevelDeps(targetFile, includeDev) {
27
- var dependencies = [];
28
- var dependenciesIterator = _.entries(tslib_1.__assign({}, targetFile.dependencies, (includeDev ? targetFile.devDependencies : null)));
29
- for (var _i = 0, dependenciesIterator_1 = dependenciesIterator; _i < dependenciesIterator_1.length; _i++) {
30
- var _a = dependenciesIterator_1[_i], name = _a[0], version = _a[1];
26
+ const dependencies = [];
27
+ const dependenciesIterator = _.entries(Object.assign({}, targetFile.dependencies, (includeDev ? targetFile.devDependencies : null)));
28
+ for (const [name, version] of dependenciesIterator) {
31
29
  dependencies.push({
32
30
  dev: (includeDev && targetFile.devDependencies) ?
33
31
  !!targetFile.devDependencies[name] : false,
34
- name: name,
35
- version: version,
32
+ name,
33
+ version,
36
34
  });
37
35
  }
38
36
  return dependencies;
39
37
  }
40
38
  exports.getTopLevelDeps = getTopLevelDeps;
41
- function createPkgTreeFromDep(dep) {
42
- var pkgTree = {
43
- dependencies: {},
39
+ function createDepTreeDepFromDep(dep) {
40
+ return {
44
41
  labels: {
45
- depType: dep.dev ? DepType.dev : DepType.prod,
42
+ scope: dep.dev ? Scope.dev : Scope.prod,
46
43
  },
47
44
  name: dep.name,
48
45
  version: dep.version,
49
46
  };
50
- return pkgTree;
51
47
  }
52
- exports.createPkgTreeFromDep = createPkgTreeFromDep;
48
+ exports.createDepTreeDepFromDep = createDepTreeDepFromDep;
53
49
  function getYarnWorkspaces(targetFile) {
54
50
  try {
55
- var packageJson = parseManifestFile(targetFile);
51
+ const packageJson = parseManifestFile(targetFile);
56
52
  if (!!packageJson.workspaces && !!packageJson.private) {
57
- return packageJson.workspaces.slice();
53
+ return [...packageJson.workspaces];
58
54
  }
59
55
  return false;
60
56
  }
61
57
  catch (e) {
62
58
  throw new errors_1.InvalidUserInputError('package.json parsing failed with ' +
63
- ("error " + e.message));
59
+ `error ${e.message}`);
64
60
  }
65
61
  }
66
62
  exports.getYarnWorkspaces = getYarnWorkspaces;
@@ -1 +1 @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