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

@yarnpkg/pnpify

Package Overview
Dependencies
Maintainers
5
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/pnpify - npm Package Compare versions

Comparing version 2.0.0-rc.3 to 2.0.0-rc.4

28

lib/generateSdk.js

@@ -53,7 +53,29 @@ "use strict";

};
const isPackageInstalled = (name) => {
try {
dynamicRequire_1.dynamicRequire.resolve(name);
return true;
}
catch (e) {
if (e.code && e.code === 'MODULE_NOT_FOUND') {
return false;
}
else {
throw e;
}
}
};
exports.generateSdk = async (projectRoot) => {
const hasTypescript = isPackageInstalled('typescript');
const hasEslint = isPackageInstalled('eslint');
const targetFolder = fslib_1.ppath.join(projectRoot, `.vscode/pnpify`);
await fslib_1.xfs.removePromise(targetFolder);
await generateTypescriptWrapper(projectRoot, targetFolder);
await exports.generateEslintWrapper(projectRoot, targetFolder);
if (!hasTypescript && !hasEslint)
console.warn(`Neither 'typescript' nor 'eslint' are installed. Nothing to do.`);
else
await fslib_1.xfs.removePromise(targetFolder);
if (hasTypescript)
await generateTypescriptWrapper(projectRoot, targetFolder);
if (hasEslint) {
await exports.generateEslintWrapper(projectRoot, targetFolder);
}
};

4

lib/NodeModulesFS.js

@@ -145,6 +145,6 @@ "use strict";

createReadStream(p, opts) {
return this.baseFs.createReadStream(this.resolveFilePath(p), opts);
return this.baseFs.createReadStream(p !== null ? this.resolveFilePath(p) : p, opts);
}
createWriteStream(p, opts) {
return this.baseFs.createWriteStream(this.throwIfPathReadonly('createWriteStream', p), opts);
return this.baseFs.createWriteStream(p !== null ? this.throwIfPathReadonly('createWriteStream', p) : p, opts);
}

@@ -151,0 +151,0 @@ async realpathPromise(p) {

{
"name": "@yarnpkg/pnpify",
"version": "2.0.0-rc.3",
"version": "2.0.0-rc.4",
"main": "./lib/index.js",

@@ -31,3 +31,3 @@ "bin": "./lib/cli.js",

"postpack": "rm -rf lib",
"prepack": "pnpify tsc",
"prepack": "run build:compile packages/yarnpkg-pnpify",
"release": "yarn npm publish"

@@ -34,0 +34,0 @@ },

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