File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
packages/acceptance-tests/pkg-tests-specs/sources/commands Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 1
- import { tests } from 'pkg-tests-core' ;
1
+ import { ppath , xfs , Filename } from '@yarnpkg/fslib' ;
2
+ import { tests } from 'pkg-tests-core' ;
2
3
3
4
const { setPackageWhitelist} = tests ;
4
5
@@ -83,6 +84,26 @@ describe(`Commands`, () => {
83
84
} ) ,
84
85
) ;
85
86
87
+ it (
88
+ `should not throw on resolutions by npm-tag-resolver with __archiveUrl` ,
89
+ makeTemporaryEnv ( {
90
+ dependencies : { [ `no-deps` ] : `latest` } ,
91
+ } , async ( { path, run, source} ) => {
92
+ await run ( `install` ) ;
93
+ await run ( `add` , `one-range-dep` ) ;
94
+
95
+ const lockFilePath = ppath . join ( path , Filename . lockfile ) ;
96
+ let lockContent = await xfs . readFilePromise ( lockFilePath , `utf8` ) ;
97
+
98
+ lockContent = lockContent . replace ( `"no-deps@npm:2.0.0"` , `"no-deps@npm:2.0.0::__archiveUrl=https%3A%2F%2Fregistry.com%2Fno-deps-2.0.0.tgz"` ) ;
99
+ await xfs . writeFilePromise ( lockFilePath , lockContent ) ;
100
+
101
+ await expect ( run ( `dedupe` , `--check` ) ) . resolves . toMatchObject ( {
102
+ code : 0 ,
103
+ } ) ;
104
+ } ) ,
105
+ ) ;
106
+
86
107
it (
87
108
`should handle aliased packages` ,
88
109
makeTemporaryEnv ( {
You can’t perform that action at this time.
0 commit comments