├── .eslintrc.cjs ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.yml │ ├── change.yml │ └── docs.yml ├── SECURITY.md └── workflows │ ├── nodejs-test.yml │ └── release-please.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── package.json ├── renovate.json ├── rollup.config.js ├── src ├── module-importer.cjs └── module-importer.js ├── tests ├── fixtures │ ├── node_modules │ │ ├── mod1.js │ │ └── mod2 │ │ │ ├── mod2.cjs │ │ │ └── package.json │ ├── noop.cjs │ └── noop.js ├── module-importer.test.js ├── pkg.test.cjs └── pkg.test.mjs └── tsconfig.json /.eslintrc.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/.eslintrc.cjs -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/.github/ISSUE_TEMPLATE/bug-report.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/change.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/.github/ISSUE_TEMPLATE/change.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/docs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/.github/ISSUE_TEMPLATE/docs.yml -------------------------------------------------------------------------------- /.github/SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/.github/SECURITY.md -------------------------------------------------------------------------------- /.github/workflows/nodejs-test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/.github/workflows/nodejs-test.yml -------------------------------------------------------------------------------- /.github/workflows/release-please.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/.github/workflows/release-please.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/.gitignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/README.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/package.json -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/renovate.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/rollup.config.js -------------------------------------------------------------------------------- /src/module-importer.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/src/module-importer.cjs -------------------------------------------------------------------------------- /src/module-importer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/src/module-importer.js -------------------------------------------------------------------------------- /tests/fixtures/node_modules/mod1.js: -------------------------------------------------------------------------------- 1 | export const name = "js-mod1"; 2 | -------------------------------------------------------------------------------- /tests/fixtures/node_modules/mod2/mod2.cjs: -------------------------------------------------------------------------------- 1 | exports.name = "cjs-mod2"; 2 | -------------------------------------------------------------------------------- /tests/fixtures/node_modules/mod2/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/tests/fixtures/node_modules/mod2/package.json -------------------------------------------------------------------------------- /tests/fixtures/noop.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/tests/fixtures/noop.cjs -------------------------------------------------------------------------------- /tests/fixtures/noop.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/tests/fixtures/noop.js -------------------------------------------------------------------------------- /tests/module-importer.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/tests/module-importer.test.js -------------------------------------------------------------------------------- /tests/pkg.test.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/tests/pkg.test.cjs -------------------------------------------------------------------------------- /tests/pkg.test.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/tests/pkg.test.mjs -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/humanwhocodes/module-importer/HEAD/tsconfig.json --------------------------------------------------------------------------------