Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"yarn": "./dist/yarn.js",
"yarnpkg": "./dist/yarnpkg.js"
},
"packageManager": "yarn@^2.0.0-rc.29",
"packageManager": "[email protected]",
"devDependencies": {
"@babel/core": "^7.11.0",
"@babel/plugin-proposal-class-properties": "^7.10.4",
Expand Down
6 changes: 3 additions & 3 deletions sources/specUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export function parseSpec(raw: unknown, source?: string): Descriptor {
throw new UsageError(`Invalid package manager specification in ${source}; expected a string`);

const match = raw.match(/^(?!_)(.+)@(.+)$/);
if (match === null || !semver.validRange(match[2]))
throw new UsageError(`Invalid package manager specification in ${source}; expected a semver range`);
if (match === null || !semver.valid(match[2]))
throw new UsageError(`Invalid package manager specification in ${source}; expected a semver version`);

if (!isSupportedPackageManager(match[1]))
throw new UsageError(`Unsupported package manager specification (${match})`);
Expand Down Expand Up @@ -109,7 +109,7 @@ export async function loadSpec(initialCwd: string): Promise<LoadSpecResult> {
}

export async function persistPmSpec(updateTarget: string, locator: Locator, message: string) {
const newSpec = `${locator.name}@^${locator.reference}`;
const newSpec = `${locator.name}@${locator.reference}`;

let res: boolean;
try {
Expand Down