{"id":19655304,"url":"https://github.com/istanbuljs/esm-loader-hook","last_synced_at":"2025-07-10T02:34:03.456Z","repository":{"id":45696347,"uuid":"247980473","full_name":"istanbuljs/esm-loader-hook","owner":"istanbuljs","description":"Loader hook for ESM instrumentation (experimental!!)","archived":false,"fork":false,"pushed_at":"2023-06-13T12:48:47.000Z","size":17,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-08T05:44:18.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/istanbuljs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-17T13:43:48.000Z","updated_at":"2024-10-12T19:17:10.000Z","dependencies_parsed_at":"2024-06-18T20:11:39.013Z","dependency_job_id":null,"html_url":"https://github.com/istanbuljs/esm-loader-hook","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"b927b651d24a94dcc53fcf8b46155510a6cb851a"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istanbuljs%2Fesm-loader-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istanbuljs%2Fesm-loader-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istanbuljs%2Fesm-loader-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istanbuljs%2Fesm-loader-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/istanbuljs","download_url":"https://codeload.github.com/istanbuljs/esm-loader-hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224125571,"owners_count":17259893,"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":[],"created_at":"2024-11-11T15:20:26.796Z","updated_at":"2024-11-11T15:20:27.614Z","avatar_url":"https://github.com/istanbuljs.png","language":"JavaScript","readme":"# @istanbuljs/esm-loader-hook\n\n![Tests][tests-status]\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![ISC][license-image]](LICENSE)\n\nThis [loader hook](https://nodejs.org/dist/latest/docs/api/esm.html#esm_hooks)\nmakes it relatively easy to use NYC to check coverage of ESM running in node.js\n16.12.0.  Note this makes use of **experimental** node.js features and thus may\nstop working upon release of new versions of node.js.  Until the node.js feature\nis stabilized breakage should not be unexpected.\n\nFor more stable options to test coverage you can:\n* Use [c8]\n* Pre-instrument your code (run `nyc instrument` then test the output)\n\n\n## Adding to processes\n\nTo install this hook into a process the module must be provided through the\n`--experimental-loader` flag.\n\nThe following can be used for your `npm test` script to enable live instrumentation\nof ES modules being tested with mocha:\n\n```sh\ncross-env 'NODE_OPTIONS=--experimental-loader @istanbuljs/esm-loader-hook' nyc mocha\n```\n\n\n## Configuration\n\nThis module executes [babel-plugin-istanbul] in a loader hook.  No\noptions are provided to the babel plugin and babel configuration files are not honored.\nNormally configuration will be provided by the currently running instance of nyc.  If\nthis module is run outside nyc then it will use `@istanbuljs/load-nyc-config` to load\noptions, defaults from `@istanbuljs/schema` will apply to missing options or if no\nconfiguration is found.\n\n\n[tests-status]: https://github.com/cfware/node-preload/workflows/Tests/badge.svg\n[npm-image]: https://img.shields.io/npm/v/@istanbuljs/esm-loader-hook.svg\n[npm-url]: https://npmjs.org/package/@istanbuljs/esm-loader-hook\n[downloads-image]: https://img.shields.io/npm/dm/@istanbuljs/esm-loader-hook.svg\n[downloads-url]: https://npmjs.org/package/@istanbuljs/esm-loader-hook\n[license-image]: https://img.shields.io/github/license/istanbuljs/esm-loader-hook\n\n[babel-plugin-istanbul]: https://github.com/istanbuljs/babel-plugin-istanbul#readme\n[c8]: https://github.com/bcoe/c8#readme\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fistanbuljs%2Fesm-loader-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fistanbuljs%2Fesm-loader-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fistanbuljs%2Fesm-loader-hook/lists"}