Bud v6.5.0 released

bud v6.5.0 released

:warning: This release deprecates the optIn property and decorator for extensions. This doesn’t matter unless you are authoring an extension. If you are, you can probably just use dependsOnOptional instead.

As always, release notes also available on bud.js.org.

:sparkles: bud.fs

bud.fs is a new filesystem API for bud.js. It uses fs-jetpack and includes support for managing s3 assets.

Example of a file write operation:

await bud.fs.write(`README.md`, `# Hello, world!`);

Example of the S3 API which uploads @dist contents to a bucket after compilation:

bud.fs
  .setCredentials({
    accessKeyId: `***`,
    secretAccessKey: `***`,
  })
  .setEndpoint(`https://sfo2.digitaloceanspaces.com`)
  .setBucket("bud-test")
  .upload();

Check the bud.fs docs for more information.

:sparkles: bud.after

Config function for executing tasks after the compilation is fully complete. This is useful for tasks that need to run after the compilation is complete, but don’t need to be part of the compilation process (like uploading assets to s3!)

export default async (bud) => {
  bud.after(async (bud) => {
    await bud.fs.write(
      `dist/credits.txt`,
      `${bud.context.manifest.name} built by me!`
    );
  });
};

Execute a command with bud.sh:

export default async (bud) => {
  bud.after(async (bud) => await bud.sh(`yarn jest`));
};

Check the bud.after docs for more information.

:adhesive_bandage: Fix: duplicative logs

Some logs would be displayed twice in the terminal if they were emitted around the same time that the dashboard was being updated.
It was also possible, depending on user configuration, for requests for the dashboard to update to fire twice. This has been fixed.

  1. console.* events are now caught by a new service: bud.bufferConsole. The service catches logs, trims and deduplicates them, and then emits them using an instance of the standard bud logger. If bud is invoked with the --ci flag the service will let them pass through normally.
  2. The bud.dashboard service’s stats method is now debounced. Duplicative calls should be ignored.

It’s likely that our handling of process.stdout is still imperfect, but this is a step in the right direction.

:adhesive_bandage: Fix: notifications only fire once (macos)

In dev mode only the first compilation would result in a desktop notification. This has been fixed. You should now receive a notification for every compilation.

:adhesive_bandage: Fix: bud.env is not an instance of Container

bud.env was not an instance of Container and therefore did not have methods like is. This has been fixed and it should now behave as documented.

:adhesive_bandage: Fix: dynamically imported chunks not hashed

Dynamically imported chunks were not being hashed. This has been fixed.

:adhesive_bandage: Fix: @roots/bud-criticalcss

A breaking change in the critical package had broken this extension. This change has now been accounted for and the extension should work again. This extension is still listed as experimental.

:information_source: Release information

For more information review the diff to see what’s changed.

4 Likes