@nikovirtala/projen-constructs 0.5.1 → 0.5.2

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.
Files changed (40) hide show
  1. package/.jsii +4 -4
  2. package/.kiro/steering/product.md +7 -5
  3. package/.kiro/steering/tech.md +7 -5
  4. package/README.md +94 -478
  5. package/docs/api/assets/highlight.css +8 -8
  6. package/docs/api/functions/renderBundleName.html +1 -1
  7. package/docs/api/index.html +96 -415
  8. package/docs/api/interfaces/AwsCdkConstructLibraryProjectOptions.html +3 -3
  9. package/docs/api/interfaces/AwsCdkTypeScriptAppProjectOptions.html +3 -3
  10. package/docs/api/interfaces/JsiiProjectOptions.html +3 -3
  11. package/docs/api/interfaces/LocalStackOptions.html +2 -2
  12. package/docs/api/interfaces/ProjectGeneratorOptions.html +1 -1
  13. package/docs/api/interfaces/TypeScriptProjectOptions.html +3 -3
  14. package/docs/api/interfaces/VitestConfigOptions.html +3 -3
  15. package/docs/api/interfaces/VitestOptions.html +2 -2
  16. package/docs/api/media/LICENSE +202 -0
  17. package/docs/api/media/components.md +191 -0
  18. package/docs/api/media/configuration.md +108 -0
  19. package/docs/api/media/development.md +93 -0
  20. package/docs/api/media/index.html +169 -0
  21. package/docs/api/media/migration.md +106 -0
  22. package/docs/api/modules.html +2 -2
  23. package/docs/components.md +191 -0
  24. package/docs/configuration.md +108 -0
  25. package/docs/development.md +93 -0
  26. package/docs/migration.md +106 -0
  27. package/lib/components/bundle-lambda-function-code.js +3 -3
  28. package/lib/components/colima.js +1 -1
  29. package/lib/components/homebrew.js +1 -1
  30. package/lib/components/lambda-function-construct-generator.js +1 -1
  31. package/lib/components/localstack.js +1 -1
  32. package/lib/components/mise.js +1 -1
  33. package/lib/components/typedoc.js +1 -1
  34. package/lib/components/vitest.js +1 -1
  35. package/lib/project-generator.js +1 -1
  36. package/lib/projects/awscdk-construct-library.generated.js +1 -1
  37. package/lib/projects/awscdk-typescript-app.generated.js +1 -1
  38. package/lib/projects/jsii.generated.js +1 -1
  39. package/lib/projects/typescript.generated.js +1 -1
  40. package/package.json +3 -2
package/.jsii CHANGED
@@ -4178,7 +4178,7 @@
4178
4178
  }
4179
4179
  }
4180
4180
  },
4181
- "description": "Projen project types with standard configuration",
4181
+ "description": "Opinionated projen project types that scaffold TypeScript, JSII and AWS CDK repositories with one shared config.",
4182
4182
  "docs": {
4183
4183
  "stability": "stable"
4184
4184
  },
@@ -4196,7 +4196,7 @@
4196
4196
  },
4197
4197
  "name": "@nikovirtala/projen-constructs",
4198
4198
  "readme": {
4199
- "markdown": "# @nikovirtala/projen-constructs\n\nProjen project types with standard configuration for consistent project setup across all repositories.\n\n## Installation\n\n```bash\npnpm add -D @nikovirtala/projen-constructs projen constructs\n```\n\nRequires pnpm 12 and `projen` ^0.104.23. `@mrgrain/cdk-esbuild` and `constructs` are peer\ndependencies as well.\n\nTo create a project from scratch:\n\n```bash\npnpm dlx projen new --from @nikovirtala/projen-constructs aws_cdk_construct_library\n```\n\n## Features\n\n- **Standard Configuration**: Opinionated defaults for author, release branch, package manager, Node.js, TypeScript, and tooling\n- **Automatic Project Type Discovery**: Generates the `ProjectType` enum from Projen's JSII manifest (19 project types)\n- **Component System**: Reusable components (Vitest, TypeDoc, Mise, Homebrew, Colima, LocalStack, Lambda bundling)\n- **Code Generation**: `ProjectGenerator` creates project classes with standard configuration\n- **ES Modules**: TypeScript and CDK App projects use ES modules (JSII uses CommonJS)\n- **Code Quality**: Biome for formatting and linting\n- **Testing**: Vitest with coverage\n- **Auto-merge**: Enabled with auto-approve\n- **VSCode**: Recommended extensions and settings\n- **mise**: Node version management\n\n## Standard Configuration\n\n- **Author**: Niko Virtala (niko.virtala@hey.com)\n- **Default Release Branch**: main\n- **Package Manager**: pnpm 12.16.1\n- **Node Version**: 26.13.0\n- **TypeScript**: 6.0.3\n- **CDK Version**: 2.263.0 (for CDK projects)\n- **JSII Version**: ~6.0.3 (for JSII projects)\n\nThe AWS CDK, Node.js and TypeScript versions live in `src/versions.json` and are refreshed by the\n`update-versions` task, which the dependency upgrade workflow runs.\n\n### pnpm\n\npnpm reads its settings from `pnpm-workspace.yaml`, not `.npmrc`, since pnpm 11. Generated projects\nget:\n\n| Setting | Value | Reason |\n| ---------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------ |\n| `nodeLinker` | `hoisted` | jsii tooling resolves dependencies from a flat `node_modules` |\n| `allowBuilds` | `esbuild: true` | esbuild links its platform binary in a postinstall script, and pnpm 11 fails an install with ignored builds |\n| `verifyDepsBeforeRun` | `false` | projen resolves the task `PATH` with `$(pnpm -c exec ...)`, which otherwise re-enters `pnpm install` and deadlocks |\n| `minimumReleaseAge` | `0` | the pnpm 11 default of 1440 minutes makes pnpm write `minimumReleaseAgeExclude` entries into this generated file |\n\n### TypeScript configuration\n\nProjen renders three configs, and none of them should be edited directly:\n\n- `tsconfig.json` compiles `src` to `lib`. For JSII projects, jsii validates it against its `strict`\n rule set, so it only carries compiler options jsii accepts.\n- `test/tsconfig.json` extends it and is type-check only. This is the config Vitest type checking and\n the editor use, and the one `tsconfigDev` points at.\n- `projenrc/tsconfig.json` covers `.projenrc.ts`.\n\n### Native TypeScript\n\nTypeScript and AWS CDK app projects run TypeScript with Node.js's built-in\n[type stripping](https://nodejs.org/api/typescript.html#type-stripping) instead of `tsx` or\n`ts-node`: the default task is `node .projenrc.ts`, and the cdk.json `app` is `node src/main.ts`.\nTheir `tsconfig.json` sets `erasableSyntaxOnly` and `verbatimModuleSyntax`, so `tsc` reports code\nthat Node.js can't run before Node.js does.\n\nCode in these projects must therefore:\n\n- only use syntax that can be stripped: no `enum`s (use an `as const` object), no namespaces with\n values, and no constructor parameter properties\n- mark type-only imports with `type` (Biome's `useImportType` fixes these)\n- import relative files with their `.ts` extension, and never import a directory\n- use Node.js [subpath imports](https://nodejs.org/api/packages.html#subpath-imports)\n (`#stacks` in `package.json` `imports`) instead of tsconfig `paths`, which Node.js doesn't read\n- import packages without an `exports` map either from the package root or with an explicit file,\n e.g. `projen/lib/component.js` rather than `projen/lib/component`\n\nLambda handlers bundled by esbuild and tests run by Vitest aren't run by Node.js directly, but the\nsame compiler options apply to them.\n\nJSII and AWS CDK construct library projects keep using `tsx`, because jsii compiles to CommonJS, and\ntheir `.projenrc.ts` often imports their own `src`.\n\nWhen you start a new project by hand, make sure `package.json` has `\"type\": \"module\"` before the\nfirst `node .projenrc.ts`: `npm init` writes `\"type\": \"commonjs\"`, which makes Node.js reject the\n`import` statements in `.projenrc.ts`.\n\n## Customization\n\nOverride any option by passing it to the constructor:\n\n```typescript\nimport { JsiiProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new JsiiProject({\n name: \"my-project\",\n repositoryUrl: \"https://github.com/nikovirtala/my-project.git\",\n minNodeVersion: \"26.0.0\",\n author: \"Custom Author\",\n authorAddress: \"custom@example.com\",\n mise: false,\n vitest: false,\n tsconfig: {\n compilerOptions: {\n noUnusedLocals: false,\n },\n },\n biomeOptions: {\n biomeConfig: {\n formatter: {\n lineWidth: 100,\n },\n },\n },\n});\n```\n\nEvery component is exposed as an enable flag (`mise`, `vitest`, ...) plus an options property\n(`miseOptions`, `vitestOptions`, ...).\n\n## Usage\n\n### Projects\n\n#### AWS CDK Construct Library Project\n\n```typescript\nimport { AwsCdkConstructLibraryProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkConstructLibraryProject({\n name: \"my-cdk-construct\",\n repositoryUrl: \"https://github.com/nikovirtala/my-cdk-construct.git\",\n});\n\nproject.synth();\n```\n\n#### AWS CDK TypeScript App Project\n\n```typescript\nimport { AwsCdkTypeScriptAppProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkTypeScriptAppProject({\n name: \"my-cdk-app\",\n repository: \"https://github.com/nikovirtala/my-cdk-app.git\",\n});\n\nproject.synth();\n```\n\n#### JSII Project\n\n```typescript\nimport { JsiiProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new JsiiProject({\n name: \"my-jsii-project\",\n repositoryUrl: \"https://github.com/nikovirtala/my-jsii-project.git\",\n});\n\nproject.synth();\n```\n\n#### TypeScript Project\n\n```typescript\nimport { TypeScriptProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new TypeScriptProject({\n name: \"my-typescript-project\",\n repository: \"https://github.com/nikovirtala/my-typescript-project.git\",\n});\n\nproject.synth();\n```\n\n### Components\n\nThe package includes reusable components for common development tasks:\n\n#### Vitest\n\n[Vitest](https://vitest.dev) testing framework component.\n\n```typescript\nimport { Vitest, CoverageProvider, CoverageReporter } from \"@nikovirtala/projen-constructs\";\n\nnew Vitest(project, {\n vitestVersion: \"^5\",\n config: {\n coverageProvider: CoverageProvider.V8,\n coverageReporters: [CoverageReporter.TEXT, CoverageReporter.LCOV],\n },\n});\n```\n\nType checking runs against the project's development tsconfig (`test/tsconfig.json`) unless\n`config.typecheckTsconfig` says otherwise.\n\nFor Vitest settings that `config` doesn't cover, use `extraTestConfig` (merged into `test`) and\n`extraConfig` (top-level options next to `test`):\n\n```typescript\nimport { Vitest } from \"@nikovirtala/projen-constructs\";\n\nnew Vitest(project, {\n extraTestConfig: {\n setupFiles: [\"test/setup.ts\"],\n },\n extraConfig: {\n resolve: { alias: { \"@\": \"/src\" } },\n },\n});\n```\n\n`extraTestConfig` is deep-merged over the generated `test` options: objects merge, and other values\n(including arrays) replace the generated value. Both options are rendered as JSON, so their values\ncan't contain functions or regular expressions, which rules out plugins.\n\n#### TypeDoc\n\n[TypeDoc](https://typedoc.org) documentation generation component.\n\n```typescript\nimport { TypeDoc, EntryPointStrategy } from \"@nikovirtala/projen-constructs\";\n\nnew TypeDoc(project, {\n version: \"^0.28\",\n typeDocConfig: {\n entryPointStrategy: EntryPointStrategy.EXPAND,\n out: \"docs/api\",\n exclude: [\"**/*.test.ts\"],\n },\n});\n```\n\n#### Mise\n\n[Mise](https://mise.jdx.dev) dev tools/runtimes management component.\n\n```typescript\nimport { Mise } from \"@nikovirtala/projen-constructs\";\n\nnew Mise(project, {\n nodeVersion: \"26.13.0\",\n});\n```\n\n#### Homebrew\n\n[Homebrew](https://brew.sh) package management component. Writes a `Brewfile` and adds an\n`install:homebrew` task that bootstraps Homebrew and runs `brew bundle`.\n\n```typescript\nimport { Homebrew } from \"@nikovirtala/projen-constructs\";\n\nconst homebrew = new Homebrew(project, {\n packages: [\"jq\", \"yq\"],\n});\n\nhomebrew.addPackage(\"gh\");\n```\n\nA fully qualified formula (`user/repository/formula`) also adds a `tap` entry. Since Homebrew 6,\nformulae from non-official taps only load when trusted, so they're written with `trusted: true`.\nThat trusts only the formula, not the rest of its tap.\n\n#### Colima\n\n[Colima](https://github.com/abiosoft/colima) container runtime component. Alternative for Docker.\n\n```typescript\nimport { Colima } from \"@nikovirtala/projen-constructs\";\n\nnew Colima(project);\n```\n\n#### LocalStack\n\n[LocalStack](https://www.localstack.cloud) AWS emulation component.\n\n```typescript\nimport { LocalStack } from \"@nikovirtala/projen-constructs\";\n\nnew LocalStack(project, {\n services: [\"s3\", \"lambda\", \"dynamodb\"],\n port: 4566,\n debug: true,\n});\n```\n\n#### LambdaFunctionConstructGenerator\n\nGenerates AWS CDK Lambda Function constructs and bundles their code.\n\n```typescript\nimport { LambdaFunctionConstructGenerator } from \"@nikovirtala/projen-constructs\";\n\nnew LambdaFunctionConstructGenerator(project, {\n sourceDir: \"src/handlers\",\n outputDir: \"src/constructs/lambda\",\n filePattern: \"*.lambda.ts\",\n esbuildOptions: {\n minify: true,\n sourcemap: true,\n },\n});\n```\n\n#### Bundler\n\nLow-level bundling utilities for Lambda functions.\n\n```typescript\nimport {\n Bundler,\n LambdaFunctionCodeBundle,\n} from \"@nikovirtala/projen-constructs\";\n\nconst bundler = new Bundler(project, {\n assetsDir: \"assets\",\n esbuildVersion: \"^0.25\",\n});\n\nnew LambdaFunctionCodeBundle(project, {\n entrypoint: \"src/my-function.lambda.ts\",\n extension: \".lambda.ts\",\n});\n```\n\n#### ProjectGenerator\n\nGenerates TypeScript project classes with standard configuration.\n\n```typescript\nimport { ProjectGenerator, ProjectType, Mise, Vitest } from \"@nikovirtala/projen-constructs\";\n\nnew ProjectGenerator(project, {\n name: \"TypeScriptProject\",\n projectType: ProjectType.TYPE_SCRIPT_PROJECT,\n filePath: \"./src/projects/typescript.generated.ts\",\n components: [\n { componentClass: Mise },\n { componentClass: Vitest }, // Auto-detects VitestOptions from JSII manifest\n ],\n});\n```\n\nFeatures:\n\n- Automatically generates the `ProjectType` enum from Projen's JSII manifest\n- Auto-detects component options types from JSII manifests\n- Strips Projen's `@pjnew` annotation from `packageManager`, which `projen new` would otherwise\n render into a generated `.projenrc.ts` as the package manager that ran the command\n- Validates paths to prevent directory traversal attacks\n- Structured error handling with custom error classes\n\n## Migrating from the standalone packages\n\nThe components used to be published as separate packages. Those packages are deprecated and won't\nget new features or fixes. Every class, interface, enum and function they exported is exported from\n`@nikovirtala/projen-constructs` under the same name, except `AwsCdkApp` (see below).\n\n| Deprecated package | Replacement in `@nikovirtala/projen-constructs` |\n| --- | --- |\n| `@nikovirtala/projen-vitest` | `Vitest`, `VitestOptions`, `VitestConfigOptions`, `Environment`, `Pool`, `CoverageProvider`, `CoverageReporter` |\n| `@nikovirtala/projen-typedoc` | `TypeDoc`, `TypeDocOptions`, `TypeDocConfiguration` and its enums |\n| `@nikovirtala/projen-homebrew` | `Homebrew`, `HomebrewOptions` |\n| `@nikovirtala/projen-colima` | `Colima` |\n| `@nikovirtala/projen-localstack` | `LocalStack`, `LocalStackOptions` |\n| `@nikovirtala/projen-bundle-lambda-function-code` | `Bundler`, `LambdaFunctionCodeBundle`, `LambdaFunctionCodeBundler` and their options |\n| `@nikovirtala/projen-lambda-function-construct-generator` | `LambdaFunctionConstructGenerator`, `LambdaFunctionConstructGeneratorOptions` |\n| `@nikovirtala/projen-aws-cdk-app` | `AwsCdkTypeScriptAppProject`, `AwsCdkTypeScriptAppProjectOptions` |\n\n### Steps\n\n1. In `.projenrc.ts`, replace the old package in `devDeps` with `@nikovirtala/projen-constructs`, and\n change the imports:\n\n ```typescript\n // before\n import { Vitest } from \"@nikovirtala/projen-vitest\";\n // after\n import { Vitest } from \"@nikovirtala/projen-constructs\";\n ```\n\n2. Check the peer dependencies. `@nikovirtala/projen-constructs` needs `projen` ^0.104.23, `constructs`\n ^10 and `@mrgrain/cdk-esbuild` ^5. The standalone packages accepted older projen versions, so you\n may have to upgrade projen in the same change.\n3. Install the new package, run `npx projen` and review the changes to the generated files.\n\n### Changes to expect\n\nThese are the differences in behaviour or generated files between the standalone packages and this\nlibrary.\n\n**Vitest**\n\n- `vitest.config.ts` imports `defineConfig` from\n `@nikovirtala/projen-constructs/lib/vitest-define-config` instead of\n `@nikovirtala/projen-vitest/lib/bundled-define-config`. Projen rewrites the file, so there's\n nothing to change by hand.\n- The config is rendered as JSON, so its keys are quoted. The settings are the same.\n- `config.typecheckTsconfig` defaults to the project's development tsconfig (`test/tsconfig.json`\n in current projen) instead of `tsconfig.dev.json`.\n- JSII and construct library projects exclude `vitest.config.ts` from the published package.\n- New: `extraTestConfig` and `extraConfig` for Vitest settings that `config` doesn't cover.\n\n**Homebrew and Colima**\n\n- Packages from a tap (`owner/tap/formula`) also add a `tap` line to the `Brewfile`, and the\n `Brewfile` is sorted.\n- The `install:homebrew`, `homebrew:bundle` and `colima` tasks run in bash. `homebrew:bundle` also\n finds a freshly installed `brew` that isn't on the `PATH` yet.\n\n**LocalStack**\n\n- `imageTag` is applied: LocalStack starts with `localstack/localstack:<imageTag>`. It used to be\n ignored.\n\n**Bundler / LambdaFunctionCodeBundler**\n\n- `LambdaFunctionCodeBundler.bundleOptions` applies to every discovered entrypoint. Its `entrypoint`\n used to replace them all.\n\n**LambdaFunctionConstructGenerator**\n\n- The bundle task runs `tsx` with the project's development tsconfig instead of `tsconfig.dev.json`.\n\n**TypeDoc**: no changes.\n\n### From `AwsCdkApp` to `AwsCdkTypeScriptAppProject`\n\n```typescript\n// before\nimport { AwsCdkApp } from \"@nikovirtala/projen-aws-cdk-app\";\nconst project = new AwsCdkApp({ name: \"my-app\", cdkVersion: \"2.221.0\" });\n\n// after\nimport { AwsCdkTypeScriptAppProject } from \"@nikovirtala/projen-constructs\";\nconst project = new AwsCdkTypeScriptAppProject({ name: \"my-app\", cdkVersion: \"2.221.0\" });\n```\n\nBoth are ES module apps using pnpm, Biome, Vitest and mise. The differences:\n\n- **Native TypeScript**: `.projenrc.ts` and the app run with `node` instead of `tsx`, and the\n tsconfig sets `erasableSyntaxOnly` and `verbatimModuleSyntax` (see [Native TypeScript](#native-typescript)).\n\n- **`nvm` is removed.** Use mise (on by default), which pins the Node.js version in `mise.toml`.\n- **Homebrew is on by default.** The project gets a `Brewfile`, and `npx projen` runs\n `install:homebrew` (installs Homebrew if `brew` is missing) and `homebrew:bundle`. Set\n `homebrew: false` to turn it off.\n- **cdk.json `app`** is `node src/main.ts` instead of `tsx --tsconfig tsconfig.json src/main.ts`.\n- **Defaults** come from this library: Node.js, TypeScript, CDK and pnpm versions (pnpm 12 instead\n of 10), Dependabot off, auto-merge on, `auto-approve` and `auto-merge` labels on dependency\n upgrade PRs, and auto-approval of PRs by `nikovirtala`. Any option you set explicitly still wins,\n so set `autoApproveOptions` if you aren't `nikovirtala`.\n- **tsconfig**: `noImplicitOverride` and `allowSyntheticDefaultImports` move from `tsconfig.json`\n to the development tsconfig (`test/tsconfig.json`).\n- **Options removed from the interface**: `eslint`, `jest`, `prettier` (and their options),\n `sampleCode` and `tsJestOptions`.\n- `vitestOptions` takes the `VitestOptions` of this library, and now also `homebrewOptions` and\n `miseOptions`.\n\n## Development\n\nThis project is managed by Projen and generates itself: `.projenrc.ts` defines the project using the\n`JsiiProject` type from `src/`. Configuration changes belong in `.projenrc.ts`, never in the\ngenerated files.\n\n```bash\npnpm projen # synthesize project files\npnpm build # synthesize, compile, test and package\npnpm test # biome, vitest, typedoc\npnpm test:watch # vitest in watch mode\npnpm test:update # update snapshots\npnpm biome # format and lint\npnpm docgen # regenerate API.md from the .jsii manifest\npnpm update-versions # refresh src/versions.json\npnpm upgrade # upgrade dependencies\n```\n\n### Build process\n\n```mermaid\nflowchart TD\n projenrc[\".projenrc.ts\"]\n\n subgraph synthesize[\"default (synthesize)\"]\n direction TB\n synth[\"tsx .projenrc.ts\"]\n generator[\"ProjectGenerator\"]\n generated[\"src/project-type.ts<br/>src/projects/*.generated.ts<br/>src/projects/*-options.generated.ts\"]\n projenfiles[\"package.json, tsconfig.json,<br/>pnpm-workspace.yaml, workflows, ...\"]\n brew[\"install:homebrew<br/>brew bundle\"]\n definecfg[\"bundle-vitest-define-config<br/>esbuild → lib/vitest-define-config.js\"]\n\n synth --> generator --> generated\n synth --> projenfiles\n synth --> brew\n synth --> definecfg\n end\n\n subgraph compile[\"compile\"]\n direction TB\n jsii[\"jsii<br/>validates tsconfig.json against the strict rule set\"]\n lib[\"lib/**\"]\n manifest[\".jsii manifest\"]\n\n jsii --> lib\n jsii --> manifest\n end\n\n subgraph test[\"test\"]\n direction TB\n biome[\"biome check --write\"]\n vitest[\"vitest run<br/>+ type checking\"]\n typedoc[\"typedoc → docs/api\"]\n\n biome --> vitest --> typedoc\n end\n\n subgraph package[\"package\"]\n direction TB\n pacmak[\"jsii-pacmak<br/>--pack-command 'pnpm pack'\"]\n dist[\"dist/js/*.tgz\"]\n\n pacmak --> dist\n end\n\n projenrc --> synthesize\n synthesize --> compile\n compile --> test\n test --> package\n\n manifest -. \"component options FQNs<br/>read on the next synthesis\" .-> generator\n docgen[\"docgen<br/>jsii-docgen → API.md\"]\n manifest --> docgen\n\n classDef artifact fill:#eef,stroke:#88a\n class generated,projenfiles,lib,manifest,dist artifact\n```\n\nThe dashed edge is the part worth knowing about: `ProjectGenerator` reads the committed `.jsii`\nmanifest to resolve component options types, so the manifest produced by `compile` feeds the *next*\nsynthesis. This is why `.jsii` is committed rather than ignored. A component options type that is\nmissing from the manifest is reported as a warning and its options property is left out of the\ngenerated interface, which is expected only while a new component is being introduced: compile once,\nthen synthesize again.\n\n`package` runs `package:js` on CI and `package-all` locally; both end up in `jsii-pacmak`.\n`docgen` is not part of `build` and has to be run explicitly after the manifest changes.\n"
4199
+ "markdown": "# @nikovirtala/projen-constructs\n\nOpinionated projen project types that scaffold TypeScript, JSII and AWS CDK repositories with one shared config.\n\n[![npm version badge, latest release on npm](https://img.shields.io/npm/v/@nikovirtala/projen-constructs?label=npm)](https://www.npmjs.com/package/@nikovirtala/projen-constructs)\n[![build status badge from the GitHub Actions build workflow](https://img.shields.io/github/actions/workflow/status/nikovirtala/projen-constructs/build.yml?branch=main&label=build)](https://github.com/nikovirtala/projen-constructs/actions/workflows/build.yml)\n[![license badge, Apache-2.0](https://img.shields.io/npm/l/@nikovirtala/projen-constructs?label=license)](./LICENSE)\n[![supported Node.js version badge, requires Node.js 26.13.0 or newer](https://img.shields.io/badge/node-%3E%3D26.13.0-informational?label=node)](https://nodejs.org)\n[![projen peer dependency version badge, requires projen 0.104.23 or newer](https://img.shields.io/badge/projen-%5E0.104.23-informational?label=projen)](https://projen.io)\n\n## Why this exists\n\nProjen gives you code-first project configuration, but wiring up a consistent setup across many\nTypeScript, JSII and AWS CDK repositories still means repeating the same choices. This library\npackages those choices into ready-made project types and reusable components, so every repository\nyou generate shares the same package manager, Node.js and TypeScript versions, testing, linting and\nrelease tooling.\n\nIt is for anyone in the projen and AWS CDK community who maintains more than one repository and wants\nthem to behave the same way without hand-copying configuration between them.\n\n## When not to use this\n\nReach for plain projen instead when:\n\n- you want unopinionated projen defaults and prefer to make each tooling choice yourself\n- your setup is not pnpm-based or cannot run Node.js 26\n- you build in languages beyond TypeScript, JSII and AWS CDK\n\n## Status and supported versions\n\nStability: **stable**. This library requires `projen` ^0.104.23, pnpm 12, and Node.js >= 26.13.0.\nThese values are maintained in `src/versions.json` and the project configuration; the numbers quoted\nacross this documentation track those sources.\n\n## Documentation\n\n| Guide | What it covers |\n| --- | --- |\n| [Configuration](./docs/configuration.md) | Standard defaults, pnpm settings, the TypeScript configs, native TypeScript, and how to customize any option |\n| [Components](./docs/components.md) | Reference for every component: Vitest, TypeDoc, Mise, Homebrew, Colima, LocalStack, LambdaFunctionConstructGenerator, Bundler, and ProjectGenerator |\n| [Migration](./docs/migration.md) | Moving from the deprecated standalone packages, including the name mapping and behaviour changes |\n| [Development](./docs/development.md) | Development commands and the build process diagram |\n| [API reference](./docs/api/index.html) | Generated TypeDoc API documentation |\n\nQuick links: [Quick start](#quick-start) · [Usage](#usage) · [Features](#features).\n\n## Quick start\n\nInstall the library alongside its `projen` and `constructs` peers:\n\n```bash\npnpm add -D @nikovirtala/projen-constructs projen constructs\n```\n\nCreate a `.projenrc.ts` that defines an AWS CDK construct library and synthesizes it:\n\n```typescript\nimport { AwsCdkConstructLibraryProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkConstructLibraryProject({\n name: \"my-cdk-construct\",\n author: \"Your Name\",\n authorAddress: \"you@example.com\",\n repositoryUrl: \"https://github.com/your-org/my-cdk-construct.git\",\n cdkVersion: \"2.275.0\",\n});\n\nproject.synth();\n```\n\nThen run synthesis:\n\n```bash\npnpm dlx projen\n```\n\n**Expected output**: projen reads `.projenrc.ts` and writes the generated project files into the\nworking directory: `package.json`, `tsconfig.json`, `pnpm-workspace.yaml`, the GitHub Actions\nworkflows, the Vitest and Biome configuration, `mise.toml`, and the source and test scaffolding for\nyour construct library. Re-running the command after you edit `.projenrc.ts` updates those files in\nplace.\n\nTo start a project from scratch without writing `.projenrc.ts` yourself:\n\n```bash\npnpm dlx projen new --from @nikovirtala/projen-constructs aws_cdk_construct_library\n```\n\n## Features\n\n- **Standard configuration**: opinionated defaults for author, release branch, package manager,\n Node.js, TypeScript, and tooling\n- **Automatic project type discovery**: generates the `ProjectType` enum from projen's JSII manifest\n (<!-- generated:project-type-count-start -->21<!-- generated:project-type-count-end --> project types)\n- **Component system**: reusable components (Vitest, TypeDoc, Mise, Homebrew, Colima, LocalStack,\n Lambda bundling)\n- **Code generation**: `ProjectGenerator` creates project classes with standard configuration\n- **ES modules**: TypeScript and CDK app projects use ES modules (JSII uses CommonJS)\n- **Code quality**: Biome for formatting and linting\n- **Testing**: Vitest with coverage\n- **Auto-merge**: enabled with auto-approve\n- **VSCode**: recommended extensions and settings\n- **mise**: Node version management\n\n## Usage\n\nEach project type applies the standard configuration and the shared components. See\n[Configuration](./docs/configuration.md) for the defaults and how to override them, and\n[Components](./docs/components.md) for the component reference.\n\n### AWS CDK construct library project\n\n```typescript\nimport { AwsCdkConstructLibraryProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkConstructLibraryProject({\n name: \"my-cdk-construct\",\n author: \"Your Name\",\n authorAddress: \"you@example.com\",\n repositoryUrl: \"https://github.com/nikovirtala/my-cdk-construct.git\",\n cdkVersion: \"2.275.0\",\n});\n\nproject.synth();\n```\n\n### AWS CDK TypeScript app project\n\n```typescript\nimport { AwsCdkTypeScriptAppProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new AwsCdkTypeScriptAppProject({\n name: \"my-cdk-app\",\n repository: \"https://github.com/nikovirtala/my-cdk-app.git\",\n cdkVersion: \"2.275.0\",\n});\n\nproject.synth();\n```\n\n### JSII project\n\n```typescript\nimport { JsiiProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new JsiiProject({\n name: \"my-jsii-project\",\n author: \"Your Name\",\n authorAddress: \"you@example.com\",\n repositoryUrl: \"https://github.com/nikovirtala/my-jsii-project.git\",\n});\n\nproject.synth();\n```\n\n### TypeScript project\n\n```typescript\nimport { TypeScriptProject } from \"@nikovirtala/projen-constructs\";\n\nconst project = new TypeScriptProject({\n name: \"my-typescript-project\",\n repository: \"https://github.com/nikovirtala/my-typescript-project.git\",\n});\n\nproject.synth();\n```\n\n## Contributing\n\nSee [Development](./docs/development.md) for the commands and the build process. Configuration\nchanges belong in `.projenrc.ts`, never in the generated files.\n\n## License\n\nApache-2.0. See [LICENSE](./LICENSE).\n"
4200
4200
  },
4201
4201
  "repository": {
4202
4202
  "type": "git",
@@ -21397,6 +21397,6 @@
21397
21397
  "symbolId": "src/components/vitest:VitestOptions"
21398
21398
  }
21399
21399
  },
21400
- "version": "0.5.1",
21401
- "fingerprint": "lRTyhf+ZhOeupjIiVw+BEiEh09V9s7tiv8V/ZXRJZaQ="
21400
+ "version": "0.5.2",
21401
+ "fingerprint": "Zs1B/0V0AWhD5AN9jjP0rl9qfvscewpzv+4IJGrk4n8="
21402
21402
  }
@@ -9,18 +9,20 @@ Automates project scaffolding and configuration for TypeScript, JSII, and AWS CD
9
9
  ## Key Features
10
10
 
11
11
  - **Standard Configuration**: Opinionated defaults for author, release branch, package manager, Node.js, TypeScript, and tooling
12
- - **Automatic Project Type Discovery**: Generates `ProjectType` enum from Projen's JSII manifest (18 project types)
12
+ - **Automatic Project Type Discovery**: Generates `ProjectType` enum from Projen's JSII manifest (<!-- generated:project-type-count-start -->21<!-- generated:project-type-count-end --> project types)
13
13
  - **Component System**: Reusable components (Vitest, Mise, TypeDoc, LocalStack, Homebrew, Colima, etc.)
14
14
  - **Code Generation**: `ProjectGenerator` creates project classes with standard configuration
15
15
  - **ES Modules**: TypeScript and CDK App projects use ES modules (JSII uses CommonJS)
16
16
 
17
17
  ## Standard Defaults
18
18
 
19
+ <!-- generated:product-defaults-start -->
19
20
  - Author: Niko Virtala (niko.virtala@hey.com)
20
- - Package Manager: pnpm 11
21
- - Node Version: 24.11.1
22
- - TypeScript: 5.9.3
23
- - CDK Version: 2.223.0
21
+ - Package Manager: pnpm 12
22
+ - Node Version: 26.13.0
23
+ - TypeScript: 6.0.3
24
+ - CDK Version: 2.275.0
25
+ <!-- generated:product-defaults-end -->
24
26
  - Code Quality: Biome for formatting and linting
25
27
  - Testing: Vitest with coverage
26
28
  - Version Management: mise
@@ -15,10 +15,12 @@ This project is **entirely managed by projen**. Key implications:
15
15
 
16
16
  ## Core Technologies
17
17
 
18
- - **TypeScript 5.9.3** - Primary language
19
- - **Node.js 24.11.1** - Runtime (managed via mise)
20
- - **JSII ~5.9.3** - Multi-language library support
21
- - **pnpm 11** - Package manager (settings live in `pnpm-workspace.yaml`, not `.npmrc`)
18
+ <!-- generated:tech-core-start -->
19
+ - **TypeScript 6.0.3** - Primary language
20
+ - **Node.js 26.13.0** - Runtime (managed via mise)
21
+ - **JSII ~6.0.3** - Multi-language library support
22
+ - **pnpm 12** - Package manager (settings live in `pnpm-workspace.yaml`, not `.npmrc`)
23
+ <!-- generated:tech-core-end -->
22
24
 
23
25
  ## Code Quality
24
26
 
@@ -30,7 +32,7 @@ This project is **entirely managed by projen**. Key implications:
30
32
 
31
33
  ## Testing
32
34
 
33
- - **Vitest 4** - Test framework (replaces Jest)
35
+ - **Vitest <!-- generated:vitest-major-start -->5<!-- generated:vitest-major-end -->** - Test framework (replaces Jest)
34
36
  - Coverage provider: v8
35
37
  - Coverage reporters: text, lcov
36
38
  - Type checking enabled with tsc