From ab1ea51be05abca6438ceaada1e1ad806206d140 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:19:27 -0800 Subject: [PATCH] chore: publish new package versions (#2046) This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @electric-sql/react@0.6.0 ### Minor Changes - e96928e: [BREAKING]: Move non-protocol options like table & where to the params sub-key ## Context Electric's TypeScript client is currently tightly coupled to PostgreSQL-specific options in its `ShapeStreamOptions` interface. As Electric plans to support multiple data sources in the future, we need to separate protocol-level options from source-specific options. ## Changes 1. Created a new `PostgresParams` type to define PostgreSQL-specific parameters: - `table`: The root table for the shape - `where`: Where clauses for the shape - `columns`: Columns to include in the shape - `replica`: Whether to send full or partial row updates 2. Moved PostgreSQL-specific options from the top-level `ShapeStreamOptions` interface to the `params` sub-key 3. Updated `ParamsRecord` type to include PostgreSQL parameters 4. Updated the `ShapeStream` class to handle parameters from the `params` object 5. Updated documentation to reflect the changes ## Migration Example Before: ```typescript const stream = new ShapeStream({ url: 'http://localhost:3000/v1/shape', table: 'users', where: 'id > 100', columns: ['id', 'name'], replica: 'full', }) ``` After: ```typescript const stream = new ShapeStream({ url: 'http://localhost:3000/v1/shape', params: { table: 'users', where: 'id > 100', columns: ['id', 'name'], replica: 'full', }, }) ``` ### Patch Changes - Updated dependencies [9c50e8f] - Updated dependencies [af0c0bf] - Updated dependencies [e96928e] - @electric-sql/client@0.9.0 ## @electric-sql/client@0.9.0 ### Minor Changes - 9c50e8f: [BREAKING]: Remove databaseId option from ShapeStream in favor of params option. - e96928e: [BREAKING]: Move non-protocol options like table & where to the params sub-key ## Context Electric's TypeScript client is currently tightly coupled to PostgreSQL-specific options in its `ShapeStreamOptions` interface. As Electric plans to support multiple data sources in the future, we need to separate protocol-level options from source-specific options. ## Changes 1. Created a new `PostgresParams` type to define PostgreSQL-specific parameters: - `table`: The root table for the shape - `where`: Where clauses for the shape - `columns`: Columns to include in the shape - `replica`: Whether to send full or partial row updates 2. Moved PostgreSQL-specific options from the top-level `ShapeStreamOptions` interface to the `params` sub-key 3. Updated `ParamsRecord` type to include PostgreSQL parameters 4. Updated the `ShapeStream` class to handle parameters from the `params` object 5. Updated documentation to reflect the changes ## Migration Example Before: ```typescript const stream = new ShapeStream({ url: 'http://localhost:3000/v1/shape', table: 'users', where: 'id > 100', columns: ['id', 'name'], replica: 'full', }) ``` After: ```typescript const stream = new ShapeStream({ url: 'http://localhost:3000/v1/shape', params: { table: 'users', where: 'id > 100', columns: ['id', 'name'], replica: 'full', }, }) ``` ### Patch Changes - af0c0bf: Always use sorted query parameters in official clients to ensure Shape URLs are cached consistently. ## @core/elixir-client@0.2.4 ### Patch Changes - ea5d03f: Fix mishandling of 400s - should terminate - af0c0bf: Always use sorted query parameters in official clients to ensure Shape URLs are cached consistently. ## @core/sync-service@0.9.4 ### Patch Changes - 3584f67: Validate that user provided offset is not bigger than the shape's latest offset. - 0dc844f: Remove redundant spans in open telemetry tracing. - a16ab24: feat: add more telemetry - 3c24208: Clean up directories when removing shapes. Remove corrupted shapes from store when recovery fails. - 4e50204: Telemetry for reporting replication lag. - 704ac91: Include caching headers on 304 responses to prevent client from rechecking the previously cached ones over and over again. - ceec2d4: Assume process is not alive if registry is not alive. - 37b4256: Improved replication steam processing for where clauses in the form `field = const` or `field = const AND another_condition` - 64fe275: Restore the automatic fallback to unencrypted database connections when SSL isn't available. - 5b1c3e6: Resolve naming confusion between `ELECTRIC_LOG_CHUNK_BYTES_THRESHOLD` and logging-related configuration options. Add `ELECTRIC_` prefix to `LOG_LEVEL` to `LOG_OTP_REPORTS` config options. Introduce a new config option named `ELECTRIC_LOG_COLORS`. - e815b91: Log error but don't fall over if failing to initialise recovered shape Co-authored-by: github-actions[bot] --- .changeset/famous-bananas-report.md | 5 --- .changeset/few-gorillas-fetch.md | 5 --- .changeset/five-masks-check.md | 5 --- .changeset/hungry-apples-sell.md | 6 --- .changeset/khaki-meals-accept.md | 5 --- .changeset/nasty-emus-rule.md | 5 --- .changeset/nine-gorillas-rush.md | 5 --- .changeset/old-ligers-run.md | 5 --- .changeset/selfish-rings-mate.md | 6 --- .changeset/silly-shoes-appear.md | 5 --- .changeset/spotty-ears-build.md | 5 --- .changeset/stupid-weeks-look.md | 5 --- .changeset/sweet-timers-add.md | 5 --- .changeset/tiny-socks-drive.md | 49 --------------------- .changeset/warm-brooms-approve.md | 5 --- packages/elixir-client/CHANGELOG.md | 7 +++ packages/elixir-client/package.json | 2 +- packages/react-hooks/CHANGELOG.md | 57 +++++++++++++++++++++++++ packages/react-hooks/package.json | 2 +- packages/sync-service/CHANGELOG.md | 17 ++++++++ packages/sync-service/package.json | 2 +- packages/typescript-client/CHANGELOG.md | 55 ++++++++++++++++++++++++ packages/typescript-client/package.json | 2 +- 23 files changed, 140 insertions(+), 125 deletions(-) delete mode 100644 .changeset/famous-bananas-report.md delete mode 100644 .changeset/few-gorillas-fetch.md delete mode 100644 .changeset/five-masks-check.md delete mode 100644 .changeset/hungry-apples-sell.md delete mode 100644 .changeset/khaki-meals-accept.md delete mode 100644 .changeset/nasty-emus-rule.md delete mode 100644 .changeset/nine-gorillas-rush.md delete mode 100644 .changeset/old-ligers-run.md delete mode 100644 .changeset/selfish-rings-mate.md delete mode 100644 .changeset/silly-shoes-appear.md delete mode 100644 .changeset/spotty-ears-build.md delete mode 100644 .changeset/stupid-weeks-look.md delete mode 100644 .changeset/sweet-timers-add.md delete mode 100644 .changeset/tiny-socks-drive.md delete mode 100644 .changeset/warm-brooms-approve.md diff --git a/.changeset/famous-bananas-report.md b/.changeset/famous-bananas-report.md deleted file mode 100644 index d5aa3c847c..0000000000 --- a/.changeset/famous-bananas-report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Validate that user provided offset is not bigger than the shape's latest offset. diff --git a/.changeset/few-gorillas-fetch.md b/.changeset/few-gorillas-fetch.md deleted file mode 100644 index 35e08512dd..0000000000 --- a/.changeset/few-gorillas-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Remove redundant spans in open telemetry tracing. diff --git a/.changeset/five-masks-check.md b/.changeset/five-masks-check.md deleted file mode 100644 index 59af5ab8a0..0000000000 --- a/.changeset/five-masks-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -feat: add more telemetry diff --git a/.changeset/hungry-apples-sell.md b/.changeset/hungry-apples-sell.md deleted file mode 100644 index c11ee192e1..0000000000 --- a/.changeset/hungry-apples-sell.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Clean up directories when removing shapes. -Remove corrupted shapes from store when recovery fails. diff --git a/.changeset/khaki-meals-accept.md b/.changeset/khaki-meals-accept.md deleted file mode 100644 index 454dedb625..0000000000 --- a/.changeset/khaki-meals-accept.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Telemetry for reporting replication lag. diff --git a/.changeset/nasty-emus-rule.md b/.changeset/nasty-emus-rule.md deleted file mode 100644 index b006a0a735..0000000000 --- a/.changeset/nasty-emus-rule.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/elixir-client": patch ---- - -Fix mishandling of 400s - should terminate diff --git a/.changeset/nine-gorillas-rush.md b/.changeset/nine-gorillas-rush.md deleted file mode 100644 index d05cf481a6..0000000000 --- a/.changeset/nine-gorillas-rush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Include caching headers on 304 responses to prevent client from rechecking the previously cached ones over and over again. diff --git a/.changeset/old-ligers-run.md b/.changeset/old-ligers-run.md deleted file mode 100644 index 5939326b91..0000000000 --- a/.changeset/old-ligers-run.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@electric-sql/client": minor ---- - -[BREAKING]: Remove databaseId option from ShapeStream in favor of params option. diff --git a/.changeset/selfish-rings-mate.md b/.changeset/selfish-rings-mate.md deleted file mode 100644 index dc01485202..0000000000 --- a/.changeset/selfish-rings-mate.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@electric-sql/client": patch -"@core/elixir-client": patch ---- - -Always use sorted query parameters in official clients to ensure Shape URLs are cached consistently. diff --git a/.changeset/silly-shoes-appear.md b/.changeset/silly-shoes-appear.md deleted file mode 100644 index 58c28ac3be..0000000000 --- a/.changeset/silly-shoes-appear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Assume process is not alive if registry is not alive. diff --git a/.changeset/spotty-ears-build.md b/.changeset/spotty-ears-build.md deleted file mode 100644 index 14dae5cd32..0000000000 --- a/.changeset/spotty-ears-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Improved replication steam processing for where clauses in the form `field = const` or `field = const AND another_condition` diff --git a/.changeset/stupid-weeks-look.md b/.changeset/stupid-weeks-look.md deleted file mode 100644 index a400d0f6e3..0000000000 --- a/.changeset/stupid-weeks-look.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Restore the automatic fallback to unencrypted database connections when SSL isn't available. diff --git a/.changeset/sweet-timers-add.md b/.changeset/sweet-timers-add.md deleted file mode 100644 index 9e17d83305..0000000000 --- a/.changeset/sweet-timers-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Resolve naming confusion between `ELECTRIC_LOG_CHUNK_BYTES_THRESHOLD` and logging-related configuration options. Add `ELECTRIC_` prefix to `LOG_LEVEL` to `LOG_OTP_REPORTS` config options. Introduce a new config option named `ELECTRIC_LOG_COLORS`. diff --git a/.changeset/tiny-socks-drive.md b/.changeset/tiny-socks-drive.md deleted file mode 100644 index 1b477758bf..0000000000 --- a/.changeset/tiny-socks-drive.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -"@electric-sql/client": minor -"@electric-sql/react": minor ---- - -[BREAKING]: Move non-protocol options like table & where to the params sub-key - -## Context - -Electric's TypeScript client is currently tightly coupled to PostgreSQL-specific options in its `ShapeStreamOptions` interface. As Electric plans to support multiple data sources in the future, we need to separate protocol-level options from source-specific options. - -## Changes - -1. Created a new `PostgresParams` type to define PostgreSQL-specific parameters: - - `table`: The root table for the shape - - `where`: Where clauses for the shape - - `columns`: Columns to include in the shape - - `replica`: Whether to send full or partial row updates - -2. Moved PostgreSQL-specific options from the top-level `ShapeStreamOptions` interface to the `params` sub-key -3. Updated `ParamsRecord` type to include PostgreSQL parameters -4. Updated the `ShapeStream` class to handle parameters from the `params` object -5. Updated documentation to reflect the changes - -## Migration Example - -Before: -```typescript -const stream = new ShapeStream({ - url: 'http://localhost:3000/v1/shape', - table: 'users', - where: 'id > 100', - columns: ['id', 'name'], - replica: 'full' -}) -``` - -After: -```typescript -const stream = new ShapeStream({ - url: 'http://localhost:3000/v1/shape', - params: { - table: 'users', - where: 'id > 100', - columns: ['id', 'name'], - replica: 'full' - } -}) -``` diff --git a/.changeset/warm-brooms-approve.md b/.changeset/warm-brooms-approve.md deleted file mode 100644 index d4d4c14ff1..0000000000 --- a/.changeset/warm-brooms-approve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@core/sync-service": patch ---- - -Log error but don't fall over if failing to initialise recovered shape diff --git a/packages/elixir-client/CHANGELOG.md b/packages/elixir-client/CHANGELOG.md index 17a4c0926a..0f01946fb0 100644 --- a/packages/elixir-client/CHANGELOG.md +++ b/packages/elixir-client/CHANGELOG.md @@ -1,5 +1,12 @@ # @core/elixir-client +## 0.2.4 + +### Patch Changes + +- ea5d03f: Fix mishandling of 400s - should terminate +- af0c0bf: Always use sorted query parameters in official clients to ensure Shape URLs are cached consistently. + ## 0.2.3 ### Patch Changes diff --git a/packages/elixir-client/package.json b/packages/elixir-client/package.json index 55eeaf8914..01bd0a11cc 100644 --- a/packages/elixir-client/package.json +++ b/packages/elixir-client/package.json @@ -1,7 +1,7 @@ { "name": "@core/elixir-client", "private": true, - "version": "0.2.3", + "version": "0.2.4", "scripts": { "publish:hex": "mix do deps.get, hex.publish --yes || true" } diff --git a/packages/react-hooks/CHANGELOG.md b/packages/react-hooks/CHANGELOG.md index 32955db354..3858297dab 100644 --- a/packages/react-hooks/CHANGELOG.md +++ b/packages/react-hooks/CHANGELOG.md @@ -1,5 +1,62 @@ # @electric-sql/react +## 0.6.0 + +### Minor Changes + +- e96928e: [BREAKING]: Move non-protocol options like table & where to the params sub-key + + ## Context + + Electric's TypeScript client is currently tightly coupled to PostgreSQL-specific options in its `ShapeStreamOptions` interface. As Electric plans to support multiple data sources in the future, we need to separate protocol-level options from source-specific options. + + ## Changes + + 1. Created a new `PostgresParams` type to define PostgreSQL-specific parameters: + - `table`: The root table for the shape + - `where`: Where clauses for the shape + - `columns`: Columns to include in the shape + - `replica`: Whether to send full or partial row updates + 2. Moved PostgreSQL-specific options from the top-level `ShapeStreamOptions` interface to the `params` sub-key + 3. Updated `ParamsRecord` type to include PostgreSQL parameters + 4. Updated the `ShapeStream` class to handle parameters from the `params` object + 5. Updated documentation to reflect the changes + + ## Migration Example + + Before: + + ```typescript + const stream = new ShapeStream({ + url: 'http://localhost:3000/v1/shape', + table: 'users', + where: 'id > 100', + columns: ['id', 'name'], + replica: 'full', + }) + ``` + + After: + + ```typescript + const stream = new ShapeStream({ + url: 'http://localhost:3000/v1/shape', + params: { + table: 'users', + where: 'id > 100', + columns: ['id', 'name'], + replica: 'full', + }, + }) + ``` + +### Patch Changes + +- Updated dependencies [9c50e8f] +- Updated dependencies [af0c0bf] +- Updated dependencies [e96928e] + - @electric-sql/client@0.9.0 + ## 0.5.4 ### Patch Changes diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index cf2bbc77ff..d2e0806560 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -1,6 +1,6 @@ { "name": "@electric-sql/react", - "version": "0.5.4", + "version": "0.6.0", "description": "React hooks for ElectricSQL", "type": "module", "main": "dist/cjs/index.cjs", diff --git a/packages/sync-service/CHANGELOG.md b/packages/sync-service/CHANGELOG.md index e80367778f..9ddcf4c9f9 100644 --- a/packages/sync-service/CHANGELOG.md +++ b/packages/sync-service/CHANGELOG.md @@ -1,5 +1,22 @@ # @core/sync-service +## 0.9.4 + +### Patch Changes + +- 3584f67: Validate that user provided offset is not bigger than the shape's latest offset. +- 0dc844f: Remove redundant spans in open telemetry tracing. +- a16ab24: feat: add more telemetry +- 3c24208: Clean up directories when removing shapes. + Remove corrupted shapes from store when recovery fails. +- 4e50204: Telemetry for reporting replication lag. +- 704ac91: Include caching headers on 304 responses to prevent client from rechecking the previously cached ones over and over again. +- ceec2d4: Assume process is not alive if registry is not alive. +- 37b4256: Improved replication steam processing for where clauses in the form `field = const` or `field = const AND another_condition` +- 64fe275: Restore the automatic fallback to unencrypted database connections when SSL isn't available. +- 5b1c3e6: Resolve naming confusion between `ELECTRIC_LOG_CHUNK_BYTES_THRESHOLD` and logging-related configuration options. Add `ELECTRIC_` prefix to `LOG_LEVEL` to `LOG_OTP_REPORTS` config options. Introduce a new config option named `ELECTRIC_LOG_COLORS`. +- e815b91: Log error but don't fall over if failing to initialise recovered shape + ## 0.9.3 ### Patch Changes diff --git a/packages/sync-service/package.json b/packages/sync-service/package.json index 65a1996027..ed72377f12 100644 --- a/packages/sync-service/package.json +++ b/packages/sync-service/package.json @@ -1,7 +1,7 @@ { "name": "@core/sync-service", "private": true, - "version": "0.9.3", + "version": "0.9.4", "scripts": { "publish:hex": "mix do deps.get, hex.publish --yes || true" } diff --git a/packages/typescript-client/CHANGELOG.md b/packages/typescript-client/CHANGELOG.md index 7c017bcd0c..d59ca579e6 100644 --- a/packages/typescript-client/CHANGELOG.md +++ b/packages/typescript-client/CHANGELOG.md @@ -1,5 +1,60 @@ # @electric-sql/client +## 0.9.0 + +### Minor Changes + +- 9c50e8f: [BREAKING]: Remove databaseId option from ShapeStream in favor of params option. +- e96928e: [BREAKING]: Move non-protocol options like table & where to the params sub-key + + ## Context + + Electric's TypeScript client is currently tightly coupled to PostgreSQL-specific options in its `ShapeStreamOptions` interface. As Electric plans to support multiple data sources in the future, we need to separate protocol-level options from source-specific options. + + ## Changes + + 1. Created a new `PostgresParams` type to define PostgreSQL-specific parameters: + - `table`: The root table for the shape + - `where`: Where clauses for the shape + - `columns`: Columns to include in the shape + - `replica`: Whether to send full or partial row updates + 2. Moved PostgreSQL-specific options from the top-level `ShapeStreamOptions` interface to the `params` sub-key + 3. Updated `ParamsRecord` type to include PostgreSQL parameters + 4. Updated the `ShapeStream` class to handle parameters from the `params` object + 5. Updated documentation to reflect the changes + + ## Migration Example + + Before: + + ```typescript + const stream = new ShapeStream({ + url: 'http://localhost:3000/v1/shape', + table: 'users', + where: 'id > 100', + columns: ['id', 'name'], + replica: 'full', + }) + ``` + + After: + + ```typescript + const stream = new ShapeStream({ + url: 'http://localhost:3000/v1/shape', + params: { + table: 'users', + where: 'id > 100', + columns: ['id', 'name'], + replica: 'full', + }, + }) + ``` + +### Patch Changes + +- af0c0bf: Always use sorted query parameters in official clients to ensure Shape URLs are cached consistently. + ## 0.8.0 ### Minor Changes diff --git a/packages/typescript-client/package.json b/packages/typescript-client/package.json index 5d999f3cde..342b885513 100644 --- a/packages/typescript-client/package.json +++ b/packages/typescript-client/package.json @@ -1,6 +1,6 @@ { "name": "@electric-sql/client", - "version": "0.8.0", + "version": "0.9.0", "description": "Postgres everywhere - your data, in sync, wherever you need it.", "type": "module", "main": "dist/cjs/index.cjs",