@pnpm/plugin-commands-doctor 1000.1.0 → 1000.1.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/lib/doctor.d.ts +1 -1
- package/lib/doctor.js +1 -18
- package/lib/doctor.js.map +1 -1
- package/package.json +5 -7
package/lib/doctor.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export declare function cliOptionsTypes(): Record<string, unknown>;
|
|
|
4
4
|
export declare const shorthands: {};
|
|
5
5
|
export declare const commandNames: string[];
|
|
6
6
|
export declare function help(): string;
|
|
7
|
-
export declare function handler(opts: Pick<Config, 'failedToLoadBuiltInConfig'
|
|
7
|
+
export declare function handler(opts: Pick<Config, 'failedToLoadBuiltInConfig'>): Promise<void>;
|
package/lib/doctor.js
CHANGED
|
@@ -7,11 +7,9 @@ exports.commandNames = exports.shorthands = exports.rcOptionsTypes = void 0;
|
|
|
7
7
|
exports.cliOptionsTypes = cliOptionsTypes;
|
|
8
8
|
exports.help = help;
|
|
9
9
|
exports.handler = handler;
|
|
10
|
-
const child_process_1 = require("child_process");
|
|
11
10
|
const render_help_1 = __importDefault(require("render-help"));
|
|
12
11
|
const cli_utils_1 = require("@pnpm/cli-utils");
|
|
13
12
|
const logger_1 = require("@pnpm/logger");
|
|
14
|
-
const is_windows_1 = __importDefault(require("is-windows"));
|
|
15
13
|
exports.rcOptionsTypes = cliOptionsTypes;
|
|
16
14
|
function cliOptionsTypes() {
|
|
17
15
|
return {};
|
|
@@ -26,7 +24,7 @@ function help() {
|
|
|
26
24
|
});
|
|
27
25
|
}
|
|
28
26
|
async function handler(opts) {
|
|
29
|
-
const { failedToLoadBuiltInConfig
|
|
27
|
+
const { failedToLoadBuiltInConfig } = opts;
|
|
30
28
|
if (failedToLoadBuiltInConfig) {
|
|
31
29
|
// If true, means loading npm builtin config failed. Then there may have a prefix error, related: https://github.com/pnpm/pnpm/issues/5404
|
|
32
30
|
logger_1.logger.warn({
|
|
@@ -34,20 +32,5 @@ async function handler(opts) {
|
|
|
34
32
|
prefix: process.cwd(),
|
|
35
33
|
});
|
|
36
34
|
}
|
|
37
|
-
if ((0, is_windows_1.default)() && nodeLinker !== 'hoisted' && currentDriveIsExFAT(opts.dir)) {
|
|
38
|
-
// If the node_modules is not hoisted, and the current drive is exFAT, then there may have a symlink error, related:
|
|
39
|
-
logger_1.logger.warn({
|
|
40
|
-
message: 'The current drive is exFAT, which does not support symlinks. This will cause installation to fail. You can set the node-linker to "hoisted" to avoid this issue.',
|
|
41
|
-
prefix: process.cwd(),
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
// In Windows system exFAT drive, symlink will result in error.
|
|
46
|
-
function currentDriveIsExFAT(dir) {
|
|
47
|
-
const currentDrive = `${dir.split(':')[0]}:`;
|
|
48
|
-
const output = (0, child_process_1.execSync)(`wmic logicaldisk where "DeviceID='${currentDrive}'" get FileSystem`).toString();
|
|
49
|
-
const lines = output.trim().split('\n');
|
|
50
|
-
const name = lines.length > 1 ? lines[1].trim() : '';
|
|
51
|
-
return name === 'exFAT';
|
|
52
35
|
}
|
|
53
36
|
//# sourceMappingURL=doctor.js.map
|
package/lib/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":";;;;;;AAOA,0CAEC;AAMD,oBAMC;AAED,0BAWC;AAlCD,8DAAoC;AACpC,+CAAyC;AACzC,yCAAqC;AAGxB,QAAA,cAAc,GAAG,eAAe,CAAA;AAE7C,SAAgB,eAAe;IAC7B,OAAO,EAAE,CAAA;AACX,CAAC;AAEY,QAAA,UAAU,GAAG,EAAE,CAAA;AAEf,QAAA,YAAY,GAAG,CAAC,QAAQ,CAAC,CAAA;AAEtC,SAAgB,IAAI;IAClB,OAAO,IAAA,qBAAU,EAAC;QAChB,WAAW,EAAE,iCAAiC;QAC9C,GAAG,EAAE,IAAA,mBAAO,EAAC,QAAQ,CAAC;QACtB,MAAM,EAAE,CAAC,uBAAuB,CAAC;KAClC,CAAC,CAAA;AACJ,CAAC;AAEM,KAAK,UAAU,OAAO,CAC3B,IAA+C;IAE/C,MAAM,EAAE,yBAAyB,EAAE,GAAG,IAAI,CAAA;IAC1C,IAAI,yBAAyB,EAAE,CAAC;QAC9B,0IAA0I;QAC1I,eAAM,CAAC,IAAI,CAAC;YACV,OAAO,EAAE,uOAAuO;YAChP,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE;SACtB,CAAC,CAAA;IACJ,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/plugin-commands-doctor",
|
|
3
|
-
"version": "1000.1.
|
|
3
|
+
"version": "1000.1.1",
|
|
4
4
|
"description": "Commands for checks of known common issues ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,18 +23,16 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-doctor#readme",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"is-windows": "^1.0.2",
|
|
27
26
|
"render-help": "^1.0.3",
|
|
28
|
-
"@pnpm/
|
|
29
|
-
"@pnpm/
|
|
27
|
+
"@pnpm/cli-utils": "1000.0.2",
|
|
28
|
+
"@pnpm/config": "1002.0.0"
|
|
30
29
|
},
|
|
31
30
|
"peerDependencies": {
|
|
32
31
|
"@pnpm/logger": ">=5.1.0 <1001.0.0"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
35
|
-
"@
|
|
36
|
-
"@pnpm/plugin-commands-doctor": "1000.1.
|
|
37
|
-
"@pnpm/logger": "1000.0.0"
|
|
34
|
+
"@pnpm/logger": "1000.0.0",
|
|
35
|
+
"@pnpm/plugin-commands-doctor": "1000.1.1"
|
|
38
36
|
},
|
|
39
37
|
"funding": "https://opencollective.com/pnpm",
|
|
40
38
|
"exports": {
|