@yarn-tool/resolve-package
Advanced tools
Comparing version 1.0.37 to 1.0.38
@@ -6,2 +6,23 @@ # Change Log | ||
## [1.0.38](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/resolve-package@1.0.37...@yarn-tool/resolve-package@1.0.38) (2021-11-23) | ||
### 🐛 Bug Fixes | ||
* allow when entry file is not exists ([c0a2248](https://github.com/bluelovers/ws-yarn-workspaces/commit/c0a2248a0df93623a094ee41e765e611ae29397f)) | ||
### ♻️ Chores | ||
* **deps:** update deps ([8d1f2fb](https://github.com/bluelovers/ws-yarn-workspaces/commit/8d1f2fbb2782cdcdcf72e56131ea047bc0c30298)) | ||
### 🔖 Miscellaneous | ||
* update README.md ([89b5b2e](https://github.com/bluelovers/ws-yarn-workspaces/commit/89b5b2eb7dad4780971936171c732ff1fddd0ab0)) | ||
## [1.0.37](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/resolve-package@1.0.36...@yarn-tool/resolve-package@1.0.37) (2021-11-03) | ||
@@ -8,0 +29,0 @@ |
@@ -7,3 +7,9 @@ "use strict"; | ||
function resolvePackageCore(moduleName, options) { | ||
const entryPointLocation = require.resolve(moduleName, options); | ||
let entryPointLocation; | ||
try { | ||
entryPointLocation = require.resolve(moduleName, options); | ||
} | ||
catch (e) { | ||
entryPointLocation = require.resolve(moduleName + '/package.json', options); | ||
} | ||
const pkgRoot = (0, pkg_dir_1.sync)(entryPointLocation); | ||
@@ -10,0 +16,0 @@ return { |
{ | ||
"name": "@yarn-tool/resolve-package", | ||
"version": "1.0.37", | ||
"description": "resolve package root and package.json paths", | ||
"version": "1.0.38", | ||
"description": "resolve package root and package.json paths , work on node 17 too", | ||
"keywords": [ | ||
@@ -56,3 +56,3 @@ "resolve", | ||
"dependencies": { | ||
"@ts-type/package-dts": "^1.0.51", | ||
"@ts-type/package-dts": "^1.0.53", | ||
"pkg-dir": "< 6 >= 5", | ||
@@ -65,3 +65,3 @@ "tslib": "^2.3.1", | ||
}, | ||
"gitHead": "e57f6acafbe7c00c43593823a5d16ada08aeb920" | ||
"gitHead": "131c97352e084d1e39cafded98b6bc967b7a9eee" | ||
} |
# README.md | ||
<description> | ||
resolve package root and package.json paths , work on node 17 too | ||
@@ -8,6 +8,11 @@ ## install | ||
```bash | ||
yarn add <name> | ||
yarn-tool add <name> | ||
yt add <name> | ||
yarn add @yarn-tool/resolve-package | ||
yarn-tool add @yarn-tool/resolve-package | ||
yt add @yarn-tool/resolve-package | ||
``` | ||
```typescript | ||
import { resolvePackageJsonLocation } from '@yarn-tool/resolve-package' | ||
console.dir(resolvePackageJsonLocation('tslib')); | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20050
78
18
4
Updated@ts-type/package-dts@^1.0.53