@kubb/core 1.15.0-canary.20231024T104207 → 1.15.0-canary.20231025T123615
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/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -2112,7 +2112,8 @@ function findUpSync(name, options = {}) {
|
|
|
2112
2112
|
const matches = findUpMultipleSync(name, { ...options, limit: 1 });
|
|
2113
2113
|
return matches[0];
|
|
2114
2114
|
}
|
|
2115
|
-
var PackageManager = class {
|
|
2115
|
+
var PackageManager = class _PackageManager {
|
|
2116
|
+
static #cache = {};
|
|
2116
2117
|
#cwd;
|
|
2117
2118
|
#SLASHES = /* @__PURE__ */ new Set(["/", "\\"]);
|
|
2118
2119
|
constructor(workspace) {
|
|
@@ -2172,7 +2173,13 @@ var PackageManager = class {
|
|
|
2172
2173
|
}
|
|
2173
2174
|
return __require(pkgPath);
|
|
2174
2175
|
}
|
|
2176
|
+
static setVersion(dependency, version) {
|
|
2177
|
+
_PackageManager.#cache[dependency] = version;
|
|
2178
|
+
}
|
|
2175
2179
|
async getVersion(dependency) {
|
|
2180
|
+
if (_PackageManager.#cache[dependency]) {
|
|
2181
|
+
return _PackageManager.#cache[dependency];
|
|
2182
|
+
}
|
|
2176
2183
|
const packageJSON = await this.getPackageJSON();
|
|
2177
2184
|
if (!packageJSON) {
|
|
2178
2185
|
return void 0;
|
|
@@ -2180,6 +2187,9 @@ var PackageManager = class {
|
|
|
2180
2187
|
return packageJSON["dependencies"]?.[dependency] || packageJSON["devDependencies"]?.[dependency];
|
|
2181
2188
|
}
|
|
2182
2189
|
getVersionSync(dependency) {
|
|
2190
|
+
if (_PackageManager.#cache[dependency]) {
|
|
2191
|
+
return _PackageManager.#cache[dependency];
|
|
2192
|
+
}
|
|
2183
2193
|
const packageJSON = this.getPackageJSONSync();
|
|
2184
2194
|
if (!packageJSON) {
|
|
2185
2195
|
return void 0;
|