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 viawebpack@4viasass-loader. We usesass-loader@7currently. It seems likesass-loader@10.2.0supportsnode-sass@6andwebpack@4. This MR updates tosass-loader@10.2.0How to verify? Loading the review app => Storybook should look right
-
✅ sass-truein our jest specs.How to verify? If the jest specs pass, good.
-
✅ sass-exportas part of ourscss_to_jsvariable extraction. It requiresnode-sass@4as part of it's dependencies. Maybe we can just force an overwrite via yarn resolutions.How to verify? Diff
scss_to_js/scss_variables.jsonfrommainand this branches artifacts -
✅ rollup? We compile our scss. I don't even know whether this usesnode-sassHow to verify? Diff
dist/index.cssfrommainand 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/uipackage can be upgraded quickly after the changes are released:-
GitLab: mr_url -
CustomersDot: mr_url -
Status Page: mr_url
-
-
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-labelfor 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"toaria-expanded="true"when an accordion is expanded. -
Color combinations have sufficient contrast.