Skip to content

Commit 8f86c56

Browse files
Release 1.4.0 (#135)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 641f53c commit 8f86c56

File tree

8 files changed

+281
-242
lines changed

8 files changed

+281
-242
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build]
22
target = "wasm32-unknown-unknown"
3-
rustflags = ["--cfg", "uuid_unstable", "--cfg", "surrealdb_unstable"]
3+
rustflags = ["--cfg", "uuid_unstable", "--cfg", "surrealdb_unstable", "--cfg", 'getrandom_backend="wasm_js"']

.github/workflows/build.yml

Lines changed: 48 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,57 @@
11
name: Create test build
22

3+
permissions:
4+
contents: read
5+
36
on:
47
workflow_dispatch:
58
inputs:
69
branch:
7-
description: 'Which branch to build'
8-
default: 'main'
10+
description: "Which branch to build"
11+
default: "main"
912
required: true
1013
type: string
1114
jobs:
12-
build:
13-
name: Publish
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- uses: actions/checkout@v3
18-
with:
19-
ref: "${{ inputs.branch }}"
20-
21-
- name: Install Node.js
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: 20
25-
registry-url: "https://registry.npmjs.org"
26-
27-
- name: Install pnpm
28-
uses: pnpm/action-setup@v2
29-
with:
30-
version: 9
31-
32-
- name: Install Rust toolchain
33-
uses: actions-rust-lang/setup-rust-toolchain@v1
34-
with:
35-
toolchain: 1.81.0
36-
37-
- name: Install wasm-pack
38-
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
39-
40-
- name: Install NPM dependencies
41-
run: pnpm install
42-
43-
- name: Build & Bundle
44-
run: pnpm build
45-
46-
- name: Pack
47-
run: npm pack --pack-destination ~
48-
49-
- uses: actions/upload-artifact@v4
50-
with:
51-
name: packed
52-
path: "~/*.tgz"
15+
build:
16+
name: Publish
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
ref: "${{ inputs.branch }}"
23+
24+
- name: Install Node.js
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: 20
28+
registry-url: "https://registry.npmjs.org"
29+
30+
- name: Install pnpm
31+
uses: pnpm/action-setup@v2
32+
with:
33+
version: 9
34+
35+
- name: Install Rust toolchain
36+
uses: actions-rust-lang/setup-rust-toolchain@v1
37+
with:
38+
toolchain: 1.82.0
39+
40+
- name: Install wasm-pack
41+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
42+
43+
- name: Install NPM dependencies
44+
run: pnpm install
45+
46+
- name: Build & Bundle
47+
run: pnpm build
48+
env:
49+
RUSTFLAGS: --cfg getrandom_backend="wasm_js"
50+
51+
- name: Pack
52+
run: npm pack --pack-destination ~
53+
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: packed
57+
path: "~/*.tgz"

.github/workflows/check.yml

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,30 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v3
12-
13-
- name: Install Node.js
14-
uses: actions/setup-node@v3
15-
with:
16-
node-version: 20
17-
18-
- name: Install pnpm
19-
uses: pnpm/action-setup@v2
20-
with:
21-
version: 9
22-
23-
- name: Install Rust toolchain
24-
uses: actions-rust-lang/setup-rust-toolchain@v1
25-
with:
26-
toolchain: 1.81.0
27-
28-
- name: Install wasm-pack
29-
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
30-
31-
- name: Install NPM dependencies
32-
run: pnpm install
33-
34-
- name: Build & Bundle
35-
run: pnpm build
11+
- uses: actions/checkout@v3
12+
13+
- name: Install Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: 20
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v2
20+
with:
21+
version: 9
22+
23+
- name: Install Rust toolchain
24+
uses: actions-rust-lang/setup-rust-toolchain@v1
25+
with:
26+
toolchain: 1.82.0
27+
28+
- name: Install wasm-pack
29+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
30+
31+
- name: Install NPM dependencies
32+
run: pnpm install
33+
34+
- name: Build & Bundle
35+
run: pnpm build
36+
env:
37+
RUSTFLAGS: --cfg getrandom_backend="wasm_js"

.github/workflows/publish.yml

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,65 @@
11
name: Publish Package to npmjs
22

33
on:
4-
push:
5-
tags:
6-
- "*"
4+
push:
5+
tags:
6+
- "*"
7+
permissions:
8+
contents: read
9+
packages: write
710
jobs:
8-
build:
9-
name: Publish
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- uses: actions/checkout@v3
14-
15-
- name: Install Node.js
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: 20
19-
registry-url: "https://registry.npmjs.org"
20-
21-
- name: Install pnpm
22-
uses: pnpm/action-setup@v2
23-
with:
24-
version: 9
25-
26-
- name: Install Rust toolchain
27-
uses: actions-rust-lang/setup-rust-toolchain@v1
28-
with:
29-
toolchain: 1.81.0
30-
31-
- name: Install wasm-pack
32-
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
33-
34-
- name: Extract versions
35-
run: |
36-
echo "GIT_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
37-
echo "PKG_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
38-
39-
- name: Assert package versions
40-
run: |
41-
echo "CM_VERSION=$CM_VERSION"
42-
echo "PKG_VERSION=$PKG_VERSION"
43-
44-
if [[ "v$PKG_VERSION" != "$GIT_TAG" ]]; then
45-
echo "Version mismatch! Please correct package versions"
46-
exit 1
47-
else
48-
echo "Version check complete"
49-
fi
50-
51-
- name: Install NPM dependencies
52-
run: pnpm install
53-
54-
- name: Build & Bundle
55-
run: pnpm build
56-
57-
- name: Publish
58-
run: npm publish --access public
59-
env:
60-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11+
build:
12+
name: Publish
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Install Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 20
22+
registry-url: "https://registry.npmjs.org"
23+
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v2
26+
with:
27+
version: 9
28+
29+
- name: Install Rust toolchain
30+
uses: actions-rust-lang/setup-rust-toolchain@v1
31+
with:
32+
toolchain: 1.82.0
33+
34+
- name: Install wasm-pack
35+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
36+
37+
- name: Extract versions
38+
run: |
39+
echo "GIT_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
40+
echo "PKG_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
41+
42+
- name: Assert package versions
43+
run: |
44+
echo "CM_VERSION=$CM_VERSION"
45+
echo "PKG_VERSION=$PKG_VERSION"
46+
47+
if [[ "v$PKG_VERSION" != "$GIT_TAG" ]]; then
48+
echo "Version mismatch! Please correct package versions"
49+
exit 1
50+
else
51+
echo "Version check complete"
52+
fi
53+
54+
- name: Install NPM dependencies
55+
run: pnpm install
56+
57+
- name: Build & Bundle
58+
run: pnpm build
59+
env:
60+
RUSTFLAGS: --cfg getrandom_backend="wasm_js"
61+
62+
- name: Publish
63+
run: npm publish --access public
64+
env:
65+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)