Skip to content

Commit

Permalink
[5.x] Yarn v3 for stable webpacker 5.x gem (#3098)
Browse files Browse the repository at this point in the history
* Yarn v3 for stable webpacker 5.x

* Update Gemfile-rails-edge

* Update Gemfile-rails-edge

* Update ruby.yml

* Update helper_test.rb

* Update helper_test.rb

* Update helper_test.rb

* Update check_yarn.rake

* Update ruby.yml

* Update Gemfile-rails-edge

* Update helper_test.rb
  • Loading branch information
pedrofurtado committed Aug 17, 2021
1 parent 86e87c5 commit 8fa4f22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tasks/webpacker/check_yarn.rake
Expand Up @@ -9,7 +9,7 @@ namespace :webpacker do
pkg_path = Pathname.new("#{__dir__}/../../../package.json").realpath
yarn_range = JSON.parse(pkg_path.read)["engines"]["yarn"]
is_valid = SemanticRange.satisfies?(yarn_version, yarn_range) rescue false
is_unsupported = SemanticRange.satisfies?(yarn_version, ">=3.0.0") rescue false
is_unsupported = SemanticRange.satisfies?(yarn_version, ">=4.0.0") rescue false

unless is_valid
$stderr.puts "Webpacker requires Yarn \"#{yarn_range}\" and you are using #{yarn_version}"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -9,7 +9,7 @@
],
"engines": {
"node": ">=10.17.0",
"yarn": ">=1 <3"
"yarn": ">=1 <4"
},
"dependencies": {
"@babel/core": "^7.14.3",
Expand Down

0 comments on commit 8fa4f22

Please sign in to comment.