Skip to content

Commit cb396ca

Browse files
committed
Merge branch 'naga' of github.com:LIT-Protocol/js-sdk into feature/jss-93-refactor-bun-pnpm
2 parents dba7110 + 3384a3c commit cb396ca

File tree

96 files changed

+9003
-8320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+9003
-8320
lines changed

.changeset/cute-bottles-ask.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

.changeset/cute-experts-clap.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

.changeset/cyan-bears-invent.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

.changeset/pre.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules
22
packages/wasm/rust/**/*
33
packages/wasm/src/pkg/*
4+
**/*.spec.ts
5+
**/*.test.ts

.github/workflows/e2e.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ name: E2E Tests
33
on:
44
push:
55
branches:
6-
- main
7-
- master
8-
- develop
6+
- naga
7+
- canary-naga
98
pull_request:
109
env:
1110
LIT_STATUS_WRITE_KEY: ${{ secrets.LIT_STATUS_WRITE_KEY }}
@@ -51,9 +50,9 @@ jobs:
5150
run: NETWORK=naga-dev bun run test:e2e all
5251
timeout-minutes: 10
5352

54-
- name: Run health check for naga-test
55-
run: NETWORK=naga-test bun run test:e2e all
56-
timeout-minutes: 10
53+
# - name: Run health check for naga-test
54+
# run: NETWORK=naga-test bun run test:e2e all
55+
# timeout-minutes: 10
5756

5857
- name: Run health check for naga-staging
5958
run: NETWORK=naga-staging bun run test:e2e all

.github/workflows/lint.yml

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ on:
33
pull_request:
44
push:
55
branches:
6-
- master
7-
- main
8-
- develop
6+
- naga
7+
- canary-naga
98
jobs:
109
linter:
1110
runs-on: ubuntu-latest
@@ -32,36 +31,7 @@ jobs:
3231
- name: Install project dependencies
3332
run: bun install
3433

35-
- name: Debug Git and Environment
36-
run: |
37-
echo "Current branch:"
38-
git branch --show-current
39-
echo "Available branches:"
40-
git branch -a
41-
echo "Git remotes:"
42-
git remote -v
43-
echo "Last 3 commits:"
44-
git log --oneline -3
45-
echo "Git status:"
46-
git status
47-
echo "NX configuration:"
48-
cat nx.json | head -10
49-
echo "Prettier configuration:"
50-
cat .prettierrc
51-
5234
- name: Lint
5335
run: |
54-
echo "Running format check..."
55-
# Use prettier directly to avoid NX git issues
56-
npx prettier --check . || {
57-
echo "Format check failed. Running prettier --write to fix issues..."
58-
npx prettier --write .
59-
echo "Checking again after formatting..."
60-
npx prettier --check . || {
61-
echo "Still failing after auto-format. Manual intervention needed."
62-
exit 1
63-
}
64-
echo "Auto-formatting successful. All files are now properly formatted."
65-
echo "Note: Some files were auto-formatted. Consider committing these changes in your next commit."
66-
}
67-
echo "Format check passed!"
36+
echo "Running workspace format check..."
37+
NX_DAEMON=false bun run format:check

.github/workflows/prerelease.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Prerelease Snapshot
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
jobs:
11+
publish:
12+
name: Publish prerelease snapshot
13+
runs-on: ubuntu-latest
14+
env:
15+
RELEASE_BRANCH_PREFIX: 'changeset-release/'
16+
steps:
17+
- name: Ensure Changesets release branch
18+
run: |
19+
if [[ "${GITHUB_REF_NAME}" != ${RELEASE_BRANCH_PREFIX}* ]]; then
20+
echo "❌ This workflow must be triggered on a Changesets release branch. Current branch: ${GITHUB_REF_NAME}"
21+
echo "👉 From the release PR, choose \"Run workflow\" and keep the default branch (changeset-release/...)."
22+
exit 1
23+
fi
24+
25+
- name: Check NPM Token
26+
run: |
27+
if [ -z "${{ secrets.NODE_AUTH_TOKEN }}" ]; then
28+
echo "❌ NODE_AUTH_TOKEN secret is not set. Please add it to repository secrets."
29+
exit 1
30+
else
31+
echo "✅ NODE_AUTH_TOKEN secret is available."
32+
fi
33+
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
39+
- name: Configure git user
40+
run: |
41+
git config user.name "github-actions[bot]"
42+
git config user.email "github-actions[bot]@users.noreply.github.com"
43+
44+
- name: Setup Bun
45+
uses: oven-sh/setup-bun@v1
46+
with:
47+
bun-version: latest
48+
49+
- name: Install rust
50+
uses: actions-rs/toolchain@v1
51+
with:
52+
toolchain: stable
53+
override: true
54+
components: rust-std
55+
56+
- name: Install wasm-pack
57+
uses: jetli/wasm-pack-action@v0.4.0
58+
with:
59+
version: 'latest'
60+
61+
- name: Setup Node
62+
uses: actions/setup-node@v4
63+
with:
64+
node-version: '22.18.0'
65+
registry-url: 'https://registry.npmjs.org'
66+
67+
- name: Install project dependencies
68+
run: bun install --frozen-lockfile
69+
70+
- name: Apply snapshot versions
71+
run: bunx changeset version --snapshot beta
72+
73+
- name: Build workspace
74+
run: bun run build
75+
76+
- name: Publish prerelease packages
77+
env:
78+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
79+
run: bunx changeset publish --tag beta
80+
81+
- name: Reset working tree
82+
if: always()
83+
run: |
84+
git reset --hard HEAD
85+
git clean -fd

.github/workflows/release.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- naga
6+
- canary-naga
7+
8+
permissions:
9+
# allow pushing commits, creating tags, and modifying repo files
10+
# needed for the workflow to update package.json versions and CHANGELOG files
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check NPM Token
19+
run: |
20+
if [ -z "${{ secrets.NODE_AUTH_TOKEN }}" ]; then
21+
echo "❌ NODE_AUTH_TOKEN secret is not set. Please add it to repository secrets."
22+
exit 1
23+
else
24+
echo "✅ NODE_AUTH_TOKEN secret is available."
25+
fi
26+
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
# Enable this after PNPM migration
33+
# - name: Setup PNPM
34+
# uses: pnpm/action-setup@v4
35+
# with:
36+
# version: 9.15.0
37+
38+
# TODO: Disable this after PNPM migration
39+
- name: Setup Bun
40+
uses: oven-sh/setup-bun@v1
41+
with:
42+
bun-version: latest
43+
44+
- name: Install rust
45+
uses: actions-rs/toolchain@v1
46+
with:
47+
toolchain: stable
48+
override: true
49+
components: rust-std
50+
51+
- name: Install wasm-pack
52+
uses: jetli/wasm-pack-action@v0.4.0
53+
with:
54+
version: 'latest'
55+
56+
- name: Setup Node
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: '22.18.0'
60+
registry-url: 'https://registry.npmjs.org'
61+
62+
- name: Install project dependencies
63+
run: bun install --frozen-lockfile
64+
# Enable this after PNPM migration
65+
# run: pnpm install --frozen-lockfile
66+
67+
- name: Check current pre-release mode
68+
run: |
69+
if [ -f ".changeset/pre.json" ]; then
70+
echo "📋 Current pre-release mode status:"
71+
cat .changeset/pre.json | jq '{ mode: .mode, tag: .tag }'
72+
else
73+
echo "📋 Not in pre-release mode"
74+
fi
75+
76+
- name: Build
77+
run: bun run build
78+
# Enable this after pnpm migration
79+
# run: pnpm build
80+
81+
- name: Create Release Pull Request or Publish to npm
82+
id: changesets
83+
uses: changesets/action@v1
84+
with:
85+
version: bunx changeset version
86+
publish: bunx changeset publish --access public
87+
# Enable this after pnpm migration
88+
# version: pnpm changeset version
89+
# publish: pnpm changeset publish --access public
90+
commit: 'chore(release): version packages'
91+
title: 'chore(release): version packages'
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,4 @@ alice-auth-manager-data
9595

9696
.plans
9797
.e2e
98+
alice-auth-manager-data

0 commit comments

Comments
 (0)