react-manifest-rails 0.2.24 → 0.2.26

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: 4b8bb6838aaa46da5189da7bfba7c7733b909e1a1dda061f0e1020f2c86969bb
4
+ data.tar.gz: 86aaee63e4333b5d32539a98d21c1eca47fc449acdd0edd617319b3361feb67c
5
5
  SHA512:
6
- metadata.gz: 30c7f0633646f06cfc497a617c76dbbb50f74e84104fd590f3054bff5c228a42e08aa6683dfdc96702656a52cec57533917b2438d4bb39ede667ef6c0686f219
7
- data.tar.gz: 0ea044f3d55bb64be2ce9a725cc90cf9b33da8f343fde043707c098995ce6e88840e609947867203efe739623ce5dba3a32e4d444dfb9b3f8b252b56b991adbb
6
+ metadata.gz: e1479c5685f649940a378031a99618a835779e6c3ecc39cf38b445196f4878dcb6650ec83f7631d58f621032047495d72f79670e5058a6aae7aebac25f8f467c
7
+ data.tar.gz: 71b29ea8d787d9989c86c07256f174f9768bce7a257eef86143d96ca1481287c31906aa33b08e5b9ff2d788614a90ffbc58d82db6b2bdab85efe3a57c3306d3d
data/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.26] - 2026-04-22
11
+
12
+ ### Fixed
13
+ - Resolved RuboCop offenses introduced in v0.2.25: removed useless `lib_reqs`/`shared_reqs` assignments in `build_controller`, corrected multiline method-call indentation in `build_shared`, and wrapped long line in `run!`.
14
+
15
+ ### Changed
16
+ - Release preflight script now runs the full RSpec suite and RuboCop before allowing a tag/push, blocking the release if either fails.
17
+
18
+ ## [0.2.25] - 2026-04-22
19
+
20
+ ### Fixed
21
+ - 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.
22
+ - `Generator#run!` now generates `ux_shared.js` (all files from shared dirs) as the first manifest before controller manifests.
23
+ - 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.
24
+ - `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.
25
+
26
+ ### Added
27
+ - 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.
28
+ - Session-start hook (`.github/hooks/release-session.json`) that injects the release protocol into the Copilot agent context.
29
+
10
30
  ## [0.2.24] - 2026-04-22
11
31
 
12
32
  ### Fixed
@@ -47,7 +47,10 @@ 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 do |ctrl|
52
+ build_controller(ctrl, controller_context)
53
+ end
51
54
 
52
55
  migrate_legacy_manifests!
53
56
 
@@ -62,19 +65,36 @@ module ReactManifest
62
65
 
63
66
  # ------------------------------------------------------------------ shared
64
67
 
68
+ def build_shared(shared_dirs)
69
+ lines = header_lines
70
+ reqs = shared_dirs
71
+ .flat_map { |d| js_files_in(d[:path]) }
72
+ .map { |f| normalize_require_path(relative_require_path(f)) }
73
+ .uniq
74
+ .sort
75
+
76
+ if reqs.empty?
77
+ lines << "// (no shared JS files found)"
78
+ else
79
+ reqs.each { |req| lines << "//= require #{req}" }
80
+ end
81
+
82
+ { filename: "#{@config.shared_bundle}.js", content: "#{lines.join("\n")}\n" }
83
+ end
84
+
65
85
  # --------------------------------------------------------------- controller
66
86
 
67
87
  def build_controller(ctrl, controller_context)
68
88
  lines = header_lines
69
89
  always_include_reqs = controller_context[:always_include_requires].fetch(ctrl[:bundle_name], [])
70
90
  dep_requires = controller_dependency_requires(ctrl[:bundle_name], controller_context)
71
- lib_reqs = controller_context[:shared_lib_requires]
72
- shared_reqs = controller_context[:shared_requires].fetch(ctrl[:bundle_name], Set.new).to_a.sort
91
+ controller_context[:shared_lib_requires]
92
+ controller_context[:shared_requires].fetch(ctrl[:bundle_name], Set.new).to_a.sort
73
93
  ext_reqs = controller_context[:external_requires].fetch(ctrl[:bundle_name], Set.new).to_a.sort
74
94
 
75
95
  files = js_files_in(ctrl[:path])
76
96
  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
97
+ all_requires = (always_include_reqs + dep_requires + ext_reqs + own_requires).uniq
78
98
 
79
99
  if all_requires.empty?
80
100
  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.26".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.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Noonan