{"id":43175666,"url":"https://github.com/jacobshirley/soql-parser-lite","last_synced_at":"2026-02-01T03:04:04.862Z","repository":{"id":334044073,"uuid":"1116409335","full_name":"jacobshirley/soql-parser-lite","owner":"jacobshirley","description":"Zero-dependency Salesforce Object Query Language (SOQL) parser written in TypeScript","archived":false,"fork":false,"pushed_at":"2026-01-29T18:50:31.000Z","size":81,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-30T07:19:10.338Z","etag":null,"topics":["objects","oop","parser","parsing","query","salesforce","soql"],"latest_commit_sha":null,"homepage":"https://jacobshirley.github.io/soql-parser-lite/","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/jacobshirley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-14T19:56:27.000Z","updated_at":"2025-12-31T21:18:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jacobshirley/soql-parser-lite","commit_stats":null,"previous_names":["jacobshirley/soql-parser-lite"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jacobshirley/soql-parser-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobshirley%2Fsoql-parser-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobshirley%2Fsoql-parser-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobshirley%2Fsoql-parser-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobshirley%2Fsoql-parser-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobshirley","download_url":"https://codeload.github.com/jacobshirley/soql-parser-lite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobshirley%2Fsoql-parser-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28965436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T02:14:24.993Z","status":"ssl_error","status_checked_at":"2026-02-01T02:13:55.706Z","response_time":56,"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":["objects","oop","parser","parsing","query","salesforce","soql"],"created_at":"2026-02-01T03:04:04.808Z","updated_at":"2026-02-01T03:04:04.855Z","avatar_url":"https://github.com/jacobshirley.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**[Examples](./EXAMPLES.md)** | **[Documentation](https://jacobshirley.github.io/soql-parser-lite/v1)**\n\n# soql-parser-lite\n\nA zero-dependency, TypeScript/JavaScript parser for SOQL (Salesforce Object Query Language) that converts query strings into structured objects.\n\n[![npm version](https://img.shields.io/npm/v/soql-parser-lite.svg)](https://www.npmjs.com/package/soql-parser-lite)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Features\n\n- 🔍 **Complete SOQL Support**: Parses all major SOQL clauses (SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET)\n- 📦 **TypeScript First**: Fully typed API with comprehensive type definitions\n- 🚀 **Zero Dependencies**: Lightweight with no external runtime dependencies\n- 🔄 **Streaming Support**: Can parse queries incrementally from streams\n- 🎯 **Accurate**: Handles complex queries including subqueries, aggregate functions, and nested field paths\n- 🛡️ **Error Handling**: Provides detailed error messages for malformed queries\n\n## Installation\n\n```bash\nnpm install soql-parser-lite\n```\n\nOr with pnpm:\n\n```bash\npnpm add soql-parser-lite\n```\n\nOr with yarn:\n\n```bash\nyarn add soql-parser-lite\n```\n\n## Quick Start\n\n```typescript\nimport { parseSoqlQuery } from 'soql-parser-lite'\n\n// Parse a simple query\nconst query = parseSoqlQuery(\n    'SELECT Id, Name FROM Account WHERE Status = \"Active\" LIMIT 10',\n)\n\nconsole.log(JSON.stringify(query, null, 2))\n\n// Output:\n/*\n{\n  \"select\": {\n    \"items\": [\n      {\n        \"item\": {\n          \"name\": \"Id\"\n        }\n      },\n      {\n        \"item\": {\n          \"name\": \"Name\"\n        }\n      }\n    ]\n  },\n  \"from\": {\n    \"objects\": [\n      {\n        \"name\": \"Account\"\n      }\n    ]\n  },\n  \"where\": {\n    \"expr\": {\n      \"left\": {\n        \"name\": \"Status\"\n      },\n      \"right\": {\n        \"value\": \"Active\"\n      }\n    }\n  },\n  \"limit\": 10\n}\n*/\n```\n\n## Usage Examples\n\n### Basic Query\n\n```typescript\nimport { parseSoqlQuery } from 'soql-parser-lite'\n\nconst query = parseSoqlQuery('SELECT Id, Name, Email FROM Contact')\n```\n\n### Query with WHERE Clause\n\n```typescript\nconst query = parseSoqlQuery(\n    'SELECT Id, Name FROM Account WHERE Status = \"Active\" AND Revenue \u003e 1000000',\n)\n```\n\n### Query with Aggregate Functions\n\n```typescript\nconst query = parseSoqlQuery(\n    'SELECT COUNT(Id) cnt, MAX(Amount) maxAmount FROM Opportunity GROUP BY StageName',\n)\n```\n\n### Query with Subquery\n\n```typescript\nconst query = parseSoqlQuery(\n    'SELECT Name, (SELECT LastName FROM Contacts) FROM Account',\n)\n```\n\n### Query with Date Literals\n\n```typescript\nconst query = parseSoqlQuery('SELECT Id FROM Case WHERE CreatedDate = TODAY')\n```\n\n### Query with ORDER BY and LIMIT\n\n```typescript\nconst query = parseSoqlQuery(\n    'SELECT Id, Name, CreatedDate FROM Account ORDER BY CreatedDate DESC LIMIT 100 OFFSET 50',\n)\n```\n\n### Query with Relationship Fields\n\n```typescript\nconst query = parseSoqlQuery(\n    'SELECT Id, Account.Name, Account.Owner.Email FROM Contact',\n)\n```\n\n## Supported SOQL Features\n\n- ✅ SELECT clause with fields, aggregate functions, and subqueries\n- ✅ FROM clause with multiple objects and aliases\n- ✅ WHERE clause with comparison and logical operators\n- ✅ GROUP BY clause\n- ✅ HAVING clause\n- ✅ ORDER BY clause with ASC/DESC\n- ✅ LIMIT clause\n- ✅ OFFSET clause\n- ✅ Date literals (TODAY, YESTERDAY, LAST_N_DAYS, etc.)\n- ✅ Bind variables (:variable)\n- ✅ IN operator with arrays and subqueries\n- ✅ Relationship field paths (Account.Owner.Name)\n- ✅ Aggregate functions (COUNT, MAX, MIN, SUM, AVG)\n- ✅ Field aliases\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Build the project\npnpm run compile\n\n# Run tests\npnpm test\n\n# Format code\npnpm run format\n\n# Generate documentation\npnpm run docs:gen\n```\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for details.\n\n## License\n\nMIT © [Jacob Shirley](https://github.com/jacobshirley)\n\n## Related Projects\n\n- [Salesforce SOQL Documentation](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm)\n\n## Support\n\n- 📚 [Documentation](https://jacobshirley.github.io/soql-parser-lite/v1)\n- 💬 [GitHub Issues](https://github.com/jacobshirley/soql-parser-lite/issues)\n- 📖 [Examples](./EXAMPLES.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobshirley%2Fsoql-parser-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobshirley%2Fsoql-parser-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobshirley%2Fsoql-parser-lite/lists"}