Skip to content

Commit

Permalink
Fix the entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotpirxie committed Sep 14, 2023
1 parent e699f40 commit d1db65c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,23 @@ Usage: dependency-time-machine [options]
Tool to automatically update dependencies one-by-one in the time order

Options:
-p, --packageFile <file> Path to package.json file (default: "package.json")
-u, --update Update package.json file with new versions
-is, --install-script <command> Install with script (default: "npm install")
-ts, --test-script <command> Test command (default: "npm test")
-i, --install Install with script
-t, --timeline Print timeline
-a, --auto Run in auto mode
-c, --cache Cache resolved dependencies
-cf, --cache-file <file> Cache file (default: "./.dependency-time-machine/cache.json")
-e, --exclude <dependency> Exclude dependency from update, separated by comma
-x, --exclude-file <file> Exclude dependencies from file, one per line (default: "")
-r, --registry-url <url> Registry url (default: "https://registry.npmjs.org")
-pi, --print-info Print info about the packages
-h, --help display help for command
-p, --packageFile <file> Path to package.json file (default: "package.json")
-u, --update Update package.json file with new versions
-is, --install-script <command> Install with script (default: "npm install")
-ts, --test-script <command> Test command (default: "npm test")
-i, --install Install with script
-t, --timeline Print timeline
-a, --auto Run in auto mode
-c, --cache Cache resolved dependencies
-ans, --allow-non-semver Allow non-semver versions
-cf, --cache-file <file> Cache file (default: "./.dependency-time-machine-cache.json")
-e, --exclude <dependency> Exclude dependency from update, separated by comma
-r, --registry-url <url> Registry url (default: "https://registry.npmjs.org")
-x, --exclude-file <file> Exclude dependencies from file, one per line (default: "")
-shmn, --stop-if-higher-major-number Stop if higher major number
-shmnv, --stop-if-higher-minor-number Stop if higher minor or major number
-pi, --print-info Print info about the packages
-h, --help display help for command
```
## License
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dependency-time-machine",
"version": "1.2.2",
"description": "Tool to automatically update dependencies one-by-one in the time order",
"main": "./bin/index.js",
"main": "./bin/src/index.js",
"repository": "https://github.com/pilotpirxie/dependency-time-machine.git",
"author": "pilotpirxie <[email protected]>",
"license": "MIT",
Expand All @@ -18,7 +18,7 @@
"typescript": "^5.1.6"
},
"bin": {
"dependency-time-machine": "./bin/index.js"
"dependency-time-machine": "./bin/src/index.js"
},
"scripts": {
"build": "tsc",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import { program } from "commander";
import { run } from "./run";
import {program} from "commander";
import {run} from "./run";

program
.name("dependency-time-machine")
Expand Down Expand Up @@ -46,7 +46,7 @@ program
.option("-shmn, --stop-if-higher-major-number", "Stop if higher major number")
.option(
"-shmnv, --stop-if-higher-minor-number",
"Stop if higher minor number",
"Stop if higher minor or major number",
)
.option("-pi, --print-info", "Print info about the packages")
.action(run)
Expand Down
18 changes: 9 additions & 9 deletions src/run.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import path from "path";
import { getExcludedDependencies } from "./exec/getExcludedDependencies";
import { getDependenciesFromPackageJson } from "./exec/getDependenciesFromPackageJson";
import { getRemoteDependencies } from "./exec/getRemoteDependencies";
import { Dependency } from "./types/Dependency";
import {getExcludedDependencies} from "./exec/getExcludedDependencies";
import {getDependenciesFromPackageJson} from "./exec/getDependenciesFromPackageJson";
import {getRemoteDependencies} from "./exec/getRemoteDependencies";
import {Dependency} from "./types/Dependency";
import {
compareDates,
compareVersions,
isHigherMajorVersion,
isHigherMinorVersion,
isValidVersion,
} from "./util/semver";
import { close } from "./exec/close";
import { updatePackageFile } from "./exec/updatePackageFile";
import { installDependency } from "./exec/installDependency";
import { runTest } from "./exec/runTest";
import { printDependenciesInfo } from "./exec/printDependenciesInfo";
import {close} from "./exec/close";
import {updatePackageFile} from "./exec/updatePackageFile";
import {installDependency} from "./exec/installDependency";
import {runTest} from "./exec/runTest";
import {printDependenciesInfo} from "./exec/printDependenciesInfo";

export const run = async ({
packageFile,
Expand Down

0 comments on commit d1db65c

Please sign in to comment.