@badisi/latest-version 2.1.2 → 2.1.3
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/cjs/index.js +5 -5
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const registry_url_1 =
|
|
5
|
-
const registry_auth_token_1 =
|
|
4
|
+
const registry_url_1 = tslib_1.__importDefault(require("registry-auth-token/registry-url"));
|
|
5
|
+
const registry_auth_token_1 = tslib_1.__importDefault(require("registry-auth-token"));
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
7
|
const semver_1 = require("semver");
|
|
8
8
|
const global_dirs_1 = require("global-dirs");
|
|
@@ -98,7 +98,7 @@ const getMetadataFromCache = (pkgName, options) => {
|
|
|
98
98
|
}
|
|
99
99
|
return undefined;
|
|
100
100
|
};
|
|
101
|
-
const getLatestVersions = (pkgName, tagOrRange, options) =>
|
|
101
|
+
const getLatestVersions = (pkgName, tagOrRange, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
102
102
|
var _a, _b, _c;
|
|
103
103
|
let pkgMetadata;
|
|
104
104
|
if (pkgName.length && (options === null || options === void 0 ? void 0 : options.useCache)) {
|
|
@@ -132,7 +132,7 @@ const getInstalledVersion = (pkgName) => {
|
|
|
132
132
|
return undefined;
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
|
-
const getInfo = (pkg, options) =>
|
|
135
|
+
const getInfo = (pkg, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
136
136
|
const i = pkg.lastIndexOf('@');
|
|
137
137
|
let pkgInfo = {
|
|
138
138
|
name: (i > 1) ? pkg.slice(0, i) : pkg,
|
|
@@ -152,7 +152,7 @@ const getInfo = (pkg, options) => (0, tslib_1.__awaiter)(void 0, void 0, void 0,
|
|
|
152
152
|
}
|
|
153
153
|
return pkgInfo;
|
|
154
154
|
});
|
|
155
|
-
const latestVersion = (arg, options) =>
|
|
155
|
+
const latestVersion = (arg, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
156
156
|
const pkgs = [];
|
|
157
157
|
if (typeof arg === 'string') {
|
|
158
158
|
pkgs.push(arg);
|