Socket
Socket
Sign inDemoInstall

@webassemblyjs/ast

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/ast - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

lib/transform/denormalize-type-references/index.js

16

lib/index.js

@@ -8,2 +8,3 @@ "use strict";

exports.functionNameMetadata = functionNameMetadata;
exports.localNameMetadata = localNameMetadata;
exports.moduleMetadata = moduleMetadata;

@@ -139,3 +140,12 @@ exports.identifier = identifier;

function moduleMetadata(sections, functionNames) {
function localNameMetadata(value, localIndex, functionIndex) {
return {
type: "LocalNameMetadata",
value: value,
localIndex: localIndex,
functionIndex: functionIndex
};
}
function moduleMetadata(sections, functionNames, localNames) {
var n = {

@@ -150,2 +160,6 @@ type: "ModuleMetadata",

if (localNames.length) {
n.localNames = localNames;
}
return n;

@@ -152,0 +166,0 @@ }

@@ -80,2 +80,3 @@ "use strict";

case "FunctionNameMetadata":
case "LocalNameMetadata":
case "ModuleExport":

@@ -118,2 +119,9 @@ case "Data":

if (typeof n.localNames !== "undefined") {
// $FlowIgnore
n.localNames.forEach(function (x) {
return walk(x, cb, _path2);
});
}
break;

@@ -120,0 +128,0 @@ }

6

package.json
{
"name": "@webassemblyjs/ast",
"version": "1.2.6",
"version": "1.2.7",
"description": "AST utils for webassemblyjs",

@@ -14,4 +14,4 @@ "keywords": [

"dependencies": {
"@webassemblyjs/wast-parser": "1.2.6",
"webassemblyjs": "1.2.6"
"@webassemblyjs/wast-parser": "1.2.7",
"webassemblyjs": "1.2.7"
},

@@ -18,0 +18,0 @@ "repository": {

@@ -47,5 +47,19 @@ // @flow

export function localNameMetadata(
value: string,
localIndex: number,
functionIndex: number
): LocalNameMetadata {
return {
type: "LocalNameMetadata",
value,
localIndex,
functionIndex
};
}
export function moduleMetadata(
sections: Array<SectionMetadata>,
functionNames: Array<FunctionNameMetadata>
functionNames: Array<FunctionNameMetadata>,
localNames: Array<LocalNameMetadata>
): ModuleMetadata {

@@ -56,6 +70,8 @@ const n: ModuleMetadata = {

};
if (functionNames.length) {
n.functionNames = functionNames;
}
if (localNames.length) {
n.localNames = localNames;
}
return n;

@@ -62,0 +78,0 @@ }

@@ -71,2 +71,3 @@ // @flow

case "FunctionNameMetadata":
case "LocalNameMetadata":
case "ModuleExport":

@@ -101,2 +102,7 @@ case "Data":

}
if (typeof n.localNames !== "undefined") {
// $FlowIgnore
n.localNames.forEach(x => walk(x, cb, path));
}
break;

@@ -103,0 +109,0 @@ }

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