{"id":24001722,"url":"https://github.com/obahareth/are-you-es5","last_synced_at":"2025-04-12T19:52:23.884Z","repository":{"id":41092734,"uuid":"166667040","full_name":"obahareth/are-you-es5","owner":"obahareth","description":"A package to help you find out which of your node_modules aren't ES5 so you can add them to your Webpack/Rollup/Parcel transpilation steps.","archived":false,"fork":false,"pushed_at":"2023-01-04T21:48:48.000Z","size":3278,"stargazers_count":278,"open_issues_count":23,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T00:09:27.007Z","etag":null,"topics":["babel","bundling","es5","hacktoberfest","javascript","transpiling","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/obahareth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-20T13:53:26.000Z","updated_at":"2024-12-24T12:24:58.000Z","dependencies_parsed_at":"2023-02-02T21:15:56.689Z","dependency_job_id":null,"html_url":"https://github.com/obahareth/are-you-es5","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obahareth%2Fare-you-es5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obahareth%2Fare-you-es5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obahareth%2Fare-you-es5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obahareth%2Fare-you-es5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obahareth","download_url":"https://codeload.github.com/obahareth/are-you-es5/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625504,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","bundling","es5","hacktoberfest","javascript","transpiling","webpack"],"created_at":"2025-01-08T00:37:39.446Z","updated_at":"2025-04-12T19:52:23.853Z","avatar_url":"https://github.com/obahareth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# are-you-es5\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[![](https://img.shields.io/github/workflow/status/obahareth/are-you-es5/CI?style=popout)](https://github.com/obahareth/are-you-es5/actions/workflows/ci.yml)\n[![](https://img.shields.io/npm/v/are-you-es5.svg?style=popout)](https://www.npmjs.com/package/are-you-es5)\n![](https://img.shields.io/node/v/are-you-es5.svg?style=popout)\n\nA package to help you find out which of your `node_modules` aren't written in ES5 so you can add them to your Webpack/Rollup/Parcel transpilation steps. This is currently [limited to checking the entrypoint scripts only](https://github.com/obahareth/are-you-es5/issues/2), which **might** actually be enough of a check to determine if a package should be transpiled or not.\n\n![](./.github/assets/example.png)\n\n## Installing\n\nYou can install the package globally with\n\n```bash\nnpm install -g are-you-es5\n```\n\nor if you'd rather just run it immediately you can use npx:\n\n```bash\nnpx are-you-es5 check /path/to/some/repo\n```\n\n### Aliasing\n\nIf you've installed it globally and find it tiresome to type `are-you-es5` a lot, you can alias it to `es5`:\n\n```bash\nalias es5=\"are-you-es5\"\n```\n\n## Usage\n\n```\nUsage: are-you-es5 check [options] \u003cpath\u003e\n\nChecks if all node_modules (including monorepos) at \u003cpath\u003e are ES5\n\nOptions:\n  -a, --all             Check all node_modules instead of just direct dependencies\n  -v, --verbose         Log all messages (including modules that are ES5)\n  --no-regex-filtering  Stops all filtering on babel-loader exclude regex (does not hide anything)\n  -r, --regex           Get babel-loader exclude regex to ignore all node_modules except non-ES5 ones, by default does not show any babel or webpack modules, use with --no-regex-filtering if you want to see everything\n  --silent              Do not log messages in the console (except regex if --regex is used)\n  -h, --help            output usage information\n```\n\n### Usage as a Library\n\nIf you would like to use this package as a NodeJS library instead of a CLI dependency, you may use this snippet:\n\n```js\nimport {\n  checkModules,\n  buildIncludeRegexp,\n  buildExcludeRegexp\n} from 'are-you-es5'\n\nconst result = checkModules({\n  path: '', // Automatically find up package.json from cwd\n  checkAllNodeModules: true,\n  ignoreBabelAndWebpackPackages: true\n})\n\n/** Returns the regexp including all es6 modules */\nconst es6IncludeRegExp = buildIncludeRegexp(result.es6Modules)\n\n/** Returns the regexp excluding all es6 modules */\nconst es6ExcludeRegexp = buildExcludeRegexp(result.es6Modules)\n```\n\n### Example\n\n```bash\nare-you-es5 check /path/to/some/repo -r\n❌ @babel/plugin-1 is not ES5\n❌ @babel/plugin-2 is not ES5\n\nBabel-loader exclude regex:\n\n/node_modules/(?![plugin-1|plugin-2])/\n```\n\n## Upgrading\n\n### Upgrading from 1.1\n\nIf you were on version 1.1, the `-a` or `-all` option used to be for logging all messages, this has now changed to `-v` or `--verbose` and `-a` and `-all` are now used as a flag to check all node modules.\n\n### Upgrading to 1.3\n\n1.3 Now by default skips checking anything that has the word `babel` or `webpack`, or if a string ends with `loader`.\nTo restore previous behavior use the `--no-regex-filtering` option.\n\n### Upgrading from 2.0 to 2.1\nThis upgrade only affects you if you were using the package as a library (instead of just a CLI tool), `checkModules` now returns an object that has 3 arrays: `es5Modules`, `es6Modules`, and `ignored`. To preserve previous behavior use `es6Modules`, see the [Usage as a Library](#usage-as-a-library) section.\n\n## Credits\n\n- [acorn](https://github.com/acornjs/acorn) - All the actual ES5 checking happens through acorn, this package wouldn't exist without it.\n- [es-check](https://github.com/dollarshaveclub/es-check) - This whole package wouldn't have been possible if I hadn't come across es-check and learned from it.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/tooppaaa\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/599163?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eClément DUNGLER\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/obahareth/are-you-es5/commits?author=tooppaaa\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/depoulo\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/4457202?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ePaolo Priotto\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/obahareth/are-you-es5/commits?author=depoulo\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/yhatt\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/3993388?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYuki Hattori\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/obahareth/are-you-es5/commits?author=yhatt\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://about.me/renanbandeira\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1872284?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRenan Bandeira\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/obahareth/are-you-es5/commits?author=renanbandeira\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/zhaoyao91\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3808838?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYao Zhao\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/obahareth/are-you-es5/commits?author=zhaoyao91\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobahareth%2Fare-you-es5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobahareth%2Fare-you-es5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobahareth%2Fare-you-es5/lists"}