Skip to content

Commit

Permalink
Version Packages (preview)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 22, 2024
1 parent e598bbd commit eea121d
Show file tree
Hide file tree
Showing 73 changed files with 585 additions and 36 deletions.
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@
"breezy-items-reflect",
"calm-crabs-tease",
"chatty-flies-end",
"chilly-seas-act",
"famous-buttons-switch",
"gorgeous-gorillas-sniff",
"green-experts-hang",
"heavy-students-relax",
"honest-cheetahs-care",
"honest-rivers-deny",
"late-mangos-doubt",
"late-planets-breathe",
"lazy-phones-fail",
"little-berries-applaud",
"loud-otters-pull",
"lovely-mice-promise",
Expand All @@ -69,15 +72,20 @@
"odd-beds-punch",
"poor-dogs-crash",
"pretty-rocks-argue",
"purple-forks-rest",
"shiny-birds-pay",
"short-toes-perform",
"silly-months-happen",
"sixty-dodos-smile",
"stale-turtles-hang",
"strong-pandas-marry",
"tender-turtles-bake",
"thick-masks-lie",
"thick-radios-appear",
"thick-radios-search",
"tidy-wolves-share",
"tricky-fishes-pull",
"two-cougars-try",
"violet-brooms-report",
"wild-lobsters-kick"
]
Expand Down
14 changes: 14 additions & 0 deletions packages/accounts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @solana/accounts

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/codecs-strings@2.0.0-preview.4
- @solana/codecs-core@2.0.0-preview.4
- @solana/addresses@2.0.0-preview.4
- @solana/rpc-types@2.0.0-preview.4
- @solana/rpc-spec@2.0.0-preview.4
- @solana/errors@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/accounts",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Helpers for representing, fetching and decoding Solana accounts",
"exports": {
"browser": {
Expand Down
12 changes: 12 additions & 0 deletions packages/addresses/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @solana/addresses

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/codecs-strings@2.0.0-preview.4
- @solana/codecs-core@2.0.0-preview.4
- @solana/assertions@2.0.0-preview.4
- @solana/errors@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/addresses/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/addresses",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Helpers for generating account addresses",
"exports": {
"browser": {
Expand Down
9 changes: 9 additions & 0 deletions packages/assertions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @solana/assertions

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/errors@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/assertions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/assertions",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Helpers for asserting that a JavaScript environment supports certain features necessary for the operation of the Solana JavaScript SDK",
"exports": {
"browser": {
Expand Down
9 changes: 9 additions & 0 deletions packages/codecs-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @solana/codecs-core

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/errors@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/codecs-core",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Core types and helpers for encoding and decoding byte arrays on Solana",
"exports": {
"browser": {
Expand Down
45 changes: 45 additions & 0 deletions packages/codecs-data-structures/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# @solana/codecs-data-structures

## 2.0.0-preview.4

### Patch Changes

- [#2715](https://github.com/solana-labs/solana-web3.js/pull/2715) [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Consolidated `getNullableCodec` and `getOptionCodec` with their `Zeroable` counterparts and added more configurations

Namely, the `prefix` option can now be set to `null` and the `fixed` option was replaced with the `noneValue` option which can be set to `"zeroes"` for `Zeroable` codecs or a custom byte array for custom representations of none values. This means the `getZeroableNullableCodec` and `getZeroableOptionCodec` functions were removed in favor of the new options.

```ts
// Before.
getZeroableNullableCodec(getU16Codec());

// After.
getNullableCodec(getU16Codec(), { noneValue: "zeroes", prefix: null });
```

Additionally, it is now possible to create nullable codecs that have no `prefix` nor `noneValue`. In this case, the existence of the nullable item is indicated by the presence of any remaining bytes left to decode.

```ts
const codec = getNullableCodec(getU16Codec(), { prefix: null });
codec.encode(42); // 0x2a00
codec.encode(null); // Encodes nothing.
codec.decode(new Uint8Array([42, 0])); // 42
codec.decode(new Uint8Array([])); // null
```

Also note that it is now possible for custom `noneValue` byte arrays to be of any length — previously, it had to match the fixed-size of the nullable item.

Here is a recap of all supported scenarios, using a `u16` codec as an example:

| `encode(42)` / `encode(null)` | No `noneValue` (default) | `noneValue: "zeroes"` | Custom `noneValue` (`0xff`) |
| ----------------------------- | ------------------------ | --------------------------- | --------------------------- |
| `u8` prefix (default) | `0x012a00` / `0x00` | `0x012a00` / `0x000000` | `0x012a00` / `0x00ff` |
| Custom `prefix` (`u16`) | `0x01002a00` / `0x0000` | `0x01002a00` / `0x00000000` | `0x01002a00` / `0x0000ff` |
| No `prefix` | `0x2a00` / `0x` | `0x2a00` / `0x0000` | `0x2a00` / `0xff` |

Reciprocal changes were made with `getOptionCodec`.

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/codecs-numbers@2.0.0-preview.4
- @solana/codecs-core@2.0.0-preview.4
- @solana/errors@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-data-structures/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/codecs-data-structures",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Codecs for various data structures",
"exports": {
"browser": {
Expand Down
10 changes: 10 additions & 0 deletions packages/codecs-numbers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @solana/codecs-numbers

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/codecs-core@2.0.0-preview.4
- @solana/errors@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-numbers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/codecs-numbers",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Codecs for numbers of different sizes and endianness",
"exports": {
"browser": {
Expand Down
13 changes: 13 additions & 0 deletions packages/codecs-strings/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @solana/codecs-strings

## 2.0.0-preview.4

### Patch Changes

- [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7) Thanks [@steveluscher](https://github.com/steveluscher)! - Converting a base16 string to a byte buffer is now between 2-3x faster (Thanks @tibi77!)

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/codecs-numbers@2.0.0-preview.4
- @solana/codecs-core@2.0.0-preview.4
- @solana/errors@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-strings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/codecs-strings",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Codecs for strings of different sizes and encodings",
"exports": {
"browser": {
Expand Down
47 changes: 47 additions & 0 deletions packages/codecs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# @solana/codecs

## 2.0.0-preview.4

### Patch Changes

- [#2715](https://github.com/solana-labs/solana-web3.js/pull/2715) [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Consolidated `getNullableCodec` and `getOptionCodec` with their `Zeroable` counterparts and added more configurations

Namely, the `prefix` option can now be set to `null` and the `fixed` option was replaced with the `noneValue` option which can be set to `"zeroes"` for `Zeroable` codecs or a custom byte array for custom representations of none values. This means the `getZeroableNullableCodec` and `getZeroableOptionCodec` functions were removed in favor of the new options.

```ts
// Before.
getZeroableNullableCodec(getU16Codec());

// After.
getNullableCodec(getU16Codec(), { noneValue: "zeroes", prefix: null });
```

Additionally, it is now possible to create nullable codecs that have no `prefix` nor `noneValue`. In this case, the existence of the nullable item is indicated by the presence of any remaining bytes left to decode.

```ts
const codec = getNullableCodec(getU16Codec(), { prefix: null });
codec.encode(42); // 0x2a00
codec.encode(null); // Encodes nothing.
codec.decode(new Uint8Array([42, 0])); // 42
codec.decode(new Uint8Array([])); // null
```

Also note that it is now possible for custom `noneValue` byte arrays to be of any length — previously, it had to match the fixed-size of the nullable item.

Here is a recap of all supported scenarios, using a `u16` codec as an example:

| `encode(42)` / `encode(null)` | No `noneValue` (default) | `noneValue: "zeroes"` | Custom `noneValue` (`0xff`) |
| ----------------------------- | ------------------------ | --------------------------- | --------------------------- |
| `u8` prefix (default) | `0x012a00` / `0x00` | `0x012a00` / `0x000000` | `0x012a00` / `0x00ff` |
| Custom `prefix` (`u16`) | `0x01002a00` / `0x0000` | `0x01002a00` / `0x00000000` | `0x01002a00` / `0x0000ff` |
| No `prefix` | `0x2a00` / `0x` | `0x2a00` / `0x0000` | `0x2a00` / `0xff` |

Reciprocal changes were made with `getOptionCodec`.

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8), [`a29bfee`](https://github.com/solana-labs/solana-web3.js/commit/a29bfeeb2119d99906a31fb1e5103d8ebf783ceb), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/codecs-strings@2.0.0-preview.4
- @solana/codecs-data-structures@2.0.0-preview.4
- @solana/options@2.0.0-preview.4
- @solana/codecs-numbers@2.0.0-preview.4
- @solana/codecs-core@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/codecs",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "A library for encoding and decoding any data structure",
"exports": {
"browser": {
Expand Down
12 changes: 12 additions & 0 deletions packages/compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @solana/compat

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

- Updated dependencies [[`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b)]:
- @solana/keys@2.0.0-preview.4
- @solana/transactions@2.0.0-preview.4
- @solana/addresses@2.0.0-preview.4
- @solana/errors@2.0.0-preview.4

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/compat",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Helpers for converting from legacy web3js classes",
"exports": {
"browser": {
Expand Down
6 changes: 6 additions & 0 deletions packages/errors/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @solana/errors

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/errors",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Throw, identify, and decode Solana JavaScript errors",
"exports": {
"browser": {
Expand Down
6 changes: 6 additions & 0 deletions packages/fast-stable-stringify/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @solana/fast-stable-stringify

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

## 2.0.0-preview.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/fast-stable-stringify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/fast-stable-stringify",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Deterministic stringification for when performance and bundle size matters",
"exports": {
"browser": {
Expand Down
6 changes: 6 additions & 0 deletions packages/functional/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @solana/functional

## 2.0.0-preview.4

### Patch Changes

- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type

## 2.0.0-preview.3

## 2.0.0-preview.2
Expand Down
2 changes: 1 addition & 1 deletion packages/functional/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/functional",
"version": "2.0.0-preview.3",
"version": "2.0.0-preview.4",
"description": "Functional JavaScript helpers",
"exports": {
"browser": {
Expand Down

0 comments on commit eea121d

Please sign in to comment.