@nikovirtala/projen-constructs 0.5.0 → 0.5.1

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/.jsii CHANGED
@@ -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.101.27. `@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\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 repositoryUrl: \"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 repositoryUrl: \"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 } 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\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 } 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, `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\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"
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.0",
21401
- "fingerprint": "l8G3TWAiDjSiOcf65V741rkLGcyBbH1dR7D3GHTbTis="
21400
+ "version": "0.5.1",
21401
+ "fingerprint": "lRTyhf+ZhOeupjIiVw+BEiEh09V9s7tiv8V/ZXRJZaQ="
21402
21402
  }
package/README.md CHANGED
@@ -8,7 +8,7 @@ Projen project types with standard configuration for consistent project setup ac
8
8
  pnpm add -D @nikovirtala/projen-constructs projen constructs
9
9
  ```
10
10
 
11
- Requires pnpm 12 and `projen` >= 0.101.27. `@mrgrain/cdk-esbuild` and `constructs` are peer
11
+ Requires pnpm 12 and `projen` ^0.104.23. `@mrgrain/cdk-esbuild` and `constructs` are peer
12
12
  dependencies as well.
13
13
 
14
14
  To create a project from scratch:
@@ -99,6 +99,8 @@ first `node .projenrc.ts`: `npm init` writes `"type": "commonjs"`, which makes N
99
99
  Override any option by passing it to the constructor:
100
100
 
101
101
  ```typescript
102
+ import { JsiiProject } from "@nikovirtala/projen-constructs";
103
+
102
104
  const project = new JsiiProject({
103
105
  name: "my-project",
104
106
  repositoryUrl: "https://github.com/nikovirtala/my-project.git",
@@ -149,7 +151,7 @@ import { AwsCdkTypeScriptAppProject } from "@nikovirtala/projen-constructs";
149
151
 
150
152
  const project = new AwsCdkTypeScriptAppProject({
151
153
  name: "my-cdk-app",
152
- repositoryUrl: "https://github.com/nikovirtala/my-cdk-app.git",
154
+ repository: "https://github.com/nikovirtala/my-cdk-app.git",
153
155
  });
154
156
 
155
157
  project.synth();
@@ -175,7 +177,7 @@ import { TypeScriptProject } from "@nikovirtala/projen-constructs";
175
177
 
176
178
  const project = new TypeScriptProject({
177
179
  name: "my-typescript-project",
178
- repositoryUrl: "https://github.com/nikovirtala/my-typescript-project.git",
180
+ repository: "https://github.com/nikovirtala/my-typescript-project.git",
179
181
  });
180
182
 
181
183
  project.synth();
@@ -190,7 +192,7 @@ The package includes reusable components for common development tasks:
190
192
  [Vitest](https://vitest.dev) testing framework component.
191
193
 
192
194
  ```typescript
193
- import { Vitest } from "@nikovirtala/projen-constructs";
195
+ import { Vitest, CoverageProvider, CoverageReporter } from "@nikovirtala/projen-constructs";
194
196
 
195
197
  new Vitest(project, {
196
198
  vitestVersion: "^5",
@@ -208,6 +210,8 @@ For Vitest settings that `config` doesn't cover, use `extraTestConfig` (merged i
208
210
  `extraConfig` (top-level options next to `test`):
209
211
 
210
212
  ```typescript
213
+ import { Vitest } from "@nikovirtala/projen-constructs";
214
+
211
215
  new Vitest(project, {
212
216
  extraTestConfig: {
213
217
  setupFiles: ["test/setup.ts"],
@@ -338,7 +342,7 @@ new LambdaFunctionCodeBundle(project, {
338
342
  Generates TypeScript project classes with standard configuration.
339
343
 
340
344
  ```typescript
341
- import { ProjectGenerator, ProjectType } from "@nikovirtala/projen-constructs";
345
+ import { ProjectGenerator, ProjectType, Mise, Vitest } from "@nikovirtala/projen-constructs";
342
346
 
343
347
  new ProjectGenerator(project, {
344
348
  name: "TypeScriptProject",
@@ -389,7 +393,7 @@ get new features or fixes. Every class, interface, enum and function they export
389
393
  import { Vitest } from "@nikovirtala/projen-constructs";
390
394
  ```
391
395
 
392
- 2. Check the peer dependencies. `@nikovirtala/projen-constructs` needs `projen` ^0.104, `constructs`
396
+ 2. Check the peer dependencies. `@nikovirtala/projen-constructs` needs `projen` ^0.104.23, `constructs`
393
397
  ^10 and `@mrgrain/cdk-esbuild` ^5. The standalone packages accepted older projen versions, so you
394
398
  may have to upgrade projen in the same change.
395
399
  3. Install the new package, run `npx projen` and review the changes to the generated files.
@@ -7,14 +7,14 @@
7
7
  --dark-hl-2: #CE9178;
8
8
  --light-hl-3: #0000FF;
9
9
  --dark-hl-3: #569CD6;
10
- --light-hl-4: #0070C1;
11
- --dark-hl-4: #4FC1FF;
10
+ --light-hl-4: #AF00DB;
11
+ --dark-hl-4: #C586C0;
12
12
  --light-hl-5: #001080;
13
13
  --dark-hl-5: #9CDCFE;
14
- --light-hl-6: #098658;
15
- --dark-hl-6: #B5CEA8;
16
- --light-hl-7: #AF00DB;
17
- --dark-hl-7: #C586C0;
14
+ --light-hl-6: #0070C1;
15
+ --dark-hl-6: #4FC1FF;
16
+ --light-hl-7: #098658;
17
+ --dark-hl-7: #B5CEA8;
18
18
  --light-hl-8: #008000;
19
19
  --dark-hl-8: #6A9955;
20
20
  --light-hl-9: #CD3131;
@@ -14,7 +14,7 @@
14
14
  <pre><code class="bash"><span class="hl-0">pnpm</span><span class="hl-1"> </span><span class="hl-2">add</span><span class="hl-1"> </span><span class="hl-3">-D</span><span class="hl-1"> </span><span class="hl-2">@nikovirtala/projen-constructs</span><span class="hl-1"> </span><span class="hl-2">projen</span><span class="hl-1"> </span><span class="hl-2">constructs</span>
15
15
  </code><button type="button">Copy</button></pre>
16
16
 
17
- <p>Requires pnpm 12 and <code>projen</code> &gt;= 0.101.27. <code>@mrgrain/cdk-esbuild</code> and <code>constructs</code> are peer
17
+ <p>Requires pnpm 12 and <code>projen</code> ^0.104.23. <code>@mrgrain/cdk-esbuild</code> and <code>constructs</code> are peer
18
18
  dependencies as well.</p>
19
19
  <p>To create a project from scratch:</p>
20
20
  <pre><code class="bash"><span class="hl-0">pnpm</span><span class="hl-1"> </span><span class="hl-2">dlx</span><span class="hl-1"> </span><span class="hl-2">projen</span><span class="hl-1"> </span><span class="hl-2">new</span><span class="hl-1"> </span><span class="hl-3">--from</span><span class="hl-1"> </span><span class="hl-2">@nikovirtala/projen-constructs</span><span class="hl-1"> </span><span class="hl-2">aws_cdk_construct_library</span>
@@ -114,7 +114,7 @@ first <code>node .projenrc.ts</code>: <code>npm init</code> writes <code>&quot;t
114
114
  <code>import</code> statements in <code>.projenrc.ts</code>.</p>
115
115
  <h2 id="customization" class="tsd-anchor-link">Customization<a href="#customization" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
116
116
  <p>Override any option by passing it to the constructor:</p>
117
- <pre><code class="typescript"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">JsiiProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-project&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repositoryUrl:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-project.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">minNodeVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;26.0.0&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">author:</span><span class="hl-1"> </span><span class="hl-2">&quot;Custom Author&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">authorAddress:</span><span class="hl-1"> </span><span class="hl-2">&quot;custom@example.com&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">mise:</span><span class="hl-1"> </span><span class="hl-3">false</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">vitest:</span><span class="hl-1"> </span><span class="hl-3">false</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">tsconfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">compilerOptions:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">noUnusedLocals:</span><span class="hl-1"> </span><span class="hl-3">false</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">biomeOptions:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">biomeConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">formatter:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">lineWidth:</span><span class="hl-1"> </span><span class="hl-6">100</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
117
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">JsiiProject</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">JsiiProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-project&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repositoryUrl:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-project.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">minNodeVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;26.0.0&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">author:</span><span class="hl-1"> </span><span class="hl-2">&quot;Custom Author&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">authorAddress:</span><span class="hl-1"> </span><span class="hl-2">&quot;custom@example.com&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">mise:</span><span class="hl-1"> </span><span class="hl-3">false</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">vitest:</span><span class="hl-1"> </span><span class="hl-3">false</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">tsconfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">compilerOptions:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">noUnusedLocals:</span><span class="hl-1"> </span><span class="hl-3">false</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">biomeOptions:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">biomeConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">formatter:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">lineWidth:</span><span class="hl-1"> </span><span class="hl-7">100</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
118
118
  </code><button type="button">Copy</button></pre>
119
119
 
120
120
  <p>Every component is exposed as an enable flag (<code>mise</code>, <code>vitest</code>, ...) plus an options property
@@ -122,33 +122,33 @@ first <code>node .projenrc.ts</code>: <code>npm init</code> writes <code>&quot;t
122
122
  <h2 id="usage" class="tsd-anchor-link">Usage<a href="#usage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
123
123
  <h3 id="projects" class="tsd-anchor-link">Projects<a href="#projects" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
124
124
  <h4 id="aws-cdk-construct-library-project" class="tsd-anchor-link">AWS CDK Construct Library Project<a href="#aws-cdk-construct-library-project" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
125
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkConstructLibraryProject</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkConstructLibraryProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-cdk-construct&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repositoryUrl:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-cdk-construct.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">project</span><span class="hl-1">.</span><span class="hl-0">synth</span><span class="hl-1">();</span>
125
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkConstructLibraryProject</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkConstructLibraryProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-cdk-construct&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repositoryUrl:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-cdk-construct.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">project</span><span class="hl-1">.</span><span class="hl-0">synth</span><span class="hl-1">();</span>
126
126
  </code><button type="button">Copy</button></pre>
127
127
 
128
128
  <h4 id="aws-cdk-typescript-app-project" class="tsd-anchor-link">AWS CDK TypeScript App Project<a href="#aws-cdk-typescript-app-project" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
129
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkTypeScriptAppProject</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkTypeScriptAppProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-cdk-app&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repositoryUrl:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-cdk-app.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">project</span><span class="hl-1">.</span><span class="hl-0">synth</span><span class="hl-1">();</span>
129
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkTypeScriptAppProject</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkTypeScriptAppProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-cdk-app&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repository:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-cdk-app.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">project</span><span class="hl-1">.</span><span class="hl-0">synth</span><span class="hl-1">();</span>
130
130
  </code><button type="button">Copy</button></pre>
131
131
 
132
132
  <h4 id="jsii-project" class="tsd-anchor-link">JSII Project<a href="#jsii-project" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
133
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">JsiiProject</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">JsiiProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-jsii-project&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repositoryUrl:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-jsii-project.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">project</span><span class="hl-1">.</span><span class="hl-0">synth</span><span class="hl-1">();</span>
133
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">JsiiProject</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">JsiiProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-jsii-project&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repositoryUrl:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-jsii-project.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">project</span><span class="hl-1">.</span><span class="hl-0">synth</span><span class="hl-1">();</span>
134
134
  </code><button type="button">Copy</button></pre>
135
135
 
136
136
  <h4 id="typescript-project" class="tsd-anchor-link">TypeScript Project<a href="#typescript-project" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
137
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">TypeScriptProject</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">TypeScriptProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-typescript-project&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repositoryUrl:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-typescript-project.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">project</span><span class="hl-1">.</span><span class="hl-0">synth</span><span class="hl-1">();</span>
137
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">TypeScriptProject</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">TypeScriptProject</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-typescript-project&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">repository:</span><span class="hl-1"> </span><span class="hl-2">&quot;https://github.com/nikovirtala/my-typescript-project.git&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">project</span><span class="hl-1">.</span><span class="hl-0">synth</span><span class="hl-1">();</span>
138
138
  </code><button type="button">Copy</button></pre>
139
139
 
140
140
  <h3 id="components" class="tsd-anchor-link">Components<a href="#components" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
141
141
  <p>The package includes reusable components for common development tasks:</p>
142
142
  <h4 id="vitest" class="tsd-anchor-link">Vitest<a href="#vitest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
143
143
  <p><a href="https://vitest.dev">Vitest</a> testing framework component.</p>
144
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Vitest</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">vitestVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;^5&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">config:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">coverageProvider:</span><span class="hl-1"> </span><span class="hl-5">CoverageProvider</span><span class="hl-1">.</span><span class="hl-4">V8</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">coverageReporters:</span><span class="hl-1"> [</span><span class="hl-5">CoverageReporter</span><span class="hl-1">.</span><span class="hl-4">TEXT</span><span class="hl-1">, </span><span class="hl-5">CoverageReporter</span><span class="hl-1">.</span><span class="hl-4">LCOV</span><span class="hl-1">],</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
144
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</span><span class="hl-1">, </span><span class="hl-5">CoverageProvider</span><span class="hl-1">, </span><span class="hl-5">CoverageReporter</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Vitest</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">vitestVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;^5&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">config:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">coverageProvider:</span><span class="hl-1"> </span><span class="hl-5">CoverageProvider</span><span class="hl-1">.</span><span class="hl-6">V8</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">coverageReporters:</span><span class="hl-1"> [</span><span class="hl-5">CoverageReporter</span><span class="hl-1">.</span><span class="hl-6">TEXT</span><span class="hl-1">, </span><span class="hl-5">CoverageReporter</span><span class="hl-1">.</span><span class="hl-6">LCOV</span><span class="hl-1">],</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
145
145
  </code><button type="button">Copy</button></pre>
146
146
 
147
147
  <p>Type checking runs against the project's development tsconfig (<code>test/tsconfig.json</code>) unless
148
148
  <code>config.typecheckTsconfig</code> says otherwise.</p>
149
149
  <p>For Vitest settings that <code>config</code> doesn't cover, use <code>extraTestConfig</code> (merged into <code>test</code>) and
150
150
  <code>extraConfig</code> (top-level options next to <code>test</code>):</p>
151
- <pre><code class="typescript"><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Vitest</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">extraTestConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">setupFiles:</span><span class="hl-1"> [</span><span class="hl-2">&quot;test/setup.ts&quot;</span><span class="hl-1">],</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">extraConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">resolve:</span><span class="hl-1"> { </span><span class="hl-5">alias:</span><span class="hl-1"> { </span><span class="hl-2">&quot;@&quot;</span><span class="hl-5">:</span><span class="hl-1"> </span><span class="hl-2">&quot;/src&quot;</span><span class="hl-1"> } },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
151
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Vitest</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">extraTestConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">setupFiles:</span><span class="hl-1"> [</span><span class="hl-2">&quot;test/setup.ts&quot;</span><span class="hl-1">],</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-5">extraConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">resolve:</span><span class="hl-1"> { </span><span class="hl-5">alias:</span><span class="hl-1"> { </span><span class="hl-2">&quot;@&quot;</span><span class="hl-5">:</span><span class="hl-1"> </span><span class="hl-2">&quot;/src&quot;</span><span class="hl-1"> } },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
152
152
  </code><button type="button">Copy</button></pre>
153
153
 
154
154
  <p><code>extraTestConfig</code> is deep-merged over the generated <code>test</code> options: objects merge, and other values
@@ -156,18 +156,18 @@ first <code>node .projenrc.ts</code>: <code>npm init</code> writes <code>&quot;t
156
156
  can't contain functions or regular expressions, which rules out plugins.</p>
157
157
  <h4 id="typedoc" class="tsd-anchor-link">TypeDoc<a href="#typedoc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
158
158
  <p><a href="https://typedoc.org">TypeDoc</a> documentation generation component.</p>
159
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">TypeDoc</span><span class="hl-1">, </span><span class="hl-5">EntryPointStrategy</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">TypeDoc</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">version:</span><span class="hl-1"> </span><span class="hl-2">&quot;^0.28&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">typeDocConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">entryPointStrategy:</span><span class="hl-1"> </span><span class="hl-5">EntryPointStrategy</span><span class="hl-1">.</span><span class="hl-4">EXPAND</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">out:</span><span class="hl-1"> </span><span class="hl-2">&quot;docs/api&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">exclude:</span><span class="hl-1"> [</span><span class="hl-2">&quot;**/*.test.ts&quot;</span><span class="hl-1">],</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
159
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">TypeDoc</span><span class="hl-1">, </span><span class="hl-5">EntryPointStrategy</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">TypeDoc</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">version:</span><span class="hl-1"> </span><span class="hl-2">&quot;^0.28&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">typeDocConfig:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">entryPointStrategy:</span><span class="hl-1"> </span><span class="hl-5">EntryPointStrategy</span><span class="hl-1">.</span><span class="hl-6">EXPAND</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">out:</span><span class="hl-1"> </span><span class="hl-2">&quot;docs/api&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">exclude:</span><span class="hl-1"> [</span><span class="hl-2">&quot;**/*.test.ts&quot;</span><span class="hl-1">],</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
160
160
  </code><button type="button">Copy</button></pre>
161
161
 
162
162
  <h4 id="mise" class="tsd-anchor-link">Mise<a href="#mise" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
163
163
  <p><a href="https://mise.jdx.dev">Mise</a> dev tools/runtimes management component.</p>
164
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Mise</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Mise</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">nodeVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;26.13.0&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
164
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">Mise</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Mise</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">nodeVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;26.13.0&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
165
165
  </code><button type="button">Copy</button></pre>
166
166
 
167
167
  <h4 id="homebrew" class="tsd-anchor-link">Homebrew<a href="#homebrew" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
168
168
  <p><a href="https://brew.sh">Homebrew</a> package management component. Writes a <code>Brewfile</code> and adds an
169
169
  <code>install:homebrew</code> task that bootstraps Homebrew and runs <code>brew bundle</code>.</p>
170
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Homebrew</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">homebrew</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Homebrew</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">packages:</span><span class="hl-1"> [</span><span class="hl-2">&quot;jq&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;yq&quot;</span><span class="hl-1">],</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">homebrew</span><span class="hl-1">.</span><span class="hl-0">addPackage</span><span class="hl-1">(</span><span class="hl-2">&quot;gh&quot;</span><span class="hl-1">);</span>
170
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">Homebrew</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">homebrew</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Homebrew</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">packages:</span><span class="hl-1"> [</span><span class="hl-2">&quot;jq&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;yq&quot;</span><span class="hl-1">],</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">homebrew</span><span class="hl-1">.</span><span class="hl-0">addPackage</span><span class="hl-1">(</span><span class="hl-2">&quot;gh&quot;</span><span class="hl-1">);</span>
171
171
  </code><button type="button">Copy</button></pre>
172
172
 
173
173
  <p>A fully qualified formula (<code>user/repository/formula</code>) also adds a <code>tap</code> entry. Since Homebrew 6,
@@ -175,27 +175,27 @@ formulae from non-official taps only load when trusted, so they're written with
175
175
  That trusts only the formula, not the rest of its tap.</p>
176
176
  <h4 id="colima" class="tsd-anchor-link">Colima<a href="#colima" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
177
177
  <p><a href="https://github.com/abiosoft/colima">Colima</a> container runtime component. Alternative for Docker.</p>
178
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Colima</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Colima</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">);</span>
178
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">Colima</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Colima</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">);</span>
179
179
  </code><button type="button">Copy</button></pre>
180
180
 
181
181
  <h4 id="localstack" class="tsd-anchor-link">LocalStack<a href="#localstack" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
182
182
  <p><a href="https://www.localstack.cloud">LocalStack</a> AWS emulation component.</p>
183
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">LocalStack</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">LocalStack</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">services:</span><span class="hl-1"> [</span><span class="hl-2">&quot;s3&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;lambda&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;dynamodb&quot;</span><span class="hl-1">],</span><br/><span class="hl-1"> </span><span class="hl-5">port:</span><span class="hl-1"> </span><span class="hl-6">4566</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">debug:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
183
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">LocalStack</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">LocalStack</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">services:</span><span class="hl-1"> [</span><span class="hl-2">&quot;s3&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;lambda&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;dynamodb&quot;</span><span class="hl-1">],</span><br/><span class="hl-1"> </span><span class="hl-5">port:</span><span class="hl-1"> </span><span class="hl-7">4566</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">debug:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
184
184
  </code><button type="button">Copy</button></pre>
185
185
 
186
186
  <h4 id="lambdafunctionconstructgenerator" class="tsd-anchor-link">LambdaFunctionConstructGenerator<a href="#lambdafunctionconstructgenerator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
187
187
  <p>Generates AWS CDK Lambda Function constructs and bundles their code.</p>
188
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">LambdaFunctionConstructGenerator</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">LambdaFunctionConstructGenerator</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">sourceDir:</span><span class="hl-1"> </span><span class="hl-2">&quot;src/handlers&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">outputDir:</span><span class="hl-1"> </span><span class="hl-2">&quot;src/constructs/lambda&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">filePattern:</span><span class="hl-1"> </span><span class="hl-2">&quot;*.lambda.ts&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">esbuildOptions:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">minify:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">sourcemap:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
188
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">LambdaFunctionConstructGenerator</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">LambdaFunctionConstructGenerator</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">sourceDir:</span><span class="hl-1"> </span><span class="hl-2">&quot;src/handlers&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">outputDir:</span><span class="hl-1"> </span><span class="hl-2">&quot;src/constructs/lambda&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">filePattern:</span><span class="hl-1"> </span><span class="hl-2">&quot;*.lambda.ts&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">esbuildOptions:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">minify:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">sourcemap:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
189
189
  </code><button type="button">Copy</button></pre>
190
190
 
191
191
  <h4 id="bundler" class="tsd-anchor-link">Bundler<a href="#bundler" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
192
192
  <p>Low-level bundling utilities for Lambda functions.</p>
193
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">Bundler</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">LambdaFunctionCodeBundle</span><span class="hl-1">,</span><br/><span class="hl-1">} </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">bundler</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Bundler</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">assetsDir:</span><span class="hl-1"> </span><span class="hl-2">&quot;assets&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">esbuildVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;^0.25&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">LambdaFunctionCodeBundle</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">entrypoint:</span><span class="hl-1"> </span><span class="hl-2">&quot;src/my-function.lambda.ts&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">extension:</span><span class="hl-1"> </span><span class="hl-2">&quot;.lambda.ts&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
193
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">Bundler</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">LambdaFunctionCodeBundle</span><span class="hl-1">,</span><br/><span class="hl-1">} </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">bundler</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Bundler</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">assetsDir:</span><span class="hl-1"> </span><span class="hl-2">&quot;assets&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">esbuildVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;^0.25&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">LambdaFunctionCodeBundle</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">entrypoint:</span><span class="hl-1"> </span><span class="hl-2">&quot;src/my-function.lambda.ts&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">extension:</span><span class="hl-1"> </span><span class="hl-2">&quot;.lambda.ts&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
194
194
  </code><button type="button">Copy</button></pre>
195
195
 
196
196
  <h4 id="projectgenerator" class="tsd-anchor-link">ProjectGenerator<a href="#projectgenerator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4>
197
197
  <p>Generates TypeScript project classes with standard configuration.</p>
198
- <pre><code class="typescript"><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">ProjectGenerator</span><span class="hl-1">, </span><span class="hl-5">ProjectType</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">ProjectGenerator</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;TypeScriptProject&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">projectType:</span><span class="hl-1"> </span><span class="hl-5">ProjectType</span><span class="hl-1">.</span><span class="hl-4">TYPE_SCRIPT_PROJECT</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">filePath:</span><span class="hl-1"> </span><span class="hl-2">&quot;./src/projects/typescript.generated.ts&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">components:</span><span class="hl-1"> [</span><br/><span class="hl-1"> { </span><span class="hl-5">componentClass:</span><span class="hl-1"> </span><span class="hl-5">Mise</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-5">componentClass:</span><span class="hl-1"> </span><span class="hl-5">Vitest</span><span class="hl-1"> }, </span><span class="hl-8">// Auto-detects VitestOptions from JSII manifest</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1">});</span>
198
+ <pre><code class="typescript"><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">ProjectGenerator</span><span class="hl-1">, </span><span class="hl-5">ProjectType</span><span class="hl-1">, </span><span class="hl-5">Mise</span><span class="hl-1">, </span><span class="hl-5">Vitest</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">ProjectGenerator</span><span class="hl-1">(</span><span class="hl-5">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;TypeScriptProject&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">projectType:</span><span class="hl-1"> </span><span class="hl-5">ProjectType</span><span class="hl-1">.</span><span class="hl-6">TYPE_SCRIPT_PROJECT</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">filePath:</span><span class="hl-1"> </span><span class="hl-2">&quot;./src/projects/typescript.generated.ts&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">components:</span><span class="hl-1"> [</span><br/><span class="hl-1"> { </span><span class="hl-5">componentClass:</span><span class="hl-1"> </span><span class="hl-5">Mise</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-5">componentClass:</span><span class="hl-1"> </span><span class="hl-5">Vitest</span><span class="hl-1"> }, </span><span class="hl-8">// Auto-detects VitestOptions from JSII manifest</span><br/><span class="hl-1"> ],</span><br/><span class="hl-1">});</span>
199
199
  </code><button type="button">Copy</button></pre>
200
200
 
201
201
  <p>Features:</p>
@@ -258,12 +258,12 @@ get new features or fixes. Every class, interface, enum and function they export
258
258
  <li>
259
259
  <p>In <code>.projenrc.ts</code>, replace the old package in <code>devDeps</code> with <code>@nikovirtala/projen-constructs</code>, and
260
260
  change the imports:</p>
261
- <pre><code class="typescript"><span class="hl-8">// before</span><br/><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-vitest&quot;</span><span class="hl-1">;</span><br/><span class="hl-8">// after</span><br/><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span>
261
+ <pre><code class="typescript"><span class="hl-8">// before</span><br/><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-vitest&quot;</span><span class="hl-1">;</span><br/><span class="hl-8">// after</span><br/><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">Vitest</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span>
262
262
  </code><button type="button">Copy</button></pre>
263
263
 
264
264
  </li>
265
265
  <li>
266
- <p>Check the peer dependencies. <code>@nikovirtala/projen-constructs</code> needs <code>projen</code> ^0.104, <code>constructs</code>
266
+ <p>Check the peer dependencies. <code>@nikovirtala/projen-constructs</code> needs <code>projen</code> ^0.104.23, <code>constructs</code>
267
267
  ^10 and <code>@mrgrain/cdk-esbuild</code> ^5. The standalone packages accepted older projen versions, so you
268
268
  may have to upgrade projen in the same change.</p>
269
269
  </li>
@@ -309,7 +309,7 @@ used to replace them all.</li>
309
309
  </ul>
310
310
  <p><strong>TypeDoc</strong>: no changes.</p>
311
311
  <h3 id="from-to" class="tsd-anchor-link">From <code>AwsCdkApp</code> to <code>AwsCdkTypeScriptAppProject</code><a href="#from-to" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
312
- <pre><code class="typescript"><span class="hl-8">// before</span><br/><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkApp</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-aws-cdk-app&quot;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkApp</span><span class="hl-1">({ </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-app&quot;</span><span class="hl-1">, </span><span class="hl-5">cdkVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;2.221.0&quot;</span><span class="hl-1"> });</span><br/><br/><span class="hl-8">// after</span><br/><span class="hl-7">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkTypeScriptAppProject</span><span class="hl-1"> } </span><span class="hl-7">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkTypeScriptAppProject</span><span class="hl-1">({ </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-app&quot;</span><span class="hl-1">, </span><span class="hl-5">cdkVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;2.221.0&quot;</span><span class="hl-1"> });</span>
312
+ <pre><code class="typescript"><span class="hl-8">// before</span><br/><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkApp</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-aws-cdk-app&quot;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkApp</span><span class="hl-1">({ </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-app&quot;</span><span class="hl-1">, </span><span class="hl-5">cdkVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;2.221.0&quot;</span><span class="hl-1"> });</span><br/><br/><span class="hl-8">// after</span><br/><span class="hl-4">import</span><span class="hl-1"> { </span><span class="hl-5">AwsCdkTypeScriptAppProject</span><span class="hl-1"> } </span><span class="hl-4">from</span><span class="hl-1"> </span><span class="hl-2">&quot;@nikovirtala/projen-constructs&quot;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-6">project</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AwsCdkTypeScriptAppProject</span><span class="hl-1">({ </span><span class="hl-5">name:</span><span class="hl-1"> </span><span class="hl-2">&quot;my-app&quot;</span><span class="hl-1">, </span><span class="hl-5">cdkVersion:</span><span class="hl-1"> </span><span class="hl-2">&quot;2.221.0&quot;</span><span class="hl-1"> });</span>
313
313
  </code><button type="button">Copy</button></pre>
314
314
 
315
315
  <p>Both are ES module apps using pnpm, Biome, Vitest and mise. The differences:</p>