File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ class State {
103103 public packageTypings = new Map < string , string | undefined > ( ) ;
104104
105105 /** Map from file path to the enclosing `package.json` file, if any. Will not traverse outside node_modules. */
106- public enclosingPackageJson = new Map < string , string > ( ) ;
106+ public enclosingPackageJson = new Map < string , string | undefined > ( ) ;
107107}
108108let state = new State ( ) ;
109109
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ public CompletableFuture<Packument> getPackument(String packageName) {
7171 }
7272
7373 /** Result of a tarball extraction */
74- class ExtractionResult {
74+ private static class ExtractionResult {
7575 /** The directory into which the tarball was extracted. */
7676 Path destDir ;
7777
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ public List<Path> extractFromTarballUrl(String tarballUrl, Path destDir) throws
105105 // Despite having the .tgz extension, the file is not always gzipped, sometimes it's just a raw tar archive,
106106 // regardless of what Accept-Encoding header we send.
107107 // Sniff the header to detect which is the case.
108+ // Note that the compression format has nothing to do with the Accept-Encoding/Content-Encoding headers,
109+ // so we can't reuse the code from fetch().
108110 PushbackInputStream pushback = new PushbackInputStream (rawStream , 2 );
109111 int byte1 = pushback .read ();
110112 int byte2 = pushback .read ();
You can’t perform that action at this time.
0 commit comments