Upgrading and changelog¶
Upgrading to 2.2.0 from 2.1.9 or earlier¶
Run the database updates after updating the code, before serving pages:
The services' constructor arguments changed, so a site with the old container
cached fails until drush updb or drush cr rebuilds it.
Check these changes:
- Drupal 10.2 or later is required.
- Drupal 9 and 10.0–10.1 are no longer supported. Compiling on those versions already failed with a missing class. Sites on them can stay on 2.1.9.
- New permission: Administer SCSS Compiler.
- The settings page now needs
administer scssinstead of Administer site configuration. A post update grants it to every role that had Administer site configuration. If you manage roles in exported configuration, export them afterdrush updb. - Subdirectories are mirrored in the output.
scss/layout/grid.scssis now written tocss/layout/grid.css, notcss/grid.css. Update library definitions that point at the old path, and delete the old files.- Additional import paths work.
- They were ignored before. Each path is relative to the directory being compiled.
- Source map paths changed.
- Maps now use paths relative to the map file and a relative
sourceMappingURL, and no empty.css.mapis written when source maps are off. drush scss:compileexits non-zero on errors.- Deployment scripts that ignored compile errors will now stop.
- The Drush 8 command file is removed.
- Use Drush 9 or later.
Update hooks¶
| Update | Does |
|---|---|
scss_update_8001 |
Converts a 1.x formatter class name in output_formatting to expanded or compressed. |
scss_update_8002 |
The same, for sites that ran the earlier, broken version of 8001. |
scss_update_8003 |
Adds compile_logged_out: false. |
scss_update_8004 |
Adds check_interval: 2. |
scss_update_8005 |
Removes the unused line_numbers setting. |
scss_post_update_grant_administer_scss |
Grants administer scss to roles with Administer site configuration. |
Upgrading from 8.x-1.x¶
Install with Composer; scssphp in sites/all/libraries is no longer used.
drush updb converts the stored output style. scssphp 2 has only the
expanded and compressed styles: nested and compact become expanded, crunched
becomes compressed.
Changelog¶
2.2.0¶
- Fixed: additional import paths were ignored.
- Fixed: files with the same name in different subdirectories overwrote each other.
- Fixed: relative imports from files in subdirectories failed.
- Fixed: source map paths and
sourceMappingURL. - Fixed: one missing or unwritable directory stopped every directory from compiling.
- Fixed: watch mode never ran on pages served by the dynamic page cache.
- Fixed: a 1.x output style value made every compile, and with watch mode every request, fail.
- Fixed:
scss_update_8001()never converted the setting. - Fixed:
compile_logged_outwas missing from the default configuration. - Fixed: a warning for files without an extension in the source directory.
- Added: watch-mode throttling and locking; import paths are watched.
- Added: the restricted Administer SCSS Compiler permission.
- Added: validation of settings paths.
- Added: Test and Compile and write use the values on the form.
- Changed: form and Drush compiles take the same lock as watch mode.
- Added: kernel tests,
scss.api.php, this documentation site. - Changed: requires Drupal 10.2 or later; supports Drupal 12.
- Changed:
drush scss:compileexits non-zero on errors. - Removed: the Drush 8 command file, the
sites/all/librariesfallback, and the unusedline_numberssetting. - Uninstall now deletes the module's state.