bun-types 1.3.3-canary.20251112T140644 → 1.3.3-canary.20251114T140703

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.
@@ -42,7 +42,21 @@ type PluginBuilder = {
42
42
  config: BuildConfig;
43
43
  };
44
44
 
45
- type Loader = "js" | "jsx" | "ts" | "tsx" | "css" | "json" | "toml";
45
+ type Loader =
46
+ | "js"
47
+ | "jsx"
48
+ | "ts"
49
+ | "tsx"
50
+ | "json"
51
+ | "jsonc"
52
+ | "toml"
53
+ | "yaml"
54
+ | "file"
55
+ | "napi"
56
+ | "wasm"
57
+ | "text"
58
+ | "css"
59
+ | "html";
46
60
  ```
47
61
 
48
62
  ## Usage
@@ -132,9 +132,7 @@ CMD ["bun", "index.ts"]
132
132
  <Note>
133
133
  Make sure that the start command corresponds to your application's entry point. This can also be `CMD ["bun", "run", "start"]` if you have a start script in your `package.json`.
134
134
 
135
- This image installs dependencies and runs your app with Bun inside a container. If your app doesn't have dependencies, you can omit the `RUN bun install --production --frozen-lockfile` line.
136
-
137
- This image installs dependencies and runs your app with Bun inside a container. If your app doesn't have dependencies, you can omit the `RUN bun install --production --frozen-lockfile` line.
135
+ This image installs dependencies and runs your app with Bun inside a container. If your app doesn't have dependencies, you can omit the `RUN bun install --production --frozen-lockfile` line.
138
136
 
139
137
  </Note>
140
138
 
@@ -159,8 +157,7 @@ Make sure you're in the directory containing your `Dockerfile`, then deploy dire
159
157
 
160
158
  <Note>
161
159
  Update the `--region` flag to your preferred region. You can also omit this flag to get an interactive prompt to
162
- select a region. Update the `--region` flag to your preferred region. You can also omit this flag to get an
163
- interactive prompt to select a region.
160
+ select a region.
164
161
  </Note>
165
162
 
166
163
  ```bash terminal icon="terminal"
@@ -1,23 +1,27 @@
1
1
  ---
2
- title: Use EdgeDB with Bun
3
- sidebarTitle: EdgeDB with Bun
2
+ title: Use Gel with Bun
3
+ sidebarTitle: Gel with Bun
4
4
  mode: center
5
5
  ---
6
6
 
7
- EdgeDB is a graph-relational database powered by Postgres under the hood. It provides a declarative schema language, migrations system, and object-oriented query language, in addition to supporting raw SQL queries. It solves the object-relational mapping problem at the database layer, eliminating the need for an ORM library in your application code.
7
+ Gel (formerly EdgeDB) is a graph-relational database powered by Postgres under the hood. It provides a declarative schema language, migrations system, and object-oriented query language, in addition to supporting raw SQL queries. It solves the object-relational mapping problem at the database layer, eliminating the need for an ORM library in your application code.
8
8
 
9
9
  ---
10
10
 
11
- First, [install EdgeDB](https://www.edgedb.com/install) if you haven't already.
11
+ First, [install Gel](https://docs.geldata.com/learn/installation) if you haven't already.
12
12
 
13
13
  <CodeGroup>
14
14
 
15
15
  ```sh Linux/macOS terminal icon="terminal"
16
- curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
16
+ curl https://www.geldata.com/sh --proto "=https" -sSf1 | sh
17
17
  ```
18
18
 
19
19
  ```sh Windows terminal icon="windows"
20
- iwr https://ps1.edgedb.com -useb | iex
20
+ irm https://www.geldata.com/ps1 | iex
21
+ ```
22
+
23
+ ```sh Homebrew terminal icon="terminal"
24
+ brew install geldata/tap/gel-cli
21
25
  ```
22
26
 
23
27
  </CodeGroup>
@@ -34,35 +38,35 @@ bun init -y
34
38
 
35
39
  ---
36
40
 
37
- We'll use the EdgeDB CLI to initialize an EdgeDB instance for our project. This creates an `edgedb.toml` file in our project root.
41
+ We'll use the Gel CLI to initialize a Gel instance for our project. This creates a `gel.toml` file in our project root.
38
42
 
39
43
  ```sh terminal icon="terminal"
40
- edgedb project init
44
+ gel project init
41
45
  ```
42
46
 
43
47
  ```txt
44
- No `edgedb.toml` found in `/Users/colinmcd94/Documents/bun/fun/examples/my-edgedb-app` or above
48
+ No `gel.toml` found in `/Users/colinmcd94/Documents/bun/fun/examples/my-gel-app` or above
45
49
  Do you want to initialize a new project? [Y/n]
46
50
  > Y
47
- Specify the name of EdgeDB instance to use with this project [default: my_edgedb_app]:
48
- > my_edgedb_app
49
- Checking EdgeDB versions...
50
- Specify the version of EdgeDB to use with this project [default: x.y]:
51
+ Specify the name of Gel instance to use with this project [default: my_gel_app]:
52
+ > my_gel_app
53
+ Checking Gel versions...
54
+ Specify the version of Gel to use with this project [default: x.y]:
51
55
  > x.y
52
- ┌─────────────────────┬────────────────────────────────────────────────────────────────────────┐
53
- │ Project directory │ /Users/colinmcd94/Documents/bun/fun/examples/my-edgedb-app
54
- │ Project config │ /Users/colinmcd94/Documents/bun/fun/examples/my-edgedb-app/edgedb.toml
55
- │ Schema dir (empty) │ /Users/colinmcd94/Documents/bun/fun/examples/my-edgedb-app/dbschema
56
- │ Installation method │ portable package
57
- │ Version │ x.y+6d5921b
58
- │ Instance name │ my_edgedb_app
59
- └─────────────────────┴────────────────────────────────────────────────────────────────────────┘
56
+ ┌─────────────────────┬──────────────────────────────────────────────────────────────────┐
57
+ │ Project directory │ /Users/colinmcd94/Documents/bun/fun/examples/my-gel-app
58
+ │ Project config │ /Users/colinmcd94/Documents/bun/fun/examples/my-gel-app/gel.toml│
59
+ │ Schema dir (empty) │ /Users/colinmcd94/Documents/bun/fun/examples/my-gel-app/dbschema│
60
+ │ Installation method │ portable package
61
+ │ Version │ x.y+6d5921b
62
+ │ Instance name │ my_gel_app
63
+ └─────────────────────┴──────────────────────────────────────────────────────────────────┘
60
64
  Version x.y+6d5921b is already downloaded
61
- Initializing EdgeDB instance...
65
+ Initializing Gel instance...
62
66
  Applying migrations...
63
67
  Everything is up to date. Revision initial
64
68
  Project initialized.
65
- To connect to my_edgedb_app, run `edgedb`
69
+ To connect to my_gel_app, run `gel`
66
70
  ```
67
71
 
68
72
  ---
@@ -70,8 +74,8 @@ To connect to my_edgedb_app, run `edgedb`
70
74
  To see if the database is running, let's open a REPL and run a simple query.
71
75
 
72
76
  ```sh terminal icon="terminal"
73
- edgedb
74
- edgedb> select 1 + 1;
77
+ gel
78
+ gel> select 1 + 1;
75
79
  ```
76
80
 
77
81
  ```txt
@@ -81,12 +85,12 @@ edgedb> select 1 + 1;
81
85
  Then run `\quit` to exit the REPL.
82
86
 
83
87
  ```sh terminal icon="terminal"
84
- edgedb> \quit
88
+ gel> \quit
85
89
  ```
86
90
 
87
91
  ---
88
92
 
89
- With the project initialized, we can define a schema. The `edgedb project init` command already created a `dbschema/default.esdl` file to contain our schema.
93
+ With the project initialized, we can define a schema. The `gel project init` command already created a `dbschema/default.esdl` file to contain our schema.
90
94
 
91
95
  ```txt File Tree icon="folder-tree"
92
96
  dbschema
@@ -112,15 +116,15 @@ module default {
112
116
  Then generate and apply an initial migration.
113
117
 
114
118
  ```sh terminal icon="terminal"
115
- edgedb migration create
119
+ gel migration create
116
120
  ```
117
121
 
118
122
  ```txt
119
- Created /Users/colinmcd94/Documents/bun/fun/examples/my-edgedb-app/dbschema/migrations/00001.edgeql, id: m1uwekrn4ni4qs7ul7hfar4xemm5kkxlpswolcoyqj3xdhweomwjrq
123
+ Created /Users/colinmcd94/Documents/bun/fun/examples/my-gel-app/dbschema/migrations/00001.edgeql, id: m1uwekrn4ni4qs7ul7hfar4xemm5kkxlpswolcoyqj3xdhweomwjrq
120
124
  ```
121
125
 
122
126
  ```sh terminal icon="terminal"
123
- edgedb migrate
127
+ gel migrate
124
128
  ```
125
129
 
126
130
  ```txt
@@ -129,11 +133,11 @@ Applied m1uwekrn4ni4qs7ul7hfar4xemm5kkxlpswolcoyqj3xdhweomwjrq (00001.edgeql)
129
133
 
130
134
  ---
131
135
 
132
- With our schema applied, let's execute some queries using EdgeDB's JavaScript client library. We'll install the client library and EdgeDB's codegen CLI, and create a `seed.ts`.file.
136
+ With our schema applied, let's execute some queries using Gel's JavaScript client library. We'll install the client library and Gel's codegen CLI, and create a `seed.ts`.file.
133
137
 
134
138
  ```sh terminal icon="terminal"
135
- bun add edgedb
136
- bun add -D @edgedb/generate
139
+ bun add gel
140
+ bun add -D @gel/generate
137
141
  touch seed.ts
138
142
  ```
139
143
 
@@ -144,7 +148,7 @@ Paste the following code into `seed.ts`.
144
148
  The client auto-connects to the database. We insert a couple movies using the `.execute()` method. We will use EdgeQL's `for` expression to turn this bulk insert into a single optimized query.
145
149
 
146
150
  ```ts seed.ts icon="/icons/typescript.svg"
147
- import { createClient } from "edgedb";
151
+ import { createClient } from "gel";
148
152
 
149
153
  const client = createClient();
150
154
 
@@ -184,10 +188,10 @@ Seeding complete.
184
188
 
185
189
  ---
186
190
 
187
- EdgeDB implements a number of code generation tools for TypeScript. To query our newly seeded database in a typesafe way, we'll use `@edgedb/generate` to code-generate the EdgeQL query builder.
191
+ Gel implements a number of code generation tools for TypeScript. To query our newly seeded database in a typesafe way, we'll use `@gel/generate` to code-generate the EdgeQL query builder.
188
192
 
189
193
  ```sh terminal icon="terminal"
190
- bunx @edgedb/generate edgeql-js
194
+ bunx @gel/generate edgeql-js
191
195
  ```
192
196
 
193
197
  ```txt
@@ -213,7 +217,7 @@ the query builder directory? The following line will be added:
213
217
  In `index.ts`, we can import the generated query builder from `./dbschema/edgeql-js` and write a simple select query.
214
218
 
215
219
  ```ts index.ts icon="/icons/typescript.svg"
216
- import { createClient } from "edgedb";
220
+ import { createClient } from "gel";
217
221
  import e from "./dbschema/edgeql-js";
218
222
 
219
223
  const client = createClient();
@@ -254,4 +258,4 @@ bun run index.ts
254
258
 
255
259
  ---
256
260
 
257
- For complete documentation, refer to the [EdgeDB docs](https://www.edgedb.com/docs).
261
+ For complete documentation, refer to the [Gel docs](https://docs.geldata.com/).
@@ -64,10 +64,10 @@ Later, when this test file is executed again, Bun will read the snapshot file an
64
64
 
65
65
  ```sh terminal icon="terminal"
66
66
  bun test
67
- bun test v1.3.2 (9c68abdb)
68
67
  ```
69
68
 
70
69
  ```txt
70
+ bun test v1.3.2 (9c68abdb)
71
71
  test/snap.test.ts:
72
72
  ✓ snapshot [1.05ms]
73
73
 
@@ -83,10 +83,10 @@ To update snapshots, use the `--update-snapshots` flag.
83
83
 
84
84
  ```sh terminal icon="terminal"
85
85
  bun test --update-snapshots
86
- bun test v1.3.2 (9c68abdb)
87
86
  ```
88
87
 
89
88
  ```txt
89
+ bun test v1.3.2 (9c68abdb)
90
90
  test/snap.test.ts:
91
91
  ✓ snapshot [0.86ms]
92
92
 
@@ -303,7 +303,7 @@ scripts[test:watch] # bracket for special chars
303
303
  Examples:
304
304
 
305
305
  ```bash terminal icon="terminal"
306
- # set
306
+ # get
307
307
  bun pm pkg get name # single property
308
308
  bun pm pkg get name version # multiple properties
309
309
  bun pm pkg get # entire package.json
@@ -7,8 +7,7 @@ Bun supports [`workspaces`](https://docs.npmjs.com/cli/v9/using-npm/workspaces?v
7
7
 
8
8
  It's common for a monorepo to have the following structure:
9
9
 
10
- ```
11
- tree
10
+ ```txt File Tree icon="folder-tree"
12
11
  <root>
13
12
  ├── README.md
14
13
  ├── bun.lock