-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add breaking change page for legacy-js-api #1193
Conversation
✅ Deploy Preview for sass-lang ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Modern API [`Importer`]s instead contain two methods: `canonicalize`, which takes | ||
in a rule URL and returns the canonical form of that URL; and `load`, which | ||
takes in a canonical URL and returns an object with the contents | ||
of the loaded stylesheet. Asynchronous importers have both of these methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a sentence here explaining that this split ensures that the same module is only loaded once and that relative URLs work consistently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
returning a promise. | ||
|
||
The modern API also uses a much more robust [`Value`] class that supports | ||
type assertions and easy map and list lookups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add "all Sass value types" to the list of things the new function API supports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Vite still defaults to the legacy API, but you can similarly switch it by | ||
setting `api` to `"modern"` or `"modern-compiler"`. See [Vite's documentation] | ||
for more details. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also add a note that for other bundlers or frameworks, check the documentation or issue tracker for information about supporting the modern Sass API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* main: (23 commits) [Playground] Click to Copy (sass#1177) Cut a release for a new Dart Sass version [Playground] Debug links (sass#1179) Add breaking change page for legacy-js-api (sass#1193) [Playground] Autocomplete (sass#1166) Add a breaking change page for color functions (sass#1192) Remove nonexisting `color.saturate()` function (sass#1190) Fix unprefixed `color.adjust()` name (sass#1188) Sort color functions alphabetically (sass#1187) Document color migrator (sass#1186) Cut a release for a new Dart Sass version Document new color spaces (sass#1055) (sass#1115) Cut a release for a new Dart Sass version Bump date-fns from 3.6.0 to 4.0.0 (sass#1181) Bump rollup from 4.21.2 to 4.21.3 (sass#1182) Bump @codemirror/autocomplete from 6.18.0 to 6.18.1 (sass#1183) Bump @typescript-eslint/eslint-plugin from 8.5.0 to 8.6.0 (sass#1185) Bump markdown-it-anchor from 9.1.0 to 9.2.0 (sass#1184) Fix footer not showing the latest versions. (sass#1178) [Playground] Code links (sass#1167) ...
No description provided.