Socket
Socket
Sign inDemoInstall

code-red

Package Overview
Dependencies
6
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.1.4

4

CHANGELOG.md
# code-red changelog
## 0.1.4
* Fix rendering of nullish coalescing operator alongside other logical operators ([#52](https://github.com/Rich-Harris/code-red/issues/52))
## 0.1.3

@@ -4,0 +8,0 @@

@@ -150,2 +150,13 @@ (function (global, factory) {

function needs_parens(node, parent, is_right) {
// special case where logical expressions and coalesce expressions cannot be mixed,
// either of them need to be wrapped with parentheses
if (
node.type === 'LogicalExpression' &&
parent.type === 'LogicalExpression' &&
((parent.operator === '??' && node.operator !== '??') ||
(parent.operator !== '??' && node.operator === '??'))
) {
return true;
}
const precedence = EXPRESSIONS_PRECEDENCE[node.type];

@@ -152,0 +163,0 @@ const parent_precedence = EXPRESSIONS_PRECEDENCE[parent.type];

2

package.json
{
"name": "code-red",
"description": "code-red",
"version": "0.1.3",
"version": "0.1.4",
"repository": "Rich-Harris/code-red",

@@ -6,0 +6,0 @@ "main": "dist/code-red.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc