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 3.0.2 to 3.0.3

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"));

@@ -17,3 +18,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 === null || workspaceManifestLocation === void 0 ? void 0 : workspaceManifestLocation.endsWith('.yml')) {

@@ -25,2 +26,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

4

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

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

"devDependencies": {
"@pnpm/find-workspace-dir": "3.0.2"
"@pnpm/find-workspace-dir": "3.0.3"
},

@@ -33,0 +33,0 @@ "scripts": {

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