shakapacker 6.5.2 → 6.5.4

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: 04b356abe12d2beb26692d9b9edc2b491a4d9e698ecab73b06e700e51d049733
4
- data.tar.gz: 2e6c8f79c48ff1602e303d43293fc1d66413121e687538a6e7ac32fecc72518a
3
+ metadata.gz: 57e24ac7fbe67a903f0a5f0d6725544b37b2c8a1bae324cd487642e69a525b8d
4
+ data.tar.gz: 704a88906fec3e37ec10b2b5cce8fd3ea8ad2c1a556e5badc89aef887d7c02cc
5
5
  SHA512:
6
- metadata.gz: ba8b18d95721f62d512dc330681b17fa650b3d292ce3afc51c37261a22bfbde8c9aec7db5763cc2d5b959d1c2948aaf72fcf2dcefbe6e75a90a7b1fdd4da6fa8
7
- data.tar.gz: 5edd7194484e7c68310ac01700e2bce920f100ca2b4ad83975686da6af86cf4ac3c9c811a1eedf17c121d4c7285954a0ba3ca4e32a9da6b6ac253d85de9007d3
6
+ metadata.gz: 918d57502a80582726426833b6a6a57848ab771c9d7acb1d2ab5748b3d5407a4ee44c6ece9849ee2db2879d3329761577678377aaccc1f67ce6a6fd72f3d5e38
7
+ data.tar.gz: ac9f9397b1922969a360d8c8963a3ba298eea656ae5eca1925ed419788fa40ae3d3f17d2cc8ddacb459c23cadfe2ba67cbf7827b8b9e499f52e59694cf59253f
@@ -11,7 +11,7 @@ A bug is a crash or incorrect behavior. If you have a debugging or troubleshooti
11
11
 
12
12
  Ruby version:
13
13
  Rails version:
14
- Webpacker version:
14
+ Shakapacker version:
15
15
 
16
16
  Expected behavior:
17
17
 
@@ -11,7 +11,7 @@ A feature request describes a suggested improvement. If you have a debugging or
11
11
 
12
12
  Ruby version:
13
13
  Rails version:
14
- Webpacker version:
14
+ Shakapacker version:
15
15
 
16
16
  Desired behavior:
17
17
 
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
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
2
  * Please see the [v6 Upgrade Guide](./docs/v6_upgrade.md) to go from versions prior to v6.
3
- * [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).
3
+ * [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).
4
4
 
5
5
  ## Versions
6
6
  ## [Unreleased]
@@ -8,6 +8,17 @@ 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.4] - November 4, 2022
12
+ ### Fixed
13
+ - 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).
14
+
15
+ ## [v6.5.3] - November 1, 2022
16
+
17
+ ### Improved
18
+ - Set RAILS_ENV and BUNDLE_GEMFILE env values before requiring `bundler/setup`, `webpacker`, and `webpacker/webpack_runner`. [PR 190](https://github.com/shakacode/shakapacker/pull/190) by [betmenslido](https://github.com/betmenslido).
19
+ - The `mini-css-extract-plugin` may cause various warnings indicating CSS order conflicts when using a [File-System-based automated bundle generation feature](https://www.shakacode.com/react-on-rails/docs/guides/file-system-based-automated-bundle-generation/).
20
+ CSS order warnings can be disabled in projects where CSS ordering has been mitigated by consistent use of scoping or naming conventions. Added `css_extract_ignore_order_warnings` flag to webpacker configuration to disable the order warnings by [pulkitkkr](https://github.com/shakacode/shakapacker/pull/185) in [PR 192](https://github.com/shakacode/shakapacker/pull/192).
21
+
11
22
  ## [v6.5.2] - September 8, 2022
12
23
 
13
24
  ### Upgrade
@@ -175,7 +186,9 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
175
186
  ## v5.4.3 and prior changes from rails/webpacker
176
187
  See [CHANGELOG.md in rails/webpacker (up to v5.4.3)](https://github.com/rails/webpacker/blob/master/CHANGELOG.md)
177
188
 
178
- [Unreleased]: https://github.com/shakacode/shakapacker/compare/v6.5.2...master
189
+ [Unreleased]: https://github.com/shakacode/shakapacker/compare/v6.5.4...master
190
+ [v6.5.4]: https://github.com/shakacode/shakapacker/compare/v6.5.3...v6.5.4
191
+ [v6.5.3]: https://github.com/shakacode/shakapacker/compare/v6.5.2...v6.5.3
179
192
  [v6.5.2]: https://github.com/shakacode/shakapacker/compare/v6.5.1...v6.5.2
180
193
  [v6.5.1]: https://github.com/shakacode/shakapacker/compare/v6.5.0...v6.5.1
181
194
  [v6.5.0]: https://github.com/shakacode/shakapacker/compare/v6.4.1...v6.5.0
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "pathname"
3
+ ENV["RAILS_ENV"] ||= "development"
4
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
5
+
4
6
  require "bundler/setup"
5
7
  require "webpacker"
6
8
  require "webpacker/webpack_runner"
7
9
 
8
- ENV["RAILS_ENV"] ||= "development"
9
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", Pathname.new(__FILE__).realpath)
10
-
11
10
  APP_ROOT = File.expand_path("..", __dir__)
12
11
  Dir.chdir(APP_ROOT) do
13
12
  Webpacker::WebpackRunner.run(ARGV)
@@ -1,13 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  ENV["RAILS_ENV"] ||= "development"
4
-
5
- require "pathname"
6
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
7
- Pathname.new(__FILE__).realpath)
4
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
8
5
 
9
6
  require "bundler/setup"
10
-
11
7
  require "webpacker"
12
8
  require "webpacker/dev_server_runner"
13
9
 
@@ -11,6 +11,12 @@ default: &default
11
11
  # You cannot set this option to true if you set source_entry_path to '/'
12
12
  nested_entries: false
13
13
 
14
+ # While using a File-System-based automated bundle generation feature, miscellaneous warnings suggesting css order
15
+ # conflicts may arise due to the mini-css-extract-plugin. For projects where css ordering has been mitigated through
16
+ # consistent use of scoping or naming conventions, the css order warnings can be disabled by setting
17
+ # css_extract_ignore_order_warnings to true
18
+ css_extract_ignore_order_warnings: false
19
+
14
20
  public_root_path: public
15
21
  public_output_path: packs
16
22
  cache_path: tmp/webpacker
@@ -1,4 +1,4 @@
1
1
  module Webpacker
2
2
  # Change the version in package.json too, please!
3
- VERSION = "6.5.2".freeze
3
+ VERSION = "6.5.4".freeze
4
4
  end
@@ -24,6 +24,17 @@ describe('Base config', () => {
24
24
  )
25
25
  })
26
26
 
27
+ test('should return false for css_extract_ignore_order_warnings when using default config', () => {
28
+ expect(config.css_extract_ignore_order_warnings).toEqual(false)
29
+ })
30
+
31
+ test('should return true for css_extract_ignore_order_warnings when configured', () => {
32
+ process.env.WEBPACKER_CONFIG = 'config/webpacker_css_extract_ignore_order_warnings.yml'
33
+ const config = require("../../config");
34
+
35
+ expect(config.css_extract_ignore_order_warnings).toEqual(true)
36
+ })
37
+
27
38
  test('should return only 2 entry points with config.nested_entries == false', () => {
28
39
  expect(config.nested_entries).toEqual(false)
29
40
 
@@ -73,7 +73,11 @@ const getPlugins = () => {
73
73
  plugins.push(
74
74
  new MiniCssExtractPlugin({
75
75
  filename: `css/[name]${hash}.css`,
76
- chunkFilename: `css/[id]${hash}.css`
76
+ chunkFilename: `css/[id]${hash}.css`,
77
+ // For projects where css ordering has been mitigated through consistent use of scoping or naming conventions,
78
+ // the css order warnings can be disabled by setting the ignoreOrder flag.
79
+ // Read: https://stackoverflow.com/questions/51971857/mini-css-extract-plugin-warning-in-chunk-chunkname-mini-css-extract-plugin-con
80
+ ignoreOrder: config.css_extract_ignore_order_warnings
77
81
  })
78
82
  )
79
83
  }
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shakapacker",
3
- "version": "6.5.2",
3
+ "version": "6.5.4",
4
4
  "description": "Use webpack to manage app-like JavaScript modules in Rails",
5
5
  "main": "package/index.js",
6
6
  "files": [
@@ -0,0 +1,84 @@
1
+ # Note: You must restart bin/webpacker-dev-server for changes to take effect
2
+
3
+ default: &default
4
+ source_path: app/packs
5
+ source_entry_path: entrypoints
6
+ nested_entries: true
7
+ public_root_path: public
8
+ public_output_path: packs
9
+ cache_path: tmp/webpacker
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
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.2
4
+ version: 6.5.4
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-09-08 00:00:00.000000000 Z
13
+ date: 2022-11-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -316,6 +316,7 @@ files:
316
316
  - test/test_app/config/initializers/inspect_autoload_paths.rb
317
317
  - test/test_app/config/webpack/webpack.config.js
318
318
  - test/test_app/config/webpacker.yml
319
+ - test/test_app/config/webpacker_css_extract_ignore_order_warnings.yml
319
320
  - test/test_app/config/webpacker_defaults_fallback.yml
320
321
  - test/test_app/config/webpacker_manifest_path.yml
321
322
  - test/test_app/config/webpacker_nested_entries.yml
@@ -336,7 +337,7 @@ homepage: https://github.com/shakacode/shakapacker
336
337
  licenses:
337
338
  - MIT
338
339
  metadata:
339
- source_code_uri: https://github.com/shakacode/shakapacker/tree/v6.5.2
340
+ source_code_uri: https://github.com/shakacode/shakapacker/tree/v6.5.4
340
341
  post_install_message:
341
342
  rdoc_options: []
342
343
  require_paths:
@@ -432,6 +433,7 @@ test_files:
432
433
  - test/test_app/config/initializers/inspect_autoload_paths.rb
433
434
  - test/test_app/config/webpack/webpack.config.js
434
435
  - test/test_app/config/webpacker.yml
436
+ - test/test_app/config/webpacker_css_extract_ignore_order_warnings.yml
435
437
  - test/test_app/config/webpacker_defaults_fallback.yml
436
438
  - test/test_app/config/webpacker_manifest_path.yml
437
439
  - test/test_app/config/webpacker_nested_entries.yml