Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,16 @@

"./types/**/*.md"
],
"prettier": {
"associations": [
"**/*.{yaml,yml}"
],
"yml.tabWidth": 2,
"yaml.tabWidth": 2,
"yml.singleQuote": true,
"yaml.singleQuote": true
"yaml": {
"indentWidth": 2,
"quotes": "preferSingle"
},
// NOTE: if extending this list, also update settings.template.json.
"plugins": [
"https://plugins.dprint.dev/typescript-0.91.4.wasm",
"https://plugins.dprint.dev/json-0.19.3.wasm",
"https://plugins.dprint.dev/markdown-0.17.1.wasm",
"https://plugins.dprint.dev/prettier-0.40.0.json@68c668863ec834d4be0f6f5ccaab415df75336a992aceb7eeeb14fdf096a9e9c"
"https://plugins.dprint.dev/typescript-0.93.3.wasm",
"https://plugins.dprint.dev/json-0.19.4.wasm",
"https://plugins.dprint.dev/markdown-0.17.8.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm"
],
"indentWidth": 4,
"lineWidth": 120,
Expand Down
34 changes: 10 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,15 @@ then follow the instructions to [edit an existing package](#edit-an-existing-pac

Once you've tested your package, you can share it on Definitely Typed.

First, [fork](https://guides.github.com/activities/forking/) this repository, [clone](#partial-clone) it,
install [node](https://nodejs.org/) and run `pnpm install`. Note that `pnpm install` will install the _entire_
repository, including packages you may not be editing. If you'd like to install only a subset,
you can run `pnpm install -w --filter "{./types/foo}..."` to install `@types/foo` and all of
its dependencies. If you need to run tests for packages that _depend_ on `@types/foo`, you can run `pnpm install -w --filter "...{./types/foo}..."` to pull in all related packages for testing.
1. [Fork](https://guides.github.com/activities/forking/) this repository.
1. Clone it.
- The Definitely Typed repo is large; you may want to consider using a ["blobless clone"](https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/#user-content-blobless-clones) to save time and space by passing `--filter=blob:none` when running `git clone`.
1. Install [node](https://nodejs.org/).
1. Run `pnpm install`.
- `pnpm install` will install the _entire_
repository, including packages you may not be editing. If you'd like to install only a subset,
you can run `pnpm install -w --filter "{./types/foo}..."` to install `@types/foo` and all of
its dependencies. If you need to run tests for packages that _depend_ on `@types/foo`, you can run `pnpm install -w --filter "...{./types/foo}..."` to pull in all related packages for testing.

> [!NOTE]
> If you are using Windows, you may find that `git clean` does not remove the `node_modules` directory or hangs when doing so. If you need to remove `node_modules`, you can run `pnpm clean-node-modules` to reset the repo.
Expand All @@ -148,24 +152,6 @@ We use a bot to let a large number of pull requests to DefinitelyTyped be handle

<img src="https://raw.githubusercontent.com/microsoft/DefinitelyTyped-tools/main/packages/mergebot/docs/dt-mergebot-lifecycle.svg">

#### Partial clone

<details>
<summary>You can clone the entire repository <a href='https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository'>as per usual</a>, but it's large and includes a massive directory of type packages.</summary>

You can clone the entire repository [as per usual](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository), but it's large and includes a massive directory of type packages. This will take some time to clone and may be unnecessarily unwieldy.

For a more manageable clone that includes _only_ the type packages relevant to you, you can use git's [`sparse-checkout`](https://git-scm.com/docs/git-sparse-checkout) and [`--filter`](https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---filterltfilter-specgt) features. This will reduce clone time and improve git performance.

> :warning: This requires minimum [git version 2.27.0](https://git-scm.com/downloads), which is likely newer than the default on most machines. More complicated procedures are available in older versions, but not covered by this guide.

1. `git clone --sparse --filter=blob:none <forkedUrl>`
- `--sparse` initializes the sparse-checkout file so the working directory starts with only the files in the root of the repository.
- `--filter=blob:none` will including all commit history but exclude files, fetching them only as needed.
2. `git sparse-checkout add types/<type> types/<dependency-type> ...`

</details>

#### Edit an existing package

- Make changes. Remember to [edit tests](#my-package-teststs).
Expand Down Expand Up @@ -605,7 +591,7 @@ Then they are wrong and we've not noticed yet. You can help by submitting a pull
Yes, using [dprint](https://dprint.dev).
We recommend using a [dprint extension for your editor](https://dprint.dev/install/#editor-extensions).

Alternatively, you can enable a git hook which will format your code automatically. Run `pnpm run setup-hooks`. Then, when you commit, `dprint fmt` command will be executed on changed files. If you take advantage of [partial clone](#partial-clone), make sure to call `git sparse-checkout add .husky` to check out the git hooks before running the `setup-hooks` script.
Alternatively, you can enable a git hook which will format your code automatically. Run `pnpm run setup-hooks`. Then, when you commit, `dprint fmt` command will be executed on changed files.

Pull requests do not require correct formatting to be merged.
Any unformatted code will be automatically reformatted after being merged.
Expand Down
20 changes: 20 additions & 0 deletions notNeededPackages.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,14 @@
"libraryName": "burns",
"asOfVersion": "2.1.0"
},
"cache-manager": {
"libraryName": "cache-manager",
"asOfVersion": "5.0.0"
},
"cache-manager-redis-store": {
"libraryName": "cache-manager-redis-store",
"asOfVersion": "3.0.0"
},
"cacheable-request": {
"libraryName": "cacheable-request",
"asOfVersion": "8.3.1"
Expand Down Expand Up @@ -1028,6 +1036,10 @@
"libraryName": "contentstack",
"asOfVersion": "3.11.0"
},
"conventional-changelog-preset-loader": {
"libraryName": "conventional-changelog-preset-loader",
"asOfVersion": "5.0.0"
},
"conventional-recommended-bump": {
"libraryName": "conventional-recommended-bump",
"asOfVersion": "10.0.0"
Expand Down Expand Up @@ -3665,6 +3677,10 @@
"libraryName": "meow",
"asOfVersion": "6.0.0"
},
"merge-refs": {
"libraryName": "merge-refs",
"asOfVersion": "1.1.0"
},
"mermaid": {
"libraryName": "mermaid",
"asOfVersion": "9.2.0"
Expand Down Expand Up @@ -4157,6 +4173,10 @@
"libraryName": "openid-client",
"asOfVersion": "3.7.0"
},
"openpgp": {
"libraryName": "openpgp",
"asOfVersion": "5.0.0"
},
"opn": {
"libraryName": "opn",
"asOfVersion": "5.5.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@definitelytyped/typescript-versions": "latest",
"@definitelytyped/utils": "latest",
"danger": "^11.2.3",
"dprint": "^0.47.2",
"dprint": "^0.49.0",
"eslint-plugin-jsdoc": "^44.2.7",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
Expand Down
2 changes: 1 addition & 1 deletion types/cache-manager-fs-hash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://github.com/rolandstarke/node-cache-manager-fs-hash#readme"
],
"dependencies": {
"@types/cache-manager": "*"
"@types/cache-manager": "<4"
},
"devDependencies": {
"@types/cache-manager-fs-hash": "workspace:."
Expand Down
2 changes: 1 addition & 1 deletion types/cache-manager-ioredis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://github.com/dabroek/node-cache-manager-ioredis"
],
"dependencies": {
"@types/cache-manager": "*",
"@types/cache-manager": "<3",
"@types/ioredis": "^4.28.10"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion types/cache-manager-memcached-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://github.com/theogravity/node-cache-manager-memcached-store"
],
"dependencies": {
"@types/cache-manager": "*"
"@types/cache-manager": "<4"
},
"devDependencies": {
"@types/cache-manager-memcached-store": "workspace:."
Expand Down
5 changes: 0 additions & 5 deletions types/cache-manager-redis-store/.npmignore

This file was deleted.

38 changes: 0 additions & 38 deletions types/cache-manager-redis-store/cache-manager-redis-store-tests.ts

This file was deleted.

26 changes: 0 additions & 26 deletions types/cache-manager-redis-store/index.d.ts

This file was deleted.

21 changes: 0 additions & 21 deletions types/cache-manager-redis-store/package.json

This file was deleted.

19 changes: 0 additions & 19 deletions types/cache-manager-redis-store/tsconfig.json

This file was deleted.

7 changes: 0 additions & 7 deletions types/cache-manager/.eslintrc.json

This file was deleted.

5 changes: 0 additions & 5 deletions types/cache-manager/.npmignore

This file was deleted.

Loading