| 3 | const { CWD, run, pkg, fs, git, npm } = require('./util.js') |
| 4 | |
| 5 | const cleanup = async () => { |
| 6 | await git('checkout', 'node_modules/') |
| 7 | for (const { name, path } of await pkg.mapWorkspaces({ public: true })) { |
| 8 | // add symlinks similar to how arborist does for our production |
| 9 | // workspaces, so they are in place before the initial install. |
| 10 | await symlink(path, join(CWD, 'node_modules', name), 'junction') |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | const main = async ({ packageLock }) => { |
| 15 | await git('status') // run ANY @npmcli/git command to instantiate its lazy loading |