@zuke/yarn
`@zuke/yarn` — typed `YarnTasks` wrappers for the `yarn` CLI, for use in Zuke
@zuke/yarn on JSR ↗ 8 symbols
Symbols
class YarnAddSettings extends YarnSettings Settings for yarn add.
| Member | Signature | Doc |
|---|---|---|
packages | packages(...specs: string[]): this | Package specs to add (required). |
dev | dev(): this | Add to devDependencies (--dev). |
exact | exact(): this | Pin the exact version (--exact). |
class YarnDlxSettings extends YarnSettings Settings for yarn dlx (Yarn Berry's one-off package runner).
| Member | Signature | Doc |
|---|---|---|
command | command(name: string): this | The command to execute (required). |
package | package(spec: string): this | An extra package to make available (--package). |
execArgs | execArgs(...args: Array<string | number>): this | Arguments forwarded to the command. |
class YarnInstallSettings extends YarnSettings Settings for yarn install.
| Member | Signature | Doc |
|---|---|---|
immutable | immutable(): this | Fail if the lockfile would change — --immutable (Yarn Berry). |
frozenLockfile | frozenLockfile(): this | Fail if the lockfile would change — --frozen-lockfile (Yarn Classic). |
class YarnRemoveSettings extends YarnSettings Settings for yarn remove.
| Member | Signature | Doc |
|---|---|---|
packages | packages(...names: string[]): this | Package names to remove (required). |
class YarnRunSettings extends YarnSettings Settings for yarn run.
| Member | Signature | Doc |
|---|---|---|
script | script(name: string): this | The package.json script to run (required). |
scriptArgs | scriptArgs(...args: Array<string | number>): this | Arguments forwarded to the script. |
class YarnSettings extends ToolSettings Base for all yarn subcommand settings: binary is yarn from PATH.
const YarnTasks: YarnTasksApi Typed task functions for the yarn CLI.
interface YarnTasksApi The shape of YarnTasks.
| Member | Signature | Doc |
|---|---|---|
install | install(configure?: Configure<YarnInstallSettings>): Promise<CommandOutput> | Install dependencies: yarn install. |
add | add(configure?: Configure<YarnAddSettings>): Promise<CommandOutput> | Add dependencies: yarn add. |
remove | remove(configure?: Configure<YarnRemoveSettings>): Promise<CommandOutput> | Remove dependencies: yarn remove. |
run | run(configure?: Configure<YarnRunSettings>): Promise<CommandOutput> | Run a package.json script: yarn run. |
dlx | dlx(configure?: Configure<YarnDlxSettings>): Promise<CommandOutput> | Download and execute a package binary: yarn dlx (Berry). |