vite_ruby 3.2.9 → 3.2.11

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: 20ac624f70c7542fa8b7ca1c607ef176472b092e528351cd2a0ebd7b88ec4814
4
- data.tar.gz: 02b3d2e24e44744a8aff0cb9a86b8994fa5418c565053c578a8a761a47d69016
3
+ metadata.gz: b8ca61fff8bf04ca97fb7c12f502df5b49d214d063309b98704b182e5e149b7e
4
+ data.tar.gz: 124212d3550eaa9ed5825bd05b88258ab7e990edd778809817bc23eacd4b2842
5
5
  SHA512:
6
- metadata.gz: 4cfe7af9d34936166ca6c0576ec1d5f84e445d64232d726f53ff79b92c767744aba2a3d72b7874301946ebddc51c2f1567645f5af3b8c82f8c6195ff364d52aa
7
- data.tar.gz: ad7b30b2f29c1c649f938266766096e1b99860f4d5f69b7efb0aa744078a0f72992585e21840d5976be80d5bd736b87e9bb3fd92639076b1bfd88705fdada696
6
+ metadata.gz: 2af7324f684cfd6824b80d14d667cff6c1f3dbbc7829d51ea8f0bf403fdf61f09c3b3d008e2446314ed6b0a8ae49dace5157ca1a2968622498d8ab4b59eec9ae
7
+ data.tar.gz: e7e53a9e3262f170b7a68dbe5b505cb8f1e96bcbd546a3c8cdd17f896946ba0df538db63590725eca038f79fef162562f3bc8eb79e0059519fae2a4065916d59
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [3.2.11](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.10...vite_ruby@3.2.11) (2022-11-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * avoid removing double extension for non-preprocessor assets ([#301](https://github.com/ElMassimo/vite_ruby/issues/301)) ([2024f62](https://github.com/ElMassimo/vite_ruby/commit/2024f62af917cabcb817c32a5fbbe709d477c19f))
7
+
8
+
9
+
10
+ ## [3.2.10](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.9...vite_ruby@3.2.10) (2022-11-03)
11
+
12
+
13
+
1
14
  ## [3.2.9](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.2.8...vite_ruby@3.2.9) (2022-11-02)
2
15
 
3
16
 
@@ -52,7 +52,7 @@ private
52
52
  # Internal: Returns a digest of all the watched files, allowing to detect
53
53
  # changes, and skip Vite builds if no files have changed.
54
54
  def watched_files_digest
55
- Dir.chdir File.expand_path(config.root) do
55
+ config.within_root do
56
56
  files = Dir[*config.watched_paths].reject { |f| File.directory?(f) }
57
57
  file_ids = files.sort.map { |f| "#{ File.basename(f) }/#{ Digest::SHA1.file(f).hexdigest }" }
58
58
  Digest::SHA1.hexdigest(file_ids.join('/'))
@@ -100,7 +100,7 @@ class ViteRuby::Commands
100
100
 
101
101
  # Internal: Prints information about ViteRuby's environment.
102
102
  def print_info
103
- Dir.chdir(config.root) do
103
+ config.within_root do
104
104
  $stdout.puts "bin/vite present?: #{ File.exist? 'bin/vite' }"
105
105
 
106
106
  $stdout.puts "vite_ruby: #{ ViteRuby::VERSION }"
@@ -75,6 +75,11 @@ class ViteRuby::Config
75
75
  ].freeze
76
76
  end
77
77
 
78
+ # Internal: Changes the current directory to the root dir.
79
+ def within_root(&block)
80
+ Dir.chdir(File.expand_path(root), &block)
81
+ end
82
+
78
83
  private
79
84
 
80
85
  # Internal: Coerces all the configuration values, in case they were passed
@@ -38,7 +38,7 @@ private
38
38
  uri
39
39
  .sub(HOST_WITH_PORT_REGEX, '/') # Hanami adds the host and port.
40
40
  .sub('.ts.js', '.ts') # Hanami's javascript helper always adds the extension.
41
- .sub(/(\.(?!min|module)\w+)\.css$/, '\1') # Rails' stylesheet_link_tag always adds the extension.
41
+ .sub(/\.(sass|scss|styl|stylus|less|pcss|postcss)\.css$/, '.\1') # Rails' stylesheet_link_tag always adds the extension.
42
42
  end
43
43
 
44
44
  def forward_to_vite_dev_server(env)
@@ -8,7 +8,7 @@ class ViteRuby::Runner
8
8
 
9
9
  # Public: Executes Vite with the specified arguments.
10
10
  def run(argv, exec: false)
11
- Dir.chdir(config.root) {
11
+ config.within_root {
12
12
  cmd = command_for(argv)
13
13
  return Kernel.exec(*cmd) if exec
14
14
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '3.2.9'
4
+ VERSION = '3.2.11'
5
5
 
6
6
  # Internal: Versions used by default when running `vite install`.
7
7
  DEFAULT_VITE_VERSION = '^3.2.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.9
4
+ version: 3.2.11
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-02 00:00:00.000000000 Z
11
+ date: 2022-11-13 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.9/vite_ruby
206
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.2.9/vite_ruby/CHANGELOG.md
205
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.2.11/vite_ruby
206
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.2.11/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: []