Socket
Socket
Sign inDemoInstall

@mysten/bcs

Package Overview
Dependencies
Maintainers
7
Versions
518
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mysten/bcs - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

6

CHANGELOG.md
# Change Log
## 1.0.4
### Patch Changes
- f37b3c2: Improve error message when bcs enum contains unknown value
## 1.0.3

@@ -4,0 +10,0 @@

10

dist/cjs/bcs.js

@@ -402,6 +402,10 @@ "use strict";

const index = reader.readULEB();
const [name2, type] = canonicalOrder[index];
const enumEntry = canonicalOrder[index];
if (!enumEntry) {
throw new TypeError(`Unknown value ${index} for enum ${name}`);
}
const [kind, type] = enumEntry;
return {
[name2]: type?.read(reader) ?? true,
$kind: name2
[kind]: type?.read(reader) ?? true,
$kind: kind
};

@@ -408,0 +412,0 @@ },

@@ -387,6 +387,10 @@ import {

const index = reader.readULEB();
const [name2, type] = canonicalOrder[index];
const enumEntry = canonicalOrder[index];
if (!enumEntry) {
throw new TypeError(`Unknown value ${index} for enum ${name}`);
}
const [kind, type] = enumEntry;
return {
[name2]: type?.read(reader) ?? true,
$kind: name2
[kind]: type?.read(reader) ?? true,
$kind: kind
};

@@ -393,0 +397,0 @@ },

{
"name": "@mysten/bcs",
"version": "1.0.3",
"version": "1.0.4",
"description": "BCS - Canonical Binary Serialization implementation for JavaScript",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -484,6 +484,13 @@ // Copyright (c) Mysten Labs, Inc.

const index = reader.readULEB();
const [name, type] = canonicalOrder[index];
const enumEntry = canonicalOrder[index];
if (!enumEntry) {
throw new TypeError(`Unknown value ${index} for enum ${name}`);
}
const [kind, type] = enumEntry;
return {
[name]: type?.read(reader) ?? true,
$kind: name,
[kind]: type?.read(reader) ?? true,
$kind: kind,
} as never;

@@ -490,0 +497,0 @@ },

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