Skip to content

Commit

Permalink
fix: make dependencies with tolerant flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Feb 3, 2024
1 parent 0c7c54d commit 6979f4e
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 144 deletions.
6 changes: 3 additions & 3 deletions packages/monorepo/bin/monorepo-build.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env node
const commander = require("commander");
const {program} = require("commander");

commander
program
.usage("monorepo build [options]")
.option("-v, --verbose", "Enable verbose log", (v, t) => t + 1, 0)
.parse(process.argv);

(async () => {
const {commands, runCommand} = await import("../src/index.js");

runCommand(commands.BuildCmd, commander.opts());
runCommand(commands.BuildCmd, program.opts());
})();
6 changes: 3 additions & 3 deletions packages/monorepo/bin/monorepo-ci.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
const commander = require("commander");
const {program} = require("commander");

commander
program
.usage("monorepo ci <type> [options]")
.arguments("<type>")
.option("-v, --verbose", "Enable verbose log", (v, t) => t + 1, 0)
Expand All @@ -10,7 +10,7 @@ commander

runCommand(commands.CICmd, {
type,
verbose: !!commander.opts().verbose
verbose: !!program.opts().verbose
});
})
.parse(process.argv);
6 changes: 3 additions & 3 deletions packages/monorepo/bin/monorepo-clean.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
const commander = require("commander");
const {program} = require("commander");

commander
program
.usage("monorepo clean <type> [options]")
.arguments("<type>")
.option("-v, --verbose", "Enable verbose log", (v, t) => t + 1, 0)
Expand All @@ -10,7 +10,7 @@ commander

runCommand(commands.CleanCmd, {
type,
verbose: !!commander.opts().verbose
verbose: !!program.opts().verbose
});
})
.parse(process.argv);
6 changes: 3 additions & 3 deletions packages/monorepo/bin/monorepo-publish.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env node
const commander = require("commander");
const {program} = require("commander");

commander
program
.usage("monorepo publish <type> [options]")
.arguments("<type>")
.option("-v, --verbose", "Enable verbose log", (v, t) => t + 1, 0)
.option("-d, --dry-run", "Run publish in dryRun mode", (v, t) => t + 1, 0)
.action(async (type) => {
const {commands, runCommand} = await import("../src/index.js");
const options = commander.opts();
const options = program.opts();

runCommand(commands.PublishCmd, {
type,
Expand Down
6 changes: 3 additions & 3 deletions packages/monorepo/bin/monorepo-sync.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env node
const commander = require("commander");
const {program} = require("commander");

commander
program
.usage("monorepo sync <type> [options]")
.arguments("<type>")
.option("-v, --verbose", "Enable verbose log", (v, t) => t + 1, 0)
.action(async (type) => {
const {commands, runCommand} = await require("../src/index.js");

const options = commander.opts();
const options = program.opts();

runCommand(commands.SyncCmd, {
type,
Expand Down
6 changes: 3 additions & 3 deletions packages/monorepo/bin/monorepo-version.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/env node
const commander = require("commander");
const {program} = require("commander");

commander
program
.usage("monorepo version <version>")
.arguments("<version>")
.option("-v, --verbose", "Enable verbose log", (v, t) => t + 1, 0)
.action(async (version) => {
const {commands, runCommand} = await import("../src/index.js");
runCommand(commands.VersionCmd, {
version,
verbose: !!commander.opts().verbose
verbose: !!program.opts().verbose
});
})
.parse(process.argv);
4 changes: 2 additions & 2 deletions packages/monorepo/bin/monorepo.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node

const commander = require("commander");
const {program} = require("commander");
const cliPkg = require("../package.json");

commander
program
.version(cliPkg.version)
.command("ci <type>", "Perform ci actions (configure)")
.command("build <type>", "Build artifacts (workspace, packages)")
Expand Down
47 changes: 23 additions & 24 deletions packages/monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,29 @@
"bin": "./bin"
},
"dependencies": {
"@samverschueren/stream-to-observable": "0.3.1",
"@typescript-eslint/typescript-estree": "6.20.0",
"any-observable": "0.5.1",
"axios": "1.6.7",
"chalk": "5.3.0",
"commander": "11.1.0",
"execa": "8.0.1",
"fancy-log": "1.3.3",
"figures": "3.2.0",
"fs-extra": "11.2.0",
"globby": "14.0.0",
"has-yarn": "3.0.0",
"inquirer": "9.2.13",
"jsonfile": "^6.1.0",
"listr2": "8.0.2",
"lodash": "4.17.21",
"normalize-path": "3.0.0",
"rxjs": "7.8.1",
"semver": "7.5.4",
"split": "1.0.1",
"typescript": "5.3.3"
"@samverschueren/stream-to-observable": ">=0.3.1",
"@typescript-eslint/typescript-estree": ">=6.20.0",
"any-observable": ">=0.5.1",
"axios": ">=1.6.7",
"chalk": ">=5.3.0",
"commander": ">=12.0.0",
"execa": ">=8.0.1",
"fancy-log": ">=1.3.3",
"figures": ">=3.2.0",
"fs-extra": ">=11.2.0",
"globby": ">=14.0.0",
"has-yarn": ">=3.0.0",
"inquirer": ">=9.2.13",
"jsonfile": ">=6.1.0",
"listr2": ">=8.0.2",
"lodash": ">=4.17.21",
"normalize-path": ">=3.0.0",
"rxjs": ">=7.8.1",
"semver": ">=7.5.4",
"split": ">=1.0.1",
"typescript": ">=5.3.3"
},
"peerDependencies": {
"semantic-release": ">=19"
},
"devDependencies": {}
}
}
}
Loading

0 comments on commit 6979f4e

Please sign in to comment.