File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/sandpack-core/src/npm/dynamic Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ async function getLatestVersionForSemver(
18
18
dep : string ,
19
19
version : string
20
20
) : Promise < string > {
21
+ if ( isAbsoluteVersion ( version ) ) {
22
+ return Promise . resolve ( version ) ;
23
+ }
24
+
21
25
const p = await getPackageJSON ( dep , version ) ;
22
26
return JSON . parse ( p ) . version ;
23
27
}
@@ -37,10 +41,6 @@ function getAbsoluteVersion(
37
41
depVersion : string ,
38
42
parsedResolutions : { [ name : string ] : IParsedResolution [ ] }
39
43
) : Promise < string > {
40
- if ( isAbsoluteVersion ( depVersion ) ) {
41
- return Promise . resolve ( depVersion ) ;
42
- }
43
-
44
44
// Try getting it from the resolutions field first, if that doesn't work
45
45
// we try to get the latest version from the semver.
46
46
const applicableResolutions = parsedResolutions [ depName ] ;
@@ -106,7 +106,7 @@ async function getDependencyDependencies(
106
106
} ;
107
107
await getDependencyDependencies (
108
108
depName ,
109
- depVersion ,
109
+ absoluteVersion ,
110
110
parsedResolutions ,
111
111
peerDependencyResult
112
112
) ;
You can’t perform that action at this time.
0 commit comments