{"id":20731686,"url":"https://github.com/bgotink/list-exports","last_synced_at":"2026-01-31T12:32:06.202Z","repository":{"id":210779521,"uuid":"727438252","full_name":"bgotink/list-exports","owner":"bgotink","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-22T19:45:58.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T05:55:55.139Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bgotink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-12-04T21:31:06.000Z","updated_at":"2024-07-22T19:46:02.000Z","dependencies_parsed_at":"2024-10-31T04:00:49.984Z","dependency_job_id":null,"html_url":"https://github.com/bgotink/list-exports","commit_stats":null,"previous_names":["bgotink/list-exports"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bgotink/list-exports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Flist-exports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Flist-exports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Flist-exports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Flist-exports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgotink","download_url":"https://codeload.github.com/bgotink/list-exports/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Flist-exports/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28942956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T12:10:04.904Z","status":"ssl_error","status_checked_at":"2026-01-31T12:09:58.894Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-17T05:16:24.804Z","updated_at":"2026-01-31T12:32:06.190Z","avatar_url":"https://github.com/bgotink.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@bgotink/list-exports`\n\nThis package exposes functions that can be used to list a package's exports and imports.\n\n## `listExports`\n\nThe `listExports` function expects one or two parameters:\n\n```ts\nexport function listExports(\n\tlocation: string | URL,\n\tinput?: ImportExportInput\n): Promise\u003cArray\u003cImportExport\u003e\u003e;\n```\n\n- `location` is the path or full file URL to the `package.json` file\n- `input` can be provided, with multiple options:\n  - `packageJson` (`unknown`), the `package.json` object. If a value is passed, it won't be read from `location`.\n  - `environment` (`node` | `browser` | null, default: `node`) Environment condition to use in resolving\n  - `type` (`import` | `require` | `default` | null, default: `import` when the package is imported and `require` when the package is required) Module type condition to load. The `default` condition is added unless the value `null` is passed.\n  - `extraCondition` (`string[]`, default: `[]`) Extra conditions to allow\n\nThe returned `ImportExport` objects have four properties:\n\n- `name` is the export path as used to import the export.\n  If the name is `'./deep/export'` and the package is named `pkg`, the export can be imported as `pkg/deep/export`.\n\tThe name of the main export is `'.'`, not `''`.\n- `path` is the path to the exported file, relative to the `location`.\n- `registeredName` is the export name as configured in the `package.json` file.\n\tIf the export contains `*`, this property will still contain the `*`.\n\tThat means that if the `*` export matches multiple files, more than one `ImportExport` will have the same `registeredName`.\n- `registeredPath` is the export path as configured in the `package.json` file.\n\tIf the export contains `*`, this property will still contain the `*`.\n\tThat means that if the `*` export matches multiple files, more than one `ImportExport` will have the same `registeredPath`.\n\n## `listImports`\n\nThe `listImports` function is identical to `listExports`, except it lists the package's `imports` rather than `exports`.\n\n```ts\nexport function listImports(\n\tlocation: string | URL,\n\tinput?: ImportExportInput\n): Promise\u003cArray\u003cImportExport\u003e\u003e;\n```\n\n## License \u0026 Notice\n\nThis package is licensed under the MIT license, which can be found in `LICENSE.md`.\nDependencies are bundled while publishing, check `NOTICE.md` in the published package for their licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgotink%2Flist-exports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgotink%2Flist-exports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgotink%2Flist-exports/lists"}