zuke.tools.yarn
@zuke/yarn 1.2.0: @zuke/yarn — typed YarnTasks wrappers for the yarn CLI, for use in Zuke build targets (Yarn Classic v1 and Berry v2+; version-specific options are documented on each method).
zuke on PyPI ↗ 7 symbols
Symbols
class YarnAddSettings(YarnSettings) Settings for yarn add.
-
packages(*specs: str) -> SelfPackage specs to add (required).
-
dev() -> SelfAdd to devDependencies (
--dev). -
exact() -> SelfPin the exact version (
--exact).
class YarnDlxSettings(YarnSettings) Settings for yarn dlx (Yarn Berry's one-off package runner).
-
command(name: str) -> SelfThe command to execute (required).
-
package(spec: str) -> SelfAn extra package to make available (
--package). -
exec_args(*args: str | float) -> SelfArguments forwarded to the command.
class YarnInstallSettings(YarnSettings) Settings for yarn install.
-
immutable() -> SelfFail if the lockfile would change —
--immutable(Yarn Berry). -
frozen_lockfile() -> SelfFail if the lockfile would change —
--frozen-lockfile(Yarn Classic).
class YarnRemoveSettings(YarnSettings) Settings for yarn remove.
-
packages(*names: str) -> SelfPackage names to remove (required).
class YarnRunSettings(YarnSettings) Settings for yarn run.
-
script(name: str) -> SelfThe package.json script to run (required).
-
script_args(*args: str | float) -> SelfArguments forwarded to the script.
class YarnSettings(ToolSettings) Base for all yarn subcommand settings: binary is yarn from PATH.
class YarnTasks Typed task functions for the yarn CLI.
-
static async install(ctx: ServiceContext, configure: Callable[[YarnInstallSettings], YarnInstallSettings] | None=None) -> ExecResultInstall dependencies:
yarn install. -
static async add(ctx: ServiceContext, configure: Callable[[YarnAddSettings], YarnAddSettings] | None=None) -> ExecResultAdd dependencies:
yarn add. -
static async remove(ctx: ServiceContext, configure: Callable[[YarnRemoveSettings], YarnRemoveSettings] | None=None) -> ExecResultRemove dependencies:
yarn remove. -
static async run(ctx: ServiceContext, configure: Callable[[YarnRunSettings], YarnRunSettings] | None=None) -> ExecResultRun a package.json script:
yarn run. -
static async dlx(ctx: ServiceContext, configure: Callable[[YarnDlxSettings], YarnDlxSettings] | None=None) -> ExecResultDownload and execute a package binary:
yarn dlx(Berry).