├── .babelrc.js ├── .eslintrc.json ├── .gitignore ├── .huskyrc ├── .lintstagedrc ├── .prettierrc ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── appveyor.yml ├── index.d.ts ├── package.json ├── rollup.config.js ├── src ├── ast-utils.js ├── helpers.js ├── index.js ├── is-cjs.js ├── resolve-id.js ├── transform.js └── utils.js ├── test ├── form │ ├── async-function │ │ ├── input.js │ │ └── output.js │ ├── constant-template-literal │ │ ├── input.js │ │ └── output.js │ ├── dynamic-template-literal │ │ ├── input.js │ │ └── output.js │ ├── ignore-ids-function │ │ ├── _config.js │ │ ├── input.js │ │ └── output.js │ ├── ignore-ids │ │ ├── _config.js │ │ ├── input.js │ │ └── output.js │ ├── multiple-var-declarations-b │ │ ├── input.js │ │ └── output.js │ ├── multiple-var-declarations-c │ │ ├── input.js │ │ └── output.js │ ├── multiple-var-declarations │ │ ├── input.js │ │ └── output.js │ ├── no-exports-entry │ │ ├── _config.js │ │ ├── input.js │ │ └── output.js │ ├── no-toplevel-return │ │ ├── input.js │ │ └── output.js │ ├── optimised-default-export-function-double-assign │ │ ├── input.js │ │ └── output.js │ ├── optimised-default-export-function │ │ ├── input.js │ │ └── output.js │ ├── optimised-default-export-iife │ │ ├── input.js │ │ └── output.js │ ├── optimised-default-export │ │ ├── input.js │ │ └── output.js │ ├── optimised-named-export-conflicts │ │ ├── input.js │ │ └── output.js │ ├── optimised-named-export │ │ ├── input.js │ │ └── output.js │ ├── require-collision │ │ ├── input.js │ │ └── output.js │ ├── typeof-module-exports │ │ ├── input.js │ │ └── output.js │ ├── unambiguous-with-default-export │ │ ├── input.js │ │ └── output.js │ ├── unambiguous-with-import │ │ ├── input.js │ │ └── output.js │ └── unambiguous-with-named-export │ │ ├── input.js │ │ └── output.js ├── function │ ├── __esModule │ │ ├── answer.js │ │ └── main.js │ ├── assign-properties-to-default-export │ │ ├── foo.js │ │ └── main.js │ ├── assumed-globals │ │ ├── _config.js │ │ ├── document.js │ │ └── main.js │ ├── bare-import-comment │ │ ├── bar.js │ │ ├── foo.js │ │ └── main.js │ ├── bare-import │ │ ├── _config.js │ │ ├── bar.js │ │ ├── foo.js │ │ └── main.js │ ├── basic │ │ ├── _config.js │ │ ├── foo.js │ │ └── main.js │ ├── deconflict-export-and-local │ │ ├── index.js │ │ ├── main.js │ │ └── someValue.js │ ├── dot │ │ ├── foo.bar.js │ │ └── main.js │ ├── duplicate-default-exports-b │ │ ├── main.js │ │ └── x.js │ ├── duplicate-default-exports-c │ │ ├── exports.js │ │ └── main.js │ ├── duplicate-default-exports │ │ ├── main.js │ │ └── x.js │ ├── export-default-from │ │ ├── _config.js │ │ ├── imported.js │ │ ├── main.js │ │ └── reexporter.js │ ├── exports │ │ ├── _config.js │ │ ├── foo.js │ │ └── main.js │ ├── external-imports │ │ ├── _config.js │ │ └── main.js │ ├── fallback-no-default │ │ ├── foo.js │ │ └── main.js │ ├── global-not-overwritten │ │ ├── _config.js │ │ ├── encode.js │ │ └── main.js │ ├── global-var │ │ └── main.js │ ├── index │ │ ├── foo │ │ │ └── index.js │ │ └── main.js │ ├── inline │ │ ├── _config.js │ │ ├── foo.js │ │ ├── main.js │ │ └── multiply.js │ ├── named-exports │ │ ├── foo.js │ │ └── main.js │ ├── ordering │ │ ├── bar.js │ │ ├── foo.js │ │ ├── main.js │ │ └── shared.js │ ├── react-apollo │ │ ├── commonjs-bar.js │ │ ├── commonjs-foo.js │ │ └── main.js │ ├── reassignment │ │ ├── foo.js │ │ └── main.js │ ├── reexports │ │ ├── _config.js │ │ ├── bar.js │ │ ├── foo.js │ │ └── main.js │ ├── resolve-is-cjs-extension │ │ ├── _config.js │ │ ├── main.js │ │ └── second.x │ ├── resolve-is-cjs-filtered │ │ ├── _config.js │ │ ├── main.js │ │ └── second.js │ ├── shadowing │ │ └── main.js │ ├── skips-dead-branches │ │ ├── _config.js │ │ ├── a.js │ │ ├── b.js │ │ ├── c.js │ │ └── main.js │ ├── this │ │ ├── foo.js │ │ └── main.js │ ├── toplevel-return-complex │ │ ├── _config.js │ │ ├── bar.js │ │ ├── foo.js │ │ └── main.js │ ├── toplevel-return │ │ ├── _config.js │ │ ├── foo.js │ │ └── main.js │ ├── trailing-slash │ │ ├── foo │ │ │ └── index.js │ │ └── main.js │ └── typeof-require │ │ ├── foo.js │ │ └── main.js ├── mocha.opts ├── node_modules │ ├── .gitkeep │ ├── bar │ │ └── index.js │ ├── baz │ │ └── index.js │ ├── events │ │ └── index.js │ ├── external │ │ └── index.js │ └── foo │ │ └── index.js ├── samples │ ├── array-destructuring-assignment │ │ └── main.js │ ├── corejs │ │ └── literal-with-default.js │ ├── custom-named-exports-browser-shims │ │ └── main.js │ ├── custom-named-exports-false-positive │ │ ├── main.js │ │ └── other.js │ ├── custom-named-exports-warn-builtins │ │ └── main.js │ ├── custom-named-exports │ │ ├── main.js │ │ └── secret-named-exporter.js │ ├── deconflict-helpers │ │ └── main.js │ ├── define-is-undefined │ │ ├── foo.js │ │ └── main.js │ ├── es-modules-without-default-export │ │ ├── main.js │ │ └── other.js │ ├── extension │ │ ├── foo.coffee │ │ └── main.coffee │ ├── external │ │ └── main.js │ ├── global-in-if-block │ │ └── main.js │ ├── global │ │ └── main.js │ ├── ignore-global │ │ ├── firstpass.js │ │ ├── identifier.js │ │ ├── main.js │ │ └── this.js │ ├── ignore-virtual-modules │ │ └── main.js │ ├── invalid-syntax │ │ └── main.js │ ├── multiple-entry-points │ │ ├── 2.js │ │ ├── 3.js │ │ ├── 4.js │ │ ├── b.js │ │ └── c.js │ ├── named-exports-from-object-literal │ │ ├── a.js │ │ ├── main.js │ │ └── other.js │ ├── other-transforms │ │ ├── bar.js │ │ ├── foo.js │ │ └── main.js │ ├── paren-expression │ │ └── index.js │ ├── reexport │ │ ├── export.js │ │ ├── main.js │ │ └── reexport.js │ ├── rename-index │ │ ├── invalid-var │ │ │ └── index.js │ │ ├── main.js │ │ ├── other │ │ │ └── nonIndex.js │ │ └── validVar │ │ │ └── index.js │ ├── reserved-as-property │ │ └── main.js │ ├── sourcemap │ │ ├── foo.js │ │ └── main.js │ ├── symlinked-node-modules │ │ ├── index.js │ │ └── node_modules │ │ │ └── events │ ├── umd │ │ ├── correct-scoping.js │ │ ├── protobuf.js │ │ └── sinon.js │ └── use-own-output │ │ ├── from-rollup.js │ │ └── main.js └── test.js ├── tsconfig.json └── typings-test.js /.babelrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/.babelrc.js -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/.gitignore -------------------------------------------------------------------------------- /.huskyrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/.huskyrc -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/.lintstagedrc -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/.prettierrc -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/README.md -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/appveyor.yml -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/index.d.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/rollup.config.js -------------------------------------------------------------------------------- /src/ast-utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/src/ast-utils.js -------------------------------------------------------------------------------- /src/helpers.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/src/helpers.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/src/index.js -------------------------------------------------------------------------------- /src/is-cjs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/src/is-cjs.js -------------------------------------------------------------------------------- /src/resolve-id.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/src/resolve-id.js -------------------------------------------------------------------------------- /src/transform.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/src/transform.js -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/src/utils.js -------------------------------------------------------------------------------- /test/form/async-function/input.js: -------------------------------------------------------------------------------- 1 | module.exports = async function () { 2 | // TODO 3 | }; 4 | -------------------------------------------------------------------------------- /test/form/async-function/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/async-function/output.js -------------------------------------------------------------------------------- /test/form/constant-template-literal/input.js: -------------------------------------------------------------------------------- 1 | var foo = require(`tape`); 2 | console.log(foo); 3 | -------------------------------------------------------------------------------- /test/form/constant-template-literal/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/constant-template-literal/output.js -------------------------------------------------------------------------------- /test/form/dynamic-template-literal/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/dynamic-template-literal/input.js -------------------------------------------------------------------------------- /test/form/dynamic-template-literal/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/dynamic-template-literal/output.js -------------------------------------------------------------------------------- /test/form/ignore-ids-function/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/ignore-ids-function/_config.js -------------------------------------------------------------------------------- /test/form/ignore-ids-function/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/ignore-ids-function/input.js -------------------------------------------------------------------------------- /test/form/ignore-ids-function/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/ignore-ids-function/output.js -------------------------------------------------------------------------------- /test/form/ignore-ids/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/ignore-ids/_config.js -------------------------------------------------------------------------------- /test/form/ignore-ids/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/ignore-ids/input.js -------------------------------------------------------------------------------- /test/form/ignore-ids/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/ignore-ids/output.js -------------------------------------------------------------------------------- /test/form/multiple-var-declarations-b/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/multiple-var-declarations-b/input.js -------------------------------------------------------------------------------- /test/form/multiple-var-declarations-b/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/multiple-var-declarations-b/output.js -------------------------------------------------------------------------------- /test/form/multiple-var-declarations-c/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/multiple-var-declarations-c/input.js -------------------------------------------------------------------------------- /test/form/multiple-var-declarations-c/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/multiple-var-declarations-c/output.js -------------------------------------------------------------------------------- /test/form/multiple-var-declarations/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/multiple-var-declarations/input.js -------------------------------------------------------------------------------- /test/form/multiple-var-declarations/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/multiple-var-declarations/output.js -------------------------------------------------------------------------------- /test/form/no-exports-entry/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/no-exports-entry/_config.js -------------------------------------------------------------------------------- /test/form/no-exports-entry/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/no-exports-entry/input.js -------------------------------------------------------------------------------- /test/form/no-exports-entry/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/no-exports-entry/output.js -------------------------------------------------------------------------------- /test/form/no-toplevel-return/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/no-toplevel-return/input.js -------------------------------------------------------------------------------- /test/form/no-toplevel-return/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/no-toplevel-return/output.js -------------------------------------------------------------------------------- /test/form/optimised-default-export-function-double-assign/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-default-export-function-double-assign/input.js -------------------------------------------------------------------------------- /test/form/optimised-default-export-function-double-assign/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-default-export-function-double-assign/output.js -------------------------------------------------------------------------------- /test/form/optimised-default-export-function/input.js: -------------------------------------------------------------------------------- 1 | module.exports = function foo () {}; 2 | -------------------------------------------------------------------------------- /test/form/optimised-default-export-function/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-default-export-function/output.js -------------------------------------------------------------------------------- /test/form/optimised-default-export-iife/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-default-export-iife/input.js -------------------------------------------------------------------------------- /test/form/optimised-default-export-iife/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-default-export-iife/output.js -------------------------------------------------------------------------------- /test/form/optimised-default-export/input.js: -------------------------------------------------------------------------------- 1 | module.exports = 42; 2 | -------------------------------------------------------------------------------- /test/form/optimised-default-export/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-default-export/output.js -------------------------------------------------------------------------------- /test/form/optimised-named-export-conflicts/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-named-export-conflicts/input.js -------------------------------------------------------------------------------- /test/form/optimised-named-export-conflicts/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-named-export-conflicts/output.js -------------------------------------------------------------------------------- /test/form/optimised-named-export/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-named-export/input.js -------------------------------------------------------------------------------- /test/form/optimised-named-export/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/optimised-named-export/output.js -------------------------------------------------------------------------------- /test/form/require-collision/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/require-collision/input.js -------------------------------------------------------------------------------- /test/form/require-collision/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/require-collision/output.js -------------------------------------------------------------------------------- /test/form/typeof-module-exports/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/typeof-module-exports/input.js -------------------------------------------------------------------------------- /test/form/typeof-module-exports/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/typeof-module-exports/output.js -------------------------------------------------------------------------------- /test/form/unambiguous-with-default-export/input.js: -------------------------------------------------------------------------------- 1 | require( './foo.js' ); 2 | 3 | export default {}; 4 | -------------------------------------------------------------------------------- /test/form/unambiguous-with-default-export/output.js: -------------------------------------------------------------------------------- 1 | require( './foo.js' ); 2 | 3 | export default {}; 4 | -------------------------------------------------------------------------------- /test/form/unambiguous-with-import/input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/unambiguous-with-import/input.js -------------------------------------------------------------------------------- /test/form/unambiguous-with-import/output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/form/unambiguous-with-import/output.js -------------------------------------------------------------------------------- /test/form/unambiguous-with-named-export/input.js: -------------------------------------------------------------------------------- 1 | require( './foo.js' ); 2 | 3 | export {}; 4 | -------------------------------------------------------------------------------- /test/form/unambiguous-with-named-export/output.js: -------------------------------------------------------------------------------- 1 | require( './foo.js' ); 2 | 3 | export {}; 4 | -------------------------------------------------------------------------------- /test/function/__esModule/answer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/__esModule/answer.js -------------------------------------------------------------------------------- /test/function/__esModule/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/__esModule/main.js -------------------------------------------------------------------------------- /test/function/assign-properties-to-default-export/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/assign-properties-to-default-export/foo.js -------------------------------------------------------------------------------- /test/function/assign-properties-to-default-export/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/assign-properties-to-default-export/main.js -------------------------------------------------------------------------------- /test/function/assumed-globals/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/assumed-globals/_config.js -------------------------------------------------------------------------------- /test/function/assumed-globals/document.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/assumed-globals/document.js -------------------------------------------------------------------------------- /test/function/assumed-globals/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/assumed-globals/main.js -------------------------------------------------------------------------------- /test/function/bare-import-comment/bar.js: -------------------------------------------------------------------------------- 1 | // Great module 2 | Math.bar = 42; 3 | -------------------------------------------------------------------------------- /test/function/bare-import-comment/foo.js: -------------------------------------------------------------------------------- 1 | require( './bar.js' ); 2 | -------------------------------------------------------------------------------- /test/function/bare-import-comment/main.js: -------------------------------------------------------------------------------- 1 | import './foo.js'; 2 | 3 | assert.equal( Math.bar, 42 ); 4 | -------------------------------------------------------------------------------- /test/function/bare-import/_config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /test/function/bare-import/bar.js: -------------------------------------------------------------------------------- 1 | Math.bar = 42; 2 | -------------------------------------------------------------------------------- /test/function/bare-import/foo.js: -------------------------------------------------------------------------------- 1 | require( './bar.js' ); 2 | -------------------------------------------------------------------------------- /test/function/bare-import/main.js: -------------------------------------------------------------------------------- 1 | import './foo.js'; 2 | 3 | assert.equal( Math.bar, 42 ); 4 | -------------------------------------------------------------------------------- /test/function/basic/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/basic/_config.js -------------------------------------------------------------------------------- /test/function/basic/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = 21; 2 | -------------------------------------------------------------------------------- /test/function/basic/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/basic/main.js -------------------------------------------------------------------------------- /test/function/deconflict-export-and-local/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/deconflict-export-and-local/index.js -------------------------------------------------------------------------------- /test/function/deconflict-export-and-local/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/deconflict-export-and-local/main.js -------------------------------------------------------------------------------- /test/function/deconflict-export-and-local/someValue.js: -------------------------------------------------------------------------------- 1 | exports.someValue = 10; 2 | -------------------------------------------------------------------------------- /test/function/dot/foo.bar.js: -------------------------------------------------------------------------------- 1 | module.exports = 'fubar'; 2 | -------------------------------------------------------------------------------- /test/function/dot/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/dot/main.js -------------------------------------------------------------------------------- /test/function/duplicate-default-exports-b/main.js: -------------------------------------------------------------------------------- 1 | import x from './x'; 2 | 3 | assert.deepEqual( x, { default: 42 }); -------------------------------------------------------------------------------- /test/function/duplicate-default-exports-b/x.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/duplicate-default-exports-b/x.js -------------------------------------------------------------------------------- /test/function/duplicate-default-exports-c/exports.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/duplicate-default-exports-c/exports.js -------------------------------------------------------------------------------- /test/function/duplicate-default-exports-c/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/duplicate-default-exports-c/main.js -------------------------------------------------------------------------------- /test/function/duplicate-default-exports/main.js: -------------------------------------------------------------------------------- 1 | import x from './x'; 2 | 3 | assert.strictEqual( x.default, x ); -------------------------------------------------------------------------------- /test/function/duplicate-default-exports/x.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/duplicate-default-exports/x.js -------------------------------------------------------------------------------- /test/function/export-default-from/_config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /test/function/export-default-from/imported.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/export-default-from/imported.js -------------------------------------------------------------------------------- /test/function/export-default-from/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/export-default-from/main.js -------------------------------------------------------------------------------- /test/function/export-default-from/reexporter.js: -------------------------------------------------------------------------------- 1 | export {default} from './imported'; 2 | -------------------------------------------------------------------------------- /test/function/exports/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/exports/_config.js -------------------------------------------------------------------------------- /test/function/exports/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/exports/foo.js -------------------------------------------------------------------------------- /test/function/exports/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/exports/main.js -------------------------------------------------------------------------------- /test/function/external-imports/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/external-imports/_config.js -------------------------------------------------------------------------------- /test/function/external-imports/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/external-imports/main.js -------------------------------------------------------------------------------- /test/function/fallback-no-default/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/fallback-no-default/foo.js -------------------------------------------------------------------------------- /test/function/fallback-no-default/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/fallback-no-default/main.js -------------------------------------------------------------------------------- /test/function/global-not-overwritten/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/global-not-overwritten/_config.js -------------------------------------------------------------------------------- /test/function/global-not-overwritten/encode.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/global-not-overwritten/encode.js -------------------------------------------------------------------------------- /test/function/global-not-overwritten/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/global-not-overwritten/main.js -------------------------------------------------------------------------------- /test/function/global-var/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/global-var/main.js -------------------------------------------------------------------------------- /test/function/index/foo/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 42; 2 | -------------------------------------------------------------------------------- /test/function/index/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/index/main.js -------------------------------------------------------------------------------- /test/function/inline/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/inline/_config.js -------------------------------------------------------------------------------- /test/function/inline/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /test/function/inline/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/inline/main.js -------------------------------------------------------------------------------- /test/function/inline/multiply.js: -------------------------------------------------------------------------------- 1 | module.exports = function ( a, b ) { 2 | return a * b; 3 | }; 4 | -------------------------------------------------------------------------------- /test/function/named-exports/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/named-exports/foo.js -------------------------------------------------------------------------------- /test/function/named-exports/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/named-exports/main.js -------------------------------------------------------------------------------- /test/function/ordering/bar.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/ordering/bar.js -------------------------------------------------------------------------------- /test/function/ordering/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/ordering/foo.js -------------------------------------------------------------------------------- /test/function/ordering/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/ordering/main.js -------------------------------------------------------------------------------- /test/function/ordering/shared.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | fooLoaded: false 3 | }; 4 | -------------------------------------------------------------------------------- /test/function/react-apollo/commonjs-bar.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/react-apollo/commonjs-bar.js -------------------------------------------------------------------------------- /test/function/react-apollo/commonjs-foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/react-apollo/commonjs-foo.js -------------------------------------------------------------------------------- /test/function/react-apollo/main.js: -------------------------------------------------------------------------------- 1 | import { Bar } from './commonjs-foo.js'; 2 | 3 | assert.equal( new Bar().x, 42 ); 4 | -------------------------------------------------------------------------------- /test/function/reassignment/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/reassignment/foo.js -------------------------------------------------------------------------------- /test/function/reassignment/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/reassignment/main.js -------------------------------------------------------------------------------- /test/function/reexports/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/reexports/_config.js -------------------------------------------------------------------------------- /test/function/reexports/bar.js: -------------------------------------------------------------------------------- 1 | exports.named = 42; 2 | -------------------------------------------------------------------------------- /test/function/reexports/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = require( './bar.js' ); 2 | -------------------------------------------------------------------------------- /test/function/reexports/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/reexports/main.js -------------------------------------------------------------------------------- /test/function/resolve-is-cjs-extension/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/resolve-is-cjs-extension/_config.js -------------------------------------------------------------------------------- /test/function/resolve-is-cjs-extension/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/resolve-is-cjs-extension/main.js -------------------------------------------------------------------------------- /test/function/resolve-is-cjs-extension/second.x: -------------------------------------------------------------------------------- 1 | export const result = 'second'; 2 | -------------------------------------------------------------------------------- /test/function/resolve-is-cjs-filtered/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/resolve-is-cjs-filtered/_config.js -------------------------------------------------------------------------------- /test/function/resolve-is-cjs-filtered/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/resolve-is-cjs-filtered/main.js -------------------------------------------------------------------------------- /test/function/resolve-is-cjs-filtered/second.js: -------------------------------------------------------------------------------- 1 | export const result = 'second'; 2 | -------------------------------------------------------------------------------- /test/function/shadowing/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/shadowing/main.js -------------------------------------------------------------------------------- /test/function/skips-dead-branches/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/skips-dead-branches/_config.js -------------------------------------------------------------------------------- /test/function/skips-dead-branches/a.js: -------------------------------------------------------------------------------- 1 | global.a = 1; 2 | -------------------------------------------------------------------------------- /test/function/skips-dead-branches/b.js: -------------------------------------------------------------------------------- 1 | global.b = 2; 2 | module.exports = 'b'; 3 | -------------------------------------------------------------------------------- /test/function/skips-dead-branches/c.js: -------------------------------------------------------------------------------- 1 | global.c = 3; 2 | module.exports = 'c'; 3 | -------------------------------------------------------------------------------- /test/function/skips-dead-branches/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/skips-dead-branches/main.js -------------------------------------------------------------------------------- /test/function/this/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/this/foo.js -------------------------------------------------------------------------------- /test/function/this/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/this/main.js -------------------------------------------------------------------------------- /test/function/toplevel-return-complex/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/toplevel-return-complex/_config.js -------------------------------------------------------------------------------- /test/function/toplevel-return-complex/bar.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { 2 | return true; 3 | }; 4 | -------------------------------------------------------------------------------- /test/function/toplevel-return-complex/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/toplevel-return-complex/foo.js -------------------------------------------------------------------------------- /test/function/toplevel-return-complex/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/toplevel-return-complex/main.js -------------------------------------------------------------------------------- /test/function/toplevel-return/_config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/toplevel-return/_config.js -------------------------------------------------------------------------------- /test/function/toplevel-return/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = 'foo'; 2 | return; 3 | -------------------------------------------------------------------------------- /test/function/toplevel-return/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/toplevel-return/main.js -------------------------------------------------------------------------------- /test/function/trailing-slash/foo/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 42; 2 | -------------------------------------------------------------------------------- /test/function/trailing-slash/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/trailing-slash/main.js -------------------------------------------------------------------------------- /test/function/typeof-require/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/typeof-require/foo.js -------------------------------------------------------------------------------- /test/function/typeof-require/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/function/typeof-require/main.js -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | --require @babel/register 2 | -------------------------------------------------------------------------------- /test/node_modules/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/node_modules/bar/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/node_modules/bar/index.js -------------------------------------------------------------------------------- /test/node_modules/baz/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'hello'; -------------------------------------------------------------------------------- /test/node_modules/events/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/node_modules/events/index.js -------------------------------------------------------------------------------- /test/node_modules/external/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/node_modules/external/index.js -------------------------------------------------------------------------------- /test/node_modules/foo/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'foo'; -------------------------------------------------------------------------------- /test/samples/array-destructuring-assignment/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/array-destructuring-assignment/main.js -------------------------------------------------------------------------------- /test/samples/corejs/literal-with-default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/corejs/literal-with-default.js -------------------------------------------------------------------------------- /test/samples/custom-named-exports-browser-shims/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/custom-named-exports-browser-shims/main.js -------------------------------------------------------------------------------- /test/samples/custom-named-exports-false-positive/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/custom-named-exports-false-positive/main.js -------------------------------------------------------------------------------- /test/samples/custom-named-exports-false-positive/other.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/custom-named-exports-false-positive/other.js -------------------------------------------------------------------------------- /test/samples/custom-named-exports-warn-builtins/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/custom-named-exports-warn-builtins/main.js -------------------------------------------------------------------------------- /test/samples/custom-named-exports/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/custom-named-exports/main.js -------------------------------------------------------------------------------- /test/samples/custom-named-exports/secret-named-exporter.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/custom-named-exports/secret-named-exporter.js -------------------------------------------------------------------------------- /test/samples/deconflict-helpers/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/deconflict-helpers/main.js -------------------------------------------------------------------------------- /test/samples/define-is-undefined/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/define-is-undefined/foo.js -------------------------------------------------------------------------------- /test/samples/define-is-undefined/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/define-is-undefined/main.js -------------------------------------------------------------------------------- /test/samples/es-modules-without-default-export/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/es-modules-without-default-export/main.js -------------------------------------------------------------------------------- /test/samples/es-modules-without-default-export/other.js: -------------------------------------------------------------------------------- 1 | export const a = 1; 2 | -------------------------------------------------------------------------------- /test/samples/extension/foo.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 21; 2 | -------------------------------------------------------------------------------- /test/samples/extension/main.coffee: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/extension/main.coffee -------------------------------------------------------------------------------- /test/samples/external/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/external/main.js -------------------------------------------------------------------------------- /test/samples/global-in-if-block/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/global-in-if-block/main.js -------------------------------------------------------------------------------- /test/samples/global/main.js: -------------------------------------------------------------------------------- 1 | global.foo = 'bar'; 2 | -------------------------------------------------------------------------------- /test/samples/ignore-global/firstpass.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/ignore-global/firstpass.js -------------------------------------------------------------------------------- /test/samples/ignore-global/identifier.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/ignore-global/identifier.js -------------------------------------------------------------------------------- /test/samples/ignore-global/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/ignore-global/main.js -------------------------------------------------------------------------------- /test/samples/ignore-global/this.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/ignore-global/this.js -------------------------------------------------------------------------------- /test/samples/ignore-virtual-modules/main.js: -------------------------------------------------------------------------------- 1 | module.exports = require('\0virtual'); 2 | -------------------------------------------------------------------------------- /test/samples/invalid-syntax/main.js: -------------------------------------------------------------------------------- 1 | export const foo = 2, -------------------------------------------------------------------------------- /test/samples/multiple-entry-points/2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/multiple-entry-points/2.js -------------------------------------------------------------------------------- /test/samples/multiple-entry-points/3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/multiple-entry-points/3.js -------------------------------------------------------------------------------- /test/samples/multiple-entry-points/4.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/multiple-entry-points/4.js -------------------------------------------------------------------------------- /test/samples/multiple-entry-points/b.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/multiple-entry-points/b.js -------------------------------------------------------------------------------- /test/samples/multiple-entry-points/c.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/multiple-entry-points/c.js -------------------------------------------------------------------------------- /test/samples/named-exports-from-object-literal/a.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /test/samples/named-exports-from-object-literal/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/named-exports-from-object-literal/main.js -------------------------------------------------------------------------------- /test/samples/named-exports-from-object-literal/other.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/named-exports-from-object-literal/other.js -------------------------------------------------------------------------------- /test/samples/other-transforms/bar.js: -------------------------------------------------------------------------------- 1 | module.exports = 40; 2 | -------------------------------------------------------------------------------- /test/samples/other-transforms/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/other-transforms/foo.js -------------------------------------------------------------------------------- /test/samples/other-transforms/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/other-transforms/main.js -------------------------------------------------------------------------------- /test/samples/paren-expression/index.js: -------------------------------------------------------------------------------- 1 | module.exports = (42); 2 | -------------------------------------------------------------------------------- /test/samples/reexport/export.js: -------------------------------------------------------------------------------- 1 | exports.named = 2; 2 | -------------------------------------------------------------------------------- /test/samples/reexport/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/reexport/main.js -------------------------------------------------------------------------------- /test/samples/reexport/reexport.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/reexport/reexport.js -------------------------------------------------------------------------------- /test/samples/rename-index/invalid-var/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'invalid'; 2 | -------------------------------------------------------------------------------- /test/samples/rename-index/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/rename-index/main.js -------------------------------------------------------------------------------- /test/samples/rename-index/other/nonIndex.js: -------------------------------------------------------------------------------- 1 | module.exports = 'not an index file'; 2 | -------------------------------------------------------------------------------- /test/samples/rename-index/validVar/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'valid'; 2 | -------------------------------------------------------------------------------- /test/samples/reserved-as-property/main.js: -------------------------------------------------------------------------------- 1 | module.exports.delete = 'foo'; 2 | -------------------------------------------------------------------------------- /test/samples/sourcemap/foo.js: -------------------------------------------------------------------------------- 1 | export default 42; 2 | -------------------------------------------------------------------------------- /test/samples/sourcemap/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/sourcemap/main.js -------------------------------------------------------------------------------- /test/samples/symlinked-node-modules/index.js: -------------------------------------------------------------------------------- 1 | import { foo } from 'events'; -------------------------------------------------------------------------------- /test/samples/symlinked-node-modules/node_modules/events: -------------------------------------------------------------------------------- 1 | ../../../node_modules/events -------------------------------------------------------------------------------- /test/samples/umd/correct-scoping.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/umd/correct-scoping.js -------------------------------------------------------------------------------- /test/samples/umd/protobuf.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/umd/protobuf.js -------------------------------------------------------------------------------- /test/samples/umd/sinon.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/umd/sinon.js -------------------------------------------------------------------------------- /test/samples/use-own-output/from-rollup.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/use-own-output/from-rollup.js -------------------------------------------------------------------------------- /test/samples/use-own-output/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/samples/use-own-output/main.js -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/test/test.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/tsconfig.json -------------------------------------------------------------------------------- /typings-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollup/rollup-plugin-commonjs/HEAD/typings-test.js --------------------------------------------------------------------------------