Skip to content

Commit

Permalink
Merge branch 'main' into sass-api-selector
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Jul 15, 2022
2 parents adda4fe + f611b06 commit e5a3d5e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 8 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 1.53.1
## 1.54.0

* No user-visible changes.
### JS API

* Add a `charset` option that controls whether or not Sass emits a
`@charset`/BOM for non-ASCII stylesheets.
* Fix Sass npm package types for TS 4.7+ Node16 and NodeNext module resolution.

## 1.53.0

Expand Down
6 changes: 4 additions & 2 deletions lib/sass.dart
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ Future<CompileResult> compileToResultAsync(String path,
OutputStyle? style,
bool quietDeps = false,
bool verbose = false,
bool sourceMap = false}) =>
bool sourceMap = false,
bool charset = true}) =>
c.compileAsync(path,
logger: logger,
importCache: AsyncImportCache(
Expand All @@ -242,7 +243,8 @@ Future<CompileResult> compileToResultAsync(String path,
style: style,
quietDeps: quietDeps,
verbose: verbose,
sourceMap: sourceMap);
sourceMap: sourceMap,
charset: charset);

/// Like [compileStringToResult], except it runs asynchronously.
///
Expand Down
4 changes: 4 additions & 0 deletions lib/src/node/compile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ NodeCompileResult compile(String path, [CompileOptions? options]) {
quietDeps: options?.quietDeps ?? false,
style: _parseOutputStyle(options?.style),
verbose: options?.verbose ?? false,
charset: options?.charset ?? true,
sourceMap: options?.sourceMap ?? false,
logger: NodeToDartLogger(options?.logger, Logger.stderr(color: color),
ascii: ascii),
Expand Down Expand Up @@ -70,6 +71,7 @@ NodeCompileResult compileString(String text, [CompileStringOptions? options]) {
quietDeps: options?.quietDeps ?? false,
style: _parseOutputStyle(options?.style),
verbose: options?.verbose ?? false,
charset: options?.charset ?? true,
sourceMap: options?.sourceMap ?? false,
logger: NodeToDartLogger(options?.logger, Logger.stderr(color: color),
ascii: ascii),
Expand Down Expand Up @@ -98,6 +100,7 @@ Promise compileAsync(String path, [CompileOptions? options]) {
quietDeps: options?.quietDeps ?? false,
style: _parseOutputStyle(options?.style),
verbose: options?.verbose ?? false,
charset: options?.charset ?? true,
sourceMap: options?.sourceMap ?? false,
logger: NodeToDartLogger(options?.logger, Logger.stderr(color: color),
ascii: ascii),
Expand Down Expand Up @@ -125,6 +128,7 @@ Promise compileStringAsync(String text, [CompileStringOptions? options]) {
quietDeps: options?.quietDeps ?? false,
style: _parseOutputStyle(options?.style),
verbose: options?.verbose ?? false,
charset: options?.charset ?? true,
sourceMap: options?.sourceMap ?? false,
logger: NodeToDartLogger(options?.logger, Logger.stderr(color: color),
ascii: ascii),
Expand Down
1 change: 1 addition & 0 deletions lib/src/node/compile_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class CompileOptions {
external bool? get quietDeps;
external String? get style;
external bool? get verbose;
external bool? get charset;
external bool? get sourceMap;
external bool? get sourceMapIncludeSources;
external NodeLogger? get logger;
Expand Down
13 changes: 11 additions & 2 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
},
"keywords": ["style", "scss", "sass", "preprocessor", "css"],
"types": "types/index.d.ts"
"keywords": [
"style",
"scss",
"sass",
"preprocessor",
"css"
],
"types": "types/index.d.ts",
"exports": {
"types": "./types/index.d.ts"
}
}
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.53.1-dev
version: 1.54.0-dev
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down Expand Up @@ -34,7 +34,7 @@ dependencies:
dev_dependencies:
analyzer: ^3.0.0
archive: ^3.1.2
cli_pkg: ^2.1.0
cli_pkg: ^2.1.4
crypto: ^3.0.0
dart_style: ^2.0.0
dartdoc: ^5.0.0
Expand Down

0 comments on commit e5a3d5e

Please sign in to comment.