@codedrifters/configulator 0.0.332 → 0.0.333
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 +21 -0
- package/lib/index.d.ts +21 -0
- package/lib/index.js +57 -33
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +27 -3
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.mts
CHANGED
|
@@ -12119,6 +12119,27 @@ declare class MonorepoProject extends TypeScriptAppProject {
|
|
|
12119
12119
|
* This is used to resolve dependency versions from `*` to a concrete version constraint.
|
|
12120
12120
|
*/
|
|
12121
12121
|
requestInstallDependencies(resolver: IDependencyResolver): void;
|
|
12122
|
+
/**
|
|
12123
|
+
* Runs a non-frozen dependency install during synth.
|
|
12124
|
+
*
|
|
12125
|
+
* Projen's `NodePackage.installDependencies` runs the frozen `install:ci`
|
|
12126
|
+
* task (`pnpm i --frozen-lockfile`) whenever `process.env.CI` is truthy.
|
|
12127
|
+
* That is wrong for a synth-time install: synth itself can rewrite
|
|
12128
|
+
* `pnpm-workspace.yaml` (e.g. when a configulator catalog value in
|
|
12129
|
+
* `versions.ts` bumps), leaving the lockfile out of sync with the freshly
|
|
12130
|
+
* written workspace catalog. A frozen install then fails with
|
|
12131
|
+
* `ERR_PNPM_LOCKFILE_CONFIG_MISMATCH`, which previously broke the scheduled
|
|
12132
|
+
* upgrade workflow on every consumer repo across any catalog bump.
|
|
12133
|
+
*
|
|
12134
|
+
* Frozen-install enforcement belongs to CI's explicit `install:ci`
|
|
12135
|
+
* invocation, not to the synth-time install. We therefore always run the
|
|
12136
|
+
* non-frozen `install` task here, which refreshes the lockfile to match the
|
|
12137
|
+
* rewritten workspace — matching the canonical regen sequence consumers
|
|
12138
|
+
* already document (`pnpm i && pnpm exec projen && pnpm i`, neither frozen).
|
|
12139
|
+
*
|
|
12140
|
+
* @see https://github.com/codedrifters/packages/issues/570
|
|
12141
|
+
*/
|
|
12142
|
+
private installDependenciesNonFrozen;
|
|
12122
12143
|
/**
|
|
12123
12144
|
* Hooks into the install dependencies cycle
|
|
12124
12145
|
*/
|
package/lib/index.d.ts
CHANGED
|
@@ -12168,6 +12168,27 @@ declare class MonorepoProject extends TypeScriptAppProject {
|
|
|
12168
12168
|
* This is used to resolve dependency versions from `*` to a concrete version constraint.
|
|
12169
12169
|
*/
|
|
12170
12170
|
requestInstallDependencies(resolver: IDependencyResolver): void;
|
|
12171
|
+
/**
|
|
12172
|
+
* Runs a non-frozen dependency install during synth.
|
|
12173
|
+
*
|
|
12174
|
+
* Projen's `NodePackage.installDependencies` runs the frozen `install:ci`
|
|
12175
|
+
* task (`pnpm i --frozen-lockfile`) whenever `process.env.CI` is truthy.
|
|
12176
|
+
* That is wrong for a synth-time install: synth itself can rewrite
|
|
12177
|
+
* `pnpm-workspace.yaml` (e.g. when a configulator catalog value in
|
|
12178
|
+
* `versions.ts` bumps), leaving the lockfile out of sync with the freshly
|
|
12179
|
+
* written workspace catalog. A frozen install then fails with
|
|
12180
|
+
* `ERR_PNPM_LOCKFILE_CONFIG_MISMATCH`, which previously broke the scheduled
|
|
12181
|
+
* upgrade workflow on every consumer repo across any catalog bump.
|
|
12182
|
+
*
|
|
12183
|
+
* Frozen-install enforcement belongs to CI's explicit `install:ci`
|
|
12184
|
+
* invocation, not to the synth-time install. We therefore always run the
|
|
12185
|
+
* non-frozen `install` task here, which refreshes the lockfile to match the
|
|
12186
|
+
* rewritten workspace — matching the canonical regen sequence consumers
|
|
12187
|
+
* already document (`pnpm i && pnpm exec projen && pnpm i`, neither frozen).
|
|
12188
|
+
*
|
|
12189
|
+
* @see https://github.com/codedrifters/packages/issues/570
|
|
12190
|
+
*/
|
|
12191
|
+
private installDependenciesNonFrozen;
|
|
12171
12192
|
/**
|
|
12172
12193
|
* Hooks into the install dependencies cycle
|
|
12173
12194
|
*/
|
package/lib/index.js
CHANGED
|
@@ -34914,7 +34914,7 @@ export default preview;
|
|
|
34914
34914
|
}
|
|
34915
34915
|
|
|
34916
34916
|
// src/projects/astro-project.ts
|
|
34917
|
-
var
|
|
34917
|
+
var import_projen25 = require("projen");
|
|
34918
34918
|
var import_ts_deepmerge3 = require("ts-deepmerge");
|
|
34919
34919
|
|
|
34920
34920
|
// src/projects/monorepo-layout.ts
|
|
@@ -35062,12 +35062,13 @@ function resolveReactViteSiteProjectOutdir(packageName) {
|
|
|
35062
35062
|
}
|
|
35063
35063
|
|
|
35064
35064
|
// src/projects/typescript-project.ts
|
|
35065
|
-
var
|
|
35065
|
+
var import_projen24 = require("projen");
|
|
35066
35066
|
var import_javascript4 = require("projen/lib/javascript");
|
|
35067
35067
|
var import_release = require("projen/lib/release");
|
|
35068
35068
|
var import_ts_deepmerge2 = require("ts-deepmerge");
|
|
35069
35069
|
|
|
35070
35070
|
// src/projects/monorepo-project.ts
|
|
35071
|
+
var import_projen21 = require("projen");
|
|
35071
35072
|
var import_github5 = require("projen/lib/github");
|
|
35072
35073
|
var import_javascript3 = require("projen/lib/javascript");
|
|
35073
35074
|
var import_typescript3 = require("projen/lib/typescript");
|
|
@@ -36092,19 +36093,42 @@ var MonorepoProject = class extends import_typescript3.TypeScriptAppProject {
|
|
|
36092
36093
|
requestInstallDependencies(resolver) {
|
|
36093
36094
|
postInstallDependenciesMap.get(this).push(resolver.resolveDepsAndWritePackageJson);
|
|
36094
36095
|
}
|
|
36096
|
+
/**
|
|
36097
|
+
* Runs a non-frozen dependency install during synth.
|
|
36098
|
+
*
|
|
36099
|
+
* Projen's `NodePackage.installDependencies` runs the frozen `install:ci`
|
|
36100
|
+
* task (`pnpm i --frozen-lockfile`) whenever `process.env.CI` is truthy.
|
|
36101
|
+
* That is wrong for a synth-time install: synth itself can rewrite
|
|
36102
|
+
* `pnpm-workspace.yaml` (e.g. when a configulator catalog value in
|
|
36103
|
+
* `versions.ts` bumps), leaving the lockfile out of sync with the freshly
|
|
36104
|
+
* written workspace catalog. A frozen install then fails with
|
|
36105
|
+
* `ERR_PNPM_LOCKFILE_CONFIG_MISMATCH`, which previously broke the scheduled
|
|
36106
|
+
* upgrade workflow on every consumer repo across any catalog bump.
|
|
36107
|
+
*
|
|
36108
|
+
* Frozen-install enforcement belongs to CI's explicit `install:ci`
|
|
36109
|
+
* invocation, not to the synth-time install. We therefore always run the
|
|
36110
|
+
* non-frozen `install` task here, which refreshes the lockfile to match the
|
|
36111
|
+
* rewritten workspace — matching the canonical regen sequence consumers
|
|
36112
|
+
* already document (`pnpm i && pnpm exec projen && pnpm i`, neither frozen).
|
|
36113
|
+
*
|
|
36114
|
+
* @see https://github.com/codedrifters/packages/issues/570
|
|
36115
|
+
*/
|
|
36116
|
+
installDependenciesNonFrozen() {
|
|
36117
|
+
const runtime = new import_projen21.TaskRuntime(this.outdir);
|
|
36118
|
+
runtime.runTask(this.package.installTask.name);
|
|
36119
|
+
}
|
|
36095
36120
|
/**
|
|
36096
36121
|
* Hooks into the install dependencies cycle
|
|
36097
36122
|
*/
|
|
36098
36123
|
postSynthesize() {
|
|
36099
36124
|
const postInstallDependencies = postInstallDependenciesMap.get(this);
|
|
36100
36125
|
if (postInstallDependencies?.length) {
|
|
36101
|
-
|
|
36102
|
-
nodePkg.installDependencies();
|
|
36126
|
+
this.installDependenciesNonFrozen();
|
|
36103
36127
|
const completedRequests = postInstallDependencies.map(
|
|
36104
36128
|
(request) => request()
|
|
36105
36129
|
);
|
|
36106
36130
|
if (completedRequests.some(Boolean)) {
|
|
36107
|
-
|
|
36131
|
+
this.installDependenciesNonFrozen();
|
|
36108
36132
|
}
|
|
36109
36133
|
postInstallDependenciesMap.set(this, []);
|
|
36110
36134
|
}
|
|
@@ -36112,11 +36136,11 @@ var MonorepoProject = class extends import_typescript3.TypeScriptAppProject {
|
|
|
36112
36136
|
};
|
|
36113
36137
|
|
|
36114
36138
|
// src/typescript/tsdoc-config.ts
|
|
36115
|
-
var
|
|
36139
|
+
var import_projen22 = require("projen");
|
|
36116
36140
|
var STANDARD_MODIFIER_TAGS = ["@default"];
|
|
36117
36141
|
var STANDARD_INLINE_TAGS = ["@code"];
|
|
36118
36142
|
var ALWAYS_ON_SCOPES = ["@codedrifters"];
|
|
36119
|
-
var TsdocConfig = class _TsdocConfig extends
|
|
36143
|
+
var TsdocConfig = class _TsdocConfig extends import_projen22.Component {
|
|
36120
36144
|
/**
|
|
36121
36145
|
* Derive a workspace scope from a scoped package name (`@scope/name`).
|
|
36122
36146
|
* Returns `undefined` when the name is unscoped.
|
|
@@ -36161,7 +36185,7 @@ var TsdocConfig = class _TsdocConfig extends import_projen21.Component {
|
|
|
36161
36185
|
allowMultiple: true
|
|
36162
36186
|
}))
|
|
36163
36187
|
].sort((a, b) => a.tagName.localeCompare(b.tagName));
|
|
36164
|
-
new
|
|
36188
|
+
new import_projen22.JsonFile(project, "tsdoc.json", {
|
|
36165
36189
|
marker: false,
|
|
36166
36190
|
obj: {
|
|
36167
36191
|
$schema: "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
|
|
@@ -36174,9 +36198,9 @@ var TsdocConfig = class _TsdocConfig extends import_projen21.Component {
|
|
|
36174
36198
|
|
|
36175
36199
|
// src/typescript/typescript-config.ts
|
|
36176
36200
|
var import_node_path3 = require("path");
|
|
36177
|
-
var
|
|
36201
|
+
var import_projen23 = require("projen");
|
|
36178
36202
|
var import_path = require("projen/lib/util/path");
|
|
36179
|
-
var TypeScriptConfig = class extends
|
|
36203
|
+
var TypeScriptConfig = class extends import_projen23.Component {
|
|
36180
36204
|
constructor(project) {
|
|
36181
36205
|
super(project);
|
|
36182
36206
|
let tsPaths = {};
|
|
@@ -36207,7 +36231,7 @@ var TestRunner = {
|
|
|
36207
36231
|
JEST: "jest",
|
|
36208
36232
|
VITEST: "vitest"
|
|
36209
36233
|
};
|
|
36210
|
-
var TypeScriptProject = class extends
|
|
36234
|
+
var TypeScriptProject = class extends import_projen24.typescript.TypeScriptProject {
|
|
36211
36235
|
constructor(userOptions) {
|
|
36212
36236
|
if (!(userOptions.parent instanceof MonorepoProject)) {
|
|
36213
36237
|
throw new Error(
|
|
@@ -36529,10 +36553,10 @@ var AstroProject = class extends TypeScriptProject {
|
|
|
36529
36553
|
adapter: options.adapter
|
|
36530
36554
|
});
|
|
36531
36555
|
if (options.sampleCode === true) {
|
|
36532
|
-
new
|
|
36556
|
+
new import_projen25.SampleFile(this, "src/pages/index.astro", {
|
|
36533
36557
|
contents: DEFAULT_INDEX_ASTRO
|
|
36534
36558
|
});
|
|
36535
|
-
new
|
|
36559
|
+
new import_projen25.SampleFile(this, "public/favicon.svg", {
|
|
36536
36560
|
contents: DEFAULT_FAVICON_SVG
|
|
36537
36561
|
});
|
|
36538
36562
|
}
|
|
@@ -36557,19 +36581,19 @@ var DEFAULT_FAVICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
|
36557
36581
|
`;
|
|
36558
36582
|
|
|
36559
36583
|
// src/projects/aws-cdk-project.ts
|
|
36560
|
-
var
|
|
36584
|
+
var import_projen28 = require("projen");
|
|
36561
36585
|
var import_javascript5 = require("projen/lib/javascript");
|
|
36562
36586
|
var import_release2 = require("projen/lib/release");
|
|
36563
36587
|
var import_ts_deepmerge4 = require("ts-deepmerge");
|
|
36564
36588
|
|
|
36565
36589
|
// src/workflows/aws-deploy-workflow.ts
|
|
36566
36590
|
var import_utils11 = __toESM(require_lib());
|
|
36567
|
-
var
|
|
36591
|
+
var import_projen26 = require("projen");
|
|
36568
36592
|
var import_build = require("projen/lib/build");
|
|
36569
36593
|
var import_github6 = require("projen/lib/github");
|
|
36570
36594
|
var import_workflows_model5 = require("projen/lib/github/workflows-model");
|
|
36571
36595
|
var PROD_DEPLOY_NAME = "prod-deploy";
|
|
36572
|
-
var AwsDeployWorkflow = class _AwsDeployWorkflow extends
|
|
36596
|
+
var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen26.Component {
|
|
36573
36597
|
constructor(project, options = {}) {
|
|
36574
36598
|
super(project);
|
|
36575
36599
|
this.project = project;
|
|
@@ -36886,7 +36910,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen25.Compone
|
|
|
36886
36910
|
};
|
|
36887
36911
|
|
|
36888
36912
|
// src/workflows/aws-teardown-workflow.ts
|
|
36889
|
-
var
|
|
36913
|
+
var import_projen27 = require("projen");
|
|
36890
36914
|
var import_github7 = require("projen/lib/github");
|
|
36891
36915
|
var import_workflows_model6 = require("projen/lib/github/workflows-model");
|
|
36892
36916
|
var DEFAULT_TEARDOWN_BRANCH_PATTERNS = [
|
|
@@ -36908,7 +36932,7 @@ var resolveBranchPatterns = (explicit, targets) => {
|
|
|
36908
36932
|
}
|
|
36909
36933
|
return [...DEFAULT_TEARDOWN_BRANCH_PATTERNS];
|
|
36910
36934
|
};
|
|
36911
|
-
var AwsTeardownWorkflow = class extends
|
|
36935
|
+
var AwsTeardownWorkflow = class extends import_projen27.Component {
|
|
36912
36936
|
constructor(rootProject, options) {
|
|
36913
36937
|
super(rootProject);
|
|
36914
36938
|
this.rootProject = rootProject;
|
|
@@ -37090,7 +37114,7 @@ var AwsTeardownWorkflow = class extends import_projen26.Component {
|
|
|
37090
37114
|
};
|
|
37091
37115
|
|
|
37092
37116
|
// src/projects/aws-cdk-project.ts
|
|
37093
|
-
var AwsCdkProject = class extends
|
|
37117
|
+
var AwsCdkProject = class extends import_projen28.awscdk.AwsCdkTypeScriptApp {
|
|
37094
37118
|
constructor(userOptions) {
|
|
37095
37119
|
if (!(userOptions.parent instanceof MonorepoProject)) {
|
|
37096
37120
|
throw new Error(
|
|
@@ -37287,7 +37311,7 @@ var AwsCdkProject = class extends import_projen27.awscdk.AwsCdkTypeScriptApp {
|
|
|
37287
37311
|
};
|
|
37288
37312
|
|
|
37289
37313
|
// src/projects/react-vite-site-project.ts
|
|
37290
|
-
var
|
|
37314
|
+
var import_projen29 = require("projen");
|
|
37291
37315
|
var import_ts_deepmerge5 = require("ts-deepmerge");
|
|
37292
37316
|
var ReactViteSiteProject = class extends TypeScriptProject {
|
|
37293
37317
|
constructor(userOptions) {
|
|
@@ -37326,7 +37350,7 @@ var ReactViteSiteProject = class extends TypeScriptProject {
|
|
|
37326
37350
|
};
|
|
37327
37351
|
super(options);
|
|
37328
37352
|
this.package.addField("type", "module");
|
|
37329
|
-
new
|
|
37353
|
+
new import_projen29.TextFile(this, ".nvmrc", { lines: ["v24.11.0"] });
|
|
37330
37354
|
this.tsconfig?.file.addOverride("compilerOptions.target", "ES2020");
|
|
37331
37355
|
this.tsconfig?.file.addOverride("compilerOptions.lib", [
|
|
37332
37356
|
"ES2020",
|
|
@@ -37376,7 +37400,7 @@ var ReactViteSiteProject = class extends TypeScriptProject {
|
|
|
37376
37400
|
"build",
|
|
37377
37401
|
".turbo"
|
|
37378
37402
|
]);
|
|
37379
|
-
new
|
|
37403
|
+
new import_projen29.SampleFile(this, "vite.config.ts", {
|
|
37380
37404
|
contents: `import { defineConfig } from 'vite';
|
|
37381
37405
|
import react from '@vitejs/plugin-react';
|
|
37382
37406
|
import tailwindcss from '@tailwindcss/vite';
|
|
@@ -37388,7 +37412,7 @@ export default defineConfig({
|
|
|
37388
37412
|
});
|
|
37389
37413
|
`
|
|
37390
37414
|
});
|
|
37391
|
-
new
|
|
37415
|
+
new import_projen29.SampleFile(this, "src/vite-env.d.ts", {
|
|
37392
37416
|
contents: `/// <reference types="vite/client" />
|
|
37393
37417
|
|
|
37394
37418
|
interface ImportMetaEnv {
|
|
@@ -37403,7 +37427,7 @@ interface ImportMeta {
|
|
|
37403
37427
|
});
|
|
37404
37428
|
if (options.testRunner !== TestRunner.JEST) {
|
|
37405
37429
|
this.tryRemoveFile("vitest.config.ts");
|
|
37406
|
-
new
|
|
37430
|
+
new import_projen29.SampleFile(this, "vitest.config.ts", {
|
|
37407
37431
|
contents: `import { defineConfig, mergeConfig } from 'vitest/config';
|
|
37408
37432
|
import react from '@vitejs/plugin-react';
|
|
37409
37433
|
import viteConfig from './vite.config';
|
|
@@ -37547,7 +37571,7 @@ export default mergeConfig(
|
|
|
37547
37571
|
}
|
|
37548
37572
|
if (userOptions.sampleCode === true) {
|
|
37549
37573
|
const siteName = options.name;
|
|
37550
|
-
new
|
|
37574
|
+
new import_projen29.SampleFile(this, "index.html", {
|
|
37551
37575
|
contents: `<!doctype html>
|
|
37552
37576
|
<html>
|
|
37553
37577
|
<head>
|
|
@@ -37562,7 +37586,7 @@ export default mergeConfig(
|
|
|
37562
37586
|
</html>
|
|
37563
37587
|
`
|
|
37564
37588
|
});
|
|
37565
|
-
new
|
|
37589
|
+
new import_projen29.SampleFile(this, "src/routes.tsx", {
|
|
37566
37590
|
contents: `import { createBrowserRouter } from 'react-router-dom';
|
|
37567
37591
|
import App from './App';
|
|
37568
37592
|
|
|
@@ -37571,7 +37595,7 @@ export const router = createBrowserRouter([
|
|
|
37571
37595
|
]);
|
|
37572
37596
|
`
|
|
37573
37597
|
});
|
|
37574
|
-
new
|
|
37598
|
+
new import_projen29.SampleFile(this, "src/main.tsx", {
|
|
37575
37599
|
contents: `import React from 'react';
|
|
37576
37600
|
import ReactDOM from 'react-dom/client';
|
|
37577
37601
|
import { RouterProvider } from 'react-router-dom';
|
|
@@ -37585,7 +37609,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
37585
37609
|
);
|
|
37586
37610
|
`
|
|
37587
37611
|
});
|
|
37588
|
-
new
|
|
37612
|
+
new import_projen29.SampleFile(this, "src/App.tsx", {
|
|
37589
37613
|
contents: `export default function App() {
|
|
37590
37614
|
return (
|
|
37591
37615
|
<main className="p-4">
|
|
@@ -37595,11 +37619,11 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
37595
37619
|
}
|
|
37596
37620
|
`
|
|
37597
37621
|
});
|
|
37598
|
-
new
|
|
37622
|
+
new import_projen29.SampleFile(this, "src/index.css", {
|
|
37599
37623
|
contents: `@import "tailwindcss";
|
|
37600
37624
|
`
|
|
37601
37625
|
});
|
|
37602
|
-
new
|
|
37626
|
+
new import_projen29.SampleFile(this, "src/setupTests.ts", {
|
|
37603
37627
|
contents: `import '@testing-library/jest-dom';
|
|
37604
37628
|
`
|
|
37605
37629
|
});
|
|
@@ -37608,7 +37632,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
37608
37632
|
};
|
|
37609
37633
|
|
|
37610
37634
|
// src/projects/starlight-project.ts
|
|
37611
|
-
var
|
|
37635
|
+
var import_projen30 = require("projen");
|
|
37612
37636
|
var STARLIGHT_ROLE = {
|
|
37613
37637
|
DOCS: "docs",
|
|
37614
37638
|
SITE: "site"
|
|
@@ -37650,10 +37674,10 @@ var StarlightProject = class extends AstroProject {
|
|
|
37650
37674
|
turbo.compileTask.inputs.push("src/content/**");
|
|
37651
37675
|
}
|
|
37652
37676
|
if (userOptions.sampleContent === true) {
|
|
37653
|
-
new
|
|
37677
|
+
new import_projen30.SampleFile(this, "src/content/docs/index.mdx", {
|
|
37654
37678
|
contents: DEFAULT_INDEX_MDX
|
|
37655
37679
|
});
|
|
37656
|
-
new
|
|
37680
|
+
new import_projen30.SampleFile(this, "src/content.config.ts", {
|
|
37657
37681
|
contents: DEFAULT_CONTENT_CONFIG_TS
|
|
37658
37682
|
});
|
|
37659
37683
|
}
|