Repository navigation
Commit 4441108
* Start fix for #1871
Assisted-by: Claude Code:claude-opus-5-5
* Read omit-lockfile-registry-resolved like npm
The hosted npm run already reads replace-registry-host from every npm
config layer (env, project, user, global, builtin). Read
omit-lockfile-registry-resolved the same way, through one shared
effective-setting lookup instead of a second copy, and parse its value
as npm's ini + nopt Boolean reading does (a bare key, `yes` or `False`
are true; `false`, `null` and numeric zero are not).
Assisted-by: Claude Code:claude-opus-5-5
* Warn when npm will strip hosted lock pins
With omit-lockfile-registry-resolved=true, the next npm install (even a
no-op) drops the hosted `resolved` URL but keeps the patched integrity,
so every cold-cache install fails EINTEGRITY and vex loses the patch.
The hosted scan said nothing and exited 0.
It now warns redirect_npm_omit_lockfile_registry_resolved, naming the
config layer that sets it and the remedies (set it to false in the
project .npmrc, unset the env var, or use vendored mode). Documented
in CLI_CONTRACT.md, docs/ecosystems.md and the npm test matrix.
Fixes #1871
Assisted-by: Claude Code:claude-opus-5-5
* Read npm Boolean config values exactly as npm
Code review, checked against npm 10.9.4: npm reads a blank
omit-lockfile-registry-resolved= as true and a literal `undefined` as
false, because it checks those keywords on the written value before
expanding ${VAR}. The scan read them the other way round, so a blank
value got no warning and `undefined` got a false one.
Also share the where-is-it-set remedy text between the
replace-registry-host and omit-lockfile-registry-resolved warnings,
replace the full JS number parser with a numeric-zero check, and
restore the #1233 test comment the new test had split.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent b0b24e2 commit 4441108
7 files changed
Lines changed: 492 additions & 42 deletions
File tree
- crates
- socket-patch-cli
- tests/vendor
- socket-patch-core/src
- hosted
- patch/redirect
- docs
- testing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
| |||
1738 | 1740 | | |
1739 | 1741 | | |
1740 | 1742 | | |
| 1743 | + | |
1741 | 1744 | | |
1742 | 1745 | | |
1743 | 1746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
194 | 203 | | |
195 | 204 | | |
196 | 205 | | |
| |||
1002 | 1011 | | |
1003 | 1012 | | |
1004 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1005 | 1144 | | |
1006 | 1145 | | |
1007 | 1146 | | |
| |||
0 commit comments