Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract layouting into standalone package and adjust for changes #738

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions core/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@
"dist/cjs"
],
"dependencies": {
"@scure/base": "^1.1.3"
"@scure/base": "^1.1.3",
"binary-layout": "^1.0.3"
},
"sideEffects": false,
"scripts": {
Expand All @@ -132,4 +133,4 @@
"prettier": "prettier --write ./src"
},
"type": "module"
}
}
4 changes: 1 addition & 3 deletions core/base/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ export * from "./array.js";
export * from "./mapping.js";
export * from "./metaprogramming.js";
export * from "./misc.js";

export * from "./layout/index.js";
export * from "./layout.js";

export * as amount from "./amount.js";
export * as layout from "./layout/index.js";
export * as encoding from "./encoding.js";
26 changes: 26 additions & 0 deletions core/base/src/utils/layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export {
type Layout,
type DeriveType as LayoutToType,
type FixedConversion,
type CustomConversion,
type Endianness,
type CustomizableBytes,
type CustomizableBytesReturn,
type Discriminator,
type FixedItemsOf as FixedItemsOfLayout,
type DynamicItemsOf as DynamicItemsOfLayout,
type Bitset,
type BitsetItem,
serialize as serializeLayout,
deserialize as deserializeLayout,
buildDiscriminator as layoutDiscriminator,
calcSize as calcLayoutSize,
calcStaticSize as calcStaticLayoutSize,
customizableBytes,
addFixedValues,
fixedItemsOf as fixedItemsOfLayout,
dynamicItemsOf as dynamicItemsOfLayout,
enumItem,
optionItem,
bitsetItem
} from "binary-layout";
225 changes: 0 additions & 225 deletions core/base/src/utils/layout/deserialize.ts

This file was deleted.

Loading
Loading