Skip to content

Commit

Permalink
feat: update package name for typescript client to @electric-sql/clie…
Browse files Browse the repository at this point in the history
…nt (#1480)

We're going to deprecate `electric-sql` and just keep all npm packages
under the `@electric-sql` namespace.
  • Loading branch information
KyleAMathews committed Aug 6, 2024
1 parent 4cc1550 commit beea50d
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 38 deletions.
8 changes: 4 additions & 4 deletions docs/api/clients/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ The TypeScript client helps ease reading Shapes from the HTTP API in the browser

## Install

The client is published on NPM as [`@electric-sql/next`](https://www.npmjs.com/package/@electric-sql/next):
The client is published on NPM as [`@electric-sql/client`](https://www.npmjs.com/package/@electric-sql/client):

```sh
npm i @electric-sql/next
npm i @electric-sql/client
```

## How to use
Expand All @@ -29,7 +29,7 @@ The client exports a `ShapeStream` class for getting updates to shapes on a row-
### `ShapeStream`

```tsx
import { ShapeStream } from '@electric-sql/next'
import { ShapeStream } from '@electric-sql/client'

// Passes subscribers rows as they're inserted, updated, or deleted
const stream = new ShapeStream({
Expand Down Expand Up @@ -65,7 +65,7 @@ const stream = new ShapeStream({
### `Shape`

```tsx
import { ShapeStream, Shape } from '@electric-sql/next'
import { ShapeStream, Shape } from '@electric-sql/client'

const stream = new ShapeStream({
url: `http://localhost:3000/v1/shape/foo`,
Expand Down
2 changes: 1 addition & 1 deletion examples/linearlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"classnames": "^2.5.1",
"dayjs": "^1.11.11",
"dotenv": "^16.4.5",
"@electric-sql/next": "workspace:*",
"@electric-sql/client": "workspace:*",
"fractional-indexing": "^3.2.0",
"jsonwebtoken": "^9.0.2",
"lodash.debounce": "^4.0.8",
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs-example/app/match-stream.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShapeStream, ChangeMessage } from "@electric-sql/next"
import { ShapeStream, ChangeMessage } from "@electric-sql/client"

export async function matchStream<T>({
stream,
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@electric-sql/next": "workspace:*",
"@electric-sql/client": "workspace:*",
"@electric-sql/react": "workspace:*",
"next": "^14.2.5",
"pg": "^8.12.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/redis-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"homepage": "https://github.com/electric-sql/electric-next#readme",
"dependencies": {
"@electric-sql/next": "workspace:*",
"@electric-sql/client": "workspace:*",
"redis": "^4.6.14"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/redis-client/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createClient } from 'redis'
import { ShapeStream, Message } from '@electric-sql/next'
import { ShapeStream, Message } from '@electric-sql/client'

// Create a Redis client
const REDIS_HOST = `localhost`
Expand Down
2 changes: 1 addition & 1 deletion examples/remix-basic/app/match-stream.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShapeStream, ChangeMessage } from "@electric-sql/next"
import { ShapeStream, ChangeMessage } from "@electric-sql/client"

export async function matchStream({
stream,
Expand Down
2 changes: 1 addition & 1 deletion examples/remix-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@electric-sql/next": "workspace:*",
"@electric-sql/client": "workspace:*",
"@electric-sql/react": "workspace:*",
"@remix-run/dev": "^2.11.0",
"@remix-run/node": "^2.11.0",
Expand Down
24 changes: 12 additions & 12 deletions packages/react-hooks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

- Updated dependencies [06e843c]
- Updated dependencies [22f388f]
- @electric-sql/next@0.2.2
- @electric-sql/client@0.2.2

## 0.1.1

### Patch Changes

- Updated dependencies [5c43a31]
- @electric-sql/next@0.2.1
- @electric-sql/client@0.2.1

## 0.1.0

Expand All @@ -24,59 +24,59 @@
### Patch Changes

- Updated dependencies [1ca40a7]
- @electric-sql/next@0.2.0
- @electric-sql/client@0.2.0

## 0.0.10

### Patch Changes

- c3aafda: fix: add prepack script so typescript gets compiled before publishing
- Updated dependencies [c3aafda]
- @electric-sql/next@0.1.1
- @electric-sql/client@0.1.1

## 0.0.9

### Patch Changes

- Updated dependencies [36b9ab5]
- @electric-sql/next@0.1.0
- @electric-sql/client@0.1.0

## 0.0.8

### Patch Changes

- fedf95c: fix: make packaging work in Remix, etc.
- Updated dependencies [fedf95c]
- @electric-sql/next@0.0.8
- @electric-sql/client@0.0.8

## 0.0.7

### Patch Changes

- 4ce7634: useShape now uses useSyncExternalStoreWithSelector for better integration with React's rendering lifecycle
- Updated dependencies [4ce7634]
- @electric-sql/next@0.0.7
- @electric-sql/client@0.0.7

## 0.0.6

### Patch Changes

- Updated dependencies [324effc]
- @electric-sql/next@0.0.6
- @electric-sql/client@0.0.6

## 0.0.5

### Patch Changes

- Updated dependencies [7208887]
- @electric-sql/next@0.0.5
- @electric-sql/client@0.0.5

## 0.0.4

### Patch Changes

- Updated dependencies [958cc0c]
- @electric-sql/next@0.0.4
- @electric-sql/client@0.0.4

## 0.0.3

Expand All @@ -87,12 +87,12 @@
- Updated dependencies [af3452a]
- Updated dependencies [cf3b3bb]
- Updated dependencies [6fdb1b2]
- @electric-sql/next@0.0.3
- @electric-sql/client@0.0.3

## 0.0.2

### Patch Changes

- 3656959: Fixed publishing to include built code
- Updated dependencies [3656959]
- @electric-sql/next@0.0.2
- @electric-sql/client@0.0.2
2 changes: 1 addition & 1 deletion packages/react-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"homepage": "https://next.electric-sql.com",
"dependencies": {
"use-sync-external-store": "^1.2.2",
"@electric-sql/next": "workspace:*"
"@electric-sql/client": "workspace:*"
},
"devDependencies": {
"@testing-library/react": "^16.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-hooks/src/react-hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Shape,
ShapeStream,
ShapeStreamOptions,
} from '@electric-sql/next'
} from '@electric-sql/client'
import React, { createContext, useCallback, useContext, useRef } from 'react'
import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector.js'

Expand Down
2 changes: 1 addition & 1 deletion packages/react-hooks/test/react-hooks.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { describe, expect, inject, it as bareIt } from 'vitest'
import { setTimeout as sleep } from 'node:timers/promises'
import { testWithIssuesTable as it } from './support/test-context'
import { useShape, ShapesProvider, sortedOptionsHash } from '../src/react-hooks'
import { Shape, Message } from '@electric-sql/next'
import { Shape, Message } from '@electric-sql/client'

type FC = React.FC<React.PropsWithChildren>
const BASE_URL = inject(`baseUrl`)
Expand Down
2 changes: 1 addition & 1 deletion packages/react-hooks/test/support/global-setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GlobalSetupContext } from 'vitest/node'
import { FetchError } from '@electric-sql/next'
import { FetchError } from '@electric-sql/client'
import { makePgClient } from './test-helpers'

const url = process.env.ELECTRIC_URL ?? `http://localhost:3000`
Expand Down
2 changes: 1 addition & 1 deletion packages/react-hooks/test/support/test-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { v4 as uuidv4 } from 'uuid'
import { Client, QueryResult } from 'pg'
import { inject, test } from 'vitest'
import { makePgClient } from './test-helpers'
import { FetchError } from '@electric-sql/next'
import { FetchError } from '@electric-sql/client'

export type IssueRow = { id: string; title: string }
export type GeneratedIssueRow = { id?: string; title: string }
Expand Down
2 changes: 1 addition & 1 deletion packages/react-hooks/test/support/test-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShapeStream, Value, Message } from '@electric-sql/next'
import { ShapeStream, Value, Message } from '@electric-sql/client'
import { Client, ClientConfig } from 'pg'

export function makePgClient(overrides: ClientConfig = {}) {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @electric-sql/next
# @electric-sql/client

## 0.2.2

Expand Down
4 changes: 2 additions & 2 deletions packages/typescript-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ The TypeScript client helps ease reading Shapes from the HTTP API in the browser

## Install

The client is published on NPM as [`@electric-sql/next`](https://www.npmjs.com/package/@electric-sql/next):
The client is published on NPM as [`@electric-sql/client`](https://www.npmjs.com/package/@electric-sql/client):

```sh
npm i @electric-sql/next
npm i @electric-sql/client
```

## How to use
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@electric-sql/next",
"name": "@electric-sql/client",
"version": "0.2.2",
"description": "Postgres everywhere - your data, in sync, wherever you need it.",
"type": "module",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit beea50d

Please sign in to comment.