vite_ruby 3.0.7 → 3.0.10

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: 2fa78fa55a3f2e8d6607fa60c7070562fe0d4781457d186426c1de8618d5d38f
4
- data.tar.gz: 354e7680dc0b7dd4931052d656bb20daa302d6f3763c3f2a02e11ff9cea533df
3
+ metadata.gz: b0fe76829d75ba8f5144fea2047a4ff6572f1effdcfc655830b2d04f71a8369d
4
+ data.tar.gz: 8a198001904fa4de591c8af293a2986847ebb7551caeab3be127aa2ec8b6c1d2
5
5
  SHA512:
6
- metadata.gz: 1da507b4e87c31d1a12fca3d2306db2bfc37067246104ea664a4220d650aee95b571e152a9ec08f9ecad84c5d721690a7faeb7e03c144246c13646c42754a13d
7
- data.tar.gz: 688961190326cac3ea2da957534efa6b8425aade5b3d3ba9948ae685ed86324298acca0aea6293cc015b48765dda0f093a7d868d1478708a346be7a6b384ea04
6
+ metadata.gz: a773ff77c6b805fbb56e93ebd681d79859d80f3e722bdd16023833447ba28db2bc594c3f1f3d02e15980d5f89bce267f3f58587b217611e8150c5e3ef9d39a66
7
+ data.tar.gz: 145ffadb52f3f54454882fcb86d49b7bcbea013380bbc04ef155625e68fd8de21c994346520bdcd00a8ff0910f9f107cb74718ffc78cce12f7c2b41c4e5315de
data/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ## [3.0.10](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.0.9...vite_ruby@3.0.10) (2022-03-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * avoid proxying requests starting with @ ([93d071b](https://github.com/ElMassimo/vite_ruby/commit/93d071b2b807c2e09e24d5d7ea4228974b370960))
7
+ * MissingExecutableError when deploying with Capistrano (close [#192](https://github.com/ElMassimo/vite_ruby/issues/192)) ([22e1691](https://github.com/ElMassimo/vite_ruby/commit/22e1691a0685b1fdeec3904657be5e69a57e6456))
8
+
9
+
10
+ ### Features
11
+
12
+ * bump up default vite version to 2.8.6 ([fd53030](https://github.com/ElMassimo/vite_ruby/commit/fd5303017760dc176b3fb15908f08a16a175c22f))
13
+
14
+
15
+
16
+ ## [3.0.9](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.0.8...vite_ruby@3.0.9) (2022-02-09)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * support older versions of npm (v6) that ship with node 12 and 14 ([0accc36](https://github.com/ElMassimo/vite_ruby/commit/0accc36e9ef82fa0923af4f94253433433c0b074))
22
+
23
+
24
+
25
+ ## [3.0.8](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.0.7...vite_ruby@3.0.8) (2022-01-18)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * remove .DS_Store from installation .gitignore ([#178](https://github.com/ElMassimo/vite_ruby/issues/178)) ([5a0931d](https://github.com/ElMassimo/vite_ruby/commit/5a0931d63318ab5b1bf9ead680540c015afd471a))
31
+
32
+
33
+
1
34
  ## [3.0.7](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.0.6...vite_ruby@3.0.7) (2021-12-27)
2
35
 
3
36
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <h1 align="center">
2
2
  <a href="https://vite-ruby.netlify.app/">
3
- <img src="https://raw.githubusercontent.com/ElMassimo/vite_ruby/main/docs/public/logo.svg" width="120px"/>
3
+ <img src="https://raw.githubusercontent.com/ElMassimo/vite_ruby/main/logo.svg" width="120px"/>
4
4
  </a>
5
5
 
6
6
  <br>
data/lib/tasks/vite.rake CHANGED
@@ -31,7 +31,7 @@ namespace :vite do
31
31
 
32
32
  desc 'Ensures build dependencies like Vite are installed when compiling assets'
33
33
  task :install_dependencies do
34
- system({ 'NODE_ENV' => 'development' }, 'npx --yes ci')
34
+ system({ 'NODE_ENV' => 'development' }, 'npx ci --yes')
35
35
  end
36
36
 
37
37
  desc "Provide information on ViteRuby's environment"
@@ -44,6 +44,7 @@ unless ENV['VITE_RUBY_SKIP_ASSETS_PRECOMPILE_EXTENSION'] == 'true'
44
44
  if Rake::Task.task_defined?('assets:precompile')
45
45
  Rake::Task['assets:precompile'].enhance do |task|
46
46
  prefix = task.name.split(/#|assets:precompile/).first
47
+ Rake::Task["#{ prefix }vite:install_dependencies"].invoke
47
48
  Rake::Task["#{ prefix }vite:build"].invoke
48
49
  end
49
50
  else
@@ -95,8 +95,9 @@ private
95
95
  /public/vite-dev
96
96
  /public/vite-test
97
97
  node_modules
98
+ # Vite uses dotenv and suggests to ignore local-only env files. See
99
+ # https://vitejs.dev/guide/env-and-mode.html#env-files
98
100
  *.local
99
- .DS_Store
100
101
  GITIGNORE
101
102
  end
102
103
 
@@ -54,17 +54,22 @@ private
54
54
 
55
55
  def vite_should_handle?(env)
56
56
  path = normalize_uri(env['PATH_INFO'])
57
- return true if path.start_with?(vite_asset_url_prefix) # Vite asset
58
- return true if path.start_with?(VITE_DEPENDENCY_PREFIX) # Packages and imports
57
+ return true if path.start_with?(vite_url_prefix) # Vite asset
59
58
  return true if file_in_vite_root?(path) # Fallback if Vite can serve the file
60
59
  end
61
60
 
61
+ # NOTE: When using an empty 'public_output_dir', we need to rely on a
62
+ # filesystem check to check whether Vite should serve the request.
62
63
  def file_in_vite_root?(path)
63
64
  path.include?('.') && # Check for extension, avoid filesystem if possible.
64
65
  config.vite_root_dir.join(path.start_with?('/') ? path[1..-1] : path).file?
65
66
  end
66
67
 
67
- def vite_asset_url_prefix
68
- @vite_asset_url_prefix ||= config.public_output_dir.empty? ? "\0" : "/#{ config.public_output_dir }/"
68
+ # NOTE: Vite is configured to use 'public_output_dir' as the base, which can
69
+ # be customized by the user in development to not match any of the routes.
70
+ #
71
+ # If the path starts with that prefix, it will be redirected to Vite.
72
+ def vite_url_prefix
73
+ @vite_url_prefix ||= config.public_output_dir.empty? ? VITE_DEPENDENCY_PREFIX : "/#{ config.public_output_dir }/"
69
74
  end
70
75
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '3.0.7'
4
+ VERSION = '3.0.10'
5
5
 
6
6
  # Internal: Versions used by default when running `vite install`.
7
- DEFAULT_VITE_VERSION = '^2.7.7'
8
- DEFAULT_PLUGIN_VERSION = '^3.0.5'
7
+ DEFAULT_VITE_VERSION = '^2.9.0-beta.3'
8
+ DEFAULT_PLUGIN_VERSION = '^3.0.8'
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.0.7
4
+ version: 3.0.10
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-27 00:00:00.000000000 Z
11
+ date: 2022-03-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.7/vite_ruby
205
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.0.7/vite_ruby/CHANGELOG.md
204
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@3.0.10/vite_ruby
205
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.0.10/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: []
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.1.4
222
+ rubygems_version: 3.3.7
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Use Vite in Ruby and bring joy to your JavaScript experience