Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sass/embedded-host-node into merge-…
Browse files Browse the repository at this point in the history
…main
  • Loading branch information
nex3 committed Aug 21, 2023
2 parents 50ee2c1 + 489abd5 commit 275a1a2
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 25 deletions.
59 changes: 58 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,66 @@
## 1.64.2
## 1.66.1

### JS API

* Fix a bug where Sass compilation could crash in strict mode if passed a
callback that threw a string, boolean, number, symbol, or bignum.

## 1.66.0

* **Breaking change:** Drop support for the additional CSS calculations defined
in CSS Values and Units 4. Custom Sass functions whose names overlapped with
these new CSS functions were being parsed as CSS calculations instead, causing
an unintentional breaking change outside our normal [compatibility policy] for
CSS compatibility changes.

Support will be added again in a future version, but only after Sass has
emitted a deprecation warning for all functions that will break for at least
three months prior to the breakage.

## 1.65.1

* Update abs-percent deprecatedIn version to `1.65.0`.

## 1.65.0

* All functions defined in CSS Values and Units 4 are now parsed as calculation
objects: `round()`, `mod()`, `rem()`, `sin()`, `cos()`, `tan()`, `asin()`,
`acos()`, `atan()`, `atan2()`, `pow()`, `sqrt()`, `hypot()`, `log()`, `exp()`,
`abs()`, and `sign()`.

* Deprecate explicitly passing the `%` unit to the global `abs()` function. In
future releases, this will emit a CSS abs() function to be resolved by the
browser. This deprecation is named `abs-percent`.

## 1.64.3

### Dart API

* Deprecate explicitly passing `null` as the alpha channel for
`SassColor.rgb()`, `SassColor.hsl()`, and `SassColor.hwb()`. Omitting the
`alpha` channel is still allowed. In future releases, `null` will be used to
indicate a [missing component]. This deprecation is named `null-alpha`.

[missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components

* Include protocol buffer definitions when uploading the `sass` package to pub.

### JS API

* Deprecate explicitly passing `null` as the alpha channel for `new
SassColor()`. Omitting the `alpha` channel or passing `undefined` for it is
still allowed. In future releases, `null` will be used to indicate a [missing
component]. This deprecation is named `null-alpha`.

[missing component]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#missing_color_components

(Note that this was already prohibited by the TypeScript types, but in
practice prior to this `null` was treated as `1`.)

## 1.64.2

* No user-visible changes.

## 1.64.1

### Embedded Sass
Expand Down
2 changes: 1 addition & 1 deletion lib/src/message-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class MessageTransformer {
*/
writeInboundMessage([compilationId, message]: [
number,
InboundMessage
InboundMessage,
]): void {
const compilationIdLength = varint.encodingLength(compilationId);
const encodedMessage = message.toBinary();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Syntax} from './vendor/sass';

export type PromiseOr<
T,
sync extends 'sync' | 'async' = 'async'
sync extends 'sync' | 'async' = 'async',
> = sync extends 'async' ? T | Promise<T> : T;

// A boolean type that's `true` if `sync` requires synchronous APIs only and
Expand Down
7 changes: 5 additions & 2 deletions lib/src/value/calculations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ const isValidClampArg = (value: CalculationValue): boolean =>
export class SassCalculation extends Value {
readonly arguments: List<CalculationValue>;

private constructor(readonly name: string, args: CalculationValueIterable) {
private constructor(
readonly name: string,
args: CalculationValueIterable
) {
super();
this.arguments = List(args);
}
Expand Down Expand Up @@ -93,7 +96,7 @@ export class SassCalculation extends Value {
}

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

export class CalculationOperation implements ValueObject {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-darwin-arm64",
"version": "1.64.2",
"version": "1.66.1",
"description": "The darwin-arm64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-darwin-x64",
"version": "1.64.2",
"version": "1.66.1",
"description": "The darwin-x64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-arm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-arm",
"version": "1.64.2",
"version": "1.66.1",
"description": "The linux-arm binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-arm64",
"version": "1.64.2",
"version": "1.66.1",
"description": "The linux-arm64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-ia32/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-ia32",
"version": "1.64.2",
"version": "1.66.1",
"description": "The linux-ia32 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-x64",
"version": "1.64.2",
"version": "1.66.1",
"description": "The linux-x64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-ia32/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-win32-ia32",
"version": "1.64.2",
"version": "1.66.1",
"description": "The win32-ia32 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-win32-x64",
"version": "1.64.2",
"version": "1.66.1",
"description": "The win32-x64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "sass-embedded",
"version": "1.64.2",
"version": "1.66.1",
"protocol-version": "2.1.0",
"compiler-version": "1.64.2",
"compiler-version": "1.66.1",
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down Expand Up @@ -31,14 +31,14 @@
"test": "jest"
},
"optionalDependencies": {
"sass-embedded-darwin-arm64": "1.64.2",
"sass-embedded-darwin-x64": "1.64.2",
"sass-embedded-linux-arm": "1.64.2",
"sass-embedded-linux-arm64": "1.64.2",
"sass-embedded-linux-ia32": "1.64.2",
"sass-embedded-linux-x64": "1.64.2",
"sass-embedded-win32-ia32": "1.64.2",
"sass-embedded-win32-x64": "1.64.2"
"sass-embedded-darwin-arm64": "1.66.1",
"sass-embedded-darwin-x64": "1.66.1",
"sass-embedded-linux-arm": "1.66.1",
"sass-embedded-linux-arm64": "1.66.1",
"sass-embedded-linux-ia32": "1.66.1",
"sass-embedded-linux-x64": "1.66.1",
"sass-embedded-win32-ia32": "1.66.1",
"sass-embedded-win32-x64": "1.66.1"
},
"dependencies": {
"@bufbuild/protobuf": "^1.0.0",
Expand All @@ -62,9 +62,9 @@
"@types/yargs": "^17.0.4",
"del": "^6.0.0",
"extract-zip": "^2.0.1",
"gts": "^4.0.0",
"gts": "^5.0.0",
"jest": "^29.4.1",
"minipass": "7.0.2",
"minipass": "7.0.3",
"npm-run-all": "^4.1.5",
"shelljs": "^0.8.4",
"simple-git": "^3.15.1",
Expand Down

0 comments on commit 275a1a2

Please sign in to comment.