New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

flow-node

Package Overview
Dependencies
Maintainers
2
Versions
253
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flow-node - npm Package Compare versions

Comparing version 2.138.0 to 2.139.0

31

index.js

@@ -184,2 +184,18 @@ /**

FunctionDeclaration: function(context, node) {
if (node.params && node.params.length) {
if (node.params[0].name === 'this') {
return removeNode(context, node.params[0], undefined, node.params[1]);
}
}
},
FunctionExpression: function(context, node) {
if (node.params && node.params.length) {
if (node.params[0].name === 'this') {
return removeNode(context, node.params[0], undefined, node.params[1]);
}
}
},
ClassProperty: function(context, node) {

@@ -304,3 +320,3 @@ if (node.declare || (context.ignoreUninitializedFields && !node.value)) {

// in the list.
function removeNode(context, node) {
function removeNode(context, node, _ast, nextInList) {
var removedNodes = context.removedNodes;

@@ -313,2 +329,12 @@ var length = removedNodes.length;

var lineNode = context.pretty ? getTrailingLineNode(context, node) : null;
var commaNode = nextInList
? createNode({
start: endOf(node),
end: startOf(nextInList),
loc: {
start: endOf(node),
end: startOf(nextInList),
},
})
: null;

@@ -327,2 +353,5 @@ while (index > 0 && endOf(removedNodes[index - 1]) > startOf(node)) {

}
if (commaNode) {
removedNodes.push(commaNode);
}
} else {

@@ -329,0 +358,0 @@ if (lineNode) {

4

package.json
{
"name": "flow-node",
"version": "2.138.0",
"version": "2.139.0",
"description": "Removes Flow type annotations from JavaScript files with speed and simplicity.",

@@ -46,3 +46,3 @@ "author": {

"dependencies": {
"flow-parser": "^0.138.0",
"flow-parser": "^0.139.0",
"pirates": "^3.0.2",

@@ -49,0 +49,0 @@ "vlq": "^0.2.1"

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