From 1be8e9500826e7aef041976fd908658f473caf23 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 27 Nov 2024 09:52:10 -0800 Subject: [PATCH] docs: update ignore rules Adds bun lockfile, and points to the package.json docs as the authoritative list for ignore rules in the cli docs. --- docs/lib/content/commands/npm-publish.md | 3 +++ docs/lib/content/configuring-npm/package-json.md | 2 ++ docs/lib/content/using-npm/developers.md | 7 +++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/lib/content/commands/npm-publish.md b/docs/lib/content/commands/npm-publish.md index 7c97401440670..78f5d5bdfc846 100644 --- a/docs/lib/content/commands/npm-publish.md +++ b/docs/lib/content/commands/npm-publish.md @@ -83,6 +83,9 @@ See [`developers`](/using-npm/developers) for full details on what's included in the published package, as well as details on how the package is built. +See [`package.json`](/configuring-npm/package-json) for more info on +what can and can't be ignored. + ### Configuration diff --git a/docs/lib/content/configuring-npm/package-json.md b/docs/lib/content/configuring-npm/package-json.md index 58b10d92ec6bb..e09d50f02b635 100644 --- a/docs/lib/content/configuring-npm/package-json.md +++ b/docs/lib/content/configuring-npm/package-json.md @@ -324,6 +324,7 @@ Some files are always ignored by default: if you wish it to be published) * `pnpm-lock.yaml` * `yarn.lock` +* `bun.lockb` Most of these ignored files can be included specifically if included in the `files` globs. Exceptions to this are: @@ -334,6 +335,7 @@ the `files` globs. Exceptions to this are: * `package-lock.json` * `pnpm-lock.yaml` * `yarn.lock` +* `bun.lockb` These can not be included. diff --git a/docs/lib/content/using-npm/developers.md b/docs/lib/content/using-npm/developers.md index 5fc2e5876e3dd..b97ca038b4a4b 100644 --- a/docs/lib/content/using-npm/developers.md +++ b/docs/lib/content/using-npm/developers.md @@ -112,8 +112,8 @@ as `.gitignore` files: * You can end patterns with a forward slash `/` to specify a directory. * You can negate a pattern by starting it with an exclamation point `!`. -By default, the following paths and files are ignored, so there's no -need to add them to `.npmignore` explicitly: +By default, some paths and files are ignored, so there's no +need to add them to `.npmignore` explicitly. Some examples are: * `.*.swp` * `._*` @@ -148,6 +148,9 @@ property of `package.json`, which is an array of file or directory names that should be included in your package. Sometimes manually picking which items to allow is easier to manage than building a block list. +See [`package.json`](/configuring-npm/package-json) for more info on +what can and can't be ignored. + #### Testing whether your `.npmignore` or `files` config works If you want to double check that your package will include only the files