Problem/Motivation
We are getting next warnings on clean yarn install:
warning autoprefixer > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
warning gulp > vinyl-fs > graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
warning gulp > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning gulp > vinyl-fs > glob-stream > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-stream > glob > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
warning gulp-rucksack@0.1.4: use gulp-postcss instead
warning gulp-rucksack > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning gulp-rucksack > rucksack-css > laggard > pixrem > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning gulp-sass > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning gulp-sass-inject > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning gulp-strip-css-comments > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
We should update all libraries to latest versions where possible.
Comments
Comment #2
pivica commentedComment #3
ytsurkAll dependencies updated. (gulp was also updated to 4.0.0, chaining tasks is now done by gulp.series)
One warning could not be removed, see https://github.com/sasstools/sass-lint/issues/1070
We need to push a new version for gulp-sass-inject too (https://github.com/pivica/gulp-sass-inject/issues/1)
Comment #4
pivica commented> We need to push a new version for gulp-sass-inject too (https://github.com/pivica/gulp-sass-inject/issues/1)
Done.
I think we should also update yarn.lock files because it make sense we tell the child themes about exact dependencies we are using. But i figure it out just now that generator is not coping yarn.lock from a parent theme.
Not sure how yarn.lock will work with update hooks - i guess we need to update versions there also, lets first fix generator and then figure this.
Comment #5
pivica commented> lets first fix generator and then figure this.
Fixed with https://www.drupal.org/commitlog/commit/90986/dbc0df6622df54dbc4b429695d....
Comment #6
sasanikolic commentedThe patch #3 already works. However, I updated all other packages to their latest versions.
There were some stylelint related warnings, which this patch with the updates fixes.
There are also updates for bootstrap: https://github.com/twbs/bootstrap/releases, do we want to also update that at some point (in bs_bootstrap) as they contain security updates?
Comment #7
ytsurkBootstrap update is in another issue: #3024835: Update gulp tooklit
It's good you updated "everything" else, I just took the ones with warnings.
Also the one warning i mentioned (@ivica) goes away like this, seems like I missed one ...
And we can use yarn install, and do not need yarn upgrade.
If we go this way (using install always) - the update hook doesn't need to call yarn upgrade.
Maybe we should let the user choose if he wants yarn install or yarn upgrade run by the bs-tu command ?
Please note that the update script (which can be run with drush bs-tu bs_bootstrap or equivalent, see the docs here: https://www.drupal.org/docs/8/themes/bs-base/theme-update-hooks) needs to update the versions of the packages in the child theme too !
Comment #8
ytsurkHere a new patch with the updated update-hook.
Do you think we can live with this warning/flaw for now ? (just popped up ..)
warning css-mqpacker@7.0.0: Package no longer supported. Contact support@npmjs.com for more info.https://www.npmjs.com/package/css-mqpacker
We should fix that dependency in another issue and/or remove it right away.
Comment #9
ytsurkAlso here the compiled CSS, seems like it was missing other compilations, as there the following things in:
And box-flex is removed.
Comment #10
pivica commented> Also here the compiled CSS, seems like it was missing other compilations, as there the following things in:
Yeah, let's avoid this because we compile CSS only on point releases to avoid big patches and constant changing in base theme CSS which anyway we don't use in child themes.
Reviewing other stuff in patch #8 - i hope it has all changes and #9 is just compilation.
Comment #11
pivica commentedThe package.json have here now
"stylelint-scss": "^3.5.4"
and here we are stating ^3.5.2, any special reason or maybe c&p error?
Comment #12
ytsurkYou're right, this was a typo in the update script.
I like to see the changed CSS, for review, but yes -it does not need to be commited. So removed too.
Comment #13
ytsurkComment #14
ytsurkComment #15
pivica commented> I like to see the changed CSS, for review, but yes -it does not need to be commited. So removed too.
I am testing this locally against Primer so yeah for sure we will test it :)
Getting next error while doing drush bs-tu
Investigating still.
Comment #16
pivica commentedHmmm
3024835-update_gulp_toolkit-9.patch 326.9 KB
3024835-update_gulp_toolkit-12.patch 591.86 KB
that is like a lot of size diff?
Comment #17
ytsurkI compiled it with node10 instead of node8 - so that's the yarn.lock (filesize) difference.
Have you tried
npm i -g gulp-clito fix your issue, https://github.com/gulpjs/gulp-cli/issues/84 ?Comment #18
pivica commentedI figure my global version of gulp was 3.x and just running
gulp sassWas actually triggering global gulp and not local project gulp. Figure that if you run
yarn gulp sassThis will actually run a local version of gulp and i will not have
gulpInst.start.apply(gulpInst, toRun);error any more.However, then i've got next error
Tried updating node 8.5.x, updated now to 10.15.3.
> Have you tried npm i -g gulp-cli to fix your issue, https://github.com/gulpjs/gulp-cli/issues/84 ?
Did this also.
Error for stripCssComments is still happening. Maybe this is related to our custom gulp code, but @ytsurk i am confused now how you can compile stuff without error and i can't? Maybe something else is different in our environment.
Finally, i did
yarn listto provide here used packages and then i noticed that i have strip-css-comments package instead of gulp-strip-css-comments, so in updated theme, i am missing gulp wrapper so the error makes total sense then:The package name is wrong, we should use gulp-strip-css-comments in updated version also.
Locally build work now, will check now rebuilt CSS to check that everything is fine in custom themes.
@ytsurk, @sasanikolic what do you think we update doc and scripts with
yarn gulp sassinstead of currentgulp sass?Comment #19
ytsurkI think we really should document the environment .. right now it is compatible with node.js 8+.
It makes total sense to me using yarn to run gulp et al. But this should be covered in another issue too.
Sorry for this mad typo. Here the updated patch.
Again installed with node.js 8, but filesize remains. Also installed with node.js 10, and file size remains. So my guess now is that I did not run
yarn installexplicit in the patches before 12.Comment #20
ytsurkTested now with a customer project too - and looks/same good visually :D
Suddenly I got this warning (needs debugging ..) when running yarn install width node.js 10:
Could be done in another issue too ... ?
Comment #21
pivica commented> It makes total sense to me using yarn to run gulp et al. But this should be covered in another issue too.
Agree, here is a follow-up issue #3041726: Use yarn to run gulp and document environment better.
> Suddenly I got this warning (needs debugging ..) when running yarn install width node.js 10:
Seems to me it's just a warning from node related to some library we are using. We could identify a library and update when this is fixed... Yeah, could be a follow-up i guess.
Comment #22
sasanikolic commentedOne warning popped up when doing drush bs-tu ... :
warning css-mqpacker@7.0.0: Package no longer supported. Contact support@npmjs.com for more info.https://www.npmjs.com/package/css-mqpacker
Tested on the site and couldn't find any bugs.
Comment #23
ytsurkThx for review @sasanikolic. With which node.js version you tested ?
This package (css-mqpacker) is no longer supported. We should replace or remove it in another issue.
Comment #24
sasanikolic commentedI think it was with the latest 11 one (11.6.0).
Comment #26
pivica commentedI've tested the latest patch version, tested changes in custom themes, all looks good now. Great stuff guys, thx :)
Committed.
Comment #27
pivica commentedAdded node, yarn and gulp-cli information into https://www.drupal.org/docs/8/themes/bs-base/installation.
> This package (css-mqpacker) is no longer supported. We should replace or remove it in another issue.
Follow-up issue created #3042171: Decide what to do with css-mqpacker npm package is not maintained any more