Skip to content

Commit

Permalink
Update for breaking change in sass-embedded 1.68.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Sep 21, 2023
1 parent 350219a commit cb35862
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/sassc/embedded.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ def initialize(importer)
@parent_urls = [URL.path_to_file_url(File.absolute_path(@importer.options[:filename] || 'stdin'))]
end

def canonicalize(url, from_import:)
def canonicalize(url, context)
if url.start_with?(Protocol::IMPORT)
canonical_url = @canonical_urls.delete(url.delete_prefix(Protocol::IMPORT))
unless @importer_results.key?(canonical_url)
canonical_url = resolve_file_url(canonical_url, @parent_urls.last, from_import)
canonical_url = resolve_file_url(canonical_url, @parent_urls.last, context.from_import)
end
@parent_urls.push(canonical_url)
canonical_url
Expand All @@ -318,7 +318,7 @@ def canonicalize(url, from_import:)
end

canonical_url = "#{Protocol::IMPORT}#{next_id}"
@importer_results[canonical_url] = imports_to_native(imports, from_import)
@importer_results[canonical_url] = imports_to_native(imports, context.from_import)
canonical_url
elsif url.start_with?(Protocol::LOADED)
canonical_url = Protocol::LOADED
Expand Down
2 changes: 1 addition & 1 deletion sassc-embedded.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ Gem::Specification.new do |spec| # rubocop:disable Gemspec/RequireMFA
spec.required_ruby_version = '>= 3.0.0'

spec.add_runtime_dependency 'sassc', '~> 2.0'
spec.add_runtime_dependency 'sass-embedded', '~> 1.64'
spec.add_runtime_dependency 'sass-embedded', '~> 1.68'
end

0 comments on commit cb35862

Please sign in to comment.