react_on_rails 13.3.0 → 13.3.1
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 +11 -3
- data/lib/react_on_rails/helper.rb +2 -2
- data/lib/react_on_rails/test_helper.rb +10 -1
- data/lib/react_on_rails/utils.rb +0 -4
- data/lib/react_on_rails/version.rb +1 -1
- data/lib/react_on_rails/webpacker_utils.rb +8 -3
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8896ec89f83e47ce7e1eff6222dee036c4542b0fc349fa03e635d6b4960d4b94
|
4
|
+
data.tar.gz: c81ce4b4090451c91afdb97982e7fb7c7dc71e773291ca745a314c02fc00e4ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3588de292936d910ae34fd2a8325f219965346cd2174568a7d882cc9de487fea32361908ea18727711f4bdb0e00a771d5a9f8db5e5f5cdc55ed222a6b4f617c4
|
7
|
+
data.tar.gz: 84bf0bdc5a1f4835ba21fb8b5187ce31e9a1e1541a870d94423b9b11f47a8db49ef1033b23afeb4eccce4cdb3583b62502197e75ac63bf5d131d5d4edc612fa5
|
data/CHANGELOG.md
CHANGED
@@ -17,11 +17,18 @@ Changes since last non-beta release.
|
|
17
17
|
|
18
18
|
*Please add entries here for your pull requests that are not yet released.*
|
19
19
|
|
20
|
+
### [13.3.1] - 2022-01-30
|
21
|
+
## Added
|
22
|
+
- Optimized `ReactOnRails::TestHelper`'s RSpec integration using `when_first_matching_example_defined`. [PR 1496](https://github.com/shakacode/react_on_rails/pull/1496) by [mcls](https://github.com/mcls).
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
- Fixed bug regarding FS-based packs generation. [PR 1515](https://github.com/shakacode/react_on_rails/pull/1515) by [pulkitkkr](https://github.com/pulkitkkr)
|
26
|
+
|
20
27
|
### [13.3.0] - 2022-01-29
|
21
28
|
### Fixed
|
22
|
-
- Fixed pack not found warning while using `react_component` and `react_component_hash` helpers, even when corresponding chunks are present. [PR 1511](https://github.com/shakacode/react_on_rails/pull/1511) by [pulkitkkr](https://github.com/pulkitkkr)
|
29
|
+
- Fixed pack not found warning while using `react_component` and `react_component_hash` helpers, even when corresponding chunks are present. [PR 1511](https://github.com/shakacode/react_on_rails/pull/1511) by [pulkitkkr](https://github.com/pulkitkkr).
|
23
30
|
- Fixed FS-based packs generation functionality to trigger pack generation on the creation of a new react component inside `components_subdirectory`. [PR 1506](https://github.com/shakacode/react_on_rails/pull/1506) by [pulkitkkr](https://github.com/pulkitkkr)
|
24
|
-
- Upgrade several JS dependencies to fix security issues. [PR 1514](https://github.com/shakacode/react_on_rails/pull/1514) by [ahangarha](https://github.com/ahangarha)
|
31
|
+
- Upgrade several JS dependencies to fix security issues. [PR 1514](https://github.com/shakacode/react_on_rails/pull/1514) by [ahangarha](https://github.com/ahangarha).
|
25
32
|
|
26
33
|
### Added
|
27
34
|
- Added `./bin/dev` and `./bin/dev-static` executables to ease and standardize running the dev server. [PR 1491](https://github.com/shakacode/react_on_rails/pull/1491) by [ahangarha](https://github.com/ahangarha)
|
@@ -1060,7 +1067,8 @@ Best done with Object destructing:
|
|
1060
1067
|
##### Fixed
|
1061
1068
|
- Fix several generator related issues.
|
1062
1069
|
|
1063
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/13.3.
|
1070
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/13.3.1...master
|
1071
|
+
[13.3.1]: https://github.com/shakacode/react_on_rails/compare/13.3.0...13.3.1
|
1064
1072
|
[13.3.0]: https://github.com/shakacode/react_on_rails/compare/13.2.0...13.3.0
|
1065
1073
|
[13.2.0]: https://github.com/shakacode/react_on_rails/compare/13.1.0...13.2.0
|
1066
1074
|
[13.1.0]: https://github.com/shakacode/react_on_rails/compare/13.0.2...13.1.0
|
@@ -328,8 +328,8 @@ module ReactOnRails
|
|
328
328
|
|
329
329
|
ReactOnRails::WebpackerUtils.raise_nested_entries_disabled unless ReactOnRails::WebpackerUtils.nested_entries?
|
330
330
|
|
331
|
-
|
332
|
-
|
331
|
+
append_javascript_pack_tag "generated/#{component_name}"
|
332
|
+
append_stylesheet_pack_tag "generated/#{component_name}"
|
333
333
|
end
|
334
334
|
|
335
335
|
def generated_components_pack_path(component_name)
|
@@ -35,8 +35,17 @@ module ReactOnRails
|
|
35
35
|
def self.configure_rspec_to_compile_assets(config, *metatags)
|
36
36
|
metatags = %i[js server_rendering controller] if metatags.empty?
|
37
37
|
|
38
|
+
# Supported since RSpec 3.5.0
|
39
|
+
supports_first_matching_example = config.respond_to?(:when_first_matching_example_defined)
|
40
|
+
|
38
41
|
metatags.each do |metatag|
|
39
|
-
|
42
|
+
if supports_first_matching_example
|
43
|
+
config.when_first_matching_example_defined(metatag) do
|
44
|
+
ReactOnRails::TestHelper.ensure_assets_compiled
|
45
|
+
end
|
46
|
+
else
|
47
|
+
config.before(:example, metatag) { ReactOnRails::TestHelper.ensure_assets_compiled }
|
48
|
+
end
|
40
49
|
end
|
41
50
|
end
|
42
51
|
|
data/lib/react_on_rails/utils.rb
CHANGED
@@ -27,9 +27,10 @@ module ReactOnRails
|
|
27
27
|
@shakapacker_version_as_array = [match[1].to_i, match[2].to_i, match[3].to_i]
|
28
28
|
end
|
29
29
|
|
30
|
-
def self.shackapacker_version_requirement_met?(
|
31
|
-
|
32
|
-
|
30
|
+
def self.shackapacker_version_requirement_met?(required_version)
|
31
|
+
req_ver = semver_to_string(required_version)
|
32
|
+
|
33
|
+
Gem::Version.new(shakapacker_version) >= Gem::Version.new(req_ver)
|
33
34
|
end
|
34
35
|
|
35
36
|
# This returns either a URL for the webpack-dev-server, non-server bundle or
|
@@ -136,5 +137,9 @@ module ReactOnRails
|
|
136
137
|
|
137
138
|
raise ReactOnRails::Error, msg
|
138
139
|
end
|
140
|
+
|
141
|
+
def self.semver_to_string(ary)
|
142
|
+
"#{ary[0]}.#{ary[1]}.#{ary[2]}"
|
143
|
+
end
|
139
144
|
end
|
140
145
|
end
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.3.
|
4
|
+
version: 13.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|