Socket
Socket
Sign inDemoInstall

@yarn-tool/resolve-package

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarn-tool/resolve-package - npm Package Compare versions

Comparing version 1.0.37 to 1.0.38

21

CHANGELOG.md

@@ -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 @@

8

index.js

@@ -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 {

8

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc