@codedrifters/configulator 0.0.119 → 0.0.120
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/index.d.mts +0 -4
- package/lib/index.d.ts +0 -4
- package/lib/index.js +7 -8
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +7 -8
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.mts
CHANGED
|
@@ -1251,10 +1251,6 @@ declare class MonorepoProject extends TypeScriptAppProject {
|
|
|
1251
1251
|
* official CodeDrifters configs.
|
|
1252
1252
|
*/
|
|
1253
1253
|
readonly upgradeConfigulatorTask?: UpgradeDependencies;
|
|
1254
|
-
/**
|
|
1255
|
-
* List of functions to call after dependencies have been installed.
|
|
1256
|
-
*/
|
|
1257
|
-
private postInstallDependencies;
|
|
1258
1254
|
constructor(userOptions: MonorepoProjectOptions);
|
|
1259
1255
|
/**
|
|
1260
1256
|
* Allows a sub project to request installation of dependency at the Monorepo root
|
package/lib/index.d.ts
CHANGED
|
@@ -1300,10 +1300,6 @@ declare class MonorepoProject extends TypeScriptAppProject {
|
|
|
1300
1300
|
* official CodeDrifters configs.
|
|
1301
1301
|
*/
|
|
1302
1302
|
readonly upgradeConfigulatorTask?: UpgradeDependencies;
|
|
1303
|
-
/**
|
|
1304
|
-
* List of functions to call after dependencies have been installed.
|
|
1305
|
-
*/
|
|
1306
|
-
private postInstallDependencies;
|
|
1307
1303
|
constructor(userOptions: MonorepoProjectOptions);
|
|
1308
1304
|
/**
|
|
1309
1305
|
* Allows a sub project to request installation of dependency at the Monorepo root
|
package/lib/index.js
CHANGED
|
@@ -1194,6 +1194,7 @@ var VSCodeConfig = class extends import_projen7.Component {
|
|
|
1194
1194
|
};
|
|
1195
1195
|
|
|
1196
1196
|
// src/projects/monorepo-project.ts
|
|
1197
|
+
var postInstallDependenciesMap = /* @__PURE__ */ new WeakMap();
|
|
1197
1198
|
var MonorepoProject = class extends import_typescript.TypeScriptAppProject {
|
|
1198
1199
|
constructor(userOptions) {
|
|
1199
1200
|
const buildWorkflowOptions = userOptions.turboOptions?.remoteCacheOptions ? TurboRepo.buildWorkflowOptions(
|
|
@@ -1365,10 +1366,7 @@ var MonorepoProject = class extends import_typescript.TypeScriptAppProject {
|
|
|
1365
1366
|
requiredOptions
|
|
1366
1367
|
);
|
|
1367
1368
|
super({ ...options });
|
|
1368
|
-
|
|
1369
|
-
* List of functions to call after dependencies have been installed.
|
|
1370
|
-
*/
|
|
1371
|
-
this.postInstallDependencies = new Array();
|
|
1369
|
+
postInstallDependenciesMap.set(this, []);
|
|
1372
1370
|
this.pnpmVersion = options.pnpmVersion;
|
|
1373
1371
|
new VSCodeConfig(this);
|
|
1374
1372
|
new PnpmWorkspace(this, options.pnpmOptions?.pnpmWorkspaceOptions);
|
|
@@ -1427,22 +1425,23 @@ var MonorepoProject = class extends import_typescript.TypeScriptAppProject {
|
|
|
1427
1425
|
* This is used to resolve dependency versions from `*` to a concrete version constraint.
|
|
1428
1426
|
*/
|
|
1429
1427
|
requestInstallDependencies(resolver) {
|
|
1430
|
-
this.
|
|
1428
|
+
postInstallDependenciesMap.get(this).push(resolver.resolveDepsAndWritePackageJson);
|
|
1431
1429
|
}
|
|
1432
1430
|
/**
|
|
1433
1431
|
* Hooks into the install dependencies cycle
|
|
1434
1432
|
*/
|
|
1435
1433
|
postSynthesize() {
|
|
1436
|
-
|
|
1434
|
+
const postInstallDependencies = postInstallDependenciesMap.get(this);
|
|
1435
|
+
if (postInstallDependencies?.length) {
|
|
1437
1436
|
const nodePkg = this.package;
|
|
1438
1437
|
nodePkg.installDependencies();
|
|
1439
|
-
const completedRequests =
|
|
1438
|
+
const completedRequests = postInstallDependencies.map(
|
|
1440
1439
|
(request) => request()
|
|
1441
1440
|
);
|
|
1442
1441
|
if (completedRequests.some(Boolean)) {
|
|
1443
1442
|
nodePkg.installDependencies();
|
|
1444
1443
|
}
|
|
1445
|
-
this
|
|
1444
|
+
postInstallDependenciesMap.set(this, []);
|
|
1446
1445
|
}
|
|
1447
1446
|
}
|
|
1448
1447
|
};
|