v6.12.0
Framework improvements, eslint fixes, better config
directory support, and more.
📦 tailwindcss 3.3.0 supported
bud.js now supports the new configuration options from tailwindcss 3.3.0. tailwind configs can now be authored with typescript or esm.
🧹 default storage location: .budfiles -> os cache dir
Less junk in your project is always good, right? The new default @storage
directory is now [os-cache dir]/bud-nodejs/[hash of project path]
.
Breaking change: If you are explicitly setting the @storage
directory you need to do it using the --storage
CLI flag or the APP_STORAGE_PATH
.env variable. By the time config files have been processed most reads and writes to @storage
will have already occurred, so bud.setPath
won't be effective. There will be a warning logged to the console if you are doing this; the main adverse effect will be slower builds when bud.js can't find caches during bootstrapping.
Potentially breaking change: If you are using remote modules (which lets you import modules from cdns like skypack without installing locally) the bud.lock
lockfile will now be written to the root of your project (unless you have configured it to be written somewhere else).
✨ Config files can be written in TypeScript (without extensions)
bud.js configuration files can now be authored in typescript without installing any additional extensions. if you were previously using the ts-bud
binary you still can (it executes the bud.js runtime with ts-node), but you can now just use the standard bud
command (it is faster). ts-bud
remains available in case you were doing some deeper integration with ts-node.
The parsing of TypeScript configs is handled with esbuild-wasm. I have not been able to measure a meaningful difference in timings using this package instead of esbuild and the wasm binary doesn't need to be built so installs are a lot faster. However, if you want to use esbuild instead of esbuild-wasm you can install esbuild as a project dependency and it will be used instead. Again, I don't think it's worth the extra installation time. Especially since the results of config transforms are cached.
This also applies to eslint, tailwindcss, postcss and babel configs.
✨ Config files can be stored in ./config
directory
bud.js configuration files can now be stored in the config
directory. This also applies to eslint, tailwindcss, postcss and babel configs.
✨ @roots/bud-eslint: upgrade eslint-webpack-plugin to v4
eslint-webpack-plugin@4 removes need for eslint cache fix
If you were disabling the fix with bud.eslint.cacheFix.enable(false)
before you will be prompted to remove that call, as it is now deprecated.
See #2191
🏎️ performance: module resolution caching
Module paths resolved by bud.module
are cached to [cachedir]/resolutions.yml
. This gives a nice performance boost since we can skip a lot of lookups:
The resolve
and import
methods used by bud.module
treat built-in dependencies as fallbacks. So, if you aren't overriding any built-in dependencies and the cache is valid the net result is more than half as many calls to importMetaResolve
and import
statements.
- sha1 hashes are calculated for files in root and
config/*
and an artifact is output to[cachedir]/checksum.yml
. - Hash mismatches in config files or
package.json
will invalidate thebud.module
resolver cache and thecompiler
cache.
🏎️ performance: reuse context & bud instances
bud.context
is now re-used between bootstrap scripts and the cli application.
✨ improve: unified error handling
Now extending modern-errors for unified error handling.
🩹 fix: no postinstall scripts in CI
There are some reliability issues with postinstall scripts (for @roots/bud-framework and @roots/browserslists-config) running in CI.
This update disables postinstall scripts when process.env.CI
is set (default for gh actions).
See #2169
✨ improve(@roots/eslint-config): remove react-in-jsx-scope
This rule is not really appropriate as a default for modern React.
See #2154
👩🔬 experimental: pnpm support
Installs with pnpm
should work now. They may break again in the future, but we're closer to being able to claim full compatibility. You must install with public hoisting:
pnpm install --public-hoist-pattern=*
pnpm installs peers by default as of pnpm v8 🎉, so we suspect that compatibility will be a lot better once people upgrade.
📦 upgrade ink to v4
A ton of workarounds were required to make ink work prior to this upgrade. It's now compatible with react 18 and fully esm 🎉.
📕 Documentation improvements
- Thanks to @chrillep for improving the
@roots/bud-eslint
documentation example config - Adds documentation for
bud.config
- Improves documentation for
bud.define
- Adds pnpm installation instructions to getting started guide