kaze 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +111 -0
- data/README.md +3 -1
- data/lib/kaze/commands/app/inertia_react_stack.rb +2 -0
- data/lib/kaze/commands/app/inertia_vue_stack.rb +2 -0
- data/lib/kaze/version.rb +1 -1
- data/stubs/inertia-common/config/initializers/inertia_rails.rb +11 -0
- data/stubs/inertia-react-ts/app/javascript/entrypoints/application.tsx +8 -13
- data/stubs/inertia-react-ts/package.json +11 -11
- data/stubs/inertia-vue-ts/package.json +9 -9
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aa890aceb4dd92cff98980042c325f3b10f8ca28869ec1f18b5dbdbfb1ae4de
|
|
4
|
+
data.tar.gz: ae6f53db3f3bac202122e7e5b6de52f9d59a48b76cc72099faab4e9f3cf08762
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0674d2b9b322516cbfa996f664feb9e08bb4e0eaea8546e97b206d9b5cb682a0d81faffeb383187ae4deb823bebf37f5bd281dc08ab7a7c00bbb19f192eec6b
|
|
7
|
+
data.tar.gz: 98b32ea338a2742c20f15f2db494750d8fef25149c8004183ff73ef015e0b12e307001f628545716eb62d7dfceabe2429ac8496bdbc9fe9a592bb9fbac5a2500
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [1.3.0] - 2026-10-21
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Both Inertia stacks move to Inertia.js 3 ([#25](https://github.com/cuonggt/kaze/pull/25)). The versions are chained rather than independent: Inertia 3's React adapter requires React 19, and `@vitejs/plugin-react` 6 requires Vite 8, so the whole front end moves together.
|
|
14
|
+
|
|
15
|
+
| package | from | to |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| @inertiajs/react, @inertiajs/vue3 | ^2.0.0 | ^3.9.1 |
|
|
18
|
+
| react, react-dom | ^18.2.0 | ^19.3.1 |
|
|
19
|
+
| @vitejs/plugin-react | ^4.2.0 | ^6.1.2 |
|
|
20
|
+
| @vitejs/plugin-vue | ^5.0.5 | ^6.0.10 |
|
|
21
|
+
| typescript | ^5.6.3 | ^7.0.2 |
|
|
22
|
+
| vite | ^6.4.4 | ^8.3.4 |
|
|
23
|
+
| @types/node | ^18.13.0 | ^26.6.5 |
|
|
24
|
+
| vue | ^3.4.27 | ^3.5.44 |
|
|
25
|
+
| vue-tsc | ^2.0.21 | ^3.3.13 |
|
|
26
|
+
| vite-plugin-rails | ^0.5.0 | ^0.6.0 |
|
|
27
|
+
|
|
28
|
+
- The React entrypoint resolves pages differently. Inertia 3 narrowed its resolver type so that a promise of a module object is no longer accepted, and `resolvePageComponent` now unwraps `default` itself and is typed with the exported `ResolvedComponent`.
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Both Inertia stacks install `config/initializers/inertia_rails.rb`. Inertia 3 reads the initial page from a `<script type="application/json">` element and expects a `data-inertia` head attribute; `inertia_rails` supports both but defaults to the v2 behaviour, so without this the client loads and renders nothing. The initializer also sets `always_include_errors_hash`, which becomes the default in InertiaRails 4.0.
|
|
33
|
+
|
|
34
|
+
### Internal
|
|
35
|
+
|
|
36
|
+
- Dependabot watches bundler, npm and GitHub Actions weekly. Majors are held back for the two stub manifests, since a major there changes the starter kit and needs an install-and-build pass across all three stacks ([#20](https://github.com/cuonggt/kaze/pull/20))
|
|
37
|
+
- The nightly schedule lives in its own workflow ([#19](https://github.com/cuonggt/kaze/pull/19)). GitHub disables a workflow carrying a `schedule:` trigger after 60 days without repository activity, and disables its other triggers with it — which is how CI came to be switched off for the twelve months before 1.2.0. An idle stretch can now cost only the nightly run, never pull request CI.
|
|
38
|
+
- `actions/checkout` 4 → 7, prettier 3.3.2 → 3.9.10 ([#21](https://github.com/cuonggt/kaze/pull/21), [#22](https://github.com/cuonggt/kaze/pull/22))
|
|
39
|
+
|
|
40
|
+
## [1.2.1] - 2026-10-21
|
|
41
|
+
|
|
42
|
+
No changes to scaffolding behaviour. Packaging, documentation and CI only.
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- This changelog. It ships in the gem and is linked from the RubyGems page through `changelog_uri`
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- `homepage` and the README point at `github.com/cuonggt/kaze`, the current repository URL, rather than the `gtkvn` name that redirects to it
|
|
51
|
+
- Updated development dependencies, clearing 62 Dependabot advisories against `Gemfile.lock`. The lockfile is not shipped in the gem, so this affects contributors and CI only ([#16](https://github.com/cuonggt/kaze/pull/16))
|
|
52
|
+
- CI reports a single stable `Stub Tests` check alongside the per-stack jobs, so branch protection no longer depends on job names generated from the test matrix ([#18](https://github.com/cuonggt/kaze/pull/18))
|
|
53
|
+
|
|
54
|
+
### Documentation
|
|
55
|
+
|
|
56
|
+
- Recorded that Kaze targets Rails 8.1 on Ruby 3.4, and that Rails 8.0 is not supported ([#17](https://github.com/cuonggt/kaze/pull/17))
|
|
57
|
+
|
|
58
|
+
## [1.2.0] - 2026-10-21
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
|
|
62
|
+
- `kaze install` no longer fails on current Rails. The `bin/bundle` fallback added in 1.1.0 only covered `install_gems` and `remove_gems`; all three stacks still invoked `bin/bundle` directly to add `tailwindcss-rails`. Rails has not generated that binstub since 7.1, so the step failed, `tailwindcss-rails` never reached the Gemfile, and the subsequent `tailwindcss:build` aborted with `UnrecognizedCommandError` ([#11](https://github.com/cuonggt/kaze/issues/11))
|
|
63
|
+
- A failed Tailwind or Node step now aborts the install instead of printing `Kaze scaffolding installed successfully.` over it. Exit statuses from these commands were discarded, so a completely failed build still reported success
|
|
64
|
+
- `run_command` reads subprocess output as UTF-8 and scrubs invalid bytes. Where no locale is configured — Docker images, CI containers, cron — Ruby tagged output as US-ASCII and any non-ASCII byte aborted the install with `invalid byte sequence in US-ASCII`. Vite triggered this on every Inertia install, via the check mark in its build summary
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
|
|
68
|
+
- All three stacks migrated to Tailwind CSS v4 ([#14](https://github.com/cuonggt/kaze/pull/14)). `tailwindcss-rails` moves to `~> 4.0`, `config/tailwind.config.js` is removed, and the stylesheet entry point moves from `app/assets/stylesheets/application.tailwind.css` to `app/assets/tailwind/application.css`, which `tailwindcss-rails` 4.x expects. Configuration now lives in CSS: the Inter font as `@theme`, the forms plugin as `@plugin`, and the former `content` globs as `@source` directives. 76 renamed utilities were updated across the stubs, and Preflight's `cursor: default` on buttons is restored to `cursor: pointer`
|
|
69
|
+
- `tailwindcss`, `@tailwindcss/forms`, `autoprefixer` and `postcss` removed from the Inertia stubs. The gem's CLI builds the CSS and Vite only imports the result, so nothing consumed them
|
|
70
|
+
- Vite bumped to `^6.4.4` in the Inertia stubs, clearing two high and four moderate advisories ([#12](https://github.com/cuonggt/kaze/pull/12))
|
|
71
|
+
|
|
72
|
+
Together these take a freshly scaffolded Inertia application from seven npm advisories, five of them high, to zero.
|
|
73
|
+
|
|
74
|
+
### Internal
|
|
75
|
+
|
|
76
|
+
- CI runs against Rails 8.1 on Ruby 3.4, reports every matrix job rather than cancelling siblings on the first failure, and passes for the first time ([#13](https://github.com/cuonggt/kaze/pull/13), [#15](https://github.com/cuonggt/kaze/pull/15))
|
|
77
|
+
|
|
78
|
+
## [1.1.0] - 2025-10-31
|
|
79
|
+
|
|
80
|
+
### Fixed
|
|
81
|
+
|
|
82
|
+
- Fall back to the system `bundle` when `bin/bundle` does not exist. Incomplete; see 1.2.0
|
|
83
|
+
|
|
84
|
+
## [1.0.1] - 2025-02-03
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
|
|
88
|
+
- Remove the `hotwire_livereload_tags` helper when upgrading to hotwire-livereload v2 ([#10](https://github.com/cuonggt/kaze/pull/10))
|
|
89
|
+
|
|
90
|
+
## [1.0.0] - 2025-02-02
|
|
91
|
+
|
|
92
|
+
### Changed
|
|
93
|
+
|
|
94
|
+
- Pin `tailwindcss` to v3 ([#6](https://github.com/cuonggt/kaze/pull/6))
|
|
95
|
+
- Unpin the TypeScript version ([#7](https://github.com/cuonggt/kaze/pull/7))
|
|
96
|
+
|
|
97
|
+
### Fixed
|
|
98
|
+
|
|
99
|
+
- Type error in the Login component's `setData` call ([#9](https://github.com/cuonggt/kaze/pull/9))
|
|
100
|
+
|
|
101
|
+
## Earlier releases
|
|
102
|
+
|
|
103
|
+
Releases before 1.0.0 are not catalogued here. See the [tags](https://github.com/cuonggt/kaze/tags) for their history.
|
|
104
|
+
|
|
105
|
+
[Unreleased]: https://github.com/cuonggt/kaze/compare/v1.3.0...HEAD
|
|
106
|
+
[1.3.0]: https://github.com/cuonggt/kaze/compare/v1.2.1...v1.3.0
|
|
107
|
+
[1.2.1]: https://github.com/cuonggt/kaze/compare/v1.2.0...v1.2.1
|
|
108
|
+
[1.2.0]: https://github.com/cuonggt/kaze/compare/v1.1.0...v1.2.0
|
|
109
|
+
[1.1.0]: https://github.com/cuonggt/kaze/compare/v1.0.1...v1.1.0
|
|
110
|
+
[1.0.1]: https://github.com/cuonggt/kaze/compare/v1.0.0...v1.0.1
|
|
111
|
+
[1.0.0]: https://github.com/cuonggt/kaze/compare/v0.19.0...v1.0.0
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Heavily inspired by [Laravel Breeze](https://github.com/laravel/breeze), this gem offers authentication and application starter kits to give you a head start building your new [Rails](https://rubyonrails.org) application. These kits automatically scaffold your application with the routes, controllers, and views you need to register and authenticate your application's users.
|
|
6
6
|
|
|
7
|
-
[Kaze](https://github.com/
|
|
7
|
+
[Kaze](https://github.com/cuonggt/kaze) is a opinionated minimal, simple implementation of all authentication features that a modern web application should have, including login, registration, password reset, email verification. In addition, Kaze includes a simple "profile" page where the user may update their name, email address, and password.
|
|
8
8
|
|
|
9
9
|
Kaze provides scaffolding options based on [Hotwire](https://hotwired.dev) or [Inertia](https://inertiajs.com), with the choice of using Vue or React for the Inertia-based scaffolding.
|
|
10
10
|
|
|
@@ -23,6 +23,8 @@ gem install rails
|
|
|
23
23
|
gem install kaze
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
Kaze is tested against Rails 8.1 on Ruby 3.4. Rails 8.0 is not supported: ActiveSupport 8.0 passes a `quirks_mode:` option to `JSON.generate` that the `json` gem removed in version 3, which breaks session cookies and `js-routes` in any application built on it. The incompatibility is fixed in Rails 8.1.
|
|
27
|
+
|
|
26
28
|
Then, you may create a new Rails application:
|
|
27
29
|
|
|
28
30
|
```
|
|
@@ -54,6 +54,8 @@ class Kaze::Commands::App::InertiaReactStack < Kaze::Commands::App::BaseStack
|
|
|
54
54
|
ensure_directory_exists("#{Dir.pwd}/app/assets/tailwind")
|
|
55
55
|
FileUtils.copy_file("#{stubs_path}/inertia-react-ts/app/assets/tailwind/application.css", "#{Dir.pwd}/app/assets/tailwind/application.css")
|
|
56
56
|
FileUtils.copy_file("#{stubs_path}/inertia-common/config/vite.json", "#{Dir.pwd}/config/vite.json")
|
|
57
|
+
ensure_directory_exists("#{Dir.pwd}/config/initializers")
|
|
58
|
+
FileUtils.copy_file("#{stubs_path}/inertia-common/config/initializers/inertia_rails.rb", "#{Dir.pwd}/config/initializers/inertia_rails.rb")
|
|
57
59
|
FileUtils.copy_file("#{stubs_path}/inertia-react-ts/tsconfig.json", "#{Dir.pwd}/tsconfig.json")
|
|
58
60
|
FileUtils.copy_file("#{stubs_path}/inertia-react-ts/vite.config.ts", "#{Dir.pwd}/vite.config.ts")
|
|
59
61
|
FileUtils.copy_file("#{stubs_path}/default/bin/dev", "#{Dir.pwd}/bin/dev")
|
|
@@ -54,6 +54,8 @@ class Kaze::Commands::App::InertiaVueStack < Kaze::Commands::App::BaseStack
|
|
|
54
54
|
ensure_directory_exists("#{Dir.pwd}/app/assets/tailwind")
|
|
55
55
|
FileUtils.copy_file("#{stubs_path}/inertia-vue-ts/app/assets/tailwind/application.css", "#{Dir.pwd}/app/assets/tailwind/application.css")
|
|
56
56
|
FileUtils.copy_file("#{stubs_path}/inertia-common/config/vite.json", "#{Dir.pwd}/config/vite.json")
|
|
57
|
+
ensure_directory_exists("#{Dir.pwd}/config/initializers")
|
|
58
|
+
FileUtils.copy_file("#{stubs_path}/inertia-common/config/initializers/inertia_rails.rb", "#{Dir.pwd}/config/initializers/inertia_rails.rb")
|
|
57
59
|
FileUtils.copy_file("#{stubs_path}/inertia-vue-ts/tsconfig.json", "#{Dir.pwd}/tsconfig.json")
|
|
58
60
|
FileUtils.copy_file("#{stubs_path}/inertia-vue-ts/vite.config.ts", "#{Dir.pwd}/vite.config.ts")
|
|
59
61
|
FileUtils.copy_file("#{stubs_path}/default/bin/dev", "#{Dir.pwd}/bin/dev")
|
data/lib/kaze/version.rb
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
InertiaRails.configure do |config|
|
|
2
|
+
# Inertia.js v3 reads the initial page from a `<script type="application/json">`
|
|
3
|
+
# element rather than a `data-page` attribute, and expects the head attribute to
|
|
4
|
+
# be `data-inertia`. Both default to the v2 behaviour in inertia_rails, so the
|
|
5
|
+
# client renders nothing without these.
|
|
6
|
+
config.use_script_element_for_initial_page = true
|
|
7
|
+
config.use_data_inertia_head_attribute = true
|
|
8
|
+
|
|
9
|
+
# Becomes the default in InertiaRails 4.0.
|
|
10
|
+
config.always_include_errors_hash = true
|
|
11
|
+
end
|
|
@@ -2,30 +2,25 @@ import './bootstrap'
|
|
|
2
2
|
import '../../assets/builds/tailwind.css'
|
|
3
3
|
|
|
4
4
|
import { createRoot } from 'react-dom/client'
|
|
5
|
-
import { createInertiaApp } from '@inertiajs/react'
|
|
5
|
+
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/react'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
path: string | string[],
|
|
9
|
-
pages: Record<string, Promise<T> | (() => Promise<T>)>,
|
|
10
|
-
): Promise<T> {
|
|
11
|
-
for (const p of Array.isArray(path) ? path : [path]) {
|
|
12
|
-
const page = pages[p]
|
|
7
|
+
const pages = import.meta.glob<{ default: ResolvedComponent }>('../Pages/**/*.tsx')
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
9
|
+
async function resolvePageComponent(name: string): Promise<ResolvedComponent> {
|
|
10
|
+
const page = pages[`../Pages/${name}.tsx`]
|
|
17
11
|
|
|
18
|
-
|
|
12
|
+
if (typeof page === 'undefined') {
|
|
13
|
+
throw new Error(`Page not found: ${name}`)
|
|
19
14
|
}
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
return (await page()).default
|
|
22
17
|
}
|
|
23
18
|
|
|
24
19
|
const appName = import.meta.env.VITE_APP_NAME || 'Rails'
|
|
25
20
|
|
|
26
21
|
createInertiaApp({
|
|
27
22
|
title: (title) => `${title} - ${appName}`,
|
|
28
|
-
resolve:
|
|
23
|
+
resolve: resolvePageComponent,
|
|
29
24
|
setup({ el, App, props }) {
|
|
30
25
|
const root = createRoot(el)
|
|
31
26
|
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
"build": "tsc && bin/rails tailwindcss:build && vite build"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@headlessui/react": "^2.
|
|
10
|
-
"@inertiajs/react": "^
|
|
11
|
-
"@types/node": "^
|
|
12
|
-
"@types/react": "^
|
|
13
|
-
"@types/react-dom": "^
|
|
14
|
-
"@vitejs/plugin-react": "^
|
|
9
|
+
"@headlessui/react": "^2.2.10",
|
|
10
|
+
"@inertiajs/react": "^3.9.1",
|
|
11
|
+
"@types/node": "^26.6.5",
|
|
12
|
+
"@types/react": "^19.3.0",
|
|
13
|
+
"@types/react-dom": "^19.3.0",
|
|
14
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
15
15
|
"axios": "^1.6.4",
|
|
16
|
-
"react": "^
|
|
17
|
-
"react-dom": "^
|
|
18
|
-
"typescript": "^
|
|
19
|
-
"vite": "^
|
|
20
|
-
"vite-plugin-rails": "^0.
|
|
16
|
+
"react": "^19.3.1",
|
|
17
|
+
"react-dom": "^19.3.1",
|
|
18
|
+
"typescript": "^7.0.2",
|
|
19
|
+
"vite": "^8.3.4",
|
|
20
|
+
"vite-plugin-rails": "^0.6.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
"build": "tsc && bin/rails tailwindcss:build && vite build"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@headlessui/vue": "^1.7.
|
|
10
|
-
"@inertiajs/vue3": "^
|
|
11
|
-
"@types/node": "^
|
|
12
|
-
"@vitejs/plugin-vue": "^
|
|
9
|
+
"@headlessui/vue": "^1.7.23",
|
|
10
|
+
"@inertiajs/vue3": "^3.9.1",
|
|
11
|
+
"@types/node": "^26.6.5",
|
|
12
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
13
13
|
"axios": "^1.6.4",
|
|
14
|
-
"typescript": "^
|
|
15
|
-
"vite": "^
|
|
16
|
-
"vite-plugin-rails": "^0.
|
|
17
|
-
"vue": "^3.
|
|
18
|
-
"vue-tsc": "^
|
|
14
|
+
"typescript": "^7.0.2",
|
|
15
|
+
"vite": "^8.3.4",
|
|
16
|
+
"vite-plugin-rails": "^0.6.0",
|
|
17
|
+
"vue": "^3.5.44",
|
|
18
|
+
"vue-tsc": "^3.3.13"
|
|
19
19
|
}
|
|
20
20
|
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kaze
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cuong Giang
|
|
@@ -58,6 +58,7 @@ executables:
|
|
|
58
58
|
extensions: []
|
|
59
59
|
extra_rdoc_files: []
|
|
60
60
|
files:
|
|
61
|
+
- CHANGELOG.md
|
|
61
62
|
- LICENSE.md
|
|
62
63
|
- README.md
|
|
63
64
|
- bin/kaze
|
|
@@ -175,6 +176,7 @@ files:
|
|
|
175
176
|
- stubs/inertia-common/app/controllers/profile_controller.rb
|
|
176
177
|
- stubs/inertia-common/app/controllers/welcome_controller.rb
|
|
177
178
|
- stubs/inertia-common/bin/vite
|
|
179
|
+
- stubs/inertia-common/config/initializers/inertia_rails.rb
|
|
178
180
|
- stubs/inertia-common/config/vite.json
|
|
179
181
|
- stubs/inertia-common/test/integration/password_update_test.rb
|
|
180
182
|
- stubs/inertia-common/test/integration/profile_test.rb
|
|
@@ -249,10 +251,11 @@ files:
|
|
|
249
251
|
- stubs/inertia-vue-ts/package.json
|
|
250
252
|
- stubs/inertia-vue-ts/tsconfig.json
|
|
251
253
|
- stubs/inertia-vue-ts/vite.config.ts
|
|
252
|
-
homepage: https://github.com/
|
|
254
|
+
homepage: https://github.com/cuonggt/kaze
|
|
253
255
|
licenses:
|
|
254
256
|
- MIT
|
|
255
|
-
metadata:
|
|
257
|
+
metadata:
|
|
258
|
+
changelog_uri: https://github.com/cuonggt/kaze/blob/master/CHANGELOG.md
|
|
256
259
|
rdoc_options: []
|
|
257
260
|
require_paths:
|
|
258
261
|
- lib
|