File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa
20
20
21
21
[ #7127 ] ( https://github.com/yarnpkg/yarn/pull/7127 ) - [ ** Eli Perelman** ] ( https://github.com/eliperelman )
22
22
23
+ - Adds support for the npm enterprise URLs when computing the offline mirror filenames.
24
+
25
+ [ #7200 ] ( https://github.com/yarnpkg/yarn/pull/7200 ) - [ ** John Millikin** ] ( https://john-millikin.com )
26
+
23
27
## 1.15.2
24
28
25
29
The 1.15.1 doesn't exist due to a release hiccup.
Original file line number Diff line number Diff line change @@ -322,6 +322,27 @@ test('TarballFetcher.fetch properly stores tarball for scoped package resolved f
322
322
expect ( fetcher . getTarballMirrorPath ( ) ) . toBe ( path . join ( offlineMirrorDir , '@exponent-configurator-1.0.2.tgz' ) ) ;
323
323
} ) ;
324
324
325
+ test ( 'TarballFetcher.fetch properly stores tarball for scoped package resolved from npm enterprise registry' , async ( ) => {
326
+ const dir = await mkdir ( 'tarball-fetcher' ) ;
327
+ const offlineMirrorDir = await mkdir ( 'offline-mirror' ) ;
328
+
329
+ const config = await Config . create ( ) ;
330
+ config . registries . npm . config [ 'yarn-offline-mirror' ] = offlineMirrorDir ;
331
+
332
+ const fetcher = new TarballFetcher (
333
+ dir ,
334
+ {
335
+ type : 'tarball' ,
336
+ hash : '6f0ab73cdd7b82d8e81e80838b49e9e4c7fbcc44' ,
337
+ reference : 'https://npm.internal.site:443/@/@exponent/configurator/_attachments/configurator-1.0.2.tgz' ,
338
+ registry : 'npm' ,
339
+ } ,
340
+ config ,
341
+ ) ;
342
+
343
+ expect ( fetcher . getTarballMirrorPath ( ) ) . toBe ( path . join ( offlineMirrorDir , '@exponent-configurator-1.0.2.tgz' ) ) ;
344
+ } ) ;
345
+
325
346
test ( 'TarballFetcher.fetch throws on truncated tar data' , async ( ) => {
326
347
const dir = await mkdir ( 'tarball-fetcher' ) ;
327
348
const reporter = new Reporter ( ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const gunzip = require('gunzip-maybe');
18
18
const invariant = require ( 'invariant' ) ;
19
19
const ssri = require ( 'ssri' ) ;
20
20
21
- const RE_URL_NAME_MATCH = / \/ (?: ( @ [ ^ / ] + ) \/ ) ? [ ^ / ] + \/ - \/ (?: @ [ ^ / ] + \/ ) ? ( [ ^ / ] + ) $ / ;
21
+ const RE_URL_NAME_MATCH = / \/ (?: ( @ [ ^ / ] + ) \/ ) ? [ ^ / ] + \/ (?: - | _ a t t a c h m e n t s ) \/ (?: @ [ ^ / ] + \/ ) ? ( [ ^ / ] + ) $ / ;
22
22
23
23
const isHashAlgorithmSupported = name => {
24
24
const cachedResult = isHashAlgorithmSupported . __cache [ name ] ;
You can’t perform that action at this time.
0 commit comments