@pnpm/error 1100.0.1 → 1100.1.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 +18 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +21 -0
- package/package.json +3 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @pnpm/error
|
|
2
|
+
|
|
3
|
+
## 1100.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added a new setting, `update.githubActionsServer`, for specifying the base URL of the GitHub server that hosts the repositories of the GitHub Actions referenced by the workflow files (for example, a GitHub Enterprise Server). When the setting is not defined, the URL is read from the `GITHUB_SERVER_URL` environment variable, falling back to `https://github.com`. The URL must use the `https://` or `http://` protocol [#13220](https://github.com/pnpm/pnpm/issues/13220).
|
|
8
|
+
|
|
9
|
+
`pnpm outdated` and `pnpm update` no longer fail when the refs of a GitHub Action's repository cannot be read (for example, when the action's repository is private or hosted on a different GitHub server). Such actions are now skipped with a warning.
|
|
10
|
+
|
|
11
|
+
Setting `update.githubActions` to `false` now makes `pnpm outdated` and the interactive `pnpm update` skip GitHub Actions dependencies.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Republished every package: the tarballs published by the v11.13.1 through v11.16.0 releases were missing most of their compiled files due to a packing bug [#13164](https://github.com/pnpm/pnpm/issues/13164).
|
|
16
|
+
|
|
17
|
+
- Updated dependencies:
|
|
18
|
+
- @pnpm/constants@1100.0.1
|
package/lib/index.d.ts
CHANGED
|
@@ -41,6 +41,14 @@ export declare class FetchError extends PnpmError {
|
|
|
41
41
|
* so a raw `@` inside the password (`user:p@ss@host`) doesn't leak its tail.
|
|
42
42
|
*/
|
|
43
43
|
export declare function redactUrlCredentials(text: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Make untrusted, URL-bearing text safe to print or log: redact inline
|
|
46
|
+
* `user:pass@` credentials ({@link redactUrlCredentials}) and strip every
|
|
47
|
+
* control character. Both can appear in error messages that echo an
|
|
48
|
+
* untrusted URL or subprocess stderr back, which must not leak credentials
|
|
49
|
+
* or inject terminal output via raw escapes / `\r` / `\n`.
|
|
50
|
+
*/
|
|
51
|
+
export declare function redactAndSanitize(text: string): string;
|
|
44
52
|
export declare class LockfileMissingDependencyError extends PnpmError {
|
|
45
53
|
constructor(depPath: string);
|
|
46
54
|
}
|
package/lib/index.js
CHANGED
|
@@ -82,6 +82,27 @@ export function redactUrlCredentials(text) {
|
|
|
82
82
|
}
|
|
83
83
|
return result;
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Make untrusted, URL-bearing text safe to print or log: redact inline
|
|
87
|
+
* `user:pass@` credentials ({@link redactUrlCredentials}) and strip every
|
|
88
|
+
* control character. Both can appear in error messages that echo an
|
|
89
|
+
* untrusted URL or subprocess stderr back, which must not leak credentials
|
|
90
|
+
* or inject terminal output via raw escapes / `\r` / `\n`.
|
|
91
|
+
*/
|
|
92
|
+
export function redactAndSanitize(text) {
|
|
93
|
+
// Controls are stripped BEFORE redacting: a control character inside the
|
|
94
|
+
// userinfo (`user:pass\r@host`) would otherwise split the authority across
|
|
95
|
+
// the redaction scan, and removing it afterwards would rejoin the
|
|
96
|
+
// credentials into the output.
|
|
97
|
+
let sanitized = '';
|
|
98
|
+
for (const char of text) {
|
|
99
|
+
const code = char.codePointAt(0);
|
|
100
|
+
if (code <= 0x1f || (code >= 0x7f && code <= 0x9f))
|
|
101
|
+
continue;
|
|
102
|
+
sanitized += char;
|
|
103
|
+
}
|
|
104
|
+
return redactUrlCredentials(sanitized);
|
|
105
|
+
}
|
|
85
106
|
function isSchemeTailChar(code) {
|
|
86
107
|
return (code >= 0x30 && code <= 0x39) || (code >= 0x41 && code <= 0x5a) || (code >= 0x61 && code <= 0x7a);
|
|
87
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/error",
|
|
3
|
-
"version": "1100.0
|
|
3
|
+
"version": "1100.1.0",
|
|
4
4
|
"description": "An error class for pnpm errors",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"!*.map"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@pnpm/constants": "1100.0.
|
|
31
|
+
"@pnpm/constants": "1100.0.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@jest/globals": "30.4.1",
|
|
35
|
-
"@pnpm/error": "1100.0
|
|
35
|
+
"@pnpm/error": "1100.1.0"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=22.13"
|