-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from sass/merge-main
Merge origin/main into feature.color-4
- Loading branch information
Showing
29 changed files
with
283 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
export class CanonicalizeContext { | ||
readonly fromImport: boolean; | ||
|
||
private readonly _containingUrl: URL | null; | ||
|
||
get containingUrl(): URL | null { | ||
this._containingUrlAccessed = true; | ||
return this._containingUrl; | ||
} | ||
|
||
private _containingUrlAccessed = false; | ||
|
||
/** | ||
* Whether the `containingUrl` getter has been accessed. | ||
* | ||
* This is marked as public so that the importer registry can access it, but | ||
* it's not part of the package's public API and should not be accessed by | ||
* user code. It may be renamed or removed without warning in the future. | ||
*/ | ||
get containingUrlAccessed(): boolean { | ||
return this._containingUrlAccessed; | ||
} | ||
|
||
constructor(containingUrl: URL | null, fromImport: boolean) { | ||
this._containingUrl = containingUrl; | ||
this.fromImport = fromImport; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.