this commit upgrades sass to v1.58.3 from v1.42.0.
between the aforementioned versions of sass, several changes occurred in
the library. some of which are accounted for in this commit, others are
withheld for another day.
as of sass v1.45.0, the library produces/exports its own types,
leading to the removal of the third party `@types` library.
this commit updates how @stencil/sass bundles sass. the shape of the
output code has changed such that sass' entrypoint must call a load()
function to add `render` (which performs the compilation step) to the
prototype. the rollup plugin that performs this action has been updated
to perform this call to `load()`, then subsequently export `render`.
failing to do so will result in `render` being `undefined`.
the ways in which libraries such as chokidar, readline, and immutable
are used have changes as well (immutable has been added to sass since it
was last upgraded). the rollup configuration to remove these from the
bundle is believed to be valid, so long as we do not use the new sass
javascript api (more on that coming).
sass v1.45.0 introduced a new javascript api. it is intended to the new
api to supersede the old one (that this library is currently using). as
a result, many of the types that we were exporting from the sass library
(and its typings) have new names. often, these names are prefixed with
'Legacy', to denote that the type is deprecated. these types had little
change to their constituents, and have been called out as such when they
did.
this commit does not attempt to move the project off the legacy
javascript sass api at this time. this was done for a few reasons:
1. it would introduce additional churn to the commit/pull request.
although this migration itself will likely be a breaking change, we
attempt a large upgrade here, and would like to keep the scope
minimized.
2. the stencil team must revisit the value proposition of bundling sass.
the current bundling configuration is fragile, and can break at any
time. this decision will affect how permissive we are in allowing
different versions of sass to be used with this project.
additional jsdoc/typings for configuration (JS) files have been added to
improve understanding of the rollup configuration/type safety where
possible.
BREAKING CHANGE: Sass often has 'potential breaking changes' in minor
verisons of the library. For this upgrade, the following versions of
sass may include a breaking change:
- [1.57.0](https://github.com/sass/dart-sass/releases/tag/1.57.0)
- [1.56.0](https://github.com/sass/dart-sass/releases/tag/1.56.0)
- [1.55.0](https://github.com/sass/dart-sass/releases/tag/1.55.0)
- [1.51.0](https://github.com/sass/dart-sass/releases/tag/1.51.0)
- [1.49.10](https://github.com/sass/dart-sass/releases/tag/1.49.10)
- [1.48.0](https://github.com/sass/dart-sass/releases/tag/1.48.0)
Users should be review the linked changelogs and test their libraries
thoroughly. Although this upgrade may not necessarily break for
consumers, it is designated as such out of caution.