@pnpm/text.sanitize 1100.0.0 → 1100.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @pnpm/text.sanitize
2
2
 
3
+ ## 1100.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Install warnings no longer carry the text of a package's deprecation notice. The warning names the deprecated package and version, and the `pnpm:deprecation` event no longer carries the notice either. `pnpm view` still shows it on request.
8
+
9
+ A deprecation warning now names the newest version of the package that is not deprecated, and says when reaching it means widening the range you declared:
10
+
11
+ ```
12
+ WARN deprecated foo@1.0.0. 2.3.1 is not deprecated, outside the range you declared.
13
+ ```
14
+
15
+ pnpm works this out from the metadata it already fetched, so it costs no extra request. An install that reuses the lockfile without fetching metadata names no version.
16
+
17
+ pnpm strips control characters from the package name and version in a deprecation warning, and from the notice `pnpm outdated --long` prints.
18
+
19
+ The text sanitizer now also strips the Unicode line and paragraph separators U+2028 and U+2029.
20
+
3
21
  ## 1100.0.0
4
22
 
5
23
  ### Minor Changes
package/lib/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * The control and formatting characters {@link sanitizeInline} strips: C0/C1
3
- * controls, soft hyphens, bidi overrides and isolates, zero-width joiners,
4
- * and the other invisible formatting characters that can make a rendered
5
- * line read as something else.
3
+ * controls, soft hyphens, line and paragraph separators, bidi overrides and
4
+ * isolates, zero-width joiners, and the other invisible formatting characters
5
+ * that can make a rendered line read as something else.
6
6
  *
7
7
  * Variation selectors are deliberately absent: they change how the character
8
8
  * before them is drawn rather than where the rest of the line goes, and they
9
9
  * are part of the emoji a package description may legitimately carry.
10
10
  */
11
11
  // eslint-disable-next-line no-control-regex
12
- const CONTROL_AND_FORMAT_CHARACTERS = /[\u0000-\u001F\u007F-\u009F\u00AD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB\u{110BD}\u{110CD}\u{13430}-\u{1343F}\u{1BCA0}-\u{1BCA3}\u{1D173}-\u{1D17A}\u{E0001}\u{E0020}-\u{E007F}]/gu;
12
+ const CONTROL_AND_FORMAT_CHARACTERS = /[\u0000-\u001F\u007F-\u009F\u00AD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u2028\u2029\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB\u{110BD}\u{110CD}\u{13430}-\u{1343F}\u{1BCA0}-\u{1BCA3}\u{1D173}-\u{1D17A}\u{E0001}\u{E0020}-\u{E007F}]/gu;
13
13
  /**
14
14
  * Strips control and formatting characters from text embedded in a
15
15
  * single-line field that reaches the terminal.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/text.sanitize",
3
- "version": "1100.0.0",
3
+ "version": "1100.0.1",
4
4
  "description": "Strips control and formatting characters from text that reaches the terminal",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "devDependencies": {
31
31
  "@jest/globals": "30.4.1",
32
- "@pnpm/text.sanitize": "1100.0.0"
32
+ "@pnpm/text.sanitize": "1100.0.1"
33
33
  },
34
34
  "engines": {
35
35
  "node": ">=22.13"