{"id":13452504,"url":"https://github.com/jeffijoe/typesync","last_synced_at":"2025-05-14T12:10:30.824Z","repository":{"id":22639513,"uuid":"96909111","full_name":"jeffijoe/typesync","owner":"jeffijoe","description":"Install missing TypeScript typings for dependencies in your package.json.","archived":false,"fork":false,"pushed_at":"2025-04-11T15:28:29.000Z","size":2509,"stargazers_count":1553,"open_issues_count":3,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-28T10:52:06.249Z","etag":null,"topics":["hacktoberfest","typescript"],"latest_commit_sha":null,"homepage":"","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/jeffijoe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-07-11T15:34:31.000Z","updated_at":"2025-04-25T22:44:31.000Z","dependencies_parsed_at":"2023-02-16T20:31:57.060Z","dependency_job_id":"3b65101a-e4a3-4b5f-bc04-1ca050146e65","html_url":"https://github.com/jeffijoe/typesync","commit_stats":{"total_commits":100,"total_committers":10,"mean_commits":10.0,"dds":"0.18000000000000005","last_synced_commit":"7227d67a1139f41dcabf90b8db60afb1d6c98258"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffijoe%2Ftypesync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffijoe%2Ftypesync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffijoe%2Ftypesync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffijoe%2Ftypesync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffijoe","download_url":"https://codeload.github.com/jeffijoe/typesync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254140757,"owners_count":22021219,"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":["hacktoberfest","typescript"],"created_at":"2024-07-31T07:01:26.008Z","updated_at":"2025-05-14T12:10:30.795Z","avatar_url":"https://github.com/jeffijoe.png","language":"TypeScript","readme":"# TypeSync\n\nInstall missing TypeScript typings for dependencies in your `package.json`.\n\n[![npm](https://img.shields.io/npm/v/typesync.svg?maxAge=1000)](https://www.npmjs.com/package/typesync)\n[![Build Status](https://github.com/jeffijoe/typesync/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jeffijoe/typesync/actions)\n[![Coveralls](https://img.shields.io/coveralls/jeffijoe/typesync.svg?maxAge=1000)](https://coveralls.io/github/jeffijoe/typesync)\n[![npm](https://img.shields.io/npm/dt/typesync.svg?maxAge=1000)](https://www.npmjs.com/package/typesync)\n[![license](https://img.shields.io/npm/l/typesync.svg?maxAge=1000)](https://github.com/jeffijoe/typesync/blob/master/LICENSE.md)\n[![node](https://img.shields.io/node/v/typesync.svg?maxAge=1000)](https://www.npmjs.com/package/typesync)\n\n![TypeSync](/typesync.gif)\n\n## Install\n\n```sh\nnpm install -g typesync\n```\n\nYou can also use it directly with `npx` which will install it for you:\n\n```sh\nnpx typesync\n```\n\n## Usage\n\n```sh\ntypesync [path/to/package.json] [--dry]\n```\n\nPath is relative to the current working directory. If omitted, defaults to `package.json`.\n\n**Note**: TypeSync only modifies your `package.json` - you still need to run an installer.\n\n### `--dry[=fail]`\n\nIf `--dry` is specified, will not actually write to the file, it only prints added/removed typings.\n\nThe same is true for `--dry=fail`, with the additional effect of failing the command in case there are changes.\nThis is useful for CI scenarios.\n\n### `--ignoredeps`\n\nTo ignore certain sections, you can use the `--ignoredeps=` flag. For example, to ignore `devDependencies`, use `--ignoredeps=dev`. To ignore multiple, comma-separate them, like this: `--ignoredeps=deps,peer` (ignores `dependencies` and `peerDependencies`).\n\n- `--ignoredeps=deps` — ignores `dependencies`\n- `--ignoredeps=dev` — ignores `devDependencies`\n- `--ignoredeps=peer` — ignores `peerDependencies`\n- `--ignoredeps=optional` — ignores `optionalDependencies`\n\n### `--ignorepackages`\n\nTo ignore certain packages, you can use the `--ignorepackages=` flag. For example, to ignore `nodemon`, use `--ignorepackages=nodemon`.\nTo ignore multiple, comma-separate them, like this: `--ignorepackages=nodemon,whatever` (ignores `nodemon` and `whatever`).\n\n### Using a config file\n\nAlternatively, you can use a TypeSync config file: `.typesyncrc` or a `\"typesync\"` section in your `package.json`. TypeSync will **automatically** search for configuration files. See [cosmiconfig][cosmiconfig] for details.\n\n```json\n// .typesyncrc\n{\n  \"ignoreDeps\": [\"dev\"],\n  \"ignorePackages\": [\"nodemon\"]\n}\n```\n\n### Run TypeSync automatically after every install\n\nTo run TypeSync and install packages automatically after every package install, create a file called `install-with-types.sh` with the following content:\n\n```sh\nnpm install $1\nnpx typesync\nnpm install\n```\n\nIf you use `yarn`, use this instead:\n\n```sh\nyarn add $1\nyarn typesync\nyarn\n```\n\nRun this command to make the file executable:\n\n```sh\nchmod +x install-with-types.sh\n```\n\nAdd the following to `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"i\": \"./install-with-types.sh\"\n  }\n}\n```\n\nThen install packages like this:\n\n```sh\nnpm run i \u003cpkg name\u003e\n\n# Or with Yarn:\nyarn i \u003cpkg name\u003e\n```\n\n## Typings packages\n\nTypeSync will add typings for packages that:\n\n- have a `@types/package` available\n- don't already provide typings internally (the `typings` and `types` field in `package.json`)\n\nTypeSync will try to respect SemVer parity for the code and typings packages, and will fall back to the latest available typings package.\n\nWhen writing the typings package version to `package.json`, the `~` SemVer range is used. This is because typings published via [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped#how-do-definitely-typed-package-versions-relate-to-versions-of-the-corresponding-library) align typings versions with library versions using major and minor only.\n\nFor example, if you depend on `react@^16.14.0`, then TypeSync will only look for typings packages that match `16.14.*`.\n\n## Monorepos\n\nTypeSync added support for monorepos in v0.4.0. It will look at `packages`/`workspaces` globs in `package.json` and sync every matching file in one fell swoop.\n\n## Why?\n\nInstalling typings manually sucks. Flow has `flow-typed` which installs type definitions by looking at a `package.json`, which would be cool to have for TypeScript. Now we do!\n\n## Changelog\n\nSee [CHANGELOG.md](/CHANGELOG.md)\n\n## Author\n\nJeff Hansen - [@Jeffijoe](https://twitter.com/jeffijoe)\n\n[cosmiconfig]: https://github.com/davidtheclark/cosmiconfig\n","funding_links":[],"categories":["TypeScript","hacktoberfest","typescript","Types"],"sub_categories":["IDE"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffijoe%2Ftypesync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffijoe%2Ftypesync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffijoe%2Ftypesync/lists"}