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

Commit

Permalink
Add a fromImport fields to CanonicalizeRequest and FileImportRequest (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed May 18, 2021
1 parent 0cea438 commit 065c0f2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -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
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

0 comments on commit 065c0f2

Please sign in to comment.