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.2 to 0.0.3

5

CHANGELOG.md
# code-red changelog
## 0.0.3
* Allow return outside function
* Print code on syntax error
## 0.0.2

@@ -4,0 +9,0 @@

33

dist/code-red.js

@@ -134,18 +134,33 @@ (function (global, factory) {

function b(strings, ...values) {
const ast = acorn.parse(join(strings), {
ecmaVersion: 2019,
sourceType: 'module'
});
const str = join(strings);
try {
const ast = acorn.parse(str, {
ecmaVersion: 2019,
sourceType: 'module',
allowAwaitOutsideFunction: true,
allowReturnOutsideFunction: true
});
inject(ast, values);
inject(ast, values);
return ast.body;
return ast.body;
} catch (err) {
console.log(str); // TODO proper error reporting
throw err;
}
}
function x(strings, ...values) {
const expression = acorn.parseExpressionAt(join(strings));
const str = join(strings);
inject(expression, values);
try {
const expression = acorn.parseExpressionAt(str);
return expression;
inject(expression, values);
return expression;
} catch (err) {
console.log(str); // TODO proper error reporting
throw err;
}
}

@@ -152,0 +167,0 @@

{
"name": "code-red",
"description": "code-red",
"version": "0.0.2",
"version": "0.0.3",
"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