vite_ruby 3.4.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/lib/tasks/vite.rake +8 -2
- data/lib/vite_ruby/commands.rb +6 -4
- data/lib/vite_ruby/config.rb +1 -0
- data/lib/vite_ruby/manifest.rb +2 -0
- data/lib/vite_ruby/version.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 184968fc31cdfdcafe5fea4b2ba393155ae968df6a7ffb11fd9ff7c6b30da671
|
4
|
+
data.tar.gz: 1cdbbef05db2234af7496421fad1569d3c3a81d86dd5b88ca8fa27fe19159aaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54c6f374fb5254bad6eccadfc21928f7bceb7871fdc9077261f52837203d1c85855519c824f24d9bbbff243bd2f02bd8ec300fd3323451ea09902b7cd12bf63a
|
7
|
+
data.tar.gz: 31c1ab4e450b3ce0619ebffeda6565868fea3f2b197ffec35a5abddc3101940d6fc856967f568fd2196628a3e2171cfd21313ee4ecbe23ca732f79696da055bc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
# [3.6.0](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.5.0...vite_ruby@3.6.0) (2024-06-07)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* allow skipping dependency install in assets:precompile ([#451](https://github.com/ElMassimo/vite_ruby/issues/451)) ([5a922b2](https://github.com/ElMassimo/vite_ruby/commit/5a922b2071446e3880b17503474a0c7806eab6a7))
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
# [3.5.0](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.4.0...vite_ruby@3.5.0) (2023-11-16)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* prevent clean from deleting assets referenced in the manifests ([8a581c1](https://github.com/ElMassimo/vite_ruby/commit/8a581c15ff480049bbb14dab1b5a3497308521b5))
|
16
|
+
|
17
|
+
|
18
|
+
### Features
|
19
|
+
|
20
|
+
* use vite 5 in new installations ([f063f28](https://github.com/ElMassimo/vite_ruby/commit/f063f283f939d15b3c48c1a9b6efcd589fafbaf1))
|
21
|
+
|
22
|
+
|
23
|
+
|
1
24
|
# [3.4.0](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.3.4...vite_ruby@3.4.0) (2023-11-16)
|
2
25
|
|
3
26
|
|
data/lib/tasks/vite.rake
CHANGED
@@ -59,12 +59,18 @@ unless ENV['VITE_RUBY_SKIP_ASSETS_PRECOMPILE_EXTENSION'] == 'true'
|
|
59
59
|
if Rake::Task.task_defined?('assets:precompile')
|
60
60
|
Rake::Task['assets:precompile'].enhance do |task|
|
61
61
|
prefix = task.name.split(/#|assets:precompile/).first
|
62
|
-
|
62
|
+
unless ENV['VITE_RUBY_SKIP_ASSETS_PRECOMPILE_INSTALL'] == 'true'
|
63
|
+
Rake::Task["#{ prefix }vite:install_dependencies"].invoke
|
64
|
+
end
|
63
65
|
Rake::Task["#{ prefix }vite:build_all"].invoke
|
64
66
|
end
|
65
67
|
else
|
66
68
|
desc 'Bundle Vite assets'
|
67
|
-
|
69
|
+
if ENV['VITE_RUBY_SKIP_ASSETS_PRECOMPILE_INSTALL'] == 'true'
|
70
|
+
Rake::Task.define_task('assets:precompile' => 'vite:build_all')
|
71
|
+
else
|
72
|
+
Rake::Task.define_task('assets:precompile' => ['vite:install_dependencies', 'vite:build_all'])
|
73
|
+
end
|
68
74
|
end
|
69
75
|
|
70
76
|
unless Rake::Task.task_defined?('assets:clean')
|
data/lib/vite_ruby/commands.rb
CHANGED
@@ -50,7 +50,7 @@ class ViteRuby::Commands
|
|
50
50
|
|
51
51
|
versions
|
52
52
|
.each_with_index
|
53
|
-
.drop_while { |(mtime,
|
53
|
+
.drop_while { |(mtime, _files), index|
|
54
54
|
max_age = [0, Time.now - Time.at(mtime)].max
|
55
55
|
max_age < age_in_seconds || index < keep_up_to
|
56
56
|
}
|
@@ -143,14 +143,16 @@ private
|
|
143
143
|
|
144
144
|
def versions
|
145
145
|
all_files = Dir.glob("#{ config.build_output_dir }/**/*")
|
146
|
-
entries = all_files - config.manifest_paths -
|
146
|
+
entries = all_files - config.manifest_paths - files_referenced_in_manifests
|
147
147
|
entries.reject { |file| File.directory?(file) }
|
148
148
|
.group_by { |file| File.mtime(file).utc.to_i }
|
149
149
|
.sort.reverse
|
150
150
|
end
|
151
151
|
|
152
|
-
def
|
153
|
-
|
152
|
+
def files_referenced_in_manifests
|
153
|
+
config.manifest_paths.flat_map { |path|
|
154
|
+
JSON.parse(path.read).map { |_, entry| entry['file'] }
|
155
|
+
}.compact.uniq.map { |path| config.build_output_dir.join(path).to_s }
|
154
156
|
end
|
155
157
|
|
156
158
|
def with_node_env(env)
|
data/lib/vite_ruby/config.rb
CHANGED
data/lib/vite_ruby/manifest.rb
CHANGED
data/lib/vite_ruby/version.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class ViteRuby
|
4
|
-
VERSION = '3.
|
4
|
+
VERSION = '3.6.0'
|
5
5
|
|
6
6
|
# Internal: Versions used by default when running `vite install`.
|
7
|
-
DEFAULT_VITE_VERSION = '^
|
8
|
-
DEFAULT_PLUGIN_VERSION = '^
|
7
|
+
DEFAULT_VITE_VERSION = '^5.0.0'
|
8
|
+
DEFAULT_PLUGIN_VERSION = '^5.0.0'
|
9
9
|
end
|
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.
|
4
|
+
version: 3.6.0
|
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:
|
11
|
+
date: 2024-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|
@@ -208,8 +208,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
|
|
208
208
|
licenses:
|
209
209
|
- MIT
|
210
210
|
metadata:
|
211
|
-
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.
|
212
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.
|
211
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.6.0/vite_ruby
|
212
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.6.0/vite_ruby/CHANGELOG.md
|
213
213
|
post_install_message: "Thanks for installing Vite Ruby!\n\nIf you upgraded the gem
|
214
214
|
manually, please run:\n\tbundle exec vite upgrade"
|
215
215
|
rdoc_options: []
|