Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f6741e7
Bump @eslint/js from 9.39.2 to 10.0.1 (#420)
dependabot[bot] Feb 11, 2026
c199563
Bump @types/tar from 6.1.13 to 7.0.87 (#425)
dependabot[bot] Feb 23, 2026
ba6300e
Update immutable to v5.1.5 (#426)
Goodwine Mar 10, 2026
908c07e
Update Dart Sass version and release
sassbot Mar 10, 2026
e2cfd3e
Update Dart Sass version and release
sassbot Apr 2, 2026
0d8e150
Improve error messages (#429)
nex3 Apr 29, 2026
0d6a291
Update Dart Sass version and release
sassbot May 22, 2026
3f30582
Update Dart Sass version and release
sassbot Jun 11, 2026
feda063
Bump typescript from 5.9.3 to 6.0.3 (#430)
dependabot[bot] Jun 15, 2026
09219c4
Bump actions/checkout from 6 to 7 (#433)
dependabot[bot] Jun 23, 2026
e4321a1
Reformat with the latest Prettier (#436)
nex3 Jul 8, 2026
3994086
Bump @types/node from 25.9.5 to 26.1.1 (#437)
dependabot[bot] Jul 8, 2026
4377858
Bump actions/setup-node from 6 to 7 (#440)
dependabot[bot] Jul 20, 2026
7932fd8
Update Dart Sass version and release
sassbot Jul 23, 2026
de6ceb9
Use gamma 2.40 for display-referred rec2020 (#418)
ntkme Jul 24, 2026
07d7803
Update Dart Sass version and release
sassbot Jul 25, 2026
0fd3bd0
Bump typescript from 6.0.3 to 7.0.2 (#438)
dependabot[bot] Jul 27, 2026
cb3b9f0
Bump dart-lang/setup-dart from 1 to 1.7.2 (#441)
dependabot[bot] Aug 17, 2026
ecc0802
Update Dart Sass version and release
sassbot Aug 20, 2026
191d6aa
Update Dart Sass version and release
sassbot Sep 3, 2026
dbfd5a2
Bump dart-lang/setup-dart from 1.7.2 to 1.8.1 (#444)
dependabot[bot] Sep 8, 2026
aa4ed87
Update Dart Sass version and release
sassbot Sep 12, 2026
6ad005f
Merge branch 'main' of github.com:sass/embedded-host-node into merge
nex3 Sep 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 'lts/*'
check-latest: true
Expand All @@ -46,12 +46,12 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- uses: dart-lang/setup-dart@v1
- uses: dart-lang/setup-dart@v1.8.1
with: {sdk: stable}
- run: dart --version

Expand Down Expand Up @@ -89,10 +89,10 @@ jobs:
node_version: lts/-2

steps:
- uses: actions/checkout@v6
- uses: dart-lang/setup-dart@v1
- uses: actions/checkout@v7
- uses: dart-lang/setup-dart@v1.8.1
with: {sdk: stable}
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with: {node-version: "${{ matrix.node_version }}"}

- name: Check out Dart Sass
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 'lts/*'
check-latest: true
Expand Down
169 changes: 169 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,172 @@
## 1.104.1

* Fix a bug where loud comments before `@use` rules could be emitted multiple
times under certain circumstances.

* Fix a bug in which an invalid selector at the end of an indented syntax
stylesheet would cause the parser to crash instead of emitting a useful error
message.

### Command Line Interface

* Many-to-many compilations no longer compile any files that appear in the
output directory if the output directory is also within the source directory.
This fixes a bug where `--watch` mode could enter an infinite loop recompiling
the same CSS file over and over.

* Sass now sets the modification time of output files to the time compilation
*started* rather than the time it *ended*. This ensures that, if a source file
is modified during compilation, `--watch` and `--update` mode will recompile
the outputs to include the new source file contents.

## 1.104.0

* **Potentially breaking compatibility fix:** Colors now convert the special
values NaN and negative zero, as well as infinity and negative infinity for
polar-hue channels, to 0 as per the CSS spec.

* The special value negative zero is now serialized as `-0` instead of `0` for
greater compatibility when using it in CSS calculations.

## 1.103.1

* No user-visible changes.

## 1.103.0

* **Potentially breaking compatibility fix:** Colors now preserve "analogous
sets" of missing channels during conversions, per the CSS spec. For example,
`color.to-space(lch(50% none none), lab)` now returns `lab(50% none none)`
instead of `lab(50% 0 0)`.

## 1.102.0

* Use the 2.4 gamma transfer function for rec2020, as specified by the latest
draft of CSS Color 4.

## 1.101.7

* No user-visible changes.

## 1.101.6

* No user-visible changes.

## 1.101.5

* No user-visible changes.

## 1.101.4

* Avoid emitting `rgb()` or `rgba()` functions with non-percent decimal
channels. Older browsers only support integer values or (potentially decimal)
percentages for these functions, so in order to preserve
backwards-compatibility while retaining full precision for modern browsers,
legacy colors that contain at least one non-integer channel will now use
percentages for their channels (for example, `rgb(0%, 100%, 50%)` rather than
`rgb(0, 255, 127.5)`).

* Fix a bug where the values of plain-CSS `if()` expressions were emitted using
their `meta.inspect()` format rather than their CSS serialization format.

## 1.101.3

* No user-visible changes.

## 1.101.2

* Fix a bug where the deprecation warning for vendor-prefixed `expression()`
functions would incorrectly indicate whether or not the function would be
invalid Sass in Dart Sass 2.0.0.

## 1.101.1

* Sass stack trace entries are now always either absolute URLs, absolute paths,
or paths relative to the current working directory. Previously, if a
stylesheet was loaded using a relative URL (as from a load path), that
relative URL was listed even if it couldn't be resolved relative to the
current working directory. However, this created potential ambiguities, so
this behavior has been removed.

### Command Line Interface

* `--watch` mode now handles atomically-written files more gracefully.

## 1.101.0

* **Potentially breaking bug fix:** The Node package importer now properly
supports resolving import-only variants of Sass files declared in the
`exports`, `sass`, and `style` fields of `package.json`. Previously, these
files were ignored even when loaded via `@import`, so any code relying on
loading module-system-only files this way may break.

## 1.100.0

* Writing two compound selectors adjacent to one another without any whitespace
between them, such as `[class]a`, is now deprecated. This was always an error
in CSS and Sass only supported it by mistake.

See [the Sass website](https://sass-lang.com/d/adjacent-compounds) for
details.

## 1.99.0

* Add support for parent selectors (`&`) at the root of the document. These are
emitted as-is in the CSS output, where they're interpreted as [the scoping
root].

[the scoping root]: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/Nesting_selector#using_outside_nested_rule

* User-defined functions named `calc` or `clamp` are no longer forbidden. If
such a function exists without a namespace in the current module, it will be
used instead of the built-in `calc()` or `clamp()` function.

* User-defined functions whose names begin with `-` and end with `-expression`,
`-url`, `-and`, `-or`, or `-not` are no longer forbidden. These were
originally intended to match vendor prefixes, but in practice no vendor
prefixes for these functions ever existed in real browsers.

* User-defined functions named `EXPRESSION`, `URL`, and `ELEMENT`, those that
begin with `-` and end with `-ELEMENT`, as well as the same names with some
lowercase letters are now deprecated, These are names conflict with plain CSS
functions that have special syntax.

See [the Sass website](https://sass-lang.com/d/function-name) for details.

* In a future release, calls to functions whose names begin with `-` and end
with `-expression` and `-url` will no longer have special parsing. For now,
these calls are deprecated if their behavior will change in the future.

See [the Sass website](https://sass-lang.com/d/function-name) for details.

* Calls to functions whose names begin with `-` and end with `-progid:...` are
deprecated.

See [the Sass website](https://sass-lang.com/d/function-name) for details.

## 1.98.0

### Command-Line Interface

* Gracefully handle dependency loops in `--watch` mode.

### Dart API

* Add a `const Logger.defaultLogger` field. This provides a logger that emits to
standard error or the browser console, but automatically chooses whether to
use terminal colors.

### JavaScript API

* Fix a crash when manually constructing a `SassCalculation` for `'calc'` with
an argument that can't be simplified.

* Properly emit deprecation warnings as text rather than `StringBuffer` objects
when running in a browser.

* Emit colored warnings and other messages on the console when running in a
browser.

## 1.97.3

* Fix a bug where nesting an at-rule within multiple style rules in plain CSS
Expand Down
4 changes: 2 additions & 2 deletions lib/src/compiler/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class AsyncCompiler {
/** Guards against using a disposed compiler. */
private throwIfDisposed(): void {
if (this.disposed) {
throw utils.compilerError('Async compiler has already been disposed.');
throw utils.compilerError('Async compiler has already been disposed');
}
}

Expand Down Expand Up @@ -161,7 +161,7 @@ export class AsyncCompiler {
if (flag !== initFlag) {
throw utils.compilerError(
'AsyncCompiler can not be directly constructed. ' +
'Please use `sass.initAsyncCompiler()` instead.',
'Please use `sass.initAsyncCompiler()` instead',
);
}
this.stderr$.subscribe(data => process.stderr.write(data));
Expand Down
6 changes: 3 additions & 3 deletions lib/src/compiler/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class Compiler {

for (;;) {
if (!this.yield()) {
throw utils.compilerError('Embedded compiler exited unexpectedly.');
throw utils.compilerError('Embedded compiler exited unexpectedly');
}

if (error) throw error;
Expand All @@ -167,7 +167,7 @@ export class Compiler {
/** Guards against using a disposed compiler. */
private throwIfDisposed(): void {
if (this.disposed) {
throw utils.compilerError('Sync compiler has already been disposed.');
throw utils.compilerError('Sync compiler has already been disposed');
}
}

Expand All @@ -176,7 +176,7 @@ export class Compiler {
if (flag !== initFlag) {
throw utils.compilerError(
'Compiler can not be directly constructed. ' +
'Please use `sass.initAsyncCompiler()` instead.',
'Please use `sass.initCompiler()` instead',
);
}
this.stderr$.subscribe(data => process.stderr.write(data));
Expand Down
2 changes: 1 addition & 1 deletion lib/src/compiler/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export function handleCompileResponse(
} else if (response.result.case === 'failure') {
throw new Exception(response.result.value);
} else {
throw utils.compilerError('Compiler sent empty CompileResponse.');
throw utils.compilerError('Compiler sent empty CompileResponse');
}
}

Expand Down
6 changes: 3 additions & 3 deletions lib/src/deprotofy-span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ export function deprotofySourceSpan(buffer: proto.SourceSpan): SourceSpan {
const text = buffer.text;

if (buffer.start === undefined) {
throw compilerError('Expected SourceSpan to have start.');
throw compilerError('Expected SourceSpan to have start');
}

let end;
if (buffer.end === undefined) {
if (text !== '') {
throw compilerError('Expected SourceSpan text to be empty.');
throw compilerError('Expected SourceSpan text to be empty');
} else {
end = buffer.start;
}
} else {
end = buffer.end;
if (end.offset < buffer.start.offset) {
throw compilerError('Expected SourceSpan end to be after start.');
throw compilerError('Expected SourceSpan end to be after start');
}
}

Expand Down
14 changes: 7 additions & 7 deletions lib/src/protofier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export class Protofier {
});

default:
throw utils.compilerError(`Unknown color space "${color.space}".`);
throw utils.compilerError(`Unknown color space "${color.space}"`);
}
}

Expand Down Expand Up @@ -394,7 +394,7 @@ export class Protofier {

case 'hostFunction':
throw utils.compilerError(
'The compiler may not send Value.host_function.',
'The compiler may not send Value.host_function',
);

case 'compilerMixin':
Expand Down Expand Up @@ -454,7 +454,7 @@ export class Protofier {
case 'calc':
if (calculation.arguments.length !== 1) {
throw utils.compilerError(
'Value.Calculation.arguments must have exactly one argument for calc().',
'Value.Calculation.arguments must have exactly one argument for calc()',
);
}
return SassCalculation.calc(
Expand All @@ -466,7 +466,7 @@ export class Protofier {
calculation.arguments.length > 3
) {
throw utils.compilerError(
'Value.Calculation.arguments must have 1 to 3 arguments for clamp().',
'Value.Calculation.arguments must have 1 to 3 arguments for clamp()',
);
}
return SassCalculation.clamp(
Expand All @@ -481,7 +481,7 @@ export class Protofier {
case 'min':
if (calculation.arguments.length === 0) {
throw utils.compilerError(
'Value.Calculation.arguments must have at least 1 argument for min().',
'Value.Calculation.arguments must have at least 1 argument for min()',
);
}
return SassCalculation.min(
Expand All @@ -490,15 +490,15 @@ export class Protofier {
case 'max':
if (calculation.arguments.length === 0) {
throw utils.compilerError(
'Value.Calculation.arguments must have at least 1 argument for max().',
'Value.Calculation.arguments must have at least 1 argument for max()',
);
}
return SassCalculation.max(
calculation.arguments.map(this.deprotofyCalculationValue),
);
default:
throw utils.compilerError(
`Value.Calculation.name "${calculation.name}" is not a recognized calculation type.`,
`Value.Calculation.name "${calculation.name}" is not a recognized calculation type`,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function compilerError(message: string): Error {
* been included but was not.
*/
export function mandatoryError(field: string): Error {
return compilerError(`Missing mandatory field ${field}`);
return compilerError(`Missing mandatory field ${field}.`);
}

/** Constructs a host-caused Error. */
Expand Down
Loading