react-manifest-rails 0.2.7 → 0.2.8

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: d9635ab7ddcec793c091f9ba04da6196f6b86b130ede696a7431f85e9b9e43a1
4
- data.tar.gz: e56d0d2981e699e9113f189e981b9d37e7d0664f2c72cc63c153c03bd1d60558
3
+ metadata.gz: 3d0636de70da440909d01ca2748f51e9b73533a2c787b59984d906bac001b34c
4
+ data.tar.gz: d5a1c1982d5e875b0794c0645b07391edfff54f210f3dc394c0650ab0929d76d
5
5
  SHA512:
6
- metadata.gz: 9142794e512c65c87b23580503fcfb270cfb139ad12a725fc96990052d43ba71c3fc2203a75603a4204078332d629d207e03b8b6e15ec017e416062f8b2288e9
7
- data.tar.gz: 57406840f71a57bf614bd591bcdefd8a0de16ded215cfa6d181831e5720487aa350ea06fab874acce6b1607c4dcb5f1cd6d4aca79ccda4faf91016a39a75ec92
6
+ metadata.gz: fd86d54537b980dfff2ad4a7ab620b483716a8df735fed7cb4a6f0cc92c65297552c2295f2eda81017bb5fe290e2fc9500c91e04e2ff1700637162749609f2e8
7
+ data.tar.gz: 3bad752f3e4404f33a01fabd28c35b4dea27216b8adb8f4e312a0d3748bdbba85e06250866adc166bb9d49a723c1846163b2b8f8a0d75c50aa589ff461eb34dd
data/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.8] - 2026-04-15
9
+
10
+ ### Fixed
11
+ - Prevented duplicate bundle conflicts by removing legacy root `ux_*.js` files when an equivalent generated manifest already exists in the manifest directory.
12
+ - Ensured generated manifest directory has deterministic Sprockets precedence by prepending it in assets paths.
13
+
14
+ ### Changed
15
+ - Added regression coverage for duplicate legacy-manifest cleanup behavior.
16
+
8
17
  ## [0.2.7] - 2026-04-15
9
18
 
10
19
  ### Added
@@ -152,7 +152,12 @@ module ReactManifest
152
152
  FileUtils.mkdir_p(manifest_dir)
153
153
  legacy_files.each do |legacy|
154
154
  target = File.join(manifest_dir, File.basename(legacy))
155
- next if File.exist?(target)
155
+ if File.exist?(target)
156
+ # Prevent double-definition conflicts: if a legacy root manifest is
157
+ # auto-generated and a manifest-dir equivalent exists, drop the legacy file.
158
+ FileUtils.rm_f(legacy) if auto_generated?(legacy)
159
+ next
160
+ end
156
161
 
157
162
  FileUtils.mv(legacy, target)
158
163
  end
@@ -38,7 +38,11 @@ module ReactManifest
38
38
  # Keep generated manifests in a dedicated folder while preserving logical
39
39
  # asset names (ux_shared, ux_users, etc.) via an explicit Sprockets path.
40
40
  initializer "react_manifest.assets_path" do |app|
41
- app.config.assets.paths << ReactManifest.configuration.abs_manifest_dir if app.config.respond_to?(:assets)
41
+ next unless app.config.respond_to?(:assets)
42
+
43
+ manifest_dir = ReactManifest.configuration.abs_manifest_dir
44
+ app.config.assets.paths.delete(manifest_dir)
45
+ app.config.assets.paths.unshift(manifest_dir)
42
46
  end
43
47
 
44
48
  # ----------------------------------------------------------------
@@ -1,3 +1,3 @@
1
1
  module ReactManifest
2
- VERSION = "0.2.7".freeze
2
+ VERSION = "0.2.8".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.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Noonan