sass-embedded 1.76.0 → 1.77.1
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 +4 -4
- data/exe/sass +1 -1
- data/ext/sass/Rakefile +20 -13
- data/ext/sass/package.json +1 -1
- data/lib/sass/canonicalize_context.rb +5 -1
- data/lib/sass/compiler/connection.rb +3 -1
- data/lib/sass/compiler/dispatcher.rb +2 -1
- data/lib/sass/compiler/host/importer_registry.rb +8 -4
- data/lib/sass/compiler/host.rb +1 -1
- data/lib/sass/embedded/version.rb +1 -1
- data/lib/sass/exception.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bfff52de55e49e0fca1fc3e31b5872242a1bb7029df3f2559d4573572cfc7ea
|
4
|
+
data.tar.gz: 234f54677a6e1081be4b7c89f5e96941df79dfb96cd2e22a1820f983f1399d43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da2f6ff5eb532eb242490de2089775382901caa745c9115b66d53a326ebf58a03a53c24f9e67b16a2cf338a9671b318d12af29ecf72e84cf79032c04e710e70e
|
7
|
+
data.tar.gz: 91d0022d942e73e64436a34fab0f7cc14bdc02095937150d80559f18bb9a810e8a3ef9ee7e996be3086b6fbd9e104d2ddd76ab8ce30d6110c390ab60daf83451
|
data/exe/sass
CHANGED
data/ext/sass/Rakefile
CHANGED
@@ -54,7 +54,7 @@ file 'cli.rb' => %w[dart-sass] do |t|
|
|
54
54
|
# frozen_string_literal: true
|
55
55
|
|
56
56
|
module Sass
|
57
|
-
|
57
|
+
module CLI
|
58
58
|
COMMAND = [#{command}].freeze
|
59
59
|
end
|
60
60
|
|
@@ -174,6 +174,8 @@ module FileUtils
|
|
174
174
|
end
|
175
175
|
|
176
176
|
def gem_install(name, version, platform)
|
177
|
+
require 'rubygems/remote_fetcher'
|
178
|
+
|
177
179
|
install_dir = File.absolute_path('ruby')
|
178
180
|
|
179
181
|
if Rake::FileUtilsExt.verbose_flag
|
@@ -190,25 +192,26 @@ module FileUtils
|
|
190
192
|
|
191
193
|
dependency = Gem::Dependency.new(name, version)
|
192
194
|
|
193
|
-
|
195
|
+
dependency_request = Gem::Resolver::DependencyRequest.new(dependency, nil)
|
194
196
|
|
195
|
-
|
197
|
+
resolver_spec = Gem::Resolver::BestSet.new.find_all(dependency_request).find do |s|
|
196
198
|
s.platform == platform
|
197
199
|
end
|
198
200
|
|
199
|
-
raise if
|
201
|
+
raise if resolver_spec.nil?
|
200
202
|
|
203
|
+
options = { force: true, install_dir: }
|
201
204
|
if Rake::FileUtilsExt.nowrite_flag
|
202
|
-
installer = Gem::Installer.for_spec(spec,
|
205
|
+
installer = Gem::Installer.for_spec(resolver_spec.spec, options)
|
203
206
|
else
|
204
|
-
path =
|
205
|
-
installer = Gem::Installer.at(path,
|
207
|
+
path = resolver_spec.download(options)
|
208
|
+
installer = Gem::Installer.at(path, options)
|
206
209
|
installer.install
|
207
210
|
end
|
208
211
|
|
209
212
|
yield installer.dir
|
210
213
|
ensure
|
211
|
-
rm_rf install_dir
|
214
|
+
rm_rf install_dir unless Rake::FileUtilsExt.nowrite_flag
|
212
215
|
end
|
213
216
|
end
|
214
217
|
|
@@ -312,7 +315,9 @@ module SassConfig
|
|
312
315
|
|
313
316
|
repo = 'https://repo.maven.apache.org/maven2/com/google/protobuf/protoc'
|
314
317
|
|
315
|
-
|
318
|
+
dependency = Gem::Dependency.new('google-protobuf')
|
319
|
+
|
320
|
+
spec = dependency.to_spec
|
316
321
|
|
317
322
|
version = spec.version
|
318
323
|
|
@@ -350,12 +355,14 @@ module SassConfig
|
|
350
355
|
|
351
356
|
uri
|
352
357
|
rescue Gem::RemoteFetcher::FetchError
|
353
|
-
|
354
|
-
|
358
|
+
dependency_request = Gem::Resolver::DependencyRequest.new(dependency, nil)
|
359
|
+
|
360
|
+
versions = Gem::Resolver::BestSet.new.find_all(dependency_request).filter_map do |s|
|
361
|
+
s.version if s.platform == Gem::Platform::RUBY
|
355
362
|
end
|
356
363
|
|
357
|
-
|
358
|
-
uri = "#{repo}/#{
|
364
|
+
versions.sort.reverse_each do |v|
|
365
|
+
uri = "#{repo}/#{v}/protoc-#{v}-#{os}-#{cpu}.exe"
|
359
366
|
|
360
367
|
Gem::RemoteFetcher.fetcher.fetch_https(Gem::Uri.new("#{uri}.sha1"))
|
361
368
|
|
data/ext/sass/package.json
CHANGED
@@ -7,13 +7,17 @@ module Sass
|
|
7
7
|
# @see https://sass-lang.com/documentation/js-api/interfaces/canonicalizecontext/
|
8
8
|
class CanonicalizeContext
|
9
9
|
# @return [String, nil]
|
10
|
-
|
10
|
+
def containing_url
|
11
|
+
@containing_url_unused = false
|
12
|
+
@containing_url
|
13
|
+
end
|
11
14
|
|
12
15
|
# @return [Boolean]
|
13
16
|
attr_reader :from_import
|
14
17
|
|
15
18
|
# @!visibility private
|
16
19
|
def initialize(canonicalize_request)
|
20
|
+
@containing_url_unused = true
|
17
21
|
@containing_url = canonicalize_request.containing_url == '' ? nil : canonicalize_request.containing_url
|
18
22
|
@from_import = canonicalize_request.from_import
|
19
23
|
end
|
@@ -10,7 +10,7 @@ module Sass
|
|
10
10
|
#
|
11
11
|
# It runs the `sass --embedded` command.
|
12
12
|
class Connection
|
13
|
-
def initialize
|
13
|
+
def initialize
|
14
14
|
@mutex = Mutex.new
|
15
15
|
@stdin, @stdout, @stderr, @wait_thread = begin
|
16
16
|
Open3.popen3(*CLI::COMMAND, '--embedded', chdir: __dir__)
|
@@ -23,7 +23,9 @@ module Sass
|
|
23
23
|
end
|
24
24
|
|
25
25
|
@stdin.binmode
|
26
|
+
end
|
26
27
|
|
28
|
+
def listen(dispatcher)
|
27
29
|
Thread.new do
|
28
30
|
Thread.current.name = "sass-embedded-process-stdout-poller-#{@wait_thread.pid}"
|
29
31
|
|
@@ -68,12 +68,14 @@ module Sass
|
|
68
68
|
|
69
69
|
def canonicalize(canonicalize_request)
|
70
70
|
importer = @importers_by_id[canonicalize_request.importer_id]
|
71
|
+
canonicalize_context = CanonicalizeContext.new(canonicalize_request)
|
71
72
|
url = importer.canonicalize(canonicalize_request.url,
|
72
|
-
|
73
|
+
canonicalize_context)&.to_s
|
73
74
|
|
74
75
|
EmbeddedProtocol::InboundMessage::CanonicalizeResponse.new(
|
75
76
|
id: canonicalize_request.id,
|
76
|
-
url
|
77
|
+
url:,
|
78
|
+
containing_url_unused: canonicalize_context.instance_eval { @containing_url_unused }
|
77
79
|
)
|
78
80
|
rescue StandardError => e
|
79
81
|
EmbeddedProtocol::InboundMessage::CanonicalizeResponse.new(
|
@@ -103,12 +105,14 @@ module Sass
|
|
103
105
|
|
104
106
|
def file_import(file_import_request)
|
105
107
|
importer = @importers_by_id[file_import_request.importer_id]
|
108
|
+
canonicalize_context = CanonicalizeContext.new(file_import_request)
|
106
109
|
file_url = importer.find_file_url(file_import_request.url,
|
107
|
-
|
110
|
+
canonicalize_context)&.to_s
|
108
111
|
|
109
112
|
EmbeddedProtocol::InboundMessage::FileImportResponse.new(
|
110
113
|
id: file_import_request.id,
|
111
|
-
file_url
|
114
|
+
file_url:,
|
115
|
+
containing_url_unused: canonicalize_context.instance_eval { @containing_url_unused }
|
112
116
|
)
|
113
117
|
rescue StandardError => e
|
114
118
|
EmbeddedProtocol::InboundMessage::FileImportResponse.new(
|
data/lib/sass/compiler/host.rb
CHANGED
@@ -36,7 +36,7 @@ module Sass
|
|
36
36
|
quiet_deps:,
|
37
37
|
silence_deprecations:,
|
38
38
|
verbose:)
|
39
|
-
alert_color = Exception.
|
39
|
+
alert_color = Exception.to_tty? if alert_color.nil?
|
40
40
|
|
41
41
|
@function_registry = FunctionRegistry.new(functions, alert_color:)
|
42
42
|
@importer_registry = ImporterRegistry.new(importers, load_paths, alert_color:)
|
data/lib/sass/exception.rb
CHANGED
@@ -26,7 +26,7 @@ module Sass
|
|
26
26
|
def full_message(highlight: nil, order: nil, **)
|
27
27
|
return super if @full_message.nil?
|
28
28
|
|
29
|
-
highlight = Exception.
|
29
|
+
highlight = Exception.to_tty? if highlight.nil?
|
30
30
|
if highlight
|
31
31
|
@full_message.dup
|
32
32
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass-embedded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.77.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -107,8 +107,8 @@ licenses:
|
|
107
107
|
- MIT
|
108
108
|
metadata:
|
109
109
|
bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
|
110
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.
|
111
|
-
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.
|
110
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.77.1
|
111
|
+
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.77.1
|
112
112
|
funding_uri: https://github.com/sponsors/ntkme
|
113
113
|
rubygems_mfa_required: 'true'
|
114
114
|
post_install_message:
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
rubygems_version: 3.5.
|
129
|
+
rubygems_version: 3.5.10
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Use dart-sass with Ruby!
|