Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #24722: Update gulp related js dependencies #5606

Conversation

RaphaelGauthier
Copy link
Member

@RaphaelGauthier RaphaelGauthier commented Apr 17, 2024

https://issues.rudder.io/issues/24722

Only two js dependencies have been updated in this PR :

  • del : from 6.1.1 to 7.1.0
  • gulp : from 4.0.2 to 5.0.0

The gulpfile.js file (now gulpfile.mjs) has been converted into an Ecmascript module , so that the new version of del package can be imported as a module (that package has become an esm-only package in this new version). gulp-cli supports ESM so this change has no side effect.

This implies a few changes to the file :

  • Most of them are listed in this guide : https://gist.github.com/noraj/007a943dc781dc8dd3198a29205bae04
  • clean() function has been rewritten because of the change in the behaviour of the del package functions
  • and in addition, merge-stream has been replaced by merge2 as it did not work with the new changes, and gulp-sourcemaps has been downgraded to the 2.6.5 version to avoid vulnerabilities present in the 3.0.0 version.

@RaphaelGauthier RaphaelGauthier added the WIP Use that label for a Work In Progress PR that must not be merged yet label Apr 19, 2024
@RaphaelGauthier
Copy link
Member Author

Do not merge yet, I'm having issues with fontawesome and OTS errors :

font-error

@RaphaelGauthier
Copy link
Member Author

PR updated with a new commit

@RaphaelGauthier RaphaelGauthier removed the WIP Use that label for a Work In Progress PR that must not be merged yet label Apr 19, 2024
@@ -133,7 +149,7 @@ function vendor_js(cb) {
};

function css(cb) {
src(paths.css.src)
src(paths.css.src, { encoding: false })
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this option to make ionicons and fontawesome work.

Gulp 5 stream encoding is now set to UTF-8 by default, which is not compatible with these icon libs :

Our streams now default to UTF-8 encoding. Previously, our streams took whatever data was emitted without considering any encoding. However, in this release, we resolved a 10 year old issue to support custom encodings and we default these to UTF-8. Most usage of gulp won’t need to change anything, but certain plugins may produce non-UTF-8 output and you’ll need to set { encoding: false } on your gulp streams.

@RaphaelGauthier
Copy link
Member Author

Do not merge yet, I'm having issues with fontawesome and OTS errors :

font-error

It's now working, merge can be done !

@RaphaelGauthier
Copy link
Member Author

PR rebased

@RaphaelGauthier RaphaelGauthier force-pushed the bug_24722/update_gulp_related_js_dependencies branch from 2b4ff63 to 205c9db Compare May 14, 2024 13:18
@VinceMacBuche VinceMacBuche changed the base branch from branches/rudder/8.1 to master June 7, 2024 08:07
@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/5606
-- Your faithful QA
Kant merge: "It is beyond a doubt that all our knowledge begins with experience."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/85599/console)

@amousset amousset merged commit 054b758 into Normation:master Jun 10, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants