Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typing error in @bufbuild/protoplugin, improve error messages #642

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

timostamm
Copy link
Member

createEcmaScriptPlugin from @bufbuild/protoplugin can parse custom plugin options with a user-provided function:

  parseOption?: (key: string, value: string | undefined) => void;

The typing is incorrect. If an option without a value is provided (for example opt: foo), value is an empty string, not undefined, as one might think. Value is actually never undefined. This PR adjusts the typing to match the actual behavior.

Additionally, this PR improves error messages when parsing invalid plugin options. For example, when opt: x is set for protoc-gen-es:

$ buf generate
protoc-gen-es: invalid option "x=

This PR changes the error message to read invalid option "x".

@timostamm timostamm requested review from smaye81, a team, Alfus and srikrsna-buf December 5, 2023 16:37
@timostamm timostamm merged commit f74944f into main Dec 5, 2023
5 checks passed
@timostamm timostamm deleted the tstamm/fix-protoplugin-parseOption branch December 5, 2023 17:33
@smaye81 smaye81 mentioned this pull request Dec 6, 2023
smaye81 added a commit that referenced this pull request Dec 6, 2023
## What's Changed
* Add explicit exports for Node by @smaye81 in
#645
* Honor experimental editions in the preamble generated by
`@bufbuild/protoplugin` by @timostamm in
#644
* Fix typing error in `@bufbuild/protoplugin`, improve error messages by
@timostamm in #642
* Support for proto2 groups by @timostamm in
#640

**Full Changelog**:
v1.5.0...v1.5.1
alecthomas referenced this pull request in TBD54566975/ftl Dec 11, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
| [@bufbuild/protoc-gen-es](https://github.com/bufbuild/protobuf-es)
([source](https://github.com/bufbuild/protobuf-es/tree/HEAD/packages/protoc-gen-es))
| [`1.5.0` ->
`1.5.1`](https://renovatebot.com/diffs/npm/@bufbuild%2fprotoc-gen-es/1.5.0/1.5.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@bufbuild%2fprotoc-gen-es/1.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@bufbuild%2fprotoc-gen-es/1.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@bufbuild%2fprotoc-gen-es/1.5.0/1.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@bufbuild%2fprotoc-gen-es/1.5.0/1.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| dependencies | patch |
|
[@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)
([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react))
| [`18.2.42` ->
`18.2.43`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.42/18.2.43)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.2.43?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.2.43?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.2.42/18.2.43?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.2.42/18.2.43?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [bit](https://github.com/alecthomas/bit) | `0.4.1` -> `0.4.2` |
[![age](https://developer.mend.io/api/mc/badges/age/hermit/bit/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/hermit/bit/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/hermit/bit/0.4.1/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/hermit/bit/0.4.1/0.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| | patch |
| [connectrpc.com/connect](https://github.com/connectrpc/connect-go) |
`v1.12.0` -> `v1.13.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/connectrpc.com%2fconnect/v1.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/connectrpc.com%2fconnect/v1.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/connectrpc.com%2fconnect/v1.12.0/v1.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/connectrpc.com%2fconnect/v1.12.0/v1.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | minor |
| [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) | `v5.5.0`
-> `v5.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fjackc%2fpgx%2fv5/v5.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fjackc%2fpgx%2fv5/v5.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fjackc%2fpgx%2fv5/v5.5.0/v5.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fjackc%2fpgx%2fv5/v5.5.0/v5.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |
| [pre-commit](https://github.com/pre-commit/pre-commit) | `3.5.0` ->
`3.6.0` |
[![age](https://developer.mend.io/api/mc/badges/age/hermit/pre-commit/3.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/hermit/pre-commit/3.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/hermit/pre-commit/3.5.0/3.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/hermit/pre-commit/3.5.0/3.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| | minor |
| [prettier](https://prettier.io)
([source](https://github.com/prettier/prettier)) | [`3.1.0` ->
`3.1.1`](https://renovatebot.com/diffs/npm/prettier/3.1.0/3.1.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prettier/3.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prettier/3.1.0/3.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.1.0/3.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [typescript](https://www.typescriptlang.org/)
([source](https://github.com/Microsoft/TypeScript)) | [`5.3.2` ->
`5.3.3`](https://renovatebot.com/diffs/npm/typescript/5.3.2/5.3.3) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/typescript/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript/5.3.2/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript/5.3.2/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [watchexec](https://github.com/watchexec/watchexec) | `1.23.0` ->
`1.24.0` |
[![age](https://developer.mend.io/api/mc/badges/age/hermit/watchexec/1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/hermit/watchexec/1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/hermit/watchexec/1.23.0/1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/hermit/watchexec/1.23.0/1.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| | minor |

---

### Release Notes

<details>
<summary>bufbuild/protobuf-es (@&#8203;bufbuild/protoc-gen-es)</summary>

###
[`v1.5.1`](https://github.com/bufbuild/protobuf-es/releases/tag/v1.5.1)

[Compare
Source](https://github.com/bufbuild/protobuf-es/compare/v1.5.0...v1.5.1)

#### What's Changed

- Add explicit exports for Node by
[@&#8203;smaye81](https://github.com/smaye81) in
[https://github.com/bufbuild/protobuf-es/pull/645](https://github.com/bufbuild/protobuf-es/pull/645)
- Honor experimental editions in the preamble generated by
`@bufbuild/protoplugin` by
[@&#8203;timostamm](https://github.com/timostamm) in
[https://github.com/bufbuild/protobuf-es/pull/644](https://github.com/bufbuild/protobuf-es/pull/644)
- Fix typing error in `@bufbuild/protoplugin`, improve error messages by
[@&#8203;timostamm](https://github.com/timostamm) in
[https://github.com/bufbuild/protobuf-es/pull/642](https://github.com/bufbuild/protobuf-es/pull/642)
- Support for proto2 groups by
[@&#8203;timostamm](https://github.com/timostamm) in
[https://github.com/bufbuild/protobuf-es/pull/640](https://github.com/bufbuild/protobuf-es/pull/640)

**Full Changelog**:
bufbuild/protobuf-es@v1.5.0...v1.5.1

</details>

<details>
<summary>alecthomas/bit (bit)</summary>

### [`v0.4.2`](https://github.com/alecthomas/bit/releases/tag/v0.4.2)

#### Changelog

- [`308c8fc`](https://github.com/alecthomas/bit/commit/308c8fc)
Configure renovate
- [`1dcaf8f`](https://github.com/alecthomas/bit/commit/1dcaf8f) fix:
combine outputs when using `bit -D deps`
- [`77368bc`](https://github.com/alecthomas/bit/commit/77368bc)
refactor: make Hasher public + move CSI under logging

</details>

<details>
<summary>connectrpc/connect-go (connectrpc.com/connect)</summary>

###
[`v1.13.0`](https://github.com/connectrpc/connect-go/releases/tag/v1.13.0)

[Compare
Source](https://github.com/connectrpc/connect-go/compare/v1.12.0...v1.13.0)

#### What's Changed

##### Enhancements

- Add `Schema` field to `connect.Spec` for introspection by
[@&#8203;emcfarlane](https://github.com/emcfarlane) in
[#&#8203;629](https://github.com/connectrpc/connect-go/issues/629)
- Add support for dynamic message types via message initializers by
[@&#8203;emcfarlane](https://github.com/emcfarlane) in
[#&#8203;640](https://github.com/connectrpc/connect-go/issues/640)

##### Bugfixes

- Type URLs in error details can have any host and even include URI
scheme by [@&#8203;jhump](https://github.com/jhump) in
[#&#8203;636](https://github.com/connectrpc/connect-go/issues/636)
- Improve GET requests: clients should not include content headers,
servers should disallow a body by
[@&#8203;jhump](https://github.com/jhump) in
[#&#8203;644](https://github.com/connectrpc/connect-go/issues/644)
- Fix mis-categorization of "deadline exceeded" errors by
[@&#8203;jhump](https://github.com/jhump) in
[#&#8203;643](https://github.com/connectrpc/connect-go/issues/643)

##### Other changes

- Improve test code and fix many sources of flakiness by
[@&#8203;emcfarlane](https://github.com/emcfarlane) in
[#&#8203;594](https://github.com/connectrpc/connect-go/issues/594),
[#&#8203;624](https://github.com/connectrpc/connect-go/issues/624),
[#&#8203;627](https://github.com/connectrpc/connect-go/issues/627),
and [#&#8203;628](https://github.com/connectrpc/connect-go/issues/628)
- Run conformance tests in CI by
[@&#8203;jhump](https://github.com/jhump) in
[#&#8203;642](https://github.com/connectrpc/connect-go/issues/642)
- Internal refactoring to support future robustness improvements by
[@&#8203;emcfarlane](https://github.com/emcfarlane) in
[#&#8203;646](https://github.com/connectrpc/connect-go/issues/646)

**Full Changelog**:
connectrpc/connect-go@v1.12.0...v1.13.0

</details>

<details>
<summary>jackc/pgx (github.com/jackc/pgx/v5)</summary>

### [`v5.5.1`](https://github.com/jackc/pgx/compare/v5.5.0...v5.5.1)

[Compare Source](https://github.com/jackc/pgx/compare/v5.5.0...v5.5.1)

</details>

<details>
<summary>pre-commit/pre-commit (pre-commit)</summary>

###
[`v3.6.0`](https://github.com/pre-commit/pre-commit/blob/HEAD/CHANGELOG.md#360---2023-12-09)

[Compare
Source](https://github.com/pre-commit/pre-commit/compare/v3.5.0...v3.6.0)

\==================

##### Features

-   Check `minimum_pre_commit_version` first when parsing configs.
- [#&#8203;3092](https://github.com/pre-commit/pre-commit/issues/3092)
PR by [@&#8203;asottile](https://github.com/asottile).

##### Fixes

-   Fix deprecation warnings for `importlib.resources`.
- [#&#8203;3043](https://github.com/pre-commit/pre-commit/issues/3043)
PR by [@&#8203;asottile](https://github.com/asottile).
-   Fix deprecation warnings for rmtree.
- [#&#8203;3079](https://github.com/pre-commit/pre-commit/issues/3079)
PR by [@&#8203;edgarrmondragon](https://github.com/edgarrmondragon).

##### Updating

-   Drop support for python<3.9.
- [#&#8203;3042](https://github.com/pre-commit/pre-commit/issues/3042)
PR by [@&#8203;asottile](https://github.com/asottile).
- [#&#8203;3093](https://github.com/pre-commit/pre-commit/issues/3093)
PR by [@&#8203;asottile](https://github.com/asottile).

</details>

<details>
<summary>prettier/prettier (prettier)</summary>

###
[`v3.1.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#311)

[Compare
Source](https://github.com/prettier/prettier/compare/3.1.0...3.1.1)

[diff](https://github.com/prettier/prettier/compare/3.1.0...3.1.1)

##### Fix config file search
([#&#8203;15363](https://github.com/prettier/prettier/pull/15363) by
[@&#8203;fisker](https://github.com/fisker))

Previously, we start search for config files from the filePath as a
directory, if it happened to be a directory and contains config file, it
will be used by mistake.

```text
├─ .prettierrc
└─ test.js         (A directory)
  └─ .prettierrc
```

```js
// Prettier 3.1.0
await prettier.resolveConfigFile(new URL("./test.js", import.meta.url));
// <CWD>/test.js/.prettierrc

// Prettier 3.1.1
await prettier.resolveConfigFile(new URL("./test.js", import.meta.url));
// <CWD>/.prettierrc
```

##### Skip explicitly passed symbolic links with
`--no-error-on-unmatched-pattern`
([#&#8203;15533](https://github.com/prettier/prettier/pull/15533) by
[@&#8203;sanmai-NL](https://github.com/sanmai-NL))

Since Prettier v3, we stopped following symbolic links, however in some
use cases, the symbolic link patterns can't be filtered out, and there
is no way to prevent Prettier from throwing errors.

In Prettier 3.1.1, you can use `--no-error-on-unmatched-pattern` to
simply skip symbolic links.

##### Consistently use tabs in ternaries when `useTabs` is `true`
([#&#8203;15662](https://github.com/prettier/prettier/pull/15662) by
[@&#8203;auvred](https://github.com/auvred))

<!-- prettier-ignore -->

```jsx
// Input
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
	  ? ddddddddddddddd
	  : eeeeeeeeeeeeeee
	    ? fffffffffffffff
	    : gggggggggggggggg;

// Prettier 3.1.0
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
	  ? ddddddddddddddd
	  : eeeeeeeeeeeeeee
	    ? fffffffffffffff
	    : gggggggggggggggg;

// Prettier 3.1.1
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
		? ddddddddddddddd
		: eeeeeeeeeeeeeee
			? fffffffffffffff
			: gggggggggggggggg;
```

##### Improve config file search
([#&#8203;15663](https://github.com/prettier/prettier/pull/15663) by
[@&#8203;fisker](https://github.com/fisker))

The Prettier config file search performance has been improved by more
effective cache strategy.

##### Fix unstable and ugly formatting for comments in destructuring
patterns
([#&#8203;15708](https://github.com/prettier/prettier/pull/15708) by
[@&#8203;sosukesuzuki](https://github.com/sosukesuzuki))

<!-- prettier-ignore -->

```tsx
// Input
const {
  foo,
  // bar
  // baz
}: Foo = expr;

// Prettier 3.1.0
const {
  foo1,
} // bar
// baz
: Foo = expr;

// Prettier 3.1.0 second output
const {
  foo1, // bar
} // baz
: Foo = expr;

// Prettier 3.1.1
const {
  foo1,
  // bar
  // baz
}: Foo = expr;
```

##### Support "Import Attributes"
([#&#8203;15718](https://github.com/prettier/prettier/pull/15718) by
[@&#8203;fisker](https://github.com/fisker))

[TypeScript
5.3](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/#import-attributes)
supports the latest updates to the [import
attributes](https://github.com/tc39/proposal-import-attributes)
proposal.

```tsx
import something from "./something.json" with { type: "json" };
```

##### Fix false claim in docs that cursorOffset is incompatible with
rangeStart/rangeEnd
([#&#8203;15750](https://github.com/prettier/prettier/pull/15750) by
[@&#8203;ExplodingCabbage](https://github.com/ExplodingCabbage))

The cursorOffset option has in fact been compatible with
rangeStart/rangeEnd for over 5 years, thanks to work by
[@&#8203;ds300](https://github.com/ds300). However, Prettier's
documentation (including the CLI `--help` text) continued to claim
otherwise, falsely. The documentation is now fixed.

##### Keep curly braces and `from` keyword in empty `import` statements
([#&#8203;15756](https://github.com/prettier/prettier/pull/15756) by
[@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```js
// Input
import { } from 'foo';
import { /* comment */ } from 'bar';

// Prettier 3.1.0
import {} from "foo";
import /* comment */ "bar";

// Prettier 3.1.1
import {} from "foo";
import {} from /* comment */ "bar";
```

##### Keep empty import attributes and assertions
([#&#8203;15757](https://github.com/prettier/prettier/pull/15757) by
[@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```js
// Input
import foo from "foo" with {};
import bar from "bar" assert {};

// Prettier 3.1.0
import foo from "foo";
import bar from "bar";

// Prettier 3.1.1
import foo from "foo" with {};
import bar from "bar" assert {};
```

</details>

<details>
<summary>Microsoft/TypeScript (typescript)</summary>

###
[`v5.3.3`](https://github.com/microsoft/TypeScript/releases/tag/v5.3.3):
TypeScript 5.3.3

[Compare
Source](https://github.com/Microsoft/TypeScript/compare/v5.3.2...v5.3.3)

For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/).

For the complete list of fixed issues, check out the

- [fixed issues query for Typescript 5.3.0
(Beta)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.3.1
(RC)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.3.2
(Stable)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.2%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.3.3
(Stable)](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.3%22+is%3Aclosed+).

Downloads are available on:

- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)

</details>

<details>
<summary>watchexec/watchexec (watchexec)</summary>

###
[`v1.24.0`](https://github.com/watchexec/watchexec/releases/tag/v1.24.0):
CLI v1.24.0

*Software development often involves running the same commands over and
over. Boring! Watchexec is a simple, standalone tool that watches a path
and runs a command whenever it detects modifications. Install it today
with [`cargo-binstall
watchexec-cli`](https://github.com/cargo-bins/cargo-binstall), from
the binaries below, find it [in your favourite package
manager](https://github.com/watchexec/watchexec/blob/main/doc/packages.md),
or build it from source with `cargo install watchexec-cli`.*

##### In this release:

- New: start/stop messages are now in colour. Use `--colour=never`
(`--color` also accepted) to disable, or the conventional `always` and
`auto`.
([#&#8203;144](https://github.com/watchexec/watchexec/issues/144),
[#&#8203;237](https://github.com/watchexec/watchexec/issues/237),
[#&#8203;698](https://github.com/watchexec/watchexec/issues/698))
- New: `--timings` to print how long the command took.
([#&#8203;278](https://github.com/watchexec/watchexec/issues/278),
[#&#8203;698](https://github.com/watchexec/watchexec/issues/698))
- New: `--quiet` to disable printing any message (except warning and
error logs).
([#&#8203;698](https://github.com/watchexec/watchexec/issues/698))
- New: `--bell` to ring the terminal bell on command end.
([#&#8203;238](https://github.com/watchexec/watchexec/issues/238),
[#&#8203;698](https://github.com/watchexec/watchexec/issues/698))
- New: `--ignore-nothing` to switch on all the `--no-*-ignore` flags.
([#&#8203;275](https://github.com/watchexec/watchexec/issues/275),
[#&#8203;625](https://github.com/watchexec/watchexec/issues/625),
[#&#8203;695](https://github.com/watchexec/watchexec/issues/695))
- New: `--only-emit-events` disables launching a command, and only
prints events to stdout. Requires `--emit-events-to` to specify the
format to print. This lets you obtain a stream of change events to
handle directly rather than mediating via a command.
([#&#8203;676](https://github.com/watchexec/watchexec/issues/676),
[#&#8203;691](https://github.com/watchexec/watchexec/issues/691))
- New: `--map-signal` to map signals received by Watchexec to other
signals sent to the command.
([#&#8203;151](https://github.com/watchexec/watchexec/issues/151),
[#&#8203;387](https://github.com/watchexec/watchexec/issues/387),
[#&#8203;710](https://github.com/watchexec/watchexec/issues/710))
- Change: `--emit-events-to` `stdin` and `json-stdin` modes are renamed
to `stdio` and `json-stdio` respectively; the old names are aliased to
preserve compatibility.

##### Other changes:

- Uses the [Watchexec library
3.0](https://github.com/watchexec/watchexec/blob/main/crates/lib/CHANGELOG.md#v300-2023-11-26).
([#&#8203;601](https://github.com/watchexec/watchexec/issues/601))
- `-w /dev/null` disables watching any files. This is the literal string
`/dev/null`, it won't detect the null device via links or fifos.
([#&#8203;601](https://github.com/watchexec/watchexec/issues/601))
- Running as PID1 (e.g. in Docker) is fully supported.
([#&#8203;140](https://github.com/watchexec/watchexec/issues/140),
[#&#8203;601](https://github.com/watchexec/watchexec/issues/601),
[#&#8203;624](https://github.com/watchexec/watchexec/issues/624))
- Performance improvements and bugfixes around reaping processes (via
`command-group` 5).
([#&#8203;601](https://github.com/watchexec/watchexec/issues/601))
- Performance improvements and bugfixes around watching files (via
`notify` 6).
([#&#8203;601](https://github.com/watchexec/watchexec/issues/601))
- Clear the screen *before* printing events, so `--print-events` and
`--clear` can meaningfully be used together.
([#&#8203;601](https://github.com/watchexec/watchexec/issues/601))
- Hint that more or less help is available with long `--help` and short
`-h` flags.
([#&#8203;601](https://github.com/watchexec/watchexec/issues/601))
- The PDF version of the manual page is gone, due to the tooling I used
disappearing, and the general ugliness of its typesetting.
([#&#8203;710](https://github.com/watchexec/watchexec/issues/710))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/TBD54566975/ftl).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants