vite_ruby 3.0.3 → 3.0.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: 23aa04b92951f5416f6c6efdab61f834a69893c5890196181ed3533e3495a1dc
4
- data.tar.gz: bc3926785ea462a5f3ac9bb3fa216d2c74eb7997b30ee8be6aeb5191de43a4c4
3
+ metadata.gz: c544599e945ff20ce37f51b6c700190e703afa0e6e2af7114229a82385a53828
4
+ data.tar.gz: 7aa9c7c08f3ad64349d50d9313bec729492aaa6be5f4d191aef05480510ff955
5
5
  SHA512:
6
- metadata.gz: afa2927630c8005cd0510cac26355379870ef0b5c6df0058e4ea337cdd0b0b077c2d847dafb73832fc2290a567fe82dbb955adbf4aa3e5865bc3db80e561a337
7
- data.tar.gz: 118cadf8125ef8759fa7251fe8cef36429c498b3ec802d0862e66a716576e7ec5caf7c46e99e49d58f7ed78479ddd740d58df6f3bb0b5028ffe9028c3042ad79
6
+ metadata.gz: 70d9fc824969aaaad4b3cfcc644beb934de404dcce0fe1faa30d97d9377f757baae99aad77912db2e0f9dfee176685aaaa27f6828ce6bfbbeddf433131146c7a
7
+ data.tar.gz: dcc84cacfad3542b7475f7dcd2a8fa801d4ded3bfe5f944f2ba6cd43bcb2acd3107caa45145d7e435c35bd85ef8bfcacb208c3155290f8c0b28a7ec30e88f1d1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [3.0.4](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.0.3...vite_ruby@3.0.4) (2021-12-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * handle new virtual legacy-polyfill name ([#157](https://github.com/ElMassimo/vite_ruby/issues/157)) ([a34e77f](https://github.com/ElMassimo/vite_ruby/commit/a34e77f3b342c9171adc50adfd5220b57bddb961))
7
+
8
+
9
+
1
10
  ## [3.0.3](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.0.2...vite_ruby@3.0.3) (2021-12-09)
2
11
 
3
12
 
@@ -147,9 +147,10 @@ private
147
147
 
148
148
  # Internal: Resolves the manifest entry name for the specified resource.
149
149
  def resolve_entry_name(name, type: nil)
150
- name = with_file_extension(name.to_s, type)
150
+ return resolve_virtual_entry(name) if type == :virtual
151
151
 
152
- raise ArgumentError, "Asset names can not be relative. Found: #{ name }" if name.start_with?('.') && !name.include?('legacy-polyfills')
152
+ name = with_file_extension(name.to_s, type)
153
+ raise ArgumentError, "Asset names can not be relative. Found: #{ name }" if name.start_with?('.')
153
154
 
154
155
  # Explicit path, relative to the source_code_dir.
155
156
  name.sub(%r{^~/(.+)$}) { return Regexp.last_match(1) }
@@ -171,6 +172,11 @@ private
171
172
  end
172
173
  end
173
174
 
175
+ # Internal: Resolves a virtual entry by walking all the manifest keys.
176
+ def resolve_virtual_entry(name)
177
+ manifest.keys.find { |file| file.include?(name) } || name
178
+ end
179
+
174
180
  # Internal: Adds a file extension to the file name, unless it already has one.
175
181
  def with_file_extension(name, entry_type)
176
182
  if File.extname(name).empty? && (ext = extension_for_type(entry_type))
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '3.0.3'
4
+ VERSION = '3.0.4'
5
5
 
6
6
  # Internal: Versions used by default when running `vite install`.
7
7
  DEFAULT_VITE_VERSION = '^2.6.13'
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.0.3
4
+ version: 3.0.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: 2021-12-09 00:00:00.000000000 Z
11
+ date: 2021-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -201,8 +201,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
201
201
  licenses:
202
202
  - MIT
203
203
  metadata:
204
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.0.3/vite_ruby
205
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.0.3/vite_ruby/CHANGELOG.md
204
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.0.4/vite_ruby
205
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.0.4/vite_ruby/CHANGELOG.md
206
206
  post_install_message: "Thanks for installing Vite Ruby!\n\nIf you upgraded the gem
207
207
  manually, please run:\n\tbundle exec vite upgrade"
208
208
  rdoc_options: []