lerna
Version:
Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository
102 lines (100 loc) • 3.36 kB
JavaScript
import {
command_default as command_default15
} from "./chunk-B6IDQ2GH.js";
import {
command_default as command_default12
} from "./chunk-PDGAIEDS.js";
import "./chunk-3SMWGCER.js";
import {
command_default as command_default14
} from "./chunk-522CWYNM.js";
import {
command_default as command_default11
} from "./chunk-HK7KXXW6.js";
import {
command_default as command_default10
} from "./chunk-JU7BAOBF.js";
import {
command_default as command_default6
} from "./chunk-YJKRRITW.js";
import {
command_default as command_default7
} from "./chunk-3UVRBPMF.js";
import {
command_default as command_default8
} from "./chunk-LKHERTCG.js";
import {
command_default as command_default9
} from "./chunk-GZVYWY26.js";
import {
command_default as command_default3
} from "./chunk-WSSPFVDQ.js";
import {
command_default as command_default4
} from "./chunk-TMKONYXZ.js";
import {
command_default as command_default5
} from "./chunk-WOVO3JHX.js";
import "./chunk-5POCIYQD.js";
import {
command_default as command_default13
} from "./chunk-4NSTHOTN.js";
import {
command_default
} from "./chunk-KIO3VNIW.js";
import {
command_default as command_default2
} from "./chunk-XI2LIRBT.js";
import {
lernaCLI,
npmlog_default
} from "./chunk-X5YAJACA.js";
import "./chunk-MLKGABMK.js";
// packages/lerna/src/index.ts
import pkg from "../package.json" with { type: "json" };
import yargsFactory from "yargs/yargs";
process.env["NX_ISOLATE_PLUGINS"] = "false";
process.env["NX_TUI"] = "false";
function main(argv) {
const context = {
lernaVersion: pkg.version
};
const cli = lernaCLI().version(pkg.version).command(command_default13).command(command_default).command(command_default2).command(command_default3).command(command_default4).command(command_default5).command(command_default6).command(command_default7).command(command_default8).command(command_default9).command(command_default11).command(command_default14).command(command_default12).command(command_default15).command(command_default10);
explicitlyHandleLegacyPackageManagementCommands(cli);
return cli.parse(argv, context);
}
function explicitlyHandleLegacyPackageManagementCommands(yargsInstance) {
["add", "bootstrap", "link"].forEach((commandName) => {
yargsInstance.command({
command: commandName === "add" ? "add <pkg> [globs..]" : commandName,
describe: `The "${commandName}" command was removed by default in v7, and is no longer maintained.`,
builder: (yargs) => {
const parsed = yargsFactory(process.argv.slice(2)).argv;
for (const x of Object.keys(parsed)) {
if (x !== "_" && x !== "$0") {
yargs.option(x, {});
}
}
return yargs;
},
handler() {
npmlog_default.error(
commandName,
`The "${commandName}" command was removed by default in v7 with a notice that it was no longer maintained. In v9, over 2 years later, it was finally removed.`
);
npmlog_default.error(
commandName,
// TODO: Update the docs to be explicit about the removal in v9
`Learn more about this change at https://lerna.js.org/docs/legacy-package-management`
);
process.exit(1);
}
});
});
}
var index_default = main;
export {
index_default as default,
main,
main as "module.exports"
};