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

@pnpm/workspace.read-manifest

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/workspace.read-manifest - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

23

lib/index.js

@@ -13,6 +13,4 @@ "use strict";

const manifest = await readManifestRaw(dir);
if (validateWorkspaceManifest(manifest)) {
return manifest;
}
return undefined;
validateWorkspaceManifest(manifest);
return manifest;
}

@@ -33,7 +31,6 @@ exports.readWorkspaceManifest = readWorkspaceManifest;

}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function validateWorkspaceManifest(manifest) {
if (manifest === undefined || manifest === null) {
// Empty or null manifest is ok
return true;
return;
}

@@ -48,4 +45,8 @@ if (typeof manifest !== 'object') {

// manifest content `{}` is ok
return true;
return;
}
assertValidWorkspaceManifestPackages(manifest);
checkWorkspaceManifestAssignability(manifest);
}
function assertValidWorkspaceManifestPackages(manifest) {
if (!manifest.packages) {

@@ -66,4 +67,10 @@ throw new InvalidWorkspaceManifestError('packages field missing or empty');

}
return true;
}
/**
* Empty function to ensure TypeScript has narrowed the manifest object to
* something assignable to the {@see WorkspaceManifest} interface. This helps
* make sure the validation logic in this file is correct as it's refactored in
* the future.
*/
function checkWorkspaceManifestAssignability(_manifest) { }
class InvalidWorkspaceManifestError extends error_1.PnpmError {

@@ -70,0 +77,0 @@ constructor(message) {

{
"name": "@pnpm/workspace.read-manifest",
"version": "1.0.1",
"version": "1.0.2",
"description": "Reads a workspace manifest file",

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

"devDependencies": {
"@pnpm/workspace.read-manifest": "1.0.1"
"@pnpm/workspace.read-manifest": "1.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