Bud v6.18.0 released

bud v6.18.0 released

This is a relatively big release but should not require any changes to your project configuration.

Node.js LTS is now 20.10 and bud.js has adopted it. We are still not doing anything that requires it but bud doctor will warn you to upgrade Node.js if you’re still on 18 and will really warn you if you are using an even earlier version.

Previously, @roots/browserslist-config would update the can-i-use database as a post install script. This check has been moved into the bud.js application, running before compilation. It runs once per week and only if you have defined a browserslist property in package.json. It can be disabled by setting an environment variable (BUD_BROWSERSLIST_UPDATE=false), or with the --no-browserslist-update flag.

Fixed

  • Fixes an issue where sometimes a stale error notification would persist in the browser even after it was fixed in source.
  • Fixes an issue where sometimes installations could hang when using Yarn v3+.

New

  • bud.addConfig: config function which accepts a path to another config file to run.
  • bud.lazy: config function to configure lazy compilation settings.

Improved

  • bud.devtool, bud.hash bud.minimize, bud.persist, and bud.runtime now accept Bud as an argument so they can be more readily combined with functions like bud.when (e.g. bud.when(bud.isDevelopment, bud.devtool)).
  • bud.hash: Now accepts the hash generation function as a string, if you want to customize it.
  • --runtime flag: now accepts a string argument (e.g. --runtime=single, --runtime=multiple). It can still be used as a boolean flag: (e.g. --runtime, --no-runtime).
  • bud build development: Help menu with keyboard shortcuts (toggle with h).
  • YML configs now support dot notation in config keys. See updated documentation.
  • bud repl: This command is now more responsive to terminal window sizing (it was previously capped at 10 rows).
  • bud clean: This command now only lists directories which it actually removed.
  • All extensions now have a done method which returns the bud instance, for better chaining.
  • General improvements to logging (--log).
  • General improvements to exception handling.
  • Code minimizers (terser, etc.) are lazy loaded only when they are used, which is a performance gain.
  • html-webpack-plugin is lazy loaded only when it is being used, which is a performance gain.

What’s Changed

Full Changelog: https://github.com/roots/bud/compare/v6.17.0...v6.18.0

4 Likes

Problem with released version 6.18.0 with bud-sass, yarn dev not compile css but works with yarn build correctly.

// Even if i remove bud-sass bud dev not compiling css’s.

Can you provide a reproduction of this?

Can you provide the same? This is an honest question, because if you can it will be very valuable for the project and everyone will benefit from the fixes you instigate.

There is more than one e2e test (using playwright) that write to actual stylesheets and ensure that the expected change is reflected in the DOM. We can’t do a release without this test passing as part of roots/bud’s CI processes.

So, a lot of work has gone into having confidence that HMR works with new releases. Not saying that the blame for your project issue is your own doing; but I am asking for a reproduction of that issue (preferably in codesandbox, github workspaces, or an equivalent service) so we can effectively investigate it and I can use it as a reference to write tests to guard against it in the future.

I can replicate this issue too with Sage v10.

The CSS/JS assets are not injected into the browser and live-reloaded when running yarn dev, but yarn build appears to compile and include the assets correctly.

Perhaps changes to project configuration are therefore required? Should we report this as a roots/sage bug?

This is not an issue that we can replicate with Sage v10 and Bud v6.18.0 — both with our automated tests and with manual tests

Feel free to open a topic for getting support on how to configure your Bud config based on your local dev environment, but this is not a bug with the current release of Bud

That seems odd considering the exact same local dev environment config works with v6.17.0, but I will see if I can create a demo.

I haven’t had time to set up a demo, but I can definitely replicate this by following the Sage installation instructions over at Installing Sage | Sage Docs | Roots and then toggling @roots/bud, @roots/bud-tailwindcss, and @roots/sage between versions 6.17.0 and 6.18.0.

Note this needs to be done with classic Yarn since bud versions prior to 6.18.0 seem to hang on yarn install with Yarn v4.

I think it will be a problem with Sage’s version of the bud config, so I guess I’ll just wait for it to catch up and stick with bud 6.17.0 and classic Yarn for now.

Thanks for your work on bud 6.18.0 nonetheless, this looks like an exciting update!

Updated to Bud v6.20.0 and this issue appears to be resolved now. Thanks @kellymears!