1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.getChildNodeYarnLockV1Workspace = void 0;
|
4 | const errors_1 = require("../../errors");
|
5 | const parsers_1 = require("../../parsers");
|
6 | const util_1 = require("../util");
|
7 | const getChildNodeYarnLockV1Workspace = (name, depInfo, workspacePkgNameToVersion, pkgs, strictOutOfSync, includeOptionalDeps) => {
|
8 | let childNode;
|
9 | if (workspacePkgNameToVersion[name]) {
|
10 | const version = workspacePkgNameToVersion[name];
|
11 |
|
12 |
|
13 | if (strictOutOfSync) {
|
14 | throw new errors_1.OutOfSyncError(`${name}@${version}`, parsers_1.LockfileType.yarn);
|
15 | }
|
16 | childNode = {
|
17 | id: `${name}@${version}`,
|
18 | name: name,
|
19 | version: version,
|
20 | dependencies: {},
|
21 | isDev: depInfo.isDev,
|
22 | };
|
23 | }
|
24 | else {
|
25 | childNode = (0, util_1.getChildNode)(name, depInfo, pkgs, strictOutOfSync, includeOptionalDeps);
|
26 | }
|
27 | return childNode;
|
28 | };
|
29 | exports.getChildNodeYarnLockV1Workspace = getChildNodeYarnLockV1Workspace;
|
30 |
|
\ | No newline at end of file |