jetpacker 0.4.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) 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 +58 -0
  7. data/.gitignore +1 -0
  8. data/.node-version +1 -1
  9. data/.rubocop.yml +113 -13
  10. data/.travis.yml +8 -21
  11. data/CHANGELOG.jetpacker.md +5 -0
  12. data/CHANGELOG.md +68 -2
  13. data/Gemfile +1 -0
  14. data/README.md +23 -649
  15. data/docs/css.md +58 -3
  16. data/docs/deployment.md +2 -2
  17. data/docs/docker.md +17 -17
  18. data/docs/engines.md +13 -0
  19. data/docs/env.md +0 -2
  20. data/docs/integrations.md +220 -0
  21. data/docs/target.md +22 -0
  22. data/docs/testing.md +2 -3
  23. data/docs/troubleshooting.md +3 -1
  24. data/docs/typescript.md +92 -28
  25. data/docs/webpack-dev-server.md +1 -1
  26. data/gemfiles/Gemfile-rails-edge +1 -1
  27. data/jetpacker.gemspec +4 -3
  28. data/lib/install/config/babel.config.js +13 -3
  29. data/lib/install/config/webpacker.yml +1 -4
  30. data/lib/install/examples/react/babel.config.js +12 -0
  31. data/lib/install/examples/react/tsconfig.json +2 -1
  32. data/lib/install/examples/typescript/tsconfig.json +2 -1
  33. data/lib/install/loaders/svelte.js +2 -2
  34. data/lib/install/template.rb +11 -3
  35. data/lib/install/typescript.rb +6 -2
  36. data/lib/jetpacker/version.rb +1 -1
  37. data/lib/tasks/webpacker/check_node.rake +15 -8
  38. data/lib/tasks/webpacker/check_yarn.rake +16 -10
  39. data/lib/tasks/webpacker/clean.rake +12 -8
  40. data/lib/tasks/webpacker/clobber.rake +8 -4
  41. data/lib/tasks/webpacker/yarn_install.rake +11 -16
  42. data/lib/webpacker/commands.rb +33 -9
  43. data/lib/webpacker/compiler.rb +9 -5
  44. data/lib/webpacker/configuration.rb +28 -13
  45. data/lib/webpacker/dev_server_proxy.rb +3 -1
  46. data/lib/webpacker/dev_server_runner.rb +2 -2
  47. data/lib/webpacker/env.rb +5 -1
  48. data/lib/webpacker/helper.rb +37 -18
  49. data/lib/webpacker/manifest.rb +4 -4
  50. data/lib/webpacker/railtie.rb +0 -43
  51. data/lib/webpacker/runner.rb +1 -0
  52. data/lib/webpacker/turbine.rb +0 -41
  53. data/lib/webpacker/version.rb +1 -1
  54. data/lib/webpacker/webpack_runner.rb +2 -2
  55. data/package/__tests__/config.js +12 -1
  56. data/package/__tests__/dev_server.js +2 -0
  57. data/package/__tests__/development.js +14 -1
  58. data/package/config.js +4 -1
  59. data/package/configPath.js +3 -0
  60. data/package/dev_server.js +1 -1
  61. data/package/env.js +1 -2
  62. data/package/environments/__tests__/base.js +29 -2
  63. data/package/environments/base.js +17 -7
  64. data/package/environments/development.js +39 -37
  65. data/package/environments/production.js +1 -3
  66. data/package/rules/babel.js +12 -5
  67. data/package/rules/file.js +3 -2
  68. data/package/rules/node_modules.js +1 -3
  69. data/package/rules/sass.js +10 -1
  70. data/package/utils/helpers.js +1 -1
  71. data/package.json +41 -41
  72. data/test/compiler_test.rb +8 -3
  73. data/test/configuration_test.rb +8 -7
  74. data/test/dev_server_runner_test.rb +1 -1
  75. data/test/helper_test.rb +24 -9
  76. data/test/manifest_test.rb +37 -6
  77. data/test/rake_tasks_test.rb +11 -0
  78. data/test/test_app/app/javascript/packs/multi_entry.css +4 -0
  79. data/test/test_app/app/javascript/packs/multi_entry.js +4 -0
  80. data/test/test_app/config/application.rb +0 -1
  81. data/test/test_app/config/webpacker.yml +7 -1
  82. data/test/test_app/public/packs/manifest.json +1 -0
  83. data/test/webpack_runner_test.rb +1 -1
  84. data/yarn.lock +3895 -3945
  85. metadata +35 -15
  86. data/Gemfile.lock +0 -171
  87. data/gemfiles/Gemfile-rails.4.2.x +0 -9
  88. data/gemfiles/Gemfile-rails.5.0.x +0 -9
  89. data/gemfiles/Gemfile-rails.5.1.x +0 -9
  90. data/lib/install/loaders/typescript.js +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df1221ad81b92c23d011cf87e4c16d1525da1f24ebdd2e92b9c88c9029834352
4
- data.tar.gz: e6c61fd899a868b081f65f2a46cecaa666d1e1a6ce4ac6f3c8a69a1562a51be2
3
+ metadata.gz: 3ef376547e26a82a74b3db3f483c830b57a3b89cdf9fa378704ae4251950bdf9
4
+ data.tar.gz: 2440c2040096006e6b5e23a2a3f9bb0162091cfb2fb564f24024cdd33a0e9b82
5
5
  SHA512:
6
- metadata.gz: e0ed831b2814182aa956bb6514efeecf23bd0438999e5dbd080e5e2521864e34fa0620e011d49696066db8ba0d73460ee354e7fc10b219a583e80e7466b74091
7
- data.tar.gz: cf2163df1d0f080341ecfe871cd220b495290309ec790d87bf9374bdf04353ed2510492fba3fbc8971f801155409d74db0e2b95a3dc40242a97c18b515e3248f
6
+ metadata.gz: 690b360e1613dfcb6d3365384339b58d64681c28cc0681b59c6de9366a5b2660504a9d3da12dd72841f947f3b6fd0e9d3b6b8bf1d00ce4a2c5a09948b9b8ece9
7
+ data.tar.gz: 36120b5f42350a51bfc9e2288513326ab70db8ec9bd869d285be351ab4cdbeb48ae5504c2c24b5a7b8970cd16eb74169e8b4a7a13b64e8a67320063a971e914f
data/.eslintrc.js CHANGED
@@ -1,14 +1,14 @@
1
1
  module.exports = {
2
- 'extends': 'airbnb',
3
- 'rules': {
2
+ extends: 'airbnb',
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,58 @@
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: 2.7
33
+ os: ubuntu-latest
34
+ gemfile: gemfiles/Gemfile-rails-edge
35
+ experimental: true
36
+
37
+ steps:
38
+ - uses: actions/checkout@v2
39
+ - uses: actions/cache@v2
40
+ with:
41
+ path: /home/runner/bundle
42
+ key: bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
43
+ restore-keys: |
44
+ bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-
45
+
46
+ - uses: ruby/setup-ruby@v1
47
+ with:
48
+ ruby-version: ${{ matrix.ruby }}
49
+
50
+ - name: Bundle install
51
+ run: |
52
+ gem install bundler -v 2.1.4
53
+ bundle config path /home/runner/bundle
54
+ bundle config --global gemfile ${{ matrix.gemfile }}
55
+ bundle install --jobs 4 --retry 3
56
+
57
+ - name: Ruby specs
58
+ run: bundle exec rake test
data/.gitignore CHANGED
@@ -9,3 +9,4 @@ yarn-error.log*
9
9
  .yarn-integrity
10
10
  /log
11
11
  gemfiles/*.lock
12
+ Gemfile.lock
data/.node-version CHANGED
@@ -1 +1 @@
1
- 8.16.0
1
+ 10.17.0
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
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
@@ -13,11 +13,6 @@ AllCops:
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
@@ -123,3 +118,108 @@ Layout/EndAlignment:
123
118
  # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
124
119
  Lint/RequireParentheses:
125
120
  Enabled: true
121
+
122
+ # Use `bind_call(obj, args, ...)` instead of `bind(obj).call(args, ...)`.
123
+ Performance/BindCall:
124
+ Enabled: true
125
+
126
+ # Use `caller(n..n)` instead of `caller`.
127
+ Performance/Caller:
128
+ Enabled: true
129
+
130
+ # Use `casecmp` for case comparison.
131
+ Performance/Casecmp:
132
+ Enabled: true
133
+
134
+ # Extract Array and Hash literals outside of loops into local variables or constants.
135
+ Performance/CollectionLiteralInLoop:
136
+ Enabled: true
137
+
138
+ # Prefer `sort_by(&:foo)` instead of `sort { |a, b| a.foo <=> b.foo }`.
139
+ Performance/CompareWithBlock:
140
+ Enabled: true
141
+
142
+ # Use `count` instead of `{select,find_all,filter,reject}...{size,count,length}`.
143
+ Performance/Count:
144
+ Enabled: true
145
+
146
+ # Use `delete_prefix` instead of `gsub`.
147
+ Performance/DeletePrefix:
148
+ Enabled: true
149
+
150
+ # Use `delete_suffix` instead of `gsub`.
151
+ Performance/DeleteSuffix:
152
+ Enabled: true
153
+
154
+ # Use `detect` instead of `select.first`, `find_all.first`, `filter.first`, `select.last`, `find_all.last`, and `filter.last`.
155
+ Performance/Detect:
156
+ Enabled: true
157
+
158
+ # Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
159
+ Performance/DoubleStartEndWith:
160
+ Enabled: true
161
+
162
+ # Use `end_with?` instead of a regex match anchored to the end of a string.
163
+ Performance/EndWith:
164
+ Enabled: true
165
+
166
+ # Do not compute the size of statically sized objects except in constants.
167
+ Performance/FixedSize:
168
+ Enabled: true
169
+
170
+ # Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1).
171
+ Performance/FlatMap:
172
+ Enabled: true
173
+
174
+ # Use `key?` or `value?` instead of `keys.include?` or `values.include?`.
175
+ Performance/InefficientHashSearch:
176
+ Enabled: true
177
+
178
+ # Use `Range#cover?` instead of `Range#include?` (or `Range#member?`).
179
+ Performance/RangeInclude:
180
+ Enabled: true
181
+
182
+ # Use `yield` instead of `block.call`.
183
+ Performance/RedundantBlockCall:
184
+ Enabled: true
185
+
186
+ # Use `=~` instead of `String#match` or `Regexp#match` in a context where the returned `MatchData` is not needed.
187
+ Performance/RedundantMatch:
188
+ Enabled: true
189
+
190
+ # Use Hash#[]=, rather than Hash#merge! with a single key-value pair.
191
+ Performance/RedundantMerge:
192
+ Enabled: true
193
+
194
+ # Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, `Regexp#===`, or `=~` when `MatchData` is not used.
195
+ Performance/RegexpMatch:
196
+ Enabled: true
197
+
198
+ # Use `reverse_each` instead of `reverse.each`.
199
+ Performance/ReverseEach:
200
+ Enabled: true
201
+
202
+ # Use `size` instead of `count` for counting the number of elements in `Array` and `Hash`.
203
+ Performance/Size:
204
+ Enabled: true
205
+
206
+ # Use `start_with?` instead of a regex match anchored to the beginning of a string.
207
+ Performance/StartWith:
208
+ Enabled: true
209
+
210
+ # Use `tr` instead of `gsub` when you are replacing the same number of characters.
211
+ # Use `delete` instead of `gsub` when you are deleting characters.
212
+ Performance/StringReplacement:
213
+ Enabled: true
214
+
215
+ # Checks for .times.map calls.
216
+ Performance/TimesMap:
217
+ Enabled: true
218
+
219
+ # Use unary plus to get an unfrozen string literal.
220
+ Performance/UnfreezeString:
221
+ Enabled: true
222
+
223
+ # Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.
224
+ Performance/UriDefaultParser:
225
+ Enabled: true
data/.travis.yml CHANGED
@@ -1,22 +1,15 @@
1
1
  language: ruby
2
2
  dist: xenial
3
3
  before_install:
4
- - gem install rubygems-update -v 3.0.6 && update_rubygems
5
- # Rails 4.2 doesn't support bundler 2.0, so we need to lock bundler to
6
- # v1.17.3. This is just for Ruby 2.5 which ships with bundler 2.x on Travis
7
- # CI while Ruby 2.6 does not.
8
- # https://github.com/travis-ci/travis-rubies/issues/57#issuecomment-458981237
9
- - yes | rvm @global do gem install bundler -v 1.17.3 || true
4
+ - gem install rubygems-update && update_rubygems
5
+ - yes | rvm @global do gem install bundler -v 2.1.4 || true
10
6
  rvm:
11
- - 2.3.8
12
- - 2.4.6
7
+ - 2.4.9
13
8
  - 2.5.5
14
- - 2.6.3
9
+ - 2.6.5
10
+ - 2.7.0
15
11
  - ruby-head
16
12
  gemfile:
17
- - gemfiles/Gemfile-rails.4.2.x
18
- - gemfiles/Gemfile-rails.5.0.x
19
- - gemfiles/Gemfile-rails.5.1.x
20
13
  - gemfiles/Gemfile-rails.5.2.x
21
14
  - gemfiles/Gemfile-rails.6.0.x
22
15
  - gemfiles/Gemfile-rails-edge
@@ -28,7 +21,7 @@ cache:
28
21
 
29
22
  install:
30
23
  - bundle install --jobs 3 --retry 3
31
- - nvm install 10
24
+ - nvm install 12
32
25
  - node -v
33
26
  - npm i -g yarn
34
27
  - yarn
@@ -42,15 +35,9 @@ matrix:
42
35
  - gemfile: gemfiles/Gemfile-rails-edge
43
36
  - rvm: ruby-head
44
37
  exclude:
45
- - rvm: 2.3.8
46
- gemfile: gemfiles/Gemfile-rails-edge
47
- - rvm: 2.4.6
38
+ - rvm: 2.4.9
48
39
  gemfile: gemfiles/Gemfile-rails-edge
49
40
  - rvm: 2.5.5
50
41
  gemfile: gemfiles/Gemfile-rails-edge
51
- - rvm: ruby-head
52
- gemfile: gemfiles/Gemfile-rails.4.2.x
53
- - rvm: 2.3.8
54
- gemfile: gemfiles/Gemfile-rails.6.0.x
55
- - rvm: 2.4.6
42
+ - rvm: 2.4.9
56
43
  gemfile: gemfiles/Gemfile-rails.6.0.x
@@ -3,6 +3,11 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.5.0]
7
+ - merge upstream webpacker v5.2.1
8
+ - jetpacker v0.5.x ~ webpacker v5.x
9
+ - fix turbine: yarn integrity check not longer done
10
+
6
11
  ## [0.4.2]
7
12
  - fix jets turbine
8
13
 
data/CHANGELOG.md CHANGED
@@ -2,6 +2,70 @@
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.2]](https://github.com/rails/webpacker/compare/v5.4.0...v5.4.1) - 2021-08-20
6
+
7
+ - Fix babel warning about private-methods in @babel/plugin-proposal-private-property-in-object as well.
8
+
9
+ ## [[5.4.1]](https://github.com/rails/webpacker/compare/v5.4.0...v5.4.1) - 2021-08-20
10
+
11
+ - Update all dependencies within the same major version (#3120)
12
+
13
+ - Fix babel warning about private-methods (#3016)
14
+
15
+ ## [[5.4.0]](https://github.com/rails/webpacker/compare/v5.3.0...v5.4.0) - 2021-05-18
16
+
17
+ - Fix compatibility with Psych 4
18
+
19
+ ## [[5.3.0]](https://github.com/rails/webpacker/compare/v5.2.1...v5.3.0) - 2021-04-27
20
+
21
+ - Adds experimental Yarn 2 support. Note you must manually set `nodeLinker: node-modules` in your `.yarnrc.yml`.
22
+
23
+ - Keep backups, even when they're old [#2912](https://github.com/rails/webpacker/pull/2912)
24
+
25
+ ## [[5.2.2]](https://github.com/rails/webpacker/compare/v5.2.1...v5.2.2) - 2021-04-27
26
+
27
+ - Bump deps and remove node-sass [#2997](https://github.com/rails/webpacker/pull/2997).
28
+
29
+ ## [[5.2.1]](https://github.com/rails/webpacker/compare/v5.2.0...v5.2.1) - 2020-08-17
30
+
31
+ - Revert [#1311](https://github.com/rails/webpacker/pull/1311).
32
+
33
+ ## [[5.2.0]](https://github.com/rails/webpacker/compare/v5.1.1...v5.2.0) - 2020-08-16
34
+
35
+ - Bump dependencies and fixes. See [diff](https://github.com/rails/webpacker/compare/v5.1.1...5-x-stable) for changes.
36
+
37
+ ## [[5.1.1]](https://github.com/rails/webpacker/compare/v5.1.0...v5.1.1) - 2020-04-20
38
+
39
+ - 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)
40
+
41
+ ## [[5.1.0]](https://github.com/rails/webpacker/compare/v5.0.1...v5.1.0) - 2020-04-19
42
+
43
+ - Remove yarn integrity check [#2518](https://github.com/rails/webpacker/pull/2518)
44
+ - Switch from ts-loader to babel-loader [#2449](https://github.com/rails/webpacker/pull/2449)
45
+ 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
46
+ - Resolve multi-word snakecase WEBPACKER_DEV_SERVER env values [#2528](https://github.com/rails/webpacker/pull/2528)
47
+
48
+ ## [[5.0.1]](https://github.com/rails/webpacker/compare/v5.0.0...v5.0.1) - 2020-03-22
49
+
50
+ - Upgrade deps and fix sass loader config options bug [#2508](https://github.com/rails/webpacker/pull/2508)
51
+
52
+ ## [[5.0.0]](https://github.com/rails/webpacker/compare/v4.2.2...v5.0.0) - 2020-03-22
53
+
54
+ - Bump minimum node version [#2428](https://github.com/rails/webpacker/pull/2428)
55
+ - Bump minimum ruby/rails version [#2415](https://github.com/rails/webpacker/pull/2415)
56
+ - Add support for multiple files per entry [#2476](https://github.com/rails/webpacker/pull/2476)
57
+
58
+ ```js
59
+ entry: {
60
+ home: ['./home.js', './home.scss'],
61
+ account: ['./account.js', './account.scss']
62
+ }
63
+ ```
64
+
65
+ You can now have two entry files with same names inside packs folder, `home.scss` and `home.js`
66
+
67
+ And, other minor fixes, please see a list of changes [here](https://github.com/rails/webpacker/compare/v4.2.2...v5.0.0)
68
+
5
69
  ## [[4.2.2]](https://github.com/rails/webpacker/compare/v4.2.1...v4.2.2) - 2019-12-09
6
70
 
7
71
  - Fixed issue with webpack clean task for nested assets [#2391](https://github.com/rails/webpacker/pull/2391)
@@ -293,7 +357,7 @@ const { environment } = require('@rails/webpacker')
293
357
  // Enable with default config
294
358
  environment.splitChunks()
295
359
  // Configure via a callback
296
- environment.splitChunks(config =>
360
+ environment.splitChunks((config) =>
297
361
  Object.assign({}, config, { optimization: { splitChunks: false } })
298
362
  )
299
363
  ```
@@ -617,7 +681,9 @@ environment.resolvedModules.append('vendor', 'vendor')
617
681
  ```js
618
682
  // Enable css modules with sass loader
619
683
  const sassLoader = environment.loaders.get('sass')
620
- const cssLoader = sassLoader.use.find(loader => loader.loader === 'css-loader')
684
+ const cssLoader = sassLoader.use.find(
685
+ (loader) => loader.loader === 'css-loader'
686
+ )
621
687
 
622
688
  cssLoader.options = Object.assign({}, cssLoader.options, {
623
689
  modules: true,
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ gemspec
5
5
  gem "rails"
6
6
  gem "rake", ">= 11.1"
7
7
  gem "rack-proxy", require: false
8
+ gem "semantic_range", require: false
8
9
 
9
10
  group :test do
10
11
  gem "minitest", "~> 5.0"