react-manifest-rails 0.2.24 → 0.2.25

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: 786d53e91fe8a65339def86bc62a94179762364cf13d1abcc8427ea9585f0c38
4
- data.tar.gz: 90c58cd92bc06eb2911deaf829aca60ed8533e6dc58e535759e9f6d60eefdcd2
3
+ metadata.gz: d9e8231e4932b06cc8cd5d4684cf0361be694e0a0ae6e677e5bea4d3dfa2c17e
4
+ data.tar.gz: 4d1f52eb5463788fac2eb5cce0e777081f11f56a1401a7eab15fbc8cb8601cf6
5
5
  SHA512:
6
- metadata.gz: 30c7f0633646f06cfc497a617c76dbbb50f74e84104fd590f3054bff5c228a42e08aa6683dfdc96702656a52cec57533917b2438d4bb39ede667ef6c0686f219
7
- data.tar.gz: 0ea044f3d55bb64be2ce9a725cc90cf9b33da8f343fde043707c098995ce6e88840e609947867203efe739623ce5dba3a32e4d444dfb9b3f8b252b56b991adbb
6
+ metadata.gz: 20ab3b9ad41551d772ac6fe89a17676728afe52d688ebd6b61cd4d7cb7d169cc246003a3c38ac468d8f8e3c10ec26e80e02330f78cebdad4a9a26a82cf700020
7
+ data.tar.gz: a3829ad0e2f0eb4f7d3cf61ce31bad0a570b40a6fb96082d37da692c9826c3d60c7e72710d64b5b014b9cb7c1fba18b85169d8d62fd3033fda66a67e652df1ae
data/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.25] - 2026-04-22
11
+
12
+ ### Fixed
13
+ - Restored `build_shared` method in `Generator` that had been deleted, causing `ux_shared.js` to never be written. This was the root cause of a major regression where shared components (`components/`, `hooks/`, `lib/`) were absent from the asset pipeline on clean deploys.
14
+ - `Generator#run!` now generates `ux_shared.js` (all files from shared dirs) as the first manifest before controller manifests.
15
+ - Controller manifests (`ux_<controller>.js`) no longer inline shared-dir files (`lib_reqs`, `shared_reqs`). Shared files live exclusively in `ux_shared.js`, restoring the original lean-manifest architecture and preventing duplication.
16
+ - `resolve_bundles` view helper no longer silently drops the shared bundle when `ux_shared.js` is absent; the file is now always generated so the helper correctly returns `[ux_shared, ux_<controller>]` for every page.
17
+
18
+ ### Added
19
+ - Release preflight hook (`.github/hooks/release-preflight.json` + script) that blocks `git tag`/`git push` commands when `VERSION`, `CHANGELOG.md`, and `Gemfile.lock` are out of sync.
20
+ - Session-start hook (`.github/hooks/release-session.json`) that injects the release protocol into the Copilot agent context.
21
+
10
22
  ## [0.2.24] - 2026-04-22
11
23
 
12
24
  ### Fixed
@@ -47,7 +47,8 @@ module ReactManifest
47
47
  scan_result)
48
48
 
49
49
  # Phase 1: build all content in memory — no I/O.
50
- manifests = classification.controller_dirs.map { |ctrl| build_controller(ctrl, controller_context) }
50
+ shared_manifest = build_shared(classification.shared_dirs)
51
+ manifests = [shared_manifest] + classification.controller_dirs.map { |ctrl| build_controller(ctrl, controller_context) }
51
52
 
52
53
  migrate_legacy_manifests!
53
54
 
@@ -62,6 +63,23 @@ module ReactManifest
62
63
 
63
64
  # ------------------------------------------------------------------ shared
64
65
 
66
+ def build_shared(shared_dirs)
67
+ lines = header_lines
68
+ reqs = shared_dirs
69
+ .flat_map { |d| js_files_in(d[:path]) }
70
+ .map { |f| normalize_require_path(relative_require_path(f)) }
71
+ .uniq
72
+ .sort
73
+
74
+ if reqs.empty?
75
+ lines << "// (no shared JS files found)"
76
+ else
77
+ reqs.each { |req| lines << "//= require #{req}" }
78
+ end
79
+
80
+ { filename: "#{@config.shared_bundle}.js", content: "#{lines.join("\n")}\n" }
81
+ end
82
+
65
83
  # --------------------------------------------------------------- controller
66
84
 
67
85
  def build_controller(ctrl, controller_context)
@@ -74,7 +92,7 @@ module ReactManifest
74
92
 
75
93
  files = js_files_in(ctrl[:path])
76
94
  own_requires = files.map { |f| relative_require_path(f) }
77
- all_requires = (always_include_reqs + dep_requires + lib_reqs + shared_reqs + ext_reqs + own_requires).uniq
95
+ all_requires = (always_include_reqs + dep_requires + ext_reqs + own_requires).uniq
78
96
 
79
97
  if all_requires.empty?
80
98
  lines << "// (no JSX files found in #{ctrl[:name]}/)"
@@ -1,3 +1,3 @@
1
1
  module ReactManifest
2
- VERSION = "0.2.24".freeze
2
+ VERSION = "0.2.25".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react-manifest-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.24
4
+ version: 0.2.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Noonan