File tree 4 files changed +61
-9
lines changed
4 files changed +61
-9
lines changed Original file line number Diff line number Diff line change 5
5
branches :
6
6
- main
7
7
pull_request :
8
+ workflow_call :
8
9
9
10
jobs :
10
11
quality :
48
49
env :
49
50
SURREAL_PROTOCOL : ${{ matrix.engine }}
50
51
52
+ dry-run-jsr-publish :
53
+ name : JSR Publish Dry Run
54
+ runs-on : ubuntu-latest
55
+ steps :
56
+ - name : Install Bun
57
+ uses : oven-sh/setup-bun@v2
58
+
59
+ - name : Code Checkout
60
+ uses : actions/checkout@v4
61
+
62
+ - name : Install dependencies
63
+ run : bun install
64
+
65
+ - name : Generate JSR config
66
+ run : bun run jsr
67
+
68
+ - name : Dry run publish to JSR
69
+ run : bunx jsr publish --dry-run
70
+
71
+ dry-run-npm-publish :
72
+ name : NPM Publish Dry Run
73
+ runs-on : ubuntu-latest
74
+ steps :
75
+ - name : Install Bun
76
+ uses : oven-sh/setup-bun@v2
77
+
78
+ - uses : actions/setup-node@v4
79
+ with :
80
+ node-version : ' 18.x'
81
+ registry-url : ' https://registry.npmjs.org'
82
+
83
+ - name : Code Checkout
84
+ uses : actions/checkout@v4
85
+
86
+ - name : Install dependencies
87
+ run : bun install
88
+
89
+ - name : Build library
90
+ run : bun run build
91
+
92
+ - name : Dry run publish to NPM
93
+ run : npm publish --dry-run --tag $(npm pkg get version | tr -d '"' | grep -qoE "^\d+\.\d+\.\d+$" && echo 'latest' || echo 'beta')
94
+ env :
95
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
96
+
51
97
build :
52
98
name : Build
53
99
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1
1
name : Publish
2
2
3
3
on :
4
- push :
5
- tags :
6
- - ' *'
4
+ release :
5
+ types : [published]
7
6
8
7
jobs :
8
+ ci :
9
+ name : CI
10
+ uses : ./.github/workflows/ci.yml
9
11
npm :
10
12
name : NPM
13
+ needs : [ci]
11
14
runs-on : ubuntu-latest
15
+ permissions :
16
+ contents : read
17
+ id-token : write
12
18
steps :
13
19
- name : Install Bun
14
20
uses : oven-sh/setup-bun@v2
@@ -28,13 +34,12 @@ jobs:
28
34
run : bun run build
29
35
30
36
- name : Publish to NPM
31
- # TODO temporary, enable beta tags again asap
32
- # run: npm publish --tag $(npm pkg get version | tr -d '"' | grep -qoE "^\d+\.\d+\.\d+$" && echo 'latest' || echo 'beta')
33
- run : npm publish
37
+ run : npm publish --provenance --tag $(npm pkg get version | tr -d '"' | grep -qoE "^\d+\.\d+\.\d+$" && echo 'latest' || echo 'beta')
34
38
env :
35
39
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
36
40
jsr :
37
41
name : JSR
42
+ needs : [ci]
38
43
runs-on : ubuntu-latest
39
44
permissions :
40
45
contents : read
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " surrealdb" ,
3
- "version" : " 1.0.1 " ,
3
+ "version" : " 1.0.2 " ,
4
4
"type" : " module" ,
5
5
"license" : " Apache-2.0" ,
6
6
"repository" : {
7
- "url" : " https://github.com/surrealdb/surrealdb.js"
7
+ "type" : " git" ,
8
+ "url" : " git+https://github.com/surrealdb/surrealdb.js.git"
8
9
},
9
10
"homepage" : " https://github.com/surrealdb/surrealdb.js" ,
10
11
"packageManager" :
" ^[email protected] " ,
Original file line number Diff line number Diff line change 1
- import { Uuid } from ".." ;
2
1
import { SurrealDbError } from "../../errors" ;
2
+ import { Uuid } from "./uuid" ;
3
3
4
4
const MAX_i64 = 9223372036854775807n ;
5
5
export type RecordIdValue =
You can’t perform that action at this time.
0 commit comments