Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changepacks/changepack_log_OrV9v1BPnNlYKLMdw7q39.json
Original file line number Diff line number Diff line change
@@ -0,0 +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"}
249 changes: 150 additions & 99 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,94 +1,145 @@
name: Publish Package to npm

on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: write-all

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cargo tarpaulin and fmt
run: |
cargo install cargo-tarpaulin
rustup component add rustfmt clippy
- uses: oven-sh/setup-bun@v2
name: Install bun

- uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version: 22
- run: bun install
- run: bun run build
- name: Benchmark
run: bun run benchmark

publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cargo tarpaulin and fmt
run: |
cargo install cargo-tarpaulin
rustup component add rustfmt clippy
- uses: oven-sh/setup-bun@v2
name: Install bun

- uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version: 22
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: bun install
- run: bun run build
- run: |
bun run lint
# rust coverage issue
echo 'max_width = 100000' > .rustfmt.toml
echo 'tab_spaces = 4' >> .rustfmt.toml
echo 'newline_style = "Unix"' >> .rustfmt.toml
echo 'fn_call_width = 100000' >> .rustfmt.toml
echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml
echo 'chain_width = 100000' >> .rustfmt.toml
echo 'merge_derives = true' >> .rustfmt.toml
echo 'use_small_heuristics = "Default"' >> .rustfmt.toml
cargo fmt
- run: bun run test
- name: Format Rollback
run: |
rm -rf .rustfmt.toml
cargo fmt
name: Publish Package to npm

on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: write-all

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Cache cargo registry + target
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-benchmark-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-benchmark-${{ runner.os }}-

- uses: oven-sh/setup-bun@v2
name: Install bun

- name: Cache bun dependencies
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-

- uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version: 22
- run: bun install
- run: bun run build
- name: Benchmark
run: bun run benchmark

publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Cache cargo registry + target
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-publish-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-publish-${{ runner.os }}-

- name: Install cargo-binstall
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

- name: Install cargo-tarpaulin
run: cargo binstall cargo-tarpaulin --no-confirm

- name: Install Rust components
run: rustup component add rustfmt clippy

- uses: oven-sh/setup-bun@v2
name: Install bun

- name: Cache bun dependencies
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-

- uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version: 22
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: bun install
- run: bun run build
- run: |
bun run lint
# rust coverage issue
echo 'max_width = 100000' > .rustfmt.toml
echo 'tab_spaces = 4' >> .rustfmt.toml
echo 'newline_style = "Unix"' >> .rustfmt.toml
echo 'fn_call_width = 100000' >> .rustfmt.toml
echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml
echo 'chain_width = 100000' >> .rustfmt.toml
echo 'merge_derives = true' >> .rustfmt.toml
echo 'use_small_heuristics = "Default"' >> .rustfmt.toml
cargo fmt
- run: bun run test
- name: Format Rollback
run: |
rm -rf .rustfmt.toml
cargo fmt
- name: Build Landing
run: |
bun run --filter @devup-ui/components build-storybook
mv ./packages/components/storybook-static ./apps/landing/public/storybook
bun run --filter landing build
- name: Cache Playwright Browsers
id: playwright-cache
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
restore-keys: |
playwright-${{ runner.os }}-
- name: Install Playwright Browsers
run: bunx playwright install chromium --with-deps
- name: Check for Existing E2E Snapshots
Expand Down Expand Up @@ -128,16 +179,16 @@ jobs:
name: playwright-report-singlecss
path: playwright-report/
retention-days: 30
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage/lcov.info
- uses: changepacks/action@main
id: changepacks
with:
publish: true
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage/lcov.info

- uses: changepacks/action@main
id: changepacks
with:
publish: true
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 8 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions bindings/devup-ui-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ repository = "https://github.com/dev-five-git/devup-ui"
documentation = "https://devup-ui.com"

[lib]
crate-type = ["cdylib", "rlib"]
crate-type = ["cdylib"]

[features]
default = ["console_error_panic_hook"]
default = []

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

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

[package.metadata.wasm-pack.profile.release]
wasm-opt = false
wasm-opt = ["-Oz", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]
5 changes: 0 additions & 5 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading