Skip to content

Commit fc2e1e0

Browse files
squadettejustin808
authored andcommitted
Report error in parsing version number (#1025)
1 parent 7956e37 commit fc2e1e0

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Changes since last non-beta release.
88

99
*Please add entries here for your pull requests that are not yet released.*
1010

11+
#### Fixed
12+
- Improved error reporting on version mismatches between Javascript and Ruby packages.
13+
1114
### [10.1.2] - 2018-02-27
1215
#### Fixed
1316
- Use ReactDOM.hydrate() for hydrating a SSR component if available. ReactDOM.render() has been deprecated for use on SSR components in React 16 and this addresses the warning. [PR 1028](https://github.com/shakacode/react_on_rails/pull/1028) by [theJoeBiz](https://github.com/theJoeBiz).

lib/react_on_rails/version_checker.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def relative_path?
8282
def major_minor_patch
8383
return if relative_path?
8484
match = raw.match(MAJOR_MINOR_PATCH_VERSION_REGEX)
85+
unless match
86+
raise "Cannot parse version number '#{raw}' (wildcard versions are not supported)"
87+
end
8588
[match[1], match[2], match[3]]
8689
end
8790

0 commit comments

Comments
 (0)