Skip to content

Update node-sass and node version to 16

What does this MR do?

node@16 would be nice for better native M1 support and to eventually have only node@16 in the GDK. Unfortunately we need to either update node-sass or replace it with the dart based sass.

We have prior MRs related to !2678 (closed), !2711 (closed) and !2176 (merged). This MR is a fresh take on them and incorporates some learnings.

Updates to sass seem to be out of scope because either build outputs change or we would need to update our scss source files. So let's try to update node-sass once more. We would need to update to node-sass@6 to support. Looking at this we have the following node-sass consumers in GitLab UI:

  • Storybook via webpack@4 via sass-loader. We use sass-loader@7 currently. It seems like sass-loader@10.2.0 supports node-sass@6 and webpack@4. This MR updates to sass-loader@10.2.0

    How to verify? Loading the review app => Storybook should look right

  • sass-true in our jest specs.

    How to verify? If the jest specs pass, good.

  • sass-export as part of our scss_to_js variable extraction. It requires node-sass@4 as part of it's dependencies. Maybe we can just force an overwrite via yarn resolutions.

    How to verify? Diff scss_to_js/scss_variables.json from main and this branches artifacts

  • rollup? We compile our scss. I don't even know whether this uses node-sass

    How to verify? Diff dist/index.css from main and this branches artifacts.

Does this MR meet the acceptance criteria?

Conformity

  • Code review guidelines.
  • GitLab UI's contributing guidlines.
  • If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
  • If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
  • If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui package can be upgraded quickly after the changes are released:
  • Added the ~"component:*" label(s) if applicable.

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • Security reports checked/validated by a reviewer from the AppSec team

Accessibility

If this MR adds or modifies a component, take a few moments to review the following:

  • All actions and functionality can be done with a keyboard.
  • Links, buttons, and controls have a visible focus state.
  • All content is presented in text or with a text equivalent. For example, alt text for SVG, or aria-label for icons that have meaning or perform actions.
  • Changes in a component’s state are announced by a screen reader. For example, changing aria-expanded="false" to aria-expanded="true" when an accordion is expanded.
  • Color combinations have sufficient contrast.
Edited by Lukas Eipert

Merge request reports

Loading