File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 11import * as path from 'path' ;
2- import * as minimatch from 'minimatch' ;
2+ import minimatch from 'minimatch' ;
33
44import fs from './wrapped-fs' ;
55import { Filesystem , FilesystemEntry } from './filesystem' ;
@@ -271,3 +271,16 @@ export function uncache(archivePath: string) {
271271export function uncacheAll ( ) {
272272 disk . uncacheAll ( ) ;
273273}
274+
275+ export default {
276+ createPackage,
277+ createPackageWithOptions,
278+ createPackageFromFiles,
279+ statFile,
280+ getRawHeader,
281+ listPackage,
282+ extractFile,
283+ extractAll,
284+ uncache,
285+ uncacheAll,
286+ } ;
Original file line number Diff line number Diff line change @@ -160,4 +160,12 @@ describe('api', function () {
160160 ) ;
161161 return compDirs ( 'test/input/packthis-object-prototype/' , 'tmp/packthis-object-prototype' ) ;
162162 } ) ;
163+ it ( 'should export all functions also in the default export' , ( ) => {
164+ const topLevelFunctions = Object . keys ( asar ) . filter ( ( key ) => typeof asar [ key ] === 'function' ) ;
165+ const defaultExportFunctions = Object . keys ( asar . default ) . filter (
166+ ( key ) => typeof asar . default [ key ] === 'function' ,
167+ ) ;
168+
169+ assert . deepStrictEqual ( topLevelFunctions , defaultExportFunctions ) ;
170+ } ) ;
163171} ) ;
Original file line number Diff line number Diff line change 1515 "moduleResolution" : " node" ,
1616 "declaration" : true ,
1717 "noImplicitAny" : true ,
18- "strictNullChecks" : true
18+ "strictNullChecks" : true ,
19+ "esModuleInterop" : true
1920 },
2021 "include" : [
2122 " src"
You can’t perform that action at this time.
0 commit comments