Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/find-workspace-dir

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/find-workspace-dir - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

14

lib/index.js

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));

@@ -16,3 +17,3 @@ const error_1 = __importDefault(require("@pnpm/error"));

? path_1.default.join(workspaceManifestDirEnvVar, 'pnpm-workspace.yaml')
: await (0, find_up_1.default)([WORKSPACE_MANIFEST_FILENAME, 'pnpm-workspace.yml'], { cwd });
: await (0, find_up_1.default)([WORKSPACE_MANIFEST_FILENAME, 'pnpm-workspace.yml'], { cwd: await getRealPath(cwd) });
if (workspaceManifestLocation?.endsWith('.yml')) {

@@ -24,2 +25,13 @@ throw new error_1.default('BAD_WORKSPACE_MANIFEST_NAME', `The workspace manifest file should be named "pnpm-workspace.yaml". File found: ${workspaceManifestLocation}`);

exports.default = findWorkspaceDir;
async function getRealPath(path) {
return new Promise((resolve) => {
// We need to resolve the real native path for case-insensitive file systems.
// For example, we can access file as C:\Code\Project as well as c:\code\projects
// Without this we can face a problem when try to install packages with -w flag,
// when root dir is using c:\code\projects but packages were found by C:\Code\Project
fs_1.default.realpath.native(path, function (err, resolvedPath) {
resolve(err !== null ? path : resolvedPath);
});
});
}
//# sourceMappingURL=index.js.map

6

package.json
{
"name": "@pnpm/find-workspace-dir",
"version": "4.0.1",
"version": "4.0.2",
"description": "Finds the root of a pnpm workspace",

@@ -12,3 +12,3 @@ "main": "lib/index.js",

"engines": {
"node": ">=14.19"
"node": ">=14.6"
},

@@ -31,3 +31,3 @@ "repository": "https://github.com/pnpm/pnpm/blob/main/packages/find-workspace-dir",

"devDependencies": {
"@pnpm/find-workspace-dir": "4.0.1"
"@pnpm/find-workspace-dir": "4.0.2"
},

@@ -34,0 +34,0 @@ "exports": {

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