Skip to content

Migrate apps/central SCSS to modern Sass #2079

Description

@latin-panda

Description

When attempting to upgrade the SASS minor version, over 2,000 warnings are generated during the test suite execution. This massive influx of warnings causes the tests to fail entirely.

npm run test -w=@getodk/central-frontend

Output:

WARNING: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
WARNING: Module Warning (from ../../node_modules/sass-loader/dist/cjs.js):
...
WARNING: WARN LOG: '[intlify] 'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11.'
All tests passed, but there were 2234 warnings: see above.
Error: Process completed with exit code 1.

SASS has a recent deprecation of @import in favor of @use. The newer minor versions of SASS heavily flag this, flooding the console.

Also, the app/central specifies "sass": "~1". This overly broad version range automatically pulls in newer minor versions that introduce these breaking deprecation warnings. It's better if this version is more specific, for example: "sass": "^1.94.2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendRequires a change to the UImaintenanceDependencies, recurring maintenance

    Type

    No type

    Projects

    Status
    🕒 backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions