TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.19k stars 364 forks source link

Many deprecation warnings with Sass 1.80.x #7299

Closed pjonsson closed 3 weeks ago

pjonsson commented 4 weeks ago

The only upper bound for sass is < 2, so sass 1.80 will happily install but gives many deprecation warnings in the form of:

Deprecation Warning: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use meta.variable-exists instead.

More info and automated migrator: https://sass-lang.com/d/import

    ╷
136 │   @if variable-exists(text-link) {
    │       ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    lib/Sass/common/_mixins.scss 136:7                                 @import
    lib/ReactViews/ExplorerWindow/Tabs/MyDataTab/my-data-tab.scss 2:9  root stylesheet

and

Deprecation Warning: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import

  ╷
2 │ @import "mixins";
  │         ^^^^^^^^
  ╵
    lib/Sass/common/_base.scss 2:9  root stylesheet

I would run the auto-migrator myself and make a pull request, but I'm not sure how to get the terriajs-variables alias set up for it, so it would be nice if someone else could take a look at this.

na9da commented 3 weeks ago

yes, this needs updating the saas and saas-loader packages which needs webpack 5. We are looking to upgrade to webpack 5 soonish, Meanwhile we can pin these deps to a previous version that doesn't raise the warnings.

pjonsson commented 3 weeks ago

Ok, #7303 restricts the sass version to < 1.80.

Regarding upgrading to webpack 5: in May/June, I made PRs that upgraded loaders (#7130, #7138, and #7210) and webpack-dev-server (#7142) to more recent versions. My goal was security fixes rather than webpack 5, but from what I understand these PRs are also prerequisites for webpack 5. The mentioned PRs have been sitting without comments for 5-6 months, how do we move forward with them?

I'm not sure if babel is also intermingled with webpack 5, but if it is, then there's also #7131 and #7137.