Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Add fromImport fields to CanonicalizeRequest and FileImportRequest #61

Merged
merged 1 commit into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.0-beta.9

* Added `CanonicalizeRequest.fromImport` and `FileImportRequest.fromImport`
fields to allow importers to correctly handle import-only files.

## 1.0.0-beta.8

* Added fields to support requesting and sending formatted errors and logs.
Expand Down
20 changes: 20 additions & 0 deletions embedded_sass.proto
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,16 @@ message OutboundMessage {
// each importer in order until one returns something other than `null`.
// That is the result of the import.
string url = 4;

/// Whether this request comes from an `@import` rule.
///
/// When evaluating `@import` rules, URLs should canonicalize to an
/// [import-only file] if one exists for the URL being canonicalized.
/// Otherwise, canonicalization should be identical for `@import` and `@use`
/// rules.
///
/// [import-only file]: https://sass-lang.com/documentation/at-rules/import#import-only-files
bool fromImport = 5;
}

// A request for a custom importer to load the contents of a stylesheet.
Expand Down Expand Up @@ -468,6 +478,16 @@ message OutboundMessage {

// The (non-canonicalized) URL of the import.
string url = 4;

/// Whether this request comes from an `@import` rule.
///
/// When evaluating `@import` rules, filesystem importers should load an
/// [import-only file] if one exists for the URL being canonicalized.
/// Otherwise, canonicalization should be identical for `@import` and `@use`
/// rules.
///
/// [import-only file]: https://sass-lang.com/documentation/at-rules/import#import-only-files
bool fromImport = 5;
}

// A request to invoke a custom Sass function and return its result.
Expand Down