From d9f877920e6961d5e9eb4b3119e6e60f344d0b0f Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Tue, 22 Dec 2020 14:05:24 -0700 Subject: [PATCH] [README] Replace NPM -> npm (#50241) --- .gitattributes | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- README.cn.md | 20 ++++++++++---------- README.es.md | 16 ++++++++-------- README.ja.md | 20 ++++++++++---------- README.ko.md | 16 ++++++++-------- README.md | 20 ++++++++++---------- README.pt.md | 30 +++++++++++++++--------------- README.ru.md | 16 ++++++++-------- docs/admin.md | 2 +- 10 files changed, 72 insertions(+), 72 deletions(-) diff --git a/.gitattributes b/.gitattributes index ac1e451d56b9bd..a62e845caf09fd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ # Auto detect text files and perform LF normalization * text=auto -# Checkout NPM package files with forced LF lineendings +# Checkout npm package files with forced LF lineendings # to prevent git conflicts when running npm commands package.json text eol=lf package-lock.json text eol=lf diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0af03ace772a91..edf38d685b17a1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,7 +11,7 @@ Select one of these and delete the others: If adding a new definition: - [ ] The package does not already provide its own types, or cannot have its `.d.ts` files generated via `--declaration` -- [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package. +- [ ] If this is for an npm package, match the name. If not, do not conflict with the name of an npm package. - [ ] Create it with `dts-gen --dt`, not by basing it on an existing project. - [ ] Represents shape of module/library [correctly](https://www.typescriptlang.org/docs/handbook/declaration-files/library-structures.html) - [ ] `tslint.json` [should contain](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#linter-tslintjson) `{ "extends": "dtslint/dt.json" }`, and no additional rules. diff --git a/README.cn.md b/README.cn.md index 4b2220dab06a88..ad4654f21a0cb0 100644 --- a/README.cn.md +++ b/README.cn.md @@ -62,7 +62,7 @@ npm install --save-dev @types/node 编译器中会自动包含这些类型。 可以在 [手册](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html) 中查看更多信息。 -对于 NPM 包 "foo",它的类型将是 "@types/foo"。 +对于 npm 包 "foo",它的类型将是 "@types/foo"。 如果没有找到你的包,请在 [TypeSearch](https://microsoft.github.io/TypeSearch/) 查询。 如果你仍然没有找到它,请检查它是否 [捆绑](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) 了自己的类型。 @@ -171,8 +171,8 @@ Version | Released | End of Support 如果你是库作者并且你的包是用 TypeScript 编写的,那么请在你的包里 [捆绑自动生成的声明文件](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) 而不是发布到 Definitely Typed. -如果你要为 NPM 包添加类型,请创建具有相同名字的目录。 -如果你要添加类型的包不再 NPM 上,请确保为它选择的名字不会与 NPM 上面的包名冲突。 +如果你要为 npm 包添加类型,请创建具有相同名字的目录。 +如果你要添加类型的包不再 npm 上,请确保为它选择的名字不会与 npm 上面的包名冲突。 (你可以使用 `npm info foo` 来检查 `foo` 包是否存在。) 你的包应该具有这样的结构: @@ -348,17 +348,17 @@ Once a week the Definition Owners are synced to the file [.github/CODEOWNERS](ht ## FAQ -#### 这个仓库和 NPM 上的 `@types` 包究竟有什么关系? +#### 这个仓库和 npm 上的 `@types` 包究竟有什么关系? -`master` 分支会通过 [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) 自动发布到 NPM 上的 `@types`. +`master` 分支会通过 [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) 自动发布到 npm 上的 `@types`. #### 我已经发起了 PR, 它多久会被合并? 这得看情况,但是大多数的 PR 会在一周内被合并。已经由定义包头部中的作者同意的 PR 通常会更快被合并。新定义类型的 PR 需要更多时间,因为它们需要维护人员花更多的时间去审核。每一个 PR 在合并之前都会由 TypeScript 或 Definitely Typed 的团队成员进行审核,所以请耐心等待这些因为人为因素导致的延迟。通过查看 [New Pull Request Status Board](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5),可以看到维护人员在开放 PRs 的工作进度。 -#### 我的 PR 被合并了,什么时候 `@types` 的 NPM 包会被更新? +#### 我的 PR 被合并了,什么时候 `@types` 的 npm 包会被更新? -NPM 包应该会在几分钟内更新。如果已经超过了一小时,请在 [the Definitely Typed channel on the TypeScript Community Discord server](https://discord.gg/typescript) 上提及 PR 的编号,当前维护者会让团队成员去调查。 +npm 包应该会在几分钟内更新。如果已经超过了一小时,请在 [the Definitely Typed channel on the TypeScript Community Discord server](https://discord.gg/typescript) 上提及 PR 的编号,当前维护者会让团队成员去调查。 #### 我正在编写一个依赖其他类型定义的类型定义。我应该使用 `` 还是导入? @@ -400,7 +400,7 @@ NPM 包应该会在几分钟内更新。如果已经超过了一小时,请在 的编译器选项。 请不要更改准确的类型定义。 -对于一个 NPM 包,如果使用 `node -p 'require("foo")'` 去导入模块,那么 `export =` 是准确的。如果使用 `node -p 'require("foo").default'` 去导入模块,那么 `export default` 是准确的。 +对于一个 npm 包,如果使用 `node -p 'require("foo")'` 去导入模块,那么 `export =` 是准确的。如果使用 `node -p 'require("foo").default'` 去导入模块,那么 `export default` 是准确的。 #### 我想使用 TypeScript 3.3 或更高版本的功能。 @@ -447,7 +447,7 @@ NPM 包应该会在几分钟内更新。如果已经超过了一小时,请在 _注意:本节中的讨论假定你熟悉 [语义版本控制](https://semver.org/)_ -每个 Definitely Typed 包在发布到 NPM 时都会进行版本控制。 +每个 Definitely Typed 包在发布到 npm 时都会进行版本控制。 [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) (将 `@types` 包发布到 npm 的工具) 会通过将 `major.minor` 版本号写在 `index.d.ts` 文件的第一行来设置定义包的版本号。 例如,以下是 `10.12.x` 版本的 [Node 的类型声明](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1253faabf5e0d2c5470db6ea87795d7f96fef7e2/types/node/index.d.ts) 的前几行: @@ -462,7 +462,7 @@ _注意:本节中的讨论假定你熟悉 [语义版本控制](https://semver. 因为 `10.12` 在第一行的末尾,所以 `@types/node` 包的版本号也是 `10.12.x`. 注意在 `index.d.ts` 文件的第一行注释中应该只包含 `major.minor` 的版本号(比如 `10.12`),不应该包含补丁版本(例如 `10.12.4`)。 这是因为只有主要版本号和次要版本号在库包和类型声明包之间相对齐。 -类型声明包的补丁版本号(比如 `10.12.0` 中的 `.0`)是由 Definitely Typed 初始化为 0,每次将新的 `@types/node` 包发布到对应库的同一主/次版本的 NPM 是,他都会递增。 +类型声明包的补丁版本号(比如 `10.12.0` 中的 `.0`)是由 Definitely Typed 初始化为 0,每次将新的 `@types/node` 包发布到对应库的同一主/次版本的 npm 是,他都会递增。 有时候,类型声明包的版本号和库包的版本号可能会不同步。 以下是一些常见的原因,是按照给库的用户带来不便的顺序排序的。 diff --git a/README.es.md b/README.es.md index 96f320ece9b8c0..cb24fb72784771 100644 --- a/README.es.md +++ b/README.es.md @@ -44,7 +44,7 @@ npm install --save-dev @types/node Los types deberían ser incluidos automáticamente por el compilador. Vea más en el [manual](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html). -Para un paquete NPM "foo", estos `typings` estarán en "@types/foo". +Para un paquete npm "foo", estos `typings` estarán en "@types/foo". Si no puedes encontrar tu paquete, búscalo en [TypeSearch](https://microsoft.github.io/TypeSearch/). Si aún no puedes encontrarlo, comprueba si el paquete ya [incluye](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) los typings. @@ -159,8 +159,8 @@ Si no lo hace, puedes hacerlo en el comentario asociado con el PR. Si eres el autor de la librería, o puedes hacer un pull request a la biblioteca, [bundle types](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) en vez de publicarlo en Definitely Typed. -Si estás agregando typings para un paquete NPM, crea un directorio con el mismo nombre. -Si el paquete al que le estás agregando typings no es para NPM, asegúrate de que el nombre que escojas no genere problemas con el nombre del paquete en NPM. +Si estás agregando typings para un paquete npm, crea un directorio con el mismo nombre. +Si el paquete al que le estás agregando typings no es para npm, asegúrate de que el nombre que escojas no genere problemas con el nombre del paquete en npm. (Puedes usar `npm info foo` para verificar la existencia del paquete `foo`.) Tu paquete debería tener esta estructura: @@ -312,17 +312,17 @@ Once a week the Definition Owners are synced to the file [.github/CODEOWNERS](ht ## FAQ -#### ¿Cuál es exactamente la relación entre este repositorio y los paquetes de `@types` en NPM? +#### ¿Cuál es exactamente la relación entre este repositorio y los paquetes de `@types` en npm? -La `master` branch es automáticamente publicada en el alcance de los `@types` en NPM gracias a los [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher). +La `master` branch es automáticamente publicada en el alcance de los `@types` en npm gracias a los [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher). #### He enviado un pull request. ¿Cuánto tardará en ser merged? Esto depende, pero la mayoría de los pull requests serán merged en alrededor de una semana. PRs que hayan sido aprobados por un autor listado en el encabezado de las definiciones usualmente son merged más rápidamente; PRs para nuevas definiciones tomarán más tiempo ya que requieren más revisiones de los mantenedores. Cada PR es revisado por un miembro de TypeScript o Definitely Typed antes de ser merged, por favor sé paciente debido a que factores humanos pueden causar retrasos. Revisa el [New Pull Request Status Board](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5) para ver el progreso mientras los mantenedores trabajan en los PRs abiertos. -#### Mi PR ha sido merged; ¿cuándo será actualizado el paquete de `@types` NPM? +#### Mi PR ha sido merged; ¿cuándo será actualizado el paquete de `@types` npm? -Los paquetes NPM deberán ser actualizados en unas cuantas horas. Si ha pasado más de 24 horas, menciona a @RyanCavanaugh y/o a @andy-ms en el PR para investigar. +Los paquetes npm deberán ser actualizados en unas cuantas horas. Si ha pasado más de 24 horas, menciona a @RyanCavanaugh y/o a @andy-ms en el PR para investigar. #### Estoy escribiendo una definición que depende de otra definición. Debería utilizar `` o una import? @@ -345,7 +345,7 @@ Si las types son parte de los estándares web, estas deberán ser contribuidas a Si la import predeterminada trabaja en tu ambiente, considera hacer un cambio en la opción de compilación [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) opción compilar. No cambies la type definition si es preciso. -Para un paquete NPM, `export =` es exacto si `node -p 'require("foo")'` es la export, y `export default` es exacto si `node -p 'require("foo").default'` es el export. +Para un paquete npm, `export =` es exacto si `node -p 'require("foo")'` es la export, y `export default` es exacto si `node -p 'require("foo").default'` es el export. #### Quiero usar las características de TypeScript 3.3 o superior. diff --git a/README.ja.md b/README.ja.md index 437674f36f61ee..02d3bc2dc24a61 100644 --- a/README.ja.md +++ b/README.ja.md @@ -63,7 +63,7 @@ npm install --save-dev @types/node 詳しくは[ハンドブック](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)を参照してください。 -「foo」という名前の NPM モジュール用の型定義は「@types/foo」になります。 +「foo」という名前の npm モジュール用の型定義は「@types/foo」になります。 パッケージが見つからない場合は [TypeSearch](https://microsoft.github.io/TypeSearch/) で検索してください。 検索しても見つからない場合は、パッケージ内に型定義が[含まれている](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)かどうか確認してください。 @@ -169,8 +169,8 @@ DefinitelyTyped への大量の PR を全てセルフサービス方式で処理 もし、あなたがライブラリの作者で、そのライブラリが TypeScript で書かれている場合は、 Definitely Typed で型定義を公開するのではなく、ライブラリのパッケージ自体に[自動生成された型定義ファイルをバンドル](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)してください。 -NPM のパッケージに型定義を追加する場合は、パッケージと同名でディレクトリを作成してください。 -NPM 上にないパッケージの型定義を追加したい場合は、その名前が NPM 上のパッケージを競合しないか確認してください。 +npm のパッケージに型定義を追加する場合は、パッケージと同名でディレクトリを作成してください。 +npm 上にないパッケージの型定義を追加したい場合は、その名前が npm 上のパッケージを競合しないか確認してください。 (`npm info foo` コマンドで、 `foo` パッケージが存在するかどうか確認できます。) 型定義パッケージは次のような構造にする必要があります: @@ -344,9 +344,9 @@ DefinitelyTyped では、ある特定のモジュールの型定義の品質を ## よくある質問 -#### 厳密には、このレポジトリと NPM 上の `@types` パッケージはどう関係していますか? +#### 厳密には、このレポジトリと npm 上の `@types` パッケージはどう関係していますか? -[DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) が、`master` ブランチの内容を自動的に、 NPM の `@types` スコープに公開してくれています。 +[DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) が、`master` ブランチの内容を自動的に、 npm の `@types` スコープに公開してくれています。 #### PR を送りましたが、どれぐらいでマージされますか? @@ -358,9 +358,9 @@ DefinitelyTyped では、ある特定のモジュールの型定義の品質を 通例、型定義ファイルのヘッダーに載っている著者が承認した PR はより早くマージされます。新しい型定義の PR は、 DefinitelyTyped のメンテナーからのレビューも必要になるので時間がかかります。各 PR は TypeScript や DefinitelyTyped のチームメンバーがマージ前にレビューします。人為的要因で遅れが発生する場合があるので、しばらくお待ちください。メンテナーがオープンな PR を処理している間は、 [New Pull Request Status Board](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5) で進捗を確認できます。 -#### PR はマージされましたが、 `@types` NPM パッケージはいつ更新されますか? +#### PR はマージされましたが、 `@types` npm パッケージはいつ更新されますか? -NPM パッケージは数分で更新されます。もし1時間以上かかっている場合は、 [TypeScript コミュニティの Discord サーバーの Definitely Typed のチャンネル](https://discord.gg/typescript) に PR 番号を連絡してください。当番のメンテナーが適切なチームメンバーに調査を依頼します。 +npm パッケージは数分で更新されます。もし1時間以上かかっている場合は、 [TypeScript コミュニティの Discord サーバーの Definitely Typed のチャンネル](https://discord.gg/typescript) に PR 番号を連絡してください。当番のメンテナーが適切なチームメンバーに調査を依頼します。 #### 作成中の型定義が別の型定義に依存しています。 `` を使うかインポートするか、どちらがよいですか? @@ -402,7 +402,7 @@ NPM パッケージは数分で更新されます。もし1時間以上かかっ コンパイラー オプションを確認してください。 型定義が正確に記述されているときは変更しないでください。 -NPM パッケージでは、モジュールを `node -p 'require("foo")'` でインポートできるときは `export =` が、 `node -p 'require("foo").default'` でインポートできるときは `export default` がそれぞれ正しい表記です。 +npm パッケージでは、モジュールを `node -p 'require("foo")'` でインポートできるときは `export =` が、 `node -p 'require("foo").default'` でインポートできるときは `export default` がそれぞれ正しい表記です。 #### TypeScript 3.3 以上にある機能を使いたいです。 @@ -456,7 +456,7 @@ NPM パッケージでは、モジュールを `node -p 'require("foo")'` でイ *注意: このセクションを読むには[セマンティック バージョニング](https://semver.org/)の知識が必要です。* -Definitely Typed の各パッケージは NPM に公開される際にバージョン番号が付されます。 +Definitely Typed の各パッケージは npm に公開される際にバージョン番号が付されます。 [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) (`@types` パッケージを npm に公開するツール)は、パッケージの `index.d.ts` の1行目に載っている `メジャー.マイナー` バージョン番号を使って、型定義パッケージのバージョンを付けます。 たとえば、下記は執筆時点(訳注: 英語版執筆当時)の [Node の型定義](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1253faabf5e0d2c5470db6ea87795d7f96fef7e2/types/node/index.d.ts)(バージョン `10.12.x` 用)の最初の数行です: @@ -471,7 +471,7 @@ Definitely Typed の各パッケージは NPM に公開される際にバージ 1行目の終わりが `10.12` なので、 `@types/node` パッケージの npm でのバージョン番号も `10.12.x` になります。 `index.d.ts` の1行目には `メジャー.マイナー` バージョンのみ(例: `10.12`)を含めます。パッチバージョンは含めないでください(`10.12.4` のようにはしない)。 これは、メジャーバージョンとマイナーバージョンの番号のみを、ライブラリ本体と型定義パッケージで揃えるためです。 -型定義パッケージのパッチバージョン番号(`10.12.0` なら `.0` の部分)は、 Definitely Typed 側で0に初期化され、対応するライブラリの同じメジャー・マイナーバージョン用の `@types/node` パッケージが NPM に公開されるたびに増えていきます。 +型定義パッケージのパッチバージョン番号(`10.12.0` なら `.0` の部分)は、 Definitely Typed 側で0に初期化され、対応するライブラリの同じメジャー・マイナーバージョン用の `@types/node` パッケージが npm に公開されるたびに増えていきます。 ときどき、型定義パッケージとライブラリ本体のバージョンが揃わなくなることがあります。 考えられる原因を、ライブラリ使用者にとって不便に思う順に下記に列挙します(訳注: 一番困るものが一番下)。 diff --git a/README.ko.md b/README.ko.md index 362e959ac4b88c..9240646ca8d788 100644 --- a/README.ko.md +++ b/README.ko.md @@ -66,7 +66,7 @@ npm install --save-dev @types/node 더 자세한 내용은 [안내서(Handbook)](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)에서 확인해보실 수 있습니다. -NPM 의 "foo" 패키지에 대응되는 자료형 패키지는 "@types/foo" 입니다. +npm 의 "foo" 패키지에 대응되는 자료형 패키지는 "@types/foo" 입니다. 원하시는 패키지를 찾을 수 없는 경우, [타입서치(TypeSearch)](https://microsoft.github.io/TypeSearch/) 사이트에서 한 번 찾아보세요. 그래도 찾을 수 없는 경우, 찾고 있는 패키지가 자료형(Typing)을 @@ -183,9 +183,9 @@ Definitely Typed는 여러분과 같은 많은 기여자들의 도움 덕분에 만약 라이브러리를 만드는 중이고 라이브러리가 타입스크립트(TypeScript)로 쓰여있다면, Definitely Typed 에 선언(Declaration)을 올리는 대신 패키지에 [자동생성된 선언(Declaration) 파일을 포함](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)시킬 수 있습니다. -NPM 패키지를 위한 자료형(Typing) 패키지를 만드시려면, 패키지의 이름과 같은 이름의 디렉토리를 만들어주세요. -NPM 에 올라가 있지 않은 패키지를 위한 자료형(Typing) 패키지를 만드시려면, 그 패키지가 NPM 에 올라와 있는 패키지와 이름이 겹치지 않는지 확인해주세요. -(`npm info foo` 명령어를 사용하여 `foo` 패키지가 NPM 에 있는지 확인할 수 있습니다.) +npm 패키지를 위한 자료형(Typing) 패키지를 만드시려면, 패키지의 이름과 같은 이름의 디렉토리를 만들어주세요. +npm 에 올라가 있지 않은 패키지를 위한 자료형(Typing) 패키지를 만드시려면, 그 패키지가 npm 에 올라와 있는 패키지와 이름이 겹치지 않는지 확인해주세요. +(`npm info foo` 명령어를 사용하여 `foo` 패키지가 npm 에 있는지 확인할 수 있습니다.) 새 자료형 패키지는 다음과 같은 구조로 구성되어있어야만 합니다. @@ -211,7 +211,7 @@ Definitely Typed 의 관리자들이 주기적으로 새로운 풀 리퀘스트( `npm run not-needed -- typingsPackageName asOfVersion [libraryName]` 명령어를 사용하여 자료형(Typing) 패키지를 삭제할 수 있습니다. - `typingsPackageName` 는 삭제할 디렉토리의 이름입니다. -- `asOfVersion` 는 새 스텁(Stub) 용 `@types/foo` 를 퍼블리시(Publish)할 버전입니다. 이 버전은 현재 NPM 에 올라간 버전보다 더 높은 버전이어야 합니다. +- `asOfVersion` 는 새 스텁(Stub) 용 `@types/foo` 를 퍼블리시(Publish)할 버전입니다. 이 버전은 현재 npm 에 올라간 버전보다 더 높은 버전이어야 합니다. - `libraryName` 는 패키지의 이름을 읽기 쉽게 쓴 것입니다. 즉, "angular2" 대신에 "Angular 2" 와 같이 쓰는 것이 좋습니다. (생략했을 경우에는 `typingsPackageName` 와 같은 것으로 취급됩니다.) Definitely Typed 의 다른 패키지들이 삭제된 자료형(Typing) 패키지를 사용하고 있을 경우, 형(Type)을 포함하기 시작한 원래 패키지를 사용하도록 수정해야합니다. 삭제된 자료형(Typing) 패키지를 사용하는 각 Definitely Typed 패키지들의 [`package.json`](#packagejson) 파일에 `"dependencies": { "foo": "x.y.z" }` 를 추가해주시면 됩니다. @@ -347,9 +347,9 @@ Once a week the Definition Owners are synced to the file [.github/CODEOWNERS](ht 상황에 따라 다르지만, 대부분의 풀 리퀘스트(Pull request)들은 일주일 안에 합쳐집니다. 머릿주석에 있는 저자 중 한명에 의해 승인된 풀 리퀘스트(Pull request)는 보통 더 빨리 합쳐집니다. 새로운 패키지에 대한 풀 리퀘스트(Pull request)는 관리자의 세세한 코드 리뷰를 필요로 하기 때문에 더 오래 걸리는 경우가 많습니다. 각 PR 들은 합쳐지기 전에 TypeScript or Definitely Typed 팀 구성원의 코드 리뷰를 받아야 하며, 이는 사람이 하는 일이기 때문에 느려질 수도 있으니 양해를 바랍니다. [풀 리퀘스트 번다운 보드(New Pull Request Status Board)](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5)에서 열린 풀 리퀘스트에 대한 관리자들의 진행도를 확인하실 수 있습니다. -#### 내 풀 리퀘스트(Pull request)는 합쳐졌습니다. 언제 NPM 에 `@types` 패키지가 갱신되나요? +#### 내 풀 리퀘스트(Pull request)는 합쳐졌습니다. 언제 npm 에 `@types` 패키지가 갱신되나요? -NPM 의 패키지들은 수시간 안에 갱신될 겁니다. 만약 24 시간이 지나도 갱신되지 않으면, 문제를 파악하기 위해 @RyanCavanaugh 나 @andy-ms 를 풀 리퀘스트(Pull request)에서 호출해주세요. +npm 의 패키지들은 수시간 안에 갱신될 겁니다. 만약 24 시간이 지나도 갱신되지 않으면, 문제를 파악하기 위해 @RyanCavanaugh 나 @andy-ms 를 풀 리퀘스트(Pull request)에서 호출해주세요. #### 다른 자료형 정의(Type definition)에 의존하는 자료형 정의(Type definition)을 만들고 있습니다. `` 와 임포트(import) 중 무엇을 사용해야하나요? @@ -373,7 +373,7 @@ NPM 의 패키지들은 수시간 안에 갱신될 겁니다. 만약 24 시간 타입스크립트(TypeScript) 2.7 이상을 사용하고 계시면 프로젝트 안에서 `--esModuleInterop` 를 사용해주세요. 그 이하의 경우, 디폴트 임포트(Default import)가 동작하는 환경(Webpack, SystemJS, esm)에서 작업 중이시면 [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) 를 사용하는 걸 고려해보세요. 자료형 정의(Type definition)가 맞는 경우에는 자료형 정의(Type definition)을 수정하지 마세요. -NPM 패키지의 경우, `node -p 'require("foo")'` 가 원하는 값이라면 `export =` 이 맞고, `node -p 'require("foo").default'` 이 원하는 값이라면 `export default` 이 맞습니다. +npm 패키지의 경우, `node -p 'require("foo")'` 가 원하는 값이라면 `export =` 이 맞고, `node -p 'require("foo").default'` 이 원하는 값이라면 `export default` 이 맞습니다. #### 자료형 선언(Type declaration)에서 타입스크립트(TypeScript) 3.3 이상의 기능을 사용하고 싶습니다. diff --git a/README.md b/README.md index 964d93e1cc4508..105e0e162c1098 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ You may need to add a `types` reference if you're not using modules: See more in the [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html). -For an NPM package "foo", typings for it will be at "@types/foo". +For an npm package "foo", typings for it will be at "@types/foo". If you can't find your package, look for it on [TypeSearch](https://microsoft.github.io/TypeSearch/). If you still can't find it, check if it [bundles](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) its own typings. @@ -169,8 +169,8 @@ If it doesn't, you can do so yourself in the comment associated with the PR. If you are the library author and your package is written in TypeScript, [bundle the autogenerated declaration files](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) in your package instead of publishing to Definitely Typed. -If you are adding typings for an NPM package, create a directory with the same name. -If the package you are adding typings for is not on NPM, make sure the name you choose for it does not conflict with the name of a package on NPM. +If you are adding typings for an npm package, create a directory with the same name. +If the package you are adding typings for is not on npm, make sure the name you choose for it does not conflict with the name of a package on npm. (You can use `npm info foo` to check for the existence of the `foo` package.) Your package should have this structure: @@ -349,9 +349,9 @@ Once a week the Definition Owners are synced to the file [.github/CODEOWNERS](ht ## FAQ -#### What exactly is the relationship between this repository and the `@types` packages on NPM? +#### What exactly is the relationship between this repository and the `@types` packages on npm? -The `master` branch is automatically published to the `@types` scope on NPM thanks to [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher). +The `master` branch is automatically published to the `@types` scope on npm thanks to [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher). #### I've submitted a pull request. How long until it is merged? @@ -363,9 +363,9 @@ Roughly: PRs that have been approved by an author listed in the definition's header are usually merged more quickly; PRs for new definitions will take more time as they require more review from maintainers. Each PR is reviewed by a TypeScript or Definitely Typed team member before being merged, so please be patient as human factors may cause delays. Check the [New Pull Request Status Board](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5) to see progress as maintainers work through the open PRs. -#### My PR is merged; when will the `@types` NPM package be updated? +#### My PR is merged; when will the `@types` npm package be updated? -NPM packages should update within a few minutes. If it's been more than an hour, mention the PR number on [the Definitely Typed channel on the TypeScript Community Discord server](https://discord.gg/typescript) and the current maintainer will get the correct team member to investigate. +npm packages should update within a few minutes. If it's been more than an hour, mention the PR number on [the Definitely Typed channel on the TypeScript Community Discord server](https://discord.gg/typescript) and the current maintainer will get the correct team member to investigate. #### I'm writing a definition that depends on another definition. Should I use `` or an import? @@ -407,7 +407,7 @@ or [`--esModuleInterop`](https://www.typescriptlang.org/docs/handbook/release-no compiler options. Do not change the type definition if it is accurate. -For an NPM package, `export =` is accurate if `node -p 'require("foo")'` works to import a module, and `export default` is accurate if `node -p 'require("foo").default'` works to import a module. +For an npm package, `export =` is accurate if `node -p 'require("foo")'` works to import a module, and `export default` is accurate if `node -p 'require("foo").default'` works to import a module. #### I want to use features from very new TypeScript versions. @@ -461,7 +461,7 @@ When it graduates draft mode, we may remove it from Definitely Typed and depreca *NOTE: The discussion in this section assumes familiarity with [Semantic versioning](https://semver.org/)* -Each Definitely Typed package is versioned when published to NPM. +Each Definitely Typed package is versioned when published to npm. The [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) (the tool that publishes `@types` packages to npm) will set the declaration package's version by using the `major.minor` version number listed in the first line of its `index.d.ts` file. For example, here are the first few lines of [Node's type declarations](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1253faabf5e0d2c5470db6ea87795d7f96fef7e2/types/node/index.d.ts) for version `10.12.x` at the time of writing: @@ -476,7 +476,7 @@ For example, here are the first few lines of [Node's type declarations](https:// Because `10.12` is at the end of the first line, the npm version of the `@types/node` package will also be `10.12.x`. Note that the first-line comment in the `index.d.ts` file should only contain the `major.minor` version (e.g. `10.12`) and should not contain a patch version (e.g. `10.12.4`). This is because only the major and minor release numbers are aligned between library packages and type declaration packages. -The patch release number of the type declaration package (e.g. `.0` in `10.12.0`) is initialized to zero by Definitely Typed and is incremented each time a new `@types/node` package is published to NPM for the same major/minor version of the corresponding library. +The patch release number of the type declaration package (e.g. `.0` in `10.12.0`) is initialized to zero by Definitely Typed and is incremented each time a new `@types/node` package is published to npm for the same major/minor version of the corresponding library. Sometimes type declaration package versions and library package versions can get out of sync. Below are a few common reasons why, in order of how much they inconvenience users of a library. diff --git a/README.pt.md b/README.pt.md index 38f892e2e833e1..c79209b798f422 100644 --- a/README.pt.md +++ b/README.pt.md @@ -36,7 +36,7 @@ Ela pode servir de ajuda para contribuidores que estejam passando por problemas * Build mais recente com [tipagem checada/analisada pelo linter](https://github.com/Microsoft/dtslint) de forma limpa: [![Build Status](https://dev.azure.com/definitelytyped/DefinitelyTyped/_apis/build/status/DefinitelyTyped.DefinitelyTyped?branchName=master)](https://dev.azure.com/definitelytyped/DefinitelyTyped/_build/latest?definitionId=1&branchName=master) * Todos os pacotes tem seus tipos checados/são analisadas pelo linter no typescript@next: [![Build status](https://dev.azure.com/definitelytyped/DefinitelyTyped/_apis/build/status/Nightly%20dtslint)](https://dev.azure.com/definitelytyped/DefinitelyTyped/_build/latest?definitionId=8) -* Todos os pacotes estão sendo [publicados no NPM](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) em menos de uma hora: [![Publish Status](https://dev.azure.com/definitelytyped/DefinitelyTyped/_apis/build/status/DefinitelyTyped.types-publisher-watchdog?branchName=master)](https://dev.azure.com/definitelytyped/DefinitelyTyped/_build/latest?definitionId=5&branchName=master) +* Todos os pacotes estão sendo [publicados no npm](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) em menos de uma hora: [![Publish Status](https://dev.azure.com/definitelytyped/DefinitelyTyped/_apis/build/status/DefinitelyTyped.types-publisher-watchdog?branchName=master)](https://dev.azure.com/definitelytyped/DefinitelyTyped/_build/latest?definitionId=5&branchName=master) * [typescript-bot](https://github.com/typescript-bot) esteve ativo no Definitely Typed [![Activity Status](https://dev.azure.com/definitelytyped/DefinitelyTyped/_apis/build/status/DefinitelyTyped.typescript-bot-watchdog?branchName=master)](https://dev.azure.com/definitelytyped/DefinitelyTyped/_build/latest?definitionId=6&branchName=master) * [Atualizações do status da infraestrutura](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/44317) atual @@ -48,7 +48,7 @@ Veja o [manual do TypeScript](http://www.typescriptlang.org/docs/handbook/declar ## Como eu consigo eles? -### NPM +### npm Esse é o método aconselhável: @@ -65,7 +65,7 @@ Talvez você precise adicionar a referência `types` se não estiver usando mód Veja mais no [manual](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html). -Para um pacote "foo" do NPM, suas tipagens serão "@types/foo". +Para um pacote "foo" do npm, suas tipagens serão "@types/foo". Se você não conseguir achar o pacote desejado, procure no [TypeSearch](https://microsoft.github.io/TypeSearch/). Se você mesmo assim não consegue achar o pacote, verifique se ele [inclui](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) seus próprios tipos. @@ -170,8 +170,8 @@ Se ele não o fizer, você mesmo pode fazer isso no comentário associado a PR. Se você é o autor de uma biblioteca e seu pacote está escrito em TypeScript, [inclua os arquivos de declaração gerados automaticamente](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) em seu pacote, em vez de publicá-los no Definitely Typed. -Se você está adicionando tipos para um pacote do NPM, crie um diretório com o mesmo nome do pacote. -Se o pacote ao qual você está adicionando tipos não está no NPM, tenha certeza de que o nome escolhido para ele não entre em conflito com o nome de um outro pacote no NPM. +Se você está adicionando tipos para um pacote do npm, crie um diretório com o mesmo nome do pacote. +Se o pacote ao qual você está adicionando tipos não está no npm, tenha certeza de que o nome escolhido para ele não entre em conflito com o nome de um outro pacote no npm. (Você pode executar `npm info foo` para verificar a existência do pacote `foo`.) Seu pacote deve possuir a seguinte estrutura: @@ -183,7 +183,7 @@ Seu pacote deve possuir a seguinte estrutura: | [`tsconfig.json`](#tsconfigjson) | Permite que você execute `tsc` dentro do pacote. | | [`tslint.json`](#linter-tslintjson) | Habilita a análise do código pelo linter. | -Gere esses arquivos executando `npx dts-gen --dt --name nome-do-seu-pacote --template module` se você possuir a versão 5.2.0 ou mais recente do NPM ou `npm install -g dts-gen` e `dts-gen --dt --name nome-do-seu-pacote --template module` caso possua uma versão mais antiga. +Gere esses arquivos executando `npx dts-gen --dt --name nome-do-seu-pacote --template module` se você possuir a versão 5.2.0 ou mais recente do npm ou `npm install -g dts-gen` e `dts-gen --dt --name nome-do-seu-pacote --template module` caso possua uma versão mais antiga. Veja todas as opções em [dts-gen](https://github.com/Microsoft/dts-gen). Se há outros arquivos `.d.ts` além do arquivo `index.d.ts`, tenha certeza de que eles são referenciados no arquivo `index.d.ts` ou nos testes. @@ -349,9 +349,9 @@ Uma vez por semana os Donos de definição são sincronizados para o arquivo [.g ## FAQ -#### Qual exatamente é a relação entre este repositório e os pacotes `@types` no NPM? +#### Qual exatamente é a relação entre este repositório e os pacotes `@types` no npm? -A branch `master` é automaticamente publicada ao escopo `@types` no NPM graças ao [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher). +A branch `master` é automaticamente publicada ao escopo `@types` no npm graças ao [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher). #### Eu já enviei uma pull request. Quanto tempo pode demorar até que haja um merge? @@ -363,9 +363,9 @@ Superficialmente: PRs que forem aprovadas por um autor listado no cabeçalho da definição geralmente sofrem merge mais rápido; PRs para novas definições levarão mais tempo para serem aprovadas, uma vez que requerem mais revisão dos mantenedores. Cada PR é revisada por um membro do time do TypeScript ou Definitely Typed antes de sofrer merge, então por favor, seja paciente, pois fatores humanos podem causar alguns atrasos. Verifique o [Painel de Status de Novas Pull Requests](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5) para checar o progresso enquanto os mantenedores revisam as PRs abertas. -#### Minha PR já sofreu merge; Quando é que o pacote `@types` no NPM será atualizado? +#### Minha PR já sofreu merge; Quando é que o pacote `@types` no npm será atualizado? -Pacotes do NPM devem atualizar dentro de alguns minutos. Se já passou de uma hora, mencione o número da PR [no canal do Discord do Definitely Typed](https://discord.gg/typescript) e um mantenedor vai contatar o membro certo do time para investigar. +Pacotes do npm devem atualizar dentro de alguns minutos. Se já passou de uma hora, mencione o número da PR [no canal do Discord do Definitely Typed](https://discord.gg/typescript) e um mantenedor vai contatar o membro certo do time para investigar. #### Eu estou criando uma definição que depende de outra definição. Eu deveria usar `` ou um import? @@ -406,7 +406,7 @@ Como na pergunta anterior, lembre-se de que você pode usar as opções de compi e [`--esModuleInterop`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#support-for-import-d-from-cjs-form-commonjs-modules-with---esmoduleinterop). Não mude a definição de tipo se ela já está correta. -Para um pacote NPM, `export =` é o certo, se `node -p 'require("foo")'` funciona para importar um módulo, e `export default` é o certo se `node -p 'require("foo").default'` funciona para importar um módulo. +Para um pacote npm, `export =` é o certo, se `node -p 'require("foo")'` funciona para importar um módulo, e `export default` é o certo se `node -p 'require("foo").default'` funciona para importar um módulo. #### Eu quero usar features do TypeScript 3.3 ou superior. @@ -455,8 +455,8 @@ Quando o padrão sair do papel, nós o removeremos do Definitely Typed e descont _NOTA: A discussão nesta sessão supõe familiaridade com [versionamento semântico](https://semver.org/)_ -Cada pacote do Definitely Typed é versionado ao ser publicado ao NPM. -O [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) (a ferramenta que publica pacotes `@types` ao NPM) definirá a declaração da versão do pacote usando o número da versão `major.minor` listado na primeira linha do seu arquivo `index.d.ts`. +Cada pacote do Definitely Typed é versionado ao ser publicado ao npm. +O [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) (a ferramenta que publica pacotes `@types` ao npm) definirá a declaração da versão do pacote usando o número da versão `major.minor` listado na primeira linha do seu arquivo `index.d.ts`. Por exemplo, aqui estão as primeiras linhas das [declarações de tipo do Node](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1253faabf5e0d2c5470db6ea87795d7f96fef7e2/types/node/index.d.ts) para a versão `10.12.x`, no momento de escrita: ```js @@ -467,10 +467,10 @@ Por exemplo, aqui estão as primeiras linhas das [declarações de tipo do Node] // Alberto Schiabel ``` -A versão do NPM do pacote `@types/node` será `10.12.x` porque está escrito `10.12` no final da primeira linha. +A versão do npm do pacote `@types/node` será `10.12.x` porque está escrito `10.12` no final da primeira linha. Note que o comentário da primeira linha no arquivo `index.d.ts` deve conter apenas a versão `major.minor` (por exemplo, `10.12`) e não deve conter uma versão de patch. (por exemplo, `10.12.4`). Isto acontece porque apenas os números de release "major" e "minor" estão alinhados entre os pacotes de biblioteca e os pacotes de declaração de tipo. -O número de release do patch do pacote de declaração de tipo (`.0` em `10.12.0`) é inicializado como zero pelo Definitely Typed e é incrementado a cada vez que um novo pacote `@types/node` é publicado ao NPM para a mesma versão "major"/"minor" da biblioteca correspondente. +O número de release do patch do pacote de declaração de tipo (`.0` em `10.12.0`) é inicializado como zero pelo Definitely Typed e é incrementado a cada vez que um novo pacote `@types/node` é publicado ao npm para a mesma versão "major"/"minor" da biblioteca correspondente. Algumas vezes as versões de pacotes de declaração de tipo e as versões de pacotes de biblioteca podem sair de sincronia. Abaixo estão algumas razões do porquê, por causa do quanto elas incomodam os usuários de uma biblioteca. diff --git a/README.ru.md b/README.ru.md index 3b19ffca787736..6fc136b7d4826b 100644 --- a/README.ru.md +++ b/README.ru.md @@ -66,7 +66,7 @@ npm install --save-dev @types/node Подробнее смотрите в [справочнике](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html). -Для NPM пакета `foo`, описания будут находиться в `@types/foo`. +Для npm пакета `foo`, описания будут находиться в `@types/foo`. Если вы не можете найти необходимый вам пакет, ищите его в [TypeSearch](https://microsoft.github.io/TypeSearch/). Если вы все еще не можете найти его, проверьте [включает](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) ли пакет собственную типизацию. @@ -180,8 +180,8 @@ Definitely Typed работает только благодаря вкладу Если вы являетесь автором библиотеки и ваш пакет написан на TypeScript, [свяжите автоматически сгенерированные файлы объявлений](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) в вашем пакете, а не публикуйте в Definitely Typed. -Если вы добавляете типизацию для пакета NPM, создайте директорию с тем же именем. -Если пакет, для которого вы добавляете типизацию, отсутствует в NPM, убедитесь, что выбранное вами имя не конфликтует с именем пакета в NPM. +Если вы добавляете типизацию для пакета npm, создайте директорию с тем же именем. +Если пакет, для которого вы добавляете типизацию, отсутствует в npm, убедитесь, что выбранное вами имя не конфликтует с именем пакета в npm. (Вы можете использовать `npm info foo` чтобы проверить наличие пакета `foo`.) Ваш пакет должен иметь такую ​​структуру: @@ -335,17 +335,17 @@ Once a week the Definition Owners are synced to the file [.github/CODEOWNERS](ht ## Часто задаваемые вопросы -#### Какая связь между этим репозиторием и пакетами `@types` в NPM? +#### Какая связь между этим репозиторием и пакетами `@types` в npm? -Ветвь `master` автоматически публикуется в область `@types` на NPM благодаря [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher). +Ветвь `master` автоматически публикуется в область `@types` на npm благодаря [DefinitelyTyped-tools](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher). #### Я отправил PR. Когда он сольется? Это зависит, но большинство запросов на получение данных будут объединены в течение недели. PR, утвержденные автором, указанным в заголовке определения, обычно объединяются быстрее; PR для новых определений займет больше времени, так как они требуют большего количества проверок от сопровождающих. Каждый PR проверяется членом команды TypeScript или Definitely Typed перед объединением, поэтому будьте терпеливы, так как человеческий фактор может вызвать задержки. Посмотрите на [New Pull Request Status Board](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/5) чтобы увидеть, как сопровождающие работают через открытые PR. -#### Мой PR слит; когда будет обновлен пакет `@types` NPM? +#### Мой PR слит; когда будет обновлен пакет `@types` npm? -Пакеты NPM должны обновиться в течение нескольких часов. Если прошло более 24 часов, пингуйте @RyanCavanaugh и @andy-ms в PR, чтобы расследовать. +Пакеты npm должны обновиться в течение нескольких часов. Если прошло более 24 часов, пингуйте @RyanCavanaugh и @andy-ms в PR, чтобы расследовать. #### Я пишу определение, которое зависит от другого определения. Должен ли я использовать `` или import? @@ -369,7 +369,7 @@ Once a week the Definition Owners are synced to the file [.github/CODEOWNERS](ht Если вы используете TypeScript 2.7 или более позднюю версию, используйте `--esModuleInterop` в вашем проекте. В противном случае, если импорт по умолчанию работает в вашей среде (например, Webpack, SystemJS, esm), рассмотрите возможность включения опции компилятора [`--allowSyntheticDefaultImports`](https://www.typescriptlang.org/docs/handbook/compiler-options.html). Не меняйте определение типа, если оно точное. -Для пакета NPM, `export =` является точным, если `node -p 'require("foo")'` является экспортом, а `export default` является точным, если `node -p 'require("foo").default'` является экспортом. +Для пакета npm, `export =` является точным, если `node -p 'require("foo")'` является экспортом, а `export default` является точным, если `node -p 'require("foo").default'` является экспортом. #### Я хочу использовать функции из TypeScript 3.3 или выше. diff --git a/docs/admin.md b/docs/admin.md index fae642a2ed86e5..d714f15f6cc779 100644 --- a/docs/admin.md +++ b/docs/admin.md @@ -112,7 +112,7 @@ The process of handling PRs: The process of deploying changes: -- [types-publisher](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) — when a PR is merged, types-publisher moves the contents to NPM/GitHub Package Repository +- [types-publisher](https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/publisher) — when a PR is merged, types-publisher moves the contents to npm/GitHub Package Repository - [CI](https://dev.azure.com/definitelytyped/DefinitelyTyped/_build) — the build pipelines on Azure which does most of the work Recommendations we make: