{"id":48030879,"url":"https://github.com/e18e/unplugin-replacements","last_synced_at":"2026-04-04T13:55:20.748Z","repository":{"id":328047545,"uuid":"1114073999","full_name":"e18e/unplugin-replacements","owner":"e18e","description":"An unplugin for applying modernization and performance replacements recommended by e18e","archived":false,"fork":false,"pushed_at":"2025-12-10T23:18:21.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-11T08:52:49.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/e18e.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"e18e"}},"created_at":"2025-12-10T21:33:31.000Z","updated_at":"2025-12-10T23:18:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/e18e/unplugin-replacements","commit_stats":null,"previous_names":["e18e/unplugin-replacements"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/e18e/unplugin-replacements","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e18e%2Funplugin-replacements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e18e%2Funplugin-replacements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e18e%2Funplugin-replacements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e18e%2Funplugin-replacements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/e18e","download_url":"https://codeload.github.com/e18e/unplugin-replacements/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e18e%2Funplugin-replacements/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"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":"2026-04-04T13:55:20.695Z","updated_at":"2026-04-04T13:55:20.742Z","avatar_url":"https://github.com/e18e.png","language":"TypeScript","funding_links":["https://opencollective.com/e18e"],"categories":[],"sub_categories":[],"readme":"# @e18e/unplugin-replacements\n\n\u003e An unplugin to apply e18e-recommended modernization and performance replacements.\n\n\u003e [!WARNING]\n\u003e This plugin is experimental and not yet published publicly. Use at your own risk.\n\n## What is this?\n\nThis plugin automatically transforms your code at build time to use modern web platform features, improving performance and reducing bundle size.\n\n**Example:**\n\n```js\n// before\nconst lastItem = array[array.length - 1];\n\n// after: modern Array#at() method\nconst lastItem = array.at(-1);\n```\n\n## Install\n\n```bash\nnpm install @e18e/unplugin-replacements --save-dev\n```\n\n## Usage\n\n```ts\nimport { defineConfig } from 'vite'\nimport replacements from '@e18e/unplugin-replacements/vite'\n\nexport default defineConfig({\n  plugins: [\n    replacements({\n      // plugin options\n    })\n  ]\n})\n```\n\n## Options\n\n### `include`\n\nType: `Array\u003cstring\u003e`\n\nSpecify which codemods to include. When provided, only the listed transformations will be applied.\n\n```ts\nreplacements({\n  include: ['arrayAt', 'objectHasOwn']\n})\n```\n\n### `exclude`\n\nType: `Array\u003cstring\u003e`\n\nSpecify which codemods to exclude. All transformations will be applied except those listed.\n\n```ts\nreplacements({\n  exclude: ['arrayAt']\n})\n```\n\n\u003e [!NOTE]\n\u003e Available codemod names come from [@e18e/web-features-codemods](https://github.com/e18e/web-features-codemods).\n\n## Related Projects\n\n- [@e18e/eslint-plugin](https://github.com/e18e/eslint-plugin) - ESLint plugin suggesting and autofixing modernizations and performance improvements.\n- [@e18e/web-features-codemods](https://github.com/e18e/web-features-codemods) - Collection of codemods used to migrate codebases to modern web platform features.\n- [@e18e/cli](https://github.com/e18e/cli) - CLI tool to run the codemods interactively on your codebase and analyze your project for other performance opportunities.\n- [@e18e/mcp](https://github.com/e18e/mcp) - MCP server which advises agents on modernizations and performance improvements.\n- [module-replacements](https://github.com/es-tooling/module-replacements) - A community maintained data set of modern module replacements.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe18e%2Funplugin-replacements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fe18e%2Funplugin-replacements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe18e%2Funplugin-replacements/lists"}