@umijs/utils 4.0.0-canary.20220412.2 → 4.0.0-canary.20220418.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/dist/npmClient.d.ts +0 -1
- package/dist/npmClient.js +1 -6
- package/package.json +1 -1
package/dist/npmClient.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export declare enum NpmClientEnum {
|
|
|
8
8
|
npm = "npm"
|
|
9
9
|
}
|
|
10
10
|
export declare const getNpmClient: () => NpmClient;
|
|
11
|
-
export declare const checkNpmClient: (npmClient: NpmClient) => boolean;
|
|
12
11
|
export declare const installWithNpmClient: ({ npmClient, cwd, }: {
|
|
13
12
|
npmClient: NpmClient;
|
|
14
13
|
cwd?: string | undefined;
|
package/dist/npmClient.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.installWithNpmClient = exports.
|
|
3
|
+
exports.installWithNpmClient = exports.getNpmClient = exports.NpmClientEnum = exports.npmClients = void 0;
|
|
4
4
|
exports.npmClients = ['pnpm', 'tnpm', 'cnpm', 'yarn', 'npm'];
|
|
5
5
|
var NpmClientEnum;
|
|
6
6
|
(function (NpmClientEnum) {
|
|
@@ -25,11 +25,6 @@ const getNpmClient = () => {
|
|
|
25
25
|
return 'npm';
|
|
26
26
|
};
|
|
27
27
|
exports.getNpmClient = getNpmClient;
|
|
28
|
-
const checkNpmClient = (npmClient) => {
|
|
29
|
-
const userAgent = process.env.npm_config_user_agent;
|
|
30
|
-
return !!(userAgent && userAgent.includes(npmClient));
|
|
31
|
-
};
|
|
32
|
-
exports.checkNpmClient = checkNpmClient;
|
|
33
28
|
const installWithNpmClient = ({ npmClient, cwd, }) => {
|
|
34
29
|
const { sync } = require('../compiled/cross-spawn');
|
|
35
30
|
const npm = sync(npmClient, [npmClient === 'yarn' ? '' : 'install'], {
|
package/package.json
CHANGED