@neondatabase/neon-js 0.1.0-beta.6 → 0.1.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -1
- package/dist/package.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,6 +20,12 @@ The official TypeScript SDK for Neon, combining authentication and database quer
|
|
|
20
20
|
- **TypeScript First** - Fully typed with strict type checking
|
|
21
21
|
- **Universal** - Works in Node.js, browsers, and edge runtimes
|
|
22
22
|
|
|
23
|
+
## How to query your Neon Serverless Postgres database?
|
|
24
|
+
|
|
25
|
+
It's up to you how you want to query your Postgres database! Neon Data API is a PostgREST-compatible REST service for your Neon database. `neon-js` exposes the REST-based query functions to leverage Data API. However, you can also use Data API directly with [PostgREST](https://postgrest.org) and we also maintain a simple Postgres client [here](https://github.com/neondatabase/serverless).
|
|
26
|
+
|
|
27
|
+
That said, you don't need Data API or `neon-js` to query Neon. Neon works great with all major ORMs ([Drizzle](https://orm.drizzle.team/), [Prisma](https://www.prisma.io/), [Kysely](https://kysely.dev/)) and Postgres clients ([node-postgres](https://node-postgres.com/), [postgres.js](https://github.com/porsager/postgres)). We also offer a [serverless driver](https://github.com/neondatabase/serverless) for edge and serverless environments without TCP client or connection pooling support (which also is available as a Drizzle and Prisma adapter).
|
|
28
|
+
|
|
23
29
|
## Installation
|
|
24
30
|
|
|
25
31
|
```bash
|
|
@@ -33,6 +39,8 @@ bun add @neondatabase/neon-js
|
|
|
33
39
|
```typescript
|
|
34
40
|
import { createClient } from '@neondatabase/neon-js';
|
|
35
41
|
|
|
42
|
+
// Database type generated via: npx neon-js gen-types --db-url "..."
|
|
43
|
+
// See "TypeScript" section below for details
|
|
36
44
|
const client = createClient<Database>({
|
|
37
45
|
auth: {
|
|
38
46
|
url: import.meta.env.VITE_NEON_AUTH_URL,
|
|
@@ -66,6 +74,8 @@ Use this adapter if you're migrating from Supabase or prefer the Supabase API st
|
|
|
66
74
|
```typescript
|
|
67
75
|
import { createClient, SupabaseAuthAdapter } from '@neondatabase/neon-js';
|
|
68
76
|
|
|
77
|
+
// Database type generated via: npx neon-js gen-types --db-url "..."
|
|
78
|
+
// See "TypeScript" section below for details
|
|
69
79
|
const client = createClient<Database>({
|
|
70
80
|
auth: {
|
|
71
81
|
adapter: SupabaseAuthAdapter(),
|
|
@@ -93,6 +103,8 @@ Use this adapter in React applications to get access to hooks like `useSession`:
|
|
|
93
103
|
import { createClient } from '@neondatabase/neon-js';
|
|
94
104
|
import { BetterAuthReactAdapter } from '@neondatabase/neon-js/auth/react/adapters';
|
|
95
105
|
|
|
106
|
+
// Database type generated via: npx neon-js gen-types --db-url "..."
|
|
107
|
+
// See "TypeScript" section below for details
|
|
96
108
|
const client = createClient<Database>({
|
|
97
109
|
auth: {
|
|
98
110
|
adapter: BetterAuthReactAdapter(),
|
|
@@ -325,7 +337,7 @@ const client = createClient({
|
|
|
325
337
|
|
|
326
338
|
## UI Component Styles
|
|
327
339
|
|
|
328
|
-
|
|
340
|
+
Styles for Neon Auth UI components are available from this package:
|
|
329
341
|
|
|
330
342
|
| Export | Use Case |
|
|
331
343
|
|--------|----------|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neondatabase/neon-js",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.7",
|
|
4
4
|
"description": "TypeScript SDK for Neon Auth and Data API - authentication and PostgreSQL querying",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
116
|
"@neondatabase/postgrest-js": "^0.1.0-alpha.1",
|
|
117
|
-
"@neondatabase/auth": "^0.1.0-beta.
|
|
117
|
+
"@neondatabase/auth": "^0.1.0-beta.8",
|
|
118
118
|
"@supabase/postgres-meta": "0.93.1",
|
|
119
119
|
"meow": "14.0.0",
|
|
120
120
|
"zod": "4.1.12"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neondatabase/neon-js",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.8",
|
|
4
4
|
"description": "TypeScript SDK for Neon Auth and Data API - authentication and PostgreSQL querying",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
116
|
"@neondatabase/postgrest-js": "0.1.0-alpha.1",
|
|
117
|
-
"@neondatabase/auth": "0.1.0-beta.
|
|
117
|
+
"@neondatabase/auth": "0.1.0-beta.8",
|
|
118
118
|
"@supabase/postgres-meta": "0.93.1",
|
|
119
119
|
"meow": "14.0.0",
|
|
120
120
|
"zod": "4.1.12"
|