Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 1.97.3

* Fix a bug where nesting an at-rule within multiple style rules in plain CSS
could cause outer style rules to be omitted.

## 1.97.2

* Additional fixes for implicit configuration when nested imports are involved.

## 1.97.1

* Fix a bug with the new CSS-style `if()` syntax where values would be evaluated
Expand Down
38 changes: 38 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import {defineConfig, globalIgnores} from 'eslint/config';
import tseslint from 'typescript-eslint';
import gts from 'gts';

export default defineConfig([
globalIgnores([
'**/build/',
'**/dist/',
'**/language/',
'**/_types/',
'lib/src/vendor/',
'**/*.js',
]),
{
extends: [tseslint.configs.recommended, gts],

rules: {
'@typescript-eslint/explicit-function-return-type': [
'error',
{allowExpressions: true},
],
'n/no-extraneous-require': ['error', {allowModules: ['sass']}],
'func-style': ['error', 'declaration'],
'prefer-const': ['error', {destructuring: 'all'}],
'sort-imports': ['error', {ignoreDeclarationSort: true}],
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'none',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
},
]);
2 changes: 1 addition & 1 deletion lib/src/compiler/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class AsyncCompiler {
}

/** Initialize resources shared across compilations. */
constructor(flag: Symbol | undefined) {
constructor(flag: symbol | undefined) {
if (flag !== initFlag) {
throw utils.compilerError(
'AsyncCompiler can not be directly constructed. ' +
Expand Down
2 changes: 1 addition & 1 deletion lib/src/compiler/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class Compiler {
}

/** Initialize resources shared across compilations. */
constructor(flag: Symbol | undefined) {
constructor(flag: symbol | undefined) {
if (flag !== initFlag) {
throw utils.compilerError(
'Compiler can not be directly constructed. ' +
Expand Down
2 changes: 1 addition & 1 deletion lib/src/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function getDeprecationIds(
* This is used to determine which options to use when handling host-side
* deprecation warnings that aren't explicitly tied to a particular compilation.
*/
export const activeDeprecationOptions: Map<Symbol, DeprecationOptions> =
export const activeDeprecationOptions: Map<symbol, DeprecationOptions> =
new Map();

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/src/legacy/importer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ interface PreviousUrl {
* A wrapper around a `LegacyImporter` callback that exposes it as a new-API
* `Importer`.
*/
export class LegacyImporterWrapper<sync extends 'sync' | 'async'>
implements Importer<sync>
{
export class LegacyImporterWrapper<
sync extends 'sync' | 'async',
> implements Importer<sync> {
// A stack of previous URLs passed to `this.callbacks`.
private readonly prev: PreviousUrl[] = [];

Expand Down
13 changes: 7 additions & 6 deletions lib/src/packet-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import {Observable, Subject} from 'rxjs';
import {mergeMap} from 'rxjs/operators';
import BufferBuilder = require('buffer-builder');

/**
* Decodes arbitrarily-chunked buffers, for example
Expand Down Expand Up @@ -57,18 +56,20 @@ export class PacketTransformer {

// Write the length in varint format, 7 bits at a time from least to most
// significant.
const header = new BufferBuilder(8);
const header = Buffer.alloc(8);
let offset = 0;
while (length > 0) {
// The highest-order bit indicates whether more bytes are necessary to
// fully express the number. The lower 7 bits indicate the number's
// value.
header.appendUInt8((length > 0x7f ? 0x80 : 0) | (length & 0x7f));
header.writeUInt8((length > 0x7f ? 0x80 : 0) | (length & 0x7f), offset);
offset++;
length >>= 7;
}

const packet = Buffer.alloc(header.length + protobuf.length);
header.copy(packet);
packet.set(protobuf, header.length);
const packet = Buffer.alloc(offset + protobuf.length);
header.copy(packet, 0, 0, offset);
packet.set(protobuf, offset);
this.writeInboundBuffer(packet);
} catch (error) {
this.outboundProtobufsInternal$.error(error);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/protofier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class Protofier {
/** Converts a CalculationValue that appears within a `SassCalculation` to
* its protocol buffer representation. */
private protofyCalculationValue(
value: Object,
value: object,
): proto.Value_Calculation_CalculationValue {
const result = create(proto.Value_Calculation_CalculationValueSchema, {});
if (value instanceof SassCalculation) {
Expand Down
8 changes: 8 additions & 0 deletions lib/src/value/calculations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export class CalculationOperation implements ValueObject {
hashCode(): number {
return hash(this.operator) ^ hash(this.left) ^ hash(this.right);
}

toString(): string {
return `${this.left} ${this.operator} ${this.right}`;
}
}

export class CalculationInterpolation implements ValueObject {
Expand All @@ -140,4 +144,8 @@ export class CalculationInterpolation implements ValueObject {
hashCode(): number {
return hash(this.value);
}

toString(): string {
return `#{${this.value}}`;
}
}
4 changes: 2 additions & 2 deletions npm/all-unknown/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-all-unknown",
"version": "1.97.1",
"version": "1.97.3",
"description": "The pure js optional dependency for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand All @@ -12,6 +12,6 @@
"!x64"
],
"dependencies": {
"sass": "1.97.1"
"sass": "1.97.3"
}
}
2 changes: 1 addition & 1 deletion npm/android-arm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-android-arm",
"version": "1.97.1",
"version": "1.97.3",
"description": "The android-arm binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/android-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-android-arm64",
"version": "1.97.1",
"version": "1.97.3",
"description": "The android-arm64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/android-riscv64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-android-riscv64",
"version": "1.97.1",
"version": "1.97.3",
"description": "The android-riscv64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/android-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-android-x64",
"version": "1.97.1",
"version": "1.97.3",
"description": "The android-x64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
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.97.1",
"version": "1.97.3",
"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.97.1",
"version": "1.97.3",
"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.97.1",
"version": "1.97.3",
"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.97.1",
"version": "1.97.3",
"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-musl-arm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-musl-arm",
"version": "1.97.1",
"version": "1.97.3",
"description": "The linux-musl-arm binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-musl-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-musl-arm64",
"version": "1.97.1",
"version": "1.97.3",
"description": "The linux-musl-arm64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-musl-riscv64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-musl-riscv64",
"version": "1.97.1",
"version": "1.97.3",
"description": "The linux-musl-riscv64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-musl-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-musl-x64",
"version": "1.97.1",
"version": "1.97.3",
"description": "The linux-musl-x64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-riscv64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-linux-riscv64",
"version": "1.97.1",
"version": "1.97.3",
"description": "The linux-riscv64 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.97.1",
"version": "1.97.3",
"description": "The linux-x64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
4 changes: 2 additions & 2 deletions npm/unknown-all/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-unknown-all",
"version": "1.97.1",
"version": "1.97.3",
"description": "The pure js optional dependency for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand All @@ -12,6 +12,6 @@
"!win32"
],
"dependencies": {
"sass": "1.97.1"
"sass": "1.97.3"
}
}
2 changes: 1 addition & 1 deletion npm/win32-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-embedded-win32-arm64",
"version": "1.97.1",
"version": "1.97.3",
"description": "The win32-arm64 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.97.1",
"version": "1.97.3",
"description": "The win32-x64 binary for sass-embedded",
"repository": "sass/embedded-host-node",
"author": "Google Inc.",
Expand Down
Loading