@nikovirtala/projen-constructs 0.3.81 → 0.3.83
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 +66 -49
- package/README.md +4 -0
- package/docs/api/assets/search.js +1 -1
- package/docs/api/classes/AwsCdkConstructLibraryProject.html +1 -1
- package/docs/api/classes/AwsCdkTypeScriptAppProject.html +1 -1
- package/docs/api/classes/JsiiProject.html +1 -1
- package/docs/api/classes/ProjectGenerator.html +1 -1
- package/docs/api/classes/TypeScriptProject.html +1 -1
- package/docs/api/classes/Vitest.html +9 -7
- package/docs/api/index.html +3 -0
- package/docs/api/interfaces/HomebrewOptions.html +15 -1
- package/docs/api/interfaces/ProjectGeneratorOptions.html +1 -1
- package/lib/components/bundle-lambda-function-code.js +3 -3
- package/lib/components/colima.js +1 -1
- package/lib/components/homebrew.d.ts +10 -0
- package/lib/components/homebrew.js +17 -6
- package/lib/components/lambda-function-construct-generator.js +1 -1
- package/lib/components/localstack.js +1 -1
- package/lib/components/mise.js +1 -1
- package/lib/components/typedoc.js +1 -1
- package/lib/components/vitest.d.ts +16 -0
- package/lib/components/vitest.js +39 -2
- package/lib/project-generator.js +1 -1
- package/lib/projects/awscdk-construct-library.generated.js +1 -1
- package/lib/projects/awscdk-typescript-app.generated.js +1 -1
- package/lib/projects/jsii.generated.js +1 -1
- package/lib/projects/typescript.generated.js +1 -1
- package/package.json +1 -1
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 11 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 11.20.0\n- **Node Version**: 24.19.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## 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: \"24.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: \"^4\",\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: \"24.19.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\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 run with `tsx`, using pnpm, Biome, Vitest and mise. The differences:\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 `npx tsx 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 11 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 11 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 11.20.0\n- **Node Version**: 24.19.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## 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: \"24.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: \"^4\",\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: \"24.19.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 run with `tsx`, using pnpm, Biome, Vitest and mise. The differences:\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 `npx tsx 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 11 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",
|
|
@@ -11781,7 +11781,7 @@
|
|
|
11781
11781
|
"kind": "enum",
|
|
11782
11782
|
"locationInModule": {
|
|
11783
11783
|
"filename": "src/components/vitest.ts",
|
|
11784
|
-
"line":
|
|
11784
|
+
"line": 75
|
|
11785
11785
|
},
|
|
11786
11786
|
"members": [
|
|
11787
11787
|
{
|
|
@@ -11813,7 +11813,7 @@
|
|
|
11813
11813
|
"kind": "enum",
|
|
11814
11814
|
"locationInModule": {
|
|
11815
11815
|
"filename": "src/components/vitest.ts",
|
|
11816
|
-
"line":
|
|
11816
|
+
"line": 91
|
|
11817
11817
|
},
|
|
11818
11818
|
"members": [
|
|
11819
11819
|
{
|
|
@@ -11910,7 +11910,7 @@
|
|
|
11910
11910
|
"kind": "enum",
|
|
11911
11911
|
"locationInModule": {
|
|
11912
11912
|
"filename": "src/components/vitest.ts",
|
|
11913
|
-
"line":
|
|
11913
|
+
"line": 10
|
|
11914
11914
|
},
|
|
11915
11915
|
"members": [
|
|
11916
11916
|
{
|
|
@@ -11961,7 +11961,7 @@
|
|
|
11961
11961
|
},
|
|
11962
11962
|
"locationInModule": {
|
|
11963
11963
|
"filename": "src/components/homebrew.ts",
|
|
11964
|
-
"line":
|
|
11964
|
+
"line": 37
|
|
11965
11965
|
},
|
|
11966
11966
|
"parameters": [
|
|
11967
11967
|
{
|
|
@@ -11982,7 +11982,7 @@
|
|
|
11982
11982
|
"kind": "class",
|
|
11983
11983
|
"locationInModule": {
|
|
11984
11984
|
"filename": "src/components/homebrew.ts",
|
|
11985
|
-
"line":
|
|
11985
|
+
"line": 29
|
|
11986
11986
|
},
|
|
11987
11987
|
"methods": [
|
|
11988
11988
|
{
|
|
@@ -11991,7 +11991,7 @@
|
|
|
11991
11991
|
},
|
|
11992
11992
|
"locationInModule": {
|
|
11993
11993
|
"filename": "src/components/homebrew.ts",
|
|
11994
|
-
"line":
|
|
11994
|
+
"line": 30
|
|
11995
11995
|
},
|
|
11996
11996
|
"name": "of",
|
|
11997
11997
|
"parameters": [
|
|
@@ -12016,7 +12016,7 @@
|
|
|
12016
12016
|
},
|
|
12017
12017
|
"locationInModule": {
|
|
12018
12018
|
"filename": "src/components/homebrew.ts",
|
|
12019
|
-
"line":
|
|
12019
|
+
"line": 54
|
|
12020
12020
|
},
|
|
12021
12021
|
"name": "addPackage",
|
|
12022
12022
|
"parameters": [
|
|
@@ -12042,19 +12042,23 @@
|
|
|
12042
12042
|
"kind": "interface",
|
|
12043
12043
|
"locationInModule": {
|
|
12044
12044
|
"filename": "src/components/homebrew.ts",
|
|
12045
|
-
"line":
|
|
12045
|
+
"line": 15
|
|
12046
12046
|
},
|
|
12047
12047
|
"name": "HomebrewOptions",
|
|
12048
12048
|
"properties": [
|
|
12049
12049
|
{
|
|
12050
12050
|
"abstract": true,
|
|
12051
12051
|
"docs": {
|
|
12052
|
-
"
|
|
12052
|
+
"default": "[]",
|
|
12053
|
+
"remarks": "A fully qualified formula adds a `tap` entry for its tap. Formulae from non-official taps\nare marked `trusted: true` in the `Brewfile`, since Homebrew 6 only loads trusted formulae\nfrom non-official taps. Only the formula is trusted, not the rest of its tap.",
|
|
12054
|
+
"see": "https://docs.brew.sh/Tap-Trust",
|
|
12055
|
+
"stability": "stable",
|
|
12056
|
+
"summary": "Formulae to install, by name (`jq`) or fully qualified (`user/repository/formula`)."
|
|
12053
12057
|
},
|
|
12054
12058
|
"immutable": true,
|
|
12055
12059
|
"locationInModule": {
|
|
12056
12060
|
"filename": "src/components/homebrew.ts",
|
|
12057
|
-
"line":
|
|
12061
|
+
"line": 26
|
|
12058
12062
|
},
|
|
12059
12063
|
"name": "packages",
|
|
12060
12064
|
"optional": true,
|
|
@@ -16201,7 +16205,7 @@
|
|
|
16201
16205
|
"kind": "enum",
|
|
16202
16206
|
"locationInModule": {
|
|
16203
16207
|
"filename": "src/components/vitest.ts",
|
|
16204
|
-
"line":
|
|
16208
|
+
"line": 38
|
|
16205
16209
|
},
|
|
16206
16210
|
"members": [
|
|
16207
16211
|
{
|
|
@@ -20708,7 +20712,7 @@
|
|
|
20708
20712
|
},
|
|
20709
20713
|
"locationInModule": {
|
|
20710
20714
|
"filename": "src/components/vitest.ts",
|
|
20711
|
-
"line":
|
|
20715
|
+
"line": 345
|
|
20712
20716
|
},
|
|
20713
20717
|
"parameters": [
|
|
20714
20718
|
{
|
|
@@ -20729,7 +20733,7 @@
|
|
|
20729
20733
|
"kind": "class",
|
|
20730
20734
|
"locationInModule": {
|
|
20731
20735
|
"filename": "src/components/vitest.ts",
|
|
20732
|
-
"line":
|
|
20736
|
+
"line": 316
|
|
20733
20737
|
},
|
|
20734
20738
|
"methods": [
|
|
20735
20739
|
{
|
|
@@ -20738,7 +20742,7 @@
|
|
|
20738
20742
|
},
|
|
20739
20743
|
"locationInModule": {
|
|
20740
20744
|
"filename": "src/components/vitest.ts",
|
|
20741
|
-
"line":
|
|
20745
|
+
"line": 317
|
|
20742
20746
|
},
|
|
20743
20747
|
"name": "of",
|
|
20744
20748
|
"parameters": [
|
|
@@ -20763,7 +20767,7 @@
|
|
|
20763
20767
|
},
|
|
20764
20768
|
"locationInModule": {
|
|
20765
20769
|
"filename": "src/components/vitest.ts",
|
|
20766
|
-
"line":
|
|
20770
|
+
"line": 466
|
|
20767
20771
|
},
|
|
20768
20772
|
"name": "addExclude",
|
|
20769
20773
|
"parameters": [
|
|
@@ -20781,7 +20785,7 @@
|
|
|
20781
20785
|
},
|
|
20782
20786
|
"locationInModule": {
|
|
20783
20787
|
"filename": "src/components/vitest.ts",
|
|
20784
|
-
"line":
|
|
20788
|
+
"line": 461
|
|
20785
20789
|
},
|
|
20786
20790
|
"name": "addInclude",
|
|
20787
20791
|
"parameters": [
|
|
@@ -20799,7 +20803,7 @@
|
|
|
20799
20803
|
},
|
|
20800
20804
|
"locationInModule": {
|
|
20801
20805
|
"filename": "src/components/vitest.ts",
|
|
20802
|
-
"line":
|
|
20806
|
+
"line": 476
|
|
20803
20807
|
},
|
|
20804
20808
|
"name": "configureCoverageProvider",
|
|
20805
20809
|
"parameters": [
|
|
@@ -20817,7 +20821,7 @@
|
|
|
20817
20821
|
},
|
|
20818
20822
|
"locationInModule": {
|
|
20819
20823
|
"filename": "src/components/vitest.ts",
|
|
20820
|
-
"line":
|
|
20824
|
+
"line": 495
|
|
20821
20825
|
},
|
|
20822
20826
|
"name": "configureCoverageReporters",
|
|
20823
20827
|
"parameters": [
|
|
@@ -20840,7 +20844,7 @@
|
|
|
20840
20844
|
},
|
|
20841
20845
|
"locationInModule": {
|
|
20842
20846
|
"filename": "src/components/vitest.ts",
|
|
20843
|
-
"line":
|
|
20847
|
+
"line": 471
|
|
20844
20848
|
},
|
|
20845
20849
|
"name": "configureEnvironment",
|
|
20846
20850
|
"parameters": [
|
|
@@ -20858,7 +20862,7 @@
|
|
|
20858
20862
|
},
|
|
20859
20863
|
"locationInModule": {
|
|
20860
20864
|
"filename": "src/components/vitest.ts",
|
|
20861
|
-
"line":
|
|
20865
|
+
"line": 500
|
|
20862
20866
|
},
|
|
20863
20867
|
"name": "configureGlobals"
|
|
20864
20868
|
},
|
|
@@ -20869,10 +20873,23 @@
|
|
|
20869
20873
|
},
|
|
20870
20874
|
"locationInModule": {
|
|
20871
20875
|
"filename": "src/components/vitest.ts",
|
|
20872
|
-
"line":
|
|
20876
|
+
"line": 403
|
|
20873
20877
|
},
|
|
20874
20878
|
"name": "preSynthesize",
|
|
20875
20879
|
"overrides": "projen.Component"
|
|
20880
|
+
},
|
|
20881
|
+
{
|
|
20882
|
+
"docs": {
|
|
20883
|
+
"remarks": "`postSynthesize` would be too late to rely\non: projen skips it when `PROJEN_DISABLE_POST` is set.",
|
|
20884
|
+
"stability": "stable",
|
|
20885
|
+
"summary": "Runs after projen's sample code component, which is added in the project constructor before any component, so the sample test exists by now."
|
|
20886
|
+
},
|
|
20887
|
+
"locationInModule": {
|
|
20888
|
+
"filename": "src/components/vitest.ts",
|
|
20889
|
+
"line": 418
|
|
20890
|
+
},
|
|
20891
|
+
"name": "synthesize",
|
|
20892
|
+
"overrides": "projen.Component"
|
|
20876
20893
|
}
|
|
20877
20894
|
],
|
|
20878
20895
|
"name": "Vitest",
|
|
@@ -20890,7 +20907,7 @@
|
|
|
20890
20907
|
"kind": "interface",
|
|
20891
20908
|
"locationInModule": {
|
|
20892
20909
|
"filename": "src/components/vitest.ts",
|
|
20893
|
-
"line":
|
|
20910
|
+
"line": 123
|
|
20894
20911
|
},
|
|
20895
20912
|
"name": "VitestConfigOptions",
|
|
20896
20913
|
"properties": [
|
|
@@ -20905,7 +20922,7 @@
|
|
|
20905
20922
|
"immutable": true,
|
|
20906
20923
|
"locationInModule": {
|
|
20907
20924
|
"filename": "src/components/vitest.ts",
|
|
20908
|
-
"line":
|
|
20925
|
+
"line": 243
|
|
20909
20926
|
},
|
|
20910
20927
|
"name": "bail",
|
|
20911
20928
|
"optional": true,
|
|
@@ -20923,7 +20940,7 @@
|
|
|
20923
20940
|
"immutable": true,
|
|
20924
20941
|
"locationInModule": {
|
|
20925
20942
|
"filename": "src/components/vitest.ts",
|
|
20926
|
-
"line":
|
|
20943
|
+
"line": 203
|
|
20927
20944
|
},
|
|
20928
20945
|
"name": "coverageDirectory",
|
|
20929
20946
|
"optional": true,
|
|
@@ -20942,7 +20959,7 @@
|
|
|
20942
20959
|
"immutable": true,
|
|
20943
20960
|
"locationInModule": {
|
|
20944
20961
|
"filename": "src/components/vitest.ts",
|
|
20945
|
-
"line":
|
|
20962
|
+
"line": 180
|
|
20946
20963
|
},
|
|
20947
20964
|
"name": "coverageEnabled",
|
|
20948
20965
|
"optional": true,
|
|
@@ -20961,7 +20978,7 @@
|
|
|
20961
20978
|
"immutable": true,
|
|
20962
20979
|
"locationInModule": {
|
|
20963
20980
|
"filename": "src/components/vitest.ts",
|
|
20964
|
-
"line":
|
|
20981
|
+
"line": 188
|
|
20965
20982
|
},
|
|
20966
20983
|
"name": "coverageProvider",
|
|
20967
20984
|
"optional": true,
|
|
@@ -20980,7 +20997,7 @@
|
|
|
20980
20997
|
"immutable": true,
|
|
20981
20998
|
"locationInModule": {
|
|
20982
20999
|
"filename": "src/components/vitest.ts",
|
|
20983
|
-
"line":
|
|
21000
|
+
"line": 196
|
|
20984
21001
|
},
|
|
20985
21002
|
"name": "coverageReporters",
|
|
20986
21003
|
"optional": true,
|
|
@@ -21004,7 +21021,7 @@
|
|
|
21004
21021
|
"immutable": true,
|
|
21005
21022
|
"locationInModule": {
|
|
21006
21023
|
"filename": "src/components/vitest.ts",
|
|
21007
|
-
"line":
|
|
21024
|
+
"line": 146
|
|
21008
21025
|
},
|
|
21009
21026
|
"name": "environment",
|
|
21010
21027
|
"optional": true,
|
|
@@ -21023,7 +21040,7 @@
|
|
|
21023
21040
|
"immutable": true,
|
|
21024
21041
|
"locationInModule": {
|
|
21025
21042
|
"filename": "src/components/vitest.ts",
|
|
21026
|
-
"line":
|
|
21043
|
+
"line": 138
|
|
21027
21044
|
},
|
|
21028
21045
|
"name": "exclude",
|
|
21029
21046
|
"optional": true,
|
|
@@ -21048,7 +21065,7 @@
|
|
|
21048
21065
|
"immutable": true,
|
|
21049
21066
|
"locationInModule": {
|
|
21050
21067
|
"filename": "src/components/vitest.ts",
|
|
21051
|
-
"line":
|
|
21068
|
+
"line": 172
|
|
21052
21069
|
},
|
|
21053
21070
|
"name": "globals",
|
|
21054
21071
|
"optional": true,
|
|
@@ -21067,7 +21084,7 @@
|
|
|
21067
21084
|
"immutable": true,
|
|
21068
21085
|
"locationInModule": {
|
|
21069
21086
|
"filename": "src/components/vitest.ts",
|
|
21070
|
-
"line":
|
|
21087
|
+
"line": 130
|
|
21071
21088
|
},
|
|
21072
21089
|
"name": "include",
|
|
21073
21090
|
"optional": true,
|
|
@@ -21092,7 +21109,7 @@
|
|
|
21092
21109
|
"immutable": true,
|
|
21093
21110
|
"locationInModule": {
|
|
21094
21111
|
"filename": "src/components/vitest.ts",
|
|
21095
|
-
"line":
|
|
21112
|
+
"line": 156
|
|
21096
21113
|
},
|
|
21097
21114
|
"name": "isolate",
|
|
21098
21115
|
"optional": true,
|
|
@@ -21111,7 +21128,7 @@
|
|
|
21111
21128
|
"immutable": true,
|
|
21112
21129
|
"locationInModule": {
|
|
21113
21130
|
"filename": "src/components/vitest.ts",
|
|
21114
|
-
"line":
|
|
21131
|
+
"line": 235
|
|
21115
21132
|
},
|
|
21116
21133
|
"name": "passWithNoTests",
|
|
21117
21134
|
"optional": true,
|
|
@@ -21130,7 +21147,7 @@
|
|
|
21130
21147
|
"immutable": true,
|
|
21131
21148
|
"locationInModule": {
|
|
21132
21149
|
"filename": "src/components/vitest.ts",
|
|
21133
|
-
"line":
|
|
21150
|
+
"line": 164
|
|
21134
21151
|
},
|
|
21135
21152
|
"name": "pool",
|
|
21136
21153
|
"optional": true,
|
|
@@ -21149,7 +21166,7 @@
|
|
|
21149
21166
|
"immutable": true,
|
|
21150
21167
|
"locationInModule": {
|
|
21151
21168
|
"filename": "src/components/vitest.ts",
|
|
21152
|
-
"line":
|
|
21169
|
+
"line": 259
|
|
21153
21170
|
},
|
|
21154
21171
|
"name": "printConsoleTrace",
|
|
21155
21172
|
"optional": true,
|
|
@@ -21168,7 +21185,7 @@
|
|
|
21168
21185
|
"immutable": true,
|
|
21169
21186
|
"locationInModule": {
|
|
21170
21187
|
"filename": "src/components/vitest.ts",
|
|
21171
|
-
"line":
|
|
21188
|
+
"line": 267
|
|
21172
21189
|
},
|
|
21173
21190
|
"name": "slowTestThreshold",
|
|
21174
21191
|
"optional": true,
|
|
@@ -21188,7 +21205,7 @@
|
|
|
21188
21205
|
"immutable": true,
|
|
21189
21206
|
"locationInModule": {
|
|
21190
21207
|
"filename": "src/components/vitest.ts",
|
|
21191
|
-
"line":
|
|
21208
|
+
"line": 219
|
|
21192
21209
|
},
|
|
21193
21210
|
"name": "typecheckChecker",
|
|
21194
21211
|
"optional": true,
|
|
@@ -21207,7 +21224,7 @@
|
|
|
21207
21224
|
"immutable": true,
|
|
21208
21225
|
"locationInModule": {
|
|
21209
21226
|
"filename": "src/components/vitest.ts",
|
|
21210
|
-
"line":
|
|
21227
|
+
"line": 211
|
|
21211
21228
|
},
|
|
21212
21229
|
"name": "typecheckEnabled",
|
|
21213
21230
|
"optional": true,
|
|
@@ -21226,7 +21243,7 @@
|
|
|
21226
21243
|
"immutable": true,
|
|
21227
21244
|
"locationInModule": {
|
|
21228
21245
|
"filename": "src/components/vitest.ts",
|
|
21229
|
-
"line":
|
|
21246
|
+
"line": 227
|
|
21230
21247
|
},
|
|
21231
21248
|
"name": "typecheckTsconfig",
|
|
21232
21249
|
"optional": true,
|
|
@@ -21246,7 +21263,7 @@
|
|
|
21246
21263
|
"immutable": true,
|
|
21247
21264
|
"locationInModule": {
|
|
21248
21265
|
"filename": "src/components/vitest.ts",
|
|
21249
|
-
"line":
|
|
21266
|
+
"line": 251
|
|
21250
21267
|
},
|
|
21251
21268
|
"name": "updateSnapshots",
|
|
21252
21269
|
"optional": true,
|
|
@@ -21267,7 +21284,7 @@
|
|
|
21267
21284
|
"kind": "interface",
|
|
21268
21285
|
"locationInModule": {
|
|
21269
21286
|
"filename": "src/components/vitest.ts",
|
|
21270
|
-
"line":
|
|
21287
|
+
"line": 270
|
|
21271
21288
|
},
|
|
21272
21289
|
"name": "VitestOptions",
|
|
21273
21290
|
"properties": [
|
|
@@ -21280,7 +21297,7 @@
|
|
|
21280
21297
|
"immutable": true,
|
|
21281
21298
|
"locationInModule": {
|
|
21282
21299
|
"filename": "src/components/vitest.ts",
|
|
21283
|
-
"line":
|
|
21300
|
+
"line": 281
|
|
21284
21301
|
},
|
|
21285
21302
|
"name": "config",
|
|
21286
21303
|
"optional": true,
|
|
@@ -21298,7 +21315,7 @@
|
|
|
21298
21315
|
"immutable": true,
|
|
21299
21316
|
"locationInModule": {
|
|
21300
21317
|
"filename": "src/components/vitest.ts",
|
|
21301
|
-
"line":
|
|
21318
|
+
"line": 276
|
|
21302
21319
|
},
|
|
21303
21320
|
"name": "configFilePath",
|
|
21304
21321
|
"optional": true,
|
|
@@ -21319,7 +21336,7 @@
|
|
|
21319
21336
|
"immutable": true,
|
|
21320
21337
|
"locationInModule": {
|
|
21321
21338
|
"filename": "src/components/vitest.ts",
|
|
21322
|
-
"line":
|
|
21339
|
+
"line": 313
|
|
21323
21340
|
},
|
|
21324
21341
|
"name": "extraConfig",
|
|
21325
21342
|
"optional": true,
|
|
@@ -21345,7 +21362,7 @@
|
|
|
21345
21362
|
"immutable": true,
|
|
21346
21363
|
"locationInModule": {
|
|
21347
21364
|
"filename": "src/components/vitest.ts",
|
|
21348
|
-
"line":
|
|
21365
|
+
"line": 301
|
|
21349
21366
|
},
|
|
21350
21367
|
"name": "extraTestConfig",
|
|
21351
21368
|
"optional": true,
|
|
@@ -21368,7 +21385,7 @@
|
|
|
21368
21385
|
"immutable": true,
|
|
21369
21386
|
"locationInModule": {
|
|
21370
21387
|
"filename": "src/components/vitest.ts",
|
|
21371
|
-
"line":
|
|
21388
|
+
"line": 288
|
|
21372
21389
|
},
|
|
21373
21390
|
"name": "vitestVersion",
|
|
21374
21391
|
"optional": true,
|
|
@@ -21380,6 +21397,6 @@
|
|
|
21380
21397
|
"symbolId": "src/components/vitest:VitestOptions"
|
|
21381
21398
|
}
|
|
21382
21399
|
},
|
|
21383
|
-
"version": "0.3.
|
|
21384
|
-
"fingerprint": "
|
|
21400
|
+
"version": "0.3.83",
|
|
21401
|
+
"fingerprint": "j1hC2LsGnOFiA3s5TAU9fZCJxLHhb0Nr5cODcQqB/d0="
|
|
21385
21402
|
}
|
package/README.md
CHANGED
|
@@ -237,6 +237,10 @@ const homebrew = new Homebrew(project, {
|
|
|
237
237
|
homebrew.addPackage("gh");
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
+
A fully qualified formula (`user/repository/formula`) also adds a `tap` entry. Since Homebrew 6,
|
|
241
|
+
formulae from non-official taps only load when trusted, so they're written with `trusted: true`.
|
|
242
|
+
That trusts only the formula, not the rest of its tap.
|
|
243
|
+
|
|
240
244
|
#### Colima
|
|
241
245
|
|
|
242
246
|
[Colima](https://github.com/abiosoft/colima) container runtime component. Alternative for Docker.
|