Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid ajv@6.9.0 for now #35211

Merged
merged 1 commit into from Feb 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions railties/test/isolation/abstract_unit.rb
Expand Up @@ -488,6 +488,22 @@ class ActiveSupport::TestCase
Dir.chdir(app_template_path) { `yarn add webpack@4.17.1 --tilde` }
Dir.chdir(app_template_path) { `yarn add webpack-cli` }

# FIXME: Temporary fix for webpack + ajv@6.9.0 compatible issue.
# See https://github.com/epoberezkin/ajv/issues/941
Dir.chdir(app_template_path) do
package = File.read("package.json")
resolutions = <<~EOS
,
"resolutions": {
"ajv": "6.8.1"
}
}
EOS
if package =~ /\n}\n\z/
File.open("package.json", "w") { |f| f.puts $` + resolutions + $' }
end
end

# Fake 'Bundler.require' -- we run using the repo's Gemfile, not an
# app-specific one: we don't want to require every gem that lists.
contents = File.read("#{app_template_path}/config/application.rb")
Expand Down