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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78b70cacbde999707fcbdf1d0f45a192e21c7e5eef5e9f5709835b9dcadd3824
|
4
|
+
data.tar.gz: 1110ce2c14512b80243f70d6273565e01983cac159c002e044c9fc732c425c9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 266bd0b3cd20a82d6b1d910e9b2a442c498c2a3dc259bc487604c80993e55fbbff81c0733b66edb8abc7215cc8b5252e60fa6b08c5c0608e3d7cf4f07c07e112
|
7
|
+
data.tar.gz: 2855f15d2c926a7a0bc3f6075dd46e75ab68368edbe98e19d3360a02bcbb271c0fa06a563b1c1ac5c89635862ef005e88680ef28df2c249cd3b9dfe3c6864faf
|
data/.eslintignore
CHANGED
data/.eslintrc.js
CHANGED
@@ -1,15 +1,36 @@
|
|
1
1
|
module.exports = {
|
2
|
-
extends: [
|
2
|
+
extends: ["airbnb", "plugin:prettier/recommended"],
|
3
3
|
rules: {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
"indent": ["error", 2],
|
9
|
-
semi: ['error', 'never']
|
4
|
+
"import/no-unresolved": "off",
|
5
|
+
"import/no-extraneous-dependencies": "off",
|
6
|
+
"import/extensions": "off",
|
7
|
+
indent: ["error", 2]
|
10
8
|
},
|
11
9
|
env: {
|
12
10
|
browser: true,
|
13
11
|
node: true
|
14
|
-
}
|
12
|
+
},
|
13
|
+
overrides: [
|
14
|
+
{
|
15
|
+
files: ["test/**"],
|
16
|
+
extends: ["plugin:jest/recommended", "plugin:jest/style"],
|
17
|
+
rules: {
|
18
|
+
"global-require": "off",
|
19
|
+
"jest/prefer-called-with": "error",
|
20
|
+
"jest/no-conditional-in-test": "error",
|
21
|
+
"jest/no-test-return-statement": "error",
|
22
|
+
"jest/prefer-expect-resolves": "error",
|
23
|
+
"jest/require-to-throw-message": "error",
|
24
|
+
"jest/require-top-level-describe": "error",
|
25
|
+
"jest/prefer-hooks-on-top": "error",
|
26
|
+
"jest/prefer-lowercase-title": [
|
27
|
+
"error",
|
28
|
+
{ ignoreTopLevelDescribe: true }
|
29
|
+
],
|
30
|
+
"jest/prefer-spy-on": "error",
|
31
|
+
"jest/prefer-strict-equal": "error",
|
32
|
+
"jest/prefer-todo": "error"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
]
|
15
36
|
}
|
@@ -1,9 +1,13 @@
|
|
1
1
|
### Summary
|
2
2
|
|
3
|
-
|
3
|
+
<!--
|
4
|
+
Describe the code changes in your pull request here - were there any bugs you had fixed, features you added, tradeoffs you made?
|
5
|
+
If so, mention them. If these changes have open GitHub issues, tag them here as well to keep the conversation linked.
|
6
|
+
-->
|
4
7
|
|
5
8
|
### Pull Request checklist
|
6
|
-
|
9
|
+
|
10
|
+
<!-- If any of the items on this checklist do not apply to the PR, both check it out and wrap it by `~`. -->
|
7
11
|
|
8
12
|
- [ ] Add/update test to cover these changes
|
9
13
|
- [ ] Update documentation
|
@@ -11,4 +15,7 @@ _Remove this line after checking all the items here. If the item does not apply
|
|
11
15
|
|
12
16
|
### Other Information
|
13
17
|
|
14
|
-
|
18
|
+
<!--
|
19
|
+
Mention any other important information that might relate to this PR but that don't belong in the summary,
|
20
|
+
like detailed benchmarks or possible follow-up changes.
|
21
|
+
-->
|
data/.github/workflows/dummy.yml
CHANGED
@@ -3,9 +3,14 @@ name: Dummy specs
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
- '
|
6
|
+
- 'main'
|
7
7
|
pull_request:
|
8
8
|
|
9
|
+
concurrency:
|
10
|
+
# Pushing new changes to a branch will cancel any in-progress CI runs
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
12
|
+
cancel-in-progress: true
|
13
|
+
|
9
14
|
jobs:
|
10
15
|
test:
|
11
16
|
runs-on: ubuntu-latest
|
@@ -3,9 +3,14 @@ name: Generator specs
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
- '
|
6
|
+
- 'main'
|
7
7
|
pull_request:
|
8
8
|
|
9
|
+
concurrency:
|
10
|
+
# Pushing new changes to a branch will cancel any in-progress CI runs
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
12
|
+
cancel-in-progress: true
|
13
|
+
|
9
14
|
jobs:
|
10
15
|
test:
|
11
16
|
name: Generator specs
|
@@ -13,22 +18,21 @@ jobs:
|
|
13
18
|
strategy:
|
14
19
|
matrix:
|
15
20
|
os: [ubuntu-latest]
|
16
|
-
ruby: ['2.
|
17
|
-
use_package_json_gem: ['true', 'false']
|
21
|
+
ruby: ['2.7', '3.0', '3.1', '3.2']
|
18
22
|
gemfile:
|
19
23
|
- gemfiles/Gemfile-rails.6.0.x
|
20
24
|
- gemfiles/Gemfile-rails.6.1.x
|
21
25
|
- gemfiles/Gemfile-rails.7.0.x
|
26
|
+
- gemfiles/Gemfile-rails.7.1.x
|
22
27
|
# Uncomment the following line only to ensure compatibility with the
|
23
28
|
# upcomming Rails versions, maybe before a release.
|
24
29
|
#- gemfiles/Gemfile-rails-edge
|
25
30
|
exclude:
|
26
|
-
- ruby:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
gemfile: gemfiles/Gemfile-rails-edge
|
31
|
+
- ruby: '3.1'
|
32
|
+
gemfile: gemfiles/Gemfile-rails.6.0.x
|
33
|
+
- ruby: '3.2'
|
34
|
+
gemfile: gemfiles/Gemfile-rails.6.0.x
|
35
|
+
|
32
36
|
env:
|
33
37
|
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
34
38
|
|
@@ -39,13 +43,5 @@ jobs:
|
|
39
43
|
- uses: ruby/setup-ruby@v1
|
40
44
|
with:
|
41
45
|
ruby-version: ${{ matrix.ruby }}
|
42
|
-
|
43
|
-
- name: Use Bundler 2.4.22
|
44
|
-
run: |
|
45
|
-
gem install bundler -v '2.4.22'
|
46
|
-
bundle config --local path vendor/bundle
|
47
|
-
- name: Install dependencies
|
48
|
-
run: bundle install
|
46
|
+
bundler-cache: true
|
49
47
|
- run: bundle exec rake run_spec:generator
|
50
|
-
env:
|
51
|
-
SHAKAPACKER_USE_PACKAGE_JSON_GEM: ${{ matrix.use_package_json_gem }}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
name: Node based checks
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- 'main'
|
7
|
+
pull_request:
|
8
|
+
|
9
|
+
concurrency:
|
10
|
+
# Pushing new changes to a branch will cancel any in-progress CI runs
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
12
|
+
cancel-in-progress: true
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
lint:
|
16
|
+
name: Linting
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v4
|
21
|
+
with:
|
22
|
+
persist-credentials: false
|
23
|
+
- uses: actions/setup-node@v4
|
24
|
+
with:
|
25
|
+
node-version: 20.x
|
26
|
+
cache: yarn
|
27
|
+
|
28
|
+
- name: Install dependencies
|
29
|
+
run: yarn --frozen-lockfile --non-interactive --prefer-offline
|
30
|
+
|
31
|
+
- name: Node eslint
|
32
|
+
run: yarn lint
|
33
|
+
test:
|
34
|
+
name: Testing
|
35
|
+
strategy:
|
36
|
+
matrix:
|
37
|
+
os: [ubuntu-latest]
|
38
|
+
node: [14.x, 16.x, 18.x, 20.x]
|
39
|
+
|
40
|
+
runs-on: ${{ matrix.os }}
|
41
|
+
|
42
|
+
steps:
|
43
|
+
- uses: actions/checkout@v4
|
44
|
+
with:
|
45
|
+
persist-credentials: false
|
46
|
+
- name: Use Node.js ${{ matrix.node }}
|
47
|
+
uses: actions/setup-node@v3
|
48
|
+
with:
|
49
|
+
node-version: ${{ matrix.node }}
|
50
|
+
cache: yarn
|
51
|
+
|
52
|
+
- name: Install dependencies
|
53
|
+
run: yarn --frozen-lockfile --non-interactive --prefer-offline
|
54
|
+
|
55
|
+
- name: Jest Specs
|
56
|
+
run: yarn test
|
data/.github/workflows/ruby.yml
CHANGED
@@ -1,33 +1,52 @@
|
|
1
|
-
name: Ruby
|
1
|
+
name: Ruby based checks
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
- '
|
6
|
+
- 'main'
|
7
7
|
pull_request:
|
8
8
|
|
9
|
+
concurrency:
|
10
|
+
# Pushing new changes to a branch will cancel any in-progress CI runs
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
12
|
+
cancel-in-progress: true
|
13
|
+
|
9
14
|
jobs:
|
15
|
+
lint:
|
16
|
+
name: Linting
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
with:
|
21
|
+
persist-credentials: false
|
22
|
+
- uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: '3.2'
|
25
|
+
bundler-cache: true
|
26
|
+
|
27
|
+
- name: Ruby rubocop
|
28
|
+
run: bundle exec rubocop
|
29
|
+
|
10
30
|
test:
|
11
|
-
name:
|
31
|
+
name: Testing
|
12
32
|
runs-on: ${{ matrix.os }}
|
13
33
|
strategy:
|
14
34
|
matrix:
|
15
35
|
os: [ubuntu-latest]
|
16
|
-
ruby: ['2.
|
36
|
+
ruby: ['2.7', '3.0', '3.1', '3.2']
|
17
37
|
gemfile:
|
18
38
|
- gemfiles/Gemfile-rails.6.0.x
|
19
39
|
- gemfiles/Gemfile-rails.6.1.x
|
20
40
|
- gemfiles/Gemfile-rails.7.0.x
|
41
|
+
- gemfiles/Gemfile-rails.7.1.x
|
21
42
|
# Uncomment the following line only to ensure compatibility with the
|
22
43
|
# upcomming Rails versions, maybe before a release.
|
23
44
|
#- gemfiles/Gemfile-rails-edge
|
24
45
|
exclude:
|
25
|
-
- ruby:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
os: ubuntu-latest
|
30
|
-
gemfile: gemfiles/Gemfile-rails-edge
|
46
|
+
- ruby: '3.1'
|
47
|
+
gemfile: gemfiles/Gemfile-rails.6.0.x
|
48
|
+
- ruby: '3.2'
|
49
|
+
gemfile: gemfiles/Gemfile-rails.6.0.x
|
31
50
|
|
32
51
|
env:
|
33
52
|
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
@@ -43,10 +62,3 @@ jobs:
|
|
43
62
|
|
44
63
|
- name: Ruby specs
|
45
64
|
run: bundle exec rake run_spec:gem
|
46
|
-
env:
|
47
|
-
SHAKAPACKER_USE_PACKAGE_JSON_GEM: "false"
|
48
|
-
|
49
|
-
- name: Ruby specs
|
50
|
-
run: bundle exec rake run_spec:gem
|
51
|
-
env:
|
52
|
-
SHAKAPACKER_USE_PACKAGE_JSON_GEM: "true"
|
data/.node-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
21.0.0
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,20 +1,70 @@
|
|
1
1
|
* For the changelog of versions prior to v6, see the [5.x stable branch of rails/webpacker](https://github.com/rails/webpacker/tree/5-x-stable).
|
2
|
+
* Please see the [v8 Upgrade Guide](./docs/v8_upgrade.md) for upgrading to version 8 and accounting for breaking changes.
|
2
3
|
* Please see the [v7 Upgrade Guide](./docs/v7_upgrade.md) for upgrading to new spelling in version 7.
|
3
4
|
* Please see the [v6 Upgrade Guide](./docs/v6_upgrade.md) to go from versions prior to v6.
|
4
5
|
* [ShakaCode](https://www.shakacode.com) offers support for upgrading from Webpacker or using Shakapacker. If interested, contact Justin Gordon, [justin@shakacode.com](mailto:justin@shakacode.com).
|
5
6
|
|
7
|
+
_next_ branch is for v8 changes
|
8
|
+
|
6
9
|
## Versions
|
7
10
|
## [Unreleased]
|
8
11
|
Changes since the last non-beta release.
|
9
12
|
|
13
|
+
### Breaking changes
|
14
|
+
- Remove `relative_url_root` [PR 413](https://github.com/shakacode/shakapacker/pull/413) by [G-Rath](https://github.com/g-rath).
|
15
|
+
|
16
|
+
- Removes deprecated support of `Webpacker` spelling, config variables and constants. [PR 429](https://github.com/shakacode/shakapacker/pull/429) by [tomdracz](https://github.com/tomdracz).
|
17
|
+
|
18
|
+
The usage of those has been deprecated in Shakapacker v7 and now fully removed in v8. See the [v7 Upgrade Guide](./docs/v7_upgrade.md) for more information if you are still yet to address this deprecation.
|
19
|
+
|
20
|
+
- Remove `globalMutableWebpackConfig` global [PR 439](https://github.com/shakacode/shakapacker/pull/439) by [G-Rath](https://github.com/g-rath).
|
21
|
+
|
22
|
+
Use `generateWebpackConfig` instead.
|
23
|
+
|
24
|
+
- Use `package_json` gem to manage Node dependencies and commands, and use `npm` by default [PR 430](https://github.com/shakacode/shakapacker/pull/430) by [G-Rath](https://github.com/g-rath)
|
25
|
+
|
26
|
+
This enables support for package managers other than `yarn`, with `npm` being the default; to continue using Yarn,
|
27
|
+
specify it in `package.json` using the [`packageManager`](https://nodejs.org/api/packages.html#packagemanager) property.
|
28
|
+
|
29
|
+
- Remove `yarn_install` rake task, and stop installing js packages automatically as part of `assets:precompile` [PR 412](https://github.com/shakacode/shakapacker/pull/412) by [G-Rath](https://github.com/g-rath).
|
30
|
+
|
31
|
+
- Remove `check_yarn` rake task [PR 443](https://github.com/shakacode/shakapacker/pull/443) by [G-Rath](https://github.com/g-rath).
|
32
|
+
|
33
|
+
- Remove `https` option for `webpack-dev-server` [PR 414](https://github.com/shakacode/shakapacker/pull/414) by [G-Rath](https://github.com/g-rath).
|
34
|
+
|
35
|
+
- Remove `verify_file_existance` method [PR 446](https://github.com/shakacode/shakapacker/pull/446) by [G-Rath](https://github.com/g-rath).
|
36
|
+
|
37
|
+
- Drop support for Ruby 2.6 [PR 415](https://github.com/shakacode/shakapacker/pull/415) by [G-Rath](https://github.com/g-rath).
|
38
|
+
|
39
|
+
- Drop support for Node v12 [PR 431](https://github.com/shakacode/shakapacker/pull/431) by [G-Rath](https://github.com/g-rath).
|
40
|
+
|
41
|
+
- Enable `ensure_consistent_versioning` by default [PR 447](https://github.com/shakacode/shakapacker/pull/447) by [G-Rath](https://github.com/g-rath).
|
42
|
+
|
43
|
+
- Asset files put in `additional_paths` will have their path stripped just like with the `source_path`. [PR 403](https://github.com/shakacode/shakapacker/pull/403) by [paypro-leon](https://github.com/paypro-leon).
|
44
|
+
|
45
|
+
- Remove `isArray` utility (just use `Array.isArray` directly) and renamed a few files [PR 454](https://github.com/shakacode/shakapacker/pull/454) by [G-Rath](https://github.com/g-rath).
|
46
|
+
|
47
|
+
- Make JavaScript test helper utilities internal (`chdirTestApp`, `chdirCwd`, `resetEnv`) [PR 458](https://github.com/shakacode/shakapacker/pull/458) by [G-Rath](https://github.com/g-rath).
|
48
|
+
|
49
|
+
## [v7.2.3] - March 23, 2024
|
50
|
+
|
51
|
+
### Added
|
52
|
+
- Emit warnings instead of errors when compilation is success but stderr is not empty. [PR 416](https://github.com/shakacode/shakapacker/pull/416) by [n-rodriguez](https://github.com/n-rodriguez).
|
53
|
+
- Allow `webpack-dev-server` v5. [PR 418](https://github.com/shakacode/shakapacker/pull/418) by [G-Rath](https://github.com/g-rath)
|
54
|
+
|
55
|
+
### Removed
|
56
|
+
- Removes dependency on `glob` library. [PR 435](https://github.com/shakacode/shakapacker/pull/435) by [tomdracz](https://github.com/tomdracz).
|
57
|
+
|
58
|
+
### Fixed
|
59
|
+
- Uses config file passed in `SHAKAPACKER_CONFIG` consistently.[PR 448](https://github.com/shakacode/shakapacker/pull/448) by [tomdracz](https://github.com/tomdracz).
|
60
|
+
|
61
|
+
Previously this could have been ignored in few code branches, especially when checking for available environments.
|
62
|
+
|
10
63
|
## [v7.2.2] - January 19, 2024
|
11
64
|
|
12
65
|
### Added
|
13
66
|
- Allow `compression-webpack-plugin` v11. [PR 406](https://github.com/shakacode/shakapacker/pull/406) by [tagliala](https://github.com/tagliala).
|
14
67
|
|
15
|
-
### Changed
|
16
|
-
- Just like with the `source_path` the paths in `additional_paths` will now also be stripped from asset paths. [PR 403](https://github.com/shakacode/shakapacker/pull/403) by [paypro-leon](https://github.com/paypro-leon).
|
17
|
-
|
18
68
|
## [v7.2.1] - December 30, 2023
|
19
69
|
|
20
70
|
### Fixed
|
@@ -65,7 +115,7 @@ Changes since the last non-beta release.
|
|
65
115
|
|
66
116
|
- Export immutable webpackConfig function. [PR 293](https://github.com/shakacode/shakapacker/pull/293) by [tomdracz](https://github.com/tomdracz).
|
67
117
|
|
68
|
-
The `webpackConfig` property in the `shakapacker` module has been updated to be a function instead of a global mutable webpack configuration. This function now returns an immutable webpack configuration object, which ensures that any modifications made to it will not affect any other usage of the webpack configuration. If a project still requires the old mutable object, it can be accessed by replacing `webpackConfig` with `globalMutableWebpackConfig`. Check [v7-upgrade](https://github.com/shakacode/shakapacker/blob/
|
118
|
+
The `webpackConfig` property in the `shakapacker` module has been updated to be a function instead of a global mutable webpack configuration. This function now returns an immutable webpack configuration object, which ensures that any modifications made to it will not affect any other usage of the webpack configuration. If a project still requires the old mutable object, it can be accessed by replacing `webpackConfig` with `globalMutableWebpackConfig`. Check [v7-upgrade](https://github.com/shakacode/shakapacker/blob/main/docs/v7_upgrade.md) documentation for more detail.
|
69
119
|
|
70
120
|
### Added
|
71
121
|
- Set CSS modules mode depending on file type. [PR 261](https://github.com/shakacode/shakapacker/pull/261) by [talyuk](https://github.com/talyuk).
|
@@ -303,7 +353,8 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
|
|
303
353
|
## v5.4.3 and prior changes from rails/webpacker
|
304
354
|
See [CHANGELOG.md in rails/webpacker (up to v5.4.3)](https://github.com/rails/webpacker/blob/master/CHANGELOG.md)
|
305
355
|
|
306
|
-
[Unreleased]: https://github.com/shakacode/shakapacker/compare/v7.2.
|
356
|
+
[Unreleased]: https://github.com/shakacode/shakapacker/compare/v7.2.3...main
|
357
|
+
[v7.2.3]: https://github.com/shakacode/shakapacker/compare/v7.2.2...v7.2.3
|
307
358
|
[v7.2.2]: https://github.com/shakacode/shakapacker/compare/v7.2.1...v7.2.2
|
308
359
|
[v7.2.1]: https://github.com/shakacode/shakapacker/compare/v7.2.0...v7.2.1
|
309
360
|
[v7.2.0]: https://github.com/shakacode/shakapacker/compare/v7.1.0...v7.2.0
|