shakapacker 6.6.0 → 7.0.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +4 -8
- data/.github/workflows/dummy.yml +21 -0
- data/.github/workflows/generator.yml +37 -0
- data/.github/workflows/jest.yml +2 -2
- data/.github/workflows/js-lint.yml +2 -2
- data/.github/workflows/rubocop.yml +1 -1
- data/.github/workflows/ruby-backward-compatibility.yml +39 -0
- data/.github/workflows/ruby.yml +2 -6
- data/.gitignore +3 -0
- data/CHANGELOG.md +48 -4
- data/CONTRIBUTING.md +78 -22
- data/Gemfile.development_dependencies +1 -1
- data/README.md +115 -88
- data/Rakefile +46 -5
- data/config/shakapacker.yml +1 -0
- data/docs/deployment.md +11 -10
- data/docs/{developing_webpacker.md → developing_shakapacker.md} +5 -5
- data/docs/react.md +10 -6
- data/docs/style_loader_vs_mini_css.md +2 -2
- data/docs/troubleshooting.md +22 -18
- data/docs/using_esbuild_loader.md +5 -3
- data/docs/using_swc_loader.md +2 -2
- data/docs/v6_upgrade.md +2 -2
- data/docs/v7_upgrade.md +56 -0
- data/lib/install/bin/shakapacker +13 -0
- data/lib/install/bin/shakapacker-dev-server +13 -0
- data/lib/install/binstubs.rb +3 -1
- data/lib/install/config/{webpacker.yml → shakapacker.yml} +13 -8
- data/lib/install/config/webpack/webpack.config.js +3 -2
- data/lib/install/template.rb +30 -18
- data/lib/{webpacker → shakapacker}/base_strategy.rb +2 -2
- data/lib/{webpacker → shakapacker}/commands.rb +4 -4
- data/lib/{webpacker → shakapacker}/compiler.rb +43 -15
- data/lib/{webpacker → shakapacker}/compiler_strategy.rb +6 -6
- data/lib/{webpacker → shakapacker}/configuration.rb +52 -21
- data/lib/shakapacker/deprecation_helper.rb +87 -0
- data/lib/{webpacker → shakapacker}/dev_server.rb +27 -4
- data/lib/{webpacker → shakapacker}/dev_server_proxy.rb +4 -4
- data/lib/shakapacker/dev_server_runner.rb +104 -0
- data/lib/{webpacker → shakapacker}/digest_strategy.rb +6 -6
- data/lib/{webpacker → shakapacker}/env.rb +8 -8
- data/lib/{webpacker → shakapacker}/helper.rb +20 -20
- data/lib/{webpacker → shakapacker}/instance.rb +13 -10
- data/lib/{webpacker → shakapacker}/manifest.rb +14 -14
- data/lib/{webpacker → shakapacker}/mtime_strategy.rb +5 -5
- data/lib/shakapacker/railtie.rb +70 -0
- data/lib/shakapacker/runner.rb +28 -0
- data/lib/shakapacker/utils/version_syntax_converter.rb +2 -2
- data/lib/{webpacker → shakapacker}/version.rb +2 -2
- data/lib/{webpacker → shakapacker}/version_checker.rb +8 -8
- data/lib/shakapacker/webpack_runner.rb +67 -0
- data/lib/shakapacker.rb +51 -1
- data/lib/tasks/shakapacker/binstubs.rake +15 -0
- data/lib/tasks/shakapacker/check_binstubs.rake +29 -0
- data/lib/tasks/shakapacker/check_node.rake +31 -0
- data/lib/tasks/shakapacker/check_yarn.rake +33 -0
- data/lib/tasks/shakapacker/clean.rake +23 -0
- data/lib/tasks/shakapacker/clobber.rake +18 -0
- data/lib/tasks/shakapacker/compile.rake +26 -0
- data/lib/tasks/shakapacker/info.rake +21 -0
- data/lib/tasks/shakapacker/install.rake +17 -0
- data/lib/tasks/shakapacker/verify_config.rake +12 -0
- data/lib/tasks/shakapacker/verify_install.rake +4 -0
- data/lib/tasks/shakapacker/yarn_install.rake +24 -0
- data/lib/tasks/shakapacker.rake +18 -0
- data/lib/tasks/webpacker/binstubs.rake +5 -11
- data/lib/tasks/webpacker/check_binstubs.rake +6 -9
- data/lib/tasks/webpacker/check_node.rake +5 -27
- data/lib/tasks/webpacker/check_yarn.rake +5 -29
- data/lib/tasks/webpacker/clean.rake +5 -19
- data/lib/tasks/webpacker/clobber.rake +6 -13
- data/lib/tasks/webpacker/compile.rake +5 -33
- data/lib/tasks/webpacker/info.rake +5 -17
- data/lib/tasks/webpacker/install.rake +5 -13
- data/lib/tasks/webpacker/verify_config.rake +6 -11
- data/lib/tasks/webpacker/verify_install.rake +7 -2
- data/lib/tasks/webpacker/yarn_install.rake +5 -20
- data/lib/tasks/webpacker.rake +15 -13
- data/lib/webpacker/dev_server_runner.rb +9 -96
- data/lib/webpacker/webpack_runner.rb +9 -58
- data/lib/webpacker.rb +3 -47
- data/package/__tests__/config-bc.js +27 -0
- data/package/__tests__/config.js +6 -5
- data/package/__tests__/dev_server-bc.js +46 -0
- data/package/__tests__/dev_server.js +9 -8
- data/package/__tests__/development-bc.js +66 -0
- data/package/__tests__/development.js +36 -5
- data/package/__tests__/env-bc.js +59 -0
- data/package/__tests__/env.js +3 -2
- data/package/__tests__/index.js +13 -0
- data/package/__tests__/production-bc.js +51 -0
- data/package/__tests__/production.js +25 -3
- data/package/__tests__/staging-bc.js +53 -0
- data/package/__tests__/staging.js +27 -4
- data/package/__tests__/test-bc.js +43 -0
- data/package/__tests__/test.js +22 -4
- data/package/babel/preset.js +1 -4
- data/package/config.js +25 -7
- data/package/dev_server.js +7 -4
- data/package/env.js +22 -3
- data/package/environments/__tests__/base-bc.js +107 -0
- data/package/environments/__tests__/base.js +13 -13
- data/package/environments/base.js +1 -1
- data/package/environments/development.js +4 -46
- data/package/environments/production.js +1 -1
- data/package/index.js +27 -4
- data/package/rules/__tests__/__utils__/webpack.js +1 -1
- data/package/rules/__tests__/file.js +27 -0
- data/package/rules/__tests__/swc.js +1 -2
- data/package/rules/file.js +2 -2
- data/package/utils/configPath.js +19 -0
- data/package/utils/defaultConfigPath.js +2 -0
- data/package/utils/get_style_rule.js +5 -2
- data/package/utils/helpers.js +25 -2
- data/package/utils/inliningCss.js +7 -0
- data/package/utils/snakeToCamelCase +7 -0
- data/package/webpackDevServerConfig.js +68 -0
- data/package.json +2 -2
- data/{webpacker.gemspec → shakapacker.gemspec} +3 -3
- data/spec/{command_spec.rb → backward_compatibility_specs/command_spec.rb} +2 -0
- data/spec/{compiler_spec.rb → backward_compatibility_specs/compiler_spec.rb} +6 -4
- data/spec/{compiler_strategy_spec.rb → backward_compatibility_specs/compiler_strategy_spec.rb} +2 -0
- data/spec/{configuration_spec.rb → backward_compatibility_specs/configuration_spec.rb} +25 -20
- data/spec/{dev_server_runner_spec.rb → backward_compatibility_specs/dev_server_runner_spec.rb} +10 -2
- data/spec/{dev_server_spec.rb → backward_compatibility_specs/dev_server_spec.rb} +4 -2
- data/spec/{digest_strategy_spec.rb → backward_compatibility_specs/digest_strategy_spec.rb} +2 -0
- data/spec/{engine_rake_tasks_spec.rb → backward_compatibility_specs/engine_rake_tasks_spec.rb} +12 -15
- data/spec/{env_spec.rb → backward_compatibility_specs/env_spec.rb} +3 -1
- data/spec/{helper_spec.rb → backward_compatibility_specs/helper_spec.rb} +2 -0
- data/spec/backward_compatibility_specs/instance_spec.rb +31 -0
- data/spec/{manifest_spec.rb → backward_compatibility_specs/manifest_spec.rb} +4 -2
- data/spec/{mtime_strategy_spec.rb → backward_compatibility_specs/mtime_strategy_spec.rb} +2 -0
- data/spec/backward_compatibility_specs/rake_tasks_spec.rb +37 -0
- data/spec/backward_compatibility_specs/spec_helper_initializer.rb +24 -0
- data/spec/{webpack_runner_spec.rb → backward_compatibility_specs/webpack_runner_spec.rb} +3 -1
- data/spec/{webpacker_spec.rb → backward_compatibility_specs/webpacker_spec.rb} +3 -23
- data/spec/backward_compatibility_specs/webpacker_test_app/.gitignore +2 -0
- data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/app/packs/entrypoints/application.js +1 -1
- data/{lib/install → spec/backward_compatibility_specs/webpacker_test_app}/bin/webpacker +0 -0
- data/spec/backward_compatibility_specs/webpacker_test_app/config/application.rb +11 -0
- data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/webpacker.yml +1 -1
- data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/webpacker_css_extract_ignore_order_warnings.yml +1 -1
- data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/webpacker_defaults_fallback.yml +1 -1
- data/spec/backward_compatibility_specs/webpacker_test_app/config/webpacker_no_precompile.yml +7 -0
- data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/webpacker_other_location.yml +1 -1
- data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/webpacker_public_root.yml +1 -1
- data/spec/backward_compatibility_specs/webpacker_test_app/package.json +13 -0
- data/spec/backward_compatibility_specs/webpacker_test_app/tmp/shakapacker/last-compilation-digest-production +1 -0
- data/spec/dummy/.browserslistrc +1 -0
- data/spec/dummy/.gitignore +20 -0
- data/spec/dummy/.prettierrc.yaml +4 -0
- data/spec/dummy/Gemfile +63 -0
- data/spec/dummy/Procfile.dev +5 -0
- data/spec/dummy/Procfile.dev-static +9 -0
- data/spec/dummy/README.md +1 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +2 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/controllers/hello_world_controller.rb +9 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/javascript/Globals.d.ts +3 -0
- data/spec/dummy/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css +25 -0
- data/spec/dummy/app/javascript/bundles/HelloWorld/components/HelloWorld.tsx +47 -0
- data/spec/dummy/app/javascript/bundles/HelloWorld/components/HelloWorldServer.tsx +5 -0
- data/spec/dummy/app/javascript/bundles/HelloWorld/components/logo.svg +7 -0
- data/spec/dummy/app/javascript/packs/application.js +17 -0
- data/spec/dummy/app/javascript/packs/hello-world-bundle.ts +8 -0
- data/spec/dummy/app/javascript/packs/server-bundle.ts +8 -0
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/views/hello_world/index.html.erb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/hello_world.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/babel.config.js +30 -0
- data/spec/dummy/bin/bundle +114 -0
- data/spec/dummy/bin/dev +30 -0
- data/spec/dummy/bin/dev-static +30 -0
- data/spec/dummy/bin/rails +9 -0
- data/spec/dummy/bin/rake +9 -0
- data/spec/dummy/bin/setup +33 -0
- data/spec/dummy/bin/shakapacker +13 -0
- data/spec/dummy/bin/shakapacker-dev-server +13 -0
- data/spec/dummy/bin/spring +17 -0
- data/spec/dummy/bin/yarn +18 -0
- data/spec/dummy/config/application.rb +32 -0
- data/spec/dummy/config/boot.rb +4 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/credentials.yml.enc +1 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +54 -0
- data/spec/dummy/config/environments/production.rb +106 -0
- data/spec/dummy/config/environments/test.rb +49 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/react_on_rails.rb +58 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/puma.rb +38 -0
- data/spec/dummy/config/routes.rb +6 -0
- data/spec/dummy/config/shakapacker.yml +62 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/config/webpack/ServerClientOrBoth.js +34 -0
- data/spec/dummy/config/webpack/clientWebpackConfig.js +15 -0
- data/spec/dummy/config/webpack/commonWebpackConfig.js +18 -0
- data/spec/dummy/config/webpack/development.js +32 -0
- data/spec/dummy/config/webpack/production.js +9 -0
- data/spec/dummy/config/webpack/serverWebpackConfig.js +116 -0
- data/spec/dummy/config/webpack/test.js +7 -0
- data/spec/dummy/config/webpack/webpack.config.js +24 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/lib/tasks/.keep +0 -0
- data/spec/dummy/package.json +44 -0
- data/spec/dummy/postcss.config.js +12 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/robots.txt +1 -0
- data/spec/dummy/spec/rails_helper.rb +118 -0
- data/spec/dummy/spec/spec_helper.rb +96 -0
- data/spec/dummy/spec/system/hello_world_spec.rb +19 -0
- data/spec/dummy/tsconfig.json +21 -0
- data/spec/dummy/vendor/.keep +0 -0
- data/spec/dummy/yarn.lock +4697 -0
- data/spec/generator_specs/e2e_template/files/app/controllers/home_controller.rb +4 -0
- data/spec/generator_specs/e2e_template/files/app/javascript/components/App.js +12 -0
- data/spec/generator_specs/e2e_template/files/app/javascript/packs/application.js +10 -0
- data/spec/generator_specs/e2e_template/files/app/views/home/index.html.erb +2 -0
- data/spec/generator_specs/e2e_template/files/app/views/layouts/application.html.erb +17 -0
- data/spec/generator_specs/e2e_template/files/config/routes.rb +3 -0
- data/spec/generator_specs/e2e_template/files/spec/system/test_react_component_renders_spec.rb +13 -0
- data/spec/generator_specs/e2e_template/template.rb +21 -0
- data/spec/generator_specs/generator_spec.rb +169 -0
- data/spec/mounted_app/test/dummy/config/application.rb +1 -1
- data/spec/mounted_app/test/dummy/config/webpacker.yml +3 -3
- data/spec/shakapacker/command_spec.rb +116 -0
- data/spec/shakapacker/compiler_spec.rb +59 -0
- data/spec/shakapacker/compiler_strategy_spec.rb +22 -0
- data/spec/shakapacker/configuration_spec.rb +323 -0
- data/spec/shakapacker/dev_server_runner_spec.rb +72 -0
- data/spec/shakapacker/dev_server_spec.rb +133 -0
- data/spec/shakapacker/digest_strategy_spec.rb +35 -0
- data/spec/shakapacker/engine_rake_tasks_spec.rb +43 -0
- data/spec/shakapacker/env_spec.rb +23 -0
- data/spec/shakapacker/helper_spec.rb +243 -0
- data/spec/shakapacker/instance_spec.rb +31 -0
- data/spec/shakapacker/manifest_spec.rb +100 -0
- data/spec/shakapacker/mtime_strategy_spec.rb +55 -0
- data/spec/shakapacker/rake_tasks_spec.rb +93 -0
- data/spec/shakapacker/shakapacker_spec.rb +41 -0
- data/spec/shakapacker/spec_helper_initializer.rb +24 -0
- data/spec/shakapacker/test_app/.gitignore +2 -0
- data/spec/shakapacker/test_app/Rakefile +3 -0
- data/spec/shakapacker/test_app/app/javascript/entrypoints/application.js +10 -0
- data/spec/shakapacker/test_app/app/javascript/entrypoints/generated/something.js +2 -0
- data/spec/shakapacker/test_app/app/javascript/entrypoints/multi_entry.css +4 -0
- data/spec/shakapacker/test_app/app/javascript/entrypoints/multi_entry.js +4 -0
- data/spec/{test_app/bin/webpacker-dev-server → shakapacker/test_app/bin/shakapacker} +3 -3
- data/spec/{test_app/bin/webpacker → shakapacker/test_app/bin/shakapacker-dev-server} +3 -3
- data/spec/{test_app → shakapacker/test_app}/config/application.rb +1 -1
- data/spec/shakapacker/test_app/config/environment.rb +4 -0
- data/spec/shakapacker/test_app/config/initializers/inspect_autoload_paths.rb +1 -0
- data/spec/shakapacker/test_app/config/shakapacker.yml +82 -0
- data/spec/shakapacker/test_app/config/shakapacker_css_extract_ignore_order_warnings.yml +84 -0
- data/spec/shakapacker/test_app/config/shakapacker_defaults_fallback.yml +11 -0
- data/spec/shakapacker/test_app/config/shakapacker_manifest_path.yml +80 -0
- data/spec/shakapacker/test_app/config/shakapacker_nested_entries.yml +83 -0
- data/spec/shakapacker/test_app/config/shakapacker_no_precompile.yml +7 -0
- data/spec/shakapacker/test_app/config/shakapacker_other_location.yml +85 -0
- data/spec/shakapacker/test_app/config/shakapacker_public_root.yml +18 -0
- data/spec/shakapacker/test_app/config/webpack/webpack.config.js +0 -0
- data/spec/shakapacker/test_app/config.ru +5 -0
- data/spec/shakapacker/test_app/public/packs/manifest.json +58 -0
- data/spec/shakapacker/test_app/some.config.js +0 -0
- data/spec/shakapacker/test_app/yarn.lock +11 -0
- data/spec/{version_checker_spec.rb → shakapacker/version_checker_spec.rb} +25 -24
- data/spec/shakapacker/webpack_runner_spec.rb +55 -0
- data/spec/spec_helper.rb +0 -25
- metadata +253 -72
- data/config/webpacker.yml +0 -1
- data/gemfiles/Gemfile-rails.5.2.x +0 -9
- data/lib/webpacker/railtie.rb +0 -70
- data/lib/webpacker/runner.rb +0 -23
- data/package/configPath.js +0 -3
- data/package/inliningCss.js +0 -7
- data/spec/rake_tasks_spec.rb +0 -32
- data/spec/test_app/config/webpacker_no_precompile.yml +0 -7
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/Rakefile +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/app/packs/entrypoints/generated/something.js +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/app/packs/entrypoints/multi_entry.css +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/app/packs/entrypoints/multi_entry.js +0 -0
- /data/{lib/install → spec/backward_compatibility_specs/webpacker_test_app}/bin/webpacker-dev-server +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/environment.rb +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/initializers/inspect_autoload_paths.rb +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/webpack/webpack.config.js +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/webpacker_manifest_path.yml +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config/webpacker_nested_entries.yml +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/config.ru +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/public/packs/manifest.json +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/some.config.js +0 -0
- /data/spec/{test_app → backward_compatibility_specs/webpacker_test_app}/yarn.lock +0 -0
- /data/spec/{test_app → shakapacker/test_app}/package.json +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
$test_app_autoload_paths_in_initializer = ActiveSupport::Dependencies.autoload_paths
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Note: You must restart bin/shakapacker-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
source_path: app/javascript
|
5
|
+
source_entry_path: entrypoints
|
6
|
+
nested_entries: false
|
7
|
+
public_root_path: public
|
8
|
+
public_output_path: packs
|
9
|
+
cache_path: tmp/shakapacker
|
10
|
+
webpack_compile_output: false
|
11
|
+
webpack_loader: babel
|
12
|
+
|
13
|
+
# Location for manifest.json, defaults to {public_output_path}/manifest.json if unset
|
14
|
+
# manifest_path: public/packs/manifest.json
|
15
|
+
|
16
|
+
# Additional paths webpack should look up modules
|
17
|
+
# ['app/assets', 'engine/foo/app/assets']
|
18
|
+
additional_paths:
|
19
|
+
- app/assets
|
20
|
+
- /etc/yarn
|
21
|
+
- some.config.js
|
22
|
+
- app/elm
|
23
|
+
|
24
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
25
|
+
cache_manifest: false
|
26
|
+
|
27
|
+
static_assets_extensions:
|
28
|
+
- .jpg
|
29
|
+
- .jpeg
|
30
|
+
- .png
|
31
|
+
- .gif
|
32
|
+
- .tiff
|
33
|
+
- .ico
|
34
|
+
- .svg
|
35
|
+
|
36
|
+
extensions:
|
37
|
+
- .mjs
|
38
|
+
- .js
|
39
|
+
|
40
|
+
development:
|
41
|
+
<<: *default
|
42
|
+
compile: true
|
43
|
+
ensure_consistent_versioning: true
|
44
|
+
|
45
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
46
|
+
dev_server:
|
47
|
+
host: localhost
|
48
|
+
port: 3035
|
49
|
+
public: localhost:3035
|
50
|
+
hmr: false
|
51
|
+
overlay: true
|
52
|
+
disable_host_check: true
|
53
|
+
use_local_ip: false
|
54
|
+
pretty: false
|
55
|
+
|
56
|
+
test:
|
57
|
+
<<: *default
|
58
|
+
compile: true
|
59
|
+
|
60
|
+
# Compile test packs to a separate directory
|
61
|
+
public_output_path: packs-test
|
62
|
+
|
63
|
+
production:
|
64
|
+
<<: *default
|
65
|
+
|
66
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
67
|
+
compile: false
|
68
|
+
|
69
|
+
# Cache manifest.json for performance
|
70
|
+
cache_manifest: true
|
71
|
+
|
72
|
+
staging:
|
73
|
+
<<: *default
|
74
|
+
|
75
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
76
|
+
compile: false
|
77
|
+
|
78
|
+
# Cache manifest.json for performance
|
79
|
+
cache_manifest: true
|
80
|
+
|
81
|
+
# Compile staging packs to a separate directory
|
82
|
+
public_output_path: packs-staging
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# Note: You must restart bin/shakapacker-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
source_path: app/javascript
|
5
|
+
source_entry_path: entrypoints
|
6
|
+
nested_entries: true
|
7
|
+
public_root_path: public
|
8
|
+
public_output_path: packs
|
9
|
+
cache_path: tmp/shakapacker
|
10
|
+
webpack_compile_output: false
|
11
|
+
webpack_loader: babel
|
12
|
+
css_extract_ignore_order_warnings: true
|
13
|
+
|
14
|
+
# Location for manifest.json, defaults to {public_output_path}/manifest.json if unset
|
15
|
+
# manifest_path: public/packs/manifest.json
|
16
|
+
|
17
|
+
# Additional paths webpack should look up modules
|
18
|
+
# ['app/assets', 'engine/foo/app/assets']
|
19
|
+
additional_paths:
|
20
|
+
- app/assets
|
21
|
+
- /etc/yarn
|
22
|
+
- some.config.js
|
23
|
+
- app/elm
|
24
|
+
|
25
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
26
|
+
cache_manifest: false
|
27
|
+
|
28
|
+
static_assets_extensions:
|
29
|
+
- .jpg
|
30
|
+
- .jpeg
|
31
|
+
- .png
|
32
|
+
- .gif
|
33
|
+
- .tiff
|
34
|
+
- .ico
|
35
|
+
- .svg
|
36
|
+
|
37
|
+
extensions:
|
38
|
+
- .mjs
|
39
|
+
- .js
|
40
|
+
|
41
|
+
development:
|
42
|
+
<<: *default
|
43
|
+
compile: true
|
44
|
+
ensure_consistent_versioning: true
|
45
|
+
|
46
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
47
|
+
dev_server:
|
48
|
+
https: false
|
49
|
+
host: localhost
|
50
|
+
port: 3035
|
51
|
+
public: localhost:3035
|
52
|
+
hmr: false
|
53
|
+
overlay: true
|
54
|
+
disable_host_check: true
|
55
|
+
use_local_ip: false
|
56
|
+
pretty: false
|
57
|
+
|
58
|
+
test:
|
59
|
+
<<: *default
|
60
|
+
compile: true
|
61
|
+
|
62
|
+
# Compile test packs to a separate directory
|
63
|
+
public_output_path: packs-test
|
64
|
+
|
65
|
+
production:
|
66
|
+
<<: *default
|
67
|
+
|
68
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
69
|
+
compile: false
|
70
|
+
|
71
|
+
# Cache manifest.json for performance
|
72
|
+
cache_manifest: true
|
73
|
+
|
74
|
+
staging:
|
75
|
+
<<: *default
|
76
|
+
|
77
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
78
|
+
compile: false
|
79
|
+
|
80
|
+
# Cache manifest.json for performance
|
81
|
+
cache_manifest: true
|
82
|
+
|
83
|
+
# Compile staging packs to a separate directory
|
84
|
+
public_output_path: packs-staging
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
source_path: app/javascript
|
5
|
+
source_entry_path: entrypoints
|
6
|
+
public_root_path: public
|
7
|
+
public_output_path: packs
|
8
|
+
cache_path: tmp/shakapacker
|
9
|
+
webpack_compile_output: false
|
10
|
+
|
11
|
+
# Location for manifest.json, defaults to {public_output_path}/manifest.json if unset
|
12
|
+
manifest_path: app/javascript/manifest.json
|
13
|
+
|
14
|
+
# Additional paths webpack should look up modules
|
15
|
+
# ['app/assets', 'engine/foo/app/assets']
|
16
|
+
additional_paths:
|
17
|
+
- app/assets
|
18
|
+
- /etc/yarn
|
19
|
+
- some.config.js
|
20
|
+
- app/elm
|
21
|
+
|
22
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
23
|
+
cache_manifest: false
|
24
|
+
|
25
|
+
static_assets_extensions:
|
26
|
+
- .jpg
|
27
|
+
- .jpeg
|
28
|
+
- .png
|
29
|
+
- .gif
|
30
|
+
- .tiff
|
31
|
+
- .ico
|
32
|
+
- .svg
|
33
|
+
|
34
|
+
extensions:
|
35
|
+
- .mjs
|
36
|
+
- .js
|
37
|
+
|
38
|
+
development:
|
39
|
+
<<: *default
|
40
|
+
compile: true
|
41
|
+
|
42
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
43
|
+
dev_server:
|
44
|
+
https: false
|
45
|
+
host: localhost
|
46
|
+
port: 3035
|
47
|
+
public: localhost:3035
|
48
|
+
hmr: false
|
49
|
+
overlay: true
|
50
|
+
disable_host_check: true
|
51
|
+
use_local_ip: false
|
52
|
+
pretty: false
|
53
|
+
|
54
|
+
test:
|
55
|
+
<<: *default
|
56
|
+
compile: true
|
57
|
+
|
58
|
+
# Compile test packs to a separate directory
|
59
|
+
public_output_path: packs-test
|
60
|
+
|
61
|
+
production:
|
62
|
+
<<: *default
|
63
|
+
|
64
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
65
|
+
compile: false
|
66
|
+
|
67
|
+
# Cache manifest.json for performance
|
68
|
+
cache_manifest: true
|
69
|
+
|
70
|
+
staging:
|
71
|
+
<<: *default
|
72
|
+
|
73
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
74
|
+
compile: false
|
75
|
+
|
76
|
+
# Cache manifest.json for performance
|
77
|
+
cache_manifest: true
|
78
|
+
|
79
|
+
# Compile staging packs to a separate directory
|
80
|
+
public_output_path: packs-staging
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Note: You must restart bin/shakapacker-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
source_path: app/javascript
|
5
|
+
source_entry_path: entrypoints
|
6
|
+
nested_entries: true
|
7
|
+
public_root_path: public
|
8
|
+
public_output_path: packs
|
9
|
+
cache_path: tmp/shakapacker
|
10
|
+
webpack_compile_output: false
|
11
|
+
webpack_loader: babel
|
12
|
+
|
13
|
+
# Location for manifest.json, defaults to {public_output_path}/manifest.json if unset
|
14
|
+
# manifest_path: public/packs/manifest.json
|
15
|
+
|
16
|
+
# Additional paths webpack should look up modules
|
17
|
+
# ['app/assets', 'engine/foo/app/assets']
|
18
|
+
additional_paths:
|
19
|
+
- app/assets
|
20
|
+
- /etc/yarn
|
21
|
+
- some.config.js
|
22
|
+
- app/elm
|
23
|
+
|
24
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
25
|
+
cache_manifest: false
|
26
|
+
|
27
|
+
static_assets_extensions:
|
28
|
+
- .jpg
|
29
|
+
- .jpeg
|
30
|
+
- .png
|
31
|
+
- .gif
|
32
|
+
- .tiff
|
33
|
+
- .ico
|
34
|
+
- .svg
|
35
|
+
|
36
|
+
extensions:
|
37
|
+
- .mjs
|
38
|
+
- .js
|
39
|
+
|
40
|
+
development:
|
41
|
+
<<: *default
|
42
|
+
compile: true
|
43
|
+
ensure_consistent_versioning: true
|
44
|
+
|
45
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
46
|
+
dev_server:
|
47
|
+
https: false
|
48
|
+
host: localhost
|
49
|
+
port: 3035
|
50
|
+
public: localhost:3035
|
51
|
+
hmr: false
|
52
|
+
overlay: true
|
53
|
+
disable_host_check: true
|
54
|
+
use_local_ip: false
|
55
|
+
pretty: false
|
56
|
+
|
57
|
+
test:
|
58
|
+
<<: *default
|
59
|
+
compile: true
|
60
|
+
|
61
|
+
# Compile test packs to a separate directory
|
62
|
+
public_output_path: packs-test
|
63
|
+
|
64
|
+
production:
|
65
|
+
<<: *default
|
66
|
+
|
67
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
68
|
+
compile: false
|
69
|
+
|
70
|
+
# Cache manifest.json for performance
|
71
|
+
cache_manifest: true
|
72
|
+
|
73
|
+
staging:
|
74
|
+
<<: *default
|
75
|
+
|
76
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
77
|
+
compile: false
|
78
|
+
|
79
|
+
# Cache manifest.json for performance
|
80
|
+
cache_manifest: true
|
81
|
+
|
82
|
+
# Compile staging packs to a separate directory
|
83
|
+
public_output_path: packs-staging
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# Note: You must restart bin/shakapacker-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
source_path: app/javascript
|
5
|
+
source_entry_path: entrypoints
|
6
|
+
public_root_path: public
|
7
|
+
public_output_path: packs
|
8
|
+
cache_path: tmp/cache/shakapacker
|
9
|
+
webpack_compile_output: false
|
10
|
+
|
11
|
+
# Additional paths webpack should look up modules
|
12
|
+
# ['app/assets', 'engine/foo/app/assets']
|
13
|
+
additional_paths:
|
14
|
+
- app/assets
|
15
|
+
- /etc/yarn
|
16
|
+
- some.config.js
|
17
|
+
- app/elm
|
18
|
+
|
19
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
20
|
+
cache_manifest: false
|
21
|
+
|
22
|
+
static_assets_extensions:
|
23
|
+
- .jpg
|
24
|
+
- .jpeg
|
25
|
+
- .png
|
26
|
+
- .gif
|
27
|
+
- .tiff
|
28
|
+
- .ico
|
29
|
+
- .svg
|
30
|
+
|
31
|
+
extensions:
|
32
|
+
- .mjs
|
33
|
+
- .js
|
34
|
+
|
35
|
+
development:
|
36
|
+
<<: *default
|
37
|
+
compile: true
|
38
|
+
|
39
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
40
|
+
dev_server:
|
41
|
+
https: false
|
42
|
+
host: localhost
|
43
|
+
port: 3035
|
44
|
+
public: localhost:3035
|
45
|
+
hmr: false
|
46
|
+
# If HMR is on, CSS will by inlined by delivering it as part of the script payload via style-loader. Be sure
|
47
|
+
# that you add style-loader to your project dependencies.
|
48
|
+
#
|
49
|
+
# If you want to instead deliver CSS via <link> with the mini-extract-css-plugin, set inline_css to false.
|
50
|
+
# In that case, style-loader is not needed as a dependency.
|
51
|
+
#
|
52
|
+
# mini-extract-css-plugin is a required dependency in both cases.
|
53
|
+
inline_css: true
|
54
|
+
overlay: true
|
55
|
+
disable_host_check: true
|
56
|
+
use_local_ip: false
|
57
|
+
pretty: false
|
58
|
+
|
59
|
+
test:
|
60
|
+
<<: *default
|
61
|
+
compile: true
|
62
|
+
|
63
|
+
# Compile test packs to a separate directory
|
64
|
+
public_output_path: packs-test
|
65
|
+
|
66
|
+
production:
|
67
|
+
<<: *default
|
68
|
+
|
69
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
70
|
+
compile: false
|
71
|
+
|
72
|
+
# Cache manifest.json for performance
|
73
|
+
cache_manifest: true
|
74
|
+
|
75
|
+
staging:
|
76
|
+
<<: *default
|
77
|
+
|
78
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
79
|
+
compile: false
|
80
|
+
|
81
|
+
# Cache manifest.json for performance
|
82
|
+
cache_manifest: true
|
83
|
+
|
84
|
+
# Compile staging packs to a separate directory
|
85
|
+
public_output_path: packs-staging
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Note: You must restart bin/shakapacker-dev-server for changes to take effect
|
2
|
+
|
3
|
+
default: &default
|
4
|
+
public_root_path: ../public
|
5
|
+
|
6
|
+
development:
|
7
|
+
<<: *default
|
8
|
+
compile: true
|
9
|
+
|
10
|
+
test:
|
11
|
+
<<: *default
|
12
|
+
compile: true
|
13
|
+
public_output_path: packs-test
|
14
|
+
|
15
|
+
production:
|
16
|
+
<<: *default
|
17
|
+
compile: false
|
18
|
+
cache_manifest: true
|
File without changes
|
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"bootstrap.css": "/packs/bootstrap-c38deda30895059837cf.css",
|
3
|
+
"application.css": "/packs/application-dd6b1cd38bfa093df600.css",
|
4
|
+
"bootstrap.js": "/packs/bootstrap-300631c4f0e0f9c865bc.js",
|
5
|
+
"main.js": "/packs/main-e323a53c7f30f5d53cbb.js",
|
6
|
+
"application.js": "/packs/application-k344a6d59eef8632c9d1.js",
|
7
|
+
"application.png": "/packs/application-k344a6d59eef8632c9d1.png",
|
8
|
+
"fonts/fa-regular-400.woff2": "/packs/fonts/fa-regular-400-944fb546bd7018b07190a32244f67dc9.woff2",
|
9
|
+
"static/image.jpg": "/packs/static/image-c38deda30895059837cf.jpg",
|
10
|
+
"static/image-2x.jpg": "/packs/static/image-2x-7cca48e6cae66ec07b8e.jpg",
|
11
|
+
"static/nested/image.jpg": "/packs/static/nested/image-c38deda30895059837cf.jpg",
|
12
|
+
"static/mb-icon.png": "/packs/static/mb-icon-c38deda30895059837cf.png",
|
13
|
+
"static/nested/mb-icon.png": "/packs/static/nested/mb-icon-c38deda30895059837cf.png",
|
14
|
+
"entrypoints": {
|
15
|
+
"application": {
|
16
|
+
"assets": {
|
17
|
+
"js": [
|
18
|
+
"/packs/vendors~application~bootstrap-c20632e7baf2c81200d3.chunk.js",
|
19
|
+
"/packs/vendors~application-e55f2aae30c07fb6d82a.chunk.js",
|
20
|
+
"/packs/application-k344a6d59eef8632c9d1.js"
|
21
|
+
],
|
22
|
+
"css": [
|
23
|
+
"/packs/1-c20632e7baf2c81200d3.chunk.css",
|
24
|
+
"/packs/application-k344a6d59eef8632c9d1.chunk.css"
|
25
|
+
]
|
26
|
+
}
|
27
|
+
},
|
28
|
+
"bootstrap": {
|
29
|
+
"assets": {
|
30
|
+
"js": [
|
31
|
+
"/packs/bootstrap-300631c4f0e0f9c865bc.js"
|
32
|
+
]
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"main": {
|
36
|
+
"assets": {
|
37
|
+
"js": [
|
38
|
+
"/packs/main-e323a53c7f30f5d53cbb.js"
|
39
|
+
]
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"hello_stimulus": {
|
43
|
+
"assets": {
|
44
|
+
"css": [
|
45
|
+
"/packs/1-c20632e7baf2c81200d3.chunk.css",
|
46
|
+
"/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css"
|
47
|
+
]
|
48
|
+
}
|
49
|
+
},
|
50
|
+
"print/application": {
|
51
|
+
"assets": {
|
52
|
+
"css": [
|
53
|
+
"/packs/print/application-983b6c164a47f7ed49cd.css"
|
54
|
+
]
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
2
|
+
# yarn lockfile v1
|
3
|
+
|
4
|
+
|
5
|
+
left-pad@^1.2.0:
|
6
|
+
version "1.2.0"
|
7
|
+
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
|
8
|
+
|
9
|
+
right-pad@^1.0.1:
|
10
|
+
version "1.0.1"
|
11
|
+
resolved "https://registry.yarnpkg.com/right-pad/-/right-pad-1.0.1.tgz#8ca08c2cbb5b55e74dafa96bf7fd1a27d568c8d0"
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
require_relative "spec_helper_initializer"
|
2
|
+
require "shakapacker/version"
|
2
3
|
|
3
4
|
class NodePackageVersionDouble
|
4
5
|
attr_reader :raw, :major_minor_patch
|
@@ -20,10 +21,10 @@ class NodePackageVersionDouble
|
|
20
21
|
end
|
21
22
|
|
22
23
|
describe "VersionChecker" do
|
23
|
-
def check_version(node_package_version, stub_gem_version =
|
24
|
-
version_checker =
|
24
|
+
def check_version(node_package_version, stub_gem_version = Shakapacker::VERSION, stub_config = true)
|
25
|
+
version_checker = Shakapacker::VersionChecker.new(node_package_version)
|
25
26
|
allow(version_checker).to receive(:gem_version).and_return(stub_gem_version)
|
26
|
-
allow(
|
27
|
+
allow(Shakapacker.config).to receive(:ensure_consistent_versioning?).and_return(stub_config)
|
27
28
|
|
28
29
|
version_checker.raise_if_gem_and_node_package_versions_differ
|
29
30
|
end
|
@@ -32,7 +33,7 @@ describe "VersionChecker" do
|
|
32
33
|
node_package_version = NodePackageVersionDouble.new(raw: "6.1.0", major_minor_patch: ["6", "1", "0"])
|
33
34
|
|
34
35
|
expect { check_version(node_package_version, "6.0.0", false) }
|
35
|
-
.to output(/
|
36
|
+
.to output(/Shakapacker::VersionChecker - Version mismatch/)
|
36
37
|
.to_stderr
|
37
38
|
end
|
38
39
|
|
@@ -40,7 +41,7 @@ describe "VersionChecker" do
|
|
40
41
|
node_package_version = NodePackageVersionDouble.new(raw: "^6.1.0", major_minor_patch: ["6", "1", "0"], semver_wildcard: true)
|
41
42
|
|
42
43
|
expect { check_version(node_package_version, "6.0.0", false) }
|
43
|
-
.to output(/
|
44
|
+
.to output(/Shakapacker::VersionChecker - Semver wildcard without a lockfile detected/)
|
44
45
|
.to_stderr
|
45
46
|
end
|
46
47
|
|
@@ -48,28 +49,28 @@ describe "VersionChecker" do
|
|
48
49
|
node_package_version = NodePackageVersionDouble.new(raw: "6.1.0", major_minor_patch: ["6", "1", "0"])
|
49
50
|
|
50
51
|
expect { check_version(node_package_version, "7.0.0") }
|
51
|
-
.to raise_error(/\*\*ERROR\*\*
|
52
|
+
.to raise_error(/\*\*ERROR\*\* Shakapacker: Shakapacker gem and node package versions do not match/)
|
52
53
|
end
|
53
54
|
|
54
55
|
it "raises exception on different minor version" do
|
55
56
|
node_package_version = NodePackageVersionDouble.new(raw: "6.1.0", major_minor_patch: ["6", "1", "0"])
|
56
57
|
|
57
58
|
expect { check_version(node_package_version, "6.2.0") }
|
58
|
-
.to raise_error(/\*\*ERROR\*\*
|
59
|
+
.to raise_error(/\*\*ERROR\*\* Shakapacker: Shakapacker gem and node package versions do not match/)
|
59
60
|
end
|
60
61
|
|
61
62
|
it "raises exception on different patch version" do
|
62
63
|
node_package_version = NodePackageVersionDouble.new(raw: "6.1.1", major_minor_patch: ["6", "1", "1"])
|
63
64
|
|
64
65
|
expect { check_version(node_package_version, "6.1.2") }
|
65
|
-
.to raise_error(/\*\*ERROR\*\*
|
66
|
+
.to raise_error(/\*\*ERROR\*\* Shakapacker: Shakapacker gem and node package versions do not match/)
|
66
67
|
end
|
67
68
|
|
68
69
|
it "raises exception on semver wildcard" do
|
69
70
|
node_package_version = NodePackageVersionDouble.new(raw: "^6.0.0", major_minor_patch: ["6", "0", "0"], semver_wildcard: true)
|
70
71
|
|
71
72
|
expect { check_version(node_package_version, "6.0.0") }
|
72
|
-
.to raise_error(/\*\*ERROR\*\*
|
73
|
+
.to raise_error(/\*\*ERROR\*\* Shakapacker: Your node package version for shakapacker contains a \^ or ~/)
|
73
74
|
end
|
74
75
|
|
75
76
|
it "doesn't raise exception on matching versions" do
|
@@ -100,8 +101,8 @@ end
|
|
100
101
|
describe "VersionChecker::NodePackageVersion" do
|
101
102
|
context "with no yarn.lock file" do
|
102
103
|
def node_package_version(fixture_version:)
|
103
|
-
|
104
|
-
File.expand_path("fixtures/#{fixture_version}_package.json", __dir__),
|
104
|
+
Shakapacker::VersionChecker::NodePackageVersion.new(
|
105
|
+
File.expand_path("../fixtures/#{fixture_version}_package.json", __dir__),
|
105
106
|
"file/does/not/exist",
|
106
107
|
"file/does/not/exist"
|
107
108
|
)
|
@@ -270,9 +271,9 @@ describe "VersionChecker::NodePackageVersion" do
|
|
270
271
|
|
271
272
|
context "with yarn.lock v1" do
|
272
273
|
def node_package_version(fixture_version:)
|
273
|
-
|
274
|
-
File.expand_path("fixtures/#{fixture_version}_package.json", __dir__),
|
275
|
-
File.expand_path("fixtures/#{fixture_version}_yarn.v1.lock", __dir__),
|
274
|
+
Shakapacker::VersionChecker::NodePackageVersion.new(
|
275
|
+
File.expand_path("../fixtures/#{fixture_version}_package.json", __dir__),
|
276
|
+
File.expand_path("../fixtures/#{fixture_version}_yarn.v1.lock", __dir__),
|
276
277
|
"file/does/not/exist"
|
277
278
|
)
|
278
279
|
end
|
@@ -440,9 +441,9 @@ describe "VersionChecker::NodePackageVersion" do
|
|
440
441
|
|
441
442
|
context "with yarn.lock v2" do
|
442
443
|
def node_package_version(fixture_version:)
|
443
|
-
|
444
|
-
File.expand_path("fixtures/#{fixture_version}_package.json", __dir__),
|
445
|
-
File.expand_path("fixtures/#{fixture_version}_yarn.v2.lock", __dir__),
|
444
|
+
Shakapacker::VersionChecker::NodePackageVersion.new(
|
445
|
+
File.expand_path("../fixtures/#{fixture_version}_package.json", __dir__),
|
446
|
+
File.expand_path("../fixtures/#{fixture_version}_yarn.v2.lock", __dir__),
|
446
447
|
"file/does/not/exist"
|
447
448
|
)
|
448
449
|
end
|
@@ -610,10 +611,10 @@ describe "VersionChecker::NodePackageVersion" do
|
|
610
611
|
|
611
612
|
context "with package-lock.json v1" do
|
612
613
|
def node_package_version(fixture_version:)
|
613
|
-
|
614
|
-
File.expand_path("fixtures/#{fixture_version}_package.json", __dir__),
|
614
|
+
Shakapacker::VersionChecker::NodePackageVersion.new(
|
615
|
+
File.expand_path("../fixtures/#{fixture_version}_package.json", __dir__),
|
615
616
|
"file/does/not/exist",
|
616
|
-
File.expand_path("fixtures/#{fixture_version}_package-lock.v1.json", __dir__),
|
617
|
+
File.expand_path("../fixtures/#{fixture_version}_package-lock.v1.json", __dir__),
|
617
618
|
)
|
618
619
|
end
|
619
620
|
|
@@ -780,10 +781,10 @@ describe "VersionChecker::NodePackageVersion" do
|
|
780
781
|
|
781
782
|
context "with package-lock.json v2" do
|
782
783
|
def node_package_version(fixture_version:)
|
783
|
-
|
784
|
-
File.expand_path("fixtures/#{fixture_version}_package.json", __dir__),
|
784
|
+
Shakapacker::VersionChecker::NodePackageVersion.new(
|
785
|
+
File.expand_path("../fixtures/#{fixture_version}_package.json", __dir__),
|
785
786
|
"file/does/not/exist",
|
786
|
-
File.expand_path("fixtures/#{fixture_version}_package-lock.v2.json", __dir__),
|
787
|
+
File.expand_path("../fixtures/#{fixture_version}_package-lock.v2.json", __dir__),
|
787
788
|
)
|
788
789
|
end
|
789
790
|
|