/
githubmirror
/
lerna
Обзор
Документация
Войти
/
githubmirror
/
lerna
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
libs/commands/import/src/command.ts
42 строки
1 KB
AI-JamesHenry
feat!: support node ^22.13.0 || ^24.0.0 || ^26.0.0, ship lerna as ESM-only (#4390)
14 июл 2026, 11:38
Не верифицирован
14 июл 2026, 11:38
a148ba2
Код
Авторство
О чём код?
import type { CommandModule } from "yargs"; /** * @see https://github.com/yargs/yargs/blob/main/docs/advanced.md#providing-a-command-module */ const command: CommandModule = { command: "import <dir>", describe: "Import a package into the monorepo with commit history", builder(yargs) { return yargs .positional("dir", { describe: "The path to an external git repository that contains an npm package" }) .options({ flatten: { group: "Command Options:", describe: "Import each merge commit as a single change the merge introduced", type: "boolean", }, dest: { group: "Command Options:", describe: "Import destination directory for the external git repository", type: "string", }, "preserve-commit": { group: "Command Options:", describe: "Preserve original committer in addition to original author", type: "boolean", }, y: { group: "Command Options:", describe: "Skip all confirmation prompts", alias: "yes", type: "boolean", }, }); }, async handler(argv) { return (await import(".")).factory(argv); }, }; export default command; export { command as "module.exports" };