Skip to content

relizy / parseWorkspaceSpecifier

Function: parseWorkspaceSpecifier() ​

parseWorkspaceSpecifier(dependencyName, specifier): { target: string; } | null

Defined in: src/core/dependencies.ts:212

A workspace: specifier the package manager replaces with the version of the workspace package: workspace:*, workspace:^, workspace:~, also through an alias (workspace:other-name@^). Explicit ranges (workspace:^1.2.0) are published as the range itself, not as the local version: they return null.

Parameters ​

dependencyName ​

string

specifier ​

string

Returns ​

{ target: string; } | null

Released under the MIT License.