diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c2186b25..883c00bab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.83.2 + +* Properly display deprecation IDs for the JS Sass API. + +* Don't display deprecation IDs for user-defined deprecations. + ## 1.83.1 * Fix a bug where `--quiet-deps` would get deactivated for `@content` blocks, diff --git a/lib/src/embedded/logger.dart b/lib/src/embedded/logger.dart index dd1f2a223..32a04ed45 100644 --- a/lib/src/embedded/logger.dart +++ b/lib/src/embedded/logger.dart @@ -44,13 +44,17 @@ final class EmbeddedLogger extends LoggerWithDeprecationType { {FileSpan? span, Trace? trace, Deprecation? deprecation}) { var formatted = withGlyphs(() { var buffer = StringBuffer(); + var showDeprecation = + deprecation != null && deprecation != Deprecation.userAuthored; if (_color) { buffer.write('\u001b[33m\u001b[1m'); if (deprecation != null) buffer.write('Deprecation '); buffer.write('Warning\u001b[0m'); + if (showDeprecation) result.write(' [\u001b[34m$deprecation\u001b[0m]'); } else { if (deprecation != null) buffer.write('DEPRECATION '); buffer.write('WARNING'); + if (showDeprecation) result.write(' [$deprecation]'); } if (span == null) { buffer.writeln(': $message'); diff --git a/lib/src/logger/js_to_dart.dart b/lib/src/logger/js_to_dart.dart index 4a11bf546..8ee2b205c 100644 --- a/lib/src/logger/js_to_dart.dart +++ b/lib/src/logger/js_to_dart.dart @@ -41,8 +41,14 @@ final class JSToDartLogger extends LoggerWithDeprecationType { deprecationType: deprecations[deprecation?.id])); } else { _withAscii(() { - _fallback.warn(message, - span: span, trace: trace, deprecation: deprecation != null); + switch (_fallback) { + case LoggerWithDeprecationType(): + _fallback.internalWarn(message, + span: span, trace: trace, deprecation: deprecation); + case _: + _fallback.warn(message, + span: span, trace: trace, deprecation: deprecation != null); + } }); } } diff --git a/lib/src/logger/stderr.dart b/lib/src/logger/stderr.dart index 4682d8bb0..07dcd70b9 100644 --- a/lib/src/logger/stderr.dart +++ b/lib/src/logger/stderr.dart @@ -21,18 +21,18 @@ final class StderrLogger extends LoggerWithDeprecationType { void internalWarn(String message, {FileSpan? span, Trace? trace, Deprecation? deprecation}) { var result = StringBuffer(); + var showDeprecation = + deprecation != null && deprecation != Deprecation.userAuthored; if (color) { // Bold yellow. result.write('\u001b[33m\u001b[1m'); if (deprecation != null) result.write('Deprecation '); result.write('Warning\u001b[0m'); - if (deprecation != null) { - result.write(' [\u001b[34m$deprecation\u001b[0m]'); - } + if (showDeprecation) result.write(' [\u001b[34m$deprecation\u001b[0m]'); } else { if (deprecation != null) result.write('DEPRECATION '); result.write('WARNING'); - if (deprecation != null) result.write(' [$deprecation]'); + if (showDeprecation) result.write(' [$deprecation]'); } if (span == null) { diff --git a/pkg/sass-parser/CHANGELOG.md b/pkg/sass-parser/CHANGELOG.md index af044c012..107d2751c 100644 --- a/pkg/sass-parser/CHANGELOG.md +++ b/pkg/sass-parser/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.10 + +* No user-visible changes. + ## 0.4.9 * No user-visible changes. diff --git a/pkg/sass-parser/package.json b/pkg/sass-parser/package.json index d23090d84..53cfbb154 100644 --- a/pkg/sass-parser/package.json +++ b/pkg/sass-parser/package.json @@ -1,6 +1,6 @@ { "name": "sass-parser", - "version": "0.4.9", + "version": "0.4.10", "description": "A PostCSS-compatible wrapper of the official Sass parser", "repository": "sass/sass", "author": "Google Inc.", diff --git a/pkg/sass_api/CHANGELOG.md b/pkg/sass_api/CHANGELOG.md index a981bb724..127cc7525 100644 --- a/pkg/sass_api/CHANGELOG.md +++ b/pkg/sass_api/CHANGELOG.md @@ -1,3 +1,7 @@ +## 15.0.2 + +* No user-visible changes. + ## 15.0.1 * No user-visible changes. diff --git a/pkg/sass_api/pubspec.yaml b/pkg/sass_api/pubspec.yaml index dd0c08570..ec8ba668e 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: 15.0.1 +version: 15.0.2 description: Additional APIs for Dart Sass. homepage: https://github.com/sass/dart-sass @@ -10,7 +10,7 @@ environment: sdk: ">=3.3.0 <4.0.0" dependencies: - sass: 1.83.1 + sass: 1.83.2 dev_dependencies: dartdoc: ^8.0.14 diff --git a/pubspec.yaml b/pubspec.yaml index 9af9300f6..54412ba34 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.83.1 +version: 1.83.2 description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass