shakapacker 7.3.0.beta.1 → 8.0.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintignore +1 -1
- data/.eslintrc.js +29 -8
- data/.github/PULL_REQUEST_TEMPLATE.md +10 -3
- data/.github/workflows/dummy.yml +6 -1
- data/.github/workflows/generator.yml +14 -18
- data/.github/workflows/node.yml +56 -0
- data/.github/workflows/ruby.yml +29 -17
- data/.node-version +1 -1
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +56 -5
- data/README.md +101 -48
- data/Rakefile +1 -7
- data/docs/customizing_babel_config.md +2 -2
- data/docs/deployment.md +13 -6
- data/docs/react.md +7 -13
- data/docs/troubleshooting.md +4 -4
- data/docs/using_esbuild_loader.md +1 -1
- data/docs/using_swc_loader.md +1 -1
- data/docs/v6_upgrade.md +1 -1
- data/docs/v8_upgrade.md +148 -0
- data/gemfiles/Gemfile-rails.7.1.x +12 -0
- data/jest.config.js +4 -0
- data/lib/install/config/shakapacker.yml +2 -2
- data/lib/install/template.rb +36 -30
- data/lib/shakapacker/base_strategy.rb +2 -1
- data/lib/shakapacker/compiler.rb +6 -21
- data/lib/shakapacker/configuration.rb +2 -46
- data/lib/shakapacker/deprecation_helper.rb +0 -78
- data/lib/shakapacker/dev_server.rb +1 -16
- data/lib/shakapacker/dev_server_runner.rb +2 -21
- data/lib/shakapacker/env.rb +1 -1
- data/lib/shakapacker/helper.rb +3 -3
- data/lib/shakapacker/instance.rb +1 -3
- data/lib/shakapacker/manifest.rb +1 -1
- data/lib/shakapacker/railtie.rb +7 -0
- data/lib/shakapacker/runner.rb +4 -18
- data/lib/shakapacker/utils/manager.rb +58 -0
- data/lib/shakapacker/utils/misc.rb +0 -12
- data/lib/shakapacker/version.rb +1 -1
- data/lib/shakapacker/version_checker.rb +9 -30
- data/lib/shakapacker/webpack_runner.rb +2 -21
- data/lib/shakapacker.rb +0 -2
- data/lib/tasks/shakapacker/check_binstubs.rake +12 -26
- data/lib/tasks/shakapacker/check_manager.rake +3 -8
- data/lib/tasks/shakapacker/info.rake +6 -15
- data/package/babel/preset.js +15 -15
- data/package/config.js +15 -19
- data/package/dev_server.js +4 -4
- data/package/env.js +19 -17
- data/package/environments/base.js +41 -24
- data/package/environments/development.js +6 -6
- data/package/environments/production.js +16 -16
- data/package/environments/test.js +1 -1
- data/package/esbuild/index.js +6 -6
- data/package/index.d.ts +0 -2
- data/package/index.js +17 -46
- data/package/rules/babel.js +6 -8
- data/package/rules/coffee.js +2 -2
- data/package/rules/css.js +1 -1
- data/package/rules/erb.js +4 -4
- data/package/rules/esbuild.js +5 -7
- data/package/rules/file.js +14 -7
- data/package/rules/index.js +11 -11
- data/package/rules/jscommon.js +8 -5
- data/package/rules/less.js +10 -9
- data/package/rules/raw.js +1 -1
- data/package/rules/sass.js +4 -4
- data/package/rules/stylus.js +12 -7
- data/package/rules/swc.js +5 -7
- data/package/swc/index.js +10 -10
- data/package/utils/configPath.js +3 -18
- data/package/utils/defaultConfigPath.js +1 -1
- data/package/utils/{get_style_rule.js → getStyleRule.js} +6 -6
- data/package/utils/helpers.js +2 -43
- data/package/utils/inliningCss.js +4 -3
- data/package/utils/snakeToCamelCase.js +5 -0
- data/package/webpackDevServerConfig.js +28 -25
- data/package.json +12 -18
- data/prettier.config.js +4 -0
- data/shakapacker.gemspec +1 -1
- data/spec/dummy/app/javascript/packs/application.js +1 -1
- data/spec/dummy/config/application.rb +3 -0
- data/spec/dummy/config/initializers/react_on_rails.rb +2 -2
- data/spec/dummy/config/shakapacker.yml +3 -4
- data/spec/dummy/config/webpack/commonWebpackConfig.js +0 -1
- data/spec/dummy/config/webpack/webpack.config.js +1 -1
- data/spec/dummy/package.json +2 -1
- data/spec/dummy/yarn.lock +2 -3
- data/spec/fixtures/github_url_package-lock.v1.json +1 -1
- data/spec/fixtures/github_url_package-lock.v2.json +2 -2
- data/spec/fixtures/github_url_package.json +1 -1
- data/spec/fixtures/github_url_pnpm-lock.v7.yaml +1 -1
- data/spec/fixtures/github_url_pnpm-lock.v8.yaml +1 -1
- data/spec/fixtures/github_url_yarn.v1.lock +1 -1
- data/spec/fixtures/github_url_yarn.v2.lock +2 -2
- data/spec/generator_specs/e2e_template/template.rb +15 -28
- data/spec/generator_specs/generator_spec.rb +6 -136
- data/spec/mounted_app/test/dummy/config/webpacker.yml +0 -1
- data/spec/shakapacker/compiler_spec.rb +1 -3
- data/spec/shakapacker/configuration_spec.rb +4 -56
- data/spec/shakapacker/dev_server_runner_spec.rb +19 -102
- data/spec/shakapacker/dev_server_spec.rb +1 -16
- data/spec/shakapacker/engine_rake_tasks_spec.rb +1 -16
- data/spec/shakapacker/helper_spec.rb +3 -3
- data/spec/shakapacker/instance_spec.rb +1 -3
- data/spec/shakapacker/rake_tasks_spec.rb +2 -14
- data/spec/shakapacker/shakapacker_spec.rb +0 -1
- data/spec/shakapacker/test_app/config/shakapacker_css_extract_ignore_order_warnings.yml +0 -1
- data/spec/shakapacker/test_app/config/shakapacker_manifest_path.yml +0 -1
- data/spec/shakapacker/test_app/config/shakapacker_nested_entries.yml +0 -1
- data/spec/shakapacker/test_app/config/shakapacker_other_location.yml +0 -1
- data/spec/shakapacker/test_app/package.json +2 -1
- data/spec/shakapacker/utils_manager_spec.rb +125 -0
- data/spec/shakapacker/version_checker_spec.rb +5 -5
- data/spec/shakapacker/webpack_runner_spec.rb +19 -28
- data/spec/support/package_json_helpers.rb +7 -4
- data/test/helpers.js +67 -0
- data/test/package/config.test.js +50 -0
- data/test/package/dev_server.test.js +44 -0
- data/test/package/development.test.js +43 -0
- data/test/package/env.test.js +57 -0
- data/test/package/environments/base.test.js +105 -0
- data/test/package/environments/development.test.js +50 -0
- data/test/package/environments/production.test.js +106 -0
- data/test/package/index.test.js +45 -0
- data/test/package/production.test.js +32 -0
- data/test/package/rules/babel.test.js +58 -0
- data/test/package/rules/esbuild.test.js +59 -0
- data/test/package/rules/file.test.js +81 -0
- data/test/package/rules/index.test.js +7 -0
- data/test/package/rules/raw.test.js +12 -0
- data/test/package/rules/swc.test.js +59 -0
- data/test/package/staging.test.js +31 -0
- data/test/package/test.test.js +28 -0
- data/yarn.lock +1278 -421
- metadata +50 -100
- data/.github/workflows/jest.yml +0 -33
- data/.github/workflows/js-lint.yml +0 -33
- data/.github/workflows/rubocop.yml +0 -28
- data/.github/workflows/ruby-backward-compatibility.yml +0 -51
- data/lib/install/package.json +0 -15
- data/lib/tasks/shakapacker/check_yarn.rake +0 -34
- data/lib/tasks/shakapacker/yarn_install.rake +0 -24
- data/lib/tasks/webpacker/binstubs.rake +0 -9
- data/lib/tasks/webpacker/check_binstubs.rake +0 -9
- data/lib/tasks/webpacker/check_node.rake +0 -9
- data/lib/tasks/webpacker/check_yarn.rake +0 -9
- data/lib/tasks/webpacker/clean.rake +0 -9
- data/lib/tasks/webpacker/clobber.rake +0 -11
- data/lib/tasks/webpacker/compile.rake +0 -9
- data/lib/tasks/webpacker/info.rake +0 -9
- data/lib/tasks/webpacker/install.rake +0 -9
- data/lib/tasks/webpacker/verify_config.rake +0 -9
- data/lib/tasks/webpacker/verify_install.rake +0 -9
- data/lib/tasks/webpacker/yarn_install.rake +0 -9
- data/lib/tasks/webpacker.rake +0 -20
- data/lib/webpacker/dev_server_runner.rb +0 -9
- data/lib/webpacker/webpack_runner.rb +0 -9
- data/lib/webpacker.rb +0 -4
- data/package/__tests__/config-bc.js +0 -27
- data/package/__tests__/config.js +0 -46
- data/package/__tests__/dev_server-bc.js +0 -46
- data/package/__tests__/dev_server.js +0 -46
- data/package/__tests__/development-bc.js +0 -66
- data/package/__tests__/development.js +0 -66
- data/package/__tests__/env-bc.js +0 -59
- data/package/__tests__/env.js +0 -59
- data/package/__tests__/index-bc.js +0 -22
- data/package/__tests__/index.js +0 -46
- data/package/__tests__/production-bc.js +0 -51
- data/package/__tests__/production.js +0 -51
- data/package/__tests__/staging-bc.js +0 -53
- data/package/__tests__/staging.js +0 -53
- data/package/__tests__/test-bc.js +0 -43
- data/package/__tests__/test.js +0 -43
- data/package/environments/__tests__/base-bc.js +0 -107
- data/package/environments/__tests__/base.js +0 -107
- data/package/environments/__tests__/development.js +0 -53
- data/package/environments/__tests__/production.js +0 -92
- data/package/rules/__tests__/__utils__/webpack.js +0 -50
- data/package/rules/__tests__/babel.js +0 -63
- data/package/rules/__tests__/esbuild.js +0 -64
- data/package/rules/__tests__/file.js +0 -79
- data/package/rules/__tests__/index.js +0 -7
- data/package/rules/__tests__/raw.js +0 -18
- data/package/rules/__tests__/swc.js +0 -63
- data/package/utils/snakeToCamelCase +0 -7
- data/spec/backward_compatibility_specs/command_spec.rb +0 -116
- data/spec/backward_compatibility_specs/compiler_spec.rb +0 -59
- data/spec/backward_compatibility_specs/compiler_strategy_spec.rb +0 -24
- data/spec/backward_compatibility_specs/configuration_spec.rb +0 -294
- data/spec/backward_compatibility_specs/dev_server_runner_spec.rb +0 -206
- data/spec/backward_compatibility_specs/dev_server_spec.rb +0 -47
- data/spec/backward_compatibility_specs/digest_strategy_spec.rb +0 -38
- data/spec/backward_compatibility_specs/engine_rake_tasks_spec.rb +0 -67
- data/spec/backward_compatibility_specs/env_spec.rb +0 -23
- data/spec/backward_compatibility_specs/helper_spec.rb +0 -243
- data/spec/backward_compatibility_specs/instance_spec.rb +0 -31
- data/spec/backward_compatibility_specs/manifest_spec.rb +0 -100
- data/spec/backward_compatibility_specs/mtime_strategy_spec.rb +0 -55
- data/spec/backward_compatibility_specs/rake_tasks_spec.rb +0 -41
- data/spec/backward_compatibility_specs/spec_helper_initializer.rb +0 -24
- data/spec/backward_compatibility_specs/webpack_runner_spec.rb +0 -86
- data/spec/backward_compatibility_specs/webpacker_spec.rb +0 -41
- data/spec/backward_compatibility_specs/webpacker_test_app/.gitignore +0 -2
- data/spec/backward_compatibility_specs/webpacker_test_app/Rakefile +0 -3
- data/spec/backward_compatibility_specs/webpacker_test_app/app/packs/entrypoints/application.js +0 -10
- data/spec/backward_compatibility_specs/webpacker_test_app/app/packs/entrypoints/generated/something.js +0 -2
- data/spec/backward_compatibility_specs/webpacker_test_app/app/packs/entrypoints/multi_entry.css +0 -4
- data/spec/backward_compatibility_specs/webpacker_test_app/app/packs/entrypoints/multi_entry.js +0 -4
- data/spec/backward_compatibility_specs/webpacker_test_app/bin/webpacker +0 -13
- data/spec/backward_compatibility_specs/webpacker_test_app/bin/webpacker-dev-server +0 -13
- data/spec/backward_compatibility_specs/webpacker_test_app/config/application.rb +0 -11
- data/spec/backward_compatibility_specs/webpacker_test_app/config/environment.rb +0 -4
- data/spec/backward_compatibility_specs/webpacker_test_app/config/initializers/inspect_autoload_paths.rb +0 -1
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpack/webpack.config.js +0 -0
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker.yml +0 -83
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_css_extract_ignore_order_warnings.yml +0 -84
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_defaults_fallback.yml +0 -11
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_manifest_path.yml +0 -80
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_nested_entries.yml +0 -83
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_no_precompile.yml +0 -7
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_other_location.yml +0 -85
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_public_root.yml +0 -18
- data/spec/backward_compatibility_specs/webpacker_test_app/config.ru +0 -5
- data/spec/backward_compatibility_specs/webpacker_test_app/package.json +0 -13
- data/spec/backward_compatibility_specs/webpacker_test_app/public/packs/manifest.json +0 -58
- data/spec/backward_compatibility_specs/webpacker_test_app/some.config.js +0 -0
- data/spec/backward_compatibility_specs/webpacker_test_app/tmp/shakapacker/last-compilation-digest-production +0 -1
- data/spec/backward_compatibility_specs/webpacker_test_app/yarn.lock +0 -11
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shakapacker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0.rc.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-05-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -141,10 +141,7 @@ files:
|
|
141
141
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
142
142
|
- ".github/workflows/dummy.yml"
|
143
143
|
- ".github/workflows/generator.yml"
|
144
|
-
- ".github/workflows/
|
145
|
-
- ".github/workflows/js-lint.yml"
|
146
|
-
- ".github/workflows/rubocop.yml"
|
147
|
-
- ".github/workflows/ruby-backward-compatibility.yml"
|
144
|
+
- ".github/workflows/node.yml"
|
148
145
|
- ".github/workflows/ruby.yml"
|
149
146
|
- ".gitignore"
|
150
147
|
- ".node-version"
|
@@ -170,10 +167,13 @@ files:
|
|
170
167
|
- docs/using_swc_loader.md
|
171
168
|
- docs/v6_upgrade.md
|
172
169
|
- docs/v7_upgrade.md
|
170
|
+
- docs/v8_upgrade.md
|
173
171
|
- gemfiles/Gemfile-rails-edge
|
174
172
|
- gemfiles/Gemfile-rails.6.0.x
|
175
173
|
- gemfiles/Gemfile-rails.6.1.x
|
176
174
|
- gemfiles/Gemfile-rails.7.0.x
|
175
|
+
- gemfiles/Gemfile-rails.7.1.x
|
176
|
+
- jest.config.js
|
177
177
|
- lib/install/application.js
|
178
178
|
- lib/install/bin/shakapacker
|
179
179
|
- lib/install/bin/shakapacker-dev-server
|
@@ -181,7 +181,6 @@ files:
|
|
181
181
|
- lib/install/binstubs.rb
|
182
182
|
- lib/install/config/shakapacker.yml
|
183
183
|
- lib/install/config/webpack/webpack.config.js
|
184
|
-
- lib/install/package.json
|
185
184
|
- lib/install/template.rb
|
186
185
|
- lib/shakapacker.rb
|
187
186
|
- lib/shakapacker/base_strategy.rb
|
@@ -201,6 +200,7 @@ files:
|
|
201
200
|
- lib/shakapacker/mtime_strategy.rb
|
202
201
|
- lib/shakapacker/railtie.rb
|
203
202
|
- lib/shakapacker/runner.rb
|
203
|
+
- lib/shakapacker/utils/manager.rb
|
204
204
|
- lib/shakapacker/utils/misc.rb
|
205
205
|
- lib/shakapacker/utils/version_syntax_converter.rb
|
206
206
|
- lib/shakapacker/version.rb
|
@@ -211,7 +211,6 @@ files:
|
|
211
211
|
- lib/tasks/shakapacker/check_binstubs.rake
|
212
212
|
- lib/tasks/shakapacker/check_manager.rake
|
213
213
|
- lib/tasks/shakapacker/check_node.rake
|
214
|
-
- lib/tasks/shakapacker/check_yarn.rake
|
215
214
|
- lib/tasks/shakapacker/clean.rake
|
216
215
|
- lib/tasks/shakapacker/clobber.rake
|
217
216
|
- lib/tasks/shakapacker/compile.rake
|
@@ -219,48 +218,11 @@ files:
|
|
219
218
|
- lib/tasks/shakapacker/install.rake
|
220
219
|
- lib/tasks/shakapacker/verify_config.rake
|
221
220
|
- lib/tasks/shakapacker/verify_install.rake
|
222
|
-
- lib/tasks/shakapacker/yarn_install.rake
|
223
|
-
- lib/tasks/webpacker.rake
|
224
|
-
- lib/tasks/webpacker/binstubs.rake
|
225
|
-
- lib/tasks/webpacker/check_binstubs.rake
|
226
|
-
- lib/tasks/webpacker/check_node.rake
|
227
|
-
- lib/tasks/webpacker/check_yarn.rake
|
228
|
-
- lib/tasks/webpacker/clean.rake
|
229
|
-
- lib/tasks/webpacker/clobber.rake
|
230
|
-
- lib/tasks/webpacker/compile.rake
|
231
|
-
- lib/tasks/webpacker/info.rake
|
232
|
-
- lib/tasks/webpacker/install.rake
|
233
|
-
- lib/tasks/webpacker/verify_config.rake
|
234
|
-
- lib/tasks/webpacker/verify_install.rake
|
235
|
-
- lib/tasks/webpacker/yarn_install.rake
|
236
|
-
- lib/webpacker.rb
|
237
|
-
- lib/webpacker/dev_server_runner.rb
|
238
|
-
- lib/webpacker/webpack_runner.rb
|
239
221
|
- package.json
|
240
|
-
- package/__tests__/config-bc.js
|
241
|
-
- package/__tests__/config.js
|
242
|
-
- package/__tests__/dev_server-bc.js
|
243
|
-
- package/__tests__/dev_server.js
|
244
|
-
- package/__tests__/development-bc.js
|
245
|
-
- package/__tests__/development.js
|
246
|
-
- package/__tests__/env-bc.js
|
247
|
-
- package/__tests__/env.js
|
248
|
-
- package/__tests__/index-bc.js
|
249
|
-
- package/__tests__/index.js
|
250
|
-
- package/__tests__/production-bc.js
|
251
|
-
- package/__tests__/production.js
|
252
|
-
- package/__tests__/staging-bc.js
|
253
|
-
- package/__tests__/staging.js
|
254
|
-
- package/__tests__/test-bc.js
|
255
|
-
- package/__tests__/test.js
|
256
222
|
- package/babel/preset.js
|
257
223
|
- package/config.js
|
258
224
|
- package/dev_server.js
|
259
225
|
- package/env.js
|
260
|
-
- package/environments/__tests__/base-bc.js
|
261
|
-
- package/environments/__tests__/base.js
|
262
|
-
- package/environments/__tests__/development.js
|
263
|
-
- package/environments/__tests__/production.js
|
264
226
|
- package/environments/base.js
|
265
227
|
- package/environments/development.js
|
266
228
|
- package/environments/production.js
|
@@ -268,13 +230,6 @@ files:
|
|
268
230
|
- package/esbuild/index.js
|
269
231
|
- package/index.d.ts
|
270
232
|
- package/index.js
|
271
|
-
- package/rules/__tests__/__utils__/webpack.js
|
272
|
-
- package/rules/__tests__/babel.js
|
273
|
-
- package/rules/__tests__/esbuild.js
|
274
|
-
- package/rules/__tests__/file.js
|
275
|
-
- package/rules/__tests__/index.js
|
276
|
-
- package/rules/__tests__/raw.js
|
277
|
-
- package/rules/__tests__/swc.js
|
278
233
|
- package/rules/babel.js
|
279
234
|
- package/rules/coffee.js
|
280
235
|
- package/rules/css.js
|
@@ -291,56 +246,14 @@ files:
|
|
291
246
|
- package/swc/index.js
|
292
247
|
- package/utils/configPath.js
|
293
248
|
- package/utils/defaultConfigPath.js
|
294
|
-
- package/utils/
|
249
|
+
- package/utils/getStyleRule.js
|
295
250
|
- package/utils/helpers.js
|
296
251
|
- package/utils/inliningCss.js
|
297
|
-
- package/utils/snakeToCamelCase
|
252
|
+
- package/utils/snakeToCamelCase.js
|
298
253
|
- package/webpackDevServerConfig.js
|
254
|
+
- prettier.config.js
|
299
255
|
- rakelib/release.rake
|
300
256
|
- shakapacker.gemspec
|
301
|
-
- spec/backward_compatibility_specs/command_spec.rb
|
302
|
-
- spec/backward_compatibility_specs/compiler_spec.rb
|
303
|
-
- spec/backward_compatibility_specs/compiler_strategy_spec.rb
|
304
|
-
- spec/backward_compatibility_specs/configuration_spec.rb
|
305
|
-
- spec/backward_compatibility_specs/dev_server_runner_spec.rb
|
306
|
-
- spec/backward_compatibility_specs/dev_server_spec.rb
|
307
|
-
- spec/backward_compatibility_specs/digest_strategy_spec.rb
|
308
|
-
- spec/backward_compatibility_specs/engine_rake_tasks_spec.rb
|
309
|
-
- spec/backward_compatibility_specs/env_spec.rb
|
310
|
-
- spec/backward_compatibility_specs/helper_spec.rb
|
311
|
-
- spec/backward_compatibility_specs/instance_spec.rb
|
312
|
-
- spec/backward_compatibility_specs/manifest_spec.rb
|
313
|
-
- spec/backward_compatibility_specs/mtime_strategy_spec.rb
|
314
|
-
- spec/backward_compatibility_specs/rake_tasks_spec.rb
|
315
|
-
- spec/backward_compatibility_specs/spec_helper_initializer.rb
|
316
|
-
- spec/backward_compatibility_specs/webpack_runner_spec.rb
|
317
|
-
- spec/backward_compatibility_specs/webpacker_spec.rb
|
318
|
-
- spec/backward_compatibility_specs/webpacker_test_app/.gitignore
|
319
|
-
- spec/backward_compatibility_specs/webpacker_test_app/Rakefile
|
320
|
-
- spec/backward_compatibility_specs/webpacker_test_app/app/packs/entrypoints/application.js
|
321
|
-
- spec/backward_compatibility_specs/webpacker_test_app/app/packs/entrypoints/generated/something.js
|
322
|
-
- spec/backward_compatibility_specs/webpacker_test_app/app/packs/entrypoints/multi_entry.css
|
323
|
-
- spec/backward_compatibility_specs/webpacker_test_app/app/packs/entrypoints/multi_entry.js
|
324
|
-
- spec/backward_compatibility_specs/webpacker_test_app/bin/webpacker
|
325
|
-
- spec/backward_compatibility_specs/webpacker_test_app/bin/webpacker-dev-server
|
326
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config.ru
|
327
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/application.rb
|
328
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/environment.rb
|
329
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/initializers/inspect_autoload_paths.rb
|
330
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpack/webpack.config.js
|
331
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpacker.yml
|
332
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_css_extract_ignore_order_warnings.yml
|
333
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_defaults_fallback.yml
|
334
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_manifest_path.yml
|
335
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_nested_entries.yml
|
336
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_no_precompile.yml
|
337
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_other_location.yml
|
338
|
-
- spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_public_root.yml
|
339
|
-
- spec/backward_compatibility_specs/webpacker_test_app/package.json
|
340
|
-
- spec/backward_compatibility_specs/webpacker_test_app/public/packs/manifest.json
|
341
|
-
- spec/backward_compatibility_specs/webpacker_test_app/some.config.js
|
342
|
-
- spec/backward_compatibility_specs/webpacker_test_app/tmp/shakapacker/last-compilation-digest-production
|
343
|
-
- spec/backward_compatibility_specs/webpacker_test_app/yarn.lock
|
344
257
|
- spec/dummy/.browserslistrc
|
345
258
|
- spec/dummy/.gitignore
|
346
259
|
- spec/dummy/.prettierrc.yaml
|
@@ -557,16 +470,35 @@ files:
|
|
557
470
|
- spec/shakapacker/test_app/public/packs/manifest.json
|
558
471
|
- spec/shakapacker/test_app/some.config.js
|
559
472
|
- spec/shakapacker/test_app/yarn.lock
|
473
|
+
- spec/shakapacker/utils_manager_spec.rb
|
560
474
|
- spec/shakapacker/version_checker_spec.rb
|
561
475
|
- spec/shakapacker/webpack_runner_spec.rb
|
562
476
|
- spec/spec_helper.rb
|
563
477
|
- spec/support/package_json_helpers.rb
|
478
|
+
- test/helpers.js
|
479
|
+
- test/package/config.test.js
|
480
|
+
- test/package/dev_server.test.js
|
481
|
+
- test/package/development.test.js
|
482
|
+
- test/package/env.test.js
|
483
|
+
- test/package/environments/base.test.js
|
484
|
+
- test/package/environments/development.test.js
|
485
|
+
- test/package/environments/production.test.js
|
486
|
+
- test/package/index.test.js
|
487
|
+
- test/package/production.test.js
|
488
|
+
- test/package/rules/babel.test.js
|
489
|
+
- test/package/rules/esbuild.test.js
|
490
|
+
- test/package/rules/file.test.js
|
491
|
+
- test/package/rules/index.test.js
|
492
|
+
- test/package/rules/raw.test.js
|
493
|
+
- test/package/rules/swc.test.js
|
494
|
+
- test/package/staging.test.js
|
495
|
+
- test/package/test.test.js
|
564
496
|
- yarn.lock
|
565
497
|
homepage: https://github.com/shakacode/shakapacker
|
566
498
|
licenses:
|
567
499
|
- MIT
|
568
500
|
metadata:
|
569
|
-
source_code_uri: https://github.com/shakacode/shakapacker/tree/
|
501
|
+
source_code_uri: https://github.com/shakacode/shakapacker/tree/v8.0.0-rc.2
|
570
502
|
post_install_message:
|
571
503
|
rdoc_options: []
|
572
504
|
require_paths:
|
@@ -575,7 +507,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
575
507
|
requirements:
|
576
508
|
- - ">="
|
577
509
|
- !ruby/object:Gem::Version
|
578
|
-
version: 2.
|
510
|
+
version: 2.7.0
|
579
511
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
580
512
|
requirements:
|
581
513
|
- - ">"
|
@@ -586,4 +518,22 @@ rubygems_version: 3.4.12
|
|
586
518
|
signing_key:
|
587
519
|
specification_version: 4
|
588
520
|
summary: Use webpack to manage app-like JavaScript modules in Rails
|
589
|
-
test_files:
|
521
|
+
test_files:
|
522
|
+
- test/helpers.js
|
523
|
+
- test/package/config.test.js
|
524
|
+
- test/package/dev_server.test.js
|
525
|
+
- test/package/development.test.js
|
526
|
+
- test/package/env.test.js
|
527
|
+
- test/package/environments/base.test.js
|
528
|
+
- test/package/environments/development.test.js
|
529
|
+
- test/package/environments/production.test.js
|
530
|
+
- test/package/index.test.js
|
531
|
+
- test/package/production.test.js
|
532
|
+
- test/package/rules/babel.test.js
|
533
|
+
- test/package/rules/esbuild.test.js
|
534
|
+
- test/package/rules/file.test.js
|
535
|
+
- test/package/rules/index.test.js
|
536
|
+
- test/package/rules/raw.test.js
|
537
|
+
- test/package/rules/swc.test.js
|
538
|
+
- test/package/staging.test.js
|
539
|
+
- test/package/test.test.js
|
data/.github/workflows/jest.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
name: Jest specs
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- 'master'
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
jest:
|
11
|
-
name: Jest specs
|
12
|
-
strategy:
|
13
|
-
matrix:
|
14
|
-
os: [ubuntu-latest]
|
15
|
-
node: [14.x, 16.x, 18.x]
|
16
|
-
|
17
|
-
runs-on: ${{ matrix.os }}
|
18
|
-
|
19
|
-
steps:
|
20
|
-
- uses: actions/checkout@v4
|
21
|
-
with:
|
22
|
-
persist-credentials: false
|
23
|
-
- name: Use Node.js ${{ matrix.node }}
|
24
|
-
uses: actions/setup-node@v3
|
25
|
-
with:
|
26
|
-
node-version: ${{ matrix.node }}
|
27
|
-
cache: yarn
|
28
|
-
|
29
|
-
- name: Install dependencies
|
30
|
-
run: yarn --frozen-lockfile --non-interactive --prefer-offline
|
31
|
-
|
32
|
-
- name: Jest Specs
|
33
|
-
run: yarn test
|
@@ -1,33 +0,0 @@
|
|
1
|
-
name: JS lint
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- 'master'
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
lint:
|
11
|
-
name: JS Lint
|
12
|
-
strategy:
|
13
|
-
matrix:
|
14
|
-
os: [ubuntu-latest]
|
15
|
-
node: [14.x, 16.x, 18.x]
|
16
|
-
|
17
|
-
runs-on: ${{ matrix.os }}
|
18
|
-
|
19
|
-
steps:
|
20
|
-
- uses: actions/checkout@v4
|
21
|
-
with:
|
22
|
-
persist-credentials: false
|
23
|
-
- name: Use Node.js ${{ matrix.node }}
|
24
|
-
uses: actions/setup-node@v3
|
25
|
-
with:
|
26
|
-
node-version: ${{ matrix.node }}
|
27
|
-
cache: yarn
|
28
|
-
|
29
|
-
- name: Install dependencies
|
30
|
-
run: yarn --frozen-lockfile --non-interactive --prefer-offline
|
31
|
-
|
32
|
-
- name: Lint
|
33
|
-
run: yarn lint
|
@@ -1,28 +0,0 @@
|
|
1
|
-
name: Rubocop
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- 'master'
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
rubocop:
|
11
|
-
name: Rubocop
|
12
|
-
runs-on: ${{ matrix.os }}
|
13
|
-
strategy:
|
14
|
-
matrix:
|
15
|
-
os: [ubuntu-latest]
|
16
|
-
ruby: ['2.7', '3.0']
|
17
|
-
|
18
|
-
steps:
|
19
|
-
- uses: actions/checkout@v4
|
20
|
-
with:
|
21
|
-
persist-credentials: false
|
22
|
-
- uses: ruby/setup-ruby@v1
|
23
|
-
with:
|
24
|
-
ruby-version: ${{ matrix.ruby }}
|
25
|
-
bundler-cache: true
|
26
|
-
|
27
|
-
- name: Ruby rubocop
|
28
|
-
run: bundle exec rubocop
|
@@ -1,51 +0,0 @@
|
|
1
|
-
name: Ruby specs - Backward compatibility
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- 'master'
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
test:
|
11
|
-
name: Ruby specs - Backward compatibility
|
12
|
-
runs-on: ${{ matrix.os }}
|
13
|
-
strategy:
|
14
|
-
matrix:
|
15
|
-
os: [ubuntu-latest]
|
16
|
-
ruby: ['2.6', '2.7', '3.0']
|
17
|
-
gemfile:
|
18
|
-
- gemfiles/Gemfile-rails.6.0.x
|
19
|
-
- gemfiles/Gemfile-rails.6.1.x
|
20
|
-
- gemfiles/Gemfile-rails.7.0.x
|
21
|
-
# Uncomment the following line only to ensure compatibility with the
|
22
|
-
# upcoming Rails versions, maybe before a release.
|
23
|
-
#- gemfiles/Gemfile-rails-edge
|
24
|
-
exclude:
|
25
|
-
- ruby: 2.6
|
26
|
-
os: ubuntu-latest
|
27
|
-
gemfile: gemfiles/Gemfile-rails.7.0.x
|
28
|
-
- ruby: 2.6
|
29
|
-
os: ubuntu-latest
|
30
|
-
gemfile: gemfiles/Gemfile-rails-edge
|
31
|
-
|
32
|
-
env:
|
33
|
-
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
34
|
-
|
35
|
-
steps:
|
36
|
-
- uses: actions/checkout@v4
|
37
|
-
with:
|
38
|
-
persist-credentials: false
|
39
|
-
- uses: ruby/setup-ruby@v1
|
40
|
-
with:
|
41
|
-
ruby-version: ${{ matrix.ruby }}
|
42
|
-
bundler-cache: true
|
43
|
-
|
44
|
-
- name: Ruby specs - Backward compatibility
|
45
|
-
run: bundle exec rake run_spec:gem_bc
|
46
|
-
env:
|
47
|
-
SHAKAPACKER_USE_PACKAGE_JSON_GEM: "false"
|
48
|
-
- name: Ruby specs - Backward compatibility
|
49
|
-
run: bundle exec rake run_spec:gem_bc
|
50
|
-
env:
|
51
|
-
SHAKAPACKER_USE_PACKAGE_JSON_GEM: "true"
|
data/lib/install/package.json
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
namespace :shakapacker do
|
2
|
-
desc "Verifies if Yarn is installed"
|
3
|
-
task :check_yarn do
|
4
|
-
require "semantic_range"
|
5
|
-
|
6
|
-
begin
|
7
|
-
which_command = Gem.win_platform? ? "where" : "which"
|
8
|
-
raise Errno::ENOENT if `#{which_command} yarn`.strip.empty?
|
9
|
-
|
10
|
-
yarn_version = `yarn --version`.strip
|
11
|
-
raise Errno::ENOENT if yarn_version.blank?
|
12
|
-
|
13
|
-
pkg_path = Pathname.new("#{__dir__}/../../../package.json").realpath
|
14
|
-
yarn_range = JSON.parse(pkg_path.read)["engines"]["yarn"]
|
15
|
-
is_valid = SemanticRange.satisfies?(yarn_version, yarn_range) rescue false
|
16
|
-
is_unsupported = SemanticRange.satisfies?(yarn_version, ">=4.0.0") rescue false
|
17
|
-
|
18
|
-
unless is_valid
|
19
|
-
$stderr.puts "Shakapacker requires Yarn \"#{yarn_range}\" and you are using #{yarn_version}"
|
20
|
-
if is_unsupported
|
21
|
-
$stderr.puts "This version of Shakapacker does not support Yarn #{yarn_version}. Please downgrade to a supported version of Yarn https://yarnpkg.com/lang/en/docs/install/"
|
22
|
-
else
|
23
|
-
$stderr.puts "Please upgrade Yarn https://yarnpkg.com/lang/en/docs/install/"
|
24
|
-
end
|
25
|
-
$stderr.puts "Exiting!"
|
26
|
-
exit!
|
27
|
-
end
|
28
|
-
rescue Errno::ENOENT
|
29
|
-
$stderr.puts "Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/"
|
30
|
-
$stderr.puts "Exiting!"
|
31
|
-
exit!
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
namespace :shakapacker do
|
2
|
-
desc "Support for older Rails versions. Install all JavaScript dependencies as specified via Yarn"
|
3
|
-
task :yarn_install do
|
4
|
-
warn <<~MSG.strip
|
5
|
-
Shakapacker - Automatic installation of yarn packages is deprecated
|
6
|
-
Automatic installation of yarn packages when assets are precompiled is deprecated and will be removed in Shakapacker v7.
|
7
|
-
Please ensure you are installing yarn packages explicitly before the asset compilation.
|
8
|
-
MSG
|
9
|
-
|
10
|
-
valid_node_envs = %w[test development production]
|
11
|
-
node_env = ENV.fetch("NODE_ENV") do
|
12
|
-
valid_node_envs.include?(Rails.env) ? Rails.env : "production"
|
13
|
-
end
|
14
|
-
Dir.chdir(Rails.root) do
|
15
|
-
yarn_flags =
|
16
|
-
if `yarn --version`.start_with?("1")
|
17
|
-
"--no-progress --frozen-lockfile"
|
18
|
-
else
|
19
|
-
"--immutable"
|
20
|
-
end
|
21
|
-
system({ "NODE_ENV" => node_env }, "yarn install #{yarn_flags}")
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Installs Shakapacker binstubs in this application"
|
3
|
-
task :binstubs do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:binstubs"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Verifies that bin/shakapacker is present"
|
3
|
-
task :check_binstubs do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:check_binstubs"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Verifies if Node.js is installed"
|
3
|
-
task :check_node do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:check_node"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Verifies if Yarn is installed"
|
3
|
-
task :check_yarn do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:check_manager"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Remove old compiled bundles"
|
3
|
-
task :clean, [:keep, :age] do |task, args|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:clean"].invoke(args.keep, args.age)
|
8
|
-
end
|
9
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
require "shakapacker/configuration"
|
2
|
-
|
3
|
-
namespace :webpacker do
|
4
|
-
desc "DEPRECATED - Remove the webpack compiled output directory"
|
5
|
-
task :clobber do |task|
|
6
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
7
|
-
|
8
|
-
prefix = task.name.split(/#|webpacker:/).first
|
9
|
-
Rake::Task["#{prefix}shakapacker:clobber"].invoke
|
10
|
-
end
|
11
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Compile JavaScript packs using webpack for production with digests"
|
3
|
-
task :compile do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:compile"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Provide information on Shakapacker's environment"
|
3
|
-
task :info do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:info"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Install Shakapacker in this application"
|
3
|
-
task :install do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:install"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Verifies if the Shakapacker config is present"
|
3
|
-
task :verify_config do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:verify_config"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Verifies if Shakapacker is installed"
|
3
|
-
task :verify_install do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:verify_install"].invoke
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
namespace :webpacker do
|
2
|
-
desc "DEPRECATED - Support for older Rails versions. Install all JavaScript dependencies as specified via Yarn"
|
3
|
-
task :yarn_install do |task|
|
4
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
5
|
-
|
6
|
-
prefix = task.name.split(/#|webpacker:/).first
|
7
|
-
Rake::Task["#{prefix}shakapacker:yarn_install"].invoke
|
8
|
-
end
|
9
|
-
end
|
data/lib/tasks/webpacker.rake
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
tasks = {
|
2
|
-
"webpacker:info" => "DEPRECATED - Provides information on Shakapacker's environment",
|
3
|
-
"webpacker:install" => "DEPRECATED - Installs and setup webpack with Yarn",
|
4
|
-
"webpacker:compile" => "DEPRECATED - Compiles webpack bundles based on environment",
|
5
|
-
"webpacker:clean" => "DEPRECATED - Remove old compiled bundles",
|
6
|
-
"webpacker:clobber" => "DEPRECATED - Removes the webpack compiled output directory",
|
7
|
-
"webpacker:check_node" => "DEPRECATED - Verifies if Node.js is installed",
|
8
|
-
"webpacker:check_yarn" => "DEPRECATED - Verifies if Yarn is installed",
|
9
|
-
"webpacker:check_binstubs" => "DEPRECATED - Verifies that bin/shakapacker is present",
|
10
|
-
"webpacker:binstubs" => "DEPRECATED - Installs Shakapacker binstubs in this application",
|
11
|
-
"webpacker:verify_install" => "DEPRECATED - Verifies if Shakapacker is installed",
|
12
|
-
}.freeze
|
13
|
-
|
14
|
-
desc "DEPRECATED - Lists all available tasks in Webpacker"
|
15
|
-
task :webpacker do |task|
|
16
|
-
puts "DEPRECATED - Available Webpacker tasks are:"
|
17
|
-
tasks.each { |task, message| puts task.ljust(30) + message }
|
18
|
-
|
19
|
-
Shakapacker.puts_rake_deprecation_message(task.name)
|
20
|
-
end
|
data/lib/webpacker.rb
DELETED