vite_ruby 3.2.5 → 3.2.6

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: 375a421ac4d10bc65044065ae4a69147c500808a2271ee77ed33b6721c34ca85
4
- data.tar.gz: 917e97be44a37ad99dd3b700959d00ff26420727867c64b06a2b22354a7d8199
3
+ metadata.gz: 61362606d0cc4c30a9194954b8d017a8fd7f929be21d99f4030a39fe32b01c8b
4
+ data.tar.gz: 4b30fcb2f8683dd3ae69aa6b9324ee0b5a947c2b82bda4003bfe5bc330c22d4e
5
5
  SHA512:
6
- metadata.gz: babcceadc14d4f40e038610c47f09d57f22f1c3a4e3ded4ec1749b18c8ff3d3bb82ca6eaaab2b0036c026b586c705d9916dc3f030475679e7ad77d74c98bdd9e
7
- data.tar.gz: 90d786e851da59d09ce76bc1162162f0d2e0c6f2824cba5a1e4bc3848936767a1a56387a9daa6fc77ee65d60cfa92cbecb6bca87107869b69150200df26d9cfd
6
+ metadata.gz: 8a8f10aed93a2b6b8272f00404f6689f5252a459ae8a6c23151b2b577e20781d19051914d2a77125d820264683aa5f695bfbc86d11e29a750a7f740aa4fae7f8
7
+ data.tar.gz: afb33c544dc8e9a52e5c0cec38bd49be6c22ca64f2e60fcc4af4074291e30c5e789e75f26336b878a61e868c765fb3363b932d85e1ed514da67ec846680a1a68
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [3.2.6](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.5...vite_ruby@3.2.6) (2022-10-07)
2
+
3
+
4
+ ### Features
5
+
6
+ * always trigger a build if the manifest is missing ([#275](https://github.com/ElMassimo/vite_ruby/issues/275)) ([53ffdb9](https://github.com/ElMassimo/vite_ruby/commit/53ffdb9559409cb813198b4fd8a7a5ccb0c3cd21))
7
+
8
+
9
+
1
10
  ## [3.2.5](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.4...vite_ruby@3.2.5) (2022-10-07)
2
11
 
3
12
 
@@ -13,7 +13,7 @@ class ViteRuby::Builder
13
13
  def build(*args)
14
14
  last_build = last_build_metadata(ssr: args.include?('--ssr'))
15
15
 
16
- if args.delete('--force') || last_build.stale?
16
+ if args.delete('--force') || last_build.stale? || config.manifest_paths.empty?
17
17
  stdout, stderr, success = build_with_vite(*args)
18
18
  log_build_result(stdout, stderr, success)
19
19
  record_build_metadata(last_build, errors: stderr, success: success)
@@ -23,6 +23,11 @@ class ViteRuby::Config
23
23
  build_output_dir.join('manifest-assets.json')
24
24
  end
25
25
 
26
+ # Internal: Path to the manifest files generated by Vite and vite-plugin-ruby.
27
+ def manifest_paths
28
+ [manifest_path, assets_manifest_path].select(&:exist?)
29
+ end
30
+
26
31
  # Public: The directory where Vite will store the built assets.
27
32
  def build_output_dir
28
33
  root.join(public_dir, public_output_dir)
@@ -119,7 +119,7 @@ private
119
119
 
120
120
  # Internal: Loads and merges the manifest files, resolving the asset paths.
121
121
  def load_manifest
122
- files = [config.manifest_path, config.assets_manifest_path].select(&:exist?)
122
+ files = config.manifest_paths
123
123
  files.map { |path| JSON.parse(path.read) }.inject({}, &:merge).tap(&method(:resolve_references))
124
124
  end
125
125
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '3.2.5'
4
+ VERSION = '3.2.6'
5
5
 
6
6
  # Internal: Versions used by default when running `vite install`.
7
7
  DEFAULT_VITE_VERSION = '^3.0.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vite_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
@@ -202,8 +202,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
202
202
  licenses:
203
203
  - MIT
204
204
  metadata:
205
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.2.5/vite_ruby
206
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.2.5/vite_ruby/CHANGELOG.md
205
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.2.6/vite_ruby
206
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.2.6/vite_ruby/CHANGELOG.md
207
207
  post_install_message: "Thanks for installing Vite Ruby!\n\nIf you upgraded the gem
208
208
  manually, please run:\n\tbundle exec vite upgrade"
209
209
  rdoc_options: []