shakapacker 7.0.1 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4aaa412d5721d91a27e137f18413f5c3782c8a922911b35fa712f776d04e31b
4
- data.tar.gz: afabe31c503c8bfabe21d52fa0e401c9f4b80696a274013058ef417f0b419c26
3
+ metadata.gz: 51bc05e46de3c757f9d47e0435cb1928759bff38a354b4b63a5e28f5fe91b1c6
4
+ data.tar.gz: a21060c6cd736a1171c78d1bdd927292523148cedccb90e361a4c645be05983e
5
5
  SHA512:
6
- metadata.gz: 0b2367ca20d0cb3da0ff8265ad22551bf288706d76afa84ace8700d091a99b6c201bf11d44116481bd1e89336ea154972314f3a2117cb14ad6dd3bd2152012d9
7
- data.tar.gz: f1cbdf73ce49838513d888ccc86c20185331bc4d0e7934ff88d7ee7d2c4a89efed8e98253c511351ce32bec9faefc0d73c899e07a268fb977cacd772788b841d
6
+ metadata.gz: eb9e323ebfcc603375ab766b3b2fc87641379e40a18f033703d4b0e1887001d7e7a915f42359a71d307b651f0de2e15e7cb209ccb7d40ccbfd3d839e2436e0ad
7
+ data.tar.gz: c839ce0d465e2fa67379938264de5da4e00f9374202b2e13a36e3f1e6943dde73f80304f9e88f49632a8944ddc2238ea96a81136e609ed16873ce8e06c2cca01
data/CHANGELOG.md CHANGED
@@ -9,9 +9,14 @@ Changes since last non-beta release.
9
9
 
10
10
  _Please add entries here for your pull requests that are not yet released._
11
11
 
12
+ ### Fixed
13
+ - Fixed creation of assets:precompile if it is missing [PR 325](https://github.com/shakacode/shakapacker/pull/325) by [ahangarha](https://github.com/ahangarha).
14
+
15
+ ## [v7.0.1] - June 27, 2023
12
16
  ### Fixed
13
17
  - Fixed the condition for showing warning for setting `useContentHash` to `false` in the production environment. [PR 320](https://github.com/shakacode/shakapacker/pull/320) by [ahangarha](https://github.com/ahangarha).
14
18
 
19
+ ## [v7.0.0] - June 23, 2023
15
20
  ### Breaking changes
16
21
  - Removes defaults passed to `@babel/preset-typescript`. [PR 273](https://github.com/shakacode/shakapacker/pull/273) by [tomdracz](https://github.com/tomdracz).
17
22
 
@@ -257,7 +262,9 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
257
262
  ## v5.4.3 and prior changes from rails/webpacker
258
263
  See [CHANGELOG.md in rails/webpacker (up to v5.4.3)](https://github.com/rails/webpacker/blob/master/CHANGELOG.md)
259
264
 
260
- [Unreleased]: https://github.com/shakacode/shakapacker/compare/v6.6.0...master
265
+ [Unreleased]: https://github.com/shakacode/shakapacker/compare/v7.0.1...master
266
+ [v7.0.1]: https://github.com/shakacode/shakapacker/compare/v7.0.0...v7.0.1
267
+ [v7.0.0]: https://github.com/shakacode/shakapacker/compare/v6.6.0...v7.0.0
261
268
  [v6.6.0]: https://github.com/shakacode/shakapacker/compare/v6.5.6...v6.6.0
262
269
  [v6.5.6]: https://github.com/shakacode/shakapacker/compare/v6.5.5...v6.5.6
263
270
  [v6.5.5]: https://github.com/shakacode/shakapacker/compare/v6.5.4...v6.5.5
data/docs/v7_upgrade.md CHANGED
@@ -1,41 +1,44 @@
1
1
  # Upgrading from Shakapacker v6 to v7
2
2
 
3
- There will be several substantial and breaking changes in Shakapacker v7 that you need to manually account for when coming from Shakapacker v6.
3
+ There are several breaking changes in Shakapacker v7 that you need to manually account for when coming from Shakapacker v6.
4
4
 
5
- ## Usages of 'webpacker' should now be 'shakapacker'
5
+ ## Usages of `webpacker` should now be `shakapacker`
6
6
 
7
7
  Shakapacker v6 kept the 'webpacker' spelling. As a result, many config filenames, environment variables, rake tasks, etc., used the 'webpacker' spelling. Shakapacker 7 requires renaming to the 'shakapacker' spelling.
8
8
 
9
9
  Shakapacker v7 provides a high degree of backward compatibility for spelling changes. It displays deprecation messages in the terminal to help the developers have a smooth experience in making the required transition to the new requirements.
10
10
 
11
- Please note that Shakapacker v8 will remove any backward compatibility for spelling.
11
+ Just so you know, Shakapacker v8 will remove any backward compatibility for spelling.
12
12
 
13
13
  ### Upgrade Steps
14
14
 
15
15
  **Note:** At each step of changing the version, ensure that you update both gem and npm versions to the same "exact" version (like `x.y.z` and not `^x.y.z` or `>= x.y.z`).
16
16
 
17
- 1. Upgrade Shakapacker to the latest 6.x version and ensure no issues running your application.
17
+ 1. Upgrade Shakapacker to the latest 6.x version and make sure there are no issues running your application.
18
18
  2. Upgrade Shakapacker to version 7.
19
19
  3. Run `rake shakapacker:binstubs` to get the new files in place. Then delete the `bin/webpacker` and `bin/webpacker-dev-server` ones.
20
20
  4. Change spelling from Webpacker to Shakapacker in the code
21
21
  - Change `webpacker_precompile` entry to `shakapacker_precompile` if it exists in the config file.
22
- - Rename Ruby constant `Webpacker` to `Shakapacker` doing a global search and replace in your code. You might not be using it.
22
+ - Rename Ruby constant `Webpacker` to `Shakapacker` by doing a global search and replace in your code. You might not be using it.
23
23
  - Rename`Shakapacker.config.webpacker_precompile?` method, replace it with `Shakapacker.config.shakapacker_precompile?`
24
24
  - `--debug-webpacker` is now `--debug-shakapacker` for your shakapacker binstubs.
25
25
  5. Rename files
26
26
  - Rename `config/webpacker.yml` to `config/shakapacker.yml`.
27
27
  - Rename environment variables from `WEBPACKER_XYZ` to `SHAKAPACKER_XYZ`.
28
- 6. Where you have used webpackConfig, you now need to invoke it as it is a function. Alternatively, you can rename the import to globalMutableWebpackConfig which retains the v6 behavior.
29
- 7. You may need to upgrade dependencies in package.json. You should use `yarn upgrade-interactive`. Note, some upgrades introduce issues. Some will fix issues. You may need to try a few different versions of a dependency to find one that works.
28
+ 6. Where you have used webpackConfig, you must create a new instance with `generateWebpackConfig`. Alternatively, you can rename the import to globalMutableWebpackConfig, which retains the v6 behavior of a global, mutable object.
29
+ 7. You may need to upgrade dependencies in package.json. You should use `yarn upgrade-interactive`.
30
30
 
31
+ ## Stop stripping top-level dirs for static assets
32
+
33
+ When generating file paths for static assets, a top-level directory will no longer be stripped. This will necessitate the update of file name references in asset helpers. For example, the file sourced from `app/javascript/images/image.png` will now be output to `static/images/image.png`, and needs to be referenced as `image_pack_tag("images/image.jpg")` or `image_pack_tag("static/images/image.jpg")`. Nested directories are supported.
31
34
 
32
35
  ## The `webpackConfig` property is changed
33
36
 
34
37
  The `webpackConfig` property in the `shakapacker` module has been changed. The shakapacker module has two options:
35
- 1. `generatedWebpackConfig`: a function that returns an immutable webpack configuration object, which ensures that any modifications made to it will not affect any other usage of the webpack configuration.
36
- 2. `globalMutableWebpackConfig`: if a project still requires the old mutable object. You can rename your imports of `webpackConfig` with `globalMutableWebpackConfig`.
38
+ 1. `generatedWebpackConfig`: a function that returns a new webpack configuration object, which ensures that any modifications made to it will not affect any other usage of the webpack configuration.
39
+ 2. `globalMutableWebpackConfig`: if a project still desires the old mutable object. You can rename your imports of `webpackConfig` with `globalMutableWebpackConfig`.
37
40
 
38
- ### Example Upgrade
41
+ ## Example Upgrade
39
42
  If you started with:
40
43
 
41
44
  ```js
@@ -1,4 +1,4 @@
1
1
  module Shakapacker
2
2
  # Change the version in package.json too, please!
3
- VERSION = "7.0.1".freeze
3
+ VERSION = "7.0.2".freeze
4
4
  end
@@ -22,5 +22,7 @@ end
22
22
  if Shakapacker.config.shakapacker_precompile?
23
23
  if Rake::Task.task_defined?("assets:precompile")
24
24
  invoke_shakapacker_compile_in_assets_precompile_task
25
+ else
26
+ Rake::Task.define_task("assets:precompile" => ["shakapacker:compile"])
25
27
  end
26
28
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shakapacker",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "Use webpack to manage app-like JavaScript modules in Rails",
5
5
  "main": "package/index.js",
6
6
  "files": [
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: 7.0.1
4
+ version: 7.0.2
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: 2023-06-27 00:00:00.000000000 Z
13
+ date: 2023-07-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -528,7 +528,7 @@ homepage: https://github.com/shakacode/shakapacker
528
528
  licenses:
529
529
  - MIT
530
530
  metadata:
531
- source_code_uri: https://github.com/shakacode/shakapacker/tree/v7.0.1
531
+ source_code_uri: https://github.com/shakacode/shakapacker/tree/v7.0.2
532
532
  post_install_message:
533
533
  rdoc_options: []
534
534
  require_paths: