Skip to content

Commit e32c050

Browse files
committed
fix: creating monorepo packages post-Lerna@7
Updates internal monorepo package creator to use `npm install` instead of `lerna bootstrap`. see: https://lerna.js.org/docs/legacy-package-management Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
1 parent c9b47e2 commit e32c050

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

bin/create-package.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
* 4. Run `lb4 copyright` to update `LICENSE` and copyright headers for `*.ts`
3333
* and `*.js`.
3434
*
35-
* 5. Run `lerna bootstrap --scope <full-package-name>` to link its local
35+
* 5. Run `npm install --workspace <full-package-name>` to link its local
3636
* dependencies.
3737
*
3838
* 6. Run `update-ts-project-refs` to update TypeScript project references
39+
* (via NPM `postinstall` hook)
3940
*
4041
* 7. Remind to update `CODEOWNERS` and `docs/site/MONOREPO.md`
4142
*/
@@ -44,7 +45,7 @@
4445
const path = require('node:path');
4546
const fse = require('fs-extra');
4647
const build = require('../packages/build');
47-
const {runMain, updateTsProjectRefs} = require('./script-util');
48+
const {runMain} = require('./script-util');
4849

4950
const cwd = process.cwd();
5051

@@ -115,7 +116,6 @@ async function createPackage(name) {
115116
await fixupProject(project);
116117
await updateCopyrightAndLicense(project, options);
117118
await bootstrapProject(project);
118-
await updateTsProjectRefs({dryRun: false});
119119

120120
promptActions(project);
121121
}
@@ -152,8 +152,8 @@ async function bootstrapProject({repoRoot, name}) {
152152
process.chdir(repoRoot);
153153
// Run `npx lerna bootstrap --scope @loopback/<name>`
154154
const shell = build.runShell(
155-
'npx',
156-
['lerna', 'bootstrap', '--scope', `@loopback/${name}`],
155+
'npm',
156+
['install', '--workspace', `@loopback/${name}`],
157157
{
158158
cwd: repoRoot,
159159
},

0 commit comments

Comments
 (0)