Releases: sass/migrator
Sass Migrator 2.4.2
Module Migration
-
Late
@importrules can now be hoisted above safe at-rules in the same file. -
Fix a typo in the error message for late
@importrules that could not be migrated. -
Fix a bug where hoisted
@userules with configuration would have incorrect syntax.
See the full changelog for changes in earlier releases.
Sass Migrator 2.4.1
Module Migrator
- Fix a bug where a duplicate namespace would be added to a reassignment of a variable from another module when running on a partially migrated file.
See the full changelog for changes in earlier releases.
Sass Migrator 2.4.0
Module System Migration
-
Better handling of late
@importrules. Previously, these were treated identically to nested imports, but now they can be hoisted to the top of the file where@useis allowed if they do not emit any CSS.To allow the migrator to hoist even late imports that do emit CSS, use the
--unsafe-hoistflag.@importrules that emit CSS will still be converted tometa.load-css()even with this flag if no Sass members are referenced from them.If there are any plain CSS at-rules that are used by your post-processing tools but never actually result in meaningful CSS, you can pass them (without the
@) to--safe-at-ruleso that the migrator doesn't consider them to emit CSS when handling late imports.The migrator's behavior when encountering actual nested imports remains unchanged.
-
Fix a bug that resulted in duplicate
@userules when migrating stylesheets that contained both a@useand an@importof the same dependency.
See the full changelog for changes in earlier releases.
Sass Migrator 2.3.3
Module System Migration
- Fix some bugs in the conversion of private names that are referenced across files to public names, especially when
--remove-prefixand/or multiple leading dashes/underscores are involved.
See the full changelog for changes in earlier releases.
Sass Migrator 2.3.2
- Update to be compatible with the latest version of the Dart Sass AST.
See the full changelog for changes in earlier releases.
Sass Migrator 2.3.1
Color Function Migrator
- Fix a bug where deprecated color functions nested inside other functions would not be migrated.
See the full changelog for changes in earlier releases.
Sass Migrator 2.3.0
- Add a
--pkg-importerflag to enable loading dependencies frompkg:URLs with the same behavior as the compiler. Currently this only supports the Node.js package resolution algorithm, via--pkg-importer=node. For example,@use "pkg:bootstrap"will loadnode_modules/bootstrap/scss/bootstrap.scss.
See the full changelog for changes in earlier releases.
Sass Migrator 2.2.1
Module Migrator
- Fix a bug where plain CSS
min()andmax()functions would incorrectly be migrated tomath.min()andmath.max().
See the full changelog for changes in earlier releases.
Sass Migrator 2.2.0
Module Migrator
-
Add a new
--built-in-onlyflag, which migrates global functions to theirsass:module equivalents, while leaving@importrules unchanged. -
Fix bug where some functions (
opacity,is-bracketed, andselector-extend) would not be migrated.
See the full changelog for changes in earlier releases.
Sass Migrator 2.1.0
Color Function Migrator
- Adds a new
colormigrator that migrates off of legacy color functions that were deprecated in Dart Sass 1.79.0.
See the full changelog for changes in earlier releases.