From a03ff98eb19c8aed88c3b288654e67393d8e848c Mon Sep 17 00:00:00 2001 From: Dominik Gorczyca <73836513+dominikgorczyca@users.noreply.github.com> Date: Wed, 26 Oct 2022 18:33:32 +0200 Subject: [PATCH 1/7] name and version description change Reducing redundancy by deleting repeated code and changing other slight things about those two fields. --- docs/content/configuring-npm/package-json.md | 23 ++++++++------------ 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index 5b4acf187f777..fd7cd4cd2cfbc 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -16,13 +16,11 @@ settings described in [`config`](/using-npm/config). ### name If you plan to publish your package, the *most* important things in your -package.json are the name and version fields as they will be required. The -name and version together form an identifier that is assumed to be -completely unique. Changes to the package should come along with changes -to the version. If you don't plan to publish your package, the name and -version fields are optional. - -The name is what your thing is called. +package.json are the name and version fields as they will be required. +The name and version together form an identifier that is assumed to be +completely unique. + +The name field contains your package name. Some rules: @@ -52,12 +50,9 @@ A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See ### version -If you plan to publish your package, the *most* important things in your -package.json are the name and version fields as they will be required. The -name and version together form an identifier that is assumed to be -completely unique. Changes to the package should come along with changes -to the version. If you don't plan to publish your package, the name and -version fields are optional. +Changes to the package should come along with changes to the version. +You can show developers how much they need to adjust on a new update by +using [semantic versioning](../../about-semantic-versioning) Version must be parseable by [node-semver](https://github.com/npm/node-semver), which is bundled with @@ -65,7 +60,7 @@ npm as a dependency. (`npm install semver` to use it yourself.) ### description -Put a description in it. It's a string. This helps people discover your +Put a description in it. It's a string. This helps people discover your package, as it's listed in `npm search`. ### keywords From 03d2f831962edb9e39721cafa608654db981d059 Mon Sep 17 00:00:00 2001 From: Dominik Gorczyca <73836513+dominikgorczyca@users.noreply.github.com> Date: Fri, 28 Oct 2022 19:15:07 +0200 Subject: [PATCH 2/7] Update package-json.md --- docs/content/configuring-npm/package-json.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index fd7cd4cd2cfbc..2a27e95785254 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -18,7 +18,8 @@ settings described in [`config`](/using-npm/config). If you plan to publish your package, the *most* important things in your package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be -completely unique. +completely unique. If you don't plan to publish your package, the name and +version fields are optional. The name field contains your package name. @@ -50,6 +51,8 @@ A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See ### version +If you plan to publish your package, the *most* important things in your +package.json are the name and version fields as they will be required. Changes to the package should come along with changes to the version. You can show developers how much they need to adjust on a new update by using [semantic versioning](../../about-semantic-versioning) From 91fbe3a6dedb229291863d3b5e92a188469fbb0f Mon Sep 17 00:00:00 2001 From: Dominik Gorczyca <73836513+dominikgorczyca@users.noreply.github.com> Date: Fri, 28 Oct 2022 19:16:40 +0200 Subject: [PATCH 3/7] Update package-json.md --- docs/content/configuring-npm/package-json.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index 2a27e95785254..a5a1f311a33b2 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -16,10 +16,9 @@ settings described in [`config`](/using-npm/config). ### name If you plan to publish your package, the *most* important things in your -package.json are the name and version fields as they will be required. -The name and version together form an identifier that is assumed to be +package.json are the name and version fields as they will be required. The +name and version together form an identifier that is assumed to be completely unique. If you don't plan to publish your package, the name and -version fields are optional. The name field contains your package name. From 57fb2a6461aeea7758dc9a41c28258c594fc3f21 Mon Sep 17 00:00:00 2001 From: Dominik Gorczyca <73836513+dominikgorczyca@users.noreply.github.com> Date: Fri, 28 Oct 2022 19:17:36 +0200 Subject: [PATCH 4/7] Update package-json.md --- docs/content/configuring-npm/package-json.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index a5a1f311a33b2..2a500782433fb 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -19,6 +19,7 @@ If you plan to publish your package, the *most* important things in your package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be completely unique. If you don't plan to publish your package, the name and +version fields are optional. The name field contains your package name. From 521f4de7676188df2ddb7891bfcff8dbf0a8b241 Mon Sep 17 00:00:00 2001 From: Dominik Gorczyca <73836513+dominikgorczyca@users.noreply.github.com> Date: Fri, 28 Oct 2022 19:18:18 +0200 Subject: [PATCH 5/7] Update package-json.md --- docs/content/configuring-npm/package-json.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index 2a500782433fb..d8c8685a4cc63 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -51,8 +51,6 @@ A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See ### version -If you plan to publish your package, the *most* important things in your -package.json are the name and version fields as they will be required. Changes to the package should come along with changes to the version. You can show developers how much they need to adjust on a new update by using [semantic versioning](../../about-semantic-versioning) From aa9125b8825ac812b00e1a0fc4968d8214253598 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 1 Nov 2022 10:22:17 -0700 Subject: [PATCH 6/7] Update docs/content/configuring-npm/package-json.md --- docs/content/configuring-npm/package-json.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index d8c8685a4cc63..ba621ce667807 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -61,7 +61,7 @@ npm as a dependency. (`npm install semver` to use it yourself.) ### description -Put a description in it. It's a string. This helps people discover your +Put a description in it. It's a string. This helps people discover your package, as it's listed in `npm search`. ### keywords From 1c026ef89972cc104c6304edc8b1ffa649d741f3 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 1 Nov 2022 10:22:33 -0700 Subject: [PATCH 7/7] Update docs/content/configuring-npm/package-json.md --- docs/content/configuring-npm/package-json.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index ba621ce667807..5bbf94e4ec316 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -20,7 +20,6 @@ package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be completely unique. If you don't plan to publish your package, the name and version fields are optional. - The name field contains your package name. Some rules: