vite_ruby 3.2.8 → 3.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/vite_ruby/builder.rb +6 -5
- data/lib/vite_ruby/cli/install.rb +1 -1
- data/lib/vite_ruby/config.rb +2 -2
- data/lib/vite_ruby/io.rb +1 -1
- data/lib/vite_ruby/runner.rb +2 -2
- data/lib/vite_ruby/version.rb +1 -1
- 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: 20ac624f70c7542fa8b7ca1c607ef176472b092e528351cd2a0ebd7b88ec4814
|
4
|
+
data.tar.gz: 02b3d2e24e44744a8aff0cb9a86b8994fa5418c565053c578a8a761a47d69016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cfe7af9d34936166ca6c0576ec1d5f84e445d64232d726f53ff79b92c767744aba2a3d72b7874301946ebddc51c2f1567645f5af3b8c82f8c6195ff364d52aa
|
7
|
+
data.tar.gz: ad7b30b2f29c1c649f938266766096e1b99860f4d5f69b7efb0aa744078a0f72992585e21840d5976be80d5bd736b87e9bb3fd92639076b1bfd88705fdada696
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## [3.2.9](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.8...vite_ruby@3.2.9) (2022-11-02)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* allow different ViteRuby instances to set different env vars ([25628a7](https://github.com/ElMassimo/vite_ruby/commit/25628a752cbd4828547c1f454cc4cb2217a591e0))
|
7
|
+
* output exit code when vite process fails ([#294](https://github.com/ElMassimo/vite_ruby/issues/294)) ([eb8f678](https://github.com/ElMassimo/vite_ruby/commit/eb8f678248a02b693fffe5a49309984fed92a051)), closes [#292](https://github.com/ElMassimo/vite_ruby/issues/292)
|
8
|
+
|
9
|
+
|
10
|
+
|
1
11
|
## [3.2.8](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.7...vite_ruby@3.2.8) (2022-10-28)
|
2
12
|
|
3
13
|
|
data/lib/vite_ruby/builder.rb
CHANGED
@@ -14,10 +14,10 @@ class ViteRuby::Builder
|
|
14
14
|
last_build = last_build_metadata(ssr: args.include?('--ssr'))
|
15
15
|
|
16
16
|
if args.delete('--force') || last_build.stale? || config.manifest_paths.empty?
|
17
|
-
stdout, stderr,
|
18
|
-
log_build_result(stdout, stderr,
|
19
|
-
record_build_metadata(last_build, errors: stderr, success: success)
|
20
|
-
success
|
17
|
+
stdout, stderr, status = build_with_vite(*args)
|
18
|
+
log_build_result(stdout, stderr, status)
|
19
|
+
record_build_metadata(last_build, errors: stderr, success: status.success?)
|
20
|
+
status.success?
|
21
21
|
elsif last_build.success
|
22
22
|
logger.debug "Skipping vite build. Watched files have not changed since the last build at #{ last_build.timestamp }"
|
23
23
|
true
|
@@ -70,11 +70,12 @@ private
|
|
70
70
|
#
|
71
71
|
# NOTE: By default it also outputs the manifest entries.
|
72
72
|
def log_build_result(_stdout, stderr, status)
|
73
|
-
if status
|
73
|
+
if status.success?
|
74
74
|
logger.info "Build with Vite complete: #{ config.build_output_dir }"
|
75
75
|
logger.error stderr unless stderr.empty?
|
76
76
|
else
|
77
77
|
logger.error stderr
|
78
|
+
logger.error status
|
78
79
|
logger.error 'Build with Vite failed! ❌'
|
79
80
|
logger.error '❌ Check that vite and vite-plugin-ruby are in devDependencies and have been installed. ' if stderr.include?('ERR! canceled')
|
80
81
|
end
|
@@ -111,7 +111,7 @@ private
|
|
111
111
|
def run_with_capture(*args, **options)
|
112
112
|
Dir.chdir(root) do
|
113
113
|
_, stderr, status = ViteRuby::IO.capture(*args, **options)
|
114
|
-
say(stderr) unless status || stderr.empty?
|
114
|
+
say(stderr) unless status.success? || stderr.empty?
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
data/lib/vite_ruby/config.rb
CHANGED
@@ -55,12 +55,12 @@ class ViteRuby::Config
|
|
55
55
|
end
|
56
56
|
|
57
57
|
# Public: Sets additional environment variables for vite-plugin-ruby.
|
58
|
-
def to_env
|
58
|
+
def to_env(env_vars = ViteRuby.env)
|
59
59
|
CONFIGURABLE_WITH_ENV.each_with_object({}) do |option, env|
|
60
60
|
unless (value = @config[option]).nil?
|
61
61
|
env["#{ ViteRuby::ENV_PREFIX }_#{ option.upcase }"] = value.to_s
|
62
62
|
end
|
63
|
-
end.merge(
|
63
|
+
end.merge(env_vars)
|
64
64
|
end
|
65
65
|
|
66
66
|
# Internal: Files and directories that should be watched for changes.
|
data/lib/vite_ruby/io.rb
CHANGED
data/lib/vite_ruby/runner.rb
CHANGED
@@ -23,11 +23,11 @@ private
|
|
23
23
|
|
24
24
|
extend Forwardable
|
25
25
|
|
26
|
-
def_delegators :@vite_ruby, :config, :logger
|
26
|
+
def_delegators :@vite_ruby, :config, :logger, :env
|
27
27
|
|
28
28
|
# Internal: Returns an Array with the command to run.
|
29
29
|
def command_for(args)
|
30
|
-
[config.to_env].tap do |cmd|
|
30
|
+
[config.to_env(env)].tap do |cmd|
|
31
31
|
args = args.clone
|
32
32
|
cmd.push('node', '--inspect-brk') if args.delete('--inspect')
|
33
33
|
cmd.push('node', '--trace-deprecation') if args.delete('--trace_deprecation')
|
data/lib/vite_ruby/version.rb
CHANGED
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.
|
4
|
+
version: 3.2.9
|
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-
|
11
|
+
date: 2022-11-02 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.
|
206
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.2.
|
205
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.2.9/vite_ruby
|
206
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.2.9/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: []
|