@adamhl8/bask 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,28 +1,49 @@
1
- # bask
1
+ <h1 align="center"><img align="top" style="color:#36BCF7; width:38px; height:38px;" src="https://raw.githubusercontent.com/adamhl8/bask/refs/heads/main/assets/logo.svg"> bask</h1>
2
2
 
3
- A task runner for Bun where tasks are TypeScript functions.
3
+ A task runner where your tasks are TypeScript functions.
4
4
 
5
- ## Requirements
5
+ ---
6
6
 
7
- - [Bun](https://bun.sh), because tasks run on Bun and shell out with Bun's `$`
7
+ <!-- toc -->
8
8
 
9
- ## Install
9
+ - [Installation](#installation)
10
+ - [Usage](#usage)
11
+ - [Tasks](#tasks)
12
+ - [Defining tasks](#defining-tasks)
13
+ - [Task options](#task-options)
14
+ - [Task naming](#task-naming)
15
+ - [The default task](#the-default-task)
16
+ - [Task dependencies](#task-dependencies)
17
+ - [Task hooks](#task-hooks)
18
+ - [Running commands](#running-commands)
19
+ - [Shell settings](#shell-settings)
20
+ - [Extending/sharing tasks](#extendingsharing-tasks)
21
+ - [CLI Reference](#cli-reference)
10
22
 
11
- ```sh
12
- bun add --dev @adamhl8/bask
13
- ```
23
+ <!-- tocstop -->
24
+
25
+ ## Installation
26
+
27
+ bask requires [Bun](https://bun.sh) to be installed. Tasks are built on top of Bun's `$` shell.
14
28
 
15
- To run tasks with a plain `bask` instead of `bunx bask`, also install it globally:
29
+ - Your project does _not_ need to be Bun-based. You can use bask with any runtime (Node) or package manager (npm, yarn, pnpm, etc.).
16
30
 
17
31
  ```sh
18
- bun add --global @adamhl8/bask
32
+ bun add --dev @adamhl8/bask
19
33
  ```
20
34
 
21
- The global `bask` hands off to the project's copy when there is one, so each project still runs the version it pins.
35
+ > [!TIP]
36
+ > To run tasks with a plain `bask` instead of `bunx bask`, also install it globally:
37
+ >
38
+ > ```sh
39
+ > bun add --global @adamhl8/bask
40
+ > ```
41
+ >
42
+ > The global `bask` hands off to the project's copy when there is one, so each project will use its installed version of bask.
22
43
 
23
44
  ## Usage
24
45
 
25
- Export tasks from a `bask.ts` in your project root. Calling a task from another task makes it a dependency, and each task runs at most once per invocation.
46
+ Create a `bask.ts` in your project root and export some tasks:
26
47
 
27
48
  ```ts
28
49
  import { task } from "@adamhl8/bask"
@@ -32,7 +53,7 @@ export const lint = task(async ({ sh }) => {
32
53
  })
33
54
 
34
55
  export const build = task({ desc: "Lint, then build" }, async ({ sh }) => {
35
- await lint()
56
+ await lint() // calling a task makes it a dependency
36
57
  await sh`tsdown`
37
58
  })
38
59
 
@@ -43,18 +64,23 @@ export const bumpDeps = task(async ({ sh }) => {
43
64
  export default build
44
65
  ```
45
66
 
46
- Run a task with `bask` if you installed it globally, or with `bunx bask` otherwise. Use `bunx` rather than `bun`, because `bun bask` runs your `bask.ts` instead of the `bask` bin. Task names are the export names in kebab-case, so `bump-deps` runs `bumpDeps`.
67
+ Run a task by its export name:
47
68
 
48
69
  ```sh
49
70
  bask build
50
- bask bump-deps
71
+ bask bump-deps # runs `bumpDeps`
51
72
  ```
52
73
 
53
- Scripts and CI should use `bunx bask`, because they can't count on a global install.
74
+ > [!TIP]
75
+ > In scripts or CI, use `bunx bask` so you don't have to install bask globally.
54
76
 
55
- ### The default task and the task list
77
+ Run `bask` with no task name to run the default export (`build` above).
56
78
 
57
- `bask` with no task name runs the default export. If `bask.ts` has no default export, it lists your tasks instead, the same as `bask --list` (or `-l`):
79
+ ```sh
80
+ bask # runs `build`
81
+ ```
82
+
83
+ Run `bask --list` to list available tasks:
58
84
 
59
85
  ```
60
86
  Available tasks:
@@ -63,13 +89,30 @@ Available tasks:
63
89
  lint
64
90
  ```
65
91
 
66
- `export * from` never re-exports a default, so a default from a shared tasks module only applies if you re-export it by name.
92
+ ## Tasks
93
+
94
+ ### Defining tasks
95
+
96
+ `task` takes a function, and optionally an [options](#task-options) object first. The function receives `sh`, a [shell](#running-commands) for running commands, and it can be async or sync:
97
+
98
+ ```ts
99
+ export const build = task({ desc: "Build the project" }, async ({ sh }) => {
100
+ await sh`tsdown`
101
+ })
102
+
103
+ export const hello = task(() => {
104
+ console.log("hello")
105
+ })
106
+ ```
107
+
108
+ ---
67
109
 
68
110
  ### Task options
69
111
 
70
- - `desc`: shown next to the task in the list.
71
- - `hidden`: keeps the task runnable but leaves it out of the list.
72
- - `alias`: other names the task runs under, as a string or an array. Write them in kebab-case or camelCase, and either spelling runs the task.
112
+ - `desc`: Shown next to the task in the task list
113
+ - `hidden`: Keeps the task runnable but leaves it out of the task list
114
+ - `alias`: Other names the task runs under, as a string or an array
115
+ - Write them in kebab-case or camelCase, and either spelling runs the task
73
116
 
74
117
  ```ts
75
118
  export const releaseRun = task({ desc: "Run from CI", hidden: true }, async ({ sh }) => {
@@ -81,54 +124,196 @@ export const bumpDeps = task({ alias: ["up", "update-deps"] }, async ({ sh }) =>
81
124
  })
82
125
  ```
83
126
 
84
- Aliases show next to the task in the list:
127
+ Aliases show next to the task in the task list:
85
128
 
86
129
  ```
87
130
  bump-deps # [aliases: up, update-deps]
88
131
  ```
89
132
 
90
- Use `alias` rather than exporting the same task under a second name. bask can't tell which export is the original, so exporting a task twice is an error. `export default` is the exception.
133
+ ---
91
134
 
92
- ### Running commands
135
+ ### Task naming
93
136
 
94
- `sh` prints each command before running it with Bun's `$`. To run a command without printing it, use `.echo(false)`.
137
+ A task exported with a camelCase name can be run by using its equivalent kebab-case name.
95
138
 
96
139
  ```ts
97
- export const release = task(async ({ sh }) => {
98
- const branch = await sh`git branch --show-current`.echo(false).text()
99
- if (branch.trim() === "main") await sh`gh workflow run release.yml`
140
+ export const bumpDeps = task(async ({ sh }) => {
141
+ // ...
100
142
  })
101
143
  ```
102
144
 
103
- Bun's `$` pipes each command's output, so commands can't tell they're printing to a terminal and usually turn color off. When bask's output goes to a terminal, `sh` sets `FORCE_COLOR=1` on the commands whose output you see. Commands you capture with `.text()`, `.json()`, `.lines()`, `.blob()`, or `.arrayBuffer()` don't get it, and neither do `.quiet()` commands, so captured output is plain text. A `FORCE_COLOR` or `NO_COLOR` in your environment or in `.env()` takes precedence.
145
+ These will both run `bumpDeps`:
104
146
 
105
- The `stdout` and `stderr` of an awaited `sh` command hold exactly what it printed, colors included.
147
+ ```sh
148
+ bask bumpDeps
149
+ bask bump-deps
150
+ ```
151
+
152
+ ---
106
153
 
107
- When a command fails, bask stops and names the task it failed in, then exits with the command's exit code:
154
+ ### The default task
155
+
156
+ Running `bask` on its own runs the default export. If `bask.ts` has no default export, it lists your tasks instead (the same as `bask --list`).
157
+
158
+ ```ts
159
+ import { task } from "@adamhl8/bask"
108
160
 
161
+ export const build = task(async ({ sh }) => {
162
+ await sh`tsdown`
163
+ })
164
+
165
+ export default build
166
+ ```
167
+
168
+ ---
169
+
170
+ ### Task dependencies
171
+
172
+ To depend on another task, call it. Each task runs at most once per invocation, however many tasks call it. If two tasks call it at the same time, they both wait on the same run.
173
+
174
+ ```ts
175
+ export const check = task(async () => {
176
+ await Promise.all([lint(), build()])
177
+ })
178
+
179
+ export const ci = task(async () => {
180
+ await check()
181
+ await lint() // already ran, so this does nothing
182
+ })
109
183
  ```
110
- error: task 'lint' failed with exit code 2
184
+
185
+ ---
186
+
187
+ ### Task hooks
188
+
189
+ > [!IMPORTANT]
190
+ > You'll generally only need hooks when [extending tasks](#extendingsharing-tasks) from another bask file. For tasks in your own `bask.ts`, it's simpler to call them directly from the task.
191
+
192
+ On tasks, use `before` and `after` to add hooks:
193
+
194
+ ```ts
195
+ export const clean = task(async ({ sh }) => {
196
+ await sh`rm -rf dist`
197
+ })
198
+
199
+ export const build = task(async ({ sh }) => {
200
+ await sh`tsdown`
201
+ })
202
+
203
+ build.before(clean)
204
+ build.after(async ({ sh }) => {
205
+ await sh`du -sh dist`
206
+ })
111
207
  ```
112
208
 
113
- Any other error thrown in a task still shows its stack trace.
209
+ - Hooks take tasks or plain functions
210
+ - Hooks run in the order they were added
211
+ - Hooks run once per invocation, along with their task
212
+ - This includes when another task calls the task
213
+ - Each hook gets its own `sh`, separate from the task's
214
+ - Adding a hook to a task that has already started throws an error
114
215
 
115
- `sh` takes the same settings as Bun's global `$`: `sh.cwd()`, `sh.env()`, `sh.nothrow()`, and `sh.throws()`, plus `sh.echo()`. They apply to the commands the task runs after the call, and a command's own setting overrides them for that command.
216
+ The built-in `list` task, which prints the task list, takes hooks too:
217
+
218
+ ```ts
219
+ import { list } from "@adamhl8/bask"
220
+
221
+ list.after(() => {
222
+ console.log("\nRun `bask <task>` to run a task.")
223
+ })
224
+ ```
225
+
226
+ ## Running commands
227
+
228
+ Every task gets a shell, `sh`, which works like Bun's `$`. One difference is that `sh` prints each command before running it:
229
+
230
+ ```ts
231
+ export const lint = task(async ({ sh }) => {
232
+ await sh`oxlint --fix`
233
+ // prints "oxlint --fix", then runs it
234
+ })
235
+ ```
236
+
237
+ To run a command without printing it, use `.echo(false)`:
238
+
239
+ ```ts
240
+ export const release = task(async ({ sh }) => {
241
+ const branch = await sh`git branch --show-current`.echo(false).text()
242
+ if (branch.trim() === "main") await sh`gh workflow run release.yml`
243
+ })
244
+ ```
245
+
246
+ See the [Bun Shell docs](https://bun.sh/docs/runtime/shell) for the full API.
247
+
248
+ ### Shell settings
249
+
250
+ The following methods can be used on the `sh` instance _or_ on each command.
251
+
252
+ - `.cwd()` - Changes the working directory
253
+ - Relative paths resolve from the directory you ran `bask` in, not from the `sh` instance's cwd
254
+ - `.env()` - Sets the environment variables
255
+ - This replaces the whole environment, so spread `process.env` to keep it: `.env({ ...process.env, DEBUG: "1" })`
256
+ - `.nothrow()` - Doesn't throw an error when a command exits with a non-zero exit code
257
+ - `.throws()` - Sets whether a non-zero exit code throws an error
258
+ - `.echo()` - Sets whether the command is printed before it runs
259
+
260
+ Each task gets its own fresh instance of `sh`, so changes to `sh` do not affect other tasks' `sh`. Using the above methods on `sh` will apply to every command after the call in the task.
116
261
 
117
262
  ```ts
118
263
  export const buildWeb = task(async ({ sh }) => {
119
264
  sh.cwd("packages/web")
120
265
  await sh`bun install`
121
266
  await sh`bun run build`
267
+ // Override `cwd` for just this command
268
+ await sh`cp -r packages/web/dist packages/server/public`.cwd(".")
269
+ })
270
+ ```
271
+
272
+ ## Extending/sharing tasks
273
+
274
+ Tasks don't have to live in `bask.ts`. They can live in any other file or package, so many projects can use the same tasks.
275
+
276
+ ```ts
277
+ // shared-tasks.ts
278
+ import { task } from "@adamhl8/bask"
279
+
280
+ export const lint = task(async ({ sh }) => {
281
+ await sh`oxlint`
282
+ })
283
+
284
+ export const build = task(async ({ sh }) => {
285
+ await lint()
286
+ await sh`tsdown`
287
+ })
288
+ ```
289
+
290
+ To make them runnable, re-export them from your `bask.ts`:
291
+
292
+ ```ts
293
+ // bask.ts
294
+ import { task } from "@adamhl8/bask"
295
+
296
+ export * from "./shared-tasks.ts"
297
+
298
+ export const deploy = task(async ({ sh }) => {
299
+ // ...
122
300
  })
123
301
  ```
124
302
 
125
- Each task and each of its hooks gets its own `sh`, so these settings never reach another task or hook. Settings on Bun's global `$` don't apply to `sh`.
303
+ The `lint`, `build`, and `deploy` tasks will all be available.
126
304
 
127
- ### Extending tasks
305
+ > [!IMPORTANT]
306
+ > `export * from` never re-exports a default. If a shared tasks module has a default export, re-export it by name for it to apply:
307
+ >
308
+ > ```ts
309
+ > export * from "./shared-tasks.ts"
310
+ > export { default } from "./shared-tasks.ts"
311
+ > ```
128
312
 
129
- `before` and `after` add hooks that run around a task. A hook added in your `bask.ts` also runs when another task calls that task, including tasks you imported. This lets a project extend shared tasks without replacing them.
313
+ If a project needs to do something before or after a shared task, use [hooks](#task-hooks). A hook you add to an imported task also runs when the shared tasks call it. For example:
130
314
 
131
315
  ```ts
316
+ // bask.ts
132
317
  import { task } from "@adamhl8/bask"
133
318
 
134
319
  import { build, lint } from "./shared-tasks.ts"
@@ -139,20 +324,33 @@ export const astroSync = task(async ({ sh }) => {
139
324
  await sh`bun astro sync`
140
325
  })
141
326
 
142
- lint.before(astroSync)
143
- build.after(async ({ sh }) => {
327
+ export const astroBuild = task(async ({ sh }) => {
144
328
  await sh`bun astro build`
145
329
  })
330
+
331
+ lint.before(astroSync)
332
+ build.after(astroBuild)
146
333
  ```
147
334
 
148
- Hooks take tasks or plain functions, run in the order they were added, and run once per invocation along with their task. Adding a hook to a task that has already started throws.
335
+ ```sh
336
+ bask build
337
+ # runs astroSync -> lint -> build -> astroBuild
338
+ ```
149
339
 
150
- The built-in `list` task, which prints the task list, takes hooks too:
340
+ This way, each project extends the shared tasks without copying or replacing them.
151
341
 
152
- ```ts
153
- import { list } from "@adamhl8/bask"
342
+ ## CLI Reference
154
343
 
155
- list.after(() => {
156
- console.log("\nRun `bask <task>` to run a task.")
157
- })
158
- ```
344
+ `bask [options] [task]`
345
+
346
+ - `task`: The task to run, by its kebab-case name, camelCase name, or an alias (default: the default export)
347
+ - `-l`, `--list`: List the available tasks
348
+
349
+ If the task doesn't exist, bask prints an error followed by the task list.
350
+
351
+ **Exit codes:**
352
+
353
+ - `0`: The task succeeded
354
+ - `1`: There's no `bask.ts`, it has a problem (e.g. a task exported twice), or the task doesn't exist
355
+ - `2`: The arguments are invalid
356
+ - Otherwise, the exit code of the command that failed
package/dist/cli.js CHANGED
@@ -1,14 +1,12 @@
1
1
  #!/usr/bin/env bun
2
+ import { printError } from "./utils.js";
2
3
  import { getFailedTask } from "./task.js";
3
4
  import { BaskFileError, formatTaskList, getTaskIndex, list, setBaskModule } from "./registry.js";
4
- import { parseArgs, styleText } from "node:util";
5
- import bun from "bun";
6
5
  import path from "node:path";
6
+ import bun from "bun";
7
+ import { parseArgs } from "node:util";
7
8
  //#region src/cli.ts
8
9
  const isModule = (value) => typeof value === "object" && Boolean(value);
9
- const printError = (message) => {
10
- process.stderr.write(`${styleText(["bold", "red"], "error:", { stream: process.stderr })} ${message}\n`);
11
- };
12
10
  const isParseArgsError = (error) => error instanceof TypeError && "code" in error && typeof error.code === "string" && error.code.startsWith("ERR_PARSE_ARGS_");
13
11
  /** Finds the project's own bask CLI, so a global `bask` runs the version the project pins. */
14
12
  const resolveLocalCli = () => {
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env bun\n\nimport path from \"node:path\"\nimport { parseArgs, styleText } from \"node:util\"\n\nimport bun from \"bun\"\n\nimport { BaskFileError, formatTaskList, getTaskIndex, list, setBaskModule } from \"#registry.ts\"\nimport { getFailedTask } from \"#task.ts\"\nimport type { Task } from \"#task.ts\"\n\nconst isModule = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && Boolean(value)\n\n// Write to `process.stderr` directly because Bun colors all `console.error` output red in a terminal.\nconst printError = (message: string) => {\n process.stderr.write(`${styleText([\"bold\", \"red\"], \"error:\", { stream: process.stderr })} ${message}\\n`)\n}\n\nconst isParseArgsError = (error: unknown): error is TypeError & { code: string } =>\n error instanceof TypeError &&\n \"code\" in error &&\n typeof error.code === \"string\" &&\n error.code.startsWith(\"ERR_PARSE_ARGS_\")\n\n/** Finds the project's own bask CLI, so a global `bask` runs the version the project pins. */\nconst resolveLocalCli = () => {\n try {\n return bun.resolveSync(\"@adamhl8/bask/cli\", process.cwd())\n } catch {\n return\n }\n}\n\nconst parseCliArgs = () => {\n try {\n return parseArgs({ options: { list: { type: \"boolean\", short: \"l\" } }, allowPositionals: true })\n } catch (error) {\n if (!isParseArgsError(error)) throw error\n printError(error.message)\n process.exitCode = 2\n return\n }\n}\n\n/** Runs a task and reports a failed command in one line, naming the innermost task that failed. */\nconst runTask = async (taskToRun: Task, taskName: string) => {\n try {\n await taskToRun()\n } catch (error) {\n // Rethrow anything else, because a bug in a task file needs its stack trace.\n if (!(error instanceof bun.$.ShellError)) throw error\n\n const failedTask = getFailedTask(error)\n const failedEntry = getTaskIndex()\n .values()\n .find((entry) => entry.task === failedTask)\n // Fall back to the task you ran, because a task that isn't exported has no name.\n const failedName = failedEntry?.name ?? taskName\n printError(`task '${failedName}' failed with exit code ${error.exitCode}`)\n process.exitCode = error.exitCode\n }\n}\n\nconst main = async () => {\n // Import the local CLI and stop, because it runs its own `main` when loaded.\n // The local copy resolves to its own path, so it skips this and runs normally.\n const localCli = resolveLocalCli()\n if (localCli && localCli !== import.meta.path) {\n await import(localCli)\n return\n }\n\n const args = parseCliArgs()\n if (!args) return\n const { values, positionals } = args\n\n const baskPath = path.resolve(\"bask.ts\")\n if (!(await bun.file(baskPath).exists())) {\n printError(`no bask.ts in ${process.cwd()}`)\n process.exitCode = 1\n return\n }\n\n const baskModule: unknown = await import(baskPath)\n if (!isModule(baskModule)) throw new Error(\"failed to import bask.ts\")\n try {\n setBaskModule(baskModule)\n } catch (error) {\n if (!(error instanceof BaskFileError)) throw error\n printError(error.message)\n process.exitCode = 1\n return\n }\n\n const [taskName] = positionals\n\n if (values.list || (taskName === undefined && !getTaskIndex().has(\"default\"))) {\n await runTask(list, \"list\")\n return\n }\n\n const selectedEntry = getTaskIndex().get(taskName ?? \"default\")\n\n if (!selectedEntry) {\n printError(`unknown task '${taskName ?? \"default\"}'`)\n process.stderr.write(`\\n${formatTaskList()}\\n`)\n process.exitCode = 1\n return\n }\n\n await runTask(selectedEntry.task, selectedEntry.name)\n}\n\nawait main()\n"],"mappings":";;;;;;;AAWA,MAAM,YAAY,UAAqD,OAAO,UAAU,YAAY,QAAQ,KAAK;AAGjH,MAAM,cAAc,YAAoB;CACtC,QAAQ,OAAO,MAAM,GAAG,UAAU,CAAC,QAAQ,KAAK,GAAG,UAAU,EAAE,QAAQ,QAAQ,OAAO,CAAC,EAAE,GAAG,QAAQ,GAAG;AACzG;AAEA,MAAM,oBAAoB,UACxB,iBAAiB,aACjB,UAAU,SACV,OAAO,MAAM,SAAS,YACtB,MAAM,KAAK,WAAW,iBAAiB;;AAGzC,MAAM,wBAAwB;CAC5B,IAAI;EACF,OAAO,IAAI,YAAY,qBAAqB,QAAQ,IAAI,CAAC;CAC3D,QAAQ;EACN;CACF;AACF;AAEA,MAAM,qBAAqB;CACzB,IAAI;EACF,OAAO,UAAU;GAAE,SAAS,EAAE,MAAM;IAAE,MAAM;IAAW,OAAO;GAAI,EAAE;GAAG,kBAAkB;EAAK,CAAC;CACjG,SAAS,OAAO;EACd,IAAI,CAAC,iBAAiB,KAAK,GAAG,MAAM;EACpC,WAAW,MAAM,OAAO;EACxB,QAAQ,WAAW;EACnB;CACF;AACF;;AAGA,MAAM,UAAU,OAAO,WAAiB,aAAqB;CAC3D,IAAI;EACF,MAAM,UAAU;CAClB,SAAS,OAAO;EAEd,IAAI,EAAE,iBAAiB,IAAI,EAAE,aAAa,MAAM;EAEhD,MAAM,aAAa,cAAc,KAAK;EAKtC,MAAM,aAJc,aAAa,CAAC,CAC/B,OAAO,CAAC,CACR,MAAM,UAAU,MAAM,SAAS,UAEL,CAAC,EAAE,QAAQ;EACxC,WAAW,SAAS,WAAW,0BAA0B,MAAM,UAAU;EACzE,QAAQ,WAAW,MAAM;CAC3B;AACF;AAEA,MAAM,OAAO,YAAY;CAGvB,MAAM,WAAW,gBAAgB;CACjC,IAAI,YAAY,aAAa,YAAY,MAAM;EAC7C,MAAM,OAAO;EACb;CACF;CAEA,MAAM,OAAO,aAAa;CAC1B,IAAI,CAAC,MAAM;CACX,MAAM,EAAE,QAAQ,gBAAgB;CAEhC,MAAM,WAAW,KAAK,QAAQ,SAAS;CACvC,IAAI,CAAE,MAAM,IAAI,KAAK,QAAQ,CAAC,CAAC,OAAO,GAAI;EACxC,WAAW,iBAAiB,QAAQ,IAAI,GAAG;EAC3C,QAAQ,WAAW;EACnB;CACF;CAEA,MAAM,aAAsB,MAAM,OAAO;CACzC,IAAI,CAAC,SAAS,UAAU,GAAG,MAAM,IAAI,MAAM,0BAA0B;CACrE,IAAI;EACF,cAAc,UAAU;CAC1B,SAAS,OAAO;EACd,IAAI,EAAE,iBAAiB,gBAAgB,MAAM;EAC7C,WAAW,MAAM,OAAO;EACxB,QAAQ,WAAW;EACnB;CACF;CAEA,MAAM,CAAC,YAAY;CAEnB,IAAI,OAAO,QAAS,aAAa,KAAA,KAAa,CAAC,aAAa,CAAC,CAAC,IAAI,SAAS,GAAI;EAC7E,MAAM,QAAQ,MAAM,MAAM;EAC1B;CACF;CAEA,MAAM,gBAAgB,aAAa,CAAC,CAAC,IAAI,YAAY,SAAS;CAE9D,IAAI,CAAC,eAAe;EAClB,WAAW,iBAAiB,YAAY,UAAU,EAAE;EACpD,QAAQ,OAAO,MAAM,KAAK,eAAe,EAAE,GAAG;EAC9C,QAAQ,WAAW;EACnB;CACF;CAEA,MAAM,QAAQ,cAAc,MAAM,cAAc,IAAI;AACtD;AAEA,MAAM,KAAK"}
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env bun\n\nimport path from \"node:path\"\nimport { parseArgs } from \"node:util\"\n\nimport bun from \"bun\"\n\nimport { BaskFileError, formatTaskList, getTaskIndex, list, setBaskModule } from \"#registry.ts\"\nimport { getFailedTask } from \"#task.ts\"\nimport type { Task } from \"#task.ts\"\nimport { printError } from \"#utils.ts\"\n\nconst isModule = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && Boolean(value)\n\nconst isParseArgsError = (error: unknown): error is TypeError & { code: string } =>\n error instanceof TypeError &&\n \"code\" in error &&\n typeof error.code === \"string\" &&\n error.code.startsWith(\"ERR_PARSE_ARGS_\")\n\n/** Finds the project's own bask CLI, so a global `bask` runs the version the project pins. */\nconst resolveLocalCli = () => {\n try {\n return bun.resolveSync(\"@adamhl8/bask/cli\", process.cwd())\n } catch {\n return\n }\n}\n\nconst parseCliArgs = () => {\n try {\n return parseArgs({ options: { list: { type: \"boolean\", short: \"l\" } }, allowPositionals: true })\n } catch (error) {\n if (!isParseArgsError(error)) throw error\n printError(error.message)\n process.exitCode = 2\n return\n }\n}\n\n/** Runs a task and reports a failed command in one line, naming the innermost task that failed. */\nconst runTask = async (taskToRun: Task, taskName: string) => {\n try {\n await taskToRun()\n } catch (error) {\n // Rethrow anything else, because a bug in a task file needs its stack trace.\n if (!(error instanceof bun.$.ShellError)) throw error\n\n const failedTask = getFailedTask(error)\n const failedEntry = getTaskIndex()\n .values()\n .find((entry) => entry.task === failedTask)\n // Fall back to the task you ran, because a task that isn't exported has no name.\n const failedName = failedEntry?.name ?? taskName\n printError(`task '${failedName}' failed with exit code ${error.exitCode}`)\n process.exitCode = error.exitCode\n }\n}\n\nconst main = async () => {\n // Import the local CLI and stop, because it runs its own `main` when loaded.\n // The local copy resolves to its own path, so it skips this and runs normally.\n const localCli = resolveLocalCli()\n if (localCli && localCli !== import.meta.path) {\n await import(localCli)\n return\n }\n\n const args = parseCliArgs()\n if (!args) return\n const { values, positionals } = args\n\n const baskPath = path.resolve(\"bask.ts\")\n if (!(await bun.file(baskPath).exists())) {\n printError(`no bask.ts in ${process.cwd()}`)\n process.exitCode = 1\n return\n }\n\n const baskModule: unknown = await import(baskPath)\n if (!isModule(baskModule)) throw new Error(\"failed to import bask.ts\")\n try {\n setBaskModule(baskModule)\n } catch (error) {\n if (!(error instanceof BaskFileError)) throw error\n printError(error.message)\n process.exitCode = 1\n return\n }\n\n const [taskName] = positionals\n\n if (values.list || (taskName === undefined && !getTaskIndex().has(\"default\"))) {\n await runTask(list, \"list\")\n return\n }\n\n const selectedEntry = getTaskIndex().get(taskName ?? \"default\")\n\n if (!selectedEntry) {\n printError(`unknown task '${taskName ?? \"default\"}'`)\n process.stderr.write(`\\n${formatTaskList()}\\n`)\n process.exitCode = 1\n return\n }\n\n await runTask(selectedEntry.task, selectedEntry.name)\n}\n\nawait main()\n"],"mappings":";;;;;;;;AAYA,MAAM,YAAY,UAAqD,OAAO,UAAU,YAAY,QAAQ,KAAK;AAEjH,MAAM,oBAAoB,UACxB,iBAAiB,aACjB,UAAU,SACV,OAAO,MAAM,SAAS,YACtB,MAAM,KAAK,WAAW,iBAAiB;;AAGzC,MAAM,wBAAwB;CAC5B,IAAI;EACF,OAAO,IAAI,YAAY,qBAAqB,QAAQ,IAAI,CAAC;CAC3D,QAAQ;EACN;CACF;AACF;AAEA,MAAM,qBAAqB;CACzB,IAAI;EACF,OAAO,UAAU;GAAE,SAAS,EAAE,MAAM;IAAE,MAAM;IAAW,OAAO;GAAI,EAAE;GAAG,kBAAkB;EAAK,CAAC;CACjG,SAAS,OAAO;EACd,IAAI,CAAC,iBAAiB,KAAK,GAAG,MAAM;EACpC,WAAW,MAAM,OAAO;EACxB,QAAQ,WAAW;EACnB;CACF;AACF;;AAGA,MAAM,UAAU,OAAO,WAAiB,aAAqB;CAC3D,IAAI;EACF,MAAM,UAAU;CAClB,SAAS,OAAO;EAEd,IAAI,EAAE,iBAAiB,IAAI,EAAE,aAAa,MAAM;EAEhD,MAAM,aAAa,cAAc,KAAK;EAKtC,MAAM,aAJc,aAAa,CAAC,CAC/B,OAAO,CAAC,CACR,MAAM,UAAU,MAAM,SAAS,UAEL,CAAC,EAAE,QAAQ;EACxC,WAAW,SAAS,WAAW,0BAA0B,MAAM,UAAU;EACzE,QAAQ,WAAW,MAAM;CAC3B;AACF;AAEA,MAAM,OAAO,YAAY;CAGvB,MAAM,WAAW,gBAAgB;CACjC,IAAI,YAAY,aAAa,YAAY,MAAM;EAC7C,MAAM,OAAO;EACb;CACF;CAEA,MAAM,OAAO,aAAa;CAC1B,IAAI,CAAC,MAAM;CACX,MAAM,EAAE,QAAQ,gBAAgB;CAEhC,MAAM,WAAW,KAAK,QAAQ,SAAS;CACvC,IAAI,CAAE,MAAM,IAAI,KAAK,QAAQ,CAAC,CAAC,OAAO,GAAI;EACxC,WAAW,iBAAiB,QAAQ,IAAI,GAAG;EAC3C,QAAQ,WAAW;EACnB;CACF;CAEA,MAAM,aAAsB,MAAM,OAAO;CACzC,IAAI,CAAC,SAAS,UAAU,GAAG,MAAM,IAAI,MAAM,0BAA0B;CACrE,IAAI;EACF,cAAc,UAAU;CAC1B,SAAS,OAAO;EACd,IAAI,EAAE,iBAAiB,gBAAgB,MAAM;EAC7C,WAAW,MAAM,OAAO;EACxB,QAAQ,WAAW;EACnB;CACF;CAEA,MAAM,CAAC,YAAY;CAEnB,IAAI,OAAO,QAAS,aAAa,KAAA,KAAa,CAAC,aAAa,CAAC,CAAC,IAAI,SAAS,GAAI;EAC7E,MAAM,QAAQ,MAAM,MAAM;EAC1B;CACF;CAEA,MAAM,gBAAgB,aAAa,CAAC,CAAC,IAAI,YAAY,SAAS;CAE9D,IAAI,CAAC,eAAe;EAClB,WAAW,iBAAiB,YAAY,UAAU,EAAE;EACpD,QAAQ,OAAO,MAAM,KAAK,eAAe,EAAE,GAAG;EAC9C,QAAQ,WAAW;EACnB;CACF;CAEA,MAAM,QAAQ,cAAc,MAAM,cAAc,IAAI;AACtD;AAEA,MAAM,KAAK"}
package/dist/index.js CHANGED
@@ -1,3 +1,15 @@
1
+ import { printError } from "./utils.js";
1
2
  import { isTask, task } from "./task.js";
2
3
  import { list } from "./registry.js";
4
+ import path from "node:path";
5
+ import bun from "bun";
6
+ //#region src/index.ts
7
+ if (path.basename(bun.main) === "bask.ts") {
8
+ const command = ["bask", ...process.argv.slice(2)].join(" ");
9
+ printError(`bask.ts can't be run directly. Use \`bunx\` instead of \`bun\`.\nEither run \`bunx ${command}\` or run \`${command}\` directly (if installed globally).`);
10
+ process.exit(1);
11
+ }
12
+ //#endregion
3
13
  export { isTask, list, task };
14
+
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import path from \"node:path\"\n\nimport bun from \"bun\"\n\nimport { printError } from \"#utils.ts\"\n\n// Stop a `bun bask` run because Bun runs bask.ts itself instead of the bask CLI.\nif (path.basename(bun.main) === \"bask.ts\") {\n const command = [\"bask\", ...process.argv.slice(2)].join(\" \")\n printError(\n `bask.ts can't be run directly. Use \\`bunx\\` instead of \\`bun\\`.\\nEither run \\`bunx ${command}\\` or run \\`${command}\\` directly (if installed globally).`,\n )\n process.exit(1)\n}\n\nexport { list } from \"#registry.ts\"\nexport { isTask, task } from \"#task.ts\"\nexport type { Task } from \"#task.ts\"\n"],"mappings":";;;;;;AAOA,IAAI,KAAK,SAAS,IAAI,IAAI,MAAM,WAAW;CACzC,MAAM,UAAU,CAAC,QAAQ,GAAG,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG;CAC3D,WACE,sFAAsF,QAAQ,cAAc,QAAQ,qCACtH;CACA,QAAQ,KAAK,CAAC;AAChB"}
package/dist/shell.js CHANGED
@@ -1,5 +1,5 @@
1
- import { styleText } from "node:util";
2
1
  import bun from "bun";
2
+ import { styleText } from "node:util";
3
3
  //#region src/shell.ts
4
4
  /** Formats an interpolated value the way Bun's shell escapes it. */
5
5
  const formatExpression = (expression) => {
package/dist/task.js CHANGED
@@ -11,8 +11,9 @@ function task(optionsOrFn, maybeFn) {
11
11
  const beforeFns = [];
12
12
  const afterFns = [];
13
13
  let runPromise;
14
+ let hasStarted = false;
14
15
  const assertNotStarted = () => {
15
- if (runPromise) throw new Error("Can't add a hook to a task that has already started");
16
+ if (hasStarted) throw new Error("Can't add a hook to a task that has already started");
16
17
  };
17
18
  const before = (...fns) => {
18
19
  assertNotStarted();
@@ -24,6 +25,7 @@ function task(optionsOrFn, maybeFn) {
24
25
  };
25
26
  const runWithShell = async (taskFn) => taskFn({ sh: createShell() });
26
27
  const runAll = async () => {
28
+ hasStarted = true;
27
29
  for (const beforeFn of beforeFns) await runWithShell(beforeFn);
28
30
  await runWithShell(fn);
29
31
  for (const afterFn of afterFns) await runWithShell(afterFn);
package/dist/task.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"task.js","names":[],"sources":["../src/task.ts"],"sourcesContent":["import { createShell } from \"#shell.ts\"\nimport type { Shell } from \"#shell.ts\"\n\ntype AsyncOrSyncReturn = Promise<void> | void\n\ninterface TaskOptions {\n desc?: string\n /** Keeps the task runnable but leaves it out of the task list. */\n hidden?: boolean\n /** Additional names to run the task. */\n alias?: string | string[]\n}\n\ninterface TaskContext {\n sh: Shell\n}\n\ntype TaskFn = (ctx: TaskContext) => AsyncOrSyncReturn\n\nexport interface Task {\n (): Promise<void>\n options: TaskOptions\n before: (...fns: TaskFn[]) => void\n after: (...fns: TaskFn[]) => void\n}\n\nconst tasks = new WeakSet<object>()\n\nexport const isTask = (value: unknown): value is Task => typeof value === \"function\" && tasks.has(value)\n\nconst failedTasks = new WeakMap<Error, object>()\n\n/** Returns the innermost task that the error failed, so the CLI can name it. */\nexport const getFailedTask = (error: Error) => failedTasks.get(error)\n\n/** Registers a task that runs at most once per bask invocation, however many times it's called. */\nexport function task(fn: TaskFn): Task\nexport function task(options: TaskOptions, fn: TaskFn): Task\nexport function task(optionsOrFn: TaskOptions | TaskFn, maybeFn?: TaskFn): Task {\n const [options, fn] = typeof optionsOrFn === \"function\" ? [{}, optionsOrFn] : [optionsOrFn, maybeFn]\n if (!fn) throw new Error(\"task() needs a callback\")\n\n const beforeFns: TaskFn[] = []\n const afterFns: TaskFn[] = []\n\n // Store the first call's promise so overlapping and later calls share it instead of rerunning the task.\n let runPromise: Promise<void> | undefined\n\n const assertNotStarted = () => {\n if (runPromise) throw new Error(\"Can't add a hook to a task that has already started\")\n }\n\n const before = (...fns: TaskFn[]) => {\n assertNotStarted()\n beforeFns.push(...fns)\n }\n\n const after = (...fns: TaskFn[]) => {\n assertNotStarted()\n afterFns.push(...fns)\n }\n\n // Give each hook and the task its own shell so settings like `sh.cwd()` stay inside the function that made them.\n const runWithShell = async (taskFn: TaskFn) => taskFn({ sh: createShell() })\n\n const runAll = async () => {\n // oxlint-disable-next-line no-await-in-loop - hooks run in order\n for (const beforeFn of beforeFns) await runWithShell(beforeFn)\n await runWithShell(fn)\n // oxlint-disable-next-line no-await-in-loop - hooks run in order\n for (const afterFn of afterFns) await runWithShell(afterFn)\n }\n\n // Assign `runPromise` before any await so a concurrent call can't start a second run.\n const run = async () => {\n runPromise ??= runAll()\n try {\n await runPromise\n } catch (error) {\n // Record `run` only if no task has yet, because the innermost task's catch runs first.\n // `run` is the same object as the returned task.\n if (error instanceof Error && !failedTasks.has(error)) failedTasks.set(error, run)\n throw error\n }\n }\n\n const newTask: Task = Object.assign(run, { options, before, after })\n tasks.add(newTask)\n return newTask\n}\n"],"mappings":";;AA0BA,MAAM,wBAAQ,IAAI,QAAgB;AAElC,MAAa,UAAU,UAAkC,OAAO,UAAU,cAAc,MAAM,IAAI,KAAK;AAEvG,MAAM,8BAAc,IAAI,QAAuB;;AAG/C,MAAa,iBAAiB,UAAiB,YAAY,IAAI,KAAK;AAKpE,SAAgB,KAAK,aAAmC,SAAwB;CAC9E,MAAM,CAAC,SAAS,MAAM,OAAO,gBAAgB,aAAa,CAAC,CAAC,GAAG,WAAW,IAAI,CAAC,aAAa,OAAO;CACnG,IAAI,CAAC,IAAI,MAAM,IAAI,MAAM,yBAAyB;CAElD,MAAM,YAAsB,CAAC;CAC7B,MAAM,WAAqB,CAAC;CAG5B,IAAI;CAEJ,MAAM,yBAAyB;EAC7B,IAAI,YAAY,MAAM,IAAI,MAAM,qDAAqD;CACvF;CAEA,MAAM,UAAU,GAAG,QAAkB;EACnC,iBAAiB;EACjB,UAAU,KAAK,GAAG,GAAG;CACvB;CAEA,MAAM,SAAS,GAAG,QAAkB;EAClC,iBAAiB;EACjB,SAAS,KAAK,GAAG,GAAG;CACtB;CAGA,MAAM,eAAe,OAAO,WAAmB,OAAO,EAAE,IAAI,YAAY,EAAE,CAAC;CAE3E,MAAM,SAAS,YAAY;EAEzB,KAAK,MAAM,YAAY,WAAW,MAAM,aAAa,QAAQ;EAC7D,MAAM,aAAa,EAAE;EAErB,KAAK,MAAM,WAAW,UAAU,MAAM,aAAa,OAAO;CAC5D;CAGA,MAAM,MAAM,YAAY;EACtB,eAAe,OAAO;EACtB,IAAI;GACF,MAAM;EACR,SAAS,OAAO;GAGd,IAAI,iBAAiB,SAAS,CAAC,YAAY,IAAI,KAAK,GAAG,YAAY,IAAI,OAAO,GAAG;GACjF,MAAM;EACR;CACF;CAEA,MAAM,UAAgB,OAAO,OAAO,KAAK;EAAE;EAAS;EAAQ;CAAM,CAAC;CACnE,MAAM,IAAI,OAAO;CACjB,OAAO;AACT"}
1
+ {"version":3,"file":"task.js","names":[],"sources":["../src/task.ts"],"sourcesContent":["import { createShell } from \"#shell.ts\"\nimport type { Shell } from \"#shell.ts\"\n\ntype AsyncOrSyncReturn = Promise<void> | void\n\ninterface TaskOptions {\n desc?: string\n /** Keeps the task runnable but leaves it out of the task list. */\n hidden?: boolean\n /** Additional names to run the task. */\n alias?: string | string[]\n}\n\ninterface TaskContext {\n sh: Shell\n}\n\ntype TaskFn = (ctx: TaskContext) => AsyncOrSyncReturn\n\nexport interface Task {\n (): Promise<void>\n options: TaskOptions\n before: (...fns: TaskFn[]) => void\n after: (...fns: TaskFn[]) => void\n}\n\nconst tasks = new WeakSet<object>()\n\nexport const isTask = (value: unknown): value is Task => typeof value === \"function\" && tasks.has(value)\n\nconst failedTasks = new WeakMap<Error, object>()\n\n/** Returns the innermost task that the error failed, so the CLI can name it. */\nexport const getFailedTask = (error: Error) => failedTasks.get(error)\n\n/** Registers a task that runs at most once per bask invocation, however many times it's called. */\nexport function task(fn: TaskFn): Task\nexport function task(options: TaskOptions, fn: TaskFn): Task\nexport function task(optionsOrFn: TaskOptions | TaskFn, maybeFn?: TaskFn): Task {\n const [options, fn] = typeof optionsOrFn === \"function\" ? [{}, optionsOrFn] : [optionsOrFn, maybeFn]\n if (!fn) throw new Error(\"task() needs a callback\")\n\n const beforeFns: TaskFn[] = []\n const afterFns: TaskFn[] = []\n\n // Store the first call's promise so overlapping and later calls share it instead of rerunning the task.\n let runPromise: Promise<void> | undefined\n // Track the start separately because `runAll` calls the task before `runPromise` is assigned.\n let hasStarted = false\n\n const assertNotStarted = () => {\n if (hasStarted) throw new Error(\"Can't add a hook to a task that has already started\")\n }\n\n const before = (...fns: TaskFn[]) => {\n assertNotStarted()\n beforeFns.push(...fns)\n }\n\n const after = (...fns: TaskFn[]) => {\n assertNotStarted()\n afterFns.push(...fns)\n }\n\n // Give each hook and the task its own shell so settings like `sh.cwd()` stay inside the function that made them.\n const runWithShell = async (taskFn: TaskFn) => taskFn({ sh: createShell() })\n\n const runAll = async () => {\n hasStarted = true\n // oxlint-disable-next-line no-await-in-loop - hooks run in order\n for (const beforeFn of beforeFns) await runWithShell(beforeFn)\n await runWithShell(fn)\n // oxlint-disable-next-line no-await-in-loop - hooks run in order\n for (const afterFn of afterFns) await runWithShell(afterFn)\n }\n\n // Assign `runPromise` before any await so a concurrent call can't start a second run.\n const run = async () => {\n runPromise ??= runAll()\n try {\n await runPromise\n } catch (error) {\n // Record `run` only if no task has yet, because the innermost task's catch runs first.\n // `run` is the same object as the returned task.\n if (error instanceof Error && !failedTasks.has(error)) failedTasks.set(error, run)\n throw error\n }\n }\n\n const newTask: Task = Object.assign(run, { options, before, after })\n tasks.add(newTask)\n return newTask\n}\n"],"mappings":";;AA0BA,MAAM,wBAAQ,IAAI,QAAgB;AAElC,MAAa,UAAU,UAAkC,OAAO,UAAU,cAAc,MAAM,IAAI,KAAK;AAEvG,MAAM,8BAAc,IAAI,QAAuB;;AAG/C,MAAa,iBAAiB,UAAiB,YAAY,IAAI,KAAK;AAKpE,SAAgB,KAAK,aAAmC,SAAwB;CAC9E,MAAM,CAAC,SAAS,MAAM,OAAO,gBAAgB,aAAa,CAAC,CAAC,GAAG,WAAW,IAAI,CAAC,aAAa,OAAO;CACnG,IAAI,CAAC,IAAI,MAAM,IAAI,MAAM,yBAAyB;CAElD,MAAM,YAAsB,CAAC;CAC7B,MAAM,WAAqB,CAAC;CAG5B,IAAI;CAEJ,IAAI,aAAa;CAEjB,MAAM,yBAAyB;EAC7B,IAAI,YAAY,MAAM,IAAI,MAAM,qDAAqD;CACvF;CAEA,MAAM,UAAU,GAAG,QAAkB;EACnC,iBAAiB;EACjB,UAAU,KAAK,GAAG,GAAG;CACvB;CAEA,MAAM,SAAS,GAAG,QAAkB;EAClC,iBAAiB;EACjB,SAAS,KAAK,GAAG,GAAG;CACtB;CAGA,MAAM,eAAe,OAAO,WAAmB,OAAO,EAAE,IAAI,YAAY,EAAE,CAAC;CAE3E,MAAM,SAAS,YAAY;EACzB,aAAa;EAEb,KAAK,MAAM,YAAY,WAAW,MAAM,aAAa,QAAQ;EAC7D,MAAM,aAAa,EAAE;EAErB,KAAK,MAAM,WAAW,UAAU,MAAM,aAAa,OAAO;CAC5D;CAGA,MAAM,MAAM,YAAY;EACtB,eAAe,OAAO;EACtB,IAAI;GACF,MAAM;EACR,SAAS,OAAO;GAGd,IAAI,iBAAiB,SAAS,CAAC,YAAY,IAAI,KAAK,GAAG,YAAY,IAAI,OAAO,GAAG;GACjF,MAAM;EACR;CACF;CAEA,MAAM,UAAgB,OAAO,OAAO,KAAK;EAAE;EAAS;EAAQ;CAAM,CAAC;CACnE,MAAM,IAAI,OAAO;CACjB,OAAO;AACT"}
package/dist/utils.js ADDED
@@ -0,0 +1,9 @@
1
+ import { styleText } from "node:util";
2
+ //#region src/utils.ts
3
+ const printError = (message) => {
4
+ process.stderr.write(`${styleText(["bold", "red"], "error:", { stream: process.stderr })} ${message}\n`);
5
+ };
6
+ //#endregion
7
+ export { printError };
8
+
9
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../src/utils.ts"],"sourcesContent":["import { styleText } from \"node:util\"\n\n// Write to `process.stderr` directly because Bun colors all `console.error` output red in a terminal.\nexport const printError = (message: string) => {\n process.stderr.write(`${styleText([\"bold\", \"red\"], \"error:\", { stream: process.stderr })} ${message}\\n`)\n}\n"],"mappings":";;AAGA,MAAa,cAAc,YAAoB;CAC7C,QAAQ,OAAO,MAAM,GAAG,UAAU,CAAC,QAAQ,KAAK,GAAG,UAAU,EAAE,QAAQ,QAAQ,OAAO,CAAC,EAAE,GAAG,QAAQ,GAAG;AACzG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/bask",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Write your tasks in TypeScript",
5
5
  "keywords": [
6
6
  "build-tool",
@@ -52,12 +52,13 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@adamhl8/bask": "file:.",
55
- "@adamhl8/configs": "^3.0.1",
55
+ "@adamhl8/configs": "^3.0.3",
56
56
  "@arethetypeswrong/core": "^0.18.5",
57
- "@commitlint/cli": "^21.2.3",
58
- "@commitlint/config-conventional": "^21.2.3",
57
+ "@commitlint/cli": "^21.2.4",
58
+ "@commitlint/config-conventional": "^21.2.4",
59
59
  "@types/bun": "^1.4.3",
60
- "knip": "^6.41.0",
60
+ "execa": "^10.2.0",
61
+ "knip": "^6.42.0",
61
62
  "markdown-toc": "^1.2.0",
62
63
  "oxfmt": "^0.73.0",
63
64
  "oxlint": "^1.88.0",