vite_ruby 3.2.2 → 3.2.4

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: 5b65b4689d12ad05727f229b09299e32d11c94b5d30b07371dbbc85135fb3ed1
4
- data.tar.gz: 54d985ef36ee1c58fd888734b1a230ed38b6143b1a779f95e6021c83fc51e8e1
3
+ metadata.gz: 0370b365c1f6fbddd0cd14fc9467f56d4c039e167e62e380feb5df9c8b72a0d7
4
+ data.tar.gz: 13fa2eb1842a8868a9490dfcf99c450a1f8bdda35ad7d89e5da8e904bde55a4e
5
5
  SHA512:
6
- metadata.gz: bad02497a620adf6acb4601b2a18dc36131569c1483c27f5908cf4322e67cd344d798d91219aa0367e8f3a541ecb5ba1b57360d0996c87e8f20b8988dc3d7e3d
7
- data.tar.gz: 409e630b73354c2554e5d024fcc42d3b965d71642ee56f76624cd799c0fa646964bd58d00a490c9d7424c3f16dc3fc6925b4373f1ccacd3099f101ce8c350d43
6
+ metadata.gz: 0e18dd917b8ff8f593196cc4917ec5b4f0ecb0f3a3e6066f4438e4e56d150be0bd830fd9b66b82f95420ab1b53c3e530238f9dcdcb5505612df4d8b551b6f53d
7
+ data.tar.gz: 4f781ed0748d645d270c08c9b704c00c7529ab84ea6a531ee0904ef902fd8884410c714d8b30f4a0b9bafe3e493decad00bd4df78ddebc6d9d2c7e167eed008c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [3.2.4](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.3...vite_ruby@3.2.4) (2022-10-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **BREAKING CHANGE:** lookup now returns nil if auto-build fails ([#268](https://github.com/ElMassimo/vite_ruby/issues/268)) ([cf2dec1](https://github.com/ElMassimo/vite_ruby/commit/cf2dec1bfec2279179c1671e5b42479549fd11c4)), closes [#267](https://github.com/ElMassimo/vite_ruby/issues/267)
7
+
8
+
9
+
10
+ ## [3.2.3](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.2...vite_ruby@3.2.3) (2022-08-28)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * prevent yarn 2+ error in `assets:precompile` ([#241](https://github.com/ElMassimo/vite_ruby/issues/241)) ([e7e857a](https://github.com/ElMassimo/vite_ruby/commit/e7e857ac763dd053a8bda4b27d26a2090269f6d8))
16
+
17
+
18
+
1
19
  ## [3.2.2](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.1...vite_ruby@3.2.2) (2022-08-12)
2
20
 
3
21
 
data/lib/tasks/vite.rake CHANGED
@@ -86,5 +86,8 @@ if ARGV.include?('assets:precompile')
86
86
  else
87
87
  ENV['NPM_CONFIG_INCLUDE'] = 'dev'
88
88
  end
89
- ENV['YARN_PRODUCTION'] = 'false'
89
+
90
+ if ViteRuby.commands.legacy_yarn_version?
91
+ ENV['YARN_PRODUCTION'] = 'false'
92
+ end
90
93
  end
@@ -71,6 +71,11 @@ class ViteRuby::Commands
71
71
  `npm --version`.to_i < 7 rescue false
72
72
  end
73
73
 
74
+ # Internal: Checks if the yarn version is 1.x.
75
+ def legacy_yarn_version?
76
+ `yarn --version`.to_i < 2 rescue false
77
+ end
78
+
74
79
  # Internal: Verifies if ViteRuby is properly installed.
75
80
  def verify_install
76
81
  unless File.exist?(config.root.join('bin/vite'))
@@ -78,7 +78,7 @@ protected
78
78
  # manifest.lookup('calendar.js')
79
79
  # => { "file" => "/vite/assets/calendar-1016838bab065ae1e122.js", "imports" => [] }
80
80
  def lookup(name, **options)
81
- @build_mutex.synchronize { builder.build } if should_build?
81
+ @build_mutex.synchronize { builder.build || (return nil) } if should_build?
82
82
 
83
83
  find_manifest_entry resolve_entry_name(name, **options)
84
84
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '3.2.2'
4
+ VERSION = '3.2.4'
5
5
 
6
6
  # Internal: Versions used by default when running `vite install`.
7
7
  DEFAULT_VITE_VERSION = '^3.0.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vite_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.2
4
+ version: 3.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-12 00:00:00.000000000 Z
11
+ date: 2022-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -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.2/vite_ruby
206
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.2.2/vite_ruby/CHANGELOG.md
205
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.2.4/vite_ruby
206
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.2.4/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: []