Skip to content

Releases: roots/bud

6.17.0

29 Sep 08:41
Compare
Choose a tag to compare

Improvements in 6.17.0 are mainly focused on @roots/bud-purgecss and @roots/bud-stylelint APIs. Also includes a way for community extensions to indicate compatibility with specific bud.js releases. This allows community extension authors to version their work independently of bud.js core and for users to update extensions along with core packages using the bud upgrade command (#2444).

Also includes a few minor bug fixes and updates to transitive dependencies.

⚠️ Breaking Changes

@roots/bud-postcss

Sensible defaults are applied automatically, making this extension zero config. There is a much better API available using bud.purge rather than bud.purgecss.

  • lf you have installed the extension but are not using it you will either want to remove the extension or explicitly disable it: bud.purge.enable(false).
  • bud.purgecss function is deprecated. You should configure purgecss using the extension API exposed with bud.purge. bud.purge.setOptions works exactly the same way as bud.purgecss does, but there is now a new, fully fluent API available to you as well.
  • bud.purgecss will not be removed until v7.

What's Changed

Full Changelog: v6.16.1...v6.17.0

6.16.1

08 Sep 08:11
Compare
Choose a tag to compare

Fix for bud upgrade command (when using yarn classic).

What's Changed

Full Changelog: v6.16.0...v6.16.1

6.16.0

08 Sep 05:45
Compare
Choose a tag to compare

This update adds css module support for scss when using @roots/bud-sass, improves the CLI dashboard, and adds experimental support for pnpm and yarn berry to the bud ugprade and create-bud-app commands. It also includes dependency updates, bug fixes and other internal improvements.

What's Changed

New Contributors

Full Changelog: v6.15.2...v6.16.0

6.15.2

17 Aug 19:04
Compare
Choose a tag to compare

Patch: fixes a potential issue with resolving sass-loader and improves bud.cache interface and build dependency identification.

What's Changed

Full Changelog: v6.15.1...v6.15.2

6.15.1

15 Aug 05:23
Compare
Choose a tag to compare

Fixes issues with create- bud-app when not specifying any features (totally vanilla project) and improves CLI command cache to be mostly self-healing.

What's Changed

Full Changelog: v6.15.0...v6.15.1

6.15.0

08 Aug 05:19
Compare
Choose a tag to compare

This release is mostly focused on maintaining and improving existing features. The one new feature lets you opt-out of externalizing certain WordPress dependencies (if you are using @roots/bud-preset-wordpress or @roots/sage). For more information check out the updated @roots/bud-preset-wordpress docs.

⚠️ Potentially breaking change

@roots/sage: previously bud.splitChunks('single') was called for production builds. This is no longer the default for two reasons:

  1. If you have an editor entrypoint and an app entrypoint (common), it is possible that editor dependencies could be extracted into the common chunk. This can lead to Acorn enqueuing those dependencies for both app and editor, even if they were only used in one (since the shared vendor module contains references to the dependencies).
  2. This is very easy to address as part of your application and that approach is preferred. Especially now that top-level async/await is available for bud.js application modules.
  3. If you really want a vendors chunk, just call bud.splitChunks() or pass the --splitChunks flag.

What's Changed

New Contributors

Full Changelog: v6.14.3...v6.15.0

6.14.3

11 Jul 16:27
Compare
Choose a tag to compare

Fixes and improvements.

What's Changed

New Contributors

Full Changelog: v6.14.2...v6.14.3

6.14.2

10 Jul 07:19
Compare
Choose a tag to compare

Fixes #2365: bud@16.4.1 incompatible with stylelint@15.10.1

What's Changed

Full Changelog: v6.14.1...v6.14.2

6.14.1

06 Jul 16:29
Compare
Choose a tag to compare

Quick turnaround for an issue in 6.14.0.

If you are effected by this you can work around it using --no-cache until you can update.

What's Changed

  • 🩹 fix(@roots/entrypoints-webpack-plugin): stale caching by @kellymears in #2363

6.14.0

06 Jul 13:21
Compare
Choose a tag to compare

Top-level await, lazy compilation of async modules, CLI improvements, performance enhancements, and more.

🚨 Potentially breaking changes

  • deprecated: @roots/merged-manifest-webpack-plugin
  • deprecated: @roots/bud-wordpress-manifests
  • bud.console: removed. old methods consolidated with bud.dashboard.
  • bud.context.files: interface has changed. The module property for each value in bud.context.files is now an async function that returns the module. This is an undocumented internal, but some people might be using it.

Key changes

  • ✨ feature: top level await (enabled for ESM projects only)
  • ✨ feature: creates aliases from imports field of package.json
  • ✨ feature: dynamic modules now compiled lazily in development
  • 🏎️ performance: multi-config builds are now built in parallel
  • ✨ improve: config files now lazy loaded
  • ✨ improve(@roots/wordpress-theme-json-webpack-plugin): theme.json included in compilation module graph
  • ✨ improve(@roots/bud-tailwindcss-theme-json): Edits to tailwind.config.js now result in rebuild of theme.json
  • ✨ improve(@roots/entrypoints-webpack-plugin): entrypoints.json included in compilation module graph
  • ✨ improve(@roots/bud-dashboard): improved UI
  • ✨ add flag: --entrypoints.html (same as calling bud.entrypoints.set('emitHtml', true); emits partials containing <script> and <style> tags)
  • ✨ add flag: --dashboard (use dashboard stats vs. simple stats output)
  • ✨ add flag: --dashboard.assets (show/hide presentation of assets)
  • ✨ add flag: --dashboard.compact (truncated build summary)
  • ✨ add flag: --dashboard.entrypoints (show/hide presentation of entrypoints)
  • ✨ add flag: --dashboard.server (show/hide server info)
  • ✨ feature: for multi-compiler builds 1-9 will show stats isolated by compiler. 0 shows all compilers.
  • ✨ feature: d when viewing the dashboard will show detailed debug stats
  • ✨ feature: c when viewing the dashboard will present output with compact formatting
  • 🩹 fix: issues with bud.js cli error output
  • 🩹 fix: issues with bud.js internal module resolution cache
  • 📦 pkg(@roots/wordpress-transforms): small utility for translating @wordpress/* signifiers to wp-* enqueue handles and wp.* window references
  • 🗂️ typings(@roots/bud-framework): flatten organization of typings

Additional Notes

bud.js module resolution cache is now self-healing

The bud.js module resolution cache is now self-healing. If a build dependency was previously available at some path but is now unresolvable its entry will be updated while still preserving the rest of the cache. There should now be limited reason to use --force to manually flush the cache; it will probably only serve to make your next build slower.

--no-clean will be a future default

You can get a surprising performance boost by using the --no-clean flag (some test projects are >15% faster). Why delete and rewrite modules which have not been modified? This will be default in the next major release of bud.js.

You might not want to make a vendor chunk

If you are doing a lot of code splitting with imports, try disabling chunking and see if it improves initial page load (bud.splitChunks(false) or --no-splitChunks). The extra runtime code might not be worth it if you are already importing modules conditionally.

--ci will soon mean more than "run this without fanciness"

If you are using --ci solely to not display stats consider switching to --no-dashboard. There may be changes in the future to the behavior of this flag which are focused on CI environments specifically.

bud.js instance is now importable

The bud.js instance is now available as a named import from @roots/bud (import {bud} from '@roots/bud'). This allows for a bunch of stuff you couldn't do before. Like, as an example, configuring bud.js without an exported callback:

import {bud} from '@roots/bud'

bud.entry('app', ['app.js', 'app.css'])

You can also import the instance into other config modules or custom scripts. Not all tools will play nicely. Tailwindcss, for example, will try to bundle bud.js along with your tailwind config using jiti. It won't succeed (jiti can't handle import.meta).

Full Changelog

v6.13.1...v6.14.0