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

code-red

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-red - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

4

CHANGELOG.md
# code-red changelog
## 0.0.26
* Always replace comment values ([#20](https://github.com/Rich-Harris/code-red/pull/20))
## 0.0.25

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

20

dist/code-red.js

@@ -1513,2 +1513,6 @@ (function (global, factory) {

const inject = (raw, node, values, comments) => {
comments.forEach(comment => {
comment.value = comment.value.replace(re, (m, i) => +i in values ? values[+i] : m);
});
estreeWalker.walk(node, {

@@ -1555,16 +1559,2 @@ enter(node) {

if (node.leadingComments) {
node.leadingComments = node.leadingComments.map(c => ({
...c,
value: c.value.replace(re, (m, i) => +i in values ? values[+i] : m)
}));
}
if (node.trailingComments) {
node.trailingComments = node.trailingComments.map(c => ({
...c,
value: c.value.replace(re, (m, i) => +i in values ? values[+i] : m)
}));
}
if (node.type === 'Literal') {

@@ -1658,3 +1648,3 @@ if (typeof node.value === 'string') {

try {
const expression = acorn.parseExpressionAt(str, 0, acorn_opts(comments, str)) ;
const expression = acorn.parseExpressionAt(str, 0, acorn_opts(comments, str)) ;

@@ -1661,0 +1651,0 @@ inject(str, expression, values, comments);

{
"name": "code-red",
"description": "code-red",
"version": "0.0.25",
"version": "0.0.26",
"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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc