sass / dart-sass

The reference implementation of Sass, written in Dart.
https://sass-lang.com/dart-sass
MIT License
3.9k stars 352 forks source link

Use implementation name dart-sass for VersionResponse #2156

Closed ntkme closed 8 months ago

ntkme commented 8 months ago

This is mostly cosmetic.

As documented by https://sass-lang.com/documentation/js-api/variables/info/:

For Dart Sass, the implementation name is dart-sass.

The motivation is that I'm enhancing the .info string for ruby host, and I want to use the implementation name returned by the VersionResponse and produce an output like below:

irb(main):001> require 'sass-embedded';
irb(main):002> puts Sass.info;
sass-embedded   1.69.6  (Embedded Host) [Ruby]
dart-sass   1.69.6  (Sass Compiler) [Dart]
nex3 commented 8 months ago

I'm a little worried that this is technically a breaking change (although hopefully not one that affects much, since there's only one embedded compiler implementation at the moment). I'm not sure it's strictly an improvement, either; "Dart Sass" is generally a more appropriate name for human presentation. If this is desired, I think I'd be more comfortable adding a new identifier field to the protocol that's required to be a valid CSS identifier and leaving name as human-readable.

ntkme commented 8 months ago

@nex3 I checked some known host implementations and no one depends on this field right now. I feel we can just change it instead of making protocol change which is more work.