@pnpm/core-loggers 1100.3.4 → 1101.0.0

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/core-loggers
2
2
 
3
+ ## 1101.0.0
4
+
5
+ ### Major 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.3.4
4
22
 
5
23
  ### Patch Changes
@@ -1,12 +1,33 @@
1
1
  import { type LogBase, type Logger } from '@pnpm/logger';
2
2
  export declare const deprecationLogger: Logger<DeprecationMessage>;
3
+ /**
4
+ * A package version the registry reports as deprecated.
5
+ *
6
+ * The deprecation notice itself is deliberately absent. It is free-form text
7
+ * that any publisher can rewrite on an already-published version, so it
8
+ * reaches neither the terminal nor an NDJSON consumer. `pnpm view` shows it
9
+ * on request instead.
10
+ */
3
11
  export interface DeprecationMessage {
4
12
  pkgName: string;
5
13
  pkgVersion: string;
6
14
  pkgId: string;
7
15
  prefix: string;
8
- deprecated: string;
9
16
  depth: number;
17
+ /**
18
+ * A version of the same package that is not deprecated, when the resolver
19
+ * knew one. Absent for a resolution reused from the lockfile, which holds
20
+ * no packument to work it out from.
21
+ */
22
+ nonDeprecatedAlternative?: {
23
+ version: string;
24
+ /**
25
+ * Whether reaching it means widening the declared range. Only ever true
26
+ * for a dependency that declared a range: a tag says nothing about which
27
+ * versions are acceptable.
28
+ */
29
+ outsideDeclaredRange: boolean;
30
+ };
10
31
  }
11
32
  export type DeprecationLog = {
12
33
  name: 'pnpm:deprecation';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/core-loggers",
3
- "version": "1100.3.4",
3
+ "version": "1101.0.0",
4
4
  "description": "Core loggers of pnpm",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -36,7 +36,7 @@
36
36
  "@pnpm/logger": "^1100.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@pnpm/core-loggers": "1100.3.4",
39
+ "@pnpm/core-loggers": "1101.0.0",
40
40
  "@pnpm/logger": "1100.0.0"
41
41
  },
42
42
  "engines": {