Browse Source

keep the prefix of the package version.

pull/20044/head
maliming 2 years ago
parent
commit
0a0c4ed212
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 11
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmPackagesUpdater.cs

11
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmPackagesUpdater.cs

@ -250,6 +250,17 @@ public class NpmPackagesUpdater : ITransientDependency
return false;
}
var prefix = string.Empty;
if (package.Value.ToString().StartsWith("~"))
{
prefix = "~";
}
else if (package.Value.ToString().StartsWith("^"))
{
prefix = "^";
}
version = prefix + version.RemovePreFix("~", "^");
package.Value.Replace(version);
Logger.LogInformation(

Loading…
Cancel
Save