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

primea-annotations

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

primea-annotations - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.nyc_output/388c54c868d29f8316be11d77376b08e.json

43

index.js

@@ -300,25 +300,23 @@ const Stream = require('buffer-pipe')

const newType = type.entries[typeIndex]
// validate that no function signature have no return types
if (newType.return_type) {
throw new Error('no return types allowed')
}
let customIndex = mappedFuncs.get(funcIndex)
if (customIndex === undefined) {
customIndex = mappedTypes.get(typeIndex)
} else {
const customType = result.types[customIndex]
if (customType.params.length !== newType.params.length) {
throw new Error('invalid param length')
if (!newType.return_type) {
let customIndex = mappedFuncs.get(funcIndex)
if (customIndex === undefined) {
customIndex = mappedTypes.get(typeIndex)
} else {
const customType = result.types[customIndex]
if (customType.params.length !== newType.params.length) {
throw new Error('invalid param length')
}
if (!newType.params.every(param => param === 'i32')) {
throw new Error('invalid base param type')
}
}
if (!newType.params.every(param => param === 'i32')) {
throw new Error('invalid base param type')
if (customIndex === undefined) {
customIndex = result.types.push(newType) - 1
mappedTypes.set(typeIndex, customIndex)
}
result.indexes[funcIndex + imports.entries.length] = customIndex
}
if (customIndex === undefined) {
customIndex = result.types.push(newType) - 1
mappedTypes.set(typeIndex, customIndex)
}
result.indexes[funcIndex + imports.entries.length] = customIndex
})

@@ -329,2 +327,9 @@

if (entry.kind === 'function') {
// validate that no function signature have no return types
// get the type index. entry.index is the global function index (imported function + internal function)
const typeIndex = functions.entries[entry.index - imports.entries.length]
const exportType = type.entries[typeIndex]
if (exportType.return_type) {
throw new Error('no return types allowed')
}
result.exports[entry.field_str] = entry.index

@@ -331,0 +336,0 @@ }

{
"name": "primea-annotations",
"version": "0.0.1",
"version": "0.0.2",
"description": "parsing/encoding for primea's type annotations",

@@ -14,4 +14,7 @@ "main": "index.js",

"keywords": [
""
"primea"
],
"bin": {
"primea-annotate": "./bin/annotate"
},
"author": "mjbecze <mjbecze@gmail.com>",

@@ -18,0 +21,0 @@ "license": "MPL-2.0",

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