kaze 1.2.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e82467be9ca0fc56c33e488d320544f53b023c124975da956167e8778743113
4
- data.tar.gz: 2d58476a50e097f82aa30a584500870f865e0068181f54a97763556774583099
3
+ metadata.gz: 3aa890aceb4dd92cff98980042c325f3b10f8ca28869ec1f18b5dbdbfb1ae4de
4
+ data.tar.gz: ae6f53db3f3bac202122e7e5b6de52f9d59a48b76cc72099faab4e9f3cf08762
5
5
  SHA512:
6
- metadata.gz: 353840a73cff79d608500a90e6e9a2d61e8ff41b1b466d20c268ea6fc66104dfae9d1daee20e7d28b3d1a150d15f04621926fd058afe0dd2efea3bce9d337e79
7
- data.tar.gz: 19c83590b63318188b6aead492cc89dd766d4db943f1034f4f7e778fcaa01192c109790d6926e8188217fa978b34369ce823a0f373513ecbe02c877ec84a353c
6
+ metadata.gz: b0674d2b9b322516cbfa996f664feb9e08bb4e0eaea8546e97b206d9b5cb682a0d81faffeb383187ae4deb823bebf37f5bd281dc08ab7a7c00bbb19f192eec6b
7
+ data.tar.gz: 98b32ea338a2742c20f15f2db494750d8fef25149c8004183ff73ef015e0b12e307001f628545716eb62d7dfceabe2429ac8496bdbc9fe9a592bb9fbac5a2500
data/CHANGELOG.md CHANGED
@@ -6,6 +6,37 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
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
+
9
40
  ## [1.2.1] - 2026-10-21
10
41
 
11
42
  No changes to scaffolding behaviour. Packaging, documentation and CI only.
@@ -71,7 +102,8 @@ Together these take a freshly scaffolded Inertia application from seven npm advi
71
102
 
72
103
  Releases before 1.0.0 are not catalogued here. See the [tags](https://github.com/cuonggt/kaze/tags) for their history.
73
104
 
74
- [Unreleased]: https://github.com/cuonggt/kaze/compare/v1.2.1...HEAD
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
75
107
  [1.2.1]: https://github.com/cuonggt/kaze/compare/v1.2.0...v1.2.1
76
108
  [1.2.0]: https://github.com/cuonggt/kaze/compare/v1.1.0...v1.2.0
77
109
  [1.1.0]: https://github.com/cuonggt/kaze/compare/v1.0.1...v1.1.0
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Kaze
2
- VERSION = '1.2.1'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -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
- async function resolvePageComponent<T>(
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
- if (typeof page === 'undefined') {
15
- continue
16
- }
9
+ async function resolvePageComponent(name: string): Promise<ResolvedComponent> {
10
+ const page = pages[`../Pages/${name}.tsx`]
17
11
 
18
- return typeof page === 'function' ? page() : page
12
+ if (typeof page === 'undefined') {
13
+ throw new Error(`Page not found: ${name}`)
19
14
  }
20
15
 
21
- throw new Error(`Page not found: ${path}`)
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: (name) => resolvePageComponent(`../Pages/${name}.tsx`, import.meta.glob('../Pages/**/*.tsx')),
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.0.4",
10
- "@inertiajs/react": "^2.0.0",
11
- "@types/node": "^18.13.0",
12
- "@types/react": "^18.0.28",
13
- "@types/react-dom": "^18.0.10",
14
- "@vitejs/plugin-react": "^4.2.0",
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": "^18.2.0",
17
- "react-dom": "^18.2.0",
18
- "typescript": "^5.6.3",
19
- "vite": "^6.4.4",
20
- "vite-plugin-rails": "^0.5.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.22",
10
- "@inertiajs/vue3": "^2.0.0",
11
- "@types/node": "^18.13.0",
12
- "@vitejs/plugin-vue": "^5.0.5",
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": "^5.6.3",
15
- "vite": "^6.4.4",
16
- "vite-plugin-rails": "^0.5.0",
17
- "vue": "^3.4.27",
18
- "vue-tsc": "^2.0.21"
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.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cuong Giang
@@ -176,6 +176,7 @@ files:
176
176
  - stubs/inertia-common/app/controllers/profile_controller.rb
177
177
  - stubs/inertia-common/app/controllers/welcome_controller.rb
178
178
  - stubs/inertia-common/bin/vite
179
+ - stubs/inertia-common/config/initializers/inertia_rails.rb
179
180
  - stubs/inertia-common/config/vite.json
180
181
  - stubs/inertia-common/test/integration/password_update_test.rb
181
182
  - stubs/inertia-common/test/integration/profile_test.rb