{"id":23390635,"url":"https://github.com/hyrious/dts","last_synced_at":"2025-08-12T22:38:52.187Z","repository":{"id":73326834,"uuid":"602968231","full_name":"hyrious/dts","owner":"hyrious","description":"Invoke rollup-plugin-dts to generate bundled .d.ts file","archived":false,"fork":false,"pushed_at":"2025-06-25T05:24:57.000Z","size":202,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-25T11:31:31.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npm.im/@hyrious/dts","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/hyrious.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2023-02-17T10:33:26.000Z","updated_at":"2025-06-25T05:25:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1dc661a-873d-4c22-8f8b-736da376e3ed","html_url":"https://github.com/hyrious/dts","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/hyrious/dts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyrious%2Fdts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyrious%2Fdts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyrious%2Fdts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyrious%2Fdts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyrious","download_url":"https://codeload.github.com/hyrious/dts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyrious%2Fdts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270148252,"owners_count":24535697,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-12-22T03:42:11.883Z","updated_at":"2025-08-12T22:38:52.169Z","avatar_url":"https://github.com/hyrious.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @hyrious/dts\n\n\u003e Invoke [rollup-plugin-dts](https://github.com/Swatinem/rollup-plugin-dts) to generate bundled .d.ts file\n\n## Usage\n\n```bash\nnpx @hyrious/dts src/index.ts -o dist/index.d.ts\n```\n\n### Bonus\n\n- Add `-p` to enable tripple-slash doc comments (will be transformed to `/** comments */`).\n- Add env `NO_DTS` to turn the CLI to no-op, useful in local developing without type changes.\n\n\u003e [!IMPORTANT]\n\u003e Do not use this package as a type-checking linter.\n\u003e It intentionally ignores any type error to make it work with any codebase.\n\u003e My goal is to generate `.d.ts` files instead of checking types.\n\n## Changelog\n\n### 0.3.4\n\n- Fix `-o file.d.mts` should emit correct file.\n\n### 0.3.3\n\n- Add env `DTS_FAST=1` to enable `--fast` for easier usage.\n- Change the API output `reused` to the cache location.\n\n### 0.3.2\n\n- Add `--fast` to reuse last build output for impatient users like me.\n\n### 0.3.1\n\n- Add `--cjs` to enable `fix-dts-default-cjs-exports` to transform CJS types.\n\n  This assumes the default export will become the whole CJS export (`module.exports = default_export`). So the bundler should be configured correctly to do so. For example, [Rollup](https://rollupjs.org/repl/?shareable=JTdCJTIyZXhhbXBsZSUyMiUzQSUyMiUyMiUyQyUyMm1vZHVsZXMlMjIlM0ElNUIlN0IlMjJjb2RlJTIyJTNBJTIyZnVuY3Rpb24lMjBmb28oKSUyMCU3QiU1Q24lMjAlMjByZXR1cm4lMjAxJTVDbiU3RCU1Q24lNUNuZXhwb3J0JTIwZGVmYXVsdCUyMGZvbyUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTJDJTIybmFtZSUyMiUzQSUyMm1haW4uanMlMjIlN0QlNUQlMkMlMjJvcHRpb25zJTIyJTNBJTdCJTIyb3V0cHV0JTIyJTNBJTdCJTIyZm9ybWF0JTIyJTNBJTIyY2pzJTIyJTdEJTdEJTdE) will do this when there's only one export (and is default export).\n\n- Fix a typo bug which causes `-d` not working.\n\n### 0.3.0\n\n- **Breaking**: Change `--outfile` to `--file` so it will be more like rollup.\n\n- Add `-d` option to specify the output directory, and now it supports multiple entry points!\n\n  The input args grammar is like esbuild:\n\n  ```console\n  $ dts foo=src/foo.ts bar=src/buzz.ts\n  Will build dist/foo.d.ts and dist/bar.d.ts\n  ```\n\n- Remove the `json` plugin. Now json imports are externalized and the path will be rewritten to relative to the output file.\n\n### 0.2.11\n\n- Temporarily patch `rollup-plugin-dts` (using `-p`) to force emit (ignore any type error).\n\n### 0.2.10\n\n- Change the dependency version of `esbuild` to `*`.\n\n### 0.2.9\n\n- Fix: Do not resolve JavaScript files.\n\n### 0.2.8\n\n- Downgrade `esbuild` to `^0.21.5` to be compatible with `vite` related toolchains.\n\n### 0.2.7\n\n- Add `--empty` option to mark modules as empty, like virtual modules.\n- Resolve paths alias with esbuild.\n- Turn off all strict options.\n\n### 0.2.6\n\n- Add `NO_DTS` env to disable dts generation when using the CLI.\n\n### 0.2.5\n\n- Add `--alias` option to rename external modules, because `rollup-plugin-dts` does not read `\"paths\"` when they are externalized.\n\n### 0.2.4\n\n- Remove `preserveSymlinks` config, which seems work differently than setting it.\n\n### 0.2.0\n\n- Upgrade `rollup-plugin-dts` to 6.x (was 5.x)\n\n## License\n\nMIT @ [hyrious](https://github.com/hyrious)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyrious%2Fdts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyrious%2Fdts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyrious%2Fdts/lists"}