shakapacker 6.5.4 → 6.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57e24ac7fbe67a903f0a5f0d6725544b37b2c8a1bae324cd487642e69a525b8d
4
- data.tar.gz: 704a88906fec3e37ec10b2b5cce8fd3ea8ad2c1a556e5badc89aef887d7c02cc
3
+ metadata.gz: 646fe9e24edc5f5db2658497319212b5185062398497652d0e30f0438bb26a58
4
+ data.tar.gz: e8664c72e8122fb658e33ba7018edbd5f6aad9ceb3ddda8fca0fa6f019f9ae6b
5
5
  SHA512:
6
- metadata.gz: 918d57502a80582726426833b6a6a57848ab771c9d7acb1d2ab5748b3d5407a4ee44c6ece9849ee2db2879d3329761577678377aaccc1f67ce6a6fd72f3d5e38
7
- data.tar.gz: ac9f9397b1922969a360d8c8963a3ba298eea656ae5eca1925ed419788fa40ae3d3f17d2cc8ddacb459c23cadfe2ba67cbf7827b8b9e499f52e59694cf59253f
6
+ metadata.gz: e41b38e5d64053e31e0077a31bca784b719601cee52da5237a0a310519d54121750b723cb7a35a4b826d2ecc781dabfa00652fd2fb6fe29e321373f0b0537cf4
7
+ data.tar.gz: eb96874304522ce04a1d1ba88162333336857606075f1cb00360f4016dfe09827eb421113b5d0c09b08f876d07b0815d4841bb8254895fe75297fe211bcbccc4
data/CHANGELOG.md CHANGED
@@ -8,6 +8,13 @@ Changes since last non-beta release.
8
8
 
9
9
  _Please add entries here for your pull requests that are not yet released._
10
10
 
11
+ ## [v6.5.5] - December 23, 2022
12
+
13
+ ### Improved
14
+ - Describe keys different from `webpack-dev-server` in generated `webpacker.yml`. [PR 194](https://github.com/shakacode/shakapacker/pull/194) by [alexeyr](https://github.com/alexeyr).
15
+ - Allow webpack-cli v5 [PR 216](https://github.com/shakacode/shakapacker/pull/216) by [tagliala](https://github.com/tagliala).
16
+ - Allow babel-loader v9 [PR 215](https://github.com/shakacode/shakapacker/pull/215) by [tagliala](https://github.com/tagliala).
17
+
11
18
  ## [v6.5.4] - November 4, 2022
12
19
  ### Fixed
13
20
  - Fixed regression caused by 6.5.3. PR #192 introduce extra split() call. [PR 202](https://github.com/shakacode/shakapacker/pull/202) by [Eric-Guo](https://github.com/Eric-Guo).
@@ -112,7 +119,7 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
112
119
  - Make manifest_path configurable, to keep manifest.json private if desired. [PR 78](https://github.com/shakacode/shakapacker/pull/78) by [jdelStrother](https://github.com/jdelStrother).
113
120
  - Rewrite webpack module rules as regular expressions. Allows for easy iteration during config customization. [PR 60](https://github.com/shakacode/shakapacker/pull/60) by [blnoonan](https://github.com/blnoonan).
114
121
  - Initialization check to ensure shakapacker gem and NPM package version are consistent. Opt-in behaviour enabled by setting `ensure_consistent_versioning` configuration variable. [PR 51](https://github.com/shakacode/shakapacker/pull/51) by [tomdracz](https://github.com/tomdracz).
115
- - Add `dev_server.inline_css: bool` config option to allow for opting out of style-loader and into mini-extract-css-plugin for CSS HMR in development. [PR 69](https://github.com/shakacode/shakapacker/pull/69) by [cheald](https://github.com/cheald).
122
+ - Add `dev_server.inline_css: bool` config option to allow for opting out of style-loader and into mini-css-extract-plugin for CSS HMR in development. [PR 69](https://github.com/shakacode/shakapacker/pull/69) by [cheald](https://github.com/cheald).
116
123
 
117
124
  ### Improved
118
125
  - Increase default connect timeout for dev server connections, establishing connections more reliably for busy machines. [PR 74](https://github.com/shakacode/shakapacker/pull/74) by [stevecrozz](https://github.com/stevecrozz).
@@ -186,7 +193,8 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
186
193
  ## v5.4.3 and prior changes from rails/webpacker
187
194
  See [CHANGELOG.md in rails/webpacker (up to v5.4.3)](https://github.com/rails/webpacker/blob/master/CHANGELOG.md)
188
195
 
189
- [Unreleased]: https://github.com/shakacode/shakapacker/compare/v6.5.4...master
196
+ [Unreleased]: https://github.com/shakacode/shakapacker/compare/v6.5.5...master
197
+ [v6.5.5]: https://github.com/shakacode/shakapacker/compare/v6.5.4...v6.5.5
190
198
  [v6.5.4]: https://github.com/shakacode/shakapacker/compare/v6.5.3...v6.5.4
191
199
  [v6.5.3]: https://github.com/shakacode/shakapacker/compare/v6.5.2...v6.5.3
192
200
  [v6.5.2]: https://github.com/shakacode/shakapacker/compare/v6.5.1...v6.5.2
data/README.md CHANGED
@@ -13,13 +13,13 @@ _Official, actively maintained successor to [rails/webpacker](https://github.com
13
13
  [![Gem](https://img.shields.io/gem/v/shakapacker.svg)](https://rubygems.org/gems/shakapacker)
14
14
  [![npm version](https://badge.fury.io/js/shakapacker.svg)](https://badge.fury.io/js/shakapacker)
15
15
 
16
- Webpacker makes it easy to use the JavaScript pre-processor and bundler [Webpack v5+](https://webpack.js.org/)
17
- to manage application-like JavaScript in Rails. It can coexist with the asset pipeline,
18
- leaving Webpack responsible solely for app-like JavaScript, or it can be used exclusively, making it also responsible for images, fonts, and CSS.
16
+ Shakpacker makes it easy to use the JavaScript pre-processor and bundler [Webpack v5+](https://webpack.js.org/)
17
+ to manage frontend JavaScript in Rails. It can coexist with the asset pipeline,
18
+ leaving Webpack responsible solely for frontend JavaScript, or can be used exclusively, making it also responsible for images, fonts, and CSS.
19
19
 
20
20
  Check out 6.1.1+ for [SWC](https://swc.rs/) and [esbuild-loader](https://github.com/privatenumber/esbuild-loader) support! They are faster than Babel!
21
21
 
22
- See a comparison of [webpacker with jsbundling-rails](https://github.com/rails/jsbundling-rails/blob/main/docs/comparison_with_webpacker.md).
22
+ See a comparison of [Shakapacker with jsbundling-rails](https://github.com/rails/jsbundling-rails/blob/main/docs/comparison_with_webpacker.md).
23
23
 
24
24
  Discussion forum and Slack to discuss debugging and troubleshooting tips. Please open issues for bugs and feature requests:
25
25
  1. [Discussions tab](https://github.com/shakacode/shakapacker/discussions)
@@ -31,7 +31,7 @@ style-loader is how you are probably are used to serving CSS in development with
31
31
  * Adds an extra dependency
32
32
  * Divergence in delivery mechanism from production
33
33
 
34
- ## Why would I pick mini-extract-css-plugin?
34
+ ## Why would I pick mini-css-extract-plugin?
35
35
 
36
36
  mini-css-extract-plugin's behavior is much more true to a production deployment's behavior, in that CSS is loaded via `link rel=stylsheet` tags, rather than injected by Javascript into `style` tags.
37
37
 
data/docs/v6_upgrade.md CHANGED
@@ -50,19 +50,19 @@ _If you're on webpacker v5, follow below steps to get to v6.0.0.rc.6 first._
50
50
  ## How to upgrade to Webpacker v6.0.0.rc.6 from v5
51
51
  1. Ensure you have a clean working git branch. You will be overwriting all your files and reverting the changes that you don't want.
52
52
 
53
- 1. **Ensure no nested directories in your `source_entry_path`. or set option `nested_entries: true`** Check if you had any entry point files in child directories of your `source_entry_path`.
53
+ 1. **Ensure no nested directories in your `source_entry_path`.** Check if you had any entry point files in child directories of your `source_entry_path`. Files for entry points in child directories are not supported by shakacode/shakapacker v6. Move those files to the top level, adjusting any imports in those files.
54
54
 
55
- The new v6 configuration **defaults** to not allow nesting, so as to allow placing the entry points at in the root directory of JavaScript. You can find this change [here](https://github.com/rails/webpacker/commit/5de0fbc1e16d3db0c93202fb39f5b4d80582c682#diff-7af8667a3e36201db57c02b68dd8651883d7bfc00dc9653661be11cd31feeccdL19).
55
+ The v6 configuration does not allow nesting, so as to allow placing the entry points at in the root directory of JavaScript. You can find this change [here](https://github.com/rails/webpacker/commit/5de0fbc1e16d3db0c93202fb39f5b4d80582c682#diff-7af8667a3e36201db57c02b68dd8651883d7bfc00dc9653661be11cd31feeccdL19).
56
56
 
57
57
  1. Upgrade the Webpacker Ruby gem and the NPM package
58
58
 
59
- Note: [Check the gem page to verify the latest version](https://rubygems.org/gems/shakapacker), and make sure to install identical version numbers of `shakapacker` gem and package, and remove the old `webpacker` gem from the Gemfile (Gems use a hyphen and packages use a dot between the main version number and the beta version.)
59
+ Note: [Check the gem page to verify the latest version](https://rubygems.org/gems/webpacker), and make sure to install identical version numbers of `webpacker` gem and package.
60
60
 
61
61
  Example going to a specific version:
62
62
 
63
63
  ```ruby
64
64
  # Gemfile
65
- gem 'shakapacker', '6.0.0.rc.13'
65
+ gem 'webpacker', '6.0.0.rc.6'
66
66
  ```
67
67
 
68
68
  ```bash
@@ -70,7 +70,7 @@ _If you're on webpacker v5, follow below steps to get to v6.0.0.rc.6 first._
70
70
  ```
71
71
 
72
72
  ```bash
73
- yarn add shakapacker@6.0.0-rc.13 --exact
73
+ yarn add @rails/webpacker@6.0.0-rc.6 --exact
74
74
  ```
75
75
 
76
76
  ```bash
@@ -99,10 +99,6 @@ _If you're on webpacker v5, follow below steps to get to v6.0.0.rc.6 first._
99
99
 
100
100
  Note, moving your files is optional, as you can stil keep your entries in a separate directory, called something like `packs`, or `entries`. This directory is defined with the `source_path`.
101
101
 
102
- 1. **Ensure no nested directories in your `source_entry_path`.** Check if you had any entry point files in child directories of your `source_entry_path`. Files for entry points in child directories are not supported by shakacode/shakapacker v6. Move those files to the top level, adjusting any imports in those files.
103
-
104
- The v6 configuration does not allow nesting, so as to allow placing the entry points at in the root directory of JavaScript. You can find this change [here](https://github.com/rails/webpacker/commit/5de0fbc1e16d3db0c93202fb39f5b4d80582c682#diff-7af8667a3e36201db57c02b68dd8651883d7bfc00dc9653661be11cd31feeccdL19).
105
-
106
102
  1. Update `webpack-dev-server` to the current version, greater than 4.2, updating `package.json`.
107
103
 
108
104
  1. Update API usage of the view helpers by changing `javascript_packs_with_chunks_tag` and `stylesheet_packs_with_chunks_tag` to `javascript_pack_tag` and `stylesheet_pack_tag`. Ensure that your layouts and views will only have **at most one call** to `javascript_pack_tag` and **at most one call** to `stylesheet_pack_tag`. You can now pass multiple bundles to these view helper methods. If you fail to changes this, you may experience performance issues, and other bugs related to multiple copies of React, like [issue 2932](https://github.com/rails/webpacker/issues/2932). If you expose jquery globally with `expose-loader,` by using `import $ from "expose-loader?exposes=$,jQuery!jquery"` in your `app/javascript/application.js`, pass the option `defer: false` to your `javascript_pack_tag`.
@@ -142,7 +138,7 @@ _If you're on webpacker v5, follow below steps to get to v6.0.0.rc.6 first._
142
138
  ]
143
139
  }
144
140
  ```
145
- See customization example the [Customizing Babel Config](./docs/customizing_babel_config.md) for React configuration.
141
+ See customization example the [Customizing Babel Config](./customizing_babel_config.md) for React configuration.
146
142
 
147
143
  1. `extensions` was removed from the `webpacker.yml` file. Move custom extensions to your configuration by merging an object like this. For more details, see docs for [Webpack Configuration](https://github.com/shakacode/shakapacker/blob/master/README.md#webpack-configuration)
148
144
 
@@ -49,19 +49,21 @@ development:
49
49
  compiler_strategy: mtime
50
50
 
51
51
  # Reference: https://webpack.js.org/configuration/dev-server/
52
+ # Keys not described there are documented inline and in https://github.com/shakacode/shakapacker/
52
53
  dev_server:
53
54
  https: false
54
55
  host: localhost
55
56
  port: 3035
56
57
  # Hot Module Replacement updates modules while the application is running without a full reload
58
+ # Used instead of the `hot` key in https://webpack.js.org/configuration/dev-server/#devserverhot
57
59
  hmr: false
58
60
  # If HMR is on, CSS will by inlined by delivering it as part of the script payload via style-loader. Be sure
59
61
  # that you add style-loader to your project dependencies.
60
62
  #
61
- # If you want to instead deliver CSS via <link> with the mini-extract-css-plugin, set inline_css to false.
63
+ # If you want to instead deliver CSS via <link> with the mini-css-extract-plugin, set inline_css to false.
62
64
  # In that case, style-loader is not needed as a dependency.
63
65
  #
64
- # mini-extract-css-plugin is a required dependency in both cases.
66
+ # mini-css-extract-plugin is a required dependency in both cases.
65
67
  inline_css: true
66
68
  # Defaults to the inverse of hmr. Uncomment to manually set this.
67
69
  # live_reload: true
@@ -70,13 +72,14 @@ development:
70
72
  overlay: true
71
73
  # May also be a string
72
74
  # webSocketURL:
73
- # hostname: "0.0.0.0"
74
- # pathname: "/ws"
75
+ # hostname: '0.0.0.0'
76
+ # pathname: '/ws'
75
77
  # port: 8080
76
78
  # Should we use gzip compression?
77
79
  compress: true
78
80
  # Note that apps that do not check the host are vulnerable to DNS rebinding attacks
79
- allowed_hosts: "all"
81
+ allowed_hosts: 'all'
82
+ # Shows progress and colorizes output of bin/webpacker[-dev-server]
80
83
  pretty: true
81
84
  headers:
82
85
  'Access-Control-Allow-Origin': '*'
@@ -1,4 +1,4 @@
1
1
  module Webpacker
2
2
  # Change the version in package.json too, please!
3
- VERSION = "6.5.4".freeze
3
+ VERSION = "6.5.5".freeze
4
4
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shakapacker",
3
- "version": "6.5.4",
3
+ "version": "6.5.5",
4
4
  "description": "Use webpack to manage app-like JavaScript modules in Rails",
5
5
  "main": "package/index.js",
6
6
  "files": [
@@ -16,12 +16,12 @@
16
16
  "@babel/plugin-transform-runtime": "^7.17.0",
17
17
  "@babel/preset-env": "^7.16.11",
18
18
  "@babel/runtime": "^7.17.9",
19
- "babel-loader": "^8.2.4",
19
+ "babel-loader": "^8.2.4 || ^9.0.0",
20
20
  "compression-webpack-plugin": "^9.0.0 || ^10.0.0",
21
21
  "terser-webpack-plugin": "^5.3.1",
22
22
  "webpack": "^5.72.0",
23
23
  "webpack-assets-manifest": "^5.0.6",
24
- "webpack-cli": "^4.9.2",
24
+ "webpack-cli": "^4.9.2 || ^5.0.0",
25
25
  "webpack-dev-server": "^4.9.0",
26
26
  "webpack-merge": "^5.8.0"
27
27
  },
@@ -41,8 +41,14 @@ development:
41
41
  port: 3035
42
42
  public: localhost:3035
43
43
  hmr: false
44
- # Inline should be set to true if using HMR
45
- inline: true
44
+ # If HMR is on, CSS will by inlined by delivering it as part of the script payload via style-loader. Be sure
45
+ # that you add style-loader to your project dependencies.
46
+ #
47
+ # If you want to instead deliver CSS via <link> with the mini-extract-css-plugin, set inline_css to false.
48
+ # In that case, style-loader is not needed as a dependency.
49
+ #
50
+ # mini-extract-css-plugin is a required dependency in both cases.
51
+ inline_css: true
46
52
  overlay: true
47
53
  disable_host_check: true
48
54
  use_local_ip: false
@@ -43,8 +43,14 @@ development:
43
43
  port: 3035
44
44
  public: localhost:3035
45
45
  hmr: false
46
- # Inline should be set to true if using HMR
47
- inline: true
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
48
54
  overlay: true
49
55
  disable_host_check: true
50
56
  use_local_ip: false
@@ -33,7 +33,7 @@ class VersionCheckerTest < Minitest::Test
33
33
  def test_message_printed_if_consistency_check_disabled_and_mismatch
34
34
  node_package_version = NodePackageVersionDouble.new(raw: "6.1.0", major_minor_patch: ["6", "1", "0"])
35
35
 
36
- out, err = capture_io do
36
+ _out, err = capture_io do
37
37
  check_version(node_package_version, "6.0.0", false)
38
38
  end
39
39
 
@@ -45,7 +45,7 @@ class VersionCheckerTest < Minitest::Test
45
45
  def test_message_printed_if_consistency_check_disabled_and_semver
46
46
  node_package_version = NodePackageVersionDouble.new(raw: "^6.1.0", major_minor_patch: ["6", "1", "0"], semver_wildcard: true)
47
47
 
48
- out, err = capture_io do
48
+ _out, err = capture_io do
49
49
  check_version(node_package_version, "6.1.0", false)
50
50
  end
51
51
 
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: 6.5.4
4
+ version: 6.5.5
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: 2022-11-04 00:00:00.000000000 Z
13
+ date: 2022-12-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -337,7 +337,7 @@ homepage: https://github.com/shakacode/shakapacker
337
337
  licenses:
338
338
  - MIT
339
339
  metadata:
340
- source_code_uri: https://github.com/shakacode/shakapacker/tree/v6.5.4
340
+ source_code_uri: https://github.com/shakacode/shakapacker/tree/v6.5.5
341
341
  post_install_message:
342
342
  rdoc_options: []
343
343
  require_paths: