webpacker 5.1.0 → 6.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +8 -8
  3. data/.github/workflows/jest.yml +38 -0
  4. data/.github/workflows/js-lint.yml +39 -0
  5. data/.github/workflows/rubocop.yml +39 -0
  6. data/.github/workflows/ruby.yml +70 -0
  7. data/.gitignore +2 -0
  8. data/.node-version +1 -1
  9. data/.rubocop.yml +11 -16
  10. data/6_0_upgrade.md +43 -0
  11. data/CHANGELOG.md +42 -2
  12. data/CONTRIBUTING.md +1 -1
  13. data/Gemfile.lock +91 -85
  14. data/README.md +226 -113
  15. data/lib/install/config/webpack/base.js +3 -0
  16. data/lib/install/config/webpack/development.js +2 -2
  17. data/lib/install/config/webpack/production.js +2 -2
  18. data/lib/install/config/webpack/test.js +2 -2
  19. data/lib/install/config/webpacker.yml +9 -38
  20. data/lib/install/javascript/packs/application.css +9 -0
  21. data/lib/install/javascript/packs/application.js +3 -1
  22. data/lib/install/template.rb +33 -19
  23. data/lib/tasks/webpacker.rake +2 -11
  24. data/lib/tasks/webpacker/binstubs.rake +6 -4
  25. data/lib/tasks/webpacker/check_binstubs.rake +4 -4
  26. data/lib/tasks/webpacker/check_node.rake +1 -1
  27. data/lib/tasks/webpacker/check_yarn.rake +2 -3
  28. data/lib/tasks/webpacker/compile.rake +4 -2
  29. data/lib/tasks/webpacker/info.rake +12 -10
  30. data/lib/tasks/webpacker/install.rake +6 -4
  31. data/lib/tasks/webpacker/verify_install.rake +2 -1
  32. data/lib/tasks/webpacker/yarn_install.rake +9 -1
  33. data/lib/webpacker/commands.rb +1 -1
  34. data/lib/webpacker/compiler.rb +20 -8
  35. data/lib/webpacker/configuration.rb +7 -23
  36. data/lib/webpacker/dev_server_runner.rb +23 -4
  37. data/lib/webpacker/helper.rb +51 -42
  38. data/lib/webpacker/manifest.rb +1 -1
  39. data/lib/webpacker/runner.rb +1 -0
  40. data/lib/webpacker/version.rb +1 -1
  41. data/lib/webpacker/webpack_runner.rb +7 -2
  42. data/package.json +27 -43
  43. data/package/__tests__/config.js +6 -27
  44. data/package/__tests__/development.js +18 -7
  45. data/package/__tests__/env.js +12 -4
  46. data/package/__tests__/production.js +6 -6
  47. data/package/__tests__/staging.js +7 -6
  48. data/package/__tests__/test.js +4 -5
  49. data/package/babel/preset.js +55 -0
  50. data/package/config.js +4 -9
  51. data/package/configPath.js +3 -0
  52. data/package/env.js +9 -4
  53. data/package/environments/__tests__/base.js +21 -36
  54. data/package/environments/base.js +63 -127
  55. data/package/environments/development.js +46 -39
  56. data/package/environments/production.js +63 -70
  57. data/package/environments/test.js +2 -2
  58. data/package/index.js +13 -8
  59. data/package/rules/babel.js +19 -10
  60. data/package/rules/coffee.js +6 -0
  61. data/package/rules/erb.js +15 -0
  62. data/package/rules/file.js +17 -18
  63. data/package/rules/index.js +16 -18
  64. data/package/rules/less.js +22 -0
  65. data/package/rules/raw.js +5 -0
  66. data/package/rules/sass.js +13 -10
  67. data/package/rules/svg.js +20 -0
  68. data/package/utils/get_style_rule.js +26 -36
  69. data/package/utils/helpers.js +26 -35
  70. data/test/compiler_test.rb +4 -11
  71. data/test/configuration_test.rb +2 -32
  72. data/test/dev_server_runner_test.rb +25 -6
  73. data/test/engine_rake_tasks_test.rb +39 -0
  74. data/test/helper_test.rb +18 -9
  75. data/test/mounted_app/Rakefile +4 -0
  76. data/test/mounted_app/test/dummy/Rakefile +3 -0
  77. data/test/mounted_app/test/dummy/bin/rails +3 -0
  78. data/test/mounted_app/test/dummy/bin/rake +3 -0
  79. data/test/mounted_app/test/dummy/config.ru +5 -0
  80. data/test/mounted_app/test/dummy/config/application.rb +10 -0
  81. data/test/mounted_app/test/dummy/config/environment.rb +3 -0
  82. data/test/mounted_app/test/dummy/config/webpacker.yml +75 -0
  83. data/test/mounted_app/test/dummy/package.json +7 -0
  84. data/test/rake_tasks_test.rb +1 -10
  85. data/test/test_app/config/webpacker.yml +3 -21
  86. data/test/test_app/config/webpacker_public_root.yml +0 -1
  87. data/test/test_app/public/packs/manifest.json +18 -13
  88. data/test/test_app/some.config.js +0 -0
  89. data/test/webpack_runner_test.rb +10 -4
  90. data/webpacker.gemspec +1 -1
  91. data/yarn.lock +2657 -6224
  92. metadata +50 -89
  93. data/.travis.yml +0 -43
  94. data/docs/assets.md +0 -119
  95. data/docs/cloud9.md +0 -310
  96. data/docs/css.md +0 -253
  97. data/docs/deployment.md +0 -130
  98. data/docs/docker.md +0 -68
  99. data/docs/engines.md +0 -213
  100. data/docs/env.md +0 -63
  101. data/docs/es6.md +0 -72
  102. data/docs/folder-structure.md +0 -66
  103. data/docs/integrations.md +0 -220
  104. data/docs/misc.md +0 -23
  105. data/docs/props.md +0 -223
  106. data/docs/testing.md +0 -136
  107. data/docs/troubleshooting.md +0 -156
  108. data/docs/typescript.md +0 -109
  109. data/docs/v4-upgrade.md +0 -142
  110. data/docs/webpack-dev-server.md +0 -92
  111. data/docs/webpack.md +0 -364
  112. data/docs/yarn.md +0 -23
  113. data/lib/install/angular.rb +0 -23
  114. data/lib/install/coffee.rb +0 -25
  115. data/lib/install/config/.browserslistrc +0 -1
  116. data/lib/install/config/babel.config.js +0 -72
  117. data/lib/install/config/postcss.config.js +0 -12
  118. data/lib/install/config/webpack/environment.js +0 -3
  119. data/lib/install/elm.rb +0 -39
  120. data/lib/install/erb.rb +0 -25
  121. data/lib/install/examples/angular/hello_angular.js +0 -7
  122. data/lib/install/examples/angular/hello_angular/app/app.component.ts +0 -9
  123. data/lib/install/examples/angular/hello_angular/app/app.module.ts +0 -16
  124. data/lib/install/examples/angular/hello_angular/index.ts +0 -8
  125. data/lib/install/examples/angular/hello_angular/polyfills.ts +0 -73
  126. data/lib/install/examples/coffee/hello_coffee.coffee +0 -4
  127. data/lib/install/examples/elm/Main.elm +0 -55
  128. data/lib/install/examples/elm/hello_elm.js +0 -16
  129. data/lib/install/examples/erb/hello_erb.js.erb +0 -6
  130. data/lib/install/examples/react/babel.config.js +0 -87
  131. data/lib/install/examples/react/hello_react.jsx +0 -26
  132. data/lib/install/examples/react/tsconfig.json +0 -21
  133. data/lib/install/examples/stimulus/application.js +0 -1
  134. data/lib/install/examples/stimulus/controllers/hello_controller.js +0 -18
  135. data/lib/install/examples/stimulus/controllers/index.js +0 -9
  136. data/lib/install/examples/svelte/app.svelte +0 -11
  137. data/lib/install/examples/svelte/hello_svelte.js +0 -20
  138. data/lib/install/examples/typescript/hello_typescript.ts +0 -4
  139. data/lib/install/examples/typescript/tsconfig.json +0 -24
  140. data/lib/install/examples/vue/app.vue +0 -22
  141. data/lib/install/examples/vue/hello_vue.js +0 -72
  142. data/lib/install/loaders/coffee.js +0 -6
  143. data/lib/install/loaders/elm.js +0 -25
  144. data/lib/install/loaders/erb.js +0 -11
  145. data/lib/install/loaders/svelte.js +0 -9
  146. data/lib/install/loaders/vue.js +0 -6
  147. data/lib/install/react.rb +0 -18
  148. data/lib/install/stimulus.rb +0 -12
  149. data/lib/install/svelte.rb +0 -29
  150. data/lib/install/typescript.rb +0 -42
  151. data/lib/install/vue.rb +0 -49
  152. data/lib/tasks/installers.rake +0 -42
  153. data/package/config_types/__tests__/config_list.js +0 -118
  154. data/package/config_types/__tests__/config_object.js +0 -43
  155. data/package/config_types/config_list.js +0 -75
  156. data/package/config_types/config_object.js +0 -55
  157. data/package/config_types/index.js +0 -7
  158. data/package/rules/module.css.js +0 -3
  159. data/package/rules/module.sass.js +0 -8
  160. data/package/rules/node_modules.js +0 -24
  161. data/package/utils/__tests__/deep_assign.js +0 -32
  162. data/package/utils/__tests__/deep_merge.js +0 -10
  163. data/package/utils/__tests__/get_style_rule.js +0 -65
  164. data/package/utils/__tests__/objectify.js +0 -9
  165. data/package/utils/deep_assign.js +0 -22
  166. data/package/utils/deep_merge.js +0 -22
  167. data/package/utils/objectify.js +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f40a6c8d18cf109b9dcd47ffcd683eed4937e7a270d4b7012bbe19ef7c949801
4
- data.tar.gz: be53580b891326ee7001338bc4a74304055910cb504f1cacf1f10315bb02287c
3
+ metadata.gz: a6443ddc11bf717fe1987306bc46527edf1692dfdc8bb3b827a8918a5e81b89b
4
+ data.tar.gz: 9dd83b7b25ee965abe951b86e3529797ef8f51e7dd5e3b94011f4d781adfab8c
5
5
  SHA512:
6
- metadata.gz: de6712a73fdcfa58bcfd45928884e252dbc1ab17f8caaa3c8494d8dd90e505070b160e182bb74ae3afac6fc14560fa38c72436c997a5cb0df054b4df3ff0d5e1
7
- data.tar.gz: 11cc1597eaa0a29581670ceb03c3c30b3aabe509d272563e285eac57c04d9eba0dd4db991834074fc180df07294cabd9d06ded3179f79b6960070ccfccf0c61c
6
+ metadata.gz: 64209399bfb645bb325799c6f4267e78439d59481983a5906888203cdec03034bb592dc226d93da70f56b5567337a4cf91352a85d1dfc0e386fdceea8ef1ecb9
7
+ data.tar.gz: 296d7238ffb6ad997ed71730304aeb34330610ccd2ec4f0838d3fbbec0bf4d39a0131b1f3fc2a9779c0a51e161f4a7952974ee04b47ca7edab9a6f2a9a5aa651
@@ -1,14 +1,14 @@
1
1
  module.exports = {
2
- 'extends': 'airbnb',
3
- 'rules': {
2
+ extends: ['airbnb', 'prettier'],
3
+ rules: {
4
4
  'comma-dangle': ['error', 'never'],
5
5
  'import/no-unresolved': 'off',
6
6
  'import/no-extraneous-dependencies': 'off',
7
7
  'import/extensions': 'off',
8
- semi: ['error', 'never'],
8
+ semi: ['error', 'never']
9
9
  },
10
- 'env': {
11
- 'browser': true,
12
- 'node': true,
13
- },
14
- };
10
+ env: {
11
+ browser: true,
12
+ node: true
13
+ }
14
+ }
@@ -0,0 +1,38 @@
1
+ name: Jest specs
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: Jest specs
8
+ strategy:
9
+ matrix:
10
+ os: [ubuntu-latest]
11
+ node: [10.x, 12.x, 14.x]
12
+
13
+ runs-on: ${{ matrix.os }}
14
+
15
+ steps:
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
+ - name: Use Node.js ${{ matrix.node }}
30
+ uses: actions/setup-node@v1
31
+ with:
32
+ node-version: ${{ matrix.node }}
33
+
34
+ - name: Install dependencies
35
+ run: yarn --frozen-lockfile
36
+
37
+ - name: Jest Specs
38
+ run: yarn test
@@ -0,0 +1,39 @@
1
+ name: JS lint
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: JS Lint
8
+
9
+ strategy:
10
+ matrix:
11
+ os: [ubuntu-latest]
12
+ node: [12.x]
13
+
14
+ runs-on: ${{ matrix.os }}
15
+
16
+ steps:
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
+ - name: Use Node.js ${{ matrix.node }}
31
+ uses: actions/setup-node@v1
32
+ with:
33
+ node-version: ${{ matrix.node }}
34
+
35
+ - name: Install dependencies
36
+ run: yarn --frozen-lockfile
37
+
38
+ - name: Lint
39
+ run: yarn lint
@@ -0,0 +1,39 @@
1
+ name: Rubocop
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: Rubocop
8
+ runs-on: ${{ matrix.os }}
9
+ env:
10
+ BUNDLE_JOBS: 4
11
+ BUNDLE_RETRY: 3
12
+ strategy:
13
+ matrix:
14
+ os: [ubuntu-latest]
15
+ ruby: [
16
+ 2.7
17
+ ]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - uses: actions/cache@v2
22
+ with:
23
+ path: /home/runner/bundle
24
+ key: bundle-use-ruby-gems-${{ hashFiles('**/Gemfile.lock') }}
25
+ restore-keys: |
26
+ bundle-use-ruby-gems-
27
+
28
+ - uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+
32
+ - name: Bundle install
33
+ run: |
34
+ gem install bundler -v 2.1.4
35
+ bundle config path /home/runner/bundle
36
+ bundle install
37
+
38
+ - name: Ruby linter
39
+ run: bundle exec rubocop
@@ -0,0 +1,70 @@
1
+ name: Ruby specs
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: Ruby specs
8
+ runs-on: ${{ matrix.os }}
9
+ continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' || matrix.experimental }}
10
+ env:
11
+ BUNDLE_JOBS: 4
12
+ BUNDLE_RETRY: 3
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ 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
+ ]
27
+ exclude:
28
+ - ruby: "2.4"
29
+ gemfile: gemfiles/Gemfile-rails.6.0.x
30
+ experimental: [false]
31
+ include:
32
+ - ruby: head
33
+ os: ubuntu-latest
34
+ gemfile: gemfiles/Gemfile-rails.6.0.x
35
+ experimental: true
36
+ - ruby: head
37
+ os: ubuntu-latest
38
+ gemfile: gemfiles/Gemfile-rails-edge
39
+ experimental: true
40
+ - ruby: 2.6
41
+ os: ubuntu-latest
42
+ gemfile: gemfiles/Gemfile-rails-edge
43
+ experimental: true
44
+ - ruby: 2.7
45
+ os: ubuntu-latest
46
+ gemfile: gemfiles/Gemfile-rails-edge
47
+ experimental: true
48
+
49
+ steps:
50
+ - uses: actions/checkout@v2
51
+ - uses: actions/cache@v2
52
+ with:
53
+ path: /home/runner/bundle
54
+ key: bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
55
+ restore-keys: |
56
+ bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-
57
+
58
+ - uses: ruby/setup-ruby@v1
59
+ with:
60
+ ruby-version: ${{ matrix.ruby }}
61
+
62
+ - name: Bundle install
63
+ run: |
64
+ gem install bundler -v 2.1.4
65
+ bundle config path /home/runner/bundle
66
+ bundle config --global gemfile ${{ matrix.gemfile }}
67
+ bundle install --jobs 4 --retry 3
68
+
69
+ - name: Ruby specs
70
+ run: bundle exec rake test
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
@@ -1 +1 @@
1
- 10.13.0
1
+ 10.22.1
@@ -1,23 +1,18 @@
1
1
  require: rubocop-performance
2
2
  AllCops:
3
- TargetRubyVersion: 2.2
3
+ TargetRubyVersion: 2.4
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
11
 
12
12
  # Prefer &&/|| over and/or.
13
13
  Style/AndOr:
14
14
  Enabled: true
15
15
 
16
- # Do not use braces for hash literals when they are the last argument of a
17
- # method call.
18
- Style/BracesAroundHashParameters:
19
- Enabled: true
20
-
21
16
  # Align `when` with `case`.
22
17
  Layout/CaseIndentation:
23
18
  Enabled: true
@@ -50,7 +45,11 @@ Style/HashSyntax:
50
45
  # extra level of indentation.
51
46
  Layout/IndentationConsistency:
52
47
  Enabled: true
53
- EnforcedStyle: rails
48
+ EnforcedStyle: indented_internal_methods
49
+
50
+ # Detect hard tabs, no hard tabs.
51
+ Layout/IndentationStyle:
52
+ Enabled: true
54
53
 
55
54
  # Two spaces, no tabs (for indentation).
56
55
  Layout/IndentationWidth:
@@ -98,12 +97,8 @@ Style/StringLiterals:
98
97
  Enabled: true
99
98
  EnforcedStyle: double_quotes
100
99
 
101
- # Detect hard tabs, no hard tabs.
102
- Layout/Tab:
103
- Enabled: true
104
-
105
100
  # Blank lines should not have any spaces.
106
- Layout/TrailingBlankLines:
101
+ Layout/TrailingEmptyLines:
107
102
  Enabled: true
108
103
 
109
104
  # No trailing whitespace.
@@ -111,7 +106,7 @@ Layout/TrailingWhitespace:
111
106
  Enabled: true
112
107
 
113
108
  # Use quotes for string literals when they are enough.
114
- Style/UnneededPercentQ:
109
+ Style/RedundantPercentQ:
115
110
  Enabled: true
116
111
 
117
112
  # Align `end` with the matching keyword or starting expression except for
@@ -0,0 +1,43 @@
1
+ # To webpacker v6 from v5
2
+
3
+ This guide aims to help you migrating to webpacker 6. If you are using
4
+ vanilla webpacker install then hopefully, the upgrade should be really
5
+ straightforward.
6
+
7
+ ## Preparation
8
+
9
+ - Rename `config/webpack` to `config/webpack_old`
10
+ - Rename `config/webpacker.yml` to `config/webpacker_old.yml`
11
+ - Upgrade webpacker
12
+
13
+ ```ruby
14
+ # Gemfile
15
+ gem 'webpacker', '~> 6.x'
16
+ ```
17
+
18
+ ```
19
+ bundle
20
+ ```
21
+
22
+ ```bash
23
+ yarn add @rails/webpacker@next
24
+ ```
25
+
26
+ ```bash
27
+ bundle exec rails webpacker:install
28
+ ```
29
+
30
+ - Change `javascript_pack_tag` and `stylesheet_pack_tag` to `javascript_packs_with_chunks_tag` and
31
+ `stylesheet_packs_with_chunks_tag`
32
+
33
+ - If you are using any integrations like css, react or typescript. Please see https://github.com/rails/webpacker#integrations section on how they work in v6.0
34
+
35
+ - Copy over any custom webpack config from `config/webpack_old`
36
+
37
+ ```js
38
+ // config/webpack/base.js
39
+ const { webpackConfig, merge } = require('@rails/webpacker')
40
+ const customConfig = require('./custom')
41
+
42
+ module.exports = merge(webpackConfig, customConfig)
43
+ ```
@@ -2,10 +2,48 @@
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
+ ## [[6.0.0]](https://github.com/rails/webpacker/compare/v5.1.1...master) - 2021-TBD
6
+
7
+ - `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:
8
+
9
+ ```js
10
+ const nodeModules = require('@rails/webpacker/rules/node_modules.js')
11
+ environment.loaders.append('nodeModules', nodeModules)
12
+ ```
13
+
14
+ - 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`).
15
+ - The install task will now set the `extract_css` default to `true` in all environments and 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)
16
+ - 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).
17
+ - Changes `@babel/preset-env` modules option to `'auto'` per recommendation in the Babel docs [#2709](https://github.com/rails/webpacker/pull/2709)
18
+ - Adds experimental Yarn 2 support. Note you must manually set `nodeLinker: node-modules` in your `.yarnrc.yml`.
19
+
20
+ ### Breaking changes
21
+
22
+ - Simple webpack config
23
+ - Removed integration installers
24
+ - Splitchunks enabled by default
25
+ - CSS extraction enabled by default
26
+ - Optional CSS support
27
+
28
+ Please see upgrade [guide](./6_0_upgrade.md)
29
+
30
+ ## [[5.2.1]](https://github.com/rails/webpacker/compare/v5.2.0...5.2.1) - 2020-08-17
31
+
32
+ - Revert [#1311](https://github.com/rails/webpacker/pull/1311).
33
+
34
+ ## [[5.2.0]](https://github.com/rails/webpacker/compare/v5.1.1...5.2.0) - 2020-08-16
35
+
36
+ - Bump dependencies and fixes. See [diff](https://github.com/rails/webpacker/compare/v5.1.1...5-x-stable) for changes.
37
+
38
+ ## [[5.1.1]](https://github.com/rails/webpacker/compare/v5.1.0...v5.1.1) - 2020-04-20
39
+
40
+ - Update [TypeScript documentation](https://github.com/rails/webpacker/blob/master/docs/typescript.md) and installer to use babel-loader for typescript.[(#2541](https://github.com/rails/webpacker/pull/2541)
41
+
5
42
  ## [[5.1.0]](https://github.com/rails/webpacker/compare/v5.0.1...v5.1.0) - 2020-04-19
6
43
 
7
44
  - Remove yarn integrity check [#2518](https://github.com/rails/webpacker/pull/2518)
8
45
  - Switch from ts-loader to babel-loader [#2449](https://github.com/rails/webpacker/pull/2449)
46
+ Please see the [TypeScript documentation](https://github.com/rails/webpacker/blob/master/docs/typescript.md) to upgrade existing projects to use typescript with 5.1
9
47
  - Resolve multi-word snakecase WEBPACKER_DEV_SERVER env values [#2528](https://github.com/rails/webpacker/pull/2528)
10
48
 
11
49
  ## [[5.0.1]](https://github.com/rails/webpacker/compare/v5.0.0...v5.0.1) - 2020-03-22
@@ -320,7 +358,7 @@ const { environment } = require('@rails/webpacker')
320
358
  // Enable with default config
321
359
  environment.splitChunks()
322
360
  // Configure via a callback
323
- environment.splitChunks(config =>
361
+ environment.splitChunks((config) =>
324
362
  Object.assign({}, config, { optimization: { splitChunks: false } })
325
363
  )
326
364
  ```
@@ -644,7 +682,9 @@ environment.resolvedModules.append('vendor', 'vendor')
644
682
  ```js
645
683
  // Enable css modules with sass loader
646
684
  const sassLoader = environment.loaders.get('sass')
647
- const cssLoader = sassLoader.use.find(loader => loader.loader === 'css-loader')
685
+ const cssLoader = sassLoader.use.find(
686
+ (loader) => loader.loader === 'css-loader'
687
+ )
648
688
 
649
689
  cssLoader.options = Object.assign({}, cssLoader.options, {
650
690
  modules: true,
@@ -9,7 +9,7 @@ yarn
9
9
  ```
10
10
 
11
11
  ## 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.
12
+ There are a number of automated checks which run on Github Actions when a pull request is created.
13
13
  You can run those checks on your own locally to make sure that your changes would not break the CI build.
14
14
 
15
15
  ### 1. Check the code for JavaScript style violations
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpacker (5.1.0)
4
+ webpacker (6.0.0.beta.1)
5
5
  activesupport (>= 5.2)
6
6
  rack-proxy (>= 0.6.1)
7
7
  railties (>= 5.2)
@@ -10,150 +10,156 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.0.1)
14
- actionpack (= 6.0.1)
13
+ actioncable (6.0.3.2)
14
+ actionpack (= 6.0.3.2)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.1)
18
- actionpack (= 6.0.1)
19
- activejob (= 6.0.1)
20
- activerecord (= 6.0.1)
21
- activestorage (= 6.0.1)
22
- activesupport (= 6.0.1)
17
+ actionmailbox (6.0.3.2)
18
+ actionpack (= 6.0.3.2)
19
+ activejob (= 6.0.3.2)
20
+ activerecord (= 6.0.3.2)
21
+ activestorage (= 6.0.3.2)
22
+ activesupport (= 6.0.3.2)
23
23
  mail (>= 2.7.1)
24
- actionmailer (6.0.1)
25
- actionpack (= 6.0.1)
26
- actionview (= 6.0.1)
27
- activejob (= 6.0.1)
24
+ actionmailer (6.0.3.2)
25
+ actionpack (= 6.0.3.2)
26
+ actionview (= 6.0.3.2)
27
+ activejob (= 6.0.3.2)
28
28
  mail (~> 2.5, >= 2.5.4)
29
29
  rails-dom-testing (~> 2.0)
30
- actionpack (6.0.1)
31
- actionview (= 6.0.1)
32
- activesupport (= 6.0.1)
33
- rack (~> 2.0)
30
+ actionpack (6.0.3.2)
31
+ actionview (= 6.0.3.2)
32
+ activesupport (= 6.0.3.2)
33
+ rack (~> 2.0, >= 2.0.8)
34
34
  rack-test (>= 0.6.3)
35
35
  rails-dom-testing (~> 2.0)
36
36
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.1)
38
- actionpack (= 6.0.1)
39
- activerecord (= 6.0.1)
40
- activestorage (= 6.0.1)
41
- activesupport (= 6.0.1)
37
+ actiontext (6.0.3.2)
38
+ actionpack (= 6.0.3.2)
39
+ activerecord (= 6.0.3.2)
40
+ activestorage (= 6.0.3.2)
41
+ activesupport (= 6.0.3.2)
42
42
  nokogiri (>= 1.8.5)
43
- actionview (6.0.1)
44
- activesupport (= 6.0.1)
43
+ actionview (6.0.3.2)
44
+ activesupport (= 6.0.3.2)
45
45
  builder (~> 3.1)
46
46
  erubi (~> 1.4)
47
47
  rails-dom-testing (~> 2.0)
48
48
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.1)
50
- activesupport (= 6.0.1)
49
+ activejob (6.0.3.2)
50
+ activesupport (= 6.0.3.2)
51
51
  globalid (>= 0.3.6)
52
- activemodel (6.0.1)
53
- activesupport (= 6.0.1)
54
- activerecord (6.0.1)
55
- activemodel (= 6.0.1)
56
- activesupport (= 6.0.1)
57
- activestorage (6.0.1)
58
- actionpack (= 6.0.1)
59
- activejob (= 6.0.1)
60
- activerecord (= 6.0.1)
52
+ activemodel (6.0.3.2)
53
+ activesupport (= 6.0.3.2)
54
+ activerecord (6.0.3.2)
55
+ activemodel (= 6.0.3.2)
56
+ activesupport (= 6.0.3.2)
57
+ activestorage (6.0.3.2)
58
+ actionpack (= 6.0.3.2)
59
+ activejob (= 6.0.3.2)
60
+ activerecord (= 6.0.3.2)
61
61
  marcel (~> 0.3.1)
62
- activesupport (6.0.1)
62
+ activesupport (6.0.3.2)
63
63
  concurrent-ruby (~> 1.0, >= 1.0.2)
64
64
  i18n (>= 0.7, < 2)
65
65
  minitest (~> 5.1)
66
66
  tzinfo (~> 1.1)
67
- zeitwerk (~> 2.2)
68
- ast (2.4.0)
69
- builder (3.2.3)
70
- byebug (11.0.1)
71
- concurrent-ruby (1.1.5)
72
- crass (1.0.5)
67
+ zeitwerk (~> 2.2, >= 2.2.2)
68
+ ast (2.4.1)
69
+ builder (3.2.4)
70
+ byebug (11.1.3)
71
+ concurrent-ruby (1.1.6)
72
+ crass (1.0.6)
73
73
  erubi (1.9.0)
74
74
  globalid (0.4.2)
75
75
  activesupport (>= 4.2.0)
76
- i18n (1.7.0)
76
+ i18n (1.8.5)
77
77
  concurrent-ruby (~> 1.0)
78
- jaro_winkler (1.5.4)
79
- loofah (2.3.1)
78
+ loofah (2.6.0)
80
79
  crass (~> 1.0.2)
81
80
  nokogiri (>= 1.5.9)
82
81
  mail (2.7.1)
83
82
  mini_mime (>= 0.1.1)
84
83
  marcel (0.3.3)
85
84
  mimemagic (~> 0.3.2)
86
- method_source (0.9.2)
87
- mimemagic (0.3.3)
85
+ method_source (1.0.0)
86
+ mimemagic (0.3.5)
88
87
  mini_mime (1.0.2)
89
88
  mini_portile2 (2.4.0)
90
- minitest (5.13.0)
89
+ minitest (5.14.1)
91
90
  nio4r (2.5.2)
92
- nokogiri (1.10.8)
91
+ nokogiri (1.10.10)
93
92
  mini_portile2 (~> 2.4.0)
94
- parallel (1.18.0)
95
- parser (2.6.5.0)
96
- ast (~> 2.4.0)
97
- rack (2.0.8)
93
+ parallel (1.19.2)
94
+ parser (2.7.2.0)
95
+ ast (~> 2.4.1)
96
+ rack (2.2.3)
98
97
  rack-proxy (0.6.5)
99
98
  rack
100
99
  rack-test (1.1.0)
101
100
  rack (>= 1.0, < 3)
102
- rails (6.0.1)
103
- actioncable (= 6.0.1)
104
- actionmailbox (= 6.0.1)
105
- actionmailer (= 6.0.1)
106
- actionpack (= 6.0.1)
107
- actiontext (= 6.0.1)
108
- actionview (= 6.0.1)
109
- activejob (= 6.0.1)
110
- activemodel (= 6.0.1)
111
- activerecord (= 6.0.1)
112
- activestorage (= 6.0.1)
113
- activesupport (= 6.0.1)
101
+ rails (6.0.3.2)
102
+ actioncable (= 6.0.3.2)
103
+ actionmailbox (= 6.0.3.2)
104
+ actionmailer (= 6.0.3.2)
105
+ actionpack (= 6.0.3.2)
106
+ actiontext (= 6.0.3.2)
107
+ actionview (= 6.0.3.2)
108
+ activejob (= 6.0.3.2)
109
+ activemodel (= 6.0.3.2)
110
+ activerecord (= 6.0.3.2)
111
+ activestorage (= 6.0.3.2)
112
+ activesupport (= 6.0.3.2)
114
113
  bundler (>= 1.3.0)
115
- railties (= 6.0.1)
114
+ railties (= 6.0.3.2)
116
115
  sprockets-rails (>= 2.0.0)
117
116
  rails-dom-testing (2.0.3)
118
117
  activesupport (>= 4.2.0)
119
118
  nokogiri (>= 1.6)
120
119
  rails-html-sanitizer (1.3.0)
121
120
  loofah (~> 2.3)
122
- railties (6.0.1)
123
- actionpack (= 6.0.1)
124
- activesupport (= 6.0.1)
121
+ railties (6.0.3.2)
122
+ actionpack (= 6.0.3.2)
123
+ activesupport (= 6.0.3.2)
125
124
  method_source
126
125
  rake (>= 0.8.7)
127
126
  thor (>= 0.20.3, < 2.0)
128
127
  rainbow (3.0.0)
129
- rake (13.0.0)
130
- rubocop (0.68.1)
131
- jaro_winkler (~> 1.5.1)
128
+ rake (13.0.1)
129
+ regexp_parser (1.8.2)
130
+ rexml (3.2.4)
131
+ rubocop (0.93.1)
132
132
  parallel (~> 1.10)
133
- parser (>= 2.5, != 2.5.1.1)
133
+ parser (>= 2.7.1.5)
134
134
  rainbow (>= 2.2.2, < 4.0)
135
+ regexp_parser (>= 1.8)
136
+ rexml
137
+ rubocop-ast (>= 0.6.0)
135
138
  ruby-progressbar (~> 1.7)
136
- unicode-display_width (>= 1.4.0, < 1.6)
137
- rubocop-performance (1.3.0)
138
- rubocop (>= 0.68.0)
139
+ unicode-display_width (>= 1.4.0, < 2.0)
140
+ rubocop-ast (0.8.0)
141
+ parser (>= 2.7.1.5)
142
+ rubocop-performance (1.8.1)
143
+ rubocop (>= 0.87.0)
144
+ rubocop-ast (>= 0.4.0)
139
145
  ruby-progressbar (1.10.1)
140
146
  semantic_range (2.3.0)
141
- sprockets (4.0.0)
147
+ sprockets (4.0.2)
142
148
  concurrent-ruby (~> 1.0)
143
149
  rack (> 1, < 3)
144
150
  sprockets-rails (3.2.1)
145
151
  actionpack (>= 4.0)
146
152
  activesupport (>= 4.0)
147
153
  sprockets (>= 3.0.0)
148
- thor (0.20.3)
154
+ thor (1.0.1)
149
155
  thread_safe (0.3.6)
150
- tzinfo (1.2.5)
156
+ tzinfo (1.2.7)
151
157
  thread_safe (~> 0.1)
152
- unicode-display_width (1.5.0)
153
- websocket-driver (0.7.1)
158
+ unicode-display_width (1.7.0)
159
+ websocket-driver (0.7.3)
154
160
  websocket-extensions (>= 0.1.0)
155
- websocket-extensions (0.1.4)
156
- zeitwerk (2.2.1)
161
+ websocket-extensions (0.1.5)
162
+ zeitwerk (2.4.0)
157
163
 
158
164
  PLATFORMS
159
165
  ruby
@@ -165,10 +171,10 @@ DEPENDENCIES
165
171
  rack-proxy
166
172
  rails
167
173
  rake (>= 11.1)
168
- rubocop (< 0.69)
174
+ rubocop (= 0.93.1)
169
175
  rubocop-performance
170
176
  semantic_range
171
177
  webpacker!
172
178
 
173
179
  BUNDLED WITH
174
- 1.17.3
180
+ 2.1.4