-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy path.pnpmfile.cjs
More file actions
28 lines (27 loc) · 849 Bytes
/
.pnpmfile.cjs
File metadata and controls
28 lines (27 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function afterAllResolved(lockfile, context) {
// The pnpm lockfile contains entries for all workspaces.
// This means that if the `e` repo is not cloned, we will get a different
// lockfile.
// The ugly workaround is to add entries for enterprise workspaces manually.
if (!lockfile.importers['e/web/teleport']) {
context.log(`Workspace 'e/web/teleport' is not present, patching lockfile.`);
lockfile.importers['e/web/teleport'] = {};
}
if (!lockfile.importers['e/e2e']) {
context.log(`Workspace 'e/e2e' is not present, patching lockfile.`);
lockfile.importers['e/e2e'] = {
dependencies: {
'@gravitational/e2e': 'link:../../e2e',
},
specifiers: {
'@gravitational/e2e': 'workspace:*',
},
};
}
return lockfile;
}
module.exports = {
hooks: {
afterAllResolved,
},
};