Skip to content

Commit

Permalink
📕 docs(none): 6.5.1 release notes (#1787)
Browse files Browse the repository at this point in the history
- docs: 6.5.1 update notes
- fix: `package.json` keys checked by `@roots/bud-extensions`
- fix: `bud.serve` SSL when proxying
- docs: bud.serve 

refers:

- none

## Type of change

**NONE: internal change**



This PR includes breaking changes to the following core packages:

- none

This PR includes breaking changes to the follow extensions:

- none

## Dependencies

### Adds

- none

### Removes

- none
  • Loading branch information
kellymears authored Oct 19, 2022
1 parent ace578b commit f1609ef
Show file tree
Hide file tree
Showing 17 changed files with 311 additions and 89 deletions.
5 changes: 3 additions & 2 deletions sources/@repo/docs/content/docs/bud.serve.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Configure the development server.

## Server information

By default bud will serve at the following address:
By default bud.js will serve at the following address:

| Property | Value |
| -------- | --------- |
Expand Down Expand Up @@ -48,7 +48,8 @@ bud.serve(new URL('http://example.test:3000'))
Serve over `https`:

```ts title='bud.config.js'
bud.serve('https://example.test', {
bud.serve({
host: new URL('example.test'),
cert: '/path/to/example.test.crt',
key: '/path/to/example.test.key',
})
Expand Down
52 changes: 52 additions & 0 deletions sources/@repo/docs/content/guides/general-use/config-layers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,62 @@ description: Utilize multiple configuration files to manage different environmen
sidebar_label: Layered configurations
---

## Configuration files

It is possible to create more than one bud configuration file. Each configuration file is applied
in the following order:

1. `bud.config` - the standard, base configuration. always applied.
2. `bud.config.local` - the local configuration. always applied.
3. `bud.config.${mode}` - the mode-specific configuration. applied if the mode matches.
4. `bud.config.${mode}.local` - the mode-specific local configuration. applied if the mode matches.

## .env values

The following `.env` will be applied to your build automatically, if present:

- `APP_BASE_PATH` - the base path for your app
- `APP_PUBLIC_PATH` - the public path for your app
- `APP_SRC_PATH` - the `@src` path for your app
- `APP_DIST_PATH` - the `@dist` path for your app
- `APP_STORAGE_PATH` - the `@storage` path for your app
- `APP_MODE` - desired build mode

## `package.json` values

You may also use the `bud` key in `package.json` to modify certain base values:

```json5
{
"bud": {
"paths": {
"base": string,
"src": string,
"dist": string,
"storage": string
},
"publicPath": string,
"extensions": {
"allowlist": string[],
"denylist": string[],
"discovery": boolean
}
}
}
```

## CLI arguments and flags

The CLI has many flags for configuring your build. Check the [CLI documentation](/guides/cli) for more information.

## Order of application

The following is the order in which bud will apply configuration values:

1. `.env` values
2. `package.json` values
3. all config files
4. CLI arguments and flags

So, your `bud.config.mjs` will override any values set in `package.json` or `.env`. Likewise, the CLI arguments will override
any values set in the config.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ The development server can be [configured to use SSL](/docs/bud.serve#ssl).

```js title='bud.config.mjs'
export default async bud => {
bud.serve(new URL(`https://example.test`), {
bud.serve({
url: new URL(`https://example.test`)
cert: `/path/to/example.test.crt`,
key: `/path/to/example.test.key`,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $ yarn bud build --target theme --target plugin

By default, all extensions will be applied to all compilers in the project.

You can use the `--no-inject` flag to prevent any extensions from being registered (except for core extensions).
You can use the `--no-discovery` flag to prevent any extensions from being registered (except for core extensions).

In that case you will need to manually register the extensions you want to use per compiler:

Expand Down
90 changes: 90 additions & 0 deletions sources/@repo/docs/content/releases/6.5.1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
slug: 6.5.1
title: 6.5.1
description: Release notes for bud.js 6.5.1
date: 2022-10-18
author: Kelly Mears
author_title: Lead developer
author_url: https://github.com/kellymears
author_image_url: https://avatars.githubusercontent.com/u/397606?v=4
tags: [release, 6.5]
---

Small fixes and improvements related to `argv`, `package.json` and `.env` settings.

<!--truncate-->

## 🩹 Fix: `argv` parsing

These flags were janky but now they are golden:

- `--devtool` - Set desired devtool
- `--clean` - Enable or disable build cleaning
- `--discovery` - Enable or disable automatic extension registration
- `--flush` - Clean webpack cache

This release also adds a `--runtime` flag, which is new. It doesn't accept everything `bud.runtime` does, but you can use it to specify basic options like `single` or `multiple`.

## Improve: `env` context

You can now set certain values in your `.env`:

- `APP_BASE_PATH` - the base path for your app
- `APP_PUBLIC_PATH` - the public path for your app
- `APP_SRC_PATH` - the `@src` path for your app
- `APP_DIST_PATH` - the `@dist` path for your app
- `APP_STORAGE_PATH` - the `@storage` path for your app
- `APP_MODE` - desired build mode

## Improve: `package.json` context

The options available under the `bud` key in `package.json` have been expanded:

```json5
{
"bud": {
"paths": {
"base": string,
"src": string,
"dist": string,
"storage": string
},
"publicPath": string,
"extensions": {
"allowlist": string[],
"denylist": string[],
"discovery": boolean
}
}
}
```

If you are using `bud.allowlist` or `bud.denylist`, please update to `bud.extensions.allowlist` and `bud.extensions.denylist`. You'll get a warning in your terminal for now; in a future release this will cause an error.

## 🩹 Fix: SSL proxy rewrites and documentation

The implementation and documentation for the `bud.serve` function had fallen out-of-sync. The `bud.serve` documentation and development server configuration guides are now up-to-date.

Additionally, path rewrites for proxied URLs served over SSL were defaulting to `0.0.0.0` for `hostname`. This has been fixed.

Example of the config which served as a test case for this release:

```typescript
.proxy("https://ssl-test.test")
.serve({
host: "ssl-test.test",
cert: `${process.env.HOME}/.config/valet/Certificates/ssl-test.test.crt`,
key: `${process.env.HOME}/.config/valet/Certificates/ssl-test.test.key`,
})
```

To apply the hostname fix to earlier versions of bud you will need to apply the rewrite in your config:

```typescript
// This is no longer necessary in 6.5.1
bud.proxy('https://ssl-test.test', [['0.0.0.0', 'ssl-test.test']])
```

## ℹ️ Release information

For more information [review the diff to see what's changed](https://github.com/roots/bud/compare/v6.5.0...v6.5.1).
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $ bud build development

--input,-i,--@src,--src #0 Source directory (relative to project)
--output,-o,--@dist,--dist #0 Distribution directory (relative to project)
--discovery Automatically register extensions
--notify Enable notfication center messages
--cache Utilize compiler's filesystem cache
--ci Simple build summaries for CI
Expand All @@ -23,6 +24,7 @@ $ bud build development
--manifest Generate a manifest of compiled assets
--minimize Minimize compiled assets
--publicPath #0 public path of emitted assets
--runtime #0 Set runtime chunk
--splitChunks,--vendor Separate vendor bundle
--storage #0 Storage directory (relative to project)
--browser Open browser on successful development build.
Expand Down
2 changes: 2 additions & 0 deletions sources/@repo/docs/src/components/cli-output/build.help.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $ bud build

--input,-i,--@src,--src #0 Source directory (relative to project)
--output,-o,--@dist,--dist #0 Distribution directory (relative to project)
--discovery Automatically register extensions
--notify Enable notfication center messages
--cache Utilize compiler's filesystem cache
--ci Simple build summaries for CI
Expand All @@ -23,6 +24,7 @@ $ bud build
--manifest Generate a manifest of compiled assets
--minimize Minimize compiled assets
--publicPath #0 public path of emitted assets
--runtime #0 Set runtime chunk
--splitChunks,--vendor Separate vendor bundle
--storage #0 Storage directory (relative to project)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $ bud build production

--input,-i,--@src,--src #0 Source directory (relative to project)
--output,-o,--@dist,--dist #0 Distribution directory (relative to project)
--discovery Automatically register extensions
--notify Enable notfication center messages
--cache Utilize compiler's filesystem cache
--ci Simple build summaries for CI
Expand All @@ -23,6 +24,7 @@ $ bud build production
--manifest Generate a manifest of compiled assets
--minimize Minimize compiled assets
--publicPath #0 public path of emitted assets
--runtime #0 Set runtime chunk
--splitChunks,--vendor Separate vendor bundle
--storage #0 Storage directory (relative to project)

Expand Down
2 changes: 2 additions & 0 deletions sources/@repo/docs/src/components/cli-output/dev.help.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $ bud build development

--input,-i,--@src,--src #0 Source directory (relative to project)
--output,-o,--@dist,--dist #0 Distribution directory (relative to project)
--discovery Automatically register extensions
--notify Enable notfication center messages
--cache Utilize compiler's filesystem cache
--ci Simple build summaries for CI
Expand All @@ -23,6 +24,7 @@ $ bud build development
--manifest Generate a manifest of compiled assets
--minimize Minimize compiled assets
--publicPath #0 public path of emitted assets
--runtime #0 Set runtime chunk
--splitChunks,--vendor Separate vendor bundle
--storage #0 Storage directory (relative to project)
--browser Open browser on successful development build.
Expand Down
6 changes: 3 additions & 3 deletions sources/@repo/docs/src/components/cli-output/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

━━━ build ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

bud build [--input,-i,--@src,--src #0] [--output,-o,--@dist,--dist #0] [--notify] [--cache] [--ci] [--clean] [--debug] [--devtool #0] [--editor] [--esm] [--flush] [--hash] [--html] [--immutable] [--manifest] [--minimize] [--publicPath #0] [--splitChunks,--vendor] [--storage #0]
bud build [--input,-i,--@src,--src #0] [--output,-o,--@dist,--dist #0] [--discovery] [--notify] [--cache] [--ci] [--clean] [--debug] [--devtool #0] [--editor] [--esm] [--flush] [--hash] [--html] [--immutable] [--manifest] [--minimize] [--publicPath #0] [--runtime #0] [--splitChunks,--vendor] [--storage #0]
Compile source assets

bud build development [--input,-i,--@src,--src #0] [--output,-o,--@dist,--dist #0] [--notify] [--cache] [--ci] [--clean] [--debug] [--devtool #0] [--editor] [--esm] [--flush] [--hash] [--html] [--immutable] [--manifest] [--minimize] [--publicPath #0] [--splitChunks,--vendor] [--storage #0] [--browser] [--indicator] [--overlay] [--reload]
bud build development [--input,-i,--@src,--src #0] [--output,-o,--@dist,--dist #0] [--discovery] [--notify] [--cache] [--ci] [--clean] [--debug] [--devtool #0] [--editor] [--esm] [--flush] [--hash] [--html] [--immutable] [--manifest] [--minimize] [--publicPath #0] [--runtime #0] [--splitChunks,--vendor] [--storage #0] [--browser] [--indicator] [--overlay] [--reload]
Compiles source assets in `development` mode.

bud build production [--input,-i,--@src,--src #0] [--output,-o,--@dist,--dist #0] [--notify] [--cache] [--ci] [--clean] [--debug] [--devtool #0] [--editor] [--esm] [--flush] [--hash] [--html] [--immutable] [--manifest] [--minimize] [--publicPath #0] [--splitChunks,--vendor] [--storage #0]
bud build production [--input,-i,--@src,--src #0] [--output,-o,--@dist,--dist #0] [--discovery] [--notify] [--cache] [--ci] [--clean] [--debug] [--devtool #0] [--editor] [--esm] [--flush] [--hash] [--html] [--immutable] [--manifest] [--minimize] [--publicPath #0] [--runtime #0] [--splitChunks,--vendor] [--storage #0]
Compiles source assets in `production` mode.

━━━ tasks ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Expand Down
Loading

0 comments on commit f1609ef

Please sign in to comment.