Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Mar 16, 2024
1 parent 5dc3d92 commit f6688d5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export abstract class JsPackageManager {
*
* @param packageNames
*/
public getVersions(...packageNames: StorybookPackage[]): Promise<string[]> {
public getVersions(...packageNames: string[]): Promise<string[]> {
return Promise.all(
packageNames.map((packageName) => {
return this.getVersion(packageName);
Expand All @@ -380,11 +380,11 @@ export abstract class JsPackageManager {
* @param packageName The name of the package
* @param constraint A valid semver constraint, example: '1.x || >=2.5.0 || 5.0.0 - 7.2.3'
*/
public async getVersion(packageName: StorybookPackage, constraint?: string): Promise<string> {
public async getVersion(packageName: string, constraint?: string): Promise<string> {
let current: string | undefined;

if (/(@storybook|^sb$|^storybook$)/.test(packageName)) {
current = storybookPackagesVersions[packageName];
if (packageName in storybookPackagesVersions) {
current = storybookPackagesVersions[packageName as StorybookPackage];
}

let latest;
Expand Down

0 comments on commit f6688d5

Please sign in to comment.