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

@yarnpkg/parsers

Package Overview
Dependencies
Maintainers
6
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/parsers - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1-rc.1

20

lib/shell.js

@@ -81,8 +81,16 @@ "use strict";

const doubleQuoteIfRequested = (string, quote) => quote ? `"${string}"` : string;
const quoteIfNeeded = (string) => {
if (!string.match(/[(){}<>$|&; \t"']/))
return string;
if (!string.match(/[$"]/))
return `"${string}"`;
return `'${string.replace(/[']/g, `\\'`)}'`;
const quoteIfNeeded = (text) => {
if (text === ``)
return `""`;
if (!text.match(/[(){}<>$|&; \t"']/))
return text;
return `$'${text
.replace(/\\/g, `\\\\`)
.replace(/'/g, `\\'`)
.replace(/\f/g, `\\f`)
.replace(/\n/g, `\\n`)
.replace(/\r/g, `\\r`)
.replace(/\t/g, `\\t`)
.replace(/\v/g, `\\v`)
.replace(/\0/g, `\\0`)}'`;
};

@@ -89,0 +97,0 @@ switch (argumentSegment.type) {

{
"name": "@yarnpkg/parsers",
"version": "2.4.0",
"version": "2.4.1-rc.1",
"license": "BSD-2-Clause",

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

},
"stableVersion": "2.4.0",
"typings": "./lib/index.d.ts"
}

Sorry, the diff of this file is too big to display

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