1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

4 commits

Author SHA1 Message Date
Yasuo Honda
437fd8f3c7 Lock rails/webpacker npm package version to 5
This pull request locks `rails/webpacker` npm package version to 5.

railties CI failures are reported at https://buildkite.com/rails/rails/builds/73586 .

It looks like Rails unit test does not support `rails/webpacker` 6 yet.
because `rails/webpacker` 6.0.0-pre.1 has been released recently, which
triggers these errors.

https://www.npmjs.com/package/@rails/webpacker/v/6.0.0-pre.1

This pull request addresses these errors.

```ruby
$ cd railties
$ bin/test test/application/asset_debugging_test.rb -n test_assets_are_concatenated_when_debug_is_off_and_compile_is_off_either_if_debug_assets_param_is_provided
Run options: -n test_assets_are_concatenated_when_debug_is_off_and_compile_is_off_either_if_debug_assets_param_is_provided --seed 62457

E

Error:
ApplicationTests::AssetDebuggingTest#test_assets_are_concatenated_when_debug_is_off_and_compile_is_off_either_if_debug_assets_param_is_provided:
RuntimeError: rails command failed (1): bin/rails assets:precompile --trace 2>&1
... snip ...
Compilation failed:
[webpack-cli] TypeError: Cannot read property 'toWebpackConfig' of undefined
    at Object.<anonymous> (/home/yahonda/src/github.com/rails/rails/tmp/d20201222-730245-pstvl8/app/config/webpack/production.js:3:30)
    at Module._compile (/home/yahonda/src/github.com/rails/rails/railties/test/isolation/assets/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (/home/yahonda/src/github.com/rails/rails/railties/test/isolation/assets/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at requireConfig (/home/yahonda/src/github.com/rails/rails/railties/test/isolation/assets/node_modules/webpack-cli/lib/groups/resolveConfig.js:73:18)
    at /home/yahonda/src/github.com/rails/rails/railties/test/isolation/assets/node_modules/webpack-cli/lib/groups/resolveConfig.js:99:36
    at Array.map (<anonymous>)

    /home/yahonda/src/github.com/rails/rails/railties/test/isolation/abstract_unit.rb:373:in `rails'
    /home/yahonda/src/github.com/rails/rails/railties/test/application/asset_debugging_test.rb:44:in `block in <class:AssetDebuggingTest>'

bin/test test/application/asset_debugging_test.rb:41

Finished in 3.836355s, 0.2607 runs/s, 0.0000 assertions/s.
1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
$
```
2020-12-22 21:33:00 +09:00
Andrew Kress
ffaee477bd create an attribute so that webpacker can set its default path instead of hardcoding 2019-08-13 15:20:59 -05:00
Yuji Yaginuma
ad3cbc2452
Add missing packages (#35227)
If generate application without specified options,`actioncable` and
`activestorage` loads by default.
2019-02-12 16:00:17 +09:00
yuuji.yaginuma
cd34f00627 Install JavaScript packages before run test
Some tests are running yarn install during the test.
The directory used for isolation test is not subject to yarn workspace,
and it occurs because the required package is not installed.
In order to avoid this, I fixed all necessary packages to be installed
before run test and use symlink to `node_modules`.

This is a bit complicated, as `yarn install` needs to be run in a specific
directory before running the test.
However, running `yarn install` every time run the test is expensive
when testing locally and should be avoided.
2019-02-11 09:58:08 +09:00