{"id":28270723,"url":"https://github.com/redcmd/oniguruma-parser-cjs","last_synced_at":"2026-03-04T14:02:21.772Z","repository":{"id":291396856,"uuid":"977507608","full_name":"RedCMD/oniguruma-parser-cjs","owner":"RedCMD","description":"CommonJS wrapper for oniguruma-parser","archived":false,"fork":false,"pushed_at":"2025-05-04T11:19:54.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-17T22:13:53.117Z","etag":null,"topics":["commonjs","oniguruma"],"latest_commit_sha":null,"homepage":"https://github.com/slevithan/oniguruma-parser","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/RedCMD.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-05-04T11:19:50.000Z","updated_at":"2025-05-04T14:29:17.000Z","dependencies_parsed_at":"2025-05-04T11:42:29.624Z","dependency_job_id":"beeff02b-9063-4bfb-b0b2-c18fb1329dcd","html_url":"https://github.com/RedCMD/oniguruma-parser-cjs","commit_stats":null,"previous_names":["redcmd/oniguruma-parser-cjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RedCMD/oniguruma-parser-cjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedCMD%2Foniguruma-parser-cjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedCMD%2Foniguruma-parser-cjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedCMD%2Foniguruma-parser-cjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedCMD%2Foniguruma-parser-cjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedCMD","download_url":"https://codeload.github.com/RedCMD/oniguruma-parser-cjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedCMD%2Foniguruma-parser-cjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30083004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"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":["commonjs","oniguruma"],"created_at":"2025-05-20T17:20:31.339Z","updated_at":"2026-03-04T14:02:21.750Z","avatar_url":"https://github.com/RedCMD.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oniguruma-parser-cjs\n\nCommonJS wrapper for [oniguruma-parser](https://github.com/slevithan/oniguruma-parser).\n\n## Installation\n\n```sh\nnpm install oniguruma-parser-cjs\n```\n\n## Usage\n\n```js\n// CommonJS\nconst { toOnigurumaAst } = require('oniguruma-parser-cjs');\nconst ast = toOnigurumaAst('A.*');\nconsole.log(ast);\n\n// Optimizer\nconst { optimize } = require('oniguruma-parser-cjs/optimizer');\nconst optimized = optimize('[aa]', {\n\trules: {\n\t\t// `vscode-oniguruma` enables this Oniguruma option by default\n\t\tcaptureGroup: true,\n\t\tallowOrphanBackrefs: true,\n\t},\n}).pattern;\nconsole.log(optimized); // a\n```\n\n## Development\n\n### Setup\n\n```sh\n# Install dependencies\npnpm install\n```\n\n### Building and Testing\n\n```sh\n# Clean build artifacts\npnpm clean\n\n# Build the package\npnpm build\n\n# Run tests\npnpm test\n\n# Development workflow (clean, build, test)\npnpm dev\n```\n\n## Why\n\nThe original [oniguruma-parser](https://github.com/slevithan/oniguruma-parser) package is ESM-only, which can cause compatibility issues in CommonJS projects. This package provides a pre-built CommonJS version that can be used in any Node.js environment without the need for special configuration.\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredcmd%2Foniguruma-parser-cjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredcmd%2Foniguruma-parser-cjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredcmd%2Foniguruma-parser-cjs/lists"}