vite_ruby 3.0.9 → 4.0.0.alpha1

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: 359e71c1ab4e22eb0b106b478e85687cc5ec5bdac963dcf070a54722957772bc
4
- data.tar.gz: 0b636225fb843443d2007cd9616aa937952d79f6764c1bd5576908e959bcfae6
3
+ metadata.gz: 3e369fc30038cbf7475208298ccc3eebbcec6ad98100b785d6303b766afc3aad
4
+ data.tar.gz: '0811dc3a900d49b9b0b3c406b32b96e852d5a367dce1c96924b6b0a936fddc39'
5
5
  SHA512:
6
- metadata.gz: ed0d0628132fb27494d33e5fe6c6fcd472105c465b28b93cb356196e3d04440107a687663d432777c37ac930bace38afa3a9d2ff74495ab0342d39a7c4b33d33
7
- data.tar.gz: 51d0256a85c7865249de78f71544564b96f17eff871819e37efde21fff136eb95e90bf66c1fcae7a0c96a6fbc74e7e6b238d30fe9a6b33a0373dbcf77eab8844
6
+ metadata.gz: ef190e8c53cf93255f56a69fa7db7fe684f1fc4924b21aca81d9d2160ec117accf643771a5692bf58225884958fa06fc3b1e713241eaa6f2f223b8fca35e216a
7
+ data.tar.gz: 22b63dc5256c147ddf084f0324f2e6a236b86b654e6cd63e99da2608c6869290aa80885b8d9c61f8c7056df449464cb24831717de5e1a0857b5cf28af303700c
data/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
1
- ## [3.0.9](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.0.8...vite_ruby@3.0.9) (2022-02-09)
1
+ # [](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@3.0.8...vite_ruby@) (2022-01-18)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * support older versions of npm (v6) that ship with node 12 and 14 ([0accc36](https://github.com/ElMassimo/vite_ruby/commit/0accc36e9ef82fa0923af4f94253433433c0b074))
6
+ * **experimental:** add support for Subresource Integrity via vite-plugin-manifest-sri ([0b3142c](https://github.com/ElMassimo/vite_ruby/commit/0b3142cd9d569a5f56821f53cdade337779bb0c1))
7
7
 
8
8
 
9
9
 
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 ci --yes')
34
+ system({ 'NODE_ENV' => 'development' }, 'npx --yes ci')
35
35
  end
36
36
 
37
37
  desc "Provide information on ViteRuby's environment"
@@ -22,16 +22,15 @@ class ViteRuby::Manifest
22
22
  lookup!(name, **options).fetch('file')
23
23
  end
24
24
 
25
- # Public: Returns scripts, imported modules, and stylesheets for the specified
25
+ # Public: Returns entries, imported modules, and stylesheets for the specified
26
26
  # entrypoint files.
27
27
  def resolve_entries(*names, **options)
28
28
  entries = names.map { |name| lookup!(name, **options) }
29
- script_paths = entries.map { |entry| entry.fetch('file') }
30
29
 
31
30
  imports = dev_server_running? ? [] : entries.flat_map { |entry| entry['imports'] }.compact.uniq
32
31
  {
33
- scripts: script_paths,
34
- imports: imports.map { |entry| entry.fetch('file') }.uniq,
32
+ main: entries.map(&TO_ENTRY),
33
+ imports: imports.map(&TO_ENTRY).uniq,
35
34
  stylesheets: dev_server_running? ? [] : (entries + imports).flat_map { |entry| entry['css'] }.compact.uniq,
36
35
  }
37
36
  end
@@ -63,6 +62,9 @@ class ViteRuby::Manifest
63
62
 
64
63
  protected
65
64
 
65
+ # Internal: Returns a [src, attrs] entry.
66
+ TO_ENTRY = ->(entry) { [entry.fetch('file'), entry.slice('integrity').symbolize_keys] }
67
+
66
68
  # Internal: Strict version of lookup.
67
69
  #
68
70
  # Returns a relative path for the asset, or raises an error if not found.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '3.0.9'
4
+ VERSION = '4.0.0.alpha1'
5
5
 
6
6
  # Internal: Versions used by default when running `vite install`.
7
7
  DEFAULT_VITE_VERSION = '^2.7.7'
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.9
4
+ version: 4.0.0.alpha1
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-02-09 00:00:00.000000000 Z
11
+ date: 2022-01-18 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.9/vite_ruby
205
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@3.0.9/vite_ruby/CHANGELOG.md
204
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@4.0.0.alpha1/vite_ruby
205
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@4.0.0.alpha1/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: []
@@ -215,11 +215,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
215
215
  version: '2.4'
216
216
  required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  requirements:
218
- - - ">="
218
+ - - ">"
219
219
  - !ruby/object:Gem::Version
220
- version: '0'
220
+ version: 1.3.1
221
221
  requirements: []
222
- rubygems_version: 3.3.3
222
+ rubygems_version: 3.2.32
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Use Vite in Ruby and bring joy to your JavaScript experience