webpacker 5.4.0 → 6.0.0.rc.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +1 -1
  3. data/.github/workflows/jest.yml +7 -15
  4. data/.github/workflows/js-lint.yml +7 -15
  5. data/.github/workflows/rubocop.yml +1 -1
  6. data/.github/workflows/ruby.yml +18 -36
  7. data/.gitignore +2 -0
  8. data/.node-version +1 -1
  9. data/.rubocop.yml +5 -4
  10. data/CHANGELOG.md +45 -9
  11. data/CONTRIBUTING.md +20 -1
  12. data/Gemfile.lock +83 -83
  13. data/README.md +394 -180
  14. data/config/README.md +3 -0
  15. data/config/webpacker.yml +1 -0
  16. data/docs/deployment.md +9 -11
  17. data/docs/developing_webpacker.md +29 -0
  18. data/docs/troubleshooting.md +61 -25
  19. data/docs/v6_upgrade.md +113 -0
  20. data/gemfiles/Gemfile-rails-edge +1 -1
  21. data/gemfiles/Gemfile-rails.6.1.x +12 -0
  22. data/lib/install/{javascript/packs/application.js → application.js} +2 -5
  23. data/lib/install/bin/webpack +4 -7
  24. data/lib/install/bin/yarn +18 -0
  25. data/lib/install/config/webpack/base.js +3 -0
  26. data/lib/install/config/webpack/development.js +2 -2
  27. data/lib/install/config/webpack/production.js +2 -2
  28. data/lib/install/config/webpack/test.js +2 -2
  29. data/lib/install/config/webpacker.yml +21 -49
  30. data/lib/install/package.json +15 -0
  31. data/lib/install/template.rb +63 -28
  32. data/lib/tasks/webpacker/binstubs.rake +6 -4
  33. data/lib/tasks/webpacker/check_binstubs.rake +4 -4
  34. data/lib/tasks/webpacker/check_node.rake +3 -0
  35. data/lib/tasks/webpacker/check_yarn.rake +4 -1
  36. data/lib/tasks/webpacker/clobber.rake +1 -1
  37. data/lib/tasks/webpacker/compile.rake +4 -2
  38. data/lib/tasks/webpacker/info.rake +12 -10
  39. data/lib/tasks/webpacker/install.rake +6 -4
  40. data/lib/tasks/webpacker/verify_config.rake +14 -0
  41. data/lib/tasks/webpacker/verify_install.rake +1 -10
  42. data/lib/tasks/webpacker/yarn_install.rake +9 -7
  43. data/lib/tasks/webpacker.rake +2 -11
  44. data/lib/tasks/yarn.rake +38 -0
  45. data/lib/webpacker/commands.rb +21 -16
  46. data/lib/webpacker/compiler.rb +16 -9
  47. data/lib/webpacker/configuration.rb +8 -32
  48. data/lib/webpacker/dev_server.rb +6 -0
  49. data/lib/webpacker/dev_server_runner.rb +28 -4
  50. data/lib/webpacker/helper.rb +47 -81
  51. data/lib/webpacker/instance.rb +4 -0
  52. data/lib/webpacker/manifest.rb +2 -3
  53. data/lib/webpacker/railtie.rb +8 -2
  54. data/lib/webpacker/runner.rb +1 -1
  55. data/lib/webpacker/version.rb +1 -1
  56. data/lib/webpacker/webpack_runner.rb +29 -3
  57. data/lib/webpacker.rb +1 -1
  58. data/package/__tests__/config.js +5 -37
  59. data/package/__tests__/development.js +13 -21
  60. data/package/__tests__/env.js +16 -4
  61. data/package/__tests__/index.js +9 -0
  62. data/package/__tests__/production.js +6 -6
  63. data/package/__tests__/staging.js +7 -6
  64. data/package/__tests__/test.js +4 -5
  65. data/package/babel/preset.js +54 -0
  66. data/package/config.js +6 -14
  67. data/package/env.js +13 -4
  68. data/package/environments/__tests__/base.js +20 -52
  69. data/package/environments/base.js +68 -128
  70. data/package/environments/development.js +49 -47
  71. data/package/environments/production.js +66 -64
  72. data/package/environments/test.js +2 -2
  73. data/package/index.js +15 -8
  74. data/package/inliningCss.js +7 -0
  75. data/package/rules/babel.js +10 -8
  76. data/package/rules/coffee.js +6 -0
  77. data/package/rules/erb.js +15 -0
  78. data/package/rules/file.js +21 -19
  79. data/package/rules/index.js +16 -18
  80. data/package/rules/less.js +22 -0
  81. data/package/rules/raw.js +5 -0
  82. data/package/rules/sass.js +9 -10
  83. data/package/rules/stylus.js +26 -0
  84. data/package/utils/get_style_rule.js +28 -36
  85. data/package/utils/helpers.js +28 -35
  86. data/package.json +23 -43
  87. data/test/command_test.rb +76 -0
  88. data/test/compiler_test.rb +0 -12
  89. data/test/configuration_test.rb +4 -35
  90. data/test/dev_server_runner_test.rb +36 -6
  91. data/test/engine_rake_tasks_test.rb +39 -0
  92. data/test/helper_test.rb +76 -62
  93. data/test/manifest_test.rb +16 -0
  94. data/test/mounted_app/Rakefile +4 -0
  95. data/test/mounted_app/test/dummy/Rakefile +3 -0
  96. data/test/mounted_app/test/dummy/bin/rails +3 -0
  97. data/test/mounted_app/test/dummy/bin/rake +3 -0
  98. data/test/mounted_app/test/dummy/config/application.rb +10 -0
  99. data/test/mounted_app/test/dummy/config/environment.rb +3 -0
  100. data/test/mounted_app/test/dummy/config/webpacker.yml +75 -0
  101. data/test/mounted_app/test/dummy/config.ru +5 -0
  102. data/test/mounted_app/test/dummy/package.json +7 -0
  103. data/test/rake_tasks_test.rb +1 -10
  104. data/test/test_app/app/{javascript/packs → packs/entrypoints}/application.js +1 -1
  105. data/test/test_app/config/initializers/inspect_autoload_paths.rb +1 -0
  106. data/test/test_app/config/webpacker.yml +5 -31
  107. data/test/test_app/config/webpacker_other_location.yml +79 -0
  108. data/test/test_app/config/webpacker_public_root.yml +0 -1
  109. data/test/test_app/public/packs/manifest.json +36 -18
  110. data/test/test_app/some.config.js +0 -0
  111. data/test/webpack_runner_test.rb +9 -3
  112. data/test/webpacker_test.rb +21 -0
  113. data/webpacker.gemspec +2 -2
  114. data/yarn.lock +2183 -6524
  115. metadata +63 -93
  116. data/.travis.yml +0 -43
  117. data/docs/assets.md +0 -119
  118. data/docs/cloud9.md +0 -310
  119. data/docs/css.md +0 -308
  120. data/docs/docker.md +0 -68
  121. data/docs/engines.md +0 -213
  122. data/docs/env.md +0 -63
  123. data/docs/es6.md +0 -72
  124. data/docs/folder-structure.md +0 -66
  125. data/docs/integrations.md +0 -220
  126. data/docs/misc.md +0 -23
  127. data/docs/props.md +0 -223
  128. data/docs/target.md +0 -22
  129. data/docs/testing.md +0 -136
  130. data/docs/typescript.md +0 -190
  131. data/docs/v4-upgrade.md +0 -142
  132. data/docs/webpack-dev-server.md +0 -92
  133. data/docs/webpack.md +0 -364
  134. data/docs/yarn.md +0 -23
  135. data/lib/install/angular.rb +0 -23
  136. data/lib/install/coffee.rb +0 -25
  137. data/lib/install/config/.browserslistrc +0 -1
  138. data/lib/install/config/babel.config.js +0 -70
  139. data/lib/install/config/postcss.config.js +0 -12
  140. data/lib/install/config/webpack/environment.js +0 -3
  141. data/lib/install/elm.rb +0 -39
  142. data/lib/install/erb.rb +0 -25
  143. data/lib/install/examples/angular/hello_angular/app/app.component.ts +0 -9
  144. data/lib/install/examples/angular/hello_angular/app/app.module.ts +0 -16
  145. data/lib/install/examples/angular/hello_angular/index.ts +0 -8
  146. data/lib/install/examples/angular/hello_angular/polyfills.ts +0 -73
  147. data/lib/install/examples/angular/hello_angular.js +0 -7
  148. data/lib/install/examples/coffee/hello_coffee.coffee +0 -4
  149. data/lib/install/examples/elm/Main.elm +0 -55
  150. data/lib/install/examples/elm/hello_elm.js +0 -16
  151. data/lib/install/examples/erb/hello_erb.js.erb +0 -6
  152. data/lib/install/examples/react/babel.config.js +0 -87
  153. data/lib/install/examples/react/hello_react.jsx +0 -26
  154. data/lib/install/examples/react/tsconfig.json +0 -21
  155. data/lib/install/examples/stimulus/application.js +0 -1
  156. data/lib/install/examples/stimulus/controllers/hello_controller.js +0 -18
  157. data/lib/install/examples/stimulus/controllers/index.js +0 -9
  158. data/lib/install/examples/svelte/app.svelte +0 -11
  159. data/lib/install/examples/svelte/hello_svelte.js +0 -20
  160. data/lib/install/examples/typescript/hello_typescript.ts +0 -4
  161. data/lib/install/examples/typescript/tsconfig.json +0 -24
  162. data/lib/install/examples/vue/app.vue +0 -22
  163. data/lib/install/examples/vue/hello_vue.js +0 -72
  164. data/lib/install/loaders/coffee.js +0 -6
  165. data/lib/install/loaders/elm.js +0 -25
  166. data/lib/install/loaders/erb.js +0 -11
  167. data/lib/install/loaders/svelte.js +0 -9
  168. data/lib/install/loaders/vue.js +0 -6
  169. data/lib/install/react.rb +0 -18
  170. data/lib/install/stimulus.rb +0 -12
  171. data/lib/install/svelte.rb +0 -29
  172. data/lib/install/typescript.rb +0 -39
  173. data/lib/install/vue.rb +0 -49
  174. data/lib/tasks/installers.rake +0 -42
  175. data/package/config_types/__tests__/config_list.js +0 -118
  176. data/package/config_types/__tests__/config_object.js +0 -43
  177. data/package/config_types/config_list.js +0 -75
  178. data/package/config_types/config_object.js +0 -55
  179. data/package/config_types/index.js +0 -7
  180. data/package/rules/module.css.js +0 -3
  181. data/package/rules/module.sass.js +0 -8
  182. data/package/rules/node_modules.js +0 -22
  183. data/package/utils/__tests__/deep_assign.js +0 -32
  184. data/package/utils/__tests__/deep_merge.js +0 -10
  185. data/package/utils/__tests__/get_style_rule.js +0 -65
  186. data/package/utils/__tests__/objectify.js +0 -9
  187. data/package/utils/deep_assign.js +0 -22
  188. data/package/utils/deep_merge.js +0 -22
  189. data/package/utils/objectify.js +0 -3
  190. /data/test/test_app/app/{javascript/packs → packs/entrypoints}/multi_entry.css +0 -0
  191. /data/test/test_app/app/{javascript/packs → packs/entrypoints}/multi_entry.js +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5166d2a4be6f8e7922eca1b15b6622115868a2a0ef8a7048170d55b33b0c952a
4
- data.tar.gz: 626056ac147c4e33b8218f1010aba7360b95481217d1720d76571b8af5e065ea
3
+ metadata.gz: bb700e8975b2ec865da84e152fea23586c8e7a2a428465230255ab97ebe482ce
4
+ data.tar.gz: c2a023d554364442cd356771cad8b42226a3d6ce3a4708b6a5603151aad886ba
5
5
  SHA512:
6
- metadata.gz: 780aec53de7f62dea38afc7e0eda8a45868380865493e8aea5d372ebdbea628f06da5b5c7232339b2af1f39f907093bc8a2ed19860beabcfc04dc59dbe889999
7
- data.tar.gz: 71e3bba0bd47f85e9f639de5c9c274fc4a20a56bfa980111600e1f31ed086784fcb1f27472ffb95dac6d30e4320338de6bbe9f152113fde3db3bc5aa917bf6e4
6
+ metadata.gz: bb863173d2577d304c03a4e6d66eddc385a62950bf30af00ed29c4abb9039b0290402771f58c9ede11cf9f26d5945136997d78148590871b7247e13b4d3db7cf
7
+ data.tar.gz: a624efeabf2bdbd7b83b59aa2854e4ebda00c5c476849c03fc585d967810b30fd5d118fbf13f412c40cb6e7fa1fe020f619cc9ede0cd72989c25504f3f8e0e53
data/.eslintrc.js CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
- extends: 'airbnb',
2
+ extends: ['airbnb', 'prettier'],
3
3
  rules: {
4
4
  'comma-dangle': ['error', 'never'],
5
5
  'import/no-unresolved': 'off',
@@ -3,33 +3,25 @@ name: Jest specs
3
3
  on: [push, pull_request]
4
4
 
5
5
  jobs:
6
- build:
6
+ jest:
7
7
  name: Jest specs
8
8
  strategy:
9
9
  matrix:
10
10
  os: [ubuntu-latest]
11
- node: [10.x, 12.x, 14.x]
11
+ node: [12.x, 14.x, 16.x]
12
12
 
13
13
  runs-on: ${{ matrix.os }}
14
14
 
15
15
  steps:
16
16
  - uses: actions/checkout@v2
17
- - name: Get yarn cache directory path
18
- id: yarn-cache-dir-path
19
- run: echo "::set-output name=dir::$(yarn cache dir)"
20
-
21
- - uses: actions/cache@v2
22
- id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
23
- with:
24
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
25
- key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
26
- restore-keys: |
27
- ${{ runner.os }}-${{ matrix.node }}-yarn-
28
-
29
17
  - name: Use Node.js ${{ matrix.node }}
30
- uses: actions/setup-node@v1
18
+ uses: actions/setup-node@v2
31
19
  with:
32
20
  node-version: ${{ matrix.node }}
21
+ cache: yarn
22
+
23
+ - name: Install yarn maybe
24
+ run: which yarn || npm install -g yarn
33
25
 
34
26
  - name: Install dependencies
35
27
  run: yarn --frozen-lockfile
@@ -3,34 +3,26 @@ name: JS lint
3
3
  on: [push, pull_request]
4
4
 
5
5
  jobs:
6
- build:
6
+ js-lint:
7
7
  name: JS Lint
8
8
 
9
9
  strategy:
10
10
  matrix:
11
11
  os: [ubuntu-latest]
12
- node: [12.x]
12
+ node: [14]
13
13
 
14
14
  runs-on: ${{ matrix.os }}
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v2
18
- - name: Get yarn cache directory path
19
- id: yarn-cache-dir-path
20
- run: echo "::set-output name=dir::$(yarn cache dir)"
21
-
22
- - uses: actions/cache@v2
23
- id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
24
- with:
25
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26
- key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27
- restore-keys: |
28
- ${{ runner.os }}-yarn-
29
-
30
18
  - name: Use Node.js ${{ matrix.node }}
31
- uses: actions/setup-node@v1
19
+ uses: actions/setup-node@v2
32
20
  with:
33
21
  node-version: ${{ matrix.node }}
22
+ cache: yarn
23
+
24
+ - name: Install yarn maybe
25
+ run: which yarn || npm install -g yarn
34
26
 
35
27
  - name: Install dependencies
36
28
  run: yarn --frozen-lockfile
@@ -3,7 +3,7 @@ name: Rubocop
3
3
  on: [push, pull_request]
4
4
 
5
5
  jobs:
6
- build:
6
+ rubocop:
7
7
  name: Rubocop
8
8
  runs-on: ${{ matrix.os }}
9
9
  env:
@@ -3,64 +3,46 @@ name: Ruby specs
3
3
  on: [push, pull_request]
4
4
 
5
5
  jobs:
6
- build:
6
+ test:
7
7
  name: Ruby specs
8
8
  runs-on: ${{ matrix.os }}
9
9
  continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' || matrix.experimental }}
10
- env:
11
- BUNDLE_JOBS: 4
12
- BUNDLE_RETRY: 3
13
10
  strategy:
14
11
  fail-fast: false
15
12
  matrix:
16
13
  os: [ubuntu-latest]
17
- ruby: [
18
- 2.4,
19
- 2.5,
20
- 2.6,
21
- 2.7
22
- ]
23
- gemfile: [
24
- "gemfiles/Gemfile-rails.5.2.x",
25
- "gemfiles/Gemfile-rails.6.0.x"
26
- ]
14
+ ruby:
15
+ - 2.7
16
+ - "3.0"
17
+ gemfile:
18
+ - gemfiles/Gemfile-rails.5.2.x
19
+ - gemfiles/Gemfile-rails.6.0.x
20
+ - gemfiles/Gemfile-rails.6.1.x
27
21
  exclude:
28
- - ruby: "2.4"
29
- gemfile: gemfiles/Gemfile-rails.6.0.x
22
+ - ruby: 2.5
23
+ gemfile: gemfiles/Gemfile-rails.6.1.x
24
+ - ruby: "3.0"
25
+ gemfile: gemfiles/Gemfile-rails.5.2.x
30
26
  experimental: [false]
31
27
  include:
32
- - ruby: 2.5
33
- os: ubuntu-latest
34
- gemfile: gemfiles/Gemfile-rails-edge
35
- experimental: true
36
- - ruby: 2.6
28
+ - ruby: 2.7
37
29
  os: ubuntu-latest
38
30
  gemfile: gemfiles/Gemfile-rails-edge
39
31
  experimental: true
40
- - ruby: 2.7
32
+ - ruby: "3.0"
41
33
  os: ubuntu-latest
42
34
  gemfile: gemfiles/Gemfile-rails-edge
43
35
  experimental: true
44
36
 
37
+ env:
38
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
45
39
  steps:
46
40
  - uses: actions/checkout@v2
47
- - uses: actions/cache@v2
48
- with:
49
- path: /home/runner/bundle
50
- key: bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
51
- restore-keys: |
52
- bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-
53
41
 
54
42
  - uses: ruby/setup-ruby@v1
55
43
  with:
56
44
  ruby-version: ${{ matrix.ruby }}
57
-
58
- - name: Bundle install
59
- run: |
60
- gem install bundler -v 2.1.4
61
- bundle config path /home/runner/bundle
62
- bundle config --global gemfile ${{ matrix.gemfile }}
63
- bundle install --jobs 4 --retry 3
45
+ bundler-cache: true # Run "bundle install", and cache the result automatically.
64
46
 
65
47
  - name: Ruby specs
66
- run: bundle exec rake test
48
+ run: bundle exec rake
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  /.bundle
2
2
  /pkg
3
+ /test/mounted_app/test/dummy/log
3
4
  /test/test_app/log
4
5
  node_modules
5
6
  .byebug_history
@@ -9,3 +10,4 @@ yarn-error.log*
9
10
  .yarn-integrity
10
11
  /log
11
12
  gemfiles/*.lock
13
+ .DS_Store
data/.node-version CHANGED
@@ -1 +1 @@
1
- 10.17.0
1
+ 16.7.0
data/.rubocop.yml CHANGED
@@ -1,13 +1,14 @@
1
1
  require: rubocop-performance
2
2
  AllCops:
3
- TargetRubyVersion: 2.4
3
+ TargetRubyVersion: 2.7
4
4
  # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
5
5
  # to ignore them, so only the ones explicitly set in this file are enabled.
6
6
  DisabledByDefault: true
7
7
  Exclude:
8
- - 'lib/install/templates/**'
9
- - 'vendor/**/*'
10
- - 'node_modules/**/*'
8
+ - "lib/install/templates/**"
9
+ - "vendor/**/*"
10
+ - "node_modules/**/*"
11
+ - "_actions/**/*"
11
12
 
12
13
  # Prefer &&/|| over and/or.
13
14
  Style/AndOr:
data/CHANGELOG.md CHANGED
@@ -2,25 +2,61 @@
2
2
 
3
3
  **Please note that Webpacker 4.1.0 has an installer bug. Please use 4.2.0 or above**
4
4
 
5
- ## [[5.4.0]](https://github.com/rails/webpacker/compare/v5.4.0...5.3.0) - 2021-05-18
5
+ ## [[6.0.0]](https://github.com/rails/webpacker/compare/v5.4.3...master) - 2021-TBD
6
6
 
7
- - Fix compatibility with Psych 4
7
+ Please see [UPGRADE GUIDE](./docs/v6_upgrade.md) for more information.
8
8
 
9
- ## [[5.3.0]](https://github.com/rails/webpacker/compare/v5.3.0...5.2.1) - 2021-04-27
9
+ - `node_modules` will no longer be compiled by default. This primarily fixes [rails issue #35501](https://github.com/rails/rails/issues/35501) as well as [numerous other webpacker issues](https://github.com/rails/webpacker/issues/2131#issuecomment-581618497). The disabled loader can still be required explicitly via:
10
10
 
11
+ ```js
12
+ const nodeModules = require('@rails/webpacker/rules/node_modules.js')
13
+ environment.loaders.append('nodeModules', nodeModules)
14
+ ```
15
+
16
+ - If you have added `environment.loaders.delete('nodeModules')` to your `environment.js`, this must be removed or you will receive an error (`Item nodeModules not found`).
17
+ - `extract_css` option was removed. Webpacker will generate a separate `application.css` file for the default `application` pack, as supported by multiple files per entry introduced in 5.0.0. [#2608](https://github.com/rails/webpacker/pull/2608). However, CSS will be inlined when the webpack-dev-server is used with `hmr: true`. JS package exports `inliningCss`. This is useful to enable HMR for React.
18
+ - Webpacker's wrapper to the `splitChunks()` API will now default `runtimeChunk: 'single'` which will help prevent potential issues when using multiple entry points per page [#2708](https://github.com/rails/webpacker/pull/2708).
19
+ - Changes `@babel/preset-env` modules option to `'auto'` per recommendation in the Babel docs [#2709](https://github.com/rails/webpacker/pull/2709)
11
20
  - Adds experimental Yarn 2 support. Note you must manually set `nodeLinker: node-modules` in your `.yarnrc.yml`.
21
+ - Fixes dev server issues [#2898](https://github.com/rails/webpacker/pull/2898)
22
+ - Update static files path to from `media/` to `static/`.
23
+
24
+ ### Breaking changes
25
+ - Removed integration installers
26
+ - Splitchunks enabled by default
27
+ - CSS extraction enabled by default, except when devServer is configured and running
28
+
29
+ ## [[5.4.3]](https://github.com/rails/webpacker/compare/v5.4.2...v5.4.3) - 2021-09-14
30
+
31
+ - Specify webpack-dev-server to be v3, to avoid getting webpack-dev-server v4 ([#3121](https://github.com/rails/webpacker/pull/3121))
32
+
33
+ ## [[5.4.2]](https://github.com/rails/webpacker/compare/v5.4.1...v5.4.2) - 2021-08-20
12
34
 
35
+ - Fix babel warning about private-methods in `@babel/plugin-proposal-private-property-in-object` as well ([67fa6edf](https://github.com/rails/webpacker/commit/67fa6edf697340cbd5a5518afebac871ef74769b)).
36
+
37
+ ## [[5.4.1]](https://github.com/rails/webpacker/compare/v5.4.0...v5.4.1) - 2021-08-20
38
+
39
+ - Update all dependencies within the same major version ([#3120](https://github.com/rails/webpacker/pull/3120))
40
+ - Fix babel warning about private-methods ([#3016](https://github.com/rails/webpacker/pull/3016))
41
+
42
+ ## [[5.4.0]](https://github.com/rails/webpacker/compare/v5.3.0...v5.4.0) - 2021-05-18
43
+
44
+ - Fix compatibility with Psych 4 ([ceaf826d](https://github.com/rails/webpacker/commit/ceaf826d84230aaadbefdbaaf560d474a96affcc))
45
+
46
+ ## [[5.3.0]](https://github.com/rails/webpacker/compare/v5.2.1...v5.3.0) - 2021-04-27
47
+
48
+ - Adds experimental Yarn 2 support. Note you must manually set `nodeLinker: node-modules` in your `.yarnrc.yml`.
13
49
  - Keep backups, even when they're old [#2912](https://github.com/rails/webpacker/pull/2912)
14
50
 
15
- ## [[5.2.2]](https://github.com/rails/webpacker/compare/v5.2.1...5.2.2) - 2021-04-27
51
+ ## [[5.2.2]](https://github.com/rails/webpacker/compare/v5.2.1...v5.2.2) - 2021-04-27
16
52
 
17
53
  - Bump deps and remove node-sass [#2997](https://github.com/rails/webpacker/pull/2997).
18
54
 
19
- ## [[5.2.1]](https://github.com/rails/webpacker/compare/v5.2.0...5.2.1) - 2020-08-17
55
+ ## [[5.2.1]](https://github.com/rails/webpacker/compare/v5.2.0...v5.2.1) - 2020-08-17
20
56
 
21
57
  - Revert [#1311](https://github.com/rails/webpacker/pull/1311).
22
58
 
23
- ## [[5.2.0]](https://github.com/rails/webpacker/compare/v5.1.1...5.2.0) - 2020-08-16
59
+ ## [[5.2.0]](https://github.com/rails/webpacker/compare/v5.1.1...v5.2.0) - 2020-08-16
24
60
 
25
61
  - Bump dependencies and fixes. See [diff](https://github.com/rails/webpacker/compare/v5.1.1...5-x-stable) for changes.
26
62
 
@@ -399,7 +435,7 @@ See changes: https://github.com/rails/webpacker/compare/e8b197e36c77181ca2e4765c
399
435
 
400
436
  ### Added
401
437
 
402
- - On CI, sort files & check modified w/ digest intead of mtime[#1522](https://github.com/rails/webpacker/pull/1522)
438
+ - On CI, sort files & check modified w/ digest instead of mtime[#1522](https://github.com/rails/webpacker/pull/1522)
403
439
 
404
440
  ## [3.5.3] - 2018-05-03
405
441
 
@@ -793,11 +829,11 @@ yarn add coffeescript
793
829
 
794
830
  ### Added
795
831
 
796
- - `resolved_paths` option to allow adding additional paths webpack should lookup when resolving modules
832
+ - `resolved_paths` option to allow adding additional paths webpack should look up when resolving modules
797
833
 
798
834
  ```yml
799
835
  # config/webpacker.yml
800
- # Additional paths webpack should lookup modules
836
+ # Additional paths webpack should look up modules
801
837
  resolved_paths: [] # empty by default
802
838
  ```
803
839
 
data/CONTRIBUTING.md CHANGED
@@ -3,31 +3,50 @@
3
3
  1. Install [Yarn](https://yarnpkg.com/)
4
4
 
5
5
  2. Run the following commands to set up the development environment.
6
+
6
7
  ```
7
8
  bundle install
8
9
  yarn
9
10
  ```
10
11
 
11
12
  ## Making sure your changes pass all tests
12
- There are a number of automated checks which run on Travis CI when a pull request is created.
13
+
14
+ There are a number of automated checks which run on GitHub Actions when a pull request is created.
15
+
13
16
  You can run those checks on your own locally to make sure that your changes would not break the CI build.
14
17
 
15
18
  ### 1. Check the code for JavaScript style violations
19
+
16
20
  ```
17
21
  yarn lint
18
22
  ```
19
23
 
20
24
  ### 2. Check the code for Ruby style violations
25
+
21
26
  ```
22
27
  bundle exec rubocop
23
28
  ```
24
29
 
25
30
  ### 3. Run the JavaScript test suite
31
+
26
32
  ```
27
33
  yarn test
28
34
  ```
29
35
 
30
36
  ### 4. Run the Ruby test suite
37
+
31
38
  ```
32
39
  bundle exec rake test
33
40
  ```
41
+
42
+ #### 4.1 Run a single ruby test file
43
+
44
+ ```
45
+ bundle exec rake test TEST=test/rake_tasks_test.rb
46
+ ```
47
+
48
+ #### 4.2 Run a single ruby test
49
+
50
+ ```
51
+ ruby -I test test/rake_tasks_test.rb -n test_rake_webpacker_install
52
+ ```
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpacker (5.4.0)
4
+ webpacker (6.0.0.rc.6)
5
5
  activesupport (>= 5.2)
6
6
  rack-proxy (>= 0.6.1)
7
7
  railties (>= 5.2)
@@ -10,60 +10,60 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.1.3.2)
14
- actionpack (= 6.1.3.2)
15
- activesupport (= 6.1.3.2)
13
+ actioncable (6.1.4.1)
14
+ actionpack (= 6.1.4.1)
15
+ activesupport (= 6.1.4.1)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
- actionmailbox (6.1.3.2)
19
- actionpack (= 6.1.3.2)
20
- activejob (= 6.1.3.2)
21
- activerecord (= 6.1.3.2)
22
- activestorage (= 6.1.3.2)
23
- activesupport (= 6.1.3.2)
18
+ actionmailbox (6.1.4.1)
19
+ actionpack (= 6.1.4.1)
20
+ activejob (= 6.1.4.1)
21
+ activerecord (= 6.1.4.1)
22
+ activestorage (= 6.1.4.1)
23
+ activesupport (= 6.1.4.1)
24
24
  mail (>= 2.7.1)
25
- actionmailer (6.1.3.2)
26
- actionpack (= 6.1.3.2)
27
- actionview (= 6.1.3.2)
28
- activejob (= 6.1.3.2)
29
- activesupport (= 6.1.3.2)
25
+ actionmailer (6.1.4.1)
26
+ actionpack (= 6.1.4.1)
27
+ actionview (= 6.1.4.1)
28
+ activejob (= 6.1.4.1)
29
+ activesupport (= 6.1.4.1)
30
30
  mail (~> 2.5, >= 2.5.4)
31
31
  rails-dom-testing (~> 2.0)
32
- actionpack (6.1.3.2)
33
- actionview (= 6.1.3.2)
34
- activesupport (= 6.1.3.2)
32
+ actionpack (6.1.4.1)
33
+ actionview (= 6.1.4.1)
34
+ activesupport (= 6.1.4.1)
35
35
  rack (~> 2.0, >= 2.0.9)
36
36
  rack-test (>= 0.6.3)
37
37
  rails-dom-testing (~> 2.0)
38
38
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
39
- actiontext (6.1.3.2)
40
- actionpack (= 6.1.3.2)
41
- activerecord (= 6.1.3.2)
42
- activestorage (= 6.1.3.2)
43
- activesupport (= 6.1.3.2)
39
+ actiontext (6.1.4.1)
40
+ actionpack (= 6.1.4.1)
41
+ activerecord (= 6.1.4.1)
42
+ activestorage (= 6.1.4.1)
43
+ activesupport (= 6.1.4.1)
44
44
  nokogiri (>= 1.8.5)
45
- actionview (6.1.3.2)
46
- activesupport (= 6.1.3.2)
45
+ actionview (6.1.4.1)
46
+ activesupport (= 6.1.4.1)
47
47
  builder (~> 3.1)
48
48
  erubi (~> 1.4)
49
49
  rails-dom-testing (~> 2.0)
50
50
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
51
- activejob (6.1.3.2)
52
- activesupport (= 6.1.3.2)
51
+ activejob (6.1.4.1)
52
+ activesupport (= 6.1.4.1)
53
53
  globalid (>= 0.3.6)
54
- activemodel (6.1.3.2)
55
- activesupport (= 6.1.3.2)
56
- activerecord (6.1.3.2)
57
- activemodel (= 6.1.3.2)
58
- activesupport (= 6.1.3.2)
59
- activestorage (6.1.3.2)
60
- actionpack (= 6.1.3.2)
61
- activejob (= 6.1.3.2)
62
- activerecord (= 6.1.3.2)
63
- activesupport (= 6.1.3.2)
54
+ activemodel (6.1.4.1)
55
+ activesupport (= 6.1.4.1)
56
+ activerecord (6.1.4.1)
57
+ activemodel (= 6.1.4.1)
58
+ activesupport (= 6.1.4.1)
59
+ activestorage (6.1.4.1)
60
+ actionpack (= 6.1.4.1)
61
+ activejob (= 6.1.4.1)
62
+ activerecord (= 6.1.4.1)
63
+ activesupport (= 6.1.4.1)
64
64
  marcel (~> 1.0.0)
65
- mini_mime (~> 1.0.2)
66
- activesupport (6.1.3.2)
65
+ mini_mime (>= 1.1.0)
66
+ activesupport (6.1.4.1)
67
67
  concurrent-ruby (~> 1.0, >= 1.0.2)
68
68
  i18n (>= 1.6, < 2)
69
69
  minitest (>= 5.1)
@@ -72,79 +72,79 @@ GEM
72
72
  ast (2.4.2)
73
73
  builder (3.2.4)
74
74
  byebug (11.1.3)
75
- concurrent-ruby (1.1.8)
75
+ concurrent-ruby (1.1.9)
76
76
  crass (1.0.6)
77
77
  erubi (1.10.0)
78
- globalid (0.4.2)
79
- activesupport (>= 4.2.0)
78
+ globalid (0.5.2)
79
+ activesupport (>= 5.0)
80
80
  i18n (1.8.10)
81
81
  concurrent-ruby (~> 1.0)
82
- loofah (2.9.1)
82
+ loofah (2.12.0)
83
83
  crass (~> 1.0.2)
84
84
  nokogiri (>= 1.5.9)
85
85
  mail (2.7.1)
86
86
  mini_mime (>= 0.1.1)
87
- marcel (1.0.1)
87
+ marcel (1.0.2)
88
88
  method_source (1.0.0)
89
- mini_mime (1.0.3)
90
- mini_portile2 (2.5.1)
89
+ mini_mime (1.1.1)
90
+ mini_portile2 (2.6.1)
91
91
  minitest (5.14.4)
92
- nio4r (2.5.7)
93
- nokogiri (1.11.4)
94
- mini_portile2 (~> 2.5.0)
92
+ nio4r (2.5.8)
93
+ nokogiri (1.12.4)
94
+ mini_portile2 (~> 2.6.1)
95
95
  racc (~> 1.4)
96
- parallel (1.20.1)
97
- parser (3.0.1.1)
96
+ parallel (1.21.0)
97
+ parser (3.0.2.0)
98
98
  ast (~> 2.4.1)
99
99
  racc (1.5.2)
100
100
  rack (2.2.3)
101
- rack-proxy (0.6.5)
101
+ rack-proxy (0.7.0)
102
102
  rack
103
103
  rack-test (1.1.0)
104
104
  rack (>= 1.0, < 3)
105
- rails (6.1.3.2)
106
- actioncable (= 6.1.3.2)
107
- actionmailbox (= 6.1.3.2)
108
- actionmailer (= 6.1.3.2)
109
- actionpack (= 6.1.3.2)
110
- actiontext (= 6.1.3.2)
111
- actionview (= 6.1.3.2)
112
- activejob (= 6.1.3.2)
113
- activemodel (= 6.1.3.2)
114
- activerecord (= 6.1.3.2)
115
- activestorage (= 6.1.3.2)
116
- activesupport (= 6.1.3.2)
105
+ rails (6.1.4.1)
106
+ actioncable (= 6.1.4.1)
107
+ actionmailbox (= 6.1.4.1)
108
+ actionmailer (= 6.1.4.1)
109
+ actionpack (= 6.1.4.1)
110
+ actiontext (= 6.1.4.1)
111
+ actionview (= 6.1.4.1)
112
+ activejob (= 6.1.4.1)
113
+ activemodel (= 6.1.4.1)
114
+ activerecord (= 6.1.4.1)
115
+ activestorage (= 6.1.4.1)
116
+ activesupport (= 6.1.4.1)
117
117
  bundler (>= 1.15.0)
118
- railties (= 6.1.3.2)
118
+ railties (= 6.1.4.1)
119
119
  sprockets-rails (>= 2.0.0)
120
120
  rails-dom-testing (2.0.3)
121
121
  activesupport (>= 4.2.0)
122
122
  nokogiri (>= 1.6)
123
- rails-html-sanitizer (1.3.0)
123
+ rails-html-sanitizer (1.4.2)
124
124
  loofah (~> 2.3)
125
- railties (6.1.3.2)
126
- actionpack (= 6.1.3.2)
127
- activesupport (= 6.1.3.2)
125
+ railties (6.1.4.1)
126
+ actionpack (= 6.1.4.1)
127
+ activesupport (= 6.1.4.1)
128
128
  method_source
129
- rake (>= 0.8.7)
129
+ rake (>= 0.13)
130
130
  thor (~> 1.0)
131
131
  rainbow (3.0.0)
132
- rake (13.0.3)
132
+ rake (13.0.6)
133
133
  regexp_parser (2.1.1)
134
134
  rexml (3.2.5)
135
- rubocop (0.93.1)
135
+ rubocop (1.21.0)
136
136
  parallel (~> 1.10)
137
- parser (>= 2.7.1.5)
137
+ parser (>= 3.0.0.0)
138
138
  rainbow (>= 2.2.2, < 4.0)
139
- regexp_parser (>= 1.8)
139
+ regexp_parser (>= 1.8, < 3.0)
140
140
  rexml
141
- rubocop-ast (>= 0.6.0)
141
+ rubocop-ast (>= 1.9.1, < 2.0)
142
142
  ruby-progressbar (~> 1.7)
143
- unicode-display_width (>= 1.4.0, < 2.0)
144
- rubocop-ast (1.5.0)
143
+ unicode-display_width (>= 1.4.0, < 3.0)
144
+ rubocop-ast (1.11.0)
145
145
  parser (>= 3.0.1.1)
146
- rubocop-performance (1.10.2)
147
- rubocop (>= 0.90.0, < 2.0)
146
+ rubocop-performance (1.11.5)
147
+ rubocop (>= 1.7.0, < 2.0)
148
148
  rubocop-ast (>= 0.4.0)
149
149
  ruby-progressbar (1.11.0)
150
150
  semantic_range (3.0.0)
@@ -158,8 +158,8 @@ GEM
158
158
  thor (1.1.0)
159
159
  tzinfo (2.0.4)
160
160
  concurrent-ruby (~> 1.0)
161
- unicode-display_width (1.7.0)
162
- websocket-driver (0.7.3)
161
+ unicode-display_width (2.1.0)
162
+ websocket-driver (0.7.5)
163
163
  websocket-extensions (>= 0.1.0)
164
164
  websocket-extensions (0.1.5)
165
165
  zeitwerk (2.4.2)
@@ -174,10 +174,10 @@ DEPENDENCIES
174
174
  rack-proxy
175
175
  rails
176
176
  rake (>= 11.1)
177
- rubocop (= 0.93.1)
177
+ rubocop
178
178
  rubocop-performance
179
179
  semantic_range
180
180
  webpacker!
181
181
 
182
182
  BUNDLED WITH
183
- 2.2.3
183
+ 2.2.30