Skip to content

Commit 275a1a2

Browse files
committed
Merge branch 'main' of github.com:sass/embedded-host-node into merge-main
2 parents 50ee2c1 + 489abd5 commit 275a1a2

File tree

13 files changed

+85
-25
lines changed

13 files changed

+85
-25
lines changed

CHANGELOG.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,66 @@
1-
## 1.64.2
1+
## 1.66.1
2+
3+
### JS API
4+
5+
* Fix a bug where Sass compilation could crash in strict mode if passed a
6+
callback that threw a string, boolean, number, symbol, or bignum.
7+
8+
## 1.66.0
9+
10+
* **Breaking change:** Drop support for the additional CSS calculations defined
11+
in CSS Values and Units 4. Custom Sass functions whose names overlapped with
12+
these new CSS functions were being parsed as CSS calculations instead, causing
13+
an unintentional breaking change outside our normal [compatibility policy] for
14+
CSS compatibility changes.
15+
16+
Support will be added again in a future version, but only after Sass has
17+
emitted a deprecation warning for all functions that will break for at least
18+
three months prior to the breakage.
19+
20+
## 1.65.1
21+
22+
* Update abs-percent deprecatedIn version to `1.65.0`.
23+
24+
## 1.65.0
25+
26+
* All functions defined in CSS Values and Units 4 are now parsed as calculation
27+
objects: `round()`, `mod()`, `rem()`, `sin()`, `cos()`, `tan()`, `asin()`,
28+
`acos()`, `atan()`, `atan2()`, `pow()`, `sqrt()`, `hypot()`, `log()`, `exp()`,
29+
`abs()`, and `sign()`.
30+
31+
* Deprecate explicitly passing the `%` unit to the global `abs()` function. In
32+
future releases, this will emit a CSS abs() function to be resolved by the
33+
browser. This deprecation is named `abs-percent`.
34+
35+
## 1.64.3
236

337
### Dart API
438

39+
* Deprecate explicitly passing `null` as the alpha channel for
40+
`SassColor.rgb()`, `SassColor.hsl()`, and `SassColor.hwb()`. Omitting the
41+
`alpha` channel is still allowed. In future releases, `null` will be used to
42+
indicate a [missing component]. This deprecation is named `null-alpha`.
43+
44+
[missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
45+
546
* Include protocol buffer definitions when uploading the `sass` package to pub.
647

48+
### JS API
49+
50+
* Deprecate explicitly passing `null` as the alpha channel for `new
51+
SassColor()`. Omitting the `alpha` channel or passing `undefined` for it is
52+
still allowed. In future releases, `null` will be used to indicate a [missing
53+
component]. This deprecation is named `null-alpha`.
54+
55+
[missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components
56+
57+
(Note that this was already prohibited by the TypeScript types, but in
58+
practice prior to this `null` was treated as `1`.)
59+
60+
## 1.64.2
61+
62+
* No user-visible changes.
63+
764
## 1.64.1
865

966
### Embedded Sass

lib/src/message-transformer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class MessageTransformer {
4040
*/
4141
writeInboundMessage([compilationId, message]: [
4242
number,
43-
InboundMessage
43+
InboundMessage,
4444
]): void {
4545
const compilationIdLength = varint.encodingLength(compilationId);
4646
const encodedMessage = message.toBinary();

lib/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {Syntax} from './vendor/sass';
1111

1212
export type PromiseOr<
1313
T,
14-
sync extends 'sync' | 'async' = 'async'
14+
sync extends 'sync' | 'async' = 'async',
1515
> = sync extends 'async' ? T | Promise<T> : T;
1616

1717
// A boolean type that's `true` if `sync` requires synchronous APIs only and

lib/src/value/calculations.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ const isValidClampArg = (value: CalculationValue): boolean =>
3131
export class SassCalculation extends Value {
3232
readonly arguments: List<CalculationValue>;
3333

34-
private constructor(readonly name: string, args: CalculationValueIterable) {
34+
private constructor(
35+
readonly name: string,
36+
args: CalculationValueIterable
37+
) {
3538
super();
3639
this.arguments = List(args);
3740
}
@@ -93,7 +96,7 @@ export class SassCalculation extends Value {
9396
}
9497

9598
const operators = ['+', '-', '*', '/'] as const;
96-
export type CalculationOperator = typeof operators[number];
99+
export type CalculationOperator = (typeof operators)[number];
97100

98101
export class CalculationOperation implements ValueObject {
99102
constructor(

npm/darwin-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-embedded-darwin-arm64",
3-
"version": "1.64.2",
3+
"version": "1.66.1",
44
"description": "The darwin-arm64 binary for sass-embedded",
55
"repository": "sass/embedded-host-node",
66
"author": "Google Inc.",

npm/darwin-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-embedded-darwin-x64",
3-
"version": "1.64.2",
3+
"version": "1.66.1",
44
"description": "The darwin-x64 binary for sass-embedded",
55
"repository": "sass/embedded-host-node",
66
"author": "Google Inc.",

npm/linux-arm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-embedded-linux-arm",
3-
"version": "1.64.2",
3+
"version": "1.66.1",
44
"description": "The linux-arm binary for sass-embedded",
55
"repository": "sass/embedded-host-node",
66
"author": "Google Inc.",

npm/linux-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-embedded-linux-arm64",
3-
"version": "1.64.2",
3+
"version": "1.66.1",
44
"description": "The linux-arm64 binary for sass-embedded",
55
"repository": "sass/embedded-host-node",
66
"author": "Google Inc.",

npm/linux-ia32/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-embedded-linux-ia32",
3-
"version": "1.64.2",
3+
"version": "1.66.1",
44
"description": "The linux-ia32 binary for sass-embedded",
55
"repository": "sass/embedded-host-node",
66
"author": "Google Inc.",

npm/linux-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-embedded-linux-x64",
3-
"version": "1.64.2",
3+
"version": "1.66.1",
44
"description": "The linux-x64 binary for sass-embedded",
55
"repository": "sass/embedded-host-node",
66
"author": "Google Inc.",

0 commit comments

Comments
 (0)