Skip to content

Commit 1b4d3ec

Browse files
authored
Merge pull request #574 from dev-five-git/refactor-struct
Fix dep
2 parents 3e75dcf + 14de6e3 commit 1b4d3ec

37 files changed

Lines changed: 541 additions & 291 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"changes":{"packages/webpack-plugin/package.json":"Patch","packages/next-plugin/package.json":"Patch","packages/plugin-utils/package.json":"Patch","packages/rsbuild-plugin/package.json":"Patch","packages/vite-plugin/package.json":"Patch","bindings/devup-ui-wasm/package.json":"Patch","packages/eslint-plugin/package.json":"Patch","packages/components/package.json":"Patch"},"note":"Optimize","date":"2026-02-11T19:21:50.181781Z"}

.github/workflows/publish.yml

Lines changed: 150 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,145 @@
1-
name: Publish Package to npm
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
10-
permissions: write-all
11-
12-
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: false
15-
16-
jobs:
17-
benchmark:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v5
22-
23-
- uses: actions-rust-lang/setup-rust-toolchain@v1
24-
- name: Cargo tarpaulin and fmt
25-
run: |
26-
cargo install cargo-tarpaulin
27-
rustup component add rustfmt clippy
28-
- uses: oven-sh/setup-bun@v2
29-
name: Install bun
30-
31-
- uses: jetli/wasm-pack-action@v0.4.0
32-
with:
33-
version: 'latest'
34-
- name: Install Node.js
35-
uses: actions/setup-node@v4
36-
with:
37-
registry-url: "https://registry.npmjs.org"
38-
node-version: 22
39-
- run: bun install
40-
- run: bun run build
41-
- name: Benchmark
42-
run: bun run benchmark
43-
44-
publish:
45-
runs-on: ubuntu-latest
46-
steps:
47-
- name: Checkout
48-
uses: actions/checkout@v5
49-
50-
- uses: actions-rust-lang/setup-rust-toolchain@v1
51-
- name: Cargo tarpaulin and fmt
52-
run: |
53-
cargo install cargo-tarpaulin
54-
rustup component add rustfmt clippy
55-
- uses: oven-sh/setup-bun@v2
56-
name: Install bun
57-
58-
- uses: jetli/wasm-pack-action@v0.4.0
59-
with:
60-
version: 'latest'
61-
- name: Install Node.js
62-
uses: actions/setup-node@v4
63-
with:
64-
registry-url: "https://registry.npmjs.org"
65-
node-version: 22
66-
env:
67-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68-
- run: bun install
69-
- run: bun run build
70-
- run: |
71-
bun run lint
72-
# rust coverage issue
73-
echo 'max_width = 100000' > .rustfmt.toml
74-
echo 'tab_spaces = 4' >> .rustfmt.toml
75-
echo 'newline_style = "Unix"' >> .rustfmt.toml
76-
echo 'fn_call_width = 100000' >> .rustfmt.toml
77-
echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml
78-
echo 'chain_width = 100000' >> .rustfmt.toml
79-
echo 'merge_derives = true' >> .rustfmt.toml
80-
echo 'use_small_heuristics = "Default"' >> .rustfmt.toml
81-
cargo fmt
82-
- run: bun run test
83-
- name: Format Rollback
84-
run: |
85-
rm -rf .rustfmt.toml
86-
cargo fmt
1+
name: Publish Package to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
permissions: write-all
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: false
15+
16+
jobs:
17+
benchmark:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
23+
- uses: actions-rust-lang/setup-rust-toolchain@v1
24+
25+
- name: Cache cargo registry + target
26+
uses: actions/cache@v5
27+
with:
28+
path: |
29+
~/.cargo/registry/index/
30+
~/.cargo/registry/cache/
31+
~/.cargo/git/db/
32+
target/
33+
key: cargo-benchmark-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
34+
restore-keys: |
35+
cargo-benchmark-${{ runner.os }}-
36+
37+
- uses: oven-sh/setup-bun@v2
38+
name: Install bun
39+
40+
- name: Cache bun dependencies
41+
uses: actions/cache@v5
42+
with:
43+
path: ~/.bun/install/cache
44+
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
45+
restore-keys: |
46+
bun-${{ runner.os }}-
47+
48+
- uses: jetli/wasm-pack-action@v0.4.0
49+
with:
50+
version: 'latest'
51+
- name: Install Node.js
52+
uses: actions/setup-node@v4
53+
with:
54+
registry-url: "https://registry.npmjs.org"
55+
node-version: 22
56+
- run: bun install
57+
- run: bun run build
58+
- name: Benchmark
59+
run: bun run benchmark
60+
61+
publish:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v6
66+
67+
- uses: actions-rust-lang/setup-rust-toolchain@v1
68+
69+
- name: Cache cargo registry + target
70+
uses: actions/cache@v5
71+
with:
72+
path: |
73+
~/.cargo/registry/index/
74+
~/.cargo/registry/cache/
75+
~/.cargo/git/db/
76+
target/
77+
key: cargo-publish-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
78+
restore-keys: |
79+
cargo-publish-${{ runner.os }}-
80+
81+
- name: Install cargo-binstall
82+
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
83+
84+
- name: Install cargo-tarpaulin
85+
run: cargo binstall cargo-tarpaulin --no-confirm
86+
87+
- name: Install Rust components
88+
run: rustup component add rustfmt clippy
89+
90+
- uses: oven-sh/setup-bun@v2
91+
name: Install bun
92+
93+
- name: Cache bun dependencies
94+
uses: actions/cache@v5
95+
with:
96+
path: ~/.bun/install/cache
97+
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
98+
restore-keys: |
99+
bun-${{ runner.os }}-
100+
101+
- uses: jetli/wasm-pack-action@v0.4.0
102+
with:
103+
version: 'latest'
104+
- name: Install Node.js
105+
uses: actions/setup-node@v4
106+
with:
107+
registry-url: "https://registry.npmjs.org"
108+
node-version: 22
109+
env:
110+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
111+
- run: bun install
112+
- run: bun run build
113+
- run: |
114+
bun run lint
115+
# rust coverage issue
116+
echo 'max_width = 100000' > .rustfmt.toml
117+
echo 'tab_spaces = 4' >> .rustfmt.toml
118+
echo 'newline_style = "Unix"' >> .rustfmt.toml
119+
echo 'fn_call_width = 100000' >> .rustfmt.toml
120+
echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml
121+
echo 'chain_width = 100000' >> .rustfmt.toml
122+
echo 'merge_derives = true' >> .rustfmt.toml
123+
echo 'use_small_heuristics = "Default"' >> .rustfmt.toml
124+
cargo fmt
125+
- run: bun run test
126+
- name: Format Rollback
127+
run: |
128+
rm -rf .rustfmt.toml
129+
cargo fmt
87130
- name: Build Landing
88131
run: |
89132
bun run --filter @devup-ui/components build-storybook
90133
mv ./packages/components/storybook-static ./apps/landing/public/storybook
91134
bun run --filter landing build
135+
- name: Cache Playwright Browsers
136+
id: playwright-cache
137+
uses: actions/cache@v5
138+
with:
139+
path: ~/.cache/ms-playwright
140+
key: playwright-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
141+
restore-keys: |
142+
playwright-${{ runner.os }}-
92143
- name: Install Playwright Browsers
93144
run: bunx playwright install chromium --with-deps
94145
- name: Check for Existing E2E Snapshots
@@ -128,16 +179,16 @@ jobs:
128179
name: playwright-report-singlecss
129180
path: playwright-report/
130181
retention-days: 30
131-
- name: Upload to codecov.io
132-
uses: codecov/codecov-action@v5
133-
with:
134-
token: ${{ secrets.CODECOV_TOKEN }}
135-
fail_ci_if_error: true
136-
files: ./coverage/lcov.info
137-
138-
- uses: changepacks/action@main
139-
id: changepacks
140-
with:
141-
publish: true
142-
env:
143-
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
182+
- name: Upload to codecov.io
183+
uses: codecov/codecov-action@v5
184+
with:
185+
token: ${{ secrets.CODECOV_TOKEN }}
186+
fail_ci_if_error: true
187+
files: ./coverage/lcov.info
188+
189+
- uses: changepacks/action@main
190+
id: changepacks
191+
with:
192+
publish: true
193+
env:
194+
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}

Cargo.lock

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/devup-ui-wasm/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ repository = "https://github.com/dev-five-git/devup-ui"
99
documentation = "https://devup-ui.com"
1010

1111
[lib]
12-
crate-type = ["cdylib", "rlib"]
12+
crate-type = ["cdylib"]
1313

1414
[features]
15-
default = ["console_error_panic_hook"]
15+
default = []
1616

1717
[dependencies]
1818
wasm-bindgen = "0.2.108"
@@ -25,10 +25,10 @@ css = { path = "../../libs/css" }
2525
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
2626
# code size when deploying.
2727
console_error_panic_hook = { version = "0.1.7", optional = true }
28+
bimap = { version = "0.6.3", features = ["serde"] }
2829
js-sys = "0.3.85"
2930
serde_json = "1.0.149"
3031
serde-wasm-bindgen = "0.6.5"
31-
bimap = { version = "0.6.3", features = ["serde"] }
3232
getrandom = { version = "0.3", features = ["wasm_js"] }
3333

3434
[dev-dependencies]
@@ -41,4 +41,4 @@ rstest = "0.26.1"
4141
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
4242

4343
[package.metadata.wasm-pack.profile.release]
44-
wasm-opt = false
44+
wasm-opt = ["-Oz", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]

bun.lock

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)