{"id":15010505,"url":"https://github.com/nodejs/amaro","last_synced_at":"2025-05-14T22:08:27.416Z","repository":{"id":248771387,"uuid":"829625494","full_name":"nodejs/amaro","owner":"nodejs","description":"Node.js TypeScript wrapper","archived":false,"fork":false,"pushed_at":"2025-05-05T06:09:03.000Z","size":106014,"stargazers_count":421,"open_issues_count":3,"forks_count":19,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-10T20:28:32.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/nodejs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"nodejs","open_collective":"nodejs"}},"created_at":"2024-07-16T20:11:47.000Z","updated_at":"2025-05-09T05:45:19.000Z","dependencies_parsed_at":"2024-10-07T11:50:38.535Z","dependency_job_id":"d29256d9-f303-4709-ae70-a5b1e3c78554","html_url":"https://github.com/nodejs/amaro","commit_stats":{"total_commits":136,"total_committers":13,"mean_commits":"10.461538461538462","dds":0.5514705882352942,"last_synced_commit":"725ac2ca0c6326316e98374418630352433be8e6"},"previous_names":["marco-ippolito/amaro","nodejs/amaro"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Famaro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Famaro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Famaro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodejs%2Famaro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodejs","download_url":"https://codeload.github.com/nodejs/amaro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253601036,"owners_count":21934248,"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-09-24T19:34:32.906Z","updated_at":"2025-05-14T22:08:27.357Z","avatar_url":"https://github.com/nodejs.png","language":"JavaScript","readme":"# Amaro\n\nAmaro is a wrapper around `@swc/wasm-typescript`, a WebAssembly port of the SWC TypeScript parser.\nIt's currently used as an internal in Node.js for [Type Stripping](https://github.com/nodejs/loaders/issues/208), but in the future it will be possible to be upgraded separately by users.\nThe main goal of this package is to provide a stable API for TypeScript parser, which is unstable and subject to change.\n\n\u003e Amaro means \"bitter\" in Italian. It's a reference to [Mount Amaro](https://en.wikipedia.org/wiki/Monte_Amaro_(Abruzzo)) on whose slopes this package was conceived.\n\n## How to Install\n\nTo install Amaro, run:\n\n```shell\nnpm install amaro\n```\n\n## How to Use\n\nBy default Amaro exports a `transformSync` function that performs type stripping.\nStack traces are preserved, by replacing removed types with white spaces.\n\n```javascript\nconst amaro = require('amaro');\nconst { code } = amaro.transformSync(\"const foo: string = 'bar';\", { mode: \"strip-only\" });\nconsole.log(code); // \"const foo         = 'bar';\"\n```\n\n### Loader\n\nIt is possible to use Amaro as an external loader to execute TypeScript files.\nThis allows the installed Amaro to override the Amaro version used by Node.js.\nIn order to use Amaro as an external loader, type stripping needs to be enabled.\n\n```bash\nnode --experimental-strip-types --import=\"amaro/register\" script.ts\n```\n\nOr with the alias:\n\n```bash\nnode --experimental-strip-types --import=\"amaro/strip\" script.ts\n```\n\nEnabling TypeScript feature transformation:\n\n```bash\nnode --experimental-transform-types --import=\"amaro/transform\" script.ts\n```\n\n\u003e Note that the \"amaro/transform\" loader should be used with `--experimental-transform-types` flag, or\n\u003e at least with `--enable-source-maps` flag, to preserve the original source maps.\n\n### TypeScript Version\n\nThe supported TypeScript version is 5.8.\n\n## License (MIT)\n\nSee [`LICENSE.md`](./LICENSE.md).\n","funding_links":["https://github.com/sponsors/nodejs","https://opencollective.com/nodejs"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejs%2Famaro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodejs%2Famaro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodejs%2Famaro/lists"}