shakapacker 7.0.3 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/dummy.yml +3 -1
- data/.github/workflows/generator.yml +3 -1
- data/.github/workflows/jest.yml +4 -2
- data/.github/workflows/js-lint.yml +4 -2
- data/.github/workflows/rubocop.yml +3 -1
- data/.github/workflows/ruby-backward-compatibility.yml +3 -1
- data/.github/workflows/ruby.yml +4 -2
- data/CHANGELOG.md +7 -0
- data/README.md +29 -20
- data/docs/troubleshooting.md +4 -8
- data/docs/using_esbuild_loader.md +2 -4
- data/lib/install/template.rb +2 -2
- data/lib/shakapacker/deprecation_helper.rb +1 -1
- data/lib/shakapacker/dev_server_runner.rb +2 -1
- data/lib/shakapacker/version.rb +1 -1
- data/lib/shakapacker/version_checker.rb +35 -2
- data/lib/shakapacker/webpack_runner.rb +4 -3
- data/package/__tests__/index.js +24 -0
- data/package/index.d.ts +1 -1
- data/package/index.js +8 -2
- data/package.json +1 -1
- data/spec/backward_compatibility_specs/compiler_strategy_spec.rb +5 -3
- data/spec/backward_compatibility_specs/configuration_spec.rb +12 -4
- data/spec/backward_compatibility_specs/dev_server_runner_spec.rb +17 -16
- data/spec/backward_compatibility_specs/dev_server_spec.rb +1 -1
- data/spec/backward_compatibility_specs/digest_strategy_spec.rb +2 -0
- data/spec/backward_compatibility_specs/engine_rake_tasks_spec.rb +2 -1
- data/spec/backward_compatibility_specs/helper_spec.rb +20 -20
- data/spec/backward_compatibility_specs/instance_spec.rb +3 -3
- data/spec/backward_compatibility_specs/manifest_spec.rb +12 -12
- data/spec/backward_compatibility_specs/mtime_strategy_spec.rb +3 -3
- data/spec/backward_compatibility_specs/rake_tasks_spec.rb +9 -5
- data/spec/backward_compatibility_specs/webpack_runner_spec.rb +14 -18
- data/spec/dummy/config/webpack/commonWebpackConfig.js +1 -1
- data/spec/fixtures/beta_pnpm-lock.v7.yaml +116 -0
- data/spec/fixtures/beta_pnpm-lock.v8.yaml +2537 -0
- data/spec/fixtures/git_url_pnpm-lock.v7.yaml +126 -0
- data/spec/fixtures/git_url_pnpm-lock.v8.yaml +3728 -0
- data/spec/fixtures/github_url_pnpm-lock.v7.yaml +126 -0
- data/spec/fixtures/github_url_pnpm-lock.v8.yaml +3728 -0
- data/spec/fixtures/relative_path_pnpm-lock.v7.yaml +18 -0
- data/spec/fixtures/relative_path_pnpm-lock.v8.yaml +22 -0
- data/spec/fixtures/semver_caret_pnpm-lock.v7.yaml +117 -0
- data/spec/fixtures/semver_caret_pnpm-lock.v8.yaml +2558 -0
- data/spec/fixtures/semver_exact_pnpm-lock.v7.yaml +117 -0
- data/spec/fixtures/semver_exact_pnpm-lock.v8.yaml +2558 -0
- data/spec/fixtures/semver_tilde_pnpm-lock.v7.yaml +116 -0
- data/spec/fixtures/semver_tilde_pnpm-lock.v8.yaml +2558 -0
- data/spec/fixtures/without_pnpm-lock.v7.yaml +23 -0
- data/spec/fixtures/without_pnpm-lock.v8.yaml +27 -0
- data/spec/generator_specs/generator_spec.rb +7 -3
- data/spec/shakapacker/compiler_strategy_spec.rb +5 -3
- data/spec/shakapacker/configuration_spec.rb +12 -2
- data/spec/shakapacker/dev_server_runner_spec.rb +22 -16
- data/spec/shakapacker/dev_server_spec.rb +1 -1
- data/spec/shakapacker/digest_strategy_spec.rb +2 -0
- data/spec/shakapacker/engine_rake_tasks_spec.rb +2 -1
- data/spec/shakapacker/helper_spec.rb +20 -20
- data/spec/shakapacker/instance_spec.rb +2 -2
- data/spec/shakapacker/manifest_spec.rb +12 -12
- data/spec/shakapacker/mtime_strategy_spec.rb +3 -3
- data/spec/shakapacker/rake_tasks_spec.rb +5 -2
- data/spec/shakapacker/shakapacker_spec.rb +4 -4
- data/spec/shakapacker/version_checker_spec.rb +468 -121
- data/spec/shakapacker/webpack_runner_spec.rb +14 -18
- metadata +19 -3
@@ -18,22 +18,25 @@ describe "RakeTasks" do
|
|
18
18
|
|
19
19
|
it "`shakapacker:check_binstubs` doesn't get 'webpack binstub not found' error" do
|
20
20
|
output = Dir.chdir(TEST_APP_PATH) { `rake shakapacker:check_binstubs 2>&1` }
|
21
|
+
|
21
22
|
expect(output).to_not include "webpack binstub not found."
|
22
23
|
end
|
23
24
|
|
24
25
|
it "`shakapacker:check_node` doesn't get 'shakapacker requires Node.js' error" do
|
25
26
|
output = Dir.chdir(TEST_APP_PATH) { `rake shakapacker:check_node 2>&1` }
|
27
|
+
|
26
28
|
expect(output).to_not include "Shakapacker requires Node.js"
|
27
29
|
end
|
28
30
|
|
29
|
-
it "`shakapacker:check_yarn` doesn't get
|
31
|
+
it "`shakapacker:check_yarn` doesn't get errors related to yarn" do
|
30
32
|
output = Dir.chdir(TEST_APP_PATH) { `rake shakapacker:check_yarn 2>&1` }
|
33
|
+
|
31
34
|
expect(output).to_not include "Yarn not installed"
|
32
35
|
expect(output).to_not include "Shakapacker requires Yarn"
|
33
36
|
end
|
34
37
|
|
35
38
|
describe "`shakapacker:check_binstubs`" do
|
36
|
-
def with_temporary_file(file_name
|
39
|
+
def with_temporary_file(file_name)
|
37
40
|
FileUtils.touch(file_name, verbose: false)
|
38
41
|
yield if block_given?
|
39
42
|
ensure
|
@@ -12,11 +12,11 @@ describe "Shakapacker" do
|
|
12
12
|
allow(dev_server).to receive(:running?).and_return(true)
|
13
13
|
end
|
14
14
|
|
15
|
-
it "returns nil
|
15
|
+
it "returns nil when the dev server is disabled" do
|
16
16
|
expect(Shakapacker.inlining_css?).to be nil
|
17
17
|
end
|
18
18
|
|
19
|
-
it "returns true
|
19
|
+
it "returns true when hmr is enabled" do
|
20
20
|
allow(dev_server).to receive(:hmr?).and_return(true)
|
21
21
|
allow(dev_server).to receive(:inline_css?).and_return(true)
|
22
22
|
|
@@ -25,7 +25,7 @@ describe "Shakapacker" do
|
|
25
25
|
expect(Shakapacker.inlining_css?).to be true
|
26
26
|
end
|
27
27
|
|
28
|
-
it "returns false
|
28
|
+
it "returns false when hmr is enabled and inline_css is explicitly set to false" do
|
29
29
|
allow(dev_server).to receive(:hmr?).and_return(true)
|
30
30
|
allow(dev_server).to receive(:inline_css?).and_return(false)
|
31
31
|
|
@@ -35,7 +35,7 @@ describe "Shakapacker" do
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
it "
|
38
|
+
it "automatically cleans up app_autoload_paths" do
|
39
39
|
expect($test_app_autoload_paths_in_initializer).to eq []
|
40
40
|
end
|
41
41
|
end
|