diff --git a/CHANGELOG.md b/CHANGELOG.md index 28b1badbe..14d9030d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,4 @@ -## 1.45.0-rc.2 - -### JS API - -* Ship TypeScript type declarations with the package. - -## 1.45.0-rc.1 +## 1.45.0 ### JS API @@ -41,6 +35,8 @@ For full documentation of this API, please see [the Sass website][js-api]. [js-api]: https://sass-lang.com/documentation/js-api +This release also adds TypeScript type definitions. + ## 1.44.0 * Suggest `calc()` as an alternative in `/`-as-division deprecation messages. diff --git a/analysis/lib/analysis_options.yaml b/analysis/lib/analysis_options.yaml index c6b922321..63c08dc2b 100644 --- a/analysis/lib/analysis_options.yaml +++ b/analysis/lib/analysis_options.yaml @@ -6,7 +6,6 @@ analyzer: strict-inference: true strict-raw-types: true errors: - missing_js_lib_annotation: ignore deprecated_member_use_from_same_package: ignore # These are necessary for matching the JS API. diff --git a/lib/src/async_environment.dart b/lib/src/async_environment.dart index 916c46ff0..796883e22 100644 --- a/lib/src/async_environment.dart +++ b/lib/src/async_environment.dart @@ -2,8 +2,6 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. -import 'dart:collection'; - import 'package:collection/collection.dart'; import 'package:path/path.dart' as p; import 'package:source_span/source_span.dart'; diff --git a/lib/src/environment.dart b/lib/src/environment.dart index 1602ef342..085745198 100644 --- a/lib/src/environment.dart +++ b/lib/src/environment.dart @@ -5,12 +5,10 @@ // DO NOT EDIT. This file was generated from async_environment.dart. // See tool/grind/synchronize.dart for details. // -// Checksum: 6e5ee671e0a6e5b1d6ac87beb6aeee1e4b155d74 +// Checksum: 6b97030ff074d0b39e027ea97ba5893d242b9d3d // // ignore_for_file: unused_import -import 'dart:collection'; - import 'package:collection/collection.dart'; import 'package:path/path.dart' as p; import 'package:source_span/source_span.dart'; diff --git a/lib/src/importer/node_to_dart/file.dart b/lib/src/importer/node_to_dart/file.dart index 770b49df9..15c2bad7f 100644 --- a/lib/src/importer/node_to_dart/file.dart +++ b/lib/src/importer/node_to_dart/file.dart @@ -8,8 +8,6 @@ import '../../importer.dart'; import '../../node/importer.dart'; import '../../node/url.dart'; import '../../node/utils.dart'; -import '../filesystem.dart'; -import '../result.dart'; import '../utils.dart'; /// A filesystem importer to use for most implementation details of diff --git a/lib/src/importer/node_to_dart/sync.dart b/lib/src/importer/node_to_dart/sync.dart index e460864c9..87f145b40 100644 --- a/lib/src/importer/node_to_dart/sync.dart +++ b/lib/src/importer/node_to_dart/sync.dart @@ -9,7 +9,6 @@ import '../../node/importer.dart'; import '../../node/url.dart'; import '../../node/utils.dart'; import '../../util/nullable.dart'; -import '../result.dart'; /// A wrapper for a synchronous JS API importer that exposes it as a Dart /// [Importer]. diff --git a/lib/src/node/compile.dart b/lib/src/node/compile.dart index a7012f78f..1a03a35df 100644 --- a/lib/src/node/compile.dart +++ b/lib/src/node/compile.dart @@ -18,7 +18,6 @@ import '../importer/node_to_dart/async_file.dart'; import '../importer/node_to_dart/file.dart'; import '../importer/node_to_dart/sync.dart'; import '../io.dart'; -import '../logger.dart'; import '../logger/node_to_dart.dart'; import '../parse/scss.dart'; import '../util/nullable.dart'; diff --git a/lib/src/node/legacy/value.dart b/lib/src/node/legacy/value.dart index 3e03ddcd9..4843e4e6f 100644 --- a/lib/src/node/legacy/value.dart +++ b/lib/src/node/legacy/value.dart @@ -27,6 +27,10 @@ export 'value/string.dart'; Value unwrapValue(Object? object) { if (object != null) { if (object is Value) return object; + + // TODO(nweiz): Remove this ignore and add an explicit type argument once we + // support only Dart SDKs >= 2.15. + // ignore: inference_failure_on_function_invocation var value = getProperty(object, 'dartValue'); if (value != null && value is Value) return value; if (isJSError(object)) throw object; diff --git a/lib/src/node/reflection.dart b/lib/src/node/reflection.dart index ad7d1f874..9c7cb6f8e 100644 --- a/lib/src/node/reflection.dart +++ b/lib/src/node/reflection.dart @@ -2,7 +2,6 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. -import 'dart:js'; import 'dart:js_util'; import 'package:js/js.dart'; diff --git a/lib/src/node/utils.dart b/lib/src/node/utils.dart index c9784a306..235e59749 100644 --- a/lib/src/node/utils.dart +++ b/lib/src/node/utils.dart @@ -2,7 +2,6 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. -import 'dart:js'; import 'dart:js_util'; import 'dart:typed_data'; diff --git a/lib/src/value/number/unitless.dart b/lib/src/value/number/unitless.dart index 4964fde99..38116cccd 100644 --- a/lib/src/value/number/unitless.dart +++ b/lib/src/value/number/unitless.dart @@ -7,7 +7,6 @@ import 'package:tuple/tuple.dart'; import '../../util/number.dart'; import '../../value.dart'; -import '../number.dart'; /// A specialized subclass of [SassNumber] for numbers that have no units. /// diff --git a/pkg/sass_api/CHANGELOG.md b/pkg/sass_api/CHANGELOG.md index dc5431bc5..3d47fd715 100644 --- a/pkg/sass_api/CHANGELOG.md +++ b/pkg/sass_api/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.0-beta.23 + +* No user-visible changes. + ## 1.0.0-beta.22 * No user-visible changes. diff --git a/pkg/sass_api/pubspec.yaml b/pkg/sass_api/pubspec.yaml index 68fd1c7b7..7baad2db2 100644 --- a/pkg/sass_api/pubspec.yaml +++ b/pkg/sass_api/pubspec.yaml @@ -2,7 +2,7 @@ name: sass_api # Note: Every time we add a new Sass AST node, we need to bump the *major* # version because it's a breaking change for anyone who's implementing the # visitor interface(s). -version: 1.0.0-beta.22 +version: 1.0.0-beta.23 description: Additional APIs for Dart Sass. homepage: https://github.com/sass/dart-sass @@ -10,7 +10,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - sass: 1.45.0-rc.2 + sass: 1.45.0 dependency_overrides: sass: {path: ../..} diff --git a/pubspec.yaml b/pubspec.yaml index 68b3d1e6e..e3dab0cd7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.45.0-rc.2 +version: 1.45.0 description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass diff --git a/test/dart_api/importer_test.dart b/test/dart_api/importer_test.dart index 113a2fee1..bf701f2b3 100644 --- a/test/dart_api/importer_test.dart +++ b/test/dart_api/importer_test.dart @@ -9,7 +9,6 @@ import 'dart:convert'; import 'package:test/test.dart'; import 'package:sass/sass.dart'; -import 'package:sass/src/exception.dart'; import 'from_import_importer.dart'; import 'test_importer.dart'; diff --git a/test/legacy_node_api/function_test.dart b/test/legacy_node_api/function_test.dart index b21e07aeb..fcc63418b 100644 --- a/test/legacy_node_api/function_test.dart +++ b/test/legacy_node_api/function_test.dart @@ -2,6 +2,10 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. +// TODO(nweiz): Remove this ignore and add explicit type arguments once we +// support only Dart SDKs >= 2.15. +// ignore_for_file: inference_failure_on_function_invocation + @TestOn('node') @Tags(['node']) diff --git a/test/legacy_node_api/importer_test.dart b/test/legacy_node_api/importer_test.dart index 20ba148b1..0a1cf3e54 100644 --- a/test/legacy_node_api/importer_test.dart +++ b/test/legacy_node_api/importer_test.dart @@ -8,7 +8,6 @@ import 'dart:async'; import 'package:js/js.dart'; -import 'package:node_interop/js.dart'; import 'package:node_interop/node.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; diff --git a/test/legacy_node_api/value/boolean_test.dart b/test/legacy_node_api/value/boolean_test.dart index 55d2b32fe..813ff3309 100644 --- a/test/legacy_node_api/value/boolean_test.dart +++ b/test/legacy_node_api/value/boolean_test.dart @@ -43,7 +43,11 @@ void main() { test("the constructor throws", () { expect( - () => callConstructor(sass.types.Boolean, [true]), throwsA(anything)); + // TODO(nweiz): Remove this ignore and add an explicit type argument + // once we support only Dart SDKs >= 2.15. + // ignore: inference_failure_on_function_invocation + () => callConstructor(sass.types.Boolean, [true]), + throwsA(anything)); }); group("the convenience accessor", () { diff --git a/test/legacy_node_api/value/color_test.dart b/test/legacy_node_api/value/color_test.dart index 4119061fe..f67d19c3e 100644 --- a/test/legacy_node_api/value/color_test.dart +++ b/test/legacy_node_api/value/color_test.dart @@ -2,6 +2,10 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. +// TODO(nweiz): Remove this ignore and add explicit type arguments once we +// support only Dart SDKs >= 2.15. +// ignore_for_file: inference_failure_on_function_invocation + @TestOn('node') @Tags(['node']) diff --git a/test/legacy_node_api/value/list_test.dart b/test/legacy_node_api/value/list_test.dart index c5b5605eb..5fa7d7b52 100644 --- a/test/legacy_node_api/value/list_test.dart +++ b/test/legacy_node_api/value/list_test.dart @@ -2,6 +2,10 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. +// TODO(nweiz): Remove this ignore and add explicit type arguments once we +// support only Dart SDKs >= 2.15. +// ignore_for_file: inference_failure_on_function_invocation + @TestOn('node') @Tags(['node']) diff --git a/test/legacy_node_api/value/map_test.dart b/test/legacy_node_api/value/map_test.dart index 27c424ccc..0b7ea9a6c 100644 --- a/test/legacy_node_api/value/map_test.dart +++ b/test/legacy_node_api/value/map_test.dart @@ -2,6 +2,10 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. +// TODO(nweiz): Remove this ignore and add explicit type arguments once we +// support only Dart SDKs >= 2.15. +// ignore_for_file: inference_failure_on_function_invocation + @TestOn('node') @Tags(['node']) diff --git a/test/legacy_node_api/value/null_test.dart b/test/legacy_node_api/value/null_test.dart index 992141dad..11fc98b80 100644 --- a/test/legacy_node_api/value/null_test.dart +++ b/test/legacy_node_api/value/null_test.dart @@ -29,6 +29,9 @@ void main() { }); test("the constructor throws", () { + // TODO(nweiz): Remove this ignore and add an explicit type argument once we + // support only Dart SDKs >= 2.15. + // ignore: inference_failure_on_function_invocation expect(() => callConstructor(sass.types.Null, []), throwsA(anything)); }); diff --git a/test/legacy_node_api/value/number_test.dart b/test/legacy_node_api/value/number_test.dart index df2034fdf..e15e9cb44 100644 --- a/test/legacy_node_api/value/number_test.dart +++ b/test/legacy_node_api/value/number_test.dart @@ -2,6 +2,10 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. +// TODO(nweiz): Remove this ignore and add explicit type arguments once we +// support only Dart SDKs >= 2.15. +// ignore_for_file: inference_failure_on_function_invocation + @TestOn('node') @Tags(['node']) diff --git a/test/legacy_node_api/value/string_test.dart b/test/legacy_node_api/value/string_test.dart index 5a2b006ba..fb2f9c302 100644 --- a/test/legacy_node_api/value/string_test.dart +++ b/test/legacy_node_api/value/string_test.dart @@ -2,6 +2,10 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. +// TODO(nweiz): Remove this ignore and add explicit type arguments once we +// support only Dart SDKs >= 2.15. +// ignore_for_file: inference_failure_on_function_invocation + @TestOn('node') @Tags(['node'])