@pnpm/resolving.resolver-base 1101.2.0 → 1101.3.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/resolver-base
2
2
 
3
+ ## 1101.3.0
4
+
5
+ ### Minor 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
  ## 1101.2.0
4
22
 
5
23
  ### Minor Changes
package/lib/index.d.ts CHANGED
@@ -182,9 +182,29 @@ export declare function resolvePlatformSelector(supportedArchitectures: Supporte
182
182
  * is nullish).
183
183
  */
184
184
  export declare function selectPlatformVariant(variants: PlatformAssetResolution[], selector: PlatformSelector): PlatformAssetResolution | undefined;
185
+ /**
186
+ * A version of the same package the registry does not report as deprecated.
187
+ *
188
+ * Only the resolver can work this out, since only it holds the packument.
189
+ */
190
+ export interface NonDeprecatedAlternative {
191
+ version: string;
192
+ /**
193
+ * Whether reaching it means widening the declared range. Only ever true
194
+ * for a dependency that declared a range: a tag says nothing about which
195
+ * versions are acceptable, so there is no range to be outside of.
196
+ */
197
+ outsideDeclaredRange: boolean;
198
+ }
185
199
  export interface ResolveResult {
186
200
  id: PkgResolutionId;
187
201
  latest?: string;
202
+ /**
203
+ * Set only when the resolved version is deprecated, so that the
204
+ * deprecation warning can name a version to move to. Absent when the
205
+ * resolution was reused from the lockfile, which holds no packument.
206
+ */
207
+ nonDeprecatedAlternative?: NonDeprecatedAlternative;
188
208
  publishedAt?: string;
189
209
  manifest?: DependencyManifest;
190
210
  resolution: Resolution;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/resolving.resolver-base",
3
- "version": "1101.2.0",
3
+ "version": "1101.3.0",
4
4
  "description": "Types for pnpm-compatible resolvers",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jest/globals": "30.4.1",
35
- "@pnpm/resolving.resolver-base": "1101.2.0"
35
+ "@pnpm/resolving.resolver-base": "1101.3.0"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=22.13"