TypeScriptPackageManager enum
The JavaScript/TypeScript package manager in use by a project.
Values
- pnpm → const TypeScriptPackageManager
-
pnpm — detected by
pnpm-lock.yaml.const TypeScriptPackageManager('pnpm') - yarn → const TypeScriptPackageManager
-
yarn — detected by
yarn.lock.const TypeScriptPackageManager('yarn') - npm → const TypeScriptPackageManager
-
npm — the default when no lockfile matches.
const TypeScriptPackageManager('npm')
Properties
- executable → String
-
The command-line executable that drives this package manager.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- lockFile → String
-
The lock file this package manager writes.
no setter
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter -
publishCommand
→ ({List<
String> args, String executable}) -
Builds the argv to publish the package with this package manager.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
execCommand(
String tool, List< String> args) → ({List<String> args, String executable}) -
Builds the argv to invoke a locally-installed tool (e.g.
eslint,tsc) with the givenargs. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pinCommand(
{required String package, required String version}) → ({List< String> args, String executable}) -
Builds the argv to hold
packageatversion. -
runCommand(
String script) → ({List< String> args, String executable}) -
Builds the argv to run a
package.jsonscript (e.g.test,lint,format:check) namedscript. -
toString(
) → String -
A string representation of this object.
inherited
-
updateCommand(
{required bool latest}) → ({List< String> args, String executable}) - Builds the argv to upgrade the project's dependencies.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
TypeScriptPackageManager> - A constant List of the values in this enum, in order of their declaration.