Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
da93262
chore: require Vite 8 and refresh dependency ranges
andriytyurnikov Apr 27, 2026
c2b66e7
chore: use pnpm exec in pre-commit hook to silence npm npmrc warning
andriytyurnikov Apr 27, 2026
556c71b
chore: refresh Ruby framework targets
andriytyurnikov Apr 27, 2026
34724fe
chore: keep vite_rails_legacy at Ruby >= 2.4
andriytyurnikov Apr 27, 2026
2060090
fix(examples/rails): gate engine alias on env var to satisfy Vite 8
andriytyurnikov Apr 27, 2026
3928cbe
chore(ci): expand matrix for Vite 8 / Ruby 3.3+ / Rails 8.1
andriytyurnikov Apr 27, 2026
6f515f2
fix(ci): build workspace packages and enable corepack
andriytyurnikov Apr 27, 2026
1f8dcb8
fix(ci): regenerate test_app yarn.lock for vite ^8 bump
andriytyurnikov Apr 27, 2026
7f003bb
test(vite-plugin-rails): normalize chunk hashes for cross-platform st…
andriytyurnikov Apr 27, 2026
ee84c4e
chore: add @vitest/coverage-v8 and coverage scripts
andriytyurnikov Apr 27, 2026
5db5f02
chore(ci): run JS coverage and upload to Qlty on main
andriytyurnikov Apr 27, 2026
7aa7412
chore: review-driven fixes (middleware, dev-server race, CI hardening)
andriytyurnikov Apr 27, 2026
40b356b
ci: smoke-build examples on push/PR
andriytyurnikov Apr 27, 2026
ef673e8
ci(examples-smoke): narrow to rails, point alias at bundled engine
andriytyurnikov Apr 27, 2026
a53f4e2
ci: temporary artifact upload for hash-drift diagnosis
andriytyurnikov Apr 27, 2026
91f36fd
test(vite-plugin-rails): pin build to NODE_ENV=production, drop norma…
andriytyurnikov Apr 27, 2026
2259a2b
chore: keep stripHash + integrity placeholder; remove diagnostic upload
andriytyurnikov Apr 27, 2026
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
62 changes: 62 additions & 0 deletions .github/workflows/examples-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Examples Smoke

on: [push, pull_request]

jobs:
build:
name: ${{ matrix.example }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
example:
- examples/rails
# hanami_bookshelf and padrino_blog_tutorial pin vite-plugin-ruby ^3.0.8,
# whose package.json shape Rolldown 1.0 rejects. They're upstream's example
# apps; leaving them out of smoke until/unless they're modernized.

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
cache-dependency-path: ${{ matrix.example }}/pnpm-lock.yaml

- name: Install example deps
working-directory: ${{ matrix.example }}
run: pnpm install --frozen-lockfile

- name: Build with Vite
working-directory: ${{ matrix.example }}
env:
# examples/rails imports '@administrator/timer' from app/frontend/entrypoints/application.ts;
# the alias and server.fs.allow are gated on this var. Point at the bundled engine.
ADMINISTRATOR_ASSETS_PATH: ${{ github.workspace }}/examples/rails/example_engine/app/frontend
NODE_ENV: production
run: pnpm exec vite build

- name: Assert manifest emitted
working-directory: ${{ matrix.example }}
run: |
set -e
manifest=$(find public -path '*/.vite/manifest.json' -print -quit)
if [ -z "$manifest" ]; then
echo "::error::No manifest.json emitted under public/**/.vite/"
exit 1
fi
echo "Found manifest: $manifest"
# Sanity: must be valid JSON with at least one entry
node -e "
const m = require('node:fs').readFileSync(process.argv[1], 'utf8');
const parsed = JSON.parse(m);
const entries = Object.keys(parsed).length;
if (entries === 0) { console.error('manifest is empty'); process.exit(1); }
console.log('manifest entries:', entries);
" "$manifest"
16 changes: 9 additions & 7 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on: [push, pull_request]

jobs:
build:
name: Vite Plugin Ruby
name: ${{ matrix.package }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [20]
node: [22, 24]
package: [vite-plugin-ruby, vite-plugin-rails]

runs-on: ${{ matrix.os }}

Expand All @@ -18,17 +20,17 @@ jobs:

- uses: pnpm/action-setup@v4
with:
version: 9
version: 10

- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ matrix.node }}

- run: pnpm -C vite-plugin-ruby install --frozen-lockfile
- run: pnpm install --frozen-lockfile

- name: Build
run: pnpm -C vite-plugin-ruby build
- name: Build all workspace packages
run: pnpm -r build

- name: Test
run: pnpm -C vite-plugin-ruby test
run: pnpm -C ${{ matrix.package }} test --run
22 changes: 15 additions & 7 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,30 @@ jobs:
matrix:
os: [ubuntu-latest]
ruby: [
"3.1",
"3.2",
"3.3",
"3.4",
]
gemfile: [
"Gemfile-rails.7.0.x",
"Gemfile-rails.7.1.x",
"Gemfile-rails.7.2.x",
"Gemfile-rails.8.0.x",
"Gemfile-rails.8.1.x",
]
experimental: [false]
include:
- ruby: "3.4"
- ruby: "4.0"
os: ubuntu-latest
gemfile: "Gemfile-rails.8.0.x"
gemfile: "Gemfile-rails.8.1.x"
experimental: true
- ruby: "3.4"
os: ubuntu-latest
gemfile: Gemfile-rails-edge
experimental: true
- ruby: "4.0"
os: ubuntu-latest
gemfile: Gemfile-rails-edge
experimental: true

env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
Expand All @@ -41,7 +46,10 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Enable corepack (yarn/pnpm shims for test_app)
run: corepack enable

- uses: ruby/setup-ruby@v1
with:
Expand All @@ -52,8 +60,8 @@ jobs:
run: bin/rake test

- name: Upload coverage to Qlty
if: ${{ contains(github.ref, 'main') }}
uses: qltysh/qlty-action/coverage@main
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2.2.0
with:
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
files: coverage/.resultset.json
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
pnpm exec lint-staged
6 changes: 3 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ require:
- rubocop-minitest

inherit_gem:
standard: config/ruby-3.0.yml
standard: config/ruby-3.3.yml

inherit_mode:
merge:
- Exclude

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.3
SuggestExtensions: false
NewCops: enable
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion examples/hanami_bookshelf/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.1.1
ruby-3.4.5
2 changes: 1 addition & 1 deletion examples/hanami_bookshelf/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

ruby '3.1.1'
ruby '3.4.5'

gem 'rake'
gem 'hanami'
Expand Down
4 changes: 2 additions & 2 deletions examples/hanami_bookshelf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "vite-hanami-demo",
"private": true,
"engines": {
"node": "15.x",
"node": ">=22.12.0",
"yarn": "1.x"
},
"devDependencies": {
"sass": "^1.35.2",
"vite": "^3.0.0",
"vite": "^8.0.0",
"vite-plugin-ruby": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion examples/padrino_blog_tutorial/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
gem 'rake'
gem 'haml'
gem 'puma'
gem 'padrino', '0.15.0'
gem 'padrino', '0.16.1'
gem 'vite_padrino', path: '../../vite_padrino'
gem 'vite_ruby', path: '../../vite_ruby'
gem 'pry-byebug'
4 changes: 2 additions & 2 deletions examples/padrino_blog_tutorial/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"devDependencies": {
"vite": "^3.0.0",
"vite-plugin-ruby":"^3.0.8"
"vite": "^8.0.0",
"vite-plugin-ruby": "^3.0.8"
},
"dependencies": {
"bulma": "^0.9.2"
Expand Down
6 changes: 3 additions & 3 deletions examples/rails/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dev": "vite"
},
"engines": {
"node": "22",
"pnpm": "9"
"node": ">=22",
"pnpm": ">=9"
},
"dependencies": {
"@bugsnag/js": "^7.20.2",
Expand All @@ -30,7 +30,7 @@
"vite": "^8.0.0",
"vite-plugin-bugsnag": "^2.0.2",
"vite-plugin-rails": "^0.6.0",
"vite-plugin-ruby": "^5.2.0",
"vite-plugin-ruby": "^5.2.1",
"vite-plugin-windicss": "^1.8.10"
}
}
Loading
Loading