Socket
Socket
Sign inDemoInstall

@truffle/compile-common

Package Overview
Dependencies
2
Maintainers
14
Versions
89
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.1 to 0.9.0

16

dist/src/shims/LegacyToNew.js

@@ -21,4 +21,6 @@ "use strict";

metadata,
bytecode: forBytecode(bytecode),
deployedBytecode: forBytecode(deployedBytecode),
bytecode: bytecode ? forBytecode(bytecode) : undefined,
deployedBytecode: deployedBytecode
? forBytecode(deployedBytecode)
: undefined,
compiler,

@@ -35,5 +37,2 @@ devdoc,

function forBytecode(bytecode) {
if (!bytecode) {
return undefined;
}
if (typeof bytecode === "object") {

@@ -46,3 +45,8 @@ return bytecode;

.replace(/__[^_]+_*/g, (linkReference, characterOffset) => {
const [, name] = linkReference.match(/__([^_]+)_*/);
const match = linkReference.match(/__([^_]+)_*/);
if (match === null) {
//this can't actually happen, but strictNullChecks requires it
throw new Error("Could not extract link reference name");
}
const name = match[1];
const characterLength = linkReference.length;

@@ -49,0 +53,0 @@ const offset = characterOffset / 2;

@@ -14,3 +14,3 @@ {

},
"version": "0.8.1",
"version": "0.9.0",
"main": "dist/src/index.js",

@@ -36,3 +36,3 @@ "scripts": {

},
"gitHead": "04c0b3168075317b4f15ecab2fb69320eab2ae72"
"gitHead": "035a92efc4979550e384acba50436771bba1bccd"
}

@@ -41,4 +41,6 @@ import type { Bytecode, CompiledContract, LinkReference } from "../types";

metadata,
bytecode: forBytecode(bytecode),
deployedBytecode: forBytecode(deployedBytecode),
bytecode: bytecode ? forBytecode(bytecode) : undefined,
deployedBytecode: deployedBytecode
? forBytecode(deployedBytecode)
: undefined,
compiler,

@@ -55,5 +57,2 @@ devdoc,

export function forBytecode(bytecode: string): Bytecode {
if (!bytecode) {
return undefined;
}
if (typeof bytecode === "object") {

@@ -68,3 +67,8 @@ return bytecode;

.replace(/__[^_]+_*/g, (linkReference, characterOffset) => {
const [, name] = linkReference.match(/__([^_]+)_*/);
const match = linkReference.match(/__([^_]+)_*/);
if (match === null) {
//this can't actually happen, but strictNullChecks requires it
throw new Error("Could not extract link reference name");
}
const name = match[1];

@@ -71,0 +75,0 @@ const characterLength = linkReference.length;

@@ -8,2 +8,4 @@ {

"noImplicitAny": true,
"skipLibCheck": true,
"strictNullChecks": true,
"moduleResolution": "node",

@@ -10,0 +12,0 @@ "sourceMap": true,

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc