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

@mysten/bcs

Package Overview
Dependencies
Maintainers
7
Versions
524
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 0.0.0-experimental-20240717180855 to 0.0.0-experimental-20240806174754

8

CHANGELOG.md
# Change Log
## 0.0.0-experimental-20240717180855
## 0.0.0-experimental-20240806174754
### Patch Changes
- f37b3c2: Improve error message when bcs enum contains unknown value
## 1.0.3
### Patch Changes
- 7fc464a: Remove unique symbols from types to improve compatability between version

@@ -8,0 +14,0 @@ - 0f27a97: Update dependencies

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": "0.0.0-experimental-20240717180855",
"version": "0.0.0-experimental-20240806174754",
"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