Skip to content

Commit

Permalink
chore: migrate pkg-up to package-up
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Jun 11, 2024
1 parent 493bdb1 commit e6d14ab
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 43 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-swans-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/ts-node-paths": patch
---

migrate `pkg-up` to `package-up`
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"dependencies": {
"colorette": "^2.0.20",
"get-tsconfig": "^4.7.5",
"pkg-up": "^5.0.0",
"package-up": "^5.0.0",
"ts-node": "11.0.0-beta.1",
"tsconfig-paths": "^4.2.0"
},
Expand All @@ -78,14 +78,14 @@
"commitizen": "4.3.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "^9.4.0",
"execa": "^9.1.0",
"execa": "^9.2.0",
"husky": "9.0.11",
"lint-staged": "15.2.5",
"npm-run-all": "^4.1.5",
"tsup": "^8.1.0",
"tsx": "^4.11.2",
"tsx": "^4.15.2",
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vite": "^5.2.13",
"vitest": "^1.6.0"
},
"engines": {
Expand All @@ -95,4 +95,4 @@
"access": "public"
},
"packageManager": "yarn@4.2.2"
}
}
6 changes: 3 additions & 3 deletions src/tool/searchMonoProjectDir.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { dirname } from 'node:path';
import type { Options } from 'pkg-up';
import { pkgUpSync } from 'pkg-up';
import type { Options } from 'package-up';
import { packageUpSync } from 'package-up';

/**
* Find the closest package.json file
* @returns Returns the file path, or undefined if it could not be found.
*/
export const searchMonoProjectDir = (options: Options) => {
const packageFile = pkgUpSync(options);
const packageFile = packageUpSync(options);
if (packageFile && !/node_modules/.test(packageFile)) {
return dirname(packageFile);
}
Expand Down
Loading

0 comments on commit e6d14ab

Please sign in to comment.