Skip to content

Commit

Permalink
remove dot-prop dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Jul 29, 2024
1 parent adf674e commit 91b564d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
5 changes: 4 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {lstatSync, readFileSync, truncateSync, writeFileSync, accessSync} from "
import {timerel, type TimerelAnyDate} from "timerel";
import supportsColor from "supports-color";
import {magenta, red, green, disableColor} from "glowie";
import {getProperty} from "dot-prop";
import pAll from "p-all";
import picomatch from "picomatch";
import pkg from "./package.json" with {type: "json"};
Expand Down Expand Up @@ -174,6 +173,10 @@ function makeGoProxies(): string[] {
}
}

function getProperty(obj: Record<string, any>, path: string) {
return path.split(".").reduce((obj: Record<string, any>, prop: string) => obj?.[prop] ?? null, obj);
}

function findUpSync(filename: string, dir: string): string | null {
const path = join(dir, filename);
try { accessSync(path); return path; } catch {}
Expand Down
30 changes: 0 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@types/registry-auth-token": "4.2.4",
"@types/semver": "7.5.8",
"ansi-regex": "6.0.1",
"dot-prop": "9.0.0",
"eslint": "8.57.0",
"eslint-config-silverwind": "90.0.0",
"eslint-config-silverwind-typescript": "7.0.1",
Expand Down

0 comments on commit 91b564d

Please sign in to comment.