Enumeration
JSPackageManager
The JavaScript/Node.js package manager to use for running scripts.
enum JSPackageManagerOverview
Detected automatically from lockfiles in the project directory. The detection order (pnpm → yarn → npm) matches standard convention — more specific lockfiles take priority over the generic package-lock.json.
Topics
Enumeration Cases
Initializers
Instance Properties
var installArguments: [String]Returns the arguments to install dependencies (e.g.
["install"]).var runCommand: StringThe base command used to run scripts (
pnpm,yarn, ornpm).
Instance Methods
func scriptArguments(for: String) -> [String]Returns the arguments to run a named script (e.g.
["run", "test"]).
Type Methods
static func detect(in: String, fileManager: FileManager) -> JSPackageManagerAuto-detects the package manager from lockfiles in the given directory.
Default Implementations
Relationships
Conforms To
Swift.CaseIterableSwift.EquatableSwift.HashableSwift.RawRepresentableSwift.SendableSwift.SendableMetatype