UNPKG

52.8 kBSource Map (JSON)View Raw
1{"version":3,"file":"rollup-plugin-commonjs.cjs.js","sources":["../src/helpers.js","../src/defaultResolver.js","../src/ast-utils.js","../src/utils.js","../src/transform.js","../src/index.js"],"sourcesContent":["export const HELPERS_ID = '\\0commonjsHelpers';\n\nexport const HELPERS = `\nexport var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nexport function commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nexport function unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nexport function createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}`;\n\nexport const PREFIX = '\\0commonjs-proxy:';\nexport const EXTERNAL = '\\0commonjs-external:';\n","import * as fs from 'fs';\nimport { dirname, resolve } from 'path';\n\nfunction isFile ( file ) {\n\ttry {\n\t\tconst stats = fs.statSync( file );\n\t\treturn stats.isFile();\n\t} catch ( err ) {\n\t\treturn false;\n\t}\n}\n\nfunction addJsExtensionIfNecessary ( file ) {\n\tif ( isFile( file ) ) return file;\n\n\tfile += '.js';\n\tif ( isFile( file ) ) return file;\n\n\treturn null;\n}\n\nconst absolutePath = /^(?:\\/|(?:[A-Za-z]:)?[\\\\|/])/;\n\nfunction isAbsolute ( path ) {\n\treturn absolutePath.test( path );\n}\n\nexport default function defaultResolver ( importee, importer ) {\n\t// absolute paths are left untouched\n\tif ( isAbsolute( importee ) ) return addJsExtensionIfNecessary( resolve( importee ) );\n\n\t// if this is the entry point, resolve against cwd\n\tif ( importer === undefined ) return addJsExtensionIfNecessary( resolve( process.cwd(), importee ) );\n\n\t// external modules are skipped at this stage\n\tif ( importee[0] !== '.' ) return null;\n\n\treturn addJsExtensionIfNecessary( resolve( dirname( importer ), importee ) );\n}\n","export function isReference ( node, parent ) {\n\tif ( parent.type === 'MemberExpression' ) return parent.computed || node === parent.object;\n\n\t// disregard the `bar` in { bar: foo }\n\tif ( parent.type === 'Property' && node !== parent.value ) return false;\n\n\t// disregard the `bar` in `class Foo { bar () {...} }`\n\tif ( parent.type === 'MethodDefinition' ) return false;\n\n\t// disregard the `bar` in `export { foo as bar }`\n\tif ( parent.type === 'ExportSpecifier' && node !== parent.local ) return false;\n\n\treturn true;\n}\n\nexport function flatten ( node ) {\n\tconst parts = [];\n\n\twhile ( node.type === 'MemberExpression' ) {\n\t\tif ( node.computed ) return null;\n\n\t\tparts.unshift( node.property.name );\n\t\tnode = node.object;\n\t}\n\n\tif ( node.type !== 'Identifier' ) return null;\n\n\tconst name = node.name;\n\tparts.unshift( name );\n\n\treturn { name, keypath: parts.join( '.' ) };\n}\n\nexport function extractNames ( node ) {\n\tconst names = [];\n\textractors[ node.type ]( names, node );\n\treturn names;\n}\n\nconst extractors = {\n\tIdentifier ( names, node ) {\n\t\tnames.push( node.name );\n\t},\n\n\tObjectPattern ( names, node ) {\n\t\tnode.properties.forEach( prop => {\n\t\t\textractors[ prop.value.type ]( names, prop.value );\n\t\t});\n\t},\n\n\tArrayPattern ( names, node ) {\n\t\tnode.elements.forEach( element => {\n\t\t\tif ( element ) extractors[ element.type ]( names, element );\n\t\t});\n\t},\n\n\tRestElement ( names, node ) {\n\t\textractors[ node.argument.type ]( names, node.argument );\n\t},\n\n\tAssignmentPattern ( names, node ) {\n\t\textractors[ node.left.type ]( names, node.left );\n\t}\n};\n\n\nexport function isTruthy ( node ) {\n\tif ( node.type === 'Literal' ) return !!node.value;\n\tif ( node.type === 'ParenthesizedExpression' ) return isTruthy( node.expression );\n\tif ( node.operator in operators ) return operators[ node.operator ]( node );\n}\n\nexport function isFalsy ( node ) {\n\treturn not( isTruthy( node ) );\n}\n\nfunction not ( value ) {\n\treturn value === undefined ? value : !value;\n}\n\nfunction equals ( a, b, strict ) {\n\tif ( a.type !== b.type ) return undefined;\n\tif ( a.type === 'Literal' ) return strict ? a.value === b.value : a.value == b.value;\n}\n\nconst operators = {\n\t'==': x => {\n\t\treturn equals( x.left, x.right, false );\n\t},\n\n\t'!=': x => not( operators['==']( x ) ),\n\n\t'===': x => {\n\t\treturn equals( x.left, x.right, true );\n\t},\n\n\t'!==': x => not( operators['===']( x ) ),\n\n\t'!': x => isFalsy( x.argument ),\n\n\t'&&': x => isTruthy( x.left ) && isTruthy( x.right ),\n\n\t'||': x => isTruthy( x.left ) || isTruthy( x.right )\n};\n","import { basename, extname, dirname, sep } from 'path';\nimport { makeLegalIdentifier } from 'rollup-pluginutils';\n\nexport function getName ( id ) {\n\tconst name = makeLegalIdentifier( basename( id, extname( id ) ) );\n\tif (name !== 'index') {\n\t\treturn name;\n\t} else {\n\t\tconst segments = dirname( id ).split( sep );\n\t\treturn makeLegalIdentifier( segments[segments.length - 1] );\n\t}\n}\n\n","import { walk } from 'estree-walker';\nimport MagicString from 'magic-string';\nimport { attachScopes, makeLegalIdentifier } from 'rollup-pluginutils';\nimport { extractNames, flatten, isReference, isTruthy, isFalsy } from './ast-utils.js';\nimport { PREFIX, HELPERS_ID } from './helpers.js';\nimport { getName } from './utils.js';\n\nconst reserved = 'abstract arguments boolean break byte case catch char class const continue debugger default delete do double else enum eval export extends false final finally float for function goto if implements import in instanceof int interface let long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with yield'.split( ' ' );\nconst blacklist = { __esModule: true };\nreserved.forEach( word => blacklist[ word ] = true );\n\nconst exportsPattern = /^(?:module\\.)?exports(?:\\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;\n\nconst firstpassGlobal = /\\b(?:require|module|exports|global)\\b/;\nconst firstpassNoGlobal = /\\b(?:require|module|exports)\\b/;\nconst importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;\nconst functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;\n\nfunction deconflict ( scope, globals, identifier ) {\n\tlet i = 1;\n\tlet deconflicted = identifier;\n\n\twhile ( scope.contains( deconflicted ) || globals.has( deconflicted ) || deconflicted in blacklist ) deconflicted = `${identifier}_${i++}`;\n\tscope.declarations[ deconflicted ] = true;\n\n\treturn deconflicted;\n}\n\nfunction tryParse ( parse, code, id ) {\n\ttry {\n\t\treturn parse( code, { allowReturnOutsideFunction: true });\n\t} catch ( err ) {\n\t\terr.message += ` in ${id}`;\n\t\tthrow err;\n\t}\n}\n\nexport function checkFirstpass (code, ignoreGlobal) {\n\tconst firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;\n\treturn firstpass.test(code);\n}\n\nexport function checkEsModule ( parse, code, id ) {\n\tconst ast = tryParse( parse, code, id );\n\n\t// if there are top-level import/export declarations, this is ES not CommonJS\n\tlet hasDefaultExport = false;\n\tlet isEsModule = false;\n\tfor ( const node of ast.body ) {\n\t\tif ( node.type === 'ExportDefaultDeclaration' )\n\t\t\thasDefaultExport = true;\n\t\tif ( importExportDeclaration.test( node.type ) )\n\t\t\tisEsModule = true;\n\t}\n\n\treturn { isEsModule, hasDefaultExport, ast };\n}\n\nexport function transformCommonjs ( parse, code, id, isEntry, ignoreGlobal, ignoreRequire, customNamedExports, sourceMap, allowDynamicRequire, astCache ) {\n\tconst ast = astCache || tryParse( parse, code, id );\n\n\tconst magicString = new MagicString( code );\n\n\tconst required = {};\n\t// Because objects have no guaranteed ordering, yet we need it,\n\t// we need to keep track of the order in a array\n\tconst sources = [];\n\n\tlet uid = 0;\n\n\tlet scope = attachScopes( ast, 'scope' );\n\tconst uses = { module: false, exports: false, global: false, require: false };\n\n\tlet lexicalDepth = 0;\n\tlet programDepth = 0;\n\n\tconst globals = new Set();\n\n\tconst HELPERS_NAME = deconflict( scope, globals, 'commonjsHelpers' ); // TODO technically wrong since globals isn't populated yet, but ¯\\_(ツ)_/¯\n\n\tconst namedExports = {};\n\n\t// TODO handle transpiled modules\n\tlet shouldWrap = /__esModule/.test( code );\n\n\tfunction isRequireStatement ( node ) {\n\t\tif ( !node ) return;\n\t\tif ( node.type !== 'CallExpression' ) return;\n\t\tif ( node.callee.name !== 'require' || scope.contains( 'require' ) ) return;\n\t\tif ( node.arguments.length !== 1 || (node.arguments[0].type !== 'Literal' && (node.arguments[0].type !== 'TemplateLiteral' || node.arguments[0].expressions.length > 0) ) ) return; // TODO handle these weird cases?\n\t\tif ( ignoreRequire( node.arguments[0].value ) ) return;\n\n\t\treturn true;\n\t}\n\n\tfunction getRequired ( node, name ) {\n\t\tconst source = node.arguments[0].type === 'Literal' ? node.arguments[0].value : node.arguments[0].quasis[0].value.cooked;\n\n\t\tconst existing = required[ source ];\n\t\tif ( existing === undefined ) {\n\t\t\tsources.push( source );\n\n\t\t\tif ( !name ) {\n\t\t\t\tdo name = `require$$${uid++}`;\n\t\t\t\twhile ( scope.contains( name ) );\n\t\t\t}\n\n\t\t\trequired[ source ] = { source, name, importsDefault: false };\n\t\t}\n\n\t\treturn required[ source ];\n\t}\n\n\t// do a first pass, see which names are assigned to. This is necessary to prevent\n\t// illegally replacing `var foo = require('foo')` with `import foo from 'foo'`,\n\t// where `foo` is later reassigned. (This happens in the wild. CommonJS, sigh)\n\tconst assignedTo = new Set();\n\twalk( ast, {\n\t\tenter ( node ) {\n\t\t\tif ( node.type !== 'AssignmentExpression' ) return;\n\t\t\tif ( node.left.type === 'MemberExpression' ) return;\n\n\t\t\textractNames( node.left ).forEach( name => {\n\t\t\t\tassignedTo.add( name );\n\t\t\t});\n\t\t}\n\t});\n\n\twalk( ast, {\n\t\tenter ( node, parent ) {\n\t\t\tif ( sourceMap ) {\n\t\t\t\tmagicString.addSourcemapLocation( node.start );\n\t\t\t\tmagicString.addSourcemapLocation( node.end );\n\t\t\t}\n\n\t\t\t// skip dead branches\n\t\t\tif ( parent && ( parent.type === 'IfStatement' || parent.type === 'ConditionalExpression' ) ) {\n\t\t\t\tif ( node === parent.consequent && isFalsy( parent.test ) ) return this.skip();\n\t\t\t\tif ( node === parent.alternate && isTruthy( parent.test ) ) return this.skip();\n\t\t\t}\n\n\t\t\tif ( node._skip ) return this.skip();\n\n\t\t\tprogramDepth += 1;\n\n\t\t\tif ( node.scope ) scope = node.scope;\n\t\t\tif ( functionType.test( node.type ) ) lexicalDepth += 1;\n\n\t\t\t// if toplevel return, we need to wrap it\n\t\t\tif ( node.type === 'ReturnStatement' && lexicalDepth === 0 ) {\n\t\t\t\tshouldWrap = true;\n\t\t\t}\n\n\t\t\t// rewrite `this` as `commonjsHelpers.commonjsGlobal`\n\t\t\tif ( node.type === 'ThisExpression' && lexicalDepth === 0 ) {\n\t\t\t\tuses.global = true;\n\t\t\t\tif ( !ignoreGlobal ) magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { storeName: true } );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// rewrite `typeof module`, `typeof module.exports` and `typeof exports` (https://github.com/rollup/rollup-plugin-commonjs/issues/151)\n\t\t\tif ( node.type === 'UnaryExpression' && node.operator === 'typeof' ) {\n\t\t\t\tconst flattened = flatten( node.argument );\n\t\t\t\tif ( !flattened ) return;\n\n\t\t\t\tif ( scope.contains( flattened.name ) ) return;\n\n\t\t\t\tif ( flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports' ) {\n\t\t\t\t\tmagicString.overwrite( node.start, node.end, `'object'`, { storeName: false } );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// rewrite `require` (if not already handled) `global` and `define`, and handle free references to\n\t\t\t// `module` and `exports` as these mean we need to wrap the module in commonjsHelpers.createCommonjsModule\n\t\t\tif ( node.type === 'Identifier' ) {\n\t\t\t\tif ( isReference( node, parent ) && !scope.contains( node.name ) ) {\n\t\t\t\t\tif ( node.name in uses ) {\n\t\t\t\t\t\tif ( node.name === 'require' ) {\n\t\t\t\t\t\t\tif ( allowDynamicRequire ) return;\n\t\t\t\t\t\t\tmagicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, { storeName: true } );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tuses[ node.name ] = true;\n\t\t\t\t\t\tif ( node.name === 'global' && !ignoreGlobal ) {\n\t\t\t\t\t\t\tmagicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { storeName: true } );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if module or exports are used outside the context of an assignment\n\t\t\t\t\t\t// expression, we need to wrap the module\n\t\t\t\t\t\tif ( node.name === 'module' || node.name === 'exports' ) {\n\t\t\t\t\t\t\tshouldWrap = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( node.name === 'define' ) {\n\t\t\t\t\t\tmagicString.overwrite( node.start, node.end, 'undefined', { storeName: true } );\n\t\t\t\t\t}\n\n\t\t\t\t\tglobals.add( node.name );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Is this an assignment to exports or module.exports?\n\t\t\tif ( node.type === 'AssignmentExpression' ) {\n\t\t\t\tif ( node.left.type !== 'MemberExpression' ) return;\n\n\t\t\t\tconst flattened = flatten( node.left );\n\t\t\t\tif ( !flattened ) return;\n\n\t\t\t\tif ( scope.contains( flattened.name ) ) return;\n\n\t\t\t\tconst match = exportsPattern.exec( flattened.keypath );\n\t\t\t\tif ( !match || flattened.keypath === 'exports' ) return;\n\n\t\t\t\tuses[ flattened.name ] = true;\n\n\t\t\t\t// we're dealing with `module.exports = ...` or `[module.]exports.foo = ...` –\n\t\t\t\t// if this isn't top-level, we'll need to wrap the module\n\t\t\t\tif ( programDepth > 3 ) shouldWrap = true;\n\n\t\t\t\tnode.left._skip = true;\n\n\t\t\t\tif ( flattened.keypath === 'module.exports' && node.right.type === 'ObjectExpression' ) {\n\t\t\t\t\treturn node.right.properties.forEach( prop => {\n\t\t\t\t\t\tif ( prop.computed || prop.key.type !== 'Identifier' ) return;\n\t\t\t\t\t\tconst name = prop.key.name;\n\t\t\t\t\t\tif ( name === makeLegalIdentifier( name ) ) namedExports[ name ] = true;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif ( match[1] ) namedExports[ match[1] ] = true;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if this is `var x = require('x')`, we can do `import x from 'x'`\n\t\t\tif ( node.type === 'VariableDeclarator' && node.id.type === 'Identifier' && isRequireStatement( node.init ) ) {\n\t\t\t\t// for now, only do this for top-level requires. maybe fix this in future\n\t\t\t\tif ( scope.parent ) return;\n\n\t\t\t\t// edge case — CJS allows you to assign to imports. ES doesn't\n\t\t\t\tif ( assignedTo.has( node.id.name ) ) return;\n\n\t\t\t\tconst r = getRequired( node.init, node.id.name );\n\t\t\t\tr.importsDefault = true;\n\n\t\t\t\tif ( r.name === node.id.name ) {\n\t\t\t\t\tnode._shouldRemove = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !isRequireStatement( node ) ) return;\n\n\t\t\tconst r = getRequired( node );\n\n\t\t\tif ( parent.type === 'ExpressionStatement' ) {\n\t\t\t\t// is a bare import, e.g. `require('foo');`\n\t\t\t\tmagicString.remove( parent.start, parent.end );\n\t\t\t} else {\n\t\t\t\tr.importsDefault = true;\n\t\t\t\tmagicString.overwrite( node.start, node.end, r.name );\n\t\t\t}\n\n\t\t\tnode.callee._skip = true;\n\t\t},\n\n\t\tleave ( node ) {\n\t\t\tprogramDepth -= 1;\n\t\t\tif ( node.scope ) scope = scope.parent;\n\t\t\tif ( functionType.test( node.type ) ) lexicalDepth -= 1;\n\n\t\t\tif ( node.type === 'VariableDeclaration' ) {\n\t\t\t\tlet keepDeclaration = false;\n\t\t\t\tlet c = node.declarations[0].start;\n\n\t\t\t\tfor ( let i = 0; i < node.declarations.length; i += 1 ) {\n\t\t\t\t\tconst declarator = node.declarations[i];\n\n\t\t\t\t\tif ( declarator._shouldRemove ) {\n\t\t\t\t\t\tmagicString.remove( c, declarator.end );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( !keepDeclaration ) {\n\t\t\t\t\t\t\tmagicString.remove( c, declarator.start );\n\t\t\t\t\t\t\tkeepDeclaration = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tc = declarator.end;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !keepDeclaration ) {\n\t\t\t\t\tmagicString.remove( node.start, node.end );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tif ( !sources.length && !uses.module && !uses.exports && !uses.require && ( ignoreGlobal || !uses.global ) ) {\n\t\tif ( Object.keys( namedExports ).length ) {\n\t\t\tthrow new Error( `Custom named exports were specified for ${id} but it does not appear to be a CommonJS module` );\n\t\t}\n\t\treturn null; // not a CommonJS module\n\t}\n\n\tconst includeHelpers = shouldWrap || uses.global || uses.require;\n\tconst importBlock = ( includeHelpers ? [ `import * as ${HELPERS_NAME} from '${HELPERS_ID}';` ] : [] ).concat(\n\t\tsources.map( source => {\n\t\t\t// import the actual module before the proxy, so that we know\n\t\t\t// what kind of proxy to build\n\t\t\treturn `import '${source}';`;\n\t\t}),\n\t\tsources.map( source => {\n\t\t\tconst { name, importsDefault } = required[ source ];\n\t\t\treturn `import ${importsDefault ? `${name} from ` : ``}'${PREFIX}${source}';`;\n\t\t})\n\t).join( '\\n' ) + '\\n\\n';\n\n\tconst namedExportDeclarations = [];\n\tlet wrapperStart = '';\n\tlet wrapperEnd = '';\n\n\tconst moduleName = deconflict( scope, globals, getName( id ) );\n\tif ( !isEntry ) {\n\t\tconst exportModuleExports = {\n\t\t\tstr: `export { ${moduleName} as __moduleExports };`,\n\t\t\tname: '__moduleExports'\n\t\t};\n\n\t\tnamedExportDeclarations.push( exportModuleExports );\n\t}\n\n\tconst name = getName( id );\n\n\tfunction addExport ( x ) {\n\t\tconst deconflicted = deconflict( scope, globals, name );\n\n\t\tconst declaration = deconflicted === name ?\n\t\t\t`export var ${x} = ${moduleName}.${x};` :\n\t\t\t`var ${deconflicted} = ${moduleName}.${x};\\nexport { ${deconflicted} as ${x} };`;\n\n\t\tnamedExportDeclarations.push({\n\t\t\tstr: declaration,\n\t\t\tname: x\n\t\t});\n\t}\n\n\tif ( customNamedExports ) customNamedExports.forEach( addExport );\n\n\tconst defaultExportPropertyAssignments = [];\n\tlet hasDefaultExport = false;\n\n\tif ( shouldWrap ) {\n\t\tconst args = `module${uses.exports ? ', exports' : ''}`;\n\n\t\twrapperStart = `var ${moduleName} = ${HELPERS_NAME}.createCommonjsModule(function (${args}) {\\n`;\n\t\twrapperEnd = `\\n});`;\n\t} else {\n\t\tconst names = [];\n\n\t\tast.body.forEach( node => {\n\t\t\tif ( node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression' ) {\n\t\t\t\tconst left = node.expression.left;\n\t\t\t\tconst flattened = flatten( left );\n\n\t\t\t\tif ( !flattened ) return;\n\n\t\t\t\tconst match = exportsPattern.exec( flattened.keypath );\n\t\t\t\tif ( !match ) return;\n\n\t\t\t\tif ( flattened.keypath === 'module.exports' ) {\n\t\t\t\t\thasDefaultExport = true;\n\t\t\t\t\tmagicString.overwrite( left.start, left.end, `var ${moduleName}` );\n\t\t\t\t} else {\n\t\t\t\t\tconst name = match[1];\n\t\t\t\t\tconst deconflicted = deconflict( scope, globals, name );\n\n\t\t\t\t\tnames.push({ name, deconflicted });\n\n\t\t\t\t\tmagicString.overwrite( node.start, left.end, `var ${deconflicted}` );\n\n\t\t\t\t\tconst declaration = name === deconflicted ?\n\t\t\t\t\t\t`export { ${name} };` :\n\t\t\t\t\t\t`export { ${deconflicted} as ${name} };`;\n\n\t\t\t\t\tif ( name !== 'default' ) {\n\t\t\t\t\t\tnamedExportDeclarations.push({\n\t\t\t\t\t\t\tstr: declaration,\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t});\n\t\t\t\t\t\tdelete namedExports[name];\n\t\t\t\t\t}\n\n\t\t\t\t\tdefaultExportPropertyAssignments.push( `${moduleName}.${name} = ${deconflicted};` );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif ( !hasDefaultExport ) {\n\t\t\twrapperEnd = `\\n\\nvar ${moduleName} = {\\n${\n\t\t\t\tnames.map( ({ name, deconflicted }) => `\\t${name}: ${deconflicted}` ).join( ',\\n' )\n\t\t\t}\\n};`;\n\t\t}\n\t}\n\tObject.keys( namedExports )\n\t\t.filter( key => !blacklist[ key ] )\n\t\t.forEach( addExport );\n\n\tconst defaultExport = /__esModule/.test( code ) ?\n\t\t`export default ${HELPERS_NAME}.unwrapExports(${moduleName});` :\n\t\t`export default ${moduleName};`;\n\n\tconst named = namedExportDeclarations\n\t\t.filter( x => x.name !== 'default' || !hasDefaultExport )\n\t\t.map( x => x.str );\n\n\tconst exportBlock = '\\n\\n' + [ defaultExport ]\n\t\t.concat( named )\n\t\t.concat( hasDefaultExport ? defaultExportPropertyAssignments : [] )\n\t\t.join( '\\n' );\n\n\tmagicString.trim()\n\t\t.prepend( importBlock + wrapperStart )\n\t\t.trim()\n\t\t.append( wrapperEnd + exportBlock );\n\n\tcode = magicString.toString();\n\tconst map = sourceMap ? magicString.generateMap() : null;\n\n\treturn { code, map };\n}\n","import { statSync } from 'fs';\nimport { dirname, extname, resolve, sep } from 'path';\nimport { sync as nodeResolveSync } from 'resolve';\nimport { createFilter } from 'rollup-pluginutils';\nimport { EXTERNAL, PREFIX, HELPERS_ID, HELPERS } from './helpers.js';\nimport defaultResolver from './defaultResolver.js';\nimport { checkFirstpass, checkEsModule, transformCommonjs } from './transform.js';\nimport { getName } from './utils.js';\n\nfunction getCandidatesForExtension ( resolved, extension ) {\n\treturn [\n\t\tresolved + extension,\n\t\tresolved + `${sep}index${extension}`\n\t];\n}\n\nfunction getCandidates ( resolved, extensions ) {\n\treturn extensions.reduce(\n\t\t( paths, extension ) => paths.concat( getCandidatesForExtension ( resolved, extension ) ),\n\t\t[resolved]\n\t);\n}\n\n// Return the first non-falsy result from an array of\n// maybe-sync, maybe-promise-returning functions\nfunction first ( candidates ) {\n\treturn function ( ...args ) {\n\t\treturn candidates.reduce( ( promise, candidate ) => {\n\t\t\treturn promise.then( result => result != null ?\n\t\t\t\tresult :\n\t\t\t\tPromise.resolve( candidate( ...args ) ) );\n\t\t}, Promise.resolve() );\n\t};\n}\n\nfunction startsWith ( str, prefix ) {\n\treturn str.slice( 0, prefix.length ) === prefix;\n}\n\n\nexport default function commonjs ( options = {} ) {\n\tconst extensions = options.extensions || ['.js'];\n\tconst filter = createFilter( options.include, options.exclude );\n\tconst ignoreGlobal = options.ignoreGlobal;\n\n\tconst customNamedExports = {};\n\tif ( options.namedExports ) {\n\t\tObject.keys( options.namedExports ).forEach( id => {\n\t\t\tlet resolvedId;\n\n\t\t\ttry {\n\t\t\t\tresolvedId = nodeResolveSync( id, { basedir: process.cwd() });\n\t\t\t} catch ( err ) {\n\t\t\t\tresolvedId = resolve( id );\n\t\t\t}\n\n\t\t\tcustomNamedExports[ resolvedId ] = options.namedExports[ id ];\n\t\t});\n\t}\n\n\tconst esModulesWithoutDefaultExport = [];\n\n\tconst allowDynamicRequire = !!options.ignore; // TODO maybe this should be configurable?\n\n\tconst ignoreRequire = typeof options.ignore === 'function' ?\n\t\toptions.ignore :\n\t\tArray.isArray( options.ignore ) ? id => ~options.ignore.indexOf( id ) :\n\t\t\t() => false;\n\n\tlet entryModuleIdsPromise = null;\n\n\tfunction resolveId ( importee, importer ) {\n\t\tif ( importee === HELPERS_ID ) return importee;\n\n\t\tif ( importer && startsWith( importer, PREFIX ) ) importer = importer.slice( PREFIX.length );\n\n\t\tconst isProxyModule = startsWith( importee, PREFIX );\n\t\tif ( isProxyModule ) importee = importee.slice( PREFIX.length );\n\n\t\treturn resolveUsingOtherResolvers( importee, importer ).then( resolved => {\n\t\t\tif ( resolved ) return isProxyModule ? PREFIX + resolved : resolved;\n\n\t\t\tresolved = defaultResolver( importee, importer );\n\n\t\t\tif ( isProxyModule ) {\n\t\t\t\tif ( resolved ) return PREFIX + resolved;\n\t\t\t\treturn EXTERNAL + importee; // external\n\t\t\t}\n\n\t\t\treturn resolved;\n\t\t});\n\t}\n\n\tconst sourceMap = options.sourceMap !== false;\n\n\tlet resolveUsingOtherResolvers;\n\n\tconst isCjsPromises = Object.create(null);\n\tfunction getIsCjsPromise ( id ) {\n\t\tlet isCjsPromise = isCjsPromises[id];\n\t\tif (isCjsPromise)\n\t\t\treturn isCjsPromise.promise;\n\n\t\tconst promise = new Promise( resolve => {\n\t\t\tisCjsPromises[id] = isCjsPromise = {\n\t\t\t\tresolve: resolve,\n\t\t\t\tpromise: undefined\n\t\t\t};\n\t\t});\n\t\tisCjsPromise.promise = promise;\n\n\t\treturn promise;\n\t}\n\tfunction setIsCjsPromise ( id, promise ) {\n\t\tconst isCjsPromise = isCjsPromises[id];\n\t\tif (isCjsPromise) {\n\t\t\tif (isCjsPromise.resolve) {\n\t\t\t\tisCjsPromise.resolve(promise);\n\t\t\t\tisCjsPromise.resolve = undefined;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tisCjsPromises[id] = { promise: promise, resolve: undefined };\n\t\t}\n\t}\n\n\treturn {\n\t\tname: 'commonjs',\n\n\t\toptions ( options ) {\n\t\t\tconst resolvers = ( options.plugins || [] )\n\t\t\t\t.map( plugin => {\n\t\t\t\t\tif ( plugin.resolveId === resolveId ) {\n\t\t\t\t\t\t// substitute CommonJS resolution logic\n\t\t\t\t\t\treturn ( importee, importer ) => {\n\t\t\t\t\t\t\tif ( importee[0] !== '.' || !importer ) return; // not our problem\n\n\t\t\t\t\t\t\tconst resolved = resolve( dirname( importer ), importee );\n\t\t\t\t\t\t\tconst candidates = getCandidates( resolved, extensions );\n\n\t\t\t\t\t\t\tfor ( let i = 0; i < candidates.length; i += 1 ) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tconst stats = statSync( candidates[i] );\n\t\t\t\t\t\t\t\t\tif ( stats.isFile() ) return candidates[i];\n\t\t\t\t\t\t\t\t} catch ( err ) { /* noop */ }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn plugin.resolveId;\n\t\t\t\t})\n\t\t\t\t.filter( Boolean );\n\n\t\t\tconst isExternal = id => options.external ?\n\t\t\t\tArray.isArray( options.external ) ? ~options.external.indexOf( id ) :\n\t\t\t\t\toptions.external(id) :\n\t\t\t\tfalse;\n\n\t\t\tresolvers.unshift( id => isExternal( id ) ? false : null );\n\n\t\t\tresolveUsingOtherResolvers = first( resolvers );\n\n\t\t\tconst entryModules = [].concat( options.input || options.entry );\n\t\t\tentryModuleIdsPromise = Promise.all(\n\t\t\t\tentryModules.map( entry => resolveId( entry ))\n\t\t\t);\n\t\t},\n\n\t\tresolveId,\n\n\t\tload ( id ) {\n\t\t\tif ( id === HELPERS_ID ) return HELPERS;\n\n\t\t\t// generate proxy modules\n\t\t\tif ( startsWith( id, EXTERNAL ) ) {\n\t\t\t\tconst actualId = id.slice( EXTERNAL.length );\n\t\t\t\tconst name = getName( actualId );\n\n\t\t\t\treturn `import ${name} from ${JSON.stringify( actualId )}; export default ${name};`;\n\t\t\t}\n\n\t\t\tif ( startsWith( id, PREFIX ) ) {\n\t\t\t\tconst actualId = id.slice( PREFIX.length );\n\t\t\t\tconst name = getName( actualId );\n\n\t\t\t\treturn ( ( extensions.indexOf( extname( id ) ) === -1 ) ? Promise.resolve(false) : getIsCjsPromise( actualId ) )\n\t\t\t\t\t.then( isCjs => {\n\t\t\t\t\t\tif ( isCjs )\n\t\t\t\t\t\t\treturn `import { __moduleExports } from ${JSON.stringify( actualId )}; export default __moduleExports;`;\n\t\t\t\t\t\telse if (esModulesWithoutDefaultExport.indexOf(actualId) !== -1)\n\t\t\t\t\t\t\treturn `import * as ${name} from ${JSON.stringify( actualId )}; export default ${name};`;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn `import * as ${name} from ${JSON.stringify( actualId )}; export default ( ${name} && ${name}['default'] ) || ${name};`;\n\t\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\ttransform ( code, id ) {\n\t\t\tif ( !filter( id ) ) return null;\n\t\t\tif ( extensions.indexOf( extname( id ) ) === -1 ) return null;\n\n\t\t\tconst transformPromise = entryModuleIdsPromise.then( (entryModuleIds) => {\n\t\t\t\tconst {isEsModule, hasDefaultExport, ast} = checkEsModule( this.parse, code, id );\n\t\t\t\tif ( isEsModule ) {\n\t\t\t\t\tif ( !hasDefaultExport )\n\t\t\t\t\t\tesModulesWithoutDefaultExport.push( id );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// it is not an ES module but not a commonjs module, too.\n\t\t\t\tif ( !checkFirstpass( code, ignoreGlobal ) ) {\n\t\t\t\t\tesModulesWithoutDefaultExport.push( id );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst transformed = transformCommonjs( this.parse, code, id, entryModuleIds.indexOf(id) !== -1, ignoreGlobal, ignoreRequire, customNamedExports[ id ], sourceMap, allowDynamicRequire, ast );\n\t\t\t\tif ( !transformed ) {\n\t\t\t\t\tesModulesWithoutDefaultExport.push( id );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treturn transformed;\n\t\t\t}).catch(err => {\n\t\t\t\tthis.error(err, err.loc);\n\t\t\t});\n\n\t\t\tsetIsCjsPromise(id, transformPromise.then( transformed => transformed ? true : false, () => true ));\n\n\t\t\treturn transformPromise;\n\t\t}\n\t};\n}\n"],"names":["const","fs.statSync","path","resolve","dirname","makeLegalIdentifier","basename","extname","sep","let","attachScopes","walk","flattened","r","createFilter","nodeResolveSync","options","statSync","actualId","name","this"],"mappings":";;;;;;;;;;;AAAOA,IAAM,UAAU,GAAG,mBAAmB,CAAC;;AAE9C,AAAOA,IAAM,OAAO,GAAG,4jBAarB,CAAC;;AAEH,AAAOA,IAAM,MAAM,GAAG,mBAAmB,CAAC;AAC1C,AAAOA,IAAM,QAAQ,GAAG,sBAAsB,CAAC;;ACf/C,SAAS,MAAM,GAAG,IAAI,GAAG;CACxB,IAAI;EACHA,IAAM,KAAK,GAAGC,WAAW,EAAE,IAAI,EAAE,CAAC;EAClC,OAAO,KAAK,CAAC,MAAM,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