@codedrifters/configulator 0.0.119 → 0.0.121

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 CHANGED
@@ -394,7 +394,7 @@ declare const VERSION: {
394
394
  /**
395
395
  * Version of Projen to use.
396
396
  */
397
- readonly PROJEN_VERSION: "0.99.17";
397
+ readonly PROJEN_VERSION: "0.99.18";
398
398
  /**
399
399
  * What version of the turborepo library should we use?
400
400
  */
@@ -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
@@ -443,7 +443,7 @@ declare const VERSION: {
443
443
  /**
444
444
  * Version of Projen to use.
445
445
  */
446
- readonly PROJEN_VERSION: "0.99.17";
446
+ readonly PROJEN_VERSION: "0.99.18";
447
447
  /**
448
448
  * What version of the turborepo library should we use?
449
449
  */
@@ -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
@@ -805,7 +805,7 @@ var VERSION = {
805
805
  /**
806
806
  * Version of Projen to use.
807
807
  */
808
- PROJEN_VERSION: "0.99.17",
808
+ PROJEN_VERSION: "0.99.18",
809
809
  /**
810
810
  * What version of the turborepo library should we use?
811
811
  */
@@ -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.postInstallDependencies.push(resolver.resolveDepsAndWritePackageJson);
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
- if (this.postInstallDependencies.length) {
1434
+ const postInstallDependencies = postInstallDependenciesMap.get(this);
1435
+ if (postInstallDependencies?.length) {
1437
1436
  const nodePkg = this.package;
1438
1437
  nodePkg.installDependencies();
1439
- const completedRequests = this.postInstallDependencies.map(
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.postInstallDependencies = [];
1444
+ postInstallDependenciesMap.set(this, []);
1446
1445
  }
1447
1446
  }
1448
1447
  };