{"id":26920346,"url":"https://github.com/sourcegraph/scip-typescript","last_synced_at":"2025-04-09T05:08:11.346Z","repository":{"id":37197685,"uuid":"454401814","full_name":"sourcegraph/scip-typescript","owner":"sourcegraph","description":"SCIP indexer for TypeScript and JavaScript","archived":false,"fork":false,"pushed_at":"2025-03-31T17:37:37.000Z","size":1899,"stargazers_count":59,"open_issues_count":64,"forks_count":21,"subscribers_count":38,"default_branch":"main","last_synced_at":"2025-04-05T15:11:58.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcegraph.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}},"created_at":"2022-02-01T13:38:57.000Z","updated_at":"2025-04-04T04:40:36.000Z","dependencies_parsed_at":"2024-06-25T23:37:30.390Z","dependency_job_id":"0be415f1-1530-456c-a752-2655c1ff4f87","html_url":"https://github.com/sourcegraph/scip-typescript","commit_stats":{"total_commits":281,"total_committers":15,"mean_commits":"18.733333333333334","dds":0.6085409252669038,"last_synced_commit":"f72053626e24292a60eb033d49c2413c8809800d"},"previous_names":["sourcegraph/lsif-typescript"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fscip-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fscip-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fscip-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fscip-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcegraph","download_url":"https://codeload.github.com/sourcegraph/scip-typescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980837,"owners_count":21027808,"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":"2025-04-01T22:28:53.936Z","updated_at":"2025-04-09T05:08:11.323Z","avatar_url":"https://github.com/sourcegraph.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scip-typescript\n\n[SCIP](https://github.com/sourcegraph/scip) indexer for TypeScript and JavaScript.\n\n## Quick start\n\n### Installation\n\n```sh\nnpm install -g @sourcegraph/scip-typescript\n```\n\nCurrently, Node v18, Node v20 are supported. \u003c!-- Source of truth: .github/workflows/ci.yml --\u003e\n\n### Indexing a TypeScript project\n\nNavigate to the project root, containing `tsconfig.json`.\n\n```sh\nnpm install # or yarn install\nscip-typescript index\n```\n\n### Indexing a JavaScript project\n\nNavigate to the project root, containing `package.json`.\n\n```sh\nnpm install # or yarn install\nscip-typescript index --infer-tsconfig\n```\n\nTo improve the quality of indexing results for JavaScript,\nconsider adding `@types/*` packages as `devDependencies` in `package.json`.\n\n### Index a TypeScript project using Yarn workspaces\n\nNavigate to the project root, containing `package.json`.\n\n```sh\nyarn install\n\nscip-typescript index --yarn-workspaces\n```\n\n### Index a TypeScript project using pnpm workspaces\n\nNavigate to the project root, containing `package.json`.\n\n```sh\npnpm install\n\nscip-typescript index --pnpm-workspaces\n```\n\n### Indexing in CI\n\nAdd the following run steps to your CI pipeline:\n\n```sh\nnpm install -g @sourcegraph/scip-typescript @sourcegraph/src\nnpm install # or yarn install\nscip-typescript index\n# Upload index with any necessary tokens (shown here using GitHub workflow syntax)\nsrc lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress\n```\n\nFor more examples, see the\n[Sourcegraph docs](https://docs.sourcegraph.com/code_intelligence/how-to/index_a_typescript_and_javascript_repository).\n\n### Troubleshooting stalled progress\n\nIf `scip-typescript index` is not showing progress, try running it again with\nthe `--progress-bar` flag. The progress bar prints out the current file being\nindexed that could reveal details why progress is stalling. The progress bar\nis disabled by default because it prints out a lot of noise in CI logs, and\nthe most common environment to run scip-typescript is in CI.\n\n### Dealing with out of memory issues (OOM)\n\nYou may experience OOM issues when indexing large codebases\n\n```\n\u003c--- JS stacktrace ---\u003e\n\nFATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory\n 1: 0xb7b150 node::Abort() [node]\n 2: 0xa8c89a  [node]\n 3: 0xd62ea0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]\n 4: 0xd63247 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]\n 5: 0xf40945  [node]\n 6: 0xf52e2d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]\n ...\n```\n\nTo fix this problem, try one of the following steps:\n\n- Add `--no-global-caches` to the index command like this `scip-typescript\nindex --no-global-caches REST_OF_THE_COMMAND`. By default, scip-typescript\n  caches symbol indexing across TypeScript projects to speed up indexing. This\n  cache increases the memory footprint, which can cause OOM. Disabling this cache\n  slows down indexing but reduces the memory footprint.\n- Increase memory to the Node.js process by running scip-typescript like this\n  `node --max-old-space-size=16000 \"$(which scip-typescript)\" index REST_OF_COMMAND`.\n  Replace 16000 with an even larger number if your computer has bigger RAM.\n\n## Migrating from lsif-node\n\nBefore creating scip-typescript, we used another TypeScript indexer called\n[lsif-node](https://github.com/sourcegraph/lsif-node). We recommend migrating\nto scip-typescript if you are using lsif-node.\n\nFollow the steps below to migrate from lsif-node to scip-typescript:\n\n- Replace usages of the `lsif-tsc -p ARGUMENTS` command with `scip-typescript index ARGUMENTS`.\n- Upgrade to the latest version of the `src` command-line interface, which you\n  can install via `yarn global add @sourcegraph/src`. It’s okay if the version\n  of your `src` command-line interface does not match the version of your\n  Sourcegraph instance.\n\n## Contributing\n\nSee [Development.md](./Development.md) for docs on how to work on this project.\n\nContributors should follow the [Sourcegraph Community Code of Conduct](https://handbook.sourcegraph.com/company-info-and-process/community/code_of_conduct/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcegraph%2Fscip-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcegraph%2Fscip-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcegraph%2Fscip-typescript/lists"}