Skip to content

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Jun 6, 2025

Description

This should resolve some dependabot alerts about outdated dependencies versions.
Tested on Windows and the script produces identical output for all 3 packages.

Note: also updated gulp-cli to recently released 3.1.0 to fix errors on top-level awaits.

Type of change

  • Internal change

Note

Some changes in svg2ttf caused the icons to have incorrect line-height on Windows - 26px instead of 24px.
I was able to figure out two changes that are apparently related and applied a patch to revert to old behavior.

@web-padawan web-padawan force-pushed the chore/gulpfile-esm branch 2 times, most recently from a65c551 to 5af8e69 Compare June 6, 2025 13:24
@web-padawan web-padawan requested a review from vursen June 6, 2025 13:27
import * as cheerio from 'cheerio';
import { dest, src, task } from 'gulp';
import concat from 'gulp-concat';
import { gulpPlugin } from 'gulp-plugin-extras';
Copy link
Member Author

Choose a reason for hiding this comment

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

Replaced usage of gulp-modify which pulls in deprecated gulp-util in this file with custom plugins.

import fs from 'fs';
import { dest, src, task } from 'gulp';
import iconfont from 'gulp-iconfont';
import imagemin, { svgo } from 'gulp-imagemin';
Copy link
Member Author

Choose a reason for hiding this comment

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

Replaced gulp-svgmin which is outdated with gulp-imagemin using a newer version of svgo.

Copy link
Member Author

Choose a reason for hiding this comment

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

BTW, by default svgo does nothing and says that files are already optimized. But maybe we can still keep it.

Copy link
Member Author

Choose a reason for hiding this comment

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

UPD: changed to use imagemin-svgo directly with version 10 for now to not install other imagemin plugins.
There is a newer version 11 which depends on svgo v3 that has some breaking changes.

@web-padawan
Copy link
Member Author

web-padawan commented Jun 6, 2025

UPD: for some reason screenshot with font icons has height changes, icons now have 26px height on Windows.
This is caused by gulp-iconfont bump although I'm not sure what is the exact dependency causing this.

@web-padawan web-padawan marked this pull request as draft June 6, 2025 13:51
@web-padawan web-padawan closed this Jun 6, 2025
@web-padawan web-padawan reopened this Jun 6, 2025
@web-padawan web-padawan closed this Jun 6, 2025
@web-padawan web-padawan reopened this Jun 6, 2025
@web-padawan web-padawan force-pushed the chore/gulpfile-esm branch from f9cc9a8 to 47519d2 Compare June 6, 2025 17:38
@web-padawan
Copy link
Member Author

Tried to revert changes in fontello/svg2ttf@de2563a and fontello/svg2ttf@ba4d551, let's see if it helps.

@web-padawan web-padawan force-pushed the chore/gulpfile-esm branch from 47519d2 to 9728db8 Compare June 6, 2025 18:00
@web-padawan web-padawan marked this pull request as ready for review June 6, 2025 18:09
@web-padawan web-padawan force-pushed the chore/gulpfile-esm branch from a6f3311 to eb89bf9 Compare June 6, 2025 18:41
Copy link

sonarqubecloud bot commented Jun 6, 2025

@web-padawan web-padawan requested a review from vursen June 9, 2025 06:04
@web-padawan web-padawan merged commit 7180380 into main Jun 9, 2025
10 checks passed
@web-padawan web-padawan deleted the chore/gulpfile-esm branch June 9, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants