Skip to content

Commit 034d05c

Browse files
committed
Update CHANGELOG and README
1 parent 3ea9967 commit 034d05c

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,36 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic
77
Versioning](https://semver.org/spec/v2.0.0.html).
88

9-
<!-- ## Unreleased -->
9+
## Unreleased
10+
11+
### Changed
12+
13+
- It is now supported _and preferred_ to use `#` as the delimiter between
14+
packages and scripts in dependency specifiers, instead of `:`. For example,
15+
instead of `"../other:build"`, it is now preferred to write
16+
`"../other#build"`.
17+
18+
The `:` character will continue to work the same indefinitely, but the Wireit
19+
documentation will exclusively show `#`, and upcoming new features for
20+
dependency specifiers will only work with the newer `#` form.
21+
22+
- **[BREAKING]** Certain special characters must now be escaped with a `\`
23+
(which in JSON is written as `\\`) if they are to be intepreted literally in a
24+
package specifier:
25+
26+
- `#`
27+
- `\`
28+
- `<`
29+
- `>`
30+
- `.` (only required at the start of the specifier)
31+
- `!` (only required at the start of the specifier)
32+
- `:` (only required when using the legacy delimiter, meaning a `#` does not
33+
appear later in the specifier)
34+
35+
For example, in the (highly unusual) situation that you depend on a script
36+
like `"../ha#shy:sl\\ashy"`, you should now write `"../ha\\#shy#sl\\\\ashy"`
37+
(note that `\` escapes are _also_ required for JSON, hence the double
38+
escapes).
1039

1140
## [0.14.11] - 2025-02-07
1241

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,14 @@ other wireit scripts, and can never be run directly.
171171
### Cross-package dependencies
172172

173173
Dependencies can refer to scripts in other npm packages by using a relative path
174-
with the syntax `<relative-path>:<script-name>`. All cross-package dependencies
174+
with the syntax `<relative-path>#<script-name>`. All cross-package dependencies
175175
should start with a `"."`. Cross-package dependencies work well for npm
176176
workspaces, as well as in other kinds of monorepos.
177177

178+
> [!NOTE] The `:` character also be used as a delimiter instead of `#` (e.g.
179+
> `"../other-package:build`), but `#` is preferred since February 2025 because
180+
> it is less ambiguous given the prevalence of `:` in npm script names.
181+
178182
```json
179183
{
180184
"scripts": {
@@ -183,7 +187,7 @@ workspaces, as well as in other kinds of monorepos.
183187
"wireit": {
184188
"build": {
185189
"command": "tsc",
186-
"dependencies": ["../other-package:build"]
190+
"dependencies": ["../other-package#build"]
187191
}
188192
}
189193
}
@@ -534,7 +538,7 @@ expected to exit by itself, set `"service": true`.
534538
"dependencies": [
535539
"build:server",
536540
{
537-
"script": "../assets:build",
541+
"script": "../assets#build",
538542
"cascade": false
539543
}
540544
]
@@ -691,7 +695,7 @@ There are two main reasons you might want to set `cascade` to `false`:
691695
"dependencies": [
692696
"build:server",
693697
{
694-
"script": "../assets:build",
698+
"script": "../assets#build",
695699
"cascade": false
696700
}
697701
],
@@ -853,7 +857,7 @@ The following properties can be set inside `wireit.<script>` objects in
853857
| ------------------------- | ---------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
854858
| `command` | `string` | `undefined` | The shell command to run. |
855859
| `dependencies` | `string[] \| object[]` | `[]` | [Scripts that must run before this one](#dependencies). |
856-
| `dependencies[i].script` | `string` | `undefined` | [The name of the script, when the dependency is an object.](#dependencies). |
860+
| `dependencies[i].script` | `string` | `undefined` | [The name of the script, when the dependency is an object](#dependencies). |
857861
| `dependencies[i].cascade` | `boolean` | `true` | [Whether this dependency always causes this script to re-execute](#execution-cascade). |
858862
| `files` | `string[]` | `undefined` | Input file [glob patterns](#glob-patterns), used to determine the [fingerprint](#fingerprint). |
859863
| `output` | `string[]` | `undefined` | Output file [glob patterns](#glob-patterns), used for [caching](#caching) and [cleaning](#cleaning-output). |

0 commit comments

Comments
 (0)