From 345bc4f781884c4dec7f5ec5043c5450d84c39c6 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sat, 4 Oct 2025 22:02:44 -0400 Subject: [PATCH] docs: rewrap markdown workspaces libnpmdiff ```sh perl -pi -e ' if (/\`\`\`/) { $s = ! $s; next; }; next if $s; next if /^#/; s/([a-z)`]\.) +/$1\n/g; ' ``` Visual Studio Code search and replace. Search: (^(?!title|section| *```|/[*/]|\s*[{}])[^`#\n;][^\n]*[^-.:?!>\n\s{]) *$\n *(?!npm install|cd |\d+\.)([^-<$\s\n`+|#*;]) Replace: $1 $2 Flags: Case-sensitive, Regular expression Manual wrap fixes. Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- workspaces/libnpmdiff/CHANGELOG.md | 3 +- workspaces/libnpmdiff/README.md | 45 +++++++++++++++++------------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/workspaces/libnpmdiff/CHANGELOG.md b/workspaces/libnpmdiff/CHANGELOG.md index b5fcedabd07c7..2c30020046019 100644 --- a/workspaces/libnpmdiff/CHANGELOG.md +++ b/workspaces/libnpmdiff/CHANGELOG.md @@ -409,7 +409,8 @@ ### ⚠️ BREAKING CHANGES -* `npm pack` now follows a strict order of operations when applying ignore rules. If a files array is present in the package.json, then rules in .gitignore and .npmignore files from the root will be ignored. +* `npm pack` now follows a strict order of operations when applying ignore rules. +If a files array is present in the package.json, then rules in .gitignore and .npmignore files from the root will be ignored. ### Features diff --git a/workspaces/libnpmdiff/README.md b/workspaces/libnpmdiff/README.md index 43cd3e1fb3be2..0b329df0a2bad 100644 --- a/workspaces/libnpmdiff/README.md +++ b/workspaces/libnpmdiff/README.md @@ -52,15 +52,11 @@ index v1.1.0..v1.1.1 100644 ### Contributing The npm team enthusiastically welcomes contributions and project participation! -There's a bunch of things you can do if you want to contribute! The -[Contributor Guide](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) -outlines the process for community interaction and contribution. Please don't -hesitate to jump in if you'd like to, or even ask us questions if something -isn't clear. +There's a bunch of things you can do if you want to contribute! +The [Contributor Guide](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) outlines the process for community interaction and contribution. +Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear. -All participants and maintainers in this project are expected to follow the -[npm Code of Conduct](https://docs.npmjs.com/policies/conduct), and just -generally be excellent to each other. +All participants and maintainers in this project are expected to follow the [npm Code of Conduct](https://docs.npmjs.com/policies/conduct), and just generally be excellent to each other. Please refer to the [Changelog](CHANGELOG.md) for project history details, too. @@ -70,20 +66,31 @@ Happy hacking! #### `> libnpmdif([ a, b ], [opts]) -> Promise` -Fetches the registry tarballs and compare files between a spec `a` and spec `b`. **npm** spec types are usually described in `@` form but multiple other types are also supported, for more info on valid specs take a look at [`npm-package-arg`](https://github.com/npm/npm-package-arg). +Fetches the registry tarballs and compare files between a spec `a` and spec `b`. +**npm** spec types are usually described in `@` form but multiple other types are also supported, for more info on valid specs take a look at [`npm-package-arg`](https://github.com/npm/npm-package-arg). **Options**: -- `color `: Should add ANSI colors to string output? Defaults to `false`. -- `tagVersionPrefix `: What prefix should be used to define version numbers. Defaults to `v` -- `diffUnified `: How many lines of code to print before/after each diff. Defaults to `3`. -- `diffFiles >`: If set only prints patches for the files listed in this array (also accepts globs). Defaults to `undefined`. -- `diffIgnoreAllSpace `: Whether or not should ignore changes in whitespace (very useful to avoid indentation changes extra diff lines). Defaults to `false`. -- `diffNameOnly `: Prints only file names and no patch diffs. Defaults to `false`. -- `diffNoPrefix `: If true then skips printing any prefixes in filenames. Defaults to `false`. -- `diffSrcPrefix `: Prefix to be used in the filenames from `a`. Defaults to `a/`. -- `diffDstPrefix `: Prefix to be used in the filenames from `b`. Defaults to `b/`. -- `diffText `: Should treat all files as text and try to print diff for binary files. Defaults to `false`. +- `color `: Should add ANSI colors to string output? + Defaults to `false`. +- `tagVersionPrefix `: What prefix should be used to define version numbers. + Defaults to `v` +- `diffUnified `: How many lines of code to print before/after each diff. + Defaults to `3`. +- `diffFiles >`: If set only prints patches for the files listed in this array (also accepts globs). + Defaults to `undefined`. +- `diffIgnoreAllSpace `: Whether or not should ignore changes in whitespace (very useful to avoid indentation changes extra diff lines). + Defaults to `false`. +- `diffNameOnly `: Prints only file names and no patch diffs. + Defaults to `false`. +- `diffNoPrefix `: If true then skips printing any prefixes in filenames. + Defaults to `false`. +- `diffSrcPrefix `: Prefix to be used in the filenames from `a`. + Defaults to `a/`. +- `diffDstPrefix `: Prefix to be used in the filenames from `b`. + Defaults to `b/`. +- `diffText `: Should treat all files as text and try to print diff for binary files. + Defaults to `false`. - ...`cache`, `registry`, `where` and other common options accepted by [pacote](https://github.com/npm/pacote#options) Returns a `Promise` that fulfills with a `String` containing the resulting patch diffs.