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

@ckb-lumos/codec

Package Overview
Dependencies
Maintainers
0
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckb-lumos/codec - npm Package Compare versions

Comparing version 0.0.0-canary-eb5839a-20240515054220 to 0.0.0-canary-ecb1ec5-20240701075602

4

lib/error.js

@@ -50,3 +50,5 @@ "use strict";

const path = this.keys.reduceRight(reducer, "input");
return `Expect type ${this.origin.expectedType} at ${path} but got error: ${this.origin.message}
const text = this.origin instanceof CodecBaseParseError ? `Expect type ${this.origin.expectedType} at ${path} but got error:` : `Error at ${path}:`; // this.origin can be an Error at runtime
return `${text} ${this.origin.message}
${(_this$origin$stack = this.origin.stack) === null || _this$origin$stack === void 0 ? void 0 : _this$origin$stack.replace(/Error:.+?\n/, "")}

@@ -53,0 +55,0 @@ `;

@@ -23,3 +23,3 @@ "use strict";

if (!str || !str.startsWith("0x")) {
throw new Error("Invalid hex string");
throw new Error("Invalid hex string, expect starts with 0x");
}

@@ -68,2 +68,3 @@ }

const c = str.charCodeAt(i);
/* eslint-disable @typescript-eslint/no-magic-numbers */
if (c > 0xff) {

@@ -70,0 +71,0 @@ throw new Error("Invalid UTF-8 raw string!");

{
"name": "@ckb-lumos/codec",
"version": "0.0.0-canary-eb5839a-20240515054220",
"version": "0.0.0-canary-ecb1ec5-20240701075602",
"description": "Make your own molecule binding in JavaScript(TypeScript)",

@@ -22,3 +22,3 @@ "author": "",

"dependencies": {
"@ckb-lumos/bi": "0.0.0-canary-eb5839a-20240515054220"
"@ckb-lumos/bi": "0.0.0-canary-ecb1ec5-20240701075602"
},

@@ -40,2 +40,3 @@ "publishConfig": {

"devDependencies": {
"@ckb-lumos/crypto": "0.0.0-canary-ecb1ec5-20240701075602",
"escape-string-regexp": "^4.0.0",

@@ -42,0 +43,0 @@ "js-yaml": "^4.1.0"

@@ -49,6 +49,8 @@ // lc for lumos codec

const path = this.keys.reduceRight(reducer, "input");
const text =
this.origin instanceof CodecBaseParseError
? `Expect type ${this.origin.expectedType} at ${path} but got error:`
: `Error at ${path}:`; // this.origin can be an Error at runtime
return `Expect type ${this.origin.expectedType} at ${path} but got error: ${
this.origin.message
}
return `${text} ${this.origin.message}
${this.origin.stack?.replace(/Error:.+?\n/, "")}

@@ -55,0 +57,0 @@ `;

@@ -16,3 +16,3 @@ import {

if (!str || !str.startsWith("0x")) {
throw new Error("Invalid hex string");
throw new Error("Invalid hex string, expect starts with 0x");
}

@@ -83,2 +83,3 @@ }

const c = str.charCodeAt(i);
/* eslint-disable @typescript-eslint/no-magic-numbers */
if (c > 0xff) {

@@ -85,0 +86,0 @@ throw new Error("Invalid UTF-8 raw string!");

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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