# API Reference
## Constructs
### GitHubAmplifyDeploy
Adds one path-scoped deploy workflow per Amplify Hosting app.
Amplify's own auto-build fires on every push to a tracked branch. In a
monorepo that means every frontend rebuilds whenever anything changes — the
marketing site rebuilding for a backend-only commit and vice versa, once per
tracked branch. Amplify bills build minutes, so most of those are waste.
Amplify's native answer, `AMPLIFY_DIFF_DEPLOY`, diffs exactly one directory
(`AMPLIFY_MONOREPO_APP_ROOT`, overridable via `AMPLIFY_DIFF_DEPLOY_ROOT` —
still a single path). That is enough for a self-contained app but not for one
that also depends on a shared workspace package: a one-directory diff would
ship a stale frontend whenever the shared types changed. GitHub's `paths:`
filters accept multiple globs, so builds move to CI.
Each generated workflow resolves the pushed branch to its stage and account,
chains OIDC -> deployment role -> build-trigger role, reads the app id from
SSM, starts a `RELEASE` job and polls until it reaches a terminal state — so
a failed Amplify build fails the workflow instead of passing silently.
This component generates the CI half only. The infrastructure half belongs in
the project's own CDK app, which must:
1. set `autoBuild: false` on every branch these workflows build,
2. publish each app's id to `//app-id`, and
3. create a role named `buildTriggerRoleName` in each stage account,
trusted by `deploymentRoleArn` and granting `amplify:StartJob` +
`amplify:GetJob` on the tracked branch ARNs only.
Use `buildTriggerRoleName` and `appIdParameterName()` from the projenrc to
keep those names in step; a mismatch fails the workflow loudly at the
assume-role or parameter-read step rather than skipping a deploy.
#### Initializers
```typescript
import { GitHubAmplifyDeploy } from '@taimos/projen'
new GitHubAmplifyDeploy(scope: GitHubProject, options: GitHubAmplifyDeployOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| scope | projen.github.GitHubProject | *No description.* |
| options | GitHubAmplifyDeployOptions | *No description.* |
---
##### `scope`Required
- *Type:* projen.github.GitHubProject
---
##### `options`Required
- *Type:* GitHubAmplifyDeployOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| postProjectCreation | Called once, right after `postSynthesize()`, only when the project is created for the first time. |
| postSynthesize | Called after synthesis. |
| preSynthesize | Called before synthesis. |
| projectCreation | Called once, right after `synthesize()`, only when the project is created for the first time. |
| synthesize | Synthesizes files to the project output directory. |
| appIdParameterName | The SSM parameter path holding an app's Amplify app id. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `postProjectCreation`
```typescript
public postProjectCreation(initProject: InitProject): void
```
Called once, right after `postSynthesize()`, only when the project is created for the first time.
It does not run on later `projen` invocations. It only fires for `projen new` (or `Projects.createProject`).
It is also skipped when post-synthesis steps are disabled, e.g. `--no-post` or `PROJEN_DISABLE_POST`.
Use it for one-off setup that can be turned off by the user, like running a task to give the user immediate
feedback on their new project. Order across components is not guaranteed.
###### `initProject`Required
- *Type:* projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after synthesis.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before synthesis.
##### `projectCreation`
```typescript
public projectCreation(initProject: InitProject): void
```
Called once, right after `synthesize()`, only when the project is created for the first time.
It does not run on later `projen` invocations. It only fires for `projen new` (or `Projects.createProject`).
Use it for deterministic, one-off file generation. Order across components is not guaranteed.
###### `initProject`Required
- *Type:* projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
---
##### `synthesize`
```typescript
public synthesize(): void
```
Synthesizes files to the project output directory.
##### `appIdParameterName`
```typescript
public appIdParameterName(key: string): string
```
The SSM parameter path holding an app's Amplify app id.
The CDK side must
publish the id under exactly this name.
###### `key`Required
- *Type:* string
---
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isComponent | Test whether the given construct is a component. |
---
##### `isConstruct`
```typescript
import { GitHubAmplifyDeploy } from '@taimos/projen'
GitHubAmplifyDeploy.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isComponent`
```typescript
import { GitHubAmplifyDeploy } from '@taimos/projen'
GitHubAmplifyDeploy.isComponent(x: any)
```
Test whether the given construct is a component.
###### `x`Required
- *Type:* any
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| project | projen.Project | *No description.* |
| buildTriggerRoleName | string | Name of the IAM role CI chains into, in every stage account. |
| parameterPrefix | string | Prefix of the SSM parameter path holding each app's Amplify app id. |
| workflows | projen.github.GithubWorkflow[] | The generated deploy workflows, one per app. |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `project`Required
```typescript
public readonly project: Project;
```
- *Type:* projen.Project
---
##### `buildTriggerRoleName`Required
```typescript
public readonly buildTriggerRoleName: string;
```
- *Type:* string
Name of the IAM role CI chains into, in every stage account.
---
##### `parameterPrefix`Required
```typescript
public readonly parameterPrefix: string;
```
- *Type:* string
Prefix of the SSM parameter path holding each app's Amplify app id.
---
##### `workflows`Required
```typescript
public readonly workflows: GithubWorkflow[];
```
- *Type:* projen.github.GithubWorkflow[]
The generated deploy workflows, one per app.
---
### GitHubProductionRelease
Adds a manual "Production Release" workflow that promotes a branch into a production branch.
The workflow is triggered via `workflow_dispatch`. It fast-forward merges the
project's default release branch into the selected production branch and
pushes it. This keeps a production promotion a deliberate, auditable manual
action separate from merging to the default release branch. When several
production branches are configured, the operator chooses the target at
dispatch time.
#### Initializers
```typescript
import { GitHubProductionRelease } from '@taimos/projen'
new GitHubProductionRelease(scope: GitHubProject, options?: GitHubProductionReleaseOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| scope | projen.github.GitHubProject | *No description.* |
| options | GitHubProductionReleaseOptions | *No description.* |
---
##### `scope`Required
- *Type:* projen.github.GitHubProject
---
##### `options`Optional
- *Type:* GitHubProductionReleaseOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| postProjectCreation | Called once, right after `postSynthesize()`, only when the project is created for the first time. |
| postSynthesize | Called after synthesis. |
| preSynthesize | Called before synthesis. |
| projectCreation | Called once, right after `synthesize()`, only when the project is created for the first time. |
| synthesize | Synthesizes files to the project output directory. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `postProjectCreation`
```typescript
public postProjectCreation(initProject: InitProject): void
```
Called once, right after `postSynthesize()`, only when the project is created for the first time.
It does not run on later `projen` invocations. It only fires for `projen new` (or `Projects.createProject`).
It is also skipped when post-synthesis steps are disabled, e.g. `--no-post` or `PROJEN_DISABLE_POST`.
Use it for one-off setup that can be turned off by the user, like running a task to give the user immediate
feedback on their new project. Order across components is not guaranteed.
###### `initProject`Required
- *Type:* projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after synthesis.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before synthesis.
##### `projectCreation`
```typescript
public projectCreation(initProject: InitProject): void
```
Called once, right after `synthesize()`, only when the project is created for the first time.
It does not run on later `projen` invocations. It only fires for `projen new` (or `Projects.createProject`).
Use it for deterministic, one-off file generation. Order across components is not guaranteed.
###### `initProject`Required
- *Type:* projen.InitProject
Details about how the project was created, e.g. its type and the original CLI args.
---
##### `synthesize`
```typescript
public synthesize(): void
```
Synthesizes files to the project output directory.
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isComponent | Test whether the given construct is a component. |
---
##### `isConstruct`
```typescript
import { GitHubProductionRelease } from '@taimos/projen'
GitHubProductionRelease.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isComponent`
```typescript
import { GitHubProductionRelease } from '@taimos/projen'
GitHubProductionRelease.isComponent(x: any)
```
Test whether the given construct is a component.
###### `x`Required
- *Type:* any
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| project | projen.Project | *No description.* |
| workflow | projen.github.GithubWorkflow | The generated production release workflow. |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `project`Required
```typescript
public readonly project: Project;
```
- *Type:* projen.Project
---
##### `workflow`Required
```typescript
public readonly workflow: GithubWorkflow;
```
- *Type:* projen.github.GithubWorkflow
The generated production release workflow.
---
### MonorepoProject
Private PNPM-workspace monorepo root, following Taimos ADR-0002.
The root only orchestrates the workspace — building, testing and linting are
delegated to the workspace packages via `pnpm -r`. This project generates the
`pnpm-workspace.yaml`, the root convenience scripts, a unified PR build
workflow and (optionally) an Amplify Hosting build spec. The projen-managed
sub-projects (api, backend, infra) are added with the `parent`/`outdir`
pattern in the consuming `.projenrc.ts`; plain workspace packages (e.g.
Next.js apps) are picked up by the `packages/*` glob.
#### Initializers
```typescript
import { MonorepoProject } from '@taimos/projen'
new MonorepoProject(options: MonorepoProjectOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| options | MonorepoProjectOptions | *No description.* |
---
##### `options`Required
- *Type:* MonorepoProjectOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| addExcludeFromCleanup | Exclude the matching files from pre-synth cleanup. |
| addGitIgnore | Adds a .gitignore pattern. |
| addPackageIgnore | Adds patterns to be ignored by npm. |
| addTask | Adds a new task to this project. |
| annotateGenerated | Marks the provided file(s) as being generated. |
| postSynthesize | Called after all components are synthesized. |
| preSynthesize | Called before all components are synthesized. |
| removeTask | Removes a task from a project. |
| runTaskCommand | Returns the shell command to execute in order to run a task. |
| synth | Synthesize all project files into `outdir`. |
| tryFindFile | Finds a file at the specified relative path within this project and all its subprojects. |
| tryFindObjectFile | Finds an object file (like JsonFile, YamlFile, etc.) by name. |
| tryRemoveFile | Finds a file at the specified relative path within this project and removes it. |
| addBins | *No description.* |
| addBundledDeps | Defines bundled dependencies. |
| addDeps | Defines normal dependencies. |
| addDevDeps | Defines development/test dependencies. |
| addFields | Directly set fields in `package.json`. |
| addKeywords | Adds keywords to package.json (deduplicated). |
| addPeerDeps | Defines peer dependencies. |
| addScripts | Replaces the contents of multiple npm package.json scripts. |
| removeScript | Removes the npm script (always successful). |
| renderWorkflowSetup | Returns the set of workflow steps which should be executed to bootstrap a workflow. |
| setScript | Replaces the contents of an npm package.json script. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `addExcludeFromCleanup`
```typescript
public addExcludeFromCleanup(globs: ...string[]): void
```
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some
source files include the projen marker and we don't want them to be erased during synth.
###### `globs`Required
- *Type:* ...string[]
The glob patterns to match.
---
##### `addGitIgnore`
```typescript
public addGitIgnore(pattern: string): void
```
Adds a .gitignore pattern.
###### `pattern`Required
- *Type:* string
The glob pattern to ignore.
---
##### `addPackageIgnore`
```typescript
public addPackageIgnore(pattern: string): void
```
Adds patterns to be ignored by npm.
###### `pattern`Required
- *Type:* string
The pattern to ignore.
---
##### `addTask`
```typescript
public addTask(name: string, props?: TaskOptions): Task
```
Adds a new task to this project.
This will fail if the project already has
a task with this name.
###### `name`Required
- *Type:* string
The task name to add.
---
###### `props`Optional
- *Type:* projen.TaskOptions
Task properties.
---
##### `annotateGenerated`
```typescript
public annotateGenerated(glob: string): void
```
Marks the provided file(s) as being generated.
This is achieved using the
github-linguist attributes. Generated files do not count against the
repository statistics and language breakdown.
> [https://github.com/github/linguist/blob/master/docs/overrides.md](https://github.com/github/linguist/blob/master/docs/overrides.md)
###### `glob`Required
- *Type:* string
the glob pattern to match (could be a file path).
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after all components are synthesized.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before all components are synthesized.
##### `removeTask`
```typescript
public removeTask(name: string): Task
```
Removes a task from a project.
###### `name`Required
- *Type:* string
The name of the task to remove.
---
##### `runTaskCommand`
```typescript
public runTaskCommand(task: Task): string
```
Returns the shell command to execute in order to run a task.
This will
typically be `pnpm projen TASK`.
###### `task`Required
- *Type:* projen.Task
The task for which the command is required.
---
##### `synth`
```typescript
public synth(): void
```
Synthesize all project files into `outdir`.
1. Call "this.preSynthesize()"
2. Delete all generated files
3. Synthesize all subprojects
4. Synthesize all components of this project
5. Call "projectCreation()" for all components, only if the project is being created for the first time
6. Call "postSynthesize()" for all components of this project
7. Call "this.postSynthesize()"
8. Call "postProjectCreation()" for all components, only if the project is being created for the first time
##### `tryFindFile`
```typescript
public tryFindFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and all its subprojects.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be resolved
from the root of _this_ project.
---
##### `tryFindObjectFile`
```typescript
public tryFindObjectFile(filePath: string): ObjectFile
```
Finds an object file (like JsonFile, YamlFile, etc.) by name.
###### `filePath`Required
- *Type:* string
The file path.
---
##### `tryRemoveFile`
```typescript
public tryRemoveFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and removes it.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be
resolved from the root of _this_ project.
---
##### `addBins`
```typescript
public addBins(bins: {[ key: string ]: string}): void
```
###### `bins`Required
- *Type:* {[ key: string ]: string}
---
##### `addBundledDeps`
```typescript
public addBundledDeps(deps: ...string[]): void
```
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
`bundledDependencies` section of your `package.json`.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDeps`
```typescript
public addDeps(deps: ...string[]): void
```
Defines normal dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDevDeps`
```typescript
public addDevDeps(deps: ...string[]): void
```
Defines development/test dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addFields`
```typescript
public addFields(fields: {[ key: string ]: any}): void
```
Directly set fields in `package.json`.
###### `fields`Required
- *Type:* {[ key: string ]: any}
The fields to set.
---
##### `addKeywords`
```typescript
public addKeywords(keywords: ...string[]): void
```
Adds keywords to package.json (deduplicated).
###### `keywords`Required
- *Type:* ...string[]
The keywords to add.
---
##### `addPeerDeps`
```typescript
public addPeerDeps(deps: ...string[]): void
```
Defines peer dependencies.
When adding peer dependencies, a devDependency will also be added on the
pinned version of the declared peer. This will ensure that you are testing
your code against the minimum version required from your consumers.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addScripts`
```typescript
public addScripts(scripts: {[ key: string ]: string}): void
```
Replaces the contents of multiple npm package.json scripts.
###### `scripts`Required
- *Type:* {[ key: string ]: string}
The scripts to set.
---
##### `removeScript`
```typescript
public removeScript(name: string): void
```
Removes the npm script (always successful).
###### `name`Required
- *Type:* string
The name of the script.
---
##### `renderWorkflowSetup`
```typescript
public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[]
```
Returns the set of workflow steps which should be executed to bootstrap a workflow.
###### `options`Optional
- *Type:* projen.javascript.RenderWorkflowSetupOptions
Options.
---
##### `setScript`
```typescript
public setScript(name: string, command: string): void
```
Replaces the contents of an npm package.json script.
###### `name`Required
- *Type:* string
The script name.
---
###### `command`Required
- *Type:* string
The command to execute.
---
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isProject | Test whether the given construct is a project. |
| of | Find the closest ancestor project for given construct. |
---
##### `isConstruct`
```typescript
import { MonorepoProject } from '@taimos/projen'
MonorepoProject.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isProject`
```typescript
import { MonorepoProject } from '@taimos/projen'
MonorepoProject.isProject(x: any)
```
Test whether the given construct is a project.
###### `x`Required
- *Type:* any
---
##### `of`
```typescript
import { MonorepoProject } from '@taimos/projen'
MonorepoProject.of(construct: IConstruct)
```
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
###### `construct`Required
- *Type:* constructs.IConstruct
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| buildTask | projen.Task | *No description.* |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| compileTask | projen.Task | *No description.* |
| components | projen.Component[] | Returns all the components within this project. |
| deps | projen.Dependencies | Project dependencies. |
| ejected | boolean | Whether or not the project is being ejected. |
| files | projen.FileBase[] | All files in this project. |
| gitattributes | projen.GitAttributesFile | The .gitattributes file for this repository. |
| gitignore | projen.IgnoreFile | .gitignore. |
| logger | projen.Logger | Logging utilities. |
| name | string | Project name. |
| outdir | string | Absolute output directory of this project. |
| packageTask | projen.Task | *No description.* |
| postCompileTask | projen.Task | *No description.* |
| preCompileTask | projen.Task | *No description.* |
| projectBuild | projen.ProjectBuild | Manages the build process of the project. |
| projenCommand | string | The command to use in order to run the projen CLI. |
| root | projen.Project | The root project. |
| subprojects | projen.Project[] | Returns all the subprojects within this project. |
| tasks | projen.Tasks | Project tasks. |
| testTask | projen.Task | *No description.* |
| defaultTask | projen.Task | This is the "default" task, the one that executes "projen". |
| initProject | projen.InitProject | The options used when this project is bootstrapped via `projen new`. |
| parent | projen.Project | A parent project. |
| autoApprove | projen.github.AutoApprove | Auto approve set up for this project. |
| devContainer | projen.vscode.DevContainer | Access for .devcontainer.json (used for GitHub Codespaces). |
| github | projen.github.GitHub | Access all github components. |
| gitpod | projen.Gitpod | Access for Gitpod. |
| vscode | projen.vscode.VsCode | Access all VSCode components. |
| artifactsDirectory | string | The build output directory. |
| artifactsJavascriptDirectory | string | The location of the npm tarball after build (`${artifactsDirectory}/js`). |
| bundler | projen.javascript.Bundler | *No description.* |
| npmrc | projen.javascript.NpmConfig | The .npmrc file. |
| package | projen.javascript.NodePackage | API for managing the node package. |
| runScriptCommand | string | The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). |
| autoMerge | projen.github.AutoMerge | Component that sets up mergify for merging approved pull requests. |
| biome | projen.javascript.Biome | *No description.* |
| buildWorkflow | projen.build.BuildWorkflow | The PR build GitHub workflow. |
| buildWorkflowJobId | string | The job ID of the build workflow. |
| jest | projen.javascript.Jest | The Jest configuration (if enabled). |
| maxNodeVersion | string | Maximum node version supported by this package. |
| minNodeVersion | string | The minimum node version required by this package to function. |
| npmignore | projen.IgnoreFile | The .npmignore file. |
| prettier | projen.javascript.Prettier | *No description.* |
| release | projen.release.Release | Release management. |
| upgradeWorkflow | projen.javascript.UpgradeDependencies | The upgrade workflow. |
| docsDirectory | string | *No description.* |
| libdir | string | The directory in which compiled .js files reside. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner used for executing TypeScript files. |
| srcdir | string | The directory in which the .ts sources reside. |
| testdir | string | The directory in which tests reside. |
| tsconfigDev | projen.javascript.TypescriptConfig | A typescript configuration file which covers all files (sources, tests, projen). |
| watchTask | projen.Task | The "watch" task. |
| docgen | boolean | *No description.* |
| eslint | projen.javascript.Eslint | *No description.* |
| tsconfig | projen.javascript.TypescriptConfig | *No description.* |
| tsconfigEslint | projen.javascript.TypescriptConfig | *No description.* |
| defaultReleaseBranch | string | The default release branch (promoted by the production release workflow). |
| prBuildWorkflow | projen.github.GithubWorkflow | The unified PR build workflow. |
| workspaceFile | projen.YamlFile | The generated `pnpm-workspace.yaml`. |
| amplifyDeploy | GitHubAmplifyDeploy | The Amplify deploy workflows, when `amplifyDeployOptions` is set. |
| amplifyFile | projen.YamlFile | The generated `amplify.yml`, if any Amplify apps were configured. |
| assignApprover | projen-pipelines.GitHubAssignApprover | The PR approver assignment, if enabled. |
| productionRelease | GitHubProductionRelease | The production release workflow, if enabled. |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `buildTask`Required
```typescript
public readonly buildTask: Task;
```
- *Type:* projen.Task
---
##### `commitGenerated`Required
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
Whether to commit the managed files by default.
---
##### `compileTask`Required
```typescript
public readonly compileTask: Task;
```
- *Type:* projen.Task
---
##### `components`Required
```typescript
public readonly components: Component[];
```
- *Type:* projen.Component[]
Returns all the components within this project.
---
##### `deps`Required
```typescript
public readonly deps: Dependencies;
```
- *Type:* projen.Dependencies
Project dependencies.
---
##### `ejected`Required
```typescript
public readonly ejected: boolean;
```
- *Type:* boolean
Whether or not the project is being ejected.
---
##### `files`Required
```typescript
public readonly files: FileBase[];
```
- *Type:* projen.FileBase[]
All files in this project.
---
##### `gitattributes`Required
```typescript
public readonly gitattributes: GitAttributesFile;
```
- *Type:* projen.GitAttributesFile
The .gitattributes file for this repository.
---
##### `gitignore`Required
```typescript
public readonly gitignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
.gitignore.
---
##### `logger`Required
```typescript
public readonly logger: Logger;
```
- *Type:* projen.Logger
Logging utilities.
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
Project name.
---
##### `outdir`Required
```typescript
public readonly outdir: string;
```
- *Type:* string
Absolute output directory of this project.
---
##### `packageTask`Required
```typescript
public readonly packageTask: Task;
```
- *Type:* projen.Task
---
##### `postCompileTask`Required
```typescript
public readonly postCompileTask: Task;
```
- *Type:* projen.Task
---
##### `preCompileTask`Required
```typescript
public readonly preCompileTask: Task;
```
- *Type:* projen.Task
---
##### `projectBuild`Required
```typescript
public readonly projectBuild: ProjectBuild;
```
- *Type:* projen.ProjectBuild
Manages the build process of the project.
---
##### `projenCommand`Required
```typescript
public readonly projenCommand: string;
```
- *Type:* string
The command to use in order to run the projen CLI.
---
##### `root`Required
```typescript
public readonly root: Project;
```
- *Type:* projen.Project
The root project.
---
##### `subprojects`Required
```typescript
public readonly subprojects: Project[];
```
- *Type:* projen.Project[]
Returns all the subprojects within this project.
---
##### `tasks`Required
```typescript
public readonly tasks: Tasks;
```
- *Type:* projen.Tasks
Project tasks.
---
##### `testTask`Required
```typescript
public readonly testTask: Task;
```
- *Type:* projen.Task
---
##### `defaultTask`Optional
```typescript
public readonly defaultTask: Task;
```
- *Type:* projen.Task
This is the "default" task, the one that executes "projen".
Undefined if
the project is being ejected.
---
##### ~~`initProject`~~Optional
- *Deprecated:* use the `initProject` argument passed to `Component.projectCreation()` instead.
```typescript
public readonly initProject: InitProject;
```
- *Type:* projen.InitProject
The options used when this project is bootstrapped via `projen new`.
It
includes the original set of options passed to the CLI and also the JSII
FQN of the project type.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
A parent project.
If undefined, this is the root project.
---
##### `autoApprove`Optional
```typescript
public readonly autoApprove: AutoApprove;
```
- *Type:* projen.github.AutoApprove
Auto approve set up for this project.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: DevContainer;
```
- *Type:* projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be `undefined` if devContainer boolean is false
---
##### `github`Optional
```typescript
public readonly github: GitHub;
```
- *Type:* projen.github.GitHub
Access all github components.
This will be `undefined` for subprojects.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: Gitpod;
```
- *Type:* projen.Gitpod
Access for Gitpod.
This will be `undefined` if gitpod boolean is false
---
##### `vscode`Optional
```typescript
public readonly vscode: VsCode;
```
- *Type:* projen.vscode.VsCode
Access all VSCode components.
This will be `undefined` for subprojects.
---
##### `artifactsDirectory`Required
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
The build output directory.
An npm tarball will be created under the `js`
subdirectory. For example, if this is set to `dist` (the default), the npm
tarball will be placed under `dist/js/boom-boom-1.2.3.tg`.
---
##### `artifactsJavascriptDirectory`Required
```typescript
public readonly artifactsJavascriptDirectory: string;
```
- *Type:* string
The location of the npm tarball after build (`${artifactsDirectory}/js`).
---
##### `bundler`Required
```typescript
public readonly bundler: Bundler;
```
- *Type:* projen.javascript.Bundler
---
##### `npmrc`Required
```typescript
public readonly npmrc: NpmConfig;
```
- *Type:* projen.javascript.NpmConfig
The .npmrc file.
---
##### `package`Required
```typescript
public readonly package: NodePackage;
```
- *Type:* projen.javascript.NodePackage
API for managing the node package.
---
##### `runScriptCommand`Required
```typescript
public readonly runScriptCommand: string;
```
- *Type:* string
The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: AutoMerge;
```
- *Type:* projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
---
##### `biome`Optional
```typescript
public readonly biome: Biome;
```
- *Type:* projen.javascript.Biome
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: BuildWorkflow;
```
- *Type:* projen.build.BuildWorkflow
The PR build GitHub workflow.
`undefined` if `buildWorkflow` is disabled.
---
##### `buildWorkflowJobId`Optional
```typescript
public readonly buildWorkflowJobId: string;
```
- *Type:* string
The job ID of the build workflow.
---
##### `jest`Optional
```typescript
public readonly jest: Jest;
```
- *Type:* projen.javascript.Jest
The Jest configuration (if enabled).
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
Maximum node version supported by this package.
The value indicates the package is incompatible with newer versions.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
The minimum node version required by this package to function.
This value indicates the package is incompatible with older versions.
---
##### `npmignore`Optional
```typescript
public readonly npmignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
The .npmignore file.
---
##### `prettier`Optional
```typescript
public readonly prettier: Prettier;
```
- *Type:* projen.javascript.Prettier
---
##### `release`Optional
```typescript
public readonly release: Release;
```
- *Type:* projen.release.Release
Release management.
---
##### `upgradeWorkflow`Optional
```typescript
public readonly upgradeWorkflow: UpgradeDependencies;
```
- *Type:* projen.javascript.UpgradeDependencies
The upgrade workflow.
---
##### `docsDirectory`Required
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
---
##### `libdir`Required
```typescript
public readonly libdir: string;
```
- *Type:* string
The directory in which compiled .js files reside.
---
##### `runner`Required
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
The TypeScript runner used for executing TypeScript files.
---
##### `srcdir`Required
```typescript
public readonly srcdir: string;
```
- *Type:* string
The directory in which the .ts sources reside.
---
##### `testdir`Required
```typescript
public readonly testdir: string;
```
- *Type:* string
The directory in which tests reside.
---
##### `tsconfigDev`Required
```typescript
public readonly tsconfigDev: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
---
##### `watchTask`Required
```typescript
public readonly watchTask: Task;
```
- *Type:* projen.Task
The "watch" task.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
---
##### `eslint`Optional
```typescript
public readonly eslint: Eslint;
```
- *Type:* projen.javascript.Eslint
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `tsconfigEslint`Optional
```typescript
public readonly tsconfigEslint: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `defaultReleaseBranch`Required
```typescript
public readonly defaultReleaseBranch: string;
```
- *Type:* string
The default release branch (promoted by the production release workflow).
---
##### `prBuildWorkflow`Required
```typescript
public readonly prBuildWorkflow: GithubWorkflow;
```
- *Type:* projen.github.GithubWorkflow
The unified PR build workflow.
---
##### `workspaceFile`Required
```typescript
public readonly workspaceFile: YamlFile;
```
- *Type:* projen.YamlFile
The generated `pnpm-workspace.yaml`.
---
##### `amplifyDeploy`Optional
```typescript
public readonly amplifyDeploy: GitHubAmplifyDeploy;
```
- *Type:* GitHubAmplifyDeploy
The Amplify deploy workflows, when `amplifyDeployOptions` is set.
---
##### `amplifyFile`Optional
```typescript
public readonly amplifyFile: YamlFile;
```
- *Type:* projen.YamlFile
The generated `amplify.yml`, if any Amplify apps were configured.
---
##### `assignApprover`Optional
```typescript
public readonly assignApprover: GitHubAssignApprover;
```
- *Type:* projen-pipelines.GitHubAssignApprover
The PR approver assignment, if enabled.
---
##### `productionRelease`Optional
```typescript
public readonly productionRelease: GitHubProductionRelease;
```
- *Type:* GitHubProductionRelease
The production release workflow, if enabled.
---
#### Constants
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). |
| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* |
---
##### `DEFAULT_TASK`Required
```typescript
public readonly DEFAULT_TASK: string;
```
- *Type:* string
The name of the default task (the task executed when `projen` is run without arguments).
Normally
this task should synthesize the project files.
---
##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required
```typescript
public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string;
```
- *Type:* string
---
### PrivateTaimosCdkApp
Private AWS CDK app in TypeScript.
#### Initializers
```typescript
import { PrivateTaimosCdkApp } from '@taimos/projen'
new PrivateTaimosCdkApp(options: PrivateTaimosCdkAppOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| options | PrivateTaimosCdkAppOptions | *No description.* |
---
##### `options`Required
- *Type:* PrivateTaimosCdkAppOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| addExcludeFromCleanup | Exclude the matching files from pre-synth cleanup. |
| addGitIgnore | Adds a .gitignore pattern. |
| addPackageIgnore | Adds patterns to be ignored by npm. |
| addTask | Adds a new task to this project. |
| annotateGenerated | Marks the provided file(s) as being generated. |
| postSynthesize | Called after all components are synthesized. |
| preSynthesize | Called before all components are synthesized. |
| removeTask | Removes a task from a project. |
| runTaskCommand | Returns the shell command to execute in order to run a task. |
| synth | Synthesize all project files into `outdir`. |
| tryFindFile | Finds a file at the specified relative path within this project and all its subprojects. |
| tryFindObjectFile | Finds an object file (like JsonFile, YamlFile, etc.) by name. |
| tryRemoveFile | Finds a file at the specified relative path within this project and removes it. |
| addBins | *No description.* |
| addBundledDeps | Defines bundled dependencies. |
| addDeps | Defines normal dependencies. |
| addDevDeps | Defines development/test dependencies. |
| addFields | Directly set fields in `package.json`. |
| addKeywords | Adds keywords to package.json (deduplicated). |
| addPeerDeps | Defines peer dependencies. |
| addScripts | Replaces the contents of multiple npm package.json scripts. |
| removeScript | Removes the npm script (always successful). |
| renderWorkflowSetup | Returns the set of workflow steps which should be executed to bootstrap a workflow. |
| setScript | Replaces the contents of an npm package.json script. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `addExcludeFromCleanup`
```typescript
public addExcludeFromCleanup(globs: ...string[]): void
```
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some
source files include the projen marker and we don't want them to be erased during synth.
###### `globs`Required
- *Type:* ...string[]
The glob patterns to match.
---
##### `addGitIgnore`
```typescript
public addGitIgnore(pattern: string): void
```
Adds a .gitignore pattern.
###### `pattern`Required
- *Type:* string
The glob pattern to ignore.
---
##### `addPackageIgnore`
```typescript
public addPackageIgnore(pattern: string): void
```
Adds patterns to be ignored by npm.
###### `pattern`Required
- *Type:* string
The pattern to ignore.
---
##### `addTask`
```typescript
public addTask(name: string, props?: TaskOptions): Task
```
Adds a new task to this project.
This will fail if the project already has
a task with this name.
###### `name`Required
- *Type:* string
The task name to add.
---
###### `props`Optional
- *Type:* projen.TaskOptions
Task properties.
---
##### `annotateGenerated`
```typescript
public annotateGenerated(glob: string): void
```
Marks the provided file(s) as being generated.
This is achieved using the
github-linguist attributes. Generated files do not count against the
repository statistics and language breakdown.
> [https://github.com/github/linguist/blob/master/docs/overrides.md](https://github.com/github/linguist/blob/master/docs/overrides.md)
###### `glob`Required
- *Type:* string
the glob pattern to match (could be a file path).
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after all components are synthesized.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before all components are synthesized.
##### `removeTask`
```typescript
public removeTask(name: string): Task
```
Removes a task from a project.
###### `name`Required
- *Type:* string
The name of the task to remove.
---
##### `runTaskCommand`
```typescript
public runTaskCommand(task: Task): string
```
Returns the shell command to execute in order to run a task.
This will
typically be `pnpm projen TASK`.
###### `task`Required
- *Type:* projen.Task
The task for which the command is required.
---
##### `synth`
```typescript
public synth(): void
```
Synthesize all project files into `outdir`.
1. Call "this.preSynthesize()"
2. Delete all generated files
3. Synthesize all subprojects
4. Synthesize all components of this project
5. Call "projectCreation()" for all components, only if the project is being created for the first time
6. Call "postSynthesize()" for all components of this project
7. Call "this.postSynthesize()"
8. Call "postProjectCreation()" for all components, only if the project is being created for the first time
##### `tryFindFile`
```typescript
public tryFindFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and all its subprojects.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be resolved
from the root of _this_ project.
---
##### `tryFindObjectFile`
```typescript
public tryFindObjectFile(filePath: string): ObjectFile
```
Finds an object file (like JsonFile, YamlFile, etc.) by name.
###### `filePath`Required
- *Type:* string
The file path.
---
##### `tryRemoveFile`
```typescript
public tryRemoveFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and removes it.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be
resolved from the root of _this_ project.
---
##### `addBins`
```typescript
public addBins(bins: {[ key: string ]: string}): void
```
###### `bins`Required
- *Type:* {[ key: string ]: string}
---
##### `addBundledDeps`
```typescript
public addBundledDeps(deps: ...string[]): void
```
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
`bundledDependencies` section of your `package.json`.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDeps`
```typescript
public addDeps(deps: ...string[]): void
```
Defines normal dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDevDeps`
```typescript
public addDevDeps(deps: ...string[]): void
```
Defines development/test dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addFields`
```typescript
public addFields(fields: {[ key: string ]: any}): void
```
Directly set fields in `package.json`.
###### `fields`Required
- *Type:* {[ key: string ]: any}
The fields to set.
---
##### `addKeywords`
```typescript
public addKeywords(keywords: ...string[]): void
```
Adds keywords to package.json (deduplicated).
###### `keywords`Required
- *Type:* ...string[]
The keywords to add.
---
##### `addPeerDeps`
```typescript
public addPeerDeps(deps: ...string[]): void
```
Defines peer dependencies.
When adding peer dependencies, a devDependency will also be added on the
pinned version of the declared peer. This will ensure that you are testing
your code against the minimum version required from your consumers.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addScripts`
```typescript
public addScripts(scripts: {[ key: string ]: string}): void
```
Replaces the contents of multiple npm package.json scripts.
###### `scripts`Required
- *Type:* {[ key: string ]: string}
The scripts to set.
---
##### `removeScript`
```typescript
public removeScript(name: string): void
```
Removes the npm script (always successful).
###### `name`Required
- *Type:* string
The name of the script.
---
##### `renderWorkflowSetup`
```typescript
public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[]
```
Returns the set of workflow steps which should be executed to bootstrap a workflow.
###### `options`Optional
- *Type:* projen.javascript.RenderWorkflowSetupOptions
Options.
---
##### `setScript`
```typescript
public setScript(name: string, command: string): void
```
Replaces the contents of an npm package.json script.
###### `name`Required
- *Type:* string
The script name.
---
###### `command`Required
- *Type:* string
The command to execute.
---
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isProject | Test whether the given construct is a project. |
| of | Find the closest ancestor project for given construct. |
---
##### `isConstruct`
```typescript
import { PrivateTaimosCdkApp } from '@taimos/projen'
PrivateTaimosCdkApp.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isProject`
```typescript
import { PrivateTaimosCdkApp } from '@taimos/projen'
PrivateTaimosCdkApp.isProject(x: any)
```
Test whether the given construct is a project.
###### `x`Required
- *Type:* any
---
##### `of`
```typescript
import { PrivateTaimosCdkApp } from '@taimos/projen'
PrivateTaimosCdkApp.of(construct: IConstruct)
```
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
###### `construct`Required
- *Type:* constructs.IConstruct
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| buildTask | projen.Task | *No description.* |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| compileTask | projen.Task | *No description.* |
| components | projen.Component[] | Returns all the components within this project. |
| deps | projen.Dependencies | Project dependencies. |
| ejected | boolean | Whether or not the project is being ejected. |
| files | projen.FileBase[] | All files in this project. |
| gitattributes | projen.GitAttributesFile | The .gitattributes file for this repository. |
| gitignore | projen.IgnoreFile | .gitignore. |
| logger | projen.Logger | Logging utilities. |
| name | string | Project name. |
| outdir | string | Absolute output directory of this project. |
| packageTask | projen.Task | *No description.* |
| postCompileTask | projen.Task | *No description.* |
| preCompileTask | projen.Task | *No description.* |
| projectBuild | projen.ProjectBuild | Manages the build process of the project. |
| projenCommand | string | The command to use in order to run the projen CLI. |
| root | projen.Project | The root project. |
| subprojects | projen.Project[] | Returns all the subprojects within this project. |
| tasks | projen.Tasks | Project tasks. |
| testTask | projen.Task | *No description.* |
| defaultTask | projen.Task | This is the "default" task, the one that executes "projen". |
| initProject | projen.InitProject | The options used when this project is bootstrapped via `projen new`. |
| parent | projen.Project | A parent project. |
| autoApprove | projen.github.AutoApprove | Auto approve set up for this project. |
| devContainer | projen.vscode.DevContainer | Access for .devcontainer.json (used for GitHub Codespaces). |
| github | projen.github.GitHub | Access all github components. |
| gitpod | projen.Gitpod | Access for Gitpod. |
| vscode | projen.vscode.VsCode | Access all VSCode components. |
| artifactsDirectory | string | The build output directory. |
| artifactsJavascriptDirectory | string | The location of the npm tarball after build (`${artifactsDirectory}/js`). |
| bundler | projen.javascript.Bundler | *No description.* |
| npmrc | projen.javascript.NpmConfig | The .npmrc file. |
| package | projen.javascript.NodePackage | API for managing the node package. |
| runScriptCommand | string | The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). |
| autoMerge | projen.github.AutoMerge | Component that sets up mergify for merging approved pull requests. |
| biome | projen.javascript.Biome | *No description.* |
| buildWorkflow | projen.build.BuildWorkflow | The PR build GitHub workflow. |
| buildWorkflowJobId | string | The job ID of the build workflow. |
| jest | projen.javascript.Jest | The Jest configuration (if enabled). |
| maxNodeVersion | string | Maximum node version supported by this package. |
| minNodeVersion | string | The minimum node version required by this package to function. |
| npmignore | projen.IgnoreFile | The .npmignore file. |
| prettier | projen.javascript.Prettier | *No description.* |
| release | projen.release.Release | Release management. |
| upgradeWorkflow | projen.javascript.UpgradeDependencies | The upgrade workflow. |
| docsDirectory | string | *No description.* |
| libdir | string | The directory in which compiled .js files reside. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner used for executing TypeScript files. |
| srcdir | string | The directory in which the .ts sources reside. |
| testdir | string | The directory in which tests reside. |
| tsconfigDev | projen.javascript.TypescriptConfig | A typescript configuration file which covers all files (sources, tests, projen). |
| watchTask | projen.Task | The "watch" task. |
| docgen | boolean | *No description.* |
| eslint | projen.javascript.Eslint | *No description.* |
| tsconfig | projen.javascript.TypescriptConfig | *No description.* |
| tsconfigEslint | projen.javascript.TypescriptConfig | *No description.* |
| appEntrypoint | string | The CDK app entrypoint. |
| cdkConfig | projen.awscdk.CdkConfig | cdk.json configuration. |
| cdkDeps | projen.awscdk.AwsCdkDeps | *No description.* |
| cdkTasks | projen.awscdk.CdkTasks | Common CDK tasks. |
| cdkVersion | string | The CDK version this app is using. |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `buildTask`Required
```typescript
public readonly buildTask: Task;
```
- *Type:* projen.Task
---
##### `commitGenerated`Required
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
Whether to commit the managed files by default.
---
##### `compileTask`Required
```typescript
public readonly compileTask: Task;
```
- *Type:* projen.Task
---
##### `components`Required
```typescript
public readonly components: Component[];
```
- *Type:* projen.Component[]
Returns all the components within this project.
---
##### `deps`Required
```typescript
public readonly deps: Dependencies;
```
- *Type:* projen.Dependencies
Project dependencies.
---
##### `ejected`Required
```typescript
public readonly ejected: boolean;
```
- *Type:* boolean
Whether or not the project is being ejected.
---
##### `files`Required
```typescript
public readonly files: FileBase[];
```
- *Type:* projen.FileBase[]
All files in this project.
---
##### `gitattributes`Required
```typescript
public readonly gitattributes: GitAttributesFile;
```
- *Type:* projen.GitAttributesFile
The .gitattributes file for this repository.
---
##### `gitignore`Required
```typescript
public readonly gitignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
.gitignore.
---
##### `logger`Required
```typescript
public readonly logger: Logger;
```
- *Type:* projen.Logger
Logging utilities.
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
Project name.
---
##### `outdir`Required
```typescript
public readonly outdir: string;
```
- *Type:* string
Absolute output directory of this project.
---
##### `packageTask`Required
```typescript
public readonly packageTask: Task;
```
- *Type:* projen.Task
---
##### `postCompileTask`Required
```typescript
public readonly postCompileTask: Task;
```
- *Type:* projen.Task
---
##### `preCompileTask`Required
```typescript
public readonly preCompileTask: Task;
```
- *Type:* projen.Task
---
##### `projectBuild`Required
```typescript
public readonly projectBuild: ProjectBuild;
```
- *Type:* projen.ProjectBuild
Manages the build process of the project.
---
##### `projenCommand`Required
```typescript
public readonly projenCommand: string;
```
- *Type:* string
The command to use in order to run the projen CLI.
---
##### `root`Required
```typescript
public readonly root: Project;
```
- *Type:* projen.Project
The root project.
---
##### `subprojects`Required
```typescript
public readonly subprojects: Project[];
```
- *Type:* projen.Project[]
Returns all the subprojects within this project.
---
##### `tasks`Required
```typescript
public readonly tasks: Tasks;
```
- *Type:* projen.Tasks
Project tasks.
---
##### `testTask`Required
```typescript
public readonly testTask: Task;
```
- *Type:* projen.Task
---
##### `defaultTask`Optional
```typescript
public readonly defaultTask: Task;
```
- *Type:* projen.Task
This is the "default" task, the one that executes "projen".
Undefined if
the project is being ejected.
---
##### ~~`initProject`~~Optional
- *Deprecated:* use the `initProject` argument passed to `Component.projectCreation()` instead.
```typescript
public readonly initProject: InitProject;
```
- *Type:* projen.InitProject
The options used when this project is bootstrapped via `projen new`.
It
includes the original set of options passed to the CLI and also the JSII
FQN of the project type.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
A parent project.
If undefined, this is the root project.
---
##### `autoApprove`Optional
```typescript
public readonly autoApprove: AutoApprove;
```
- *Type:* projen.github.AutoApprove
Auto approve set up for this project.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: DevContainer;
```
- *Type:* projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be `undefined` if devContainer boolean is false
---
##### `github`Optional
```typescript
public readonly github: GitHub;
```
- *Type:* projen.github.GitHub
Access all github components.
This will be `undefined` for subprojects.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: Gitpod;
```
- *Type:* projen.Gitpod
Access for Gitpod.
This will be `undefined` if gitpod boolean is false
---
##### `vscode`Optional
```typescript
public readonly vscode: VsCode;
```
- *Type:* projen.vscode.VsCode
Access all VSCode components.
This will be `undefined` for subprojects.
---
##### `artifactsDirectory`Required
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
The build output directory.
An npm tarball will be created under the `js`
subdirectory. For example, if this is set to `dist` (the default), the npm
tarball will be placed under `dist/js/boom-boom-1.2.3.tg`.
---
##### `artifactsJavascriptDirectory`Required
```typescript
public readonly artifactsJavascriptDirectory: string;
```
- *Type:* string
The location of the npm tarball after build (`${artifactsDirectory}/js`).
---
##### `bundler`Required
```typescript
public readonly bundler: Bundler;
```
- *Type:* projen.javascript.Bundler
---
##### `npmrc`Required
```typescript
public readonly npmrc: NpmConfig;
```
- *Type:* projen.javascript.NpmConfig
The .npmrc file.
---
##### `package`Required
```typescript
public readonly package: NodePackage;
```
- *Type:* projen.javascript.NodePackage
API for managing the node package.
---
##### `runScriptCommand`Required
```typescript
public readonly runScriptCommand: string;
```
- *Type:* string
The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: AutoMerge;
```
- *Type:* projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
---
##### `biome`Optional
```typescript
public readonly biome: Biome;
```
- *Type:* projen.javascript.Biome
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: BuildWorkflow;
```
- *Type:* projen.build.BuildWorkflow
The PR build GitHub workflow.
`undefined` if `buildWorkflow` is disabled.
---
##### `buildWorkflowJobId`Optional
```typescript
public readonly buildWorkflowJobId: string;
```
- *Type:* string
The job ID of the build workflow.
---
##### `jest`Optional
```typescript
public readonly jest: Jest;
```
- *Type:* projen.javascript.Jest
The Jest configuration (if enabled).
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
Maximum node version supported by this package.
The value indicates the package is incompatible with newer versions.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
The minimum node version required by this package to function.
This value indicates the package is incompatible with older versions.
---
##### `npmignore`Optional
```typescript
public readonly npmignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
The .npmignore file.
---
##### `prettier`Optional
```typescript
public readonly prettier: Prettier;
```
- *Type:* projen.javascript.Prettier
---
##### `release`Optional
```typescript
public readonly release: Release;
```
- *Type:* projen.release.Release
Release management.
---
##### `upgradeWorkflow`Optional
```typescript
public readonly upgradeWorkflow: UpgradeDependencies;
```
- *Type:* projen.javascript.UpgradeDependencies
The upgrade workflow.
---
##### `docsDirectory`Required
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
---
##### `libdir`Required
```typescript
public readonly libdir: string;
```
- *Type:* string
The directory in which compiled .js files reside.
---
##### `runner`Required
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
The TypeScript runner used for executing TypeScript files.
---
##### `srcdir`Required
```typescript
public readonly srcdir: string;
```
- *Type:* string
The directory in which the .ts sources reside.
---
##### `testdir`Required
```typescript
public readonly testdir: string;
```
- *Type:* string
The directory in which tests reside.
---
##### `tsconfigDev`Required
```typescript
public readonly tsconfigDev: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
---
##### `watchTask`Required
```typescript
public readonly watchTask: Task;
```
- *Type:* projen.Task
The "watch" task.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
---
##### `eslint`Optional
```typescript
public readonly eslint: Eslint;
```
- *Type:* projen.javascript.Eslint
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `tsconfigEslint`Optional
```typescript
public readonly tsconfigEslint: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `appEntrypoint`Required
```typescript
public readonly appEntrypoint: string;
```
- *Type:* string
The CDK app entrypoint.
---
##### `cdkConfig`Required
```typescript
public readonly cdkConfig: CdkConfig;
```
- *Type:* projen.awscdk.CdkConfig
cdk.json configuration.
---
##### `cdkDeps`Required
```typescript
public readonly cdkDeps: AwsCdkDeps;
```
- *Type:* projen.awscdk.AwsCdkDeps
---
##### `cdkTasks`Required
```typescript
public readonly cdkTasks: CdkTasks;
```
- *Type:* projen.awscdk.CdkTasks
Common CDK tasks.
---
##### `cdkVersion`Required
```typescript
public readonly cdkVersion: string;
```
- *Type:* string
The CDK version this app is using.
---
#### Constants
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). |
| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* |
---
##### `DEFAULT_TASK`Required
```typescript
public readonly DEFAULT_TASK: string;
```
- *Type:* string
The name of the default task (the task executed when `projen` is run without arguments).
Normally
this task should synthesize the project files.
---
##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required
```typescript
public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string;
```
- *Type:* string
---
### ProductionTaimosCdkApp
Production AWS CDK app in TypeScript.
#### Initializers
```typescript
import { ProductionTaimosCdkApp } from '@taimos/projen'
new ProductionTaimosCdkApp(options: ProductionTaimosCdkAppOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| options | ProductionTaimosCdkAppOptions | *No description.* |
---
##### `options`Required
- *Type:* ProductionTaimosCdkAppOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| addExcludeFromCleanup | Exclude the matching files from pre-synth cleanup. |
| addGitIgnore | Adds a .gitignore pattern. |
| addPackageIgnore | Adds patterns to be ignored by npm. |
| addTask | Adds a new task to this project. |
| annotateGenerated | Marks the provided file(s) as being generated. |
| postSynthesize | Called after all components are synthesized. |
| preSynthesize | Called before all components are synthesized. |
| removeTask | Removes a task from a project. |
| runTaskCommand | Returns the shell command to execute in order to run a task. |
| synth | Synthesize all project files into `outdir`. |
| tryFindFile | Finds a file at the specified relative path within this project and all its subprojects. |
| tryFindObjectFile | Finds an object file (like JsonFile, YamlFile, etc.) by name. |
| tryRemoveFile | Finds a file at the specified relative path within this project and removes it. |
| addBins | *No description.* |
| addBundledDeps | Defines bundled dependencies. |
| addDeps | Defines normal dependencies. |
| addDevDeps | Defines development/test dependencies. |
| addFields | Directly set fields in `package.json`. |
| addKeywords | Adds keywords to package.json (deduplicated). |
| addPeerDeps | Defines peer dependencies. |
| addScripts | Replaces the contents of multiple npm package.json scripts. |
| removeScript | Removes the npm script (always successful). |
| renderWorkflowSetup | Returns the set of workflow steps which should be executed to bootstrap a workflow. |
| setScript | Replaces the contents of an npm package.json script. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `addExcludeFromCleanup`
```typescript
public addExcludeFromCleanup(globs: ...string[]): void
```
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some
source files include the projen marker and we don't want them to be erased during synth.
###### `globs`Required
- *Type:* ...string[]
The glob patterns to match.
---
##### `addGitIgnore`
```typescript
public addGitIgnore(pattern: string): void
```
Adds a .gitignore pattern.
###### `pattern`Required
- *Type:* string
The glob pattern to ignore.
---
##### `addPackageIgnore`
```typescript
public addPackageIgnore(pattern: string): void
```
Adds patterns to be ignored by npm.
###### `pattern`Required
- *Type:* string
The pattern to ignore.
---
##### `addTask`
```typescript
public addTask(name: string, props?: TaskOptions): Task
```
Adds a new task to this project.
This will fail if the project already has
a task with this name.
###### `name`Required
- *Type:* string
The task name to add.
---
###### `props`Optional
- *Type:* projen.TaskOptions
Task properties.
---
##### `annotateGenerated`
```typescript
public annotateGenerated(glob: string): void
```
Marks the provided file(s) as being generated.
This is achieved using the
github-linguist attributes. Generated files do not count against the
repository statistics and language breakdown.
> [https://github.com/github/linguist/blob/master/docs/overrides.md](https://github.com/github/linguist/blob/master/docs/overrides.md)
###### `glob`Required
- *Type:* string
the glob pattern to match (could be a file path).
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after all components are synthesized.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before all components are synthesized.
##### `removeTask`
```typescript
public removeTask(name: string): Task
```
Removes a task from a project.
###### `name`Required
- *Type:* string
The name of the task to remove.
---
##### `runTaskCommand`
```typescript
public runTaskCommand(task: Task): string
```
Returns the shell command to execute in order to run a task.
This will
typically be `pnpm projen TASK`.
###### `task`Required
- *Type:* projen.Task
The task for which the command is required.
---
##### `synth`
```typescript
public synth(): void
```
Synthesize all project files into `outdir`.
1. Call "this.preSynthesize()"
2. Delete all generated files
3. Synthesize all subprojects
4. Synthesize all components of this project
5. Call "projectCreation()" for all components, only if the project is being created for the first time
6. Call "postSynthesize()" for all components of this project
7. Call "this.postSynthesize()"
8. Call "postProjectCreation()" for all components, only if the project is being created for the first time
##### `tryFindFile`
```typescript
public tryFindFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and all its subprojects.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be resolved
from the root of _this_ project.
---
##### `tryFindObjectFile`
```typescript
public tryFindObjectFile(filePath: string): ObjectFile
```
Finds an object file (like JsonFile, YamlFile, etc.) by name.
###### `filePath`Required
- *Type:* string
The file path.
---
##### `tryRemoveFile`
```typescript
public tryRemoveFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and removes it.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be
resolved from the root of _this_ project.
---
##### `addBins`
```typescript
public addBins(bins: {[ key: string ]: string}): void
```
###### `bins`Required
- *Type:* {[ key: string ]: string}
---
##### `addBundledDeps`
```typescript
public addBundledDeps(deps: ...string[]): void
```
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
`bundledDependencies` section of your `package.json`.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDeps`
```typescript
public addDeps(deps: ...string[]): void
```
Defines normal dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDevDeps`
```typescript
public addDevDeps(deps: ...string[]): void
```
Defines development/test dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addFields`
```typescript
public addFields(fields: {[ key: string ]: any}): void
```
Directly set fields in `package.json`.
###### `fields`Required
- *Type:* {[ key: string ]: any}
The fields to set.
---
##### `addKeywords`
```typescript
public addKeywords(keywords: ...string[]): void
```
Adds keywords to package.json (deduplicated).
###### `keywords`Required
- *Type:* ...string[]
The keywords to add.
---
##### `addPeerDeps`
```typescript
public addPeerDeps(deps: ...string[]): void
```
Defines peer dependencies.
When adding peer dependencies, a devDependency will also be added on the
pinned version of the declared peer. This will ensure that you are testing
your code against the minimum version required from your consumers.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addScripts`
```typescript
public addScripts(scripts: {[ key: string ]: string}): void
```
Replaces the contents of multiple npm package.json scripts.
###### `scripts`Required
- *Type:* {[ key: string ]: string}
The scripts to set.
---
##### `removeScript`
```typescript
public removeScript(name: string): void
```
Removes the npm script (always successful).
###### `name`Required
- *Type:* string
The name of the script.
---
##### `renderWorkflowSetup`
```typescript
public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[]
```
Returns the set of workflow steps which should be executed to bootstrap a workflow.
###### `options`Optional
- *Type:* projen.javascript.RenderWorkflowSetupOptions
Options.
---
##### `setScript`
```typescript
public setScript(name: string, command: string): void
```
Replaces the contents of an npm package.json script.
###### `name`Required
- *Type:* string
The script name.
---
###### `command`Required
- *Type:* string
The command to execute.
---
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isProject | Test whether the given construct is a project. |
| of | Find the closest ancestor project for given construct. |
---
##### `isConstruct`
```typescript
import { ProductionTaimosCdkApp } from '@taimos/projen'
ProductionTaimosCdkApp.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isProject`
```typescript
import { ProductionTaimosCdkApp } from '@taimos/projen'
ProductionTaimosCdkApp.isProject(x: any)
```
Test whether the given construct is a project.
###### `x`Required
- *Type:* any
---
##### `of`
```typescript
import { ProductionTaimosCdkApp } from '@taimos/projen'
ProductionTaimosCdkApp.of(construct: IConstruct)
```
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
###### `construct`Required
- *Type:* constructs.IConstruct
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| buildTask | projen.Task | *No description.* |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| compileTask | projen.Task | *No description.* |
| components | projen.Component[] | Returns all the components within this project. |
| deps | projen.Dependencies | Project dependencies. |
| ejected | boolean | Whether or not the project is being ejected. |
| files | projen.FileBase[] | All files in this project. |
| gitattributes | projen.GitAttributesFile | The .gitattributes file for this repository. |
| gitignore | projen.IgnoreFile | .gitignore. |
| logger | projen.Logger | Logging utilities. |
| name | string | Project name. |
| outdir | string | Absolute output directory of this project. |
| packageTask | projen.Task | *No description.* |
| postCompileTask | projen.Task | *No description.* |
| preCompileTask | projen.Task | *No description.* |
| projectBuild | projen.ProjectBuild | Manages the build process of the project. |
| projenCommand | string | The command to use in order to run the projen CLI. |
| root | projen.Project | The root project. |
| subprojects | projen.Project[] | Returns all the subprojects within this project. |
| tasks | projen.Tasks | Project tasks. |
| testTask | projen.Task | *No description.* |
| defaultTask | projen.Task | This is the "default" task, the one that executes "projen". |
| initProject | projen.InitProject | The options used when this project is bootstrapped via `projen new`. |
| parent | projen.Project | A parent project. |
| autoApprove | projen.github.AutoApprove | Auto approve set up for this project. |
| devContainer | projen.vscode.DevContainer | Access for .devcontainer.json (used for GitHub Codespaces). |
| github | projen.github.GitHub | Access all github components. |
| gitpod | projen.Gitpod | Access for Gitpod. |
| vscode | projen.vscode.VsCode | Access all VSCode components. |
| artifactsDirectory | string | The build output directory. |
| artifactsJavascriptDirectory | string | The location of the npm tarball after build (`${artifactsDirectory}/js`). |
| bundler | projen.javascript.Bundler | *No description.* |
| npmrc | projen.javascript.NpmConfig | The .npmrc file. |
| package | projen.javascript.NodePackage | API for managing the node package. |
| runScriptCommand | string | The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). |
| autoMerge | projen.github.AutoMerge | Component that sets up mergify for merging approved pull requests. |
| biome | projen.javascript.Biome | *No description.* |
| buildWorkflow | projen.build.BuildWorkflow | The PR build GitHub workflow. |
| buildWorkflowJobId | string | The job ID of the build workflow. |
| jest | projen.javascript.Jest | The Jest configuration (if enabled). |
| maxNodeVersion | string | Maximum node version supported by this package. |
| minNodeVersion | string | The minimum node version required by this package to function. |
| npmignore | projen.IgnoreFile | The .npmignore file. |
| prettier | projen.javascript.Prettier | *No description.* |
| release | projen.release.Release | Release management. |
| upgradeWorkflow | projen.javascript.UpgradeDependencies | The upgrade workflow. |
| docsDirectory | string | *No description.* |
| libdir | string | The directory in which compiled .js files reside. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner used for executing TypeScript files. |
| srcdir | string | The directory in which the .ts sources reside. |
| testdir | string | The directory in which tests reside. |
| tsconfigDev | projen.javascript.TypescriptConfig | A typescript configuration file which covers all files (sources, tests, projen). |
| watchTask | projen.Task | The "watch" task. |
| docgen | boolean | *No description.* |
| eslint | projen.javascript.Eslint | *No description.* |
| tsconfig | projen.javascript.TypescriptConfig | *No description.* |
| tsconfigEslint | projen.javascript.TypescriptConfig | *No description.* |
| appEntrypoint | string | The CDK app entrypoint. |
| cdkConfig | projen.awscdk.CdkConfig | cdk.json configuration. |
| cdkDeps | projen.awscdk.AwsCdkDeps | *No description.* |
| cdkTasks | projen.awscdk.CdkTasks | Common CDK tasks. |
| cdkVersion | string | The CDK version this app is using. |
| sonarcloud | projen.IniFile | The SonarCloud properties file. |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `buildTask`Required
```typescript
public readonly buildTask: Task;
```
- *Type:* projen.Task
---
##### `commitGenerated`Required
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
Whether to commit the managed files by default.
---
##### `compileTask`Required
```typescript
public readonly compileTask: Task;
```
- *Type:* projen.Task
---
##### `components`Required
```typescript
public readonly components: Component[];
```
- *Type:* projen.Component[]
Returns all the components within this project.
---
##### `deps`Required
```typescript
public readonly deps: Dependencies;
```
- *Type:* projen.Dependencies
Project dependencies.
---
##### `ejected`Required
```typescript
public readonly ejected: boolean;
```
- *Type:* boolean
Whether or not the project is being ejected.
---
##### `files`Required
```typescript
public readonly files: FileBase[];
```
- *Type:* projen.FileBase[]
All files in this project.
---
##### `gitattributes`Required
```typescript
public readonly gitattributes: GitAttributesFile;
```
- *Type:* projen.GitAttributesFile
The .gitattributes file for this repository.
---
##### `gitignore`Required
```typescript
public readonly gitignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
.gitignore.
---
##### `logger`Required
```typescript
public readonly logger: Logger;
```
- *Type:* projen.Logger
Logging utilities.
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
Project name.
---
##### `outdir`Required
```typescript
public readonly outdir: string;
```
- *Type:* string
Absolute output directory of this project.
---
##### `packageTask`Required
```typescript
public readonly packageTask: Task;
```
- *Type:* projen.Task
---
##### `postCompileTask`Required
```typescript
public readonly postCompileTask: Task;
```
- *Type:* projen.Task
---
##### `preCompileTask`Required
```typescript
public readonly preCompileTask: Task;
```
- *Type:* projen.Task
---
##### `projectBuild`Required
```typescript
public readonly projectBuild: ProjectBuild;
```
- *Type:* projen.ProjectBuild
Manages the build process of the project.
---
##### `projenCommand`Required
```typescript
public readonly projenCommand: string;
```
- *Type:* string
The command to use in order to run the projen CLI.
---
##### `root`Required
```typescript
public readonly root: Project;
```
- *Type:* projen.Project
The root project.
---
##### `subprojects`Required
```typescript
public readonly subprojects: Project[];
```
- *Type:* projen.Project[]
Returns all the subprojects within this project.
---
##### `tasks`Required
```typescript
public readonly tasks: Tasks;
```
- *Type:* projen.Tasks
Project tasks.
---
##### `testTask`Required
```typescript
public readonly testTask: Task;
```
- *Type:* projen.Task
---
##### `defaultTask`Optional
```typescript
public readonly defaultTask: Task;
```
- *Type:* projen.Task
This is the "default" task, the one that executes "projen".
Undefined if
the project is being ejected.
---
##### ~~`initProject`~~Optional
- *Deprecated:* use the `initProject` argument passed to `Component.projectCreation()` instead.
```typescript
public readonly initProject: InitProject;
```
- *Type:* projen.InitProject
The options used when this project is bootstrapped via `projen new`.
It
includes the original set of options passed to the CLI and also the JSII
FQN of the project type.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
A parent project.
If undefined, this is the root project.
---
##### `autoApprove`Optional
```typescript
public readonly autoApprove: AutoApprove;
```
- *Type:* projen.github.AutoApprove
Auto approve set up for this project.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: DevContainer;
```
- *Type:* projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be `undefined` if devContainer boolean is false
---
##### `github`Optional
```typescript
public readonly github: GitHub;
```
- *Type:* projen.github.GitHub
Access all github components.
This will be `undefined` for subprojects.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: Gitpod;
```
- *Type:* projen.Gitpod
Access for Gitpod.
This will be `undefined` if gitpod boolean is false
---
##### `vscode`Optional
```typescript
public readonly vscode: VsCode;
```
- *Type:* projen.vscode.VsCode
Access all VSCode components.
This will be `undefined` for subprojects.
---
##### `artifactsDirectory`Required
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
The build output directory.
An npm tarball will be created under the `js`
subdirectory. For example, if this is set to `dist` (the default), the npm
tarball will be placed under `dist/js/boom-boom-1.2.3.tg`.
---
##### `artifactsJavascriptDirectory`Required
```typescript
public readonly artifactsJavascriptDirectory: string;
```
- *Type:* string
The location of the npm tarball after build (`${artifactsDirectory}/js`).
---
##### `bundler`Required
```typescript
public readonly bundler: Bundler;
```
- *Type:* projen.javascript.Bundler
---
##### `npmrc`Required
```typescript
public readonly npmrc: NpmConfig;
```
- *Type:* projen.javascript.NpmConfig
The .npmrc file.
---
##### `package`Required
```typescript
public readonly package: NodePackage;
```
- *Type:* projen.javascript.NodePackage
API for managing the node package.
---
##### `runScriptCommand`Required
```typescript
public readonly runScriptCommand: string;
```
- *Type:* string
The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: AutoMerge;
```
- *Type:* projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
---
##### `biome`Optional
```typescript
public readonly biome: Biome;
```
- *Type:* projen.javascript.Biome
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: BuildWorkflow;
```
- *Type:* projen.build.BuildWorkflow
The PR build GitHub workflow.
`undefined` if `buildWorkflow` is disabled.
---
##### `buildWorkflowJobId`Optional
```typescript
public readonly buildWorkflowJobId: string;
```
- *Type:* string
The job ID of the build workflow.
---
##### `jest`Optional
```typescript
public readonly jest: Jest;
```
- *Type:* projen.javascript.Jest
The Jest configuration (if enabled).
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
Maximum node version supported by this package.
The value indicates the package is incompatible with newer versions.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
The minimum node version required by this package to function.
This value indicates the package is incompatible with older versions.
---
##### `npmignore`Optional
```typescript
public readonly npmignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
The .npmignore file.
---
##### `prettier`Optional
```typescript
public readonly prettier: Prettier;
```
- *Type:* projen.javascript.Prettier
---
##### `release`Optional
```typescript
public readonly release: Release;
```
- *Type:* projen.release.Release
Release management.
---
##### `upgradeWorkflow`Optional
```typescript
public readonly upgradeWorkflow: UpgradeDependencies;
```
- *Type:* projen.javascript.UpgradeDependencies
The upgrade workflow.
---
##### `docsDirectory`Required
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
---
##### `libdir`Required
```typescript
public readonly libdir: string;
```
- *Type:* string
The directory in which compiled .js files reside.
---
##### `runner`Required
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
The TypeScript runner used for executing TypeScript files.
---
##### `srcdir`Required
```typescript
public readonly srcdir: string;
```
- *Type:* string
The directory in which the .ts sources reside.
---
##### `testdir`Required
```typescript
public readonly testdir: string;
```
- *Type:* string
The directory in which tests reside.
---
##### `tsconfigDev`Required
```typescript
public readonly tsconfigDev: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
---
##### `watchTask`Required
```typescript
public readonly watchTask: Task;
```
- *Type:* projen.Task
The "watch" task.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
---
##### `eslint`Optional
```typescript
public readonly eslint: Eslint;
```
- *Type:* projen.javascript.Eslint
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `tsconfigEslint`Optional
```typescript
public readonly tsconfigEslint: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `appEntrypoint`Required
```typescript
public readonly appEntrypoint: string;
```
- *Type:* string
The CDK app entrypoint.
---
##### `cdkConfig`Required
```typescript
public readonly cdkConfig: CdkConfig;
```
- *Type:* projen.awscdk.CdkConfig
cdk.json configuration.
---
##### `cdkDeps`Required
```typescript
public readonly cdkDeps: AwsCdkDeps;
```
- *Type:* projen.awscdk.AwsCdkDeps
---
##### `cdkTasks`Required
```typescript
public readonly cdkTasks: CdkTasks;
```
- *Type:* projen.awscdk.CdkTasks
Common CDK tasks.
---
##### `cdkVersion`Required
```typescript
public readonly cdkVersion: string;
```
- *Type:* string
The CDK version this app is using.
---
##### `sonarcloud`Optional
```typescript
public readonly sonarcloud: IniFile;
```
- *Type:* projen.IniFile
The SonarCloud properties file.
---
#### Constants
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). |
| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* |
---
##### `DEFAULT_TASK`Required
```typescript
public readonly DEFAULT_TASK: string;
```
- *Type:* string
The name of the default task (the task executed when `projen` is run without arguments).
Normally
this task should synthesize the project files.
---
##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required
```typescript
public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string;
```
- *Type:* string
---
### TaimosCdkApp
AWS CDK app in TypeScript.
#### Initializers
```typescript
import { TaimosCdkApp } from '@taimos/projen'
new TaimosCdkApp(options: TaimosCdkAppOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| options | TaimosCdkAppOptions | *No description.* |
---
##### `options`Required
- *Type:* TaimosCdkAppOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| addExcludeFromCleanup | Exclude the matching files from pre-synth cleanup. |
| addGitIgnore | Adds a .gitignore pattern. |
| addPackageIgnore | Adds patterns to be ignored by npm. |
| addTask | Adds a new task to this project. |
| annotateGenerated | Marks the provided file(s) as being generated. |
| postSynthesize | Called after all components are synthesized. |
| preSynthesize | Called before all components are synthesized. |
| removeTask | Removes a task from a project. |
| runTaskCommand | Returns the shell command to execute in order to run a task. |
| synth | Synthesize all project files into `outdir`. |
| tryFindFile | Finds a file at the specified relative path within this project and all its subprojects. |
| tryFindObjectFile | Finds an object file (like JsonFile, YamlFile, etc.) by name. |
| tryRemoveFile | Finds a file at the specified relative path within this project and removes it. |
| addBins | *No description.* |
| addBundledDeps | Defines bundled dependencies. |
| addDeps | Defines normal dependencies. |
| addDevDeps | Defines development/test dependencies. |
| addFields | Directly set fields in `package.json`. |
| addKeywords | Adds keywords to package.json (deduplicated). |
| addPeerDeps | Defines peer dependencies. |
| addScripts | Replaces the contents of multiple npm package.json scripts. |
| removeScript | Removes the npm script (always successful). |
| renderWorkflowSetup | Returns the set of workflow steps which should be executed to bootstrap a workflow. |
| setScript | Replaces the contents of an npm package.json script. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `addExcludeFromCleanup`
```typescript
public addExcludeFromCleanup(globs: ...string[]): void
```
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some
source files include the projen marker and we don't want them to be erased during synth.
###### `globs`Required
- *Type:* ...string[]
The glob patterns to match.
---
##### `addGitIgnore`
```typescript
public addGitIgnore(pattern: string): void
```
Adds a .gitignore pattern.
###### `pattern`Required
- *Type:* string
The glob pattern to ignore.
---
##### `addPackageIgnore`
```typescript
public addPackageIgnore(pattern: string): void
```
Adds patterns to be ignored by npm.
###### `pattern`Required
- *Type:* string
The pattern to ignore.
---
##### `addTask`
```typescript
public addTask(name: string, props?: TaskOptions): Task
```
Adds a new task to this project.
This will fail if the project already has
a task with this name.
###### `name`Required
- *Type:* string
The task name to add.
---
###### `props`Optional
- *Type:* projen.TaskOptions
Task properties.
---
##### `annotateGenerated`
```typescript
public annotateGenerated(glob: string): void
```
Marks the provided file(s) as being generated.
This is achieved using the
github-linguist attributes. Generated files do not count against the
repository statistics and language breakdown.
> [https://github.com/github/linguist/blob/master/docs/overrides.md](https://github.com/github/linguist/blob/master/docs/overrides.md)
###### `glob`Required
- *Type:* string
the glob pattern to match (could be a file path).
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after all components are synthesized.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before all components are synthesized.
##### `removeTask`
```typescript
public removeTask(name: string): Task
```
Removes a task from a project.
###### `name`Required
- *Type:* string
The name of the task to remove.
---
##### `runTaskCommand`
```typescript
public runTaskCommand(task: Task): string
```
Returns the shell command to execute in order to run a task.
This will
typically be `pnpm projen TASK`.
###### `task`Required
- *Type:* projen.Task
The task for which the command is required.
---
##### `synth`
```typescript
public synth(): void
```
Synthesize all project files into `outdir`.
1. Call "this.preSynthesize()"
2. Delete all generated files
3. Synthesize all subprojects
4. Synthesize all components of this project
5. Call "projectCreation()" for all components, only if the project is being created for the first time
6. Call "postSynthesize()" for all components of this project
7. Call "this.postSynthesize()"
8. Call "postProjectCreation()" for all components, only if the project is being created for the first time
##### `tryFindFile`
```typescript
public tryFindFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and all its subprojects.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be resolved
from the root of _this_ project.
---
##### `tryFindObjectFile`
```typescript
public tryFindObjectFile(filePath: string): ObjectFile
```
Finds an object file (like JsonFile, YamlFile, etc.) by name.
###### `filePath`Required
- *Type:* string
The file path.
---
##### `tryRemoveFile`
```typescript
public tryRemoveFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and removes it.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be
resolved from the root of _this_ project.
---
##### `addBins`
```typescript
public addBins(bins: {[ key: string ]: string}): void
```
###### `bins`Required
- *Type:* {[ key: string ]: string}
---
##### `addBundledDeps`
```typescript
public addBundledDeps(deps: ...string[]): void
```
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
`bundledDependencies` section of your `package.json`.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDeps`
```typescript
public addDeps(deps: ...string[]): void
```
Defines normal dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDevDeps`
```typescript
public addDevDeps(deps: ...string[]): void
```
Defines development/test dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addFields`
```typescript
public addFields(fields: {[ key: string ]: any}): void
```
Directly set fields in `package.json`.
###### `fields`Required
- *Type:* {[ key: string ]: any}
The fields to set.
---
##### `addKeywords`
```typescript
public addKeywords(keywords: ...string[]): void
```
Adds keywords to package.json (deduplicated).
###### `keywords`Required
- *Type:* ...string[]
The keywords to add.
---
##### `addPeerDeps`
```typescript
public addPeerDeps(deps: ...string[]): void
```
Defines peer dependencies.
When adding peer dependencies, a devDependency will also be added on the
pinned version of the declared peer. This will ensure that you are testing
your code against the minimum version required from your consumers.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addScripts`
```typescript
public addScripts(scripts: {[ key: string ]: string}): void
```
Replaces the contents of multiple npm package.json scripts.
###### `scripts`Required
- *Type:* {[ key: string ]: string}
The scripts to set.
---
##### `removeScript`
```typescript
public removeScript(name: string): void
```
Removes the npm script (always successful).
###### `name`Required
- *Type:* string
The name of the script.
---
##### `renderWorkflowSetup`
```typescript
public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[]
```
Returns the set of workflow steps which should be executed to bootstrap a workflow.
###### `options`Optional
- *Type:* projen.javascript.RenderWorkflowSetupOptions
Options.
---
##### `setScript`
```typescript
public setScript(name: string, command: string): void
```
Replaces the contents of an npm package.json script.
###### `name`Required
- *Type:* string
The script name.
---
###### `command`Required
- *Type:* string
The command to execute.
---
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isProject | Test whether the given construct is a project. |
| of | Find the closest ancestor project for given construct. |
---
##### `isConstruct`
```typescript
import { TaimosCdkApp } from '@taimos/projen'
TaimosCdkApp.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isProject`
```typescript
import { TaimosCdkApp } from '@taimos/projen'
TaimosCdkApp.isProject(x: any)
```
Test whether the given construct is a project.
###### `x`Required
- *Type:* any
---
##### `of`
```typescript
import { TaimosCdkApp } from '@taimos/projen'
TaimosCdkApp.of(construct: IConstruct)
```
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
###### `construct`Required
- *Type:* constructs.IConstruct
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| buildTask | projen.Task | *No description.* |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| compileTask | projen.Task | *No description.* |
| components | projen.Component[] | Returns all the components within this project. |
| deps | projen.Dependencies | Project dependencies. |
| ejected | boolean | Whether or not the project is being ejected. |
| files | projen.FileBase[] | All files in this project. |
| gitattributes | projen.GitAttributesFile | The .gitattributes file for this repository. |
| gitignore | projen.IgnoreFile | .gitignore. |
| logger | projen.Logger | Logging utilities. |
| name | string | Project name. |
| outdir | string | Absolute output directory of this project. |
| packageTask | projen.Task | *No description.* |
| postCompileTask | projen.Task | *No description.* |
| preCompileTask | projen.Task | *No description.* |
| projectBuild | projen.ProjectBuild | Manages the build process of the project. |
| projenCommand | string | The command to use in order to run the projen CLI. |
| root | projen.Project | The root project. |
| subprojects | projen.Project[] | Returns all the subprojects within this project. |
| tasks | projen.Tasks | Project tasks. |
| testTask | projen.Task | *No description.* |
| defaultTask | projen.Task | This is the "default" task, the one that executes "projen". |
| initProject | projen.InitProject | The options used when this project is bootstrapped via `projen new`. |
| parent | projen.Project | A parent project. |
| autoApprove | projen.github.AutoApprove | Auto approve set up for this project. |
| devContainer | projen.vscode.DevContainer | Access for .devcontainer.json (used for GitHub Codespaces). |
| github | projen.github.GitHub | Access all github components. |
| gitpod | projen.Gitpod | Access for Gitpod. |
| vscode | projen.vscode.VsCode | Access all VSCode components. |
| artifactsDirectory | string | The build output directory. |
| artifactsJavascriptDirectory | string | The location of the npm tarball after build (`${artifactsDirectory}/js`). |
| bundler | projen.javascript.Bundler | *No description.* |
| npmrc | projen.javascript.NpmConfig | The .npmrc file. |
| package | projen.javascript.NodePackage | API for managing the node package. |
| runScriptCommand | string | The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). |
| autoMerge | projen.github.AutoMerge | Component that sets up mergify for merging approved pull requests. |
| biome | projen.javascript.Biome | *No description.* |
| buildWorkflow | projen.build.BuildWorkflow | The PR build GitHub workflow. |
| buildWorkflowJobId | string | The job ID of the build workflow. |
| jest | projen.javascript.Jest | The Jest configuration (if enabled). |
| maxNodeVersion | string | Maximum node version supported by this package. |
| minNodeVersion | string | The minimum node version required by this package to function. |
| npmignore | projen.IgnoreFile | The .npmignore file. |
| prettier | projen.javascript.Prettier | *No description.* |
| release | projen.release.Release | Release management. |
| upgradeWorkflow | projen.javascript.UpgradeDependencies | The upgrade workflow. |
| docsDirectory | string | *No description.* |
| libdir | string | The directory in which compiled .js files reside. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner used for executing TypeScript files. |
| srcdir | string | The directory in which the .ts sources reside. |
| testdir | string | The directory in which tests reside. |
| tsconfigDev | projen.javascript.TypescriptConfig | A typescript configuration file which covers all files (sources, tests, projen). |
| watchTask | projen.Task | The "watch" task. |
| docgen | boolean | *No description.* |
| eslint | projen.javascript.Eslint | *No description.* |
| tsconfig | projen.javascript.TypescriptConfig | *No description.* |
| tsconfigEslint | projen.javascript.TypescriptConfig | *No description.* |
| appEntrypoint | string | The CDK app entrypoint. |
| cdkConfig | projen.awscdk.CdkConfig | cdk.json configuration. |
| cdkDeps | projen.awscdk.AwsCdkDeps | *No description.* |
| cdkTasks | projen.awscdk.CdkTasks | Common CDK tasks. |
| cdkVersion | string | The CDK version this app is using. |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `buildTask`Required
```typescript
public readonly buildTask: Task;
```
- *Type:* projen.Task
---
##### `commitGenerated`Required
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
Whether to commit the managed files by default.
---
##### `compileTask`Required
```typescript
public readonly compileTask: Task;
```
- *Type:* projen.Task
---
##### `components`Required
```typescript
public readonly components: Component[];
```
- *Type:* projen.Component[]
Returns all the components within this project.
---
##### `deps`Required
```typescript
public readonly deps: Dependencies;
```
- *Type:* projen.Dependencies
Project dependencies.
---
##### `ejected`Required
```typescript
public readonly ejected: boolean;
```
- *Type:* boolean
Whether or not the project is being ejected.
---
##### `files`Required
```typescript
public readonly files: FileBase[];
```
- *Type:* projen.FileBase[]
All files in this project.
---
##### `gitattributes`Required
```typescript
public readonly gitattributes: GitAttributesFile;
```
- *Type:* projen.GitAttributesFile
The .gitattributes file for this repository.
---
##### `gitignore`Required
```typescript
public readonly gitignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
.gitignore.
---
##### `logger`Required
```typescript
public readonly logger: Logger;
```
- *Type:* projen.Logger
Logging utilities.
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
Project name.
---
##### `outdir`Required
```typescript
public readonly outdir: string;
```
- *Type:* string
Absolute output directory of this project.
---
##### `packageTask`Required
```typescript
public readonly packageTask: Task;
```
- *Type:* projen.Task
---
##### `postCompileTask`Required
```typescript
public readonly postCompileTask: Task;
```
- *Type:* projen.Task
---
##### `preCompileTask`Required
```typescript
public readonly preCompileTask: Task;
```
- *Type:* projen.Task
---
##### `projectBuild`Required
```typescript
public readonly projectBuild: ProjectBuild;
```
- *Type:* projen.ProjectBuild
Manages the build process of the project.
---
##### `projenCommand`Required
```typescript
public readonly projenCommand: string;
```
- *Type:* string
The command to use in order to run the projen CLI.
---
##### `root`Required
```typescript
public readonly root: Project;
```
- *Type:* projen.Project
The root project.
---
##### `subprojects`Required
```typescript
public readonly subprojects: Project[];
```
- *Type:* projen.Project[]
Returns all the subprojects within this project.
---
##### `tasks`Required
```typescript
public readonly tasks: Tasks;
```
- *Type:* projen.Tasks
Project tasks.
---
##### `testTask`Required
```typescript
public readonly testTask: Task;
```
- *Type:* projen.Task
---
##### `defaultTask`Optional
```typescript
public readonly defaultTask: Task;
```
- *Type:* projen.Task
This is the "default" task, the one that executes "projen".
Undefined if
the project is being ejected.
---
##### ~~`initProject`~~Optional
- *Deprecated:* use the `initProject` argument passed to `Component.projectCreation()` instead.
```typescript
public readonly initProject: InitProject;
```
- *Type:* projen.InitProject
The options used when this project is bootstrapped via `projen new`.
It
includes the original set of options passed to the CLI and also the JSII
FQN of the project type.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
A parent project.
If undefined, this is the root project.
---
##### `autoApprove`Optional
```typescript
public readonly autoApprove: AutoApprove;
```
- *Type:* projen.github.AutoApprove
Auto approve set up for this project.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: DevContainer;
```
- *Type:* projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be `undefined` if devContainer boolean is false
---
##### `github`Optional
```typescript
public readonly github: GitHub;
```
- *Type:* projen.github.GitHub
Access all github components.
This will be `undefined` for subprojects.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: Gitpod;
```
- *Type:* projen.Gitpod
Access for Gitpod.
This will be `undefined` if gitpod boolean is false
---
##### `vscode`Optional
```typescript
public readonly vscode: VsCode;
```
- *Type:* projen.vscode.VsCode
Access all VSCode components.
This will be `undefined` for subprojects.
---
##### `artifactsDirectory`Required
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
The build output directory.
An npm tarball will be created under the `js`
subdirectory. For example, if this is set to `dist` (the default), the npm
tarball will be placed under `dist/js/boom-boom-1.2.3.tg`.
---
##### `artifactsJavascriptDirectory`Required
```typescript
public readonly artifactsJavascriptDirectory: string;
```
- *Type:* string
The location of the npm tarball after build (`${artifactsDirectory}/js`).
---
##### `bundler`Required
```typescript
public readonly bundler: Bundler;
```
- *Type:* projen.javascript.Bundler
---
##### `npmrc`Required
```typescript
public readonly npmrc: NpmConfig;
```
- *Type:* projen.javascript.NpmConfig
The .npmrc file.
---
##### `package`Required
```typescript
public readonly package: NodePackage;
```
- *Type:* projen.javascript.NodePackage
API for managing the node package.
---
##### `runScriptCommand`Required
```typescript
public readonly runScriptCommand: string;
```
- *Type:* string
The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: AutoMerge;
```
- *Type:* projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
---
##### `biome`Optional
```typescript
public readonly biome: Biome;
```
- *Type:* projen.javascript.Biome
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: BuildWorkflow;
```
- *Type:* projen.build.BuildWorkflow
The PR build GitHub workflow.
`undefined` if `buildWorkflow` is disabled.
---
##### `buildWorkflowJobId`Optional
```typescript
public readonly buildWorkflowJobId: string;
```
- *Type:* string
The job ID of the build workflow.
---
##### `jest`Optional
```typescript
public readonly jest: Jest;
```
- *Type:* projen.javascript.Jest
The Jest configuration (if enabled).
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
Maximum node version supported by this package.
The value indicates the package is incompatible with newer versions.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
The minimum node version required by this package to function.
This value indicates the package is incompatible with older versions.
---
##### `npmignore`Optional
```typescript
public readonly npmignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
The .npmignore file.
---
##### `prettier`Optional
```typescript
public readonly prettier: Prettier;
```
- *Type:* projen.javascript.Prettier
---
##### `release`Optional
```typescript
public readonly release: Release;
```
- *Type:* projen.release.Release
Release management.
---
##### `upgradeWorkflow`Optional
```typescript
public readonly upgradeWorkflow: UpgradeDependencies;
```
- *Type:* projen.javascript.UpgradeDependencies
The upgrade workflow.
---
##### `docsDirectory`Required
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
---
##### `libdir`Required
```typescript
public readonly libdir: string;
```
- *Type:* string
The directory in which compiled .js files reside.
---
##### `runner`Required
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
The TypeScript runner used for executing TypeScript files.
---
##### `srcdir`Required
```typescript
public readonly srcdir: string;
```
- *Type:* string
The directory in which the .ts sources reside.
---
##### `testdir`Required
```typescript
public readonly testdir: string;
```
- *Type:* string
The directory in which tests reside.
---
##### `tsconfigDev`Required
```typescript
public readonly tsconfigDev: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
---
##### `watchTask`Required
```typescript
public readonly watchTask: Task;
```
- *Type:* projen.Task
The "watch" task.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
---
##### `eslint`Optional
```typescript
public readonly eslint: Eslint;
```
- *Type:* projen.javascript.Eslint
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `tsconfigEslint`Optional
```typescript
public readonly tsconfigEslint: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `appEntrypoint`Required
```typescript
public readonly appEntrypoint: string;
```
- *Type:* string
The CDK app entrypoint.
---
##### `cdkConfig`Required
```typescript
public readonly cdkConfig: CdkConfig;
```
- *Type:* projen.awscdk.CdkConfig
cdk.json configuration.
---
##### `cdkDeps`Required
```typescript
public readonly cdkDeps: AwsCdkDeps;
```
- *Type:* projen.awscdk.AwsCdkDeps
---
##### `cdkTasks`Required
```typescript
public readonly cdkTasks: CdkTasks;
```
- *Type:* projen.awscdk.CdkTasks
Common CDK tasks.
---
##### `cdkVersion`Required
```typescript
public readonly cdkVersion: string;
```
- *Type:* string
The CDK version this app is using.
---
#### Constants
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). |
| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* |
---
##### `DEFAULT_TASK`Required
```typescript
public readonly DEFAULT_TASK: string;
```
- *Type:* string
The name of the default task (the task executed when `projen` is run without arguments).
Normally
this task should synthesize the project files.
---
##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required
```typescript
public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string;
```
- *Type:* string
---
### TaimosCdkConstructLibrary
TypeScript library.
#### Initializers
```typescript
import { TaimosCdkConstructLibrary } from '@taimos/projen'
new TaimosCdkConstructLibrary(options: TaimosCdkConstructLibraryOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| options | TaimosCdkConstructLibraryOptions | *No description.* |
---
##### `options`Required
- *Type:* TaimosCdkConstructLibraryOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| addExcludeFromCleanup | Exclude the matching files from pre-synth cleanup. |
| addGitIgnore | Adds a .gitignore pattern. |
| addPackageIgnore | Adds patterns to be ignored by npm. |
| addTask | Adds a new task to this project. |
| annotateGenerated | Marks the provided file(s) as being generated. |
| postSynthesize | Called after all components are synthesized. |
| preSynthesize | Called before all components are synthesized. |
| removeTask | Removes a task from a project. |
| runTaskCommand | Returns the shell command to execute in order to run a task. |
| synth | Synthesize all project files into `outdir`. |
| tryFindFile | Finds a file at the specified relative path within this project and all its subprojects. |
| tryFindObjectFile | Finds an object file (like JsonFile, YamlFile, etc.) by name. |
| tryRemoveFile | Finds a file at the specified relative path within this project and removes it. |
| addBins | *No description.* |
| addBundledDeps | Defines bundled dependencies. |
| addDeps | Defines normal dependencies. |
| addDevDeps | Defines development/test dependencies. |
| addFields | Directly set fields in `package.json`. |
| addKeywords | Adds keywords to package.json (deduplicated). |
| addPeerDeps | Defines peer dependencies. |
| addScripts | Replaces the contents of multiple npm package.json scripts. |
| removeScript | Removes the npm script (always successful). |
| renderWorkflowSetup | Returns the set of workflow steps which should be executed to bootstrap a workflow. |
| setScript | Replaces the contents of an npm package.json script. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `addExcludeFromCleanup`
```typescript
public addExcludeFromCleanup(globs: ...string[]): void
```
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some
source files include the projen marker and we don't want them to be erased during synth.
###### `globs`Required
- *Type:* ...string[]
The glob patterns to match.
---
##### `addGitIgnore`
```typescript
public addGitIgnore(pattern: string): void
```
Adds a .gitignore pattern.
###### `pattern`Required
- *Type:* string
The glob pattern to ignore.
---
##### `addPackageIgnore`
```typescript
public addPackageIgnore(pattern: string): void
```
Adds patterns to be ignored by npm.
###### `pattern`Required
- *Type:* string
The pattern to ignore.
---
##### `addTask`
```typescript
public addTask(name: string, props?: TaskOptions): Task
```
Adds a new task to this project.
This will fail if the project already has
a task with this name.
###### `name`Required
- *Type:* string
The task name to add.
---
###### `props`Optional
- *Type:* projen.TaskOptions
Task properties.
---
##### `annotateGenerated`
```typescript
public annotateGenerated(glob: string): void
```
Marks the provided file(s) as being generated.
This is achieved using the
github-linguist attributes. Generated files do not count against the
repository statistics and language breakdown.
> [https://github.com/github/linguist/blob/master/docs/overrides.md](https://github.com/github/linguist/blob/master/docs/overrides.md)
###### `glob`Required
- *Type:* string
the glob pattern to match (could be a file path).
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after all components are synthesized.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before all components are synthesized.
##### `removeTask`
```typescript
public removeTask(name: string): Task
```
Removes a task from a project.
###### `name`Required
- *Type:* string
The name of the task to remove.
---
##### `runTaskCommand`
```typescript
public runTaskCommand(task: Task): string
```
Returns the shell command to execute in order to run a task.
This will
typically be `pnpm projen TASK`.
###### `task`Required
- *Type:* projen.Task
The task for which the command is required.
---
##### `synth`
```typescript
public synth(): void
```
Synthesize all project files into `outdir`.
1. Call "this.preSynthesize()"
2. Delete all generated files
3. Synthesize all subprojects
4. Synthesize all components of this project
5. Call "projectCreation()" for all components, only if the project is being created for the first time
6. Call "postSynthesize()" for all components of this project
7. Call "this.postSynthesize()"
8. Call "postProjectCreation()" for all components, only if the project is being created for the first time
##### `tryFindFile`
```typescript
public tryFindFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and all its subprojects.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be resolved
from the root of _this_ project.
---
##### `tryFindObjectFile`
```typescript
public tryFindObjectFile(filePath: string): ObjectFile
```
Finds an object file (like JsonFile, YamlFile, etc.) by name.
###### `filePath`Required
- *Type:* string
The file path.
---
##### `tryRemoveFile`
```typescript
public tryRemoveFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and removes it.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be
resolved from the root of _this_ project.
---
##### `addBins`
```typescript
public addBins(bins: {[ key: string ]: string}): void
```
###### `bins`Required
- *Type:* {[ key: string ]: string}
---
##### `addBundledDeps`
```typescript
public addBundledDeps(deps: ...string[]): void
```
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
`bundledDependencies` section of your `package.json`.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDeps`
```typescript
public addDeps(deps: ...string[]): void
```
Defines normal dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDevDeps`
```typescript
public addDevDeps(deps: ...string[]): void
```
Defines development/test dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addFields`
```typescript
public addFields(fields: {[ key: string ]: any}): void
```
Directly set fields in `package.json`.
###### `fields`Required
- *Type:* {[ key: string ]: any}
The fields to set.
---
##### `addKeywords`
```typescript
public addKeywords(keywords: ...string[]): void
```
Adds keywords to package.json (deduplicated).
###### `keywords`Required
- *Type:* ...string[]
The keywords to add.
---
##### `addPeerDeps`
```typescript
public addPeerDeps(deps: ...string[]): void
```
Defines peer dependencies.
When adding peer dependencies, a devDependency will also be added on the
pinned version of the declared peer. This will ensure that you are testing
your code against the minimum version required from your consumers.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addScripts`
```typescript
public addScripts(scripts: {[ key: string ]: string}): void
```
Replaces the contents of multiple npm package.json scripts.
###### `scripts`Required
- *Type:* {[ key: string ]: string}
The scripts to set.
---
##### `removeScript`
```typescript
public removeScript(name: string): void
```
Removes the npm script (always successful).
###### `name`Required
- *Type:* string
The name of the script.
---
##### `renderWorkflowSetup`
```typescript
public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[]
```
Returns the set of workflow steps which should be executed to bootstrap a workflow.
###### `options`Optional
- *Type:* projen.javascript.RenderWorkflowSetupOptions
Options.
---
##### `setScript`
```typescript
public setScript(name: string, command: string): void
```
Replaces the contents of an npm package.json script.
###### `name`Required
- *Type:* string
The script name.
---
###### `command`Required
- *Type:* string
The command to execute.
---
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isProject | Test whether the given construct is a project. |
| of | Find the closest ancestor project for given construct. |
---
##### `isConstruct`
```typescript
import { TaimosCdkConstructLibrary } from '@taimos/projen'
TaimosCdkConstructLibrary.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isProject`
```typescript
import { TaimosCdkConstructLibrary } from '@taimos/projen'
TaimosCdkConstructLibrary.isProject(x: any)
```
Test whether the given construct is a project.
###### `x`Required
- *Type:* any
---
##### `of`
```typescript
import { TaimosCdkConstructLibrary } from '@taimos/projen'
TaimosCdkConstructLibrary.of(construct: IConstruct)
```
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
###### `construct`Required
- *Type:* constructs.IConstruct
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| buildTask | projen.Task | *No description.* |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| compileTask | projen.Task | *No description.* |
| components | projen.Component[] | Returns all the components within this project. |
| deps | projen.Dependencies | Project dependencies. |
| ejected | boolean | Whether or not the project is being ejected. |
| files | projen.FileBase[] | All files in this project. |
| gitattributes | projen.GitAttributesFile | The .gitattributes file for this repository. |
| gitignore | projen.IgnoreFile | .gitignore. |
| logger | projen.Logger | Logging utilities. |
| name | string | Project name. |
| outdir | string | Absolute output directory of this project. |
| packageTask | projen.Task | *No description.* |
| postCompileTask | projen.Task | *No description.* |
| preCompileTask | projen.Task | *No description.* |
| projectBuild | projen.ProjectBuild | Manages the build process of the project. |
| projenCommand | string | The command to use in order to run the projen CLI. |
| root | projen.Project | The root project. |
| subprojects | projen.Project[] | Returns all the subprojects within this project. |
| tasks | projen.Tasks | Project tasks. |
| testTask | projen.Task | *No description.* |
| defaultTask | projen.Task | This is the "default" task, the one that executes "projen". |
| initProject | projen.InitProject | The options used when this project is bootstrapped via `projen new`. |
| parent | projen.Project | A parent project. |
| autoApprove | projen.github.AutoApprove | Auto approve set up for this project. |
| devContainer | projen.vscode.DevContainer | Access for .devcontainer.json (used for GitHub Codespaces). |
| github | projen.github.GitHub | Access all github components. |
| gitpod | projen.Gitpod | Access for Gitpod. |
| vscode | projen.vscode.VsCode | Access all VSCode components. |
| artifactsDirectory | string | The build output directory. |
| artifactsJavascriptDirectory | string | The location of the npm tarball after build (`${artifactsDirectory}/js`). |
| bundler | projen.javascript.Bundler | *No description.* |
| npmrc | projen.javascript.NpmConfig | The .npmrc file. |
| package | projen.javascript.NodePackage | API for managing the node package. |
| runScriptCommand | string | The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). |
| autoMerge | projen.github.AutoMerge | Component that sets up mergify for merging approved pull requests. |
| biome | projen.javascript.Biome | *No description.* |
| buildWorkflow | projen.build.BuildWorkflow | The PR build GitHub workflow. |
| buildWorkflowJobId | string | The job ID of the build workflow. |
| jest | projen.javascript.Jest | The Jest configuration (if enabled). |
| maxNodeVersion | string | Maximum node version supported by this package. |
| minNodeVersion | string | The minimum node version required by this package to function. |
| npmignore | projen.IgnoreFile | The .npmignore file. |
| prettier | projen.javascript.Prettier | *No description.* |
| release | projen.release.Release | Release management. |
| upgradeWorkflow | projen.javascript.UpgradeDependencies | The upgrade workflow. |
| docsDirectory | string | *No description.* |
| libdir | string | The directory in which compiled .js files reside. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner used for executing TypeScript files. |
| srcdir | string | The directory in which the .ts sources reside. |
| testdir | string | The directory in which tests reside. |
| tsconfigDev | projen.javascript.TypescriptConfig | A typescript configuration file which covers all files (sources, tests, projen). |
| watchTask | projen.Task | The "watch" task. |
| docgen | boolean | *No description.* |
| eslint | projen.javascript.Eslint | *No description.* |
| tsconfig | projen.javascript.TypescriptConfig | *No description.* |
| tsconfigEslint | projen.javascript.TypescriptConfig | *No description.* |
| cdkDeps | projen.awscdk.AwsCdkDeps | *No description.* |
| cdkVersion | string | The target CDK version for this library. |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `buildTask`Required
```typescript
public readonly buildTask: Task;
```
- *Type:* projen.Task
---
##### `commitGenerated`Required
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
Whether to commit the managed files by default.
---
##### `compileTask`Required
```typescript
public readonly compileTask: Task;
```
- *Type:* projen.Task
---
##### `components`Required
```typescript
public readonly components: Component[];
```
- *Type:* projen.Component[]
Returns all the components within this project.
---
##### `deps`Required
```typescript
public readonly deps: Dependencies;
```
- *Type:* projen.Dependencies
Project dependencies.
---
##### `ejected`Required
```typescript
public readonly ejected: boolean;
```
- *Type:* boolean
Whether or not the project is being ejected.
---
##### `files`Required
```typescript
public readonly files: FileBase[];
```
- *Type:* projen.FileBase[]
All files in this project.
---
##### `gitattributes`Required
```typescript
public readonly gitattributes: GitAttributesFile;
```
- *Type:* projen.GitAttributesFile
The .gitattributes file for this repository.
---
##### `gitignore`Required
```typescript
public readonly gitignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
.gitignore.
---
##### `logger`Required
```typescript
public readonly logger: Logger;
```
- *Type:* projen.Logger
Logging utilities.
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
Project name.
---
##### `outdir`Required
```typescript
public readonly outdir: string;
```
- *Type:* string
Absolute output directory of this project.
---
##### `packageTask`Required
```typescript
public readonly packageTask: Task;
```
- *Type:* projen.Task
---
##### `postCompileTask`Required
```typescript
public readonly postCompileTask: Task;
```
- *Type:* projen.Task
---
##### `preCompileTask`Required
```typescript
public readonly preCompileTask: Task;
```
- *Type:* projen.Task
---
##### `projectBuild`Required
```typescript
public readonly projectBuild: ProjectBuild;
```
- *Type:* projen.ProjectBuild
Manages the build process of the project.
---
##### `projenCommand`Required
```typescript
public readonly projenCommand: string;
```
- *Type:* string
The command to use in order to run the projen CLI.
---
##### `root`Required
```typescript
public readonly root: Project;
```
- *Type:* projen.Project
The root project.
---
##### `subprojects`Required
```typescript
public readonly subprojects: Project[];
```
- *Type:* projen.Project[]
Returns all the subprojects within this project.
---
##### `tasks`Required
```typescript
public readonly tasks: Tasks;
```
- *Type:* projen.Tasks
Project tasks.
---
##### `testTask`Required
```typescript
public readonly testTask: Task;
```
- *Type:* projen.Task
---
##### `defaultTask`Optional
```typescript
public readonly defaultTask: Task;
```
- *Type:* projen.Task
This is the "default" task, the one that executes "projen".
Undefined if
the project is being ejected.
---
##### ~~`initProject`~~Optional
- *Deprecated:* use the `initProject` argument passed to `Component.projectCreation()` instead.
```typescript
public readonly initProject: InitProject;
```
- *Type:* projen.InitProject
The options used when this project is bootstrapped via `projen new`.
It
includes the original set of options passed to the CLI and also the JSII
FQN of the project type.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
A parent project.
If undefined, this is the root project.
---
##### `autoApprove`Optional
```typescript
public readonly autoApprove: AutoApprove;
```
- *Type:* projen.github.AutoApprove
Auto approve set up for this project.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: DevContainer;
```
- *Type:* projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be `undefined` if devContainer boolean is false
---
##### `github`Optional
```typescript
public readonly github: GitHub;
```
- *Type:* projen.github.GitHub
Access all github components.
This will be `undefined` for subprojects.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: Gitpod;
```
- *Type:* projen.Gitpod
Access for Gitpod.
This will be `undefined` if gitpod boolean is false
---
##### `vscode`Optional
```typescript
public readonly vscode: VsCode;
```
- *Type:* projen.vscode.VsCode
Access all VSCode components.
This will be `undefined` for subprojects.
---
##### `artifactsDirectory`Required
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
The build output directory.
An npm tarball will be created under the `js`
subdirectory. For example, if this is set to `dist` (the default), the npm
tarball will be placed under `dist/js/boom-boom-1.2.3.tg`.
---
##### `artifactsJavascriptDirectory`Required
```typescript
public readonly artifactsJavascriptDirectory: string;
```
- *Type:* string
The location of the npm tarball after build (`${artifactsDirectory}/js`).
---
##### `bundler`Required
```typescript
public readonly bundler: Bundler;
```
- *Type:* projen.javascript.Bundler
---
##### `npmrc`Required
```typescript
public readonly npmrc: NpmConfig;
```
- *Type:* projen.javascript.NpmConfig
The .npmrc file.
---
##### `package`Required
```typescript
public readonly package: NodePackage;
```
- *Type:* projen.javascript.NodePackage
API for managing the node package.
---
##### `runScriptCommand`Required
```typescript
public readonly runScriptCommand: string;
```
- *Type:* string
The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: AutoMerge;
```
- *Type:* projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
---
##### `biome`Optional
```typescript
public readonly biome: Biome;
```
- *Type:* projen.javascript.Biome
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: BuildWorkflow;
```
- *Type:* projen.build.BuildWorkflow
The PR build GitHub workflow.
`undefined` if `buildWorkflow` is disabled.
---
##### `buildWorkflowJobId`Optional
```typescript
public readonly buildWorkflowJobId: string;
```
- *Type:* string
The job ID of the build workflow.
---
##### `jest`Optional
```typescript
public readonly jest: Jest;
```
- *Type:* projen.javascript.Jest
The Jest configuration (if enabled).
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
Maximum node version supported by this package.
The value indicates the package is incompatible with newer versions.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
The minimum node version required by this package to function.
This value indicates the package is incompatible with older versions.
---
##### `npmignore`Optional
```typescript
public readonly npmignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
The .npmignore file.
---
##### `prettier`Optional
```typescript
public readonly prettier: Prettier;
```
- *Type:* projen.javascript.Prettier
---
##### `release`Optional
```typescript
public readonly release: Release;
```
- *Type:* projen.release.Release
Release management.
---
##### `upgradeWorkflow`Optional
```typescript
public readonly upgradeWorkflow: UpgradeDependencies;
```
- *Type:* projen.javascript.UpgradeDependencies
The upgrade workflow.
---
##### `docsDirectory`Required
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
---
##### `libdir`Required
```typescript
public readonly libdir: string;
```
- *Type:* string
The directory in which compiled .js files reside.
---
##### `runner`Required
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
The TypeScript runner used for executing TypeScript files.
---
##### `srcdir`Required
```typescript
public readonly srcdir: string;
```
- *Type:* string
The directory in which the .ts sources reside.
---
##### `testdir`Required
```typescript
public readonly testdir: string;
```
- *Type:* string
The directory in which tests reside.
---
##### `tsconfigDev`Required
```typescript
public readonly tsconfigDev: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
---
##### `watchTask`Required
```typescript
public readonly watchTask: Task;
```
- *Type:* projen.Task
The "watch" task.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
---
##### `eslint`Optional
```typescript
public readonly eslint: Eslint;
```
- *Type:* projen.javascript.Eslint
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `tsconfigEslint`Optional
```typescript
public readonly tsconfigEslint: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `cdkDeps`Required
```typescript
public readonly cdkDeps: AwsCdkDeps;
```
- *Type:* projen.awscdk.AwsCdkDeps
---
##### `cdkVersion`Required
```typescript
public readonly cdkVersion: string;
```
- *Type:* string
The target CDK version for this library.
---
#### Constants
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). |
| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* |
---
##### `DEFAULT_TASK`Required
```typescript
public readonly DEFAULT_TASK: string;
```
- *Type:* string
The name of the default task (the task executed when `projen` is run without arguments).
Normally
this task should synthesize the project files.
---
##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required
```typescript
public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string;
```
- *Type:* string
---
### TaimosPrivateTypescriptLibrary
Private TypeScript library.
#### Initializers
```typescript
import { TaimosPrivateTypescriptLibrary } from '@taimos/projen'
new TaimosPrivateTypescriptLibrary(options: TaimosPrivateTypescriptLibraryOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| options | TaimosPrivateTypescriptLibraryOptions | *No description.* |
---
##### `options`Required
- *Type:* TaimosPrivateTypescriptLibraryOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| addExcludeFromCleanup | Exclude the matching files from pre-synth cleanup. |
| addGitIgnore | Adds a .gitignore pattern. |
| addPackageIgnore | Adds patterns to be ignored by npm. |
| addTask | Adds a new task to this project. |
| annotateGenerated | Marks the provided file(s) as being generated. |
| postSynthesize | Called after all components are synthesized. |
| preSynthesize | Called before all components are synthesized. |
| removeTask | Removes a task from a project. |
| runTaskCommand | Returns the shell command to execute in order to run a task. |
| synth | Synthesize all project files into `outdir`. |
| tryFindFile | Finds a file at the specified relative path within this project and all its subprojects. |
| tryFindObjectFile | Finds an object file (like JsonFile, YamlFile, etc.) by name. |
| tryRemoveFile | Finds a file at the specified relative path within this project and removes it. |
| addBins | *No description.* |
| addBundledDeps | Defines bundled dependencies. |
| addDeps | Defines normal dependencies. |
| addDevDeps | Defines development/test dependencies. |
| addFields | Directly set fields in `package.json`. |
| addKeywords | Adds keywords to package.json (deduplicated). |
| addPeerDeps | Defines peer dependencies. |
| addScripts | Replaces the contents of multiple npm package.json scripts. |
| removeScript | Removes the npm script (always successful). |
| renderWorkflowSetup | Returns the set of workflow steps which should be executed to bootstrap a workflow. |
| setScript | Replaces the contents of an npm package.json script. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `addExcludeFromCleanup`
```typescript
public addExcludeFromCleanup(globs: ...string[]): void
```
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some
source files include the projen marker and we don't want them to be erased during synth.
###### `globs`Required
- *Type:* ...string[]
The glob patterns to match.
---
##### `addGitIgnore`
```typescript
public addGitIgnore(pattern: string): void
```
Adds a .gitignore pattern.
###### `pattern`Required
- *Type:* string
The glob pattern to ignore.
---
##### `addPackageIgnore`
```typescript
public addPackageIgnore(pattern: string): void
```
Adds patterns to be ignored by npm.
###### `pattern`Required
- *Type:* string
The pattern to ignore.
---
##### `addTask`
```typescript
public addTask(name: string, props?: TaskOptions): Task
```
Adds a new task to this project.
This will fail if the project already has
a task with this name.
###### `name`Required
- *Type:* string
The task name to add.
---
###### `props`Optional
- *Type:* projen.TaskOptions
Task properties.
---
##### `annotateGenerated`
```typescript
public annotateGenerated(glob: string): void
```
Marks the provided file(s) as being generated.
This is achieved using the
github-linguist attributes. Generated files do not count against the
repository statistics and language breakdown.
> [https://github.com/github/linguist/blob/master/docs/overrides.md](https://github.com/github/linguist/blob/master/docs/overrides.md)
###### `glob`Required
- *Type:* string
the glob pattern to match (could be a file path).
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after all components are synthesized.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before all components are synthesized.
##### `removeTask`
```typescript
public removeTask(name: string): Task
```
Removes a task from a project.
###### `name`Required
- *Type:* string
The name of the task to remove.
---
##### `runTaskCommand`
```typescript
public runTaskCommand(task: Task): string
```
Returns the shell command to execute in order to run a task.
This will
typically be `pnpm projen TASK`.
###### `task`Required
- *Type:* projen.Task
The task for which the command is required.
---
##### `synth`
```typescript
public synth(): void
```
Synthesize all project files into `outdir`.
1. Call "this.preSynthesize()"
2. Delete all generated files
3. Synthesize all subprojects
4. Synthesize all components of this project
5. Call "projectCreation()" for all components, only if the project is being created for the first time
6. Call "postSynthesize()" for all components of this project
7. Call "this.postSynthesize()"
8. Call "postProjectCreation()" for all components, only if the project is being created for the first time
##### `tryFindFile`
```typescript
public tryFindFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and all its subprojects.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be resolved
from the root of _this_ project.
---
##### `tryFindObjectFile`
```typescript
public tryFindObjectFile(filePath: string): ObjectFile
```
Finds an object file (like JsonFile, YamlFile, etc.) by name.
###### `filePath`Required
- *Type:* string
The file path.
---
##### `tryRemoveFile`
```typescript
public tryRemoveFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and removes it.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be
resolved from the root of _this_ project.
---
##### `addBins`
```typescript
public addBins(bins: {[ key: string ]: string}): void
```
###### `bins`Required
- *Type:* {[ key: string ]: string}
---
##### `addBundledDeps`
```typescript
public addBundledDeps(deps: ...string[]): void
```
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
`bundledDependencies` section of your `package.json`.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDeps`
```typescript
public addDeps(deps: ...string[]): void
```
Defines normal dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDevDeps`
```typescript
public addDevDeps(deps: ...string[]): void
```
Defines development/test dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addFields`
```typescript
public addFields(fields: {[ key: string ]: any}): void
```
Directly set fields in `package.json`.
###### `fields`Required
- *Type:* {[ key: string ]: any}
The fields to set.
---
##### `addKeywords`
```typescript
public addKeywords(keywords: ...string[]): void
```
Adds keywords to package.json (deduplicated).
###### `keywords`Required
- *Type:* ...string[]
The keywords to add.
---
##### `addPeerDeps`
```typescript
public addPeerDeps(deps: ...string[]): void
```
Defines peer dependencies.
When adding peer dependencies, a devDependency will also be added on the
pinned version of the declared peer. This will ensure that you are testing
your code against the minimum version required from your consumers.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addScripts`
```typescript
public addScripts(scripts: {[ key: string ]: string}): void
```
Replaces the contents of multiple npm package.json scripts.
###### `scripts`Required
- *Type:* {[ key: string ]: string}
The scripts to set.
---
##### `removeScript`
```typescript
public removeScript(name: string): void
```
Removes the npm script (always successful).
###### `name`Required
- *Type:* string
The name of the script.
---
##### `renderWorkflowSetup`
```typescript
public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[]
```
Returns the set of workflow steps which should be executed to bootstrap a workflow.
###### `options`Optional
- *Type:* projen.javascript.RenderWorkflowSetupOptions
Options.
---
##### `setScript`
```typescript
public setScript(name: string, command: string): void
```
Replaces the contents of an npm package.json script.
###### `name`Required
- *Type:* string
The script name.
---
###### `command`Required
- *Type:* string
The command to execute.
---
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isProject | Test whether the given construct is a project. |
| of | Find the closest ancestor project for given construct. |
---
##### `isConstruct`
```typescript
import { TaimosPrivateTypescriptLibrary } from '@taimos/projen'
TaimosPrivateTypescriptLibrary.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isProject`
```typescript
import { TaimosPrivateTypescriptLibrary } from '@taimos/projen'
TaimosPrivateTypescriptLibrary.isProject(x: any)
```
Test whether the given construct is a project.
###### `x`Required
- *Type:* any
---
##### `of`
```typescript
import { TaimosPrivateTypescriptLibrary } from '@taimos/projen'
TaimosPrivateTypescriptLibrary.of(construct: IConstruct)
```
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
###### `construct`Required
- *Type:* constructs.IConstruct
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| buildTask | projen.Task | *No description.* |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| compileTask | projen.Task | *No description.* |
| components | projen.Component[] | Returns all the components within this project. |
| deps | projen.Dependencies | Project dependencies. |
| ejected | boolean | Whether or not the project is being ejected. |
| files | projen.FileBase[] | All files in this project. |
| gitattributes | projen.GitAttributesFile | The .gitattributes file for this repository. |
| gitignore | projen.IgnoreFile | .gitignore. |
| logger | projen.Logger | Logging utilities. |
| name | string | Project name. |
| outdir | string | Absolute output directory of this project. |
| packageTask | projen.Task | *No description.* |
| postCompileTask | projen.Task | *No description.* |
| preCompileTask | projen.Task | *No description.* |
| projectBuild | projen.ProjectBuild | Manages the build process of the project. |
| projenCommand | string | The command to use in order to run the projen CLI. |
| root | projen.Project | The root project. |
| subprojects | projen.Project[] | Returns all the subprojects within this project. |
| tasks | projen.Tasks | Project tasks. |
| testTask | projen.Task | *No description.* |
| defaultTask | projen.Task | This is the "default" task, the one that executes "projen". |
| initProject | projen.InitProject | The options used when this project is bootstrapped via `projen new`. |
| parent | projen.Project | A parent project. |
| autoApprove | projen.github.AutoApprove | Auto approve set up for this project. |
| devContainer | projen.vscode.DevContainer | Access for .devcontainer.json (used for GitHub Codespaces). |
| github | projen.github.GitHub | Access all github components. |
| gitpod | projen.Gitpod | Access for Gitpod. |
| vscode | projen.vscode.VsCode | Access all VSCode components. |
| artifactsDirectory | string | The build output directory. |
| artifactsJavascriptDirectory | string | The location of the npm tarball after build (`${artifactsDirectory}/js`). |
| bundler | projen.javascript.Bundler | *No description.* |
| npmrc | projen.javascript.NpmConfig | The .npmrc file. |
| package | projen.javascript.NodePackage | API for managing the node package. |
| runScriptCommand | string | The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). |
| autoMerge | projen.github.AutoMerge | Component that sets up mergify for merging approved pull requests. |
| biome | projen.javascript.Biome | *No description.* |
| buildWorkflow | projen.build.BuildWorkflow | The PR build GitHub workflow. |
| buildWorkflowJobId | string | The job ID of the build workflow. |
| jest | projen.javascript.Jest | The Jest configuration (if enabled). |
| maxNodeVersion | string | Maximum node version supported by this package. |
| minNodeVersion | string | The minimum node version required by this package to function. |
| npmignore | projen.IgnoreFile | The .npmignore file. |
| prettier | projen.javascript.Prettier | *No description.* |
| release | projen.release.Release | Release management. |
| upgradeWorkflow | projen.javascript.UpgradeDependencies | The upgrade workflow. |
| docsDirectory | string | *No description.* |
| libdir | string | The directory in which compiled .js files reside. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner used for executing TypeScript files. |
| srcdir | string | The directory in which the .ts sources reside. |
| testdir | string | The directory in which tests reside. |
| tsconfigDev | projen.javascript.TypescriptConfig | A typescript configuration file which covers all files (sources, tests, projen). |
| watchTask | projen.Task | The "watch" task. |
| docgen | boolean | *No description.* |
| eslint | projen.javascript.Eslint | *No description.* |
| tsconfig | projen.javascript.TypescriptConfig | *No description.* |
| tsconfigEslint | projen.javascript.TypescriptConfig | *No description.* |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `buildTask`Required
```typescript
public readonly buildTask: Task;
```
- *Type:* projen.Task
---
##### `commitGenerated`Required
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
Whether to commit the managed files by default.
---
##### `compileTask`Required
```typescript
public readonly compileTask: Task;
```
- *Type:* projen.Task
---
##### `components`Required
```typescript
public readonly components: Component[];
```
- *Type:* projen.Component[]
Returns all the components within this project.
---
##### `deps`Required
```typescript
public readonly deps: Dependencies;
```
- *Type:* projen.Dependencies
Project dependencies.
---
##### `ejected`Required
```typescript
public readonly ejected: boolean;
```
- *Type:* boolean
Whether or not the project is being ejected.
---
##### `files`Required
```typescript
public readonly files: FileBase[];
```
- *Type:* projen.FileBase[]
All files in this project.
---
##### `gitattributes`Required
```typescript
public readonly gitattributes: GitAttributesFile;
```
- *Type:* projen.GitAttributesFile
The .gitattributes file for this repository.
---
##### `gitignore`Required
```typescript
public readonly gitignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
.gitignore.
---
##### `logger`Required
```typescript
public readonly logger: Logger;
```
- *Type:* projen.Logger
Logging utilities.
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
Project name.
---
##### `outdir`Required
```typescript
public readonly outdir: string;
```
- *Type:* string
Absolute output directory of this project.
---
##### `packageTask`Required
```typescript
public readonly packageTask: Task;
```
- *Type:* projen.Task
---
##### `postCompileTask`Required
```typescript
public readonly postCompileTask: Task;
```
- *Type:* projen.Task
---
##### `preCompileTask`Required
```typescript
public readonly preCompileTask: Task;
```
- *Type:* projen.Task
---
##### `projectBuild`Required
```typescript
public readonly projectBuild: ProjectBuild;
```
- *Type:* projen.ProjectBuild
Manages the build process of the project.
---
##### `projenCommand`Required
```typescript
public readonly projenCommand: string;
```
- *Type:* string
The command to use in order to run the projen CLI.
---
##### `root`Required
```typescript
public readonly root: Project;
```
- *Type:* projen.Project
The root project.
---
##### `subprojects`Required
```typescript
public readonly subprojects: Project[];
```
- *Type:* projen.Project[]
Returns all the subprojects within this project.
---
##### `tasks`Required
```typescript
public readonly tasks: Tasks;
```
- *Type:* projen.Tasks
Project tasks.
---
##### `testTask`Required
```typescript
public readonly testTask: Task;
```
- *Type:* projen.Task
---
##### `defaultTask`Optional
```typescript
public readonly defaultTask: Task;
```
- *Type:* projen.Task
This is the "default" task, the one that executes "projen".
Undefined if
the project is being ejected.
---
##### ~~`initProject`~~Optional
- *Deprecated:* use the `initProject` argument passed to `Component.projectCreation()` instead.
```typescript
public readonly initProject: InitProject;
```
- *Type:* projen.InitProject
The options used when this project is bootstrapped via `projen new`.
It
includes the original set of options passed to the CLI and also the JSII
FQN of the project type.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
A parent project.
If undefined, this is the root project.
---
##### `autoApprove`Optional
```typescript
public readonly autoApprove: AutoApprove;
```
- *Type:* projen.github.AutoApprove
Auto approve set up for this project.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: DevContainer;
```
- *Type:* projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be `undefined` if devContainer boolean is false
---
##### `github`Optional
```typescript
public readonly github: GitHub;
```
- *Type:* projen.github.GitHub
Access all github components.
This will be `undefined` for subprojects.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: Gitpod;
```
- *Type:* projen.Gitpod
Access for Gitpod.
This will be `undefined` if gitpod boolean is false
---
##### `vscode`Optional
```typescript
public readonly vscode: VsCode;
```
- *Type:* projen.vscode.VsCode
Access all VSCode components.
This will be `undefined` for subprojects.
---
##### `artifactsDirectory`Required
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
The build output directory.
An npm tarball will be created under the `js`
subdirectory. For example, if this is set to `dist` (the default), the npm
tarball will be placed under `dist/js/boom-boom-1.2.3.tg`.
---
##### `artifactsJavascriptDirectory`Required
```typescript
public readonly artifactsJavascriptDirectory: string;
```
- *Type:* string
The location of the npm tarball after build (`${artifactsDirectory}/js`).
---
##### `bundler`Required
```typescript
public readonly bundler: Bundler;
```
- *Type:* projen.javascript.Bundler
---
##### `npmrc`Required
```typescript
public readonly npmrc: NpmConfig;
```
- *Type:* projen.javascript.NpmConfig
The .npmrc file.
---
##### `package`Required
```typescript
public readonly package: NodePackage;
```
- *Type:* projen.javascript.NodePackage
API for managing the node package.
---
##### `runScriptCommand`Required
```typescript
public readonly runScriptCommand: string;
```
- *Type:* string
The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: AutoMerge;
```
- *Type:* projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
---
##### `biome`Optional
```typescript
public readonly biome: Biome;
```
- *Type:* projen.javascript.Biome
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: BuildWorkflow;
```
- *Type:* projen.build.BuildWorkflow
The PR build GitHub workflow.
`undefined` if `buildWorkflow` is disabled.
---
##### `buildWorkflowJobId`Optional
```typescript
public readonly buildWorkflowJobId: string;
```
- *Type:* string
The job ID of the build workflow.
---
##### `jest`Optional
```typescript
public readonly jest: Jest;
```
- *Type:* projen.javascript.Jest
The Jest configuration (if enabled).
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
Maximum node version supported by this package.
The value indicates the package is incompatible with newer versions.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
The minimum node version required by this package to function.
This value indicates the package is incompatible with older versions.
---
##### `npmignore`Optional
```typescript
public readonly npmignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
The .npmignore file.
---
##### `prettier`Optional
```typescript
public readonly prettier: Prettier;
```
- *Type:* projen.javascript.Prettier
---
##### `release`Optional
```typescript
public readonly release: Release;
```
- *Type:* projen.release.Release
Release management.
---
##### `upgradeWorkflow`Optional
```typescript
public readonly upgradeWorkflow: UpgradeDependencies;
```
- *Type:* projen.javascript.UpgradeDependencies
The upgrade workflow.
---
##### `docsDirectory`Required
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
---
##### `libdir`Required
```typescript
public readonly libdir: string;
```
- *Type:* string
The directory in which compiled .js files reside.
---
##### `runner`Required
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
The TypeScript runner used for executing TypeScript files.
---
##### `srcdir`Required
```typescript
public readonly srcdir: string;
```
- *Type:* string
The directory in which the .ts sources reside.
---
##### `testdir`Required
```typescript
public readonly testdir: string;
```
- *Type:* string
The directory in which tests reside.
---
##### `tsconfigDev`Required
```typescript
public readonly tsconfigDev: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
---
##### `watchTask`Required
```typescript
public readonly watchTask: Task;
```
- *Type:* projen.Task
The "watch" task.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
---
##### `eslint`Optional
```typescript
public readonly eslint: Eslint;
```
- *Type:* projen.javascript.Eslint
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `tsconfigEslint`Optional
```typescript
public readonly tsconfigEslint: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
#### Constants
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). |
| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* |
---
##### `DEFAULT_TASK`Required
```typescript
public readonly DEFAULT_TASK: string;
```
- *Type:* string
The name of the default task (the task executed when `projen` is run without arguments).
Normally
this task should synthesize the project files.
---
##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required
```typescript
public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string;
```
- *Type:* string
---
### TaimosTypescriptLibrary
TypeScript library.
#### Initializers
```typescript
import { TaimosTypescriptLibrary } from '@taimos/projen'
new TaimosTypescriptLibrary(options: TaimosTypescriptLibraryOptions)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| options | TaimosTypescriptLibraryOptions | *No description.* |
---
##### `options`Required
- *Type:* TaimosTypescriptLibraryOptions
---
#### Methods
| **Name** | **Description** |
| --- | --- |
| toString | Returns a string representation of this construct. |
| with | Applies one or more mixins to this construct. |
| addExcludeFromCleanup | Exclude the matching files from pre-synth cleanup. |
| addGitIgnore | Adds a .gitignore pattern. |
| addPackageIgnore | Adds patterns to be ignored by npm. |
| addTask | Adds a new task to this project. |
| annotateGenerated | Marks the provided file(s) as being generated. |
| postSynthesize | Called after all components are synthesized. |
| preSynthesize | Called before all components are synthesized. |
| removeTask | Removes a task from a project. |
| runTaskCommand | Returns the shell command to execute in order to run a task. |
| synth | Synthesize all project files into `outdir`. |
| tryFindFile | Finds a file at the specified relative path within this project and all its subprojects. |
| tryFindObjectFile | Finds an object file (like JsonFile, YamlFile, etc.) by name. |
| tryRemoveFile | Finds a file at the specified relative path within this project and removes it. |
| addBins | *No description.* |
| addBundledDeps | Defines bundled dependencies. |
| addDeps | Defines normal dependencies. |
| addDevDeps | Defines development/test dependencies. |
| addFields | Directly set fields in `package.json`. |
| addKeywords | Adds keywords to package.json (deduplicated). |
| addPeerDeps | Defines peer dependencies. |
| addScripts | Replaces the contents of multiple npm package.json scripts. |
| removeScript | Removes the npm script (always successful). |
| renderWorkflowSetup | Returns the set of workflow steps which should be executed to bootstrap a workflow. |
| setScript | Replaces the contents of an npm package.json script. |
---
##### `toString`
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `with`
```typescript
public with(mixins: ...IMixin[]): IConstruct
```
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple `with()` calls if subsequent mixins should apply to added
constructs.
###### `mixins`Required
- *Type:* ...constructs.IMixin[]
The mixins to apply.
---
##### `addExcludeFromCleanup`
```typescript
public addExcludeFromCleanup(globs: ...string[]): void
```
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some
source files include the projen marker and we don't want them to be erased during synth.
###### `globs`Required
- *Type:* ...string[]
The glob patterns to match.
---
##### `addGitIgnore`
```typescript
public addGitIgnore(pattern: string): void
```
Adds a .gitignore pattern.
###### `pattern`Required
- *Type:* string
The glob pattern to ignore.
---
##### `addPackageIgnore`
```typescript
public addPackageIgnore(pattern: string): void
```
Adds patterns to be ignored by npm.
###### `pattern`Required
- *Type:* string
The pattern to ignore.
---
##### `addTask`
```typescript
public addTask(name: string, props?: TaskOptions): Task
```
Adds a new task to this project.
This will fail if the project already has
a task with this name.
###### `name`Required
- *Type:* string
The task name to add.
---
###### `props`Optional
- *Type:* projen.TaskOptions
Task properties.
---
##### `annotateGenerated`
```typescript
public annotateGenerated(glob: string): void
```
Marks the provided file(s) as being generated.
This is achieved using the
github-linguist attributes. Generated files do not count against the
repository statistics and language breakdown.
> [https://github.com/github/linguist/blob/master/docs/overrides.md](https://github.com/github/linguist/blob/master/docs/overrides.md)
###### `glob`Required
- *Type:* string
the glob pattern to match (could be a file path).
---
##### `postSynthesize`
```typescript
public postSynthesize(): void
```
Called after all components are synthesized.
Order is *not* guaranteed.
##### `preSynthesize`
```typescript
public preSynthesize(): void
```
Called before all components are synthesized.
##### `removeTask`
```typescript
public removeTask(name: string): Task
```
Removes a task from a project.
###### `name`Required
- *Type:* string
The name of the task to remove.
---
##### `runTaskCommand`
```typescript
public runTaskCommand(task: Task): string
```
Returns the shell command to execute in order to run a task.
This will
typically be `pnpm projen TASK`.
###### `task`Required
- *Type:* projen.Task
The task for which the command is required.
---
##### `synth`
```typescript
public synth(): void
```
Synthesize all project files into `outdir`.
1. Call "this.preSynthesize()"
2. Delete all generated files
3. Synthesize all subprojects
4. Synthesize all components of this project
5. Call "projectCreation()" for all components, only if the project is being created for the first time
6. Call "postSynthesize()" for all components of this project
7. Call "this.postSynthesize()"
8. Call "postProjectCreation()" for all components, only if the project is being created for the first time
##### `tryFindFile`
```typescript
public tryFindFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and all its subprojects.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be resolved
from the root of _this_ project.
---
##### `tryFindObjectFile`
```typescript
public tryFindObjectFile(filePath: string): ObjectFile
```
Finds an object file (like JsonFile, YamlFile, etc.) by name.
###### `filePath`Required
- *Type:* string
The file path.
---
##### `tryRemoveFile`
```typescript
public tryRemoveFile(filePath: string): FileBase
```
Finds a file at the specified relative path within this project and removes it.
###### `filePath`Required
- *Type:* string
The file path.
If this path is relative, it will be
resolved from the root of _this_ project.
---
##### `addBins`
```typescript
public addBins(bins: {[ key: string ]: string}): void
```
###### `bins`Required
- *Type:* {[ key: string ]: string}
---
##### `addBundledDeps`
```typescript
public addBundledDeps(deps: ...string[]): void
```
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
`bundledDependencies` section of your `package.json`.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDeps`
```typescript
public addDeps(deps: ...string[]): void
```
Defines normal dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addDevDeps`
```typescript
public addDevDeps(deps: ...string[]): void
```
Defines development/test dependencies.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addFields`
```typescript
public addFields(fields: {[ key: string ]: any}): void
```
Directly set fields in `package.json`.
###### `fields`Required
- *Type:* {[ key: string ]: any}
The fields to set.
---
##### `addKeywords`
```typescript
public addKeywords(keywords: ...string[]): void
```
Adds keywords to package.json (deduplicated).
###### `keywords`Required
- *Type:* ...string[]
The keywords to add.
---
##### `addPeerDeps`
```typescript
public addPeerDeps(deps: ...string[]): void
```
Defines peer dependencies.
When adding peer dependencies, a devDependency will also be added on the
pinned version of the declared peer. This will ensure that you are testing
your code against the minimum version required from your consumers.
###### `deps`Required
- *Type:* ...string[]
Names modules to install.
By default, the the dependency will
be installed in the next `pnpm projen` run and the version will be recorded
in your `package.json` file. You can upgrade manually or using `pnpm
add/update`. If you wish to specify a version range use this syntax:
`module@^7`.
---
##### `addScripts`
```typescript
public addScripts(scripts: {[ key: string ]: string}): void
```
Replaces the contents of multiple npm package.json scripts.
###### `scripts`Required
- *Type:* {[ key: string ]: string}
The scripts to set.
---
##### `removeScript`
```typescript
public removeScript(name: string): void
```
Removes the npm script (always successful).
###### `name`Required
- *Type:* string
The name of the script.
---
##### `renderWorkflowSetup`
```typescript
public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[]
```
Returns the set of workflow steps which should be executed to bootstrap a workflow.
###### `options`Optional
- *Type:* projen.javascript.RenderWorkflowSetupOptions
Options.
---
##### `setScript`
```typescript
public setScript(name: string, command: string): void
```
Replaces the contents of an npm package.json script.
###### `name`Required
- *Type:* string
The script name.
---
###### `command`Required
- *Type:* string
The command to execute.
---
#### Static Functions
| **Name** | **Description** |
| --- | --- |
| isConstruct | Checks if `x` is a construct. |
| isProject | Test whether the given construct is a project. |
| of | Find the closest ancestor project for given construct. |
---
##### `isConstruct`
```typescript
import { TaimosTypescriptLibrary } from '@taimos/projen'
TaimosTypescriptLibrary.isConstruct(x: any)
```
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.
###### `x`Required
- *Type:* any
Any object.
---
##### `isProject`
```typescript
import { TaimosTypescriptLibrary } from '@taimos/projen'
TaimosTypescriptLibrary.isProject(x: any)
```
Test whether the given construct is a project.
###### `x`Required
- *Type:* any
---
##### `of`
```typescript
import { TaimosTypescriptLibrary } from '@taimos/projen'
TaimosTypescriptLibrary.of(construct: IConstruct)
```
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
###### `construct`Required
- *Type:* constructs.IConstruct
---
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| node | constructs.Node | The tree node. |
| buildTask | projen.Task | *No description.* |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| compileTask | projen.Task | *No description.* |
| components | projen.Component[] | Returns all the components within this project. |
| deps | projen.Dependencies | Project dependencies. |
| ejected | boolean | Whether or not the project is being ejected. |
| files | projen.FileBase[] | All files in this project. |
| gitattributes | projen.GitAttributesFile | The .gitattributes file for this repository. |
| gitignore | projen.IgnoreFile | .gitignore. |
| logger | projen.Logger | Logging utilities. |
| name | string | Project name. |
| outdir | string | Absolute output directory of this project. |
| packageTask | projen.Task | *No description.* |
| postCompileTask | projen.Task | *No description.* |
| preCompileTask | projen.Task | *No description.* |
| projectBuild | projen.ProjectBuild | Manages the build process of the project. |
| projenCommand | string | The command to use in order to run the projen CLI. |
| root | projen.Project | The root project. |
| subprojects | projen.Project[] | Returns all the subprojects within this project. |
| tasks | projen.Tasks | Project tasks. |
| testTask | projen.Task | *No description.* |
| defaultTask | projen.Task | This is the "default" task, the one that executes "projen". |
| initProject | projen.InitProject | The options used when this project is bootstrapped via `projen new`. |
| parent | projen.Project | A parent project. |
| autoApprove | projen.github.AutoApprove | Auto approve set up for this project. |
| devContainer | projen.vscode.DevContainer | Access for .devcontainer.json (used for GitHub Codespaces). |
| github | projen.github.GitHub | Access all github components. |
| gitpod | projen.Gitpod | Access for Gitpod. |
| vscode | projen.vscode.VsCode | Access all VSCode components. |
| artifactsDirectory | string | The build output directory. |
| artifactsJavascriptDirectory | string | The location of the npm tarball after build (`${artifactsDirectory}/js`). |
| bundler | projen.javascript.Bundler | *No description.* |
| npmrc | projen.javascript.NpmConfig | The .npmrc file. |
| package | projen.javascript.NodePackage | API for managing the node package. |
| runScriptCommand | string | The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). |
| autoMerge | projen.github.AutoMerge | Component that sets up mergify for merging approved pull requests. |
| biome | projen.javascript.Biome | *No description.* |
| buildWorkflow | projen.build.BuildWorkflow | The PR build GitHub workflow. |
| buildWorkflowJobId | string | The job ID of the build workflow. |
| jest | projen.javascript.Jest | The Jest configuration (if enabled). |
| maxNodeVersion | string | Maximum node version supported by this package. |
| minNodeVersion | string | The minimum node version required by this package to function. |
| npmignore | projen.IgnoreFile | The .npmignore file. |
| prettier | projen.javascript.Prettier | *No description.* |
| release | projen.release.Release | Release management. |
| upgradeWorkflow | projen.javascript.UpgradeDependencies | The upgrade workflow. |
| docsDirectory | string | *No description.* |
| libdir | string | The directory in which compiled .js files reside. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner used for executing TypeScript files. |
| srcdir | string | The directory in which the .ts sources reside. |
| testdir | string | The directory in which tests reside. |
| tsconfigDev | projen.javascript.TypescriptConfig | A typescript configuration file which covers all files (sources, tests, projen). |
| watchTask | projen.Task | The "watch" task. |
| docgen | boolean | *No description.* |
| eslint | projen.javascript.Eslint | *No description.* |
| tsconfig | projen.javascript.TypescriptConfig | *No description.* |
| tsconfigEslint | projen.javascript.TypescriptConfig | *No description.* |
---
##### `node`Required
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `buildTask`Required
```typescript
public readonly buildTask: Task;
```
- *Type:* projen.Task
---
##### `commitGenerated`Required
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
Whether to commit the managed files by default.
---
##### `compileTask`Required
```typescript
public readonly compileTask: Task;
```
- *Type:* projen.Task
---
##### `components`Required
```typescript
public readonly components: Component[];
```
- *Type:* projen.Component[]
Returns all the components within this project.
---
##### `deps`Required
```typescript
public readonly deps: Dependencies;
```
- *Type:* projen.Dependencies
Project dependencies.
---
##### `ejected`Required
```typescript
public readonly ejected: boolean;
```
- *Type:* boolean
Whether or not the project is being ejected.
---
##### `files`Required
```typescript
public readonly files: FileBase[];
```
- *Type:* projen.FileBase[]
All files in this project.
---
##### `gitattributes`Required
```typescript
public readonly gitattributes: GitAttributesFile;
```
- *Type:* projen.GitAttributesFile
The .gitattributes file for this repository.
---
##### `gitignore`Required
```typescript
public readonly gitignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
.gitignore.
---
##### `logger`Required
```typescript
public readonly logger: Logger;
```
- *Type:* projen.Logger
Logging utilities.
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
Project name.
---
##### `outdir`Required
```typescript
public readonly outdir: string;
```
- *Type:* string
Absolute output directory of this project.
---
##### `packageTask`Required
```typescript
public readonly packageTask: Task;
```
- *Type:* projen.Task
---
##### `postCompileTask`Required
```typescript
public readonly postCompileTask: Task;
```
- *Type:* projen.Task
---
##### `preCompileTask`Required
```typescript
public readonly preCompileTask: Task;
```
- *Type:* projen.Task
---
##### `projectBuild`Required
```typescript
public readonly projectBuild: ProjectBuild;
```
- *Type:* projen.ProjectBuild
Manages the build process of the project.
---
##### `projenCommand`Required
```typescript
public readonly projenCommand: string;
```
- *Type:* string
The command to use in order to run the projen CLI.
---
##### `root`Required
```typescript
public readonly root: Project;
```
- *Type:* projen.Project
The root project.
---
##### `subprojects`Required
```typescript
public readonly subprojects: Project[];
```
- *Type:* projen.Project[]
Returns all the subprojects within this project.
---
##### `tasks`Required
```typescript
public readonly tasks: Tasks;
```
- *Type:* projen.Tasks
Project tasks.
---
##### `testTask`Required
```typescript
public readonly testTask: Task;
```
- *Type:* projen.Task
---
##### `defaultTask`Optional
```typescript
public readonly defaultTask: Task;
```
- *Type:* projen.Task
This is the "default" task, the one that executes "projen".
Undefined if
the project is being ejected.
---
##### ~~`initProject`~~Optional
- *Deprecated:* use the `initProject` argument passed to `Component.projectCreation()` instead.
```typescript
public readonly initProject: InitProject;
```
- *Type:* projen.InitProject
The options used when this project is bootstrapped via `projen new`.
It
includes the original set of options passed to the CLI and also the JSII
FQN of the project type.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
A parent project.
If undefined, this is the root project.
---
##### `autoApprove`Optional
```typescript
public readonly autoApprove: AutoApprove;
```
- *Type:* projen.github.AutoApprove
Auto approve set up for this project.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: DevContainer;
```
- *Type:* projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be `undefined` if devContainer boolean is false
---
##### `github`Optional
```typescript
public readonly github: GitHub;
```
- *Type:* projen.github.GitHub
Access all github components.
This will be `undefined` for subprojects.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: Gitpod;
```
- *Type:* projen.Gitpod
Access for Gitpod.
This will be `undefined` if gitpod boolean is false
---
##### `vscode`Optional
```typescript
public readonly vscode: VsCode;
```
- *Type:* projen.vscode.VsCode
Access all VSCode components.
This will be `undefined` for subprojects.
---
##### `artifactsDirectory`Required
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
The build output directory.
An npm tarball will be created under the `js`
subdirectory. For example, if this is set to `dist` (the default), the npm
tarball will be placed under `dist/js/boom-boom-1.2.3.tg`.
---
##### `artifactsJavascriptDirectory`Required
```typescript
public readonly artifactsJavascriptDirectory: string;
```
- *Type:* string
The location of the npm tarball after build (`${artifactsDirectory}/js`).
---
##### `bundler`Required
```typescript
public readonly bundler: Bundler;
```
- *Type:* projen.javascript.Bundler
---
##### `npmrc`Required
```typescript
public readonly npmrc: NpmConfig;
```
- *Type:* projen.javascript.NpmConfig
The .npmrc file.
---
##### `package`Required
```typescript
public readonly package: NodePackage;
```
- *Type:* projen.javascript.NodePackage
API for managing the node package.
---
##### `runScriptCommand`Required
```typescript
public readonly runScriptCommand: string;
```
- *Type:* string
The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: AutoMerge;
```
- *Type:* projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
---
##### `biome`Optional
```typescript
public readonly biome: Biome;
```
- *Type:* projen.javascript.Biome
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: BuildWorkflow;
```
- *Type:* projen.build.BuildWorkflow
The PR build GitHub workflow.
`undefined` if `buildWorkflow` is disabled.
---
##### `buildWorkflowJobId`Optional
```typescript
public readonly buildWorkflowJobId: string;
```
- *Type:* string
The job ID of the build workflow.
---
##### `jest`Optional
```typescript
public readonly jest: Jest;
```
- *Type:* projen.javascript.Jest
The Jest configuration (if enabled).
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
Maximum node version supported by this package.
The value indicates the package is incompatible with newer versions.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
The minimum node version required by this package to function.
This value indicates the package is incompatible with older versions.
---
##### `npmignore`Optional
```typescript
public readonly npmignore: IgnoreFile;
```
- *Type:* projen.IgnoreFile
The .npmignore file.
---
##### `prettier`Optional
```typescript
public readonly prettier: Prettier;
```
- *Type:* projen.javascript.Prettier
---
##### `release`Optional
```typescript
public readonly release: Release;
```
- *Type:* projen.release.Release
Release management.
---
##### `upgradeWorkflow`Optional
```typescript
public readonly upgradeWorkflow: UpgradeDependencies;
```
- *Type:* projen.javascript.UpgradeDependencies
The upgrade workflow.
---
##### `docsDirectory`Required
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
---
##### `libdir`Required
```typescript
public readonly libdir: string;
```
- *Type:* string
The directory in which compiled .js files reside.
---
##### `runner`Required
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
The TypeScript runner used for executing TypeScript files.
---
##### `srcdir`Required
```typescript
public readonly srcdir: string;
```
- *Type:* string
The directory in which the .ts sources reside.
---
##### `testdir`Required
```typescript
public readonly testdir: string;
```
- *Type:* string
The directory in which tests reside.
---
##### `tsconfigDev`Required
```typescript
public readonly tsconfigDev: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
---
##### `watchTask`Required
```typescript
public readonly watchTask: Task;
```
- *Type:* projen.Task
The "watch" task.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
---
##### `eslint`Optional
```typescript
public readonly eslint: Eslint;
```
- *Type:* projen.javascript.Eslint
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
##### `tsconfigEslint`Optional
```typescript
public readonly tsconfigEslint: TypescriptConfig;
```
- *Type:* projen.javascript.TypescriptConfig
---
#### Constants
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). |
| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* |
---
##### `DEFAULT_TASK`Required
```typescript
public readonly DEFAULT_TASK: string;
```
- *Type:* string
The name of the default task (the task executed when `projen` is run without arguments).
Normally
this task should synthesize the project files.
---
##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required
```typescript
public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string;
```
- *Type:* string
---
## Structs
### AmplifyDeployApp
One Amplify Hosting application whose builds CI drives.
Mirrors a `MonorepoAmplifyApp` entry in the generated `amplify.yml`; the
`appRoot` should match so a build is triggered by exactly the directory it is
built from.
#### Initializer
```typescript
import { AmplifyDeployApp } from '@taimos/projen'
const amplifyDeployApp: AmplifyDeployApp = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| appRoot | string | The package path that is the Amplify app root, e.g. `packages/frontend`. `/**` becomes a push trigger path. |
| key | string | Short key identifying the app. Used in the app-id SSM parameter path and, by default, in the workflow name. |
| dependencyPaths | string[] | Extra path globs that affect this app's build output. |
| label | string | Human-readable name used in step names and log lines. |
| workflowName | string | The generated workflow name, which is also its `.yml` file name. |
---
##### `appRoot`Required
```typescript
public readonly appRoot: string;
```
- *Type:* string
The package path that is the Amplify app root, e.g. `packages/frontend`. `/**` becomes a push trigger path.
---
##### `key`Required
```typescript
public readonly key: string;
```
- *Type:* string
Short key identifying the app. Used in the app-id SSM parameter path and, by default, in the workflow name.
Must match the key the CDK side registers the app under.
---
##### `dependencyPaths`Optional
```typescript
public readonly dependencyPaths: string[];
```
- *Type:* string[]
- *Default:* []
Extra path globs that affect this app's build output.
Set this for workspace packages the app consumes via `workspace:*` and that
the build spec pre-builds — a shared API package, say. Without them a change
to shared types would not rebuild the app and it would ship stale.
---
##### `label`Optional
```typescript
public readonly label: string;
```
- *Type:* string
- *Default:* the `key`
Human-readable name used in step names and log lines.
---
##### `workflowName`Optional
```typescript
public readonly workflowName: string;
```
- *Type:* string
- *Default:* `-deploy`
The generated workflow name, which is also its `.yml` file name.
---
### AmplifyDeployStage
One deploy stage: a git branch, the logical stage it serves, and the AWS account its Amplify apps live in.
Both shapes seen in practice are expressible: separate accounts per stage
(each entry has its own `account`), or a single account serving several
branches (every entry repeats the same `account`, and the branch alone
selects which Amplify branch is built).
#### Initializer
```typescript
import { AmplifyDeployStage } from '@taimos/projen'
const amplifyDeployStage: AmplifyDeployStage = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| account | string | The AWS account hosting this stage's Amplify apps. |
| branch | string | The git branch the Amplify apps build from, e.g. `main` or `production`. |
| stageName | string | The logical stage this branch serves, e.g. `dev` or `prod`. Used as the GitHub environment so protection rules apply per stage. |
---
##### `account`Required
```typescript
public readonly account: string;
```
- *Type:* string
The AWS account hosting this stage's Amplify apps.
---
##### `branch`Required
```typescript
public readonly branch: string;
```
- *Type:* string
The git branch the Amplify apps build from, e.g. `main` or `production`.
---
##### `stageName`Required
```typescript
public readonly stageName: string;
```
- *Type:* string
The logical stage this branch serves, e.g. `dev` or `prod`. Used as the GitHub environment so protection rules apply per stage.
---
### GitHubAmplifyDeployOptions
#### Initializer
```typescript
import { GitHubAmplifyDeployOptions } from '@taimos/projen'
const gitHubAmplifyDeployOptions: GitHubAmplifyDeployOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| apps | AmplifyDeployApp[] | The Amplify apps to generate deploy workflows for. |
| deploymentRoleArn | string | The GitHub OIDC deployment role every workflow assumes first, typically in a management account. |
| stages | AmplifyDeployStage[] | The branches that deploy, and the account each one deploys into. |
| buildTriggerRoleName | string | Name of the per-account IAM role CI chains into to start builds. |
| parameterPrefix | string | Prefix of the SSM parameter path holding each app's Amplify app id. The full path is `//app-id`. |
| region | string | The AWS region the Amplify apps live in. |
| runnerTags | string[] | The runner tags used to select the runner. |
| sharedBuildPaths | string[] | Paths that change what *every* Amplify build produces, added to each app's own paths. |
| timeoutMinutes | number | Timeout for a deploy job, bounding a hung Amplify build. |
---
##### `apps`Required
```typescript
public readonly apps: AmplifyDeployApp[];
```
- *Type:* AmplifyDeployApp[]
The Amplify apps to generate deploy workflows for.
At least one.
---
##### `deploymentRoleArn`Required
```typescript
public readonly deploymentRoleArn: string;
```
- *Type:* string
The GitHub OIDC deployment role every workflow assumes first, typically in a management account.
The per-stage build-trigger role is reached from it
by role chaining, so it must be allowed to `sts:AssumeRole` on that role —
an IAM grant that lives outside the generated code.
---
##### `stages`Required
```typescript
public readonly stages: AmplifyDeployStage[];
```
- *Type:* AmplifyDeployStage[]
The branches that deploy, and the account each one deploys into.
At least one.
---
##### `buildTriggerRoleName`Optional
```typescript
public readonly buildTriggerRoleName: string;
```
- *Type:* string
- *Default:* `-amplify-build-trigger`
Name of the per-account IAM role CI chains into to start builds.
The same name is expected in every stage account, so the workflow can build
the ARN from the account id alone. The CDK side must create a role with
exactly this name.
---
##### `parameterPrefix`Optional
```typescript
public readonly parameterPrefix: string;
```
- *Type:* string
- *Default:* `//amplify`
Prefix of the SSM parameter path holding each app's Amplify app id. The full path is `//app-id`.
Reading the app id at run time means CI never hardcodes an id that changes
whenever an app is replaced.
---
##### `region`Optional
```typescript
public readonly region: string;
```
- *Type:* string
- *Default:* 'eu-central-1'
The AWS region the Amplify apps live in.
---
##### `runnerTags`Optional
```typescript
public readonly runnerTags: string[];
```
- *Type:* string[]
- *Default:* ['ubuntu-latest']
The runner tags used to select the runner.
---
##### `sharedBuildPaths`Optional
```typescript
public readonly sharedBuildPaths: string[];
```
- *Type:* string[]
- *Default:* the Amplify build spec, the lockfile and the workspace file
Paths that change what *every* Amplify build produces, added to each app's own paths.
---
##### `timeoutMinutes`Optional
```typescript
public readonly timeoutMinutes: number;
```
- *Type:* number
- *Default:* 45
Timeout for a deploy job, bounding a hung Amplify build.
---
### GitHubProductionReleaseOptions
#### Initializer
```typescript
import { GitHubProductionReleaseOptions } from '@taimos/projen'
const gitHubProductionReleaseOptions: GitHubProductionReleaseOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| productionBranches | string[] | The production branches that the source branch may be promoted into. |
| runnerTags | string[] | The runner tags used to select the runner. |
| workflowName | string | The name of the generated workflow (and its `.yml` file). |
---
##### `productionBranches`Optional
```typescript
public readonly productionBranches: string[];
```
- *Type:* string[]
- *Default:* ['production']
The production branches that the source branch may be promoted into.
Each branch typically backs its own production deployment — e.g. one Amplify
app tracking `production` and another tracking `production2`. When more than
one branch is given, the `workflow_dispatch` trigger exposes a `target`
choice input so the operator picks which branch to promote into at dispatch
time. The first entry is the default selection. With a single branch, no
input is rendered and that branch is always the target.
---
##### `runnerTags`Optional
```typescript
public readonly runnerTags: string[];
```
- *Type:* string[]
- *Default:* ['ubuntu-latest']
The runner tags used to select the runner.
---
##### `workflowName`Optional
```typescript
public readonly workflowName: string;
```
- *Type:* string
- *Default:* 'production-release'
The name of the generated workflow (and its `.yml` file).
---
### MonorepoAmplifyApp
One AWS Amplify Hosting application served from a workspace package.
Renders a single entry under `applications:` in the generated `amplify.yml`.
Amplify does not auto-detect PNPM workspaces, so the generated build spec
runs `corepack enable` + a root `pnpm install` and pre-builds any shared
packages before building the app from its `appRoot` (see ADR-0002).
#### Initializer
```typescript
import { MonorepoAmplifyApp } from '@taimos/projen'
const monorepoAmplifyApp: MonorepoAmplifyApp = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| appRoot | string | The package path that is the Amplify app root, e.g. `packages/frontend`. |
| buildFilter | string | The pnpm package name to build, used as the `--filter` target, e.g. `deploymon-frontend` or `radball-digital-portal`. |
| framework | MonorepoAmplifyFramework | The frontend framework, used to pick build/artifact/cache defaults. |
| artifactBaseDirectory | string | Override the artifact base directory. |
| buildCommand | string | Override the build command run in the Amplify `build` phase. |
| cachePaths | string[] | Override the Amplify build cache paths. |
| installCommand | string | Full override of the install command in the preBuild phase. |
| installFilter | string | pnpm `--filter` expression for the scoped install in the preBuild phase. |
| preBuildFilters | string[] | Workspace packages to build before the app, as `--filter` targets. |
---
##### `appRoot`Required
```typescript
public readonly appRoot: string;
```
- *Type:* string
The package path that is the Amplify app root, e.g. `packages/frontend`.
---
##### `buildFilter`Required
```typescript
public readonly buildFilter: string;
```
- *Type:* string
The pnpm package name to build, used as the `--filter` target, e.g. `deploymon-frontend` or `radball-digital-portal`.
---
##### `framework`Required
```typescript
public readonly framework: MonorepoAmplifyFramework;
```
- *Type:* MonorepoAmplifyFramework
The frontend framework, used to pick build/artifact/cache defaults.
---
##### `artifactBaseDirectory`Optional
```typescript
public readonly artifactBaseDirectory: string;
```
- *Type:* string
- *Default:* `/.next` for Next.js, or `/dist//browser` for Angular.
Override the artifact base directory.
---
##### `buildCommand`Optional
```typescript
public readonly buildCommand: string;
```
- *Type:* string
- *Default:* `pnpm --filter run build` for Next.js, or `pnpm --filter run build:${BUILD_ENV}` for Angular.
Override the build command run in the Amplify `build` phase.
---
##### `cachePaths`Optional
```typescript
public readonly cachePaths: string[];
```
- *Type:* string[]
- *Default:* `node_modules/**` plus the framework build cache (`/.next/cache/**` or `/.angular/cache/**`).
Override the Amplify build cache paths.
---
##### `installCommand`Optional
```typescript
public readonly installCommand: string;
```
- *Type:* string
- *Default:* `pnpm install --frozen-lockfile --node-linker hoisted --filter ""`
Full override of the install command in the preBuild phase.
When set, `installFilter` is ignored and this string is emitted verbatim.
Use this as an escape hatch when the default scoped install is insufficient.
---
##### `installFilter`Optional
```typescript
public readonly installFilter: string;
```
- *Type:* string
- *Default:* `${buildFilter}...`
pnpm `--filter` expression for the scoped install in the preBuild phase.
The trailing `...` syntax pulls in the app's transitive workspace
dependencies (e.g. a shared API package) but excludes unrelated packages,
avoiding concurrent `projen/node_modules` rename races under the hoisted
linker.
---
##### `preBuildFilters`Optional
```typescript
public readonly preBuildFilters: string[];
```
- *Type:* string[]
- *Default:* []
Workspace packages to build before the app, as `--filter` targets.
Typically the shared API package the app consumes via `workspace:*`,
e.g. `['@taimos/deploymon-api']`.
---
### MonorepoApproverMapping
One author-to-approvers routing rule for the PR approver assignment.
#### Initializer
```typescript
import { MonorepoApproverMapping } from '@taimos/projen'
const monorepoApproverMapping: MonorepoApproverMapping = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| approvers | string[] | The GitHub usernames assigned to review when `author` opens a PR. |
| author | string | The GitHub username opening the PR. |
---
##### `approvers`Required
```typescript
public readonly approvers: string[];
```
- *Type:* string[]
The GitHub usernames assigned to review when `author` opens a PR.
---
##### `author`Required
```typescript
public readonly author: string;
```
- *Type:* string
The GitHub username opening the PR.
---
### MonorepoProjectOptions
#### Initializer
```typescript
import { MonorepoProjectOptions } from '@taimos/projen'
const monorepoProjectOptions: MonorepoProjectOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| name | string | This is the name of your project. |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| gitIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .gitignore file. |
| gitOptions | projen.GitOptions | Configuration options for git. |
| logging | projen.LoggerOptions | Configure logging options such as verbosity. |
| outdir | string | The root directory of the project. |
| parent | projen.Project | The parent project, if this project is part of a bigger project. |
| projectTree | boolean | Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging. |
| projenCommand | string | The shell command to use in order to run the projen CLI. |
| projenrcJson | boolean | Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. |
| projenrcJsonOptions | projen.ProjenrcJsonOptions | Options for .projenrc.json. |
| renovatebot | boolean | Use renovatebot to handle dependency upgrades. |
| renovatebotOptions | projen.RenovatebotOptions | Options for renovatebot. |
| autoApproveOptions | projen.github.AutoApproveOptions | Enable and configure the 'auto approve' workflow. |
| autoMerge | boolean | Enable automatic merging on GitHub. |
| autoMergeOptions | projen.github.AutoMergeOptions | Configure options for automatic merging on GitHub. |
| clobber | boolean | Add a `clobber` task which resets the repo to origin. |
| devContainer | boolean | Add a VSCode development environment (used for GitHub Codespaces). |
| github | boolean | Enable GitHub integration. |
| githubOptions | projen.github.GitHubOptions | Options for GitHub integration. |
| gitpod | boolean | Add a Gitpod development environment. |
| projenCredentials | projen.github.GithubCredentials | Choose a method of providing GitHub API access for projen workflows. |
| readme | projen.SampleReadmeProps | The README setup. |
| stale | boolean | Auto-close of stale issues and pull request. |
| staleOptions | projen.github.StaleOptions | Auto-close stale issues and pull requests. |
| vscode | boolean | Enable VSCode integration. |
| addPackageManagerToDevEngines | boolean | Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`. |
| allowLibraryDependencies | boolean | Allow the project to include `peerDependencies` and `bundledDependencies`. |
| allowScripts | string[] | List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation. |
| authorEmail | string | Author's e-mail. |
| authorName | string | Author's name. |
| authorOrganization | boolean | Is the author an organization. |
| authorUrl | string | Author's URL / Website. |
| autoDetectBin | boolean | Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. |
| bin | {[ key: string ]: string} | Binary programs vended with your module. |
| bugsEmail | string | The email address to which issues should be reported. |
| bugsUrl | string | The url to your project's issue tracker. |
| bundledDeps | string[] | List of dependencies to bundle into this module. |
| bunVersion | string | The version of Bun to use if using Bun as a package manager. |
| codeArtifactOptions | projen.javascript.CodeArtifactOptions | Options for npm packages using AWS CodeArtifact. |
| deleteOrphanedLockFiles | boolean | Automatically delete lockfiles from package managers that are not the active one. |
| deps | string[] | Runtime dependencies of this module. |
| description | string | The description is just a string that helps people understand the purpose of the package. |
| devDeps | string[] | Build dependencies for this module. |
| devEngines | projen.javascript.DevEngines | Configure the `devEngines` field in `package.json`. |
| entrypoint | string | Module entrypoint (`main` in `package.json`). |
| homepage | string | Package's Homepage / Website. |
| keywords | string[] | Keywords to include in `package.json`. |
| license | string | License's SPDX identifier. |
| licensed | boolean | Indicates if a license should be added. |
| maxNodeVersion | string | The maximum node version supported by this package. Most projects should not use this option. |
| minNodeVersion | string | The minimum node version required by this package to function. Most projects should not use this option. |
| npmAccess | projen.javascript.NpmAccess | Access level of the npm package. |
| npmProvenance | boolean | Should provenance statements be generated when the package is published. |
| npmRegistryUrl | string | The base URL of the npm package registry. |
| npmTokenSecret | string | GitHub secret which contains the NPM token to use when publishing packages. |
| npmTrustedPublishing | boolean | Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. |
| packageManager | projen.javascript.NodePackageManager | The Node Package Manager used to execute scripts. |
| packageName | string | The "name" in package.json. |
| peerDependencyOptions | projen.javascript.PeerDependencyOptions | Options for `peerDeps`. |
| peerDeps | string[] | Peer dependencies for this module. |
| pnpmOptions | projen.javascript.PnpmOptions | Options for pnpm. |
| pnpmVersion | string | The version of PNPM to use if using PNPM as a package manager. |
| repository | string | The repository is the location where the actual code for your package lives. |
| repositoryDirectory | string | If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
| scopedPackagesOptions | projen.javascript.ScopedPackagesOptions[] | Options for privately hosted scoped packages. |
| stability | string | Package's Stability. |
| yarnBerryOptions | projen.javascript.YarnBerryOptions | Options for Yarn Berry. |
| bumpPackage | string | The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string. |
| jsiiReleaseVersion | string | Version requirement of `publib` which is used to publish modules to npm. |
| majorVersion | number | Major version to release from the default branch. |
| minMajorVersion | number | Minimal Major version to release. |
| nextVersionCommand | string | A shell command to control the next version to release. |
| npmDistTag | string | The npmDistTag to use when publishing from the default branch. |
| postBuildSteps | projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| prerelease | string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| publishDryRun | boolean | Instead of actually publishing to package managers, just print the publishing command. |
| publishTasks | boolean | Define publishing tasks that can be executed manually as well as workflows. |
| releasableCommits | projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
| releaseBranches | {[ key: string ]: projen.release.BranchOptions} | Defines additional release branches. |
| releaseEnvironment | string | The GitHub Actions environment used for the release. |
| releaseFailureIssue | boolean | Create a github issue on every failed publishing task. |
| releaseFailureIssueLabel | string | The label to apply to issues indicating publish failures. |
| releaseTagPrefix | string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
| releaseTrigger | projen.release.ReleaseTrigger | The release trigger to use. |
| releaseWorkflowEnv | {[ key: string ]: string} | Build environment variables for release workflows. |
| releaseWorkflowName | string | The name of the default release workflow. |
| releaseWorkflowSetupSteps | projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| versionrcOptions | {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| workflowContainerImage | string | Container image to use for GitHub workflows. |
| workflowRunsOn | string[] | Github Runner selection labels. |
| workflowRunsOnGroup | projen.GroupRunnerOptions | Github Runner Group selection options. |
| artifactsDirectory | string | A directory which will contain build artifacts. |
| auditDeps | boolean | Run security audit on dependencies. |
| auditDepsOptions | projen.javascript.AuditOptions | Security audit options. |
| autoApproveUpgrades | boolean | Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured). |
| biome | boolean | Setup Biome. |
| biomeOptions | projen.javascript.BiomeOptions | Biome options. |
| buildWorkflow | boolean | Define a GitHub workflow for building PRs. |
| buildWorkflowOptions | projen.javascript.BuildWorkflowOptions | Options for PR build workflow. |
| bundlerOptions | projen.javascript.BundlerOptions | Options for `Bundler`. |
| checkLicenses | projen.javascript.LicenseCheckerOptions | Configure which licenses should be deemed acceptable for use by dependencies. |
| codeCov | boolean | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`. |
| codeCovTokenSecret | string | Define the secret name for a specified https://codecov.io/ token. |
| copyrightOwner | string | License copyright owner. |
| copyrightPeriod | string | The copyright years to put in the LICENSE file. |
| defaultReleaseBranch | string | The name of the main release branch. |
| dependabot | boolean | Use dependabot to handle dependency upgrades. |
| dependabotOptions | projen.github.DependabotOptions | Options for dependabot. |
| depsUpgrade | boolean | Use tasks and github workflows to handle dependency upgrades. |
| depsUpgradeOptions | projen.javascript.UpgradeDependenciesOptions | Options for `UpgradeDependencies`. |
| gitignore | string[] | Additional entries to .gitignore. |
| jest | boolean | Setup jest unit tests. |
| jestOptions | projen.javascript.JestOptions | Jest options. |
| npmignoreEnabled | boolean | Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
| npmIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .npmignore file. |
| package | boolean | Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). |
| prettier | boolean | Setup prettier. |
| prettierOptions | projen.javascript.PrettierOptions | Prettier options. |
| projenDevDependency | boolean | Indicates of "projen" should be installed as a devDependency. |
| projenrcJs | boolean | Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. |
| projenrcJsOptions | projen.javascript.ProjenrcOptions | Options for .projenrc.js. |
| projenVersion | string | Version of projen to install. |
| pullRequestTemplate | boolean | Include a GitHub pull request template. |
| pullRequestTemplateContents | string[] | The contents of the pull request template. |
| release | boolean | Add release management to this project. |
| releaseToNpm | boolean | Automatically release to npm when new versions are introduced. |
| workflowBootstrapSteps | projen.github.workflows.JobStep[] | Workflow steps to use in order to bootstrap this repo. |
| workflowGitIdentity | projen.github.GitIdentity | The git identity to use in workflows. |
| workflowNodeVersion | string | The node version used in GitHub Actions workflows. |
| workflowPackageCache | boolean | Enable Node.js package cache in GitHub workflows. |
| disableTsconfig | boolean | Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
| disableTsconfigDev | boolean | Do not generate a development tsconfig file. |
| docgen | boolean | Docgen by Typedoc. |
| docsDirectory | string | Docs directory. |
| entrypointTypes | string | The .d.ts file that includes the type declarations for this module. |
| eslint | boolean | Setup eslint. |
| eslintOptions | projen.javascript.EslintOptions | Eslint options. |
| libdir | string | Typescript artifacts output directory. |
| projenrcTs | boolean | Use TypeScript for your projenrc file (`.projenrc.ts`). |
| projenrcTsOptions | projen.typescript.ProjenrcOptions | Options for .projenrc.ts. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner to use for executing TypeScript files. |
| sampleCode | boolean | Generate one-time sample in `src/` and `test/` if there are no files there. |
| srcdir | string | Typescript sources directory. |
| testdir | string | Jest tests directory. Tests files should be named `xxx.test.ts`. |
| tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. |
| tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). |
| tsconfigDevFile | string | The name (and path) of the development tsconfig file. |
| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. |
| typescriptVersion | string | TypeScript version to use. |
| amplifyApps | MonorepoAmplifyApp[] | AWS Amplify Hosting applications. |
| amplifyDeployOptions | GitHubAmplifyDeployOptions | Drive Amplify Hosting builds from GitHub Actions instead of Amplify's own auto-build, so an app only rebuilds when the packages it is built from actually changed (see `GitHubAmplifyDeploy`). |
| approverMapping | MonorepoApproverMapping[] | Author-to-approvers routing for the PR approver assignment. |
| assignApprover | boolean | Whether to assign PR approvers via `GitHubAssignApprover`. |
| cdkServerless | boolean | Whether to add `cdk-serverless` as a workspace dev dependency. |
| defaultApprovers | string[] | Approvers assigned when no author-specific mapping matches. |
| nodeVersion | string | The Node.js version used in the generated build workflow. |
| pnpmWorkspaceVersion | string | The pnpm version pinned for the workspace and CI. |
| productionRelease | boolean | Whether to add a manual "Production Release" workflow that promotes a branch to the production branch (see `GitHubProductionRelease`). |
| productionReleaseOptions | GitHubProductionReleaseOptions | Options for the production release workflow. |
| runTestsInBuild | boolean | Whether the unified build workflow also runs `pnpm -r run test`. |
| workspaceOptions | MonorepoWorkspaceOptions | PNPM workspace tuning for the generated `pnpm-workspace.yaml`. |
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
- *Default:* $BASEDIR
This is the name of your project.
---
##### `commitGenerated`Optional
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to commit the managed files by default.
---
##### `gitIgnoreOptions`Optional
```typescript
public readonly gitIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .gitignore file.
---
##### `gitOptions`Optional
```typescript
public readonly gitOptions: GitOptions;
```
- *Type:* projen.GitOptions
Configuration options for git.
---
##### `logging`Optional
```typescript
public readonly logging: LoggerOptions;
```
- *Type:* projen.LoggerOptions
- *Default:* {}
Configure logging options such as verbosity.
---
##### `outdir`Optional
```typescript
public readonly outdir: string;
```
- *Type:* string
- *Default:* "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent
directory and it cannot be the same as the parent or any of it's other
subprojects.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
The parent project, if this project is part of a bigger project.
---
##### `projectTree`Optional
```typescript
public readonly projectTree: boolean;
```
- *Type:* boolean
- *Default:* false
Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging.
---
##### `projenCommand`Optional
```typescript
public readonly projenCommand: string;
```
- *Type:* string
- *Default:* "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
---
##### `projenrcJson`Optional
```typescript
public readonly projenrcJson: boolean;
```
- *Type:* boolean
- *Default:* false
Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
---
##### `projenrcJsonOptions`Optional
```typescript
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
```
- *Type:* projen.ProjenrcJsonOptions
- *Default:* default options
Options for .projenrc.json.
---
##### `renovatebot`Optional
```typescript
public readonly renovatebot: boolean;
```
- *Type:* boolean
- *Default:* false
Use renovatebot to handle dependency upgrades.
---
##### `renovatebotOptions`Optional
```typescript
public readonly renovatebotOptions: RenovatebotOptions;
```
- *Type:* projen.RenovatebotOptions
- *Default:* default options
Options for renovatebot.
---
##### `autoApproveOptions`Optional
```typescript
public readonly autoApproveOptions: AutoApproveOptions;
```
- *Type:* projen.github.AutoApproveOptions
- *Default:* auto approve is disabled
Enable and configure the 'auto approve' workflow.
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: boolean;
```
- *Type:* boolean
- *Default:* true
Enable automatic merging on GitHub.
Has no effect if `github.mergify`
is set to false.
---
##### `autoMergeOptions`Optional
```typescript
public readonly autoMergeOptions: AutoMergeOptions;
```
- *Type:* projen.github.AutoMergeOptions
- *Default:* see defaults in `AutoMergeOptions`
Configure options for automatic merging on GitHub.
Has no effect if
`github.mergify` or `autoMerge` is set to false.
---
##### `clobber`Optional
```typescript
public readonly clobber: boolean;
```
- *Type:* boolean
- *Default:* true, but false for subprojects
Add a `clobber` task which resets the repo to origin.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: boolean;
```
- *Type:* boolean
- *Default:* false
Add a VSCode development environment (used for GitHub Codespaces).
---
##### `github`Optional
```typescript
public readonly github: boolean;
```
- *Type:* boolean
- *Default:* true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `githubOptions`Optional
```typescript
public readonly githubOptions: GitHubOptions;
```
- *Type:* projen.github.GitHubOptions
- *Default:* see GitHubOptions
Options for GitHub integration.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: boolean;
```
- *Type:* boolean
- *Default:* false
Add a Gitpod development environment.
---
##### `projenCredentials`Optional
```typescript
public readonly projenCredentials: GithubCredentials;
```
- *Type:* projen.github.GithubCredentials
- *Default:* use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
---
##### `readme`Optional
```typescript
public readonly readme: SampleReadmeProps;
```
- *Type:* projen.SampleReadmeProps
- *Default:* { filename: 'README.md', contents: '# replace this' }
The README setup.
---
*Example*
```typescript
"{ filename: 'readme.md', contents: '# title' }"
```
##### `stale`Optional
```typescript
public readonly stale: boolean;
```
- *Type:* boolean
- *Default:* false
Auto-close of stale issues and pull request.
See `staleOptions` for options.
---
##### `staleOptions`Optional
```typescript
public readonly staleOptions: StaleOptions;
```
- *Type:* projen.github.StaleOptions
- *Default:* see defaults in `StaleOptions`
Auto-close stale issues and pull requests.
To disable set `stale` to `false`.
---
##### `vscode`Optional
```typescript
public readonly vscode: boolean;
```
- *Type:* boolean
- *Default:* true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `addPackageManagerToDevEngines`Optional
```typescript
public readonly addPackageManagerToDevEngines: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`.
---
##### `allowLibraryDependencies`Optional
```typescript
public readonly allowLibraryDependencies: boolean;
```
- *Type:* boolean
- *Default:* true
Allow the project to include `peerDependencies` and `bundledDependencies`.
This is normally only allowed for libraries. For apps, there's no meaning
for specifying these.
---
##### `allowScripts`Optional
```typescript
public readonly allowScripts: string[];
```
- *Type:* string[]
- *Default:* all install scripts are allowed to run (package manager default)
List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation.
These scripts can execute arbitrary code, making them a common
supply-chain attack vector. Package managers are moving toward
blocking them by default and requiring an explicit allowlist.
Configuring `allowScripts` sets up that allowlist so scripts only run
for the packages you have explicitly reviewed and trust.
Support for this setting depends on the configured `packageManager`:
- `NPM`: written to the native `allowScripts` field in `package.json`
(requires npm >= 11.16; see https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts).
- `BUN`: written to the native `trustedDependencies` field in
`package.json` (see https://bun.com/docs/pm/lifecycle).
- `PNPM`: written to the `onlyBuiltDependencies` setting in
`pnpm-workspace.yaml` (see https://pnpm.io/settings#onlybuiltdependencies).
- `YARN2`, `YARN_BERRY`: written to the native
`dependenciesMeta..built` allowlist in `package.json`, combined
with `enableScripts: false` in `.yarnrc.yml` (see
https://yarnpkg.com/features/security#postinstalls). If you set
`yarnBerryOptions.yarnRcOptions.enableScripts` explicitly, that value
is respected instead of being overridden.
- `YARN`, `YARN_CLASSIC`: not supported. Yarn Classic has no native
mechanism to allowlist install scripts for specific dependencies.
Setting this option with one of these package managers throws an
error at synthesis time.
---
##### `authorEmail`Optional
```typescript
public readonly authorEmail: string;
```
- *Type:* string
Author's e-mail.
---
##### `authorName`Optional
```typescript
public readonly authorName: string;
```
- *Type:* string
Author's name.
---
##### `authorOrganization`Optional
```typescript
public readonly authorOrganization: boolean;
```
- *Type:* boolean
Is the author an organization.
---
##### `authorUrl`Optional
```typescript
public readonly authorUrl: string;
```
- *Type:* string
Author's URL / Website.
---
##### `autoDetectBin`Optional
```typescript
public readonly autoDetectBin: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
---
##### `bin`Optional
```typescript
public readonly bin: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your `package.json`, but unless `autoDetectBin` is `false`, every
executable file under `bin` will automatically be added to this section.
---
##### `bugsEmail`Optional
```typescript
public readonly bugsEmail: string;
```
- *Type:* string
The email address to which issues should be reported.
---
##### `bugsUrl`Optional
```typescript
public readonly bugsUrl: string;
```
- *Type:* string
The url to your project's issue tracker.
---
##### `bundledDeps`Optional
```typescript
public readonly bundledDeps: string[];
```
- *Type:* string[]
List of dependencies to bundle into this module.
These modules will be
added both to the `dependencies` section and `bundledDependencies` section of
your `package.json`.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
##### `bunVersion`Optional
```typescript
public readonly bunVersion: string;
```
- *Type:* string
- *Default:* "latest"
The version of Bun to use if using Bun as a package manager.
---
##### `codeArtifactOptions`Optional
```typescript
public readonly codeArtifactOptions: CodeArtifactOptions;
```
- *Type:* projen.javascript.CodeArtifactOptions
- *Default:* undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
---
##### `deleteOrphanedLockFiles`Optional
```typescript
public readonly deleteOrphanedLockFiles: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically delete lockfiles from package managers that are not the active one.
Only triggered when the lockfile for the configured package
manager already exists.
This is useful when migrating between package managers to avoid conflicts.
---
##### `deps`Optional
```typescript
public readonly deps: string[];
```
- *Type:* string[]
- *Default:* []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'express', 'lodash', 'foo@^2' ]
```
##### `description`Optional
```typescript
public readonly description: string;
```
- *Type:* string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
---
##### `devDeps`Optional
```typescript
public readonly devDeps: string[];
```
- *Type:* string[]
- *Default:* []
Build dependencies for this module.
These dependencies will only be
available in your build environment but will not be fetched when this
module is consumed.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'typescript', '@types/express' ]
```
##### `devEngines`Optional
```typescript
public readonly devEngines: DevEngines;
```
- *Type:* projen.javascript.DevEngines
Configure the `devEngines` field in `package.json`.
The `devEngines.packageManager` field is automatically populated based on
the resolved `packageManager` value. Any fields provided here are merged
with the auto-populated `packageManager` entry.
> [https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines)
---
##### `entrypoint`Optional
```typescript
public readonly entrypoint: string;
```
- *Type:* string
- *Default:* "lib/index.js"
Module entrypoint (`main` in `package.json`).
Set to an empty string to not include `main` in your package.json
---
##### `homepage`Optional
```typescript
public readonly homepage: string;
```
- *Type:* string
Package's Homepage / Website.
---
##### `keywords`Optional
```typescript
public readonly keywords: string[];
```
- *Type:* string[]
Keywords to include in `package.json`.
---
##### `license`Optional
```typescript
public readonly license: string;
```
- *Type:* string
- *Default:* "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the `licensed` option if you want to no license to be specified.
---
##### `licensed`Optional
```typescript
public readonly licensed: boolean;
```
- *Type:* boolean
- *Default:* true
Indicates if a license should be added.
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
- *Default:* no maximum version is enforced
The maximum node version supported by this package. Most projects should not use this option.
The value indicates that the package is incompatible with any newer versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option.
Consider this option only if your package is known to not function with newer versions of node.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
- *Default:* no minimum version is enforced
The minimum node version required by this package to function. Most projects should not use this option.
The value indicates that the package is incompatible with any older versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
Setting this option has very high impact on the consumers of your package,
as package managers will actively prevent usage with node versions you have marked as incompatible.
To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
---
##### `npmAccess`Optional
```typescript
public readonly npmAccess: NpmAccess;
```
- *Type:* projen.javascript.NpmAccess
- *Default:* for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
Access level of the npm package.
---
##### `npmProvenance`Optional
```typescript
public readonly npmProvenance: boolean;
```
- *Type:* boolean
- *Default:* true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and
you will need to use a supported CI/CD provider.
Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
> [https://docs.npmjs.com/generating-provenance-statements](https://docs.npmjs.com/generating-provenance-statements)
---
##### `npmRegistryUrl`Optional
```typescript
public readonly npmRegistryUrl: string;
```
- *Type:* string
- *Default:* "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
---
##### `npmTokenSecret`Optional
```typescript
public readonly npmTokenSecret: string;
```
- *Type:* string
- *Default:* "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
---
##### `npmTrustedPublishing`Optional
```typescript
public readonly npmTrustedPublishing: boolean;
```
- *Type:* boolean
- *Default:* false
Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
---
##### `packageManager`Optional
```typescript
public readonly packageManager: NodePackageManager;
```
- *Type:* projen.javascript.NodePackageManager
- *Default:* Detected from the calling process or `YARN_CLASSIC` if detection fails.
The Node Package Manager used to execute scripts.
---
##### `packageName`Optional
```typescript
public readonly packageName: string;
```
- *Type:* string
- *Default:* defaults to project name
The "name" in package.json.
---
##### `peerDependencyOptions`Optional
```typescript
public readonly peerDependencyOptions: PeerDependencyOptions;
```
- *Type:* projen.javascript.PeerDependencyOptions
Options for `peerDeps`.
---
##### `peerDeps`Optional
```typescript
public readonly peerDeps: string[];
```
- *Type:* string[]
- *Default:* []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the _consumer_ of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the `node_modules` tree of your consumers.
Note that prior to npm@7, peer dependencies are _not_ automatically
installed, which means that adding peer dependencies to a library will be a
breaking change for your customers.
Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
---
##### `pnpmOptions`Optional
```typescript
public readonly pnpmOptions: PnpmOptions;
```
- *Type:* projen.javascript.PnpmOptions
- *Default:* all default options
Options for pnpm.
---
##### `pnpmVersion`Optional
```typescript
public readonly pnpmVersion: string;
```
- *Type:* string
- *Default:* "10.33.0"
The version of PNPM to use if using PNPM as a package manager.
---
##### `repository`Optional
```typescript
public readonly repository: string;
```
- *Type:* string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
---
##### `repositoryDirectory`Optional
```typescript
public readonly repositoryDirectory: string;
```
- *Type:* string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
---
##### `scopedPackagesOptions`Optional
```typescript
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
```
- *Type:* projen.javascript.ScopedPackagesOptions[]
- *Default:* fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
---
##### `stability`Optional
```typescript
public readonly stability: string;
```
- *Type:* string
Package's Stability.
---
##### `yarnBerryOptions`Optional
```typescript
public readonly yarnBerryOptions: YarnBerryOptions;
```
- *Type:* projen.javascript.YarnBerryOptions
- *Default:* Yarn Berry v4 with all default options
Options for Yarn Berry.
---
##### `bumpPackage`Optional
```typescript
public readonly bumpPackage: string;
```
- *Type:* string
- *Default:* A recent version of "commit-and-tag-version"
The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
This can be any compatible package version, including the deprecated `standard-version@9`.
---
##### `jsiiReleaseVersion`Optional
```typescript
public readonly jsiiReleaseVersion: string;
```
- *Type:* string
- *Default:* "latest"
Version requirement of `publib` which is used to publish modules to npm.
---
##### `majorVersion`Optional
```typescript
public readonly majorVersion: number;
```
- *Type:* number
- *Default:* Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line.
If not specified, we bump the global latest version.
---
##### `minMajorVersion`Optional
```typescript
public readonly minMajorVersion: number;
```
- *Type:* number
- *Default:* No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major
release are not incrementing the major version number.
Can not be set together with `majorVersion`.
---
##### `nextVersionCommand`Optional
```typescript
public readonly nextVersionCommand: string;
```
- *Type:* string
- *Default:* The next version will be determined based on the commit history and project settings.
A shell command to control the next version to release.
If present, this shell command will be run before the bump is executed, and
it determines what version to release. It will be executed in the following
environment:
- Working directory: the project directory.
- `$VERSION`: the current version. Looks like `1.2.3`.
- `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
- `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
The command should print one of the following to `stdout`:
- Nothing: the next version number will be determined based on commit history.
- `x.y.z`: the next version number will be `x.y.z`.
- `major|minor|patch`: the next version number will be the current version number
with the indicated component bumped.
This setting cannot be specified together with `minMajorVersion`; the invoked
script can be used to achieve the effects of `minMajorVersion`.
---
##### `npmDistTag`Optional
```typescript
public readonly npmDistTag: string;
```
- *Type:* string
- *Default:* "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the `npmDistTag` property
for each branch.
---
##### `postBuildSteps`Optional
```typescript
public readonly postBuildSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* []
Steps to execute after build as part of the release workflow.
---
##### `prerelease`Optional
```typescript
public readonly prerelease: string;
```
- *Type:* string
- *Default:* normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
---
##### `publishDryRun`Optional
```typescript
public readonly publishDryRun: boolean;
```
- *Type:* boolean
- *Default:* false
Instead of actually publishing to package managers, just print the publishing command.
---
##### `publishTasks`Optional
```typescript
public readonly publishTasks: boolean;
```
- *Type:* boolean
- *Default:* false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this
in order to create a publishing task for each publishing activity.
---
##### `releasableCommits`Optional
```typescript
public readonly releasableCommits: ReleasableCommits;
```
- *Type:* projen.ReleasableCommits
- *Default:* ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
---
##### `releaseBranches`Optional
```typescript
public readonly releaseBranches: {[ key: string ]: BranchOptions};
```
- *Type:* {[ key: string ]: projen.release.BranchOptions}
- *Default:* no additional branches are used for release. you can use `addBranch()` to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch _must_ be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the `majorVersion` field must also
be provided for the default branch.
---
##### `releaseEnvironment`Optional
```typescript
public readonly releaseEnvironment: string;
```
- *Type:* string
- *Default:* no environment used, unless set at the artifact level
The GitHub Actions environment used for the release.
This can be used to add an explicit approval step to the release
or limit who can initiate a release through environment protection rules.
When multiple artifacts are released, the environment can be overwritten
on a per artifact basis.
---
##### `releaseFailureIssue`Optional
```typescript
public readonly releaseFailureIssue: boolean;
```
- *Type:* boolean
- *Default:* false
Create a github issue on every failed publishing task.
---
##### `releaseFailureIssueLabel`Optional
```typescript
public readonly releaseFailureIssueLabel: string;
```
- *Type:* string
- *Default:* "failed-release"
The label to apply to issues indicating publish failures.
Only applies if `releaseFailureIssue` is true.
---
##### `releaseTagPrefix`Optional
```typescript
public readonly releaseTagPrefix: string;
```
- *Type:* string
- *Default:* "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version
when bumping, so if you change this on a project with an existing version
history, you may need to manually tag your latest release
with the new prefix.
---
##### `releaseTrigger`Optional
```typescript
public readonly releaseTrigger: ReleaseTrigger;
```
- *Type:* projen.release.ReleaseTrigger
- *Default:* Continuous releases (`ReleaseTrigger.continuous()`)
The release trigger to use.
---
##### `releaseWorkflowEnv`Optional
```typescript
public readonly releaseWorkflowEnv: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
- *Default:* {}
Build environment variables for release workflows.
---
##### `releaseWorkflowName`Optional
```typescript
public readonly releaseWorkflowName: string;
```
- *Type:* string
- *Default:* "release"
The name of the default release workflow.
---
##### `releaseWorkflowSetupSteps`Optional
```typescript
public readonly releaseWorkflowSetupSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
---
##### `versionrcOptions`Optional
```typescript
public readonly versionrcOptions: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with commit-and-tag-version package.
Given values either append to default configuration or overwrite values in it.
---
##### `workflowContainerImage`Optional
```typescript
public readonly workflowContainerImage: string;
```
- *Type:* string
- *Default:* default image
Container image to use for GitHub workflows.
---
##### `workflowRunsOn`Optional
```typescript
public readonly workflowRunsOn: string[];
```
- *Type:* string[]
- *Default:* ["ubuntu-latest"]
Github Runner selection labels.
---
##### `workflowRunsOnGroup`Optional
```typescript
public readonly workflowRunsOnGroup: GroupRunnerOptions;
```
- *Type:* projen.GroupRunnerOptions
Github Runner Group selection options.
---
##### `artifactsDirectory`Optional
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
- *Default:* "dist"
A directory which will contain build artifacts.
---
##### `auditDeps`Optional
```typescript
public readonly auditDeps: boolean;
```
- *Type:* boolean
- *Default:* false
Run security audit on dependencies.
When enabled, creates an "audit" task that checks for known security vulnerabilities
in dependencies. By default, runs during every build and checks for "high" severity
vulnerabilities or above in all dependencies (including dev dependencies).
---
##### `auditDepsOptions`Optional
```typescript
public readonly auditDepsOptions: AuditOptions;
```
- *Type:* projen.javascript.AuditOptions
- *Default:* default options
Security audit options.
---
##### `autoApproveUpgrades`Optional
```typescript
public readonly autoApproveUpgrades: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured).
Throw if set to true but `autoApproveOptions` are not defined.
---
##### `biome`Optional
```typescript
public readonly biome: boolean;
```
- *Type:* boolean
- *Default:* false
Setup Biome.
---
##### `biomeOptions`Optional
```typescript
public readonly biomeOptions: BiomeOptions;
```
- *Type:* projen.javascript.BiomeOptions
- *Default:* default options
Biome options.
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Define a GitHub workflow for building PRs.
---
##### `buildWorkflowOptions`Optional
```typescript
public readonly buildWorkflowOptions: BuildWorkflowOptions;
```
- *Type:* projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
---
##### `bundlerOptions`Optional
```typescript
public readonly bundlerOptions: BundlerOptions;
```
- *Type:* projen.javascript.BundlerOptions
Options for `Bundler`.
---
##### `checkLicenses`Optional
```typescript
public readonly checkLicenses: LicenseCheckerOptions;
```
- *Type:* projen.javascript.LicenseCheckerOptions
- *Default:* no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
---
##### `codeCov`Optional
```typescript
public readonly codeCov: boolean;
```
- *Type:* boolean
- *Default:* false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
---
##### `codeCovTokenSecret`Optional
```typescript
public readonly codeCovTokenSecret: string;
```
- *Type:* string
- *Default:* OIDC auth is used
Define the secret name for a specified https://codecov.io/ token.
---
##### `copyrightOwner`Optional
```typescript
public readonly copyrightOwner: string;
```
- *Type:* string
- *Default:* defaults to the value of authorName or "" if `authorName` is undefined.
License copyright owner.
This value is only used if the selected license text contains the
`$copyright_owner` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `copyrightPeriod`Optional
```typescript
public readonly copyrightPeriod: string;
```
- *Type:* string
- *Default:* current year
The copyright years to put in the LICENSE file.
This value is only used if the selected license text contains the
`$copyright_period` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `defaultReleaseBranch`Optional
```typescript
public readonly defaultReleaseBranch: string;
```
- *Type:* string
- *Default:* "main"
The name of the main release branch.
---
##### `dependabot`Optional
```typescript
public readonly dependabot: boolean;
```
- *Type:* boolean
- *Default:* false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with `depsUpgrade`.
---
##### `dependabotOptions`Optional
```typescript
public readonly dependabotOptions: DependabotOptions;
```
- *Type:* projen.github.DependabotOptions
- *Default:* default options
Options for dependabot.
---
##### `depsUpgrade`Optional
```typescript
public readonly depsUpgrade: boolean;
```
- *Type:* boolean
- *Default:* `true` for root projects, `false` for subprojects
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with `dependabot`.
---
##### `depsUpgradeOptions`Optional
```typescript
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
```
- *Type:* projen.javascript.UpgradeDependenciesOptions
- *Default:* default options
Options for `UpgradeDependencies`.
---
##### `gitignore`Optional
```typescript
public readonly gitignore: string[];
```
- *Type:* string[]
Additional entries to .gitignore.
---
##### `jest`Optional
```typescript
public readonly jest: boolean;
```
- *Type:* boolean
- *Default:* true
Setup jest unit tests.
---
##### `jestOptions`Optional
```typescript
public readonly jestOptions: JestOptions;
```
- *Type:* projen.javascript.JestOptions
- *Default:* default options
Jest options.
---
##### `npmignoreEnabled`Optional
```typescript
public readonly npmignoreEnabled: boolean;
```
- *Type:* boolean
- *Default:* true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
---
##### `npmIgnoreOptions`Optional
```typescript
public readonly npmIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .npmignore file.
---
##### `package`Optional
```typescript
public readonly package: boolean;
```
- *Type:* boolean
- *Default:* true
Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
---
##### `prettier`Optional
```typescript
public readonly prettier: boolean;
```
- *Type:* boolean
- *Default:* false
Setup prettier.
---
##### `prettierOptions`Optional
```typescript
public readonly prettierOptions: PrettierOptions;
```
- *Type:* projen.javascript.PrettierOptions
- *Default:* default options
Prettier options.
---
##### `projenDevDependency`Optional
```typescript
public readonly projenDevDependency: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Indicates of "projen" should be installed as a devDependency.
---
##### `projenrcJs`Optional
```typescript
public readonly projenrcJs: boolean;
```
- *Type:* boolean
- *Default:* true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
---
##### `projenrcJsOptions`Optional
```typescript
public readonly projenrcJsOptions: ProjenrcOptions;
```
- *Type:* projen.javascript.ProjenrcOptions
- *Default:* default options
Options for .projenrc.js.
---
##### `projenVersion`Optional
```typescript
public readonly projenVersion: string;
```
- *Type:* string
- *Default:* Defaults to the latest version.
Version of projen to install.
---
##### `pullRequestTemplate`Optional
```typescript
public readonly pullRequestTemplate: boolean;
```
- *Type:* boolean
- *Default:* true
Include a GitHub pull request template.
---
##### `pullRequestTemplateContents`Optional
```typescript
public readonly pullRequestTemplateContents: string[];
```
- *Type:* string[]
- *Default:* default content
The contents of the pull request template.
---
##### `release`Optional
```typescript
public readonly release: boolean;
```
- *Type:* boolean
- *Default:* true (false for subprojects)
Add release management to this project.
---
##### `releaseToNpm`Optional
```typescript
public readonly releaseToNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Automatically release to npm when new versions are introduced.
---
##### `workflowBootstrapSteps`Optional
```typescript
public readonly workflowBootstrapSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
---
##### `workflowGitIdentity`Optional
```typescript
public readonly workflowGitIdentity: GitIdentity;
```
- *Type:* projen.github.GitIdentity
- *Default:* default GitHub Actions user
The git identity to use in workflows.
---
##### `workflowNodeVersion`Optional
```typescript
public readonly workflowNodeVersion: string;
```
- *Type:* string
- *Default:* `minNodeVersion` if set, otherwise `lts/*`.
The node version used in GitHub Actions workflows.
Always use this option if your GitHub Actions workflows require a specific to run.
---
##### `workflowPackageCache`Optional
```typescript
public readonly workflowPackageCache: boolean;
```
- *Type:* boolean
- *Default:* false
Enable Node.js package cache in GitHub workflows.
---
##### `disableTsconfig`Optional
```typescript
public readonly disableTsconfig: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
---
##### `disableTsconfigDev`Optional
```typescript
public readonly disableTsconfigDev: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a development tsconfig file.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
- *Default:* false
Docgen by Typedoc.
---
##### `docsDirectory`Optional
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
- *Default:* "docs"
Docs directory.
---
##### `entrypointTypes`Optional
```typescript
public readonly entrypointTypes: string;
```
- *Type:* string
- *Default:* .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
---
##### `eslint`Optional
```typescript
public readonly eslint: boolean;
```
- *Type:* boolean
- *Default:* true, unless biome is enabled
Setup eslint.
---
##### `eslintOptions`Optional
```typescript
public readonly eslintOptions: EslintOptions;
```
- *Type:* projen.javascript.EslintOptions
- *Default:* opinionated default options
Eslint options.
---
##### `libdir`Optional
```typescript
public readonly libdir: string;
```
- *Type:* string
- *Default:* "lib"
Typescript artifacts output directory.
---
##### `projenrcTs`Optional
```typescript
public readonly projenrcTs: boolean;
```
- *Type:* boolean
- *Default:* false
Use TypeScript for your projenrc file (`.projenrc.ts`).
---
##### `projenrcTsOptions`Optional
```typescript
public readonly projenrcTsOptions: ProjenrcOptions;
```
- *Type:* projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
---
##### `runner`Optional
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
- *Default:* TypeScriptRunner.tsNode()
The TypeScript runner to use for executing TypeScript files.
This is a project-level setting that components (e.g. projenrc) will
use as their default runner.
---
##### `sampleCode`Optional
```typescript
public readonly sampleCode: boolean;
```
- *Type:* boolean
- *Default:* true
Generate one-time sample in `src/` and `test/` if there are no files there.
---
##### `srcdir`Optional
```typescript
public readonly srcdir: string;
```
- *Type:* string
- *Default:* "src"
Typescript sources directory.
---
##### `testdir`Optional
```typescript
public readonly testdir: string;
```
- *Type:* string
- *Default:* "test"
Jest tests directory. Tests files should be named `xxx.test.ts`.
If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
then tests are going to be compiled into `lib/` and executed as javascript.
If the test directory is outside of `src`, then we configure jest to
compile the code in-memory.
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* default options
Custom TSConfig.
---
##### `tsconfigDev`Optional
```typescript
public readonly tsconfigDev: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
---
##### `tsconfigDevFile`Optional
```typescript
public readonly tsconfigDevFile: string;
```
- *Type:* string
- *Default:* "{testdir}/tsconfig.json"
The name (and path) of the development tsconfig file.
By default this lives inside the test directory (e.g. `test/tsconfig.json`)
so that the TypeScript language service resolves it as the nearest config
for test files.
---
##### `tsJestOptions`Optional
```typescript
public readonly tsJestOptions: TsJestOptions;
```
- *Type:* projen.typescript.TsJestOptions
Options for ts-jest.
---
##### `typescriptVersion`Optional
```typescript
public readonly typescriptVersion: string;
```
- *Type:* string
- *Default:* "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
---
##### `amplifyApps`Optional
```typescript
public readonly amplifyApps: MonorepoAmplifyApp[];
```
- *Type:* MonorepoAmplifyApp[]
- *Default:* []
AWS Amplify Hosting applications.
When set, an `amplify.yml` is generated
with one entry per app. When omitted, no `amplify.yml` is created.
---
##### `amplifyDeployOptions`Optional
```typescript
public readonly amplifyDeployOptions: GitHubAmplifyDeployOptions;
```
- *Type:* GitHubAmplifyDeployOptions
- *Default:* Amplify's own auto-build is left in place
Drive Amplify Hosting builds from GitHub Actions instead of Amplify's own auto-build, so an app only rebuilds when the packages it is built from actually changed (see `GitHubAmplifyDeploy`).
Setting this generates one deploy workflow per listed app. The project's
CDK app must disable `autoBuild` on the tracked branches and provide the
app-id parameters and build-trigger role the workflows expect.
---
##### `approverMapping`Optional
```typescript
public readonly approverMapping: MonorepoApproverMapping[];
```
- *Type:* MonorepoApproverMapping[]
- *Default:* hoegertn and hoegerma review each other
Author-to-approvers routing for the PR approver assignment.
Only used when `assignApprover` is enabled.
---
##### `assignApprover`Optional
```typescript
public readonly assignApprover: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to assign PR approvers via `GitHubAssignApprover`.
---
##### `cdkServerless`Optional
```typescript
public readonly cdkServerless: boolean;
```
- *Type:* boolean
- *Default:* false
Whether to add `cdk-serverless` as a workspace dev dependency.
---
##### `defaultApprovers`Optional
```typescript
public readonly defaultApprovers: string[];
```
- *Type:* string[]
- *Default:* ['hoegertn', 'hoegerma']
Approvers assigned when no author-specific mapping matches.
Only used when `assignApprover` is enabled.
---
##### `nodeVersion`Optional
```typescript
public readonly nodeVersion: string;
```
- *Type:* string
- *Default:* '22'
The Node.js version used in the generated build workflow.
---
##### `pnpmWorkspaceVersion`Optional
```typescript
public readonly pnpmWorkspaceVersion: string;
```
- *Type:* string
- *Default:* '10.33.0'
The pnpm version pinned for the workspace and CI.
---
##### `productionRelease`Optional
```typescript
public readonly productionRelease: boolean;
```
- *Type:* boolean
- *Default:* false
Whether to add a manual "Production Release" workflow that promotes a branch to the production branch (see `GitHubProductionRelease`).
---
##### `productionReleaseOptions`Optional
```typescript
public readonly productionReleaseOptions: GitHubProductionReleaseOptions;
```
- *Type:* GitHubProductionReleaseOptions
- *Default:* promote `main` to a `production` branch
Options for the production release workflow.
Only used when
`productionRelease` is enabled.
---
##### `runTestsInBuild`Optional
```typescript
public readonly runTestsInBuild: boolean;
```
- *Type:* boolean
- *Default:* true
Whether the unified build workflow also runs `pnpm -r run test`.
---
##### `workspaceOptions`Optional
```typescript
public readonly workspaceOptions: MonorepoWorkspaceOptions;
```
- *Type:* MonorepoWorkspaceOptions
PNPM workspace tuning for the generated `pnpm-workspace.yaml`.
---
### MonorepoWorkspaceOptions
PNPM workspace tuning for the generated `pnpm-workspace.yaml`.
#### Initializer
```typescript
import { MonorepoWorkspaceOptions } from '@taimos/projen'
const monorepoWorkspaceOptions: MonorepoWorkspaceOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| allowedBuilds | string[] | Dependencies allowed to run install/build scripts. |
| minimumReleaseAge | number | Minimum age in minutes a published version must have before it may be installed (`minimumReleaseAge`). |
| minimumReleaseAgeExclude | string[] | Packages exempt from `minimumReleaseAge` so our own tooling can update without the cooldown. |
| overrides | {[ key: string ]: string} | Version overrides forced across the whole workspace (the `overrides:` field). |
| packages | string[] | The workspace package globs. |
---
##### `allowedBuilds`Optional
```typescript
public readonly allowedBuilds: string[];
```
- *Type:* string[]
- *Default:* ['@aws-amplify/cli', 'esbuild', 'sharp', 'unrs-resolver']
Dependencies allowed to run install/build scripts.
pnpm >= 10 blocks these
by default. The list populates both `allowBuilds` and
`onlyBuiltDependencies` so pnpm does not treat `node_modules` as stale.
---
##### `minimumReleaseAge`Optional
```typescript
public readonly minimumReleaseAge: number;
```
- *Type:* number
- *Default:* 2880 // 2 days
Minimum age in minutes a published version must have before it may be installed (`minimumReleaseAge`).
---
##### `minimumReleaseAgeExclude`Optional
```typescript
public readonly minimumReleaseAgeExclude: string[];
```
- *Type:* string[]
- *Default:* ['projen-pipelines', 'cdk-serverless', '@taimos/projen']
Packages exempt from `minimumReleaseAge` so our own tooling can update without the cooldown.
---
##### `overrides`Optional
```typescript
public readonly overrides: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
- *Default:* {}
Version overrides forced across the whole workspace (the `overrides:` field).
Omitted from the file when empty.
---
##### `packages`Optional
```typescript
public readonly packages: string[];
```
- *Type:* string[]
- *Default:* ['packages/*']
The workspace package globs.
---
### PrivateTaimosCdkAppOptions
#### Initializer
```typescript
import { PrivateTaimosCdkAppOptions } from '@taimos/projen'
const privateTaimosCdkAppOptions: PrivateTaimosCdkAppOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| name | string | This is the name of your project. |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| gitIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .gitignore file. |
| gitOptions | projen.GitOptions | Configuration options for git. |
| logging | projen.LoggerOptions | Configure logging options such as verbosity. |
| outdir | string | The root directory of the project. |
| parent | projen.Project | The parent project, if this project is part of a bigger project. |
| projectTree | boolean | Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging. |
| projenCommand | string | The shell command to use in order to run the projen CLI. |
| projenrcJson | boolean | Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. |
| projenrcJsonOptions | projen.ProjenrcJsonOptions | Options for .projenrc.json. |
| renovatebot | boolean | Use renovatebot to handle dependency upgrades. |
| renovatebotOptions | projen.RenovatebotOptions | Options for renovatebot. |
| autoApproveOptions | projen.github.AutoApproveOptions | Enable and configure the 'auto approve' workflow. |
| autoMerge | boolean | Enable automatic merging on GitHub. |
| autoMergeOptions | projen.github.AutoMergeOptions | Configure options for automatic merging on GitHub. |
| clobber | boolean | Add a `clobber` task which resets the repo to origin. |
| devContainer | boolean | Add a VSCode development environment (used for GitHub Codespaces). |
| github | boolean | Enable GitHub integration. |
| githubOptions | projen.github.GitHubOptions | Options for GitHub integration. |
| gitpod | boolean | Add a Gitpod development environment. |
| projenCredentials | projen.github.GithubCredentials | Choose a method of providing GitHub API access for projen workflows. |
| readme | projen.SampleReadmeProps | The README setup. |
| stale | boolean | Auto-close of stale issues and pull request. |
| staleOptions | projen.github.StaleOptions | Auto-close stale issues and pull requests. |
| vscode | boolean | Enable VSCode integration. |
| addPackageManagerToDevEngines | boolean | Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`. |
| allowLibraryDependencies | boolean | Allow the project to include `peerDependencies` and `bundledDependencies`. |
| allowScripts | string[] | List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation. |
| authorEmail | string | Author's e-mail. |
| authorName | string | Author's name. |
| authorOrganization | boolean | Is the author an organization. |
| authorUrl | string | Author's URL / Website. |
| autoDetectBin | boolean | Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. |
| bin | {[ key: string ]: string} | Binary programs vended with your module. |
| bugsEmail | string | The email address to which issues should be reported. |
| bugsUrl | string | The url to your project's issue tracker. |
| bundledDeps | string[] | List of dependencies to bundle into this module. |
| bunVersion | string | The version of Bun to use if using Bun as a package manager. |
| codeArtifactOptions | projen.javascript.CodeArtifactOptions | Options for npm packages using AWS CodeArtifact. |
| deleteOrphanedLockFiles | boolean | Automatically delete lockfiles from package managers that are not the active one. |
| deps | string[] | Runtime dependencies of this module. |
| description | string | The description is just a string that helps people understand the purpose of the package. |
| devDeps | string[] | Build dependencies for this module. |
| devEngines | projen.javascript.DevEngines | Configure the `devEngines` field in `package.json`. |
| entrypoint | string | Module entrypoint (`main` in `package.json`). |
| homepage | string | Package's Homepage / Website. |
| keywords | string[] | Keywords to include in `package.json`. |
| license | string | License's SPDX identifier. |
| licensed | boolean | Indicates if a license should be added. |
| maxNodeVersion | string | The maximum node version supported by this package. Most projects should not use this option. |
| minNodeVersion | string | The minimum node version required by this package to function. Most projects should not use this option. |
| npmAccess | projen.javascript.NpmAccess | Access level of the npm package. |
| npmProvenance | boolean | Should provenance statements be generated when the package is published. |
| npmRegistryUrl | string | The base URL of the npm package registry. |
| npmTokenSecret | string | GitHub secret which contains the NPM token to use when publishing packages. |
| npmTrustedPublishing | boolean | Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. |
| packageManager | projen.javascript.NodePackageManager | The Node Package Manager used to execute scripts. |
| packageName | string | The "name" in package.json. |
| peerDependencyOptions | projen.javascript.PeerDependencyOptions | Options for `peerDeps`. |
| peerDeps | string[] | Peer dependencies for this module. |
| pnpmOptions | projen.javascript.PnpmOptions | Options for pnpm. |
| pnpmVersion | string | The version of PNPM to use if using PNPM as a package manager. |
| repository | string | The repository is the location where the actual code for your package lives. |
| repositoryDirectory | string | If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
| scopedPackagesOptions | projen.javascript.ScopedPackagesOptions[] | Options for privately hosted scoped packages. |
| stability | string | Package's Stability. |
| yarnBerryOptions | projen.javascript.YarnBerryOptions | Options for Yarn Berry. |
| bumpPackage | string | The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string. |
| jsiiReleaseVersion | string | Version requirement of `publib` which is used to publish modules to npm. |
| majorVersion | number | Major version to release from the default branch. |
| minMajorVersion | number | Minimal Major version to release. |
| nextVersionCommand | string | A shell command to control the next version to release. |
| npmDistTag | string | The npmDistTag to use when publishing from the default branch. |
| postBuildSteps | projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| prerelease | string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| publishDryRun | boolean | Instead of actually publishing to package managers, just print the publishing command. |
| publishTasks | boolean | Define publishing tasks that can be executed manually as well as workflows. |
| releasableCommits | projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
| releaseBranches | {[ key: string ]: projen.release.BranchOptions} | Defines additional release branches. |
| releaseEnvironment | string | The GitHub Actions environment used for the release. |
| releaseFailureIssue | boolean | Create a github issue on every failed publishing task. |
| releaseFailureIssueLabel | string | The label to apply to issues indicating publish failures. |
| releaseTagPrefix | string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
| releaseTrigger | projen.release.ReleaseTrigger | The release trigger to use. |
| releaseWorkflowEnv | {[ key: string ]: string} | Build environment variables for release workflows. |
| releaseWorkflowName | string | The name of the default release workflow. |
| releaseWorkflowSetupSteps | projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| versionrcOptions | {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| workflowContainerImage | string | Container image to use for GitHub workflows. |
| workflowRunsOn | string[] | Github Runner selection labels. |
| workflowRunsOnGroup | projen.GroupRunnerOptions | Github Runner Group selection options. |
| artifactsDirectory | string | A directory which will contain build artifacts. |
| auditDeps | boolean | Run security audit on dependencies. |
| auditDepsOptions | projen.javascript.AuditOptions | Security audit options. |
| autoApproveUpgrades | boolean | Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured). |
| biome | boolean | Setup Biome. |
| biomeOptions | projen.javascript.BiomeOptions | Biome options. |
| buildWorkflow | boolean | Define a GitHub workflow for building PRs. |
| buildWorkflowOptions | projen.javascript.BuildWorkflowOptions | Options for PR build workflow. |
| bundlerOptions | projen.javascript.BundlerOptions | Options for `Bundler`. |
| checkLicenses | projen.javascript.LicenseCheckerOptions | Configure which licenses should be deemed acceptable for use by dependencies. |
| codeCov | boolean | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`. |
| codeCovTokenSecret | string | Define the secret name for a specified https://codecov.io/ token. |
| copyrightOwner | string | License copyright owner. |
| copyrightPeriod | string | The copyright years to put in the LICENSE file. |
| defaultReleaseBranch | string | The name of the main release branch. |
| dependabot | boolean | Use dependabot to handle dependency upgrades. |
| dependabotOptions | projen.github.DependabotOptions | Options for dependabot. |
| depsUpgrade | boolean | Use tasks and github workflows to handle dependency upgrades. |
| depsUpgradeOptions | projen.javascript.UpgradeDependenciesOptions | Options for `UpgradeDependencies`. |
| gitignore | string[] | Additional entries to .gitignore. |
| jest | boolean | Setup jest unit tests. |
| jestOptions | projen.javascript.JestOptions | Jest options. |
| npmignoreEnabled | boolean | Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
| npmIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .npmignore file. |
| package | boolean | Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). |
| prettier | boolean | Setup prettier. |
| prettierOptions | projen.javascript.PrettierOptions | Prettier options. |
| projenDevDependency | boolean | Indicates of "projen" should be installed as a devDependency. |
| projenrcJs | boolean | Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. |
| projenrcJsOptions | projen.javascript.ProjenrcOptions | Options for .projenrc.js. |
| projenVersion | string | Version of projen to install. |
| pullRequestTemplate | boolean | Include a GitHub pull request template. |
| pullRequestTemplateContents | string[] | The contents of the pull request template. |
| release | boolean | Add release management to this project. |
| releaseToNpm | boolean | Automatically release to npm when new versions are introduced. |
| workflowBootstrapSteps | projen.github.workflows.JobStep[] | Workflow steps to use in order to bootstrap this repo. |
| workflowGitIdentity | projen.github.GitIdentity | The git identity to use in workflows. |
| workflowNodeVersion | string | The node version used in GitHub Actions workflows. |
| workflowPackageCache | boolean | Enable Node.js package cache in GitHub workflows. |
| disableTsconfig | boolean | Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
| disableTsconfigDev | boolean | Do not generate a development tsconfig file. |
| docgen | boolean | Docgen by Typedoc. |
| docsDirectory | string | Docs directory. |
| entrypointTypes | string | The .d.ts file that includes the type declarations for this module. |
| eslint | boolean | Setup eslint. |
| eslintOptions | projen.javascript.EslintOptions | Eslint options. |
| libdir | string | Typescript artifacts output directory. |
| projenrcTs | boolean | Use TypeScript for your projenrc file (`.projenrc.ts`). |
| projenrcTsOptions | projen.typescript.ProjenrcOptions | Options for .projenrc.ts. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner to use for executing TypeScript files. |
| sampleCode | boolean | Generate one-time sample in `src/` and `test/` if there are no files there. |
| srcdir | string | Typescript sources directory. |
| testdir | string | Jest tests directory. Tests files should be named `xxx.test.ts`. |
| tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. |
| tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). |
| tsconfigDevFile | string | The name (and path) of the development tsconfig file. |
| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. |
| typescriptVersion | string | TypeScript version to use. |
| buildCommand | string | A command to execute before synthesis. |
| cdkout | string | cdk.out directory. |
| context | {[ key: string ]: any} | Additional context to include in `cdk.json`. |
| featureFlags | projen.awscdk.ICdkFeatureFlags | Feature flags that should be enabled in `cdk.json`. |
| requireApproval | projen.awscdk.ApprovalLevel | To protect you against unintended changes that affect your security posture, the AWS CDK Toolkit prompts you to approve security-related changes before deploying them. |
| watchExcludes | string[] | Glob patterns to exclude from `cdk watch`. |
| watchIncludes | string[] | Glob patterns to include in `cdk watch`. |
| cdkVersion | string | Minimum version of the AWS CDK to depend on. |
| cdkCliVersion | string | Version range of the AWS CDK CLI to depend on. |
| cdkVersionPinning | boolean | Use pinned version instead of caret version for CDK. |
| constructsVersion | string | Minimum version of the `constructs` library to depend on. |
| app | string | The command line to execute in order to synthesize the CDK application (language specific). |
| appEntrypoint | string | The CDK app's entrypoint (relative to the source directory, which is "src" by default). |
| edgeLambdaAutoDiscover | boolean | Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| experimentalIntegRunner | boolean | Enable experimental support for the AWS CDK integ-runner. |
| integrationTestAutoDiscover | boolean | Automatically discovers and creates integration tests for each `.integ.ts` file in under your test directory. |
| lambdaAutoDiscover | boolean | Automatically adds an `awscdk.LambdaFunction` for each `.lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| lambdaExtensionAutoDiscover | boolean | Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| lambdaOptions | projen.awscdk.LambdaFunctionCommonOptions | Common options for all AWS Lambda functions. |
| singletonLambdaAutoDiscover | boolean | Automatically adds an `awscdk.SingletonFunction` for each `.singleton-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| privateNpm | boolean | Whether to enable private NPM registry authentication. |
| privateNpmTokenEnvVar | string | The environment variable name containing the NPM authentication token. |
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
- *Default:* $BASEDIR
This is the name of your project.
---
##### `commitGenerated`Optional
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to commit the managed files by default.
---
##### `gitIgnoreOptions`Optional
```typescript
public readonly gitIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .gitignore file.
---
##### `gitOptions`Optional
```typescript
public readonly gitOptions: GitOptions;
```
- *Type:* projen.GitOptions
Configuration options for git.
---
##### `logging`Optional
```typescript
public readonly logging: LoggerOptions;
```
- *Type:* projen.LoggerOptions
- *Default:* {}
Configure logging options such as verbosity.
---
##### `outdir`Optional
```typescript
public readonly outdir: string;
```
- *Type:* string
- *Default:* "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent
directory and it cannot be the same as the parent or any of it's other
subprojects.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
The parent project, if this project is part of a bigger project.
---
##### `projectTree`Optional
```typescript
public readonly projectTree: boolean;
```
- *Type:* boolean
- *Default:* false
Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging.
---
##### `projenCommand`Optional
```typescript
public readonly projenCommand: string;
```
- *Type:* string
- *Default:* "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
---
##### `projenrcJson`Optional
```typescript
public readonly projenrcJson: boolean;
```
- *Type:* boolean
- *Default:* false
Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
---
##### `projenrcJsonOptions`Optional
```typescript
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
```
- *Type:* projen.ProjenrcJsonOptions
- *Default:* default options
Options for .projenrc.json.
---
##### `renovatebot`Optional
```typescript
public readonly renovatebot: boolean;
```
- *Type:* boolean
- *Default:* false
Use renovatebot to handle dependency upgrades.
---
##### `renovatebotOptions`Optional
```typescript
public readonly renovatebotOptions: RenovatebotOptions;
```
- *Type:* projen.RenovatebotOptions
- *Default:* default options
Options for renovatebot.
---
##### `autoApproveOptions`Optional
```typescript
public readonly autoApproveOptions: AutoApproveOptions;
```
- *Type:* projen.github.AutoApproveOptions
- *Default:* auto approve is disabled
Enable and configure the 'auto approve' workflow.
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: boolean;
```
- *Type:* boolean
- *Default:* true
Enable automatic merging on GitHub.
Has no effect if `github.mergify`
is set to false.
---
##### `autoMergeOptions`Optional
```typescript
public readonly autoMergeOptions: AutoMergeOptions;
```
- *Type:* projen.github.AutoMergeOptions
- *Default:* see defaults in `AutoMergeOptions`
Configure options for automatic merging on GitHub.
Has no effect if
`github.mergify` or `autoMerge` is set to false.
---
##### `clobber`Optional
```typescript
public readonly clobber: boolean;
```
- *Type:* boolean
- *Default:* true, but false for subprojects
Add a `clobber` task which resets the repo to origin.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: boolean;
```
- *Type:* boolean
- *Default:* false
Add a VSCode development environment (used for GitHub Codespaces).
---
##### `github`Optional
```typescript
public readonly github: boolean;
```
- *Type:* boolean
- *Default:* true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `githubOptions`Optional
```typescript
public readonly githubOptions: GitHubOptions;
```
- *Type:* projen.github.GitHubOptions
- *Default:* see GitHubOptions
Options for GitHub integration.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: boolean;
```
- *Type:* boolean
- *Default:* false
Add a Gitpod development environment.
---
##### `projenCredentials`Optional
```typescript
public readonly projenCredentials: GithubCredentials;
```
- *Type:* projen.github.GithubCredentials
- *Default:* use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
---
##### `readme`Optional
```typescript
public readonly readme: SampleReadmeProps;
```
- *Type:* projen.SampleReadmeProps
- *Default:* { filename: 'README.md', contents: '# replace this' }
The README setup.
---
*Example*
```typescript
"{ filename: 'readme.md', contents: '# title' }"
```
##### `stale`Optional
```typescript
public readonly stale: boolean;
```
- *Type:* boolean
- *Default:* false
Auto-close of stale issues and pull request.
See `staleOptions` for options.
---
##### `staleOptions`Optional
```typescript
public readonly staleOptions: StaleOptions;
```
- *Type:* projen.github.StaleOptions
- *Default:* see defaults in `StaleOptions`
Auto-close stale issues and pull requests.
To disable set `stale` to `false`.
---
##### `vscode`Optional
```typescript
public readonly vscode: boolean;
```
- *Type:* boolean
- *Default:* true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `addPackageManagerToDevEngines`Optional
```typescript
public readonly addPackageManagerToDevEngines: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`.
---
##### `allowLibraryDependencies`Optional
```typescript
public readonly allowLibraryDependencies: boolean;
```
- *Type:* boolean
- *Default:* true
Allow the project to include `peerDependencies` and `bundledDependencies`.
This is normally only allowed for libraries. For apps, there's no meaning
for specifying these.
---
##### `allowScripts`Optional
```typescript
public readonly allowScripts: string[];
```
- *Type:* string[]
- *Default:* all install scripts are allowed to run (package manager default)
List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation.
These scripts can execute arbitrary code, making them a common
supply-chain attack vector. Package managers are moving toward
blocking them by default and requiring an explicit allowlist.
Configuring `allowScripts` sets up that allowlist so scripts only run
for the packages you have explicitly reviewed and trust.
Support for this setting depends on the configured `packageManager`:
- `NPM`: written to the native `allowScripts` field in `package.json`
(requires npm >= 11.16; see https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts).
- `BUN`: written to the native `trustedDependencies` field in
`package.json` (see https://bun.com/docs/pm/lifecycle).
- `PNPM`: written to the `onlyBuiltDependencies` setting in
`pnpm-workspace.yaml` (see https://pnpm.io/settings#onlybuiltdependencies).
- `YARN2`, `YARN_BERRY`: written to the native
`dependenciesMeta..built` allowlist in `package.json`, combined
with `enableScripts: false` in `.yarnrc.yml` (see
https://yarnpkg.com/features/security#postinstalls). If you set
`yarnBerryOptions.yarnRcOptions.enableScripts` explicitly, that value
is respected instead of being overridden.
- `YARN`, `YARN_CLASSIC`: not supported. Yarn Classic has no native
mechanism to allowlist install scripts for specific dependencies.
Setting this option with one of these package managers throws an
error at synthesis time.
---
##### `authorEmail`Optional
```typescript
public readonly authorEmail: string;
```
- *Type:* string
Author's e-mail.
---
##### `authorName`Optional
```typescript
public readonly authorName: string;
```
- *Type:* string
Author's name.
---
##### `authorOrganization`Optional
```typescript
public readonly authorOrganization: boolean;
```
- *Type:* boolean
Is the author an organization.
---
##### `authorUrl`Optional
```typescript
public readonly authorUrl: string;
```
- *Type:* string
Author's URL / Website.
---
##### `autoDetectBin`Optional
```typescript
public readonly autoDetectBin: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
---
##### `bin`Optional
```typescript
public readonly bin: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your `package.json`, but unless `autoDetectBin` is `false`, every
executable file under `bin` will automatically be added to this section.
---
##### `bugsEmail`Optional
```typescript
public readonly bugsEmail: string;
```
- *Type:* string
The email address to which issues should be reported.
---
##### `bugsUrl`Optional
```typescript
public readonly bugsUrl: string;
```
- *Type:* string
The url to your project's issue tracker.
---
##### `bundledDeps`Optional
```typescript
public readonly bundledDeps: string[];
```
- *Type:* string[]
List of dependencies to bundle into this module.
These modules will be
added both to the `dependencies` section and `bundledDependencies` section of
your `package.json`.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
##### `bunVersion`Optional
```typescript
public readonly bunVersion: string;
```
- *Type:* string
- *Default:* "latest"
The version of Bun to use if using Bun as a package manager.
---
##### `codeArtifactOptions`Optional
```typescript
public readonly codeArtifactOptions: CodeArtifactOptions;
```
- *Type:* projen.javascript.CodeArtifactOptions
- *Default:* undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
---
##### `deleteOrphanedLockFiles`Optional
```typescript
public readonly deleteOrphanedLockFiles: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically delete lockfiles from package managers that are not the active one.
Only triggered when the lockfile for the configured package
manager already exists.
This is useful when migrating between package managers to avoid conflicts.
---
##### `deps`Optional
```typescript
public readonly deps: string[];
```
- *Type:* string[]
- *Default:* []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'express', 'lodash', 'foo@^2' ]
```
##### `description`Optional
```typescript
public readonly description: string;
```
- *Type:* string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
---
##### `devDeps`Optional
```typescript
public readonly devDeps: string[];
```
- *Type:* string[]
- *Default:* []
Build dependencies for this module.
These dependencies will only be
available in your build environment but will not be fetched when this
module is consumed.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'typescript', '@types/express' ]
```
##### `devEngines`Optional
```typescript
public readonly devEngines: DevEngines;
```
- *Type:* projen.javascript.DevEngines
Configure the `devEngines` field in `package.json`.
The `devEngines.packageManager` field is automatically populated based on
the resolved `packageManager` value. Any fields provided here are merged
with the auto-populated `packageManager` entry.
> [https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines)
---
##### `entrypoint`Optional
```typescript
public readonly entrypoint: string;
```
- *Type:* string
- *Default:* "lib/index.js"
Module entrypoint (`main` in `package.json`).
Set to an empty string to not include `main` in your package.json
---
##### `homepage`Optional
```typescript
public readonly homepage: string;
```
- *Type:* string
Package's Homepage / Website.
---
##### `keywords`Optional
```typescript
public readonly keywords: string[];
```
- *Type:* string[]
Keywords to include in `package.json`.
---
##### `license`Optional
```typescript
public readonly license: string;
```
- *Type:* string
- *Default:* "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the `licensed` option if you want to no license to be specified.
---
##### `licensed`Optional
```typescript
public readonly licensed: boolean;
```
- *Type:* boolean
- *Default:* true
Indicates if a license should be added.
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
- *Default:* no maximum version is enforced
The maximum node version supported by this package. Most projects should not use this option.
The value indicates that the package is incompatible with any newer versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option.
Consider this option only if your package is known to not function with newer versions of node.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
- *Default:* no minimum version is enforced
The minimum node version required by this package to function. Most projects should not use this option.
The value indicates that the package is incompatible with any older versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
Setting this option has very high impact on the consumers of your package,
as package managers will actively prevent usage with node versions you have marked as incompatible.
To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
---
##### `npmAccess`Optional
```typescript
public readonly npmAccess: NpmAccess;
```
- *Type:* projen.javascript.NpmAccess
- *Default:* for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
Access level of the npm package.
---
##### `npmProvenance`Optional
```typescript
public readonly npmProvenance: boolean;
```
- *Type:* boolean
- *Default:* true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and
you will need to use a supported CI/CD provider.
Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
> [https://docs.npmjs.com/generating-provenance-statements](https://docs.npmjs.com/generating-provenance-statements)
---
##### `npmRegistryUrl`Optional
```typescript
public readonly npmRegistryUrl: string;
```
- *Type:* string
- *Default:* "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
---
##### `npmTokenSecret`Optional
```typescript
public readonly npmTokenSecret: string;
```
- *Type:* string
- *Default:* "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
---
##### `npmTrustedPublishing`Optional
```typescript
public readonly npmTrustedPublishing: boolean;
```
- *Type:* boolean
- *Default:* false
Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
---
##### `packageManager`Optional
```typescript
public readonly packageManager: NodePackageManager;
```
- *Type:* projen.javascript.NodePackageManager
- *Default:* Detected from the calling process or `YARN_CLASSIC` if detection fails.
The Node Package Manager used to execute scripts.
---
##### `packageName`Optional
```typescript
public readonly packageName: string;
```
- *Type:* string
- *Default:* defaults to project name
The "name" in package.json.
---
##### `peerDependencyOptions`Optional
```typescript
public readonly peerDependencyOptions: PeerDependencyOptions;
```
- *Type:* projen.javascript.PeerDependencyOptions
Options for `peerDeps`.
---
##### `peerDeps`Optional
```typescript
public readonly peerDeps: string[];
```
- *Type:* string[]
- *Default:* []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the _consumer_ of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the `node_modules` tree of your consumers.
Note that prior to npm@7, peer dependencies are _not_ automatically
installed, which means that adding peer dependencies to a library will be a
breaking change for your customers.
Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
---
##### `pnpmOptions`Optional
```typescript
public readonly pnpmOptions: PnpmOptions;
```
- *Type:* projen.javascript.PnpmOptions
- *Default:* all default options
Options for pnpm.
---
##### `pnpmVersion`Optional
```typescript
public readonly pnpmVersion: string;
```
- *Type:* string
- *Default:* "10.33.0"
The version of PNPM to use if using PNPM as a package manager.
---
##### `repository`Optional
```typescript
public readonly repository: string;
```
- *Type:* string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
---
##### `repositoryDirectory`Optional
```typescript
public readonly repositoryDirectory: string;
```
- *Type:* string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
---
##### `scopedPackagesOptions`Optional
```typescript
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
```
- *Type:* projen.javascript.ScopedPackagesOptions[]
- *Default:* fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
---
##### `stability`Optional
```typescript
public readonly stability: string;
```
- *Type:* string
Package's Stability.
---
##### `yarnBerryOptions`Optional
```typescript
public readonly yarnBerryOptions: YarnBerryOptions;
```
- *Type:* projen.javascript.YarnBerryOptions
- *Default:* Yarn Berry v4 with all default options
Options for Yarn Berry.
---
##### `bumpPackage`Optional
```typescript
public readonly bumpPackage: string;
```
- *Type:* string
- *Default:* A recent version of "commit-and-tag-version"
The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
This can be any compatible package version, including the deprecated `standard-version@9`.
---
##### `jsiiReleaseVersion`Optional
```typescript
public readonly jsiiReleaseVersion: string;
```
- *Type:* string
- *Default:* "latest"
Version requirement of `publib` which is used to publish modules to npm.
---
##### `majorVersion`Optional
```typescript
public readonly majorVersion: number;
```
- *Type:* number
- *Default:* Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line.
If not specified, we bump the global latest version.
---
##### `minMajorVersion`Optional
```typescript
public readonly minMajorVersion: number;
```
- *Type:* number
- *Default:* No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major
release are not incrementing the major version number.
Can not be set together with `majorVersion`.
---
##### `nextVersionCommand`Optional
```typescript
public readonly nextVersionCommand: string;
```
- *Type:* string
- *Default:* The next version will be determined based on the commit history and project settings.
A shell command to control the next version to release.
If present, this shell command will be run before the bump is executed, and
it determines what version to release. It will be executed in the following
environment:
- Working directory: the project directory.
- `$VERSION`: the current version. Looks like `1.2.3`.
- `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
- `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
The command should print one of the following to `stdout`:
- Nothing: the next version number will be determined based on commit history.
- `x.y.z`: the next version number will be `x.y.z`.
- `major|minor|patch`: the next version number will be the current version number
with the indicated component bumped.
This setting cannot be specified together with `minMajorVersion`; the invoked
script can be used to achieve the effects of `minMajorVersion`.
---
##### `npmDistTag`Optional
```typescript
public readonly npmDistTag: string;
```
- *Type:* string
- *Default:* "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the `npmDistTag` property
for each branch.
---
##### `postBuildSteps`Optional
```typescript
public readonly postBuildSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* []
Steps to execute after build as part of the release workflow.
---
##### `prerelease`Optional
```typescript
public readonly prerelease: string;
```
- *Type:* string
- *Default:* normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
---
##### `publishDryRun`Optional
```typescript
public readonly publishDryRun: boolean;
```
- *Type:* boolean
- *Default:* false
Instead of actually publishing to package managers, just print the publishing command.
---
##### `publishTasks`Optional
```typescript
public readonly publishTasks: boolean;
```
- *Type:* boolean
- *Default:* false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this
in order to create a publishing task for each publishing activity.
---
##### `releasableCommits`Optional
```typescript
public readonly releasableCommits: ReleasableCommits;
```
- *Type:* projen.ReleasableCommits
- *Default:* ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
---
##### `releaseBranches`Optional
```typescript
public readonly releaseBranches: {[ key: string ]: BranchOptions};
```
- *Type:* {[ key: string ]: projen.release.BranchOptions}
- *Default:* no additional branches are used for release. you can use `addBranch()` to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch _must_ be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the `majorVersion` field must also
be provided for the default branch.
---
##### `releaseEnvironment`Optional
```typescript
public readonly releaseEnvironment: string;
```
- *Type:* string
- *Default:* no environment used, unless set at the artifact level
The GitHub Actions environment used for the release.
This can be used to add an explicit approval step to the release
or limit who can initiate a release through environment protection rules.
When multiple artifacts are released, the environment can be overwritten
on a per artifact basis.
---
##### `releaseFailureIssue`Optional
```typescript
public readonly releaseFailureIssue: boolean;
```
- *Type:* boolean
- *Default:* false
Create a github issue on every failed publishing task.
---
##### `releaseFailureIssueLabel`Optional
```typescript
public readonly releaseFailureIssueLabel: string;
```
- *Type:* string
- *Default:* "failed-release"
The label to apply to issues indicating publish failures.
Only applies if `releaseFailureIssue` is true.
---
##### `releaseTagPrefix`Optional
```typescript
public readonly releaseTagPrefix: string;
```
- *Type:* string
- *Default:* "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version
when bumping, so if you change this on a project with an existing version
history, you may need to manually tag your latest release
with the new prefix.
---
##### `releaseTrigger`Optional
```typescript
public readonly releaseTrigger: ReleaseTrigger;
```
- *Type:* projen.release.ReleaseTrigger
- *Default:* Continuous releases (`ReleaseTrigger.continuous()`)
The release trigger to use.
---
##### `releaseWorkflowEnv`Optional
```typescript
public readonly releaseWorkflowEnv: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
- *Default:* {}
Build environment variables for release workflows.
---
##### `releaseWorkflowName`Optional
```typescript
public readonly releaseWorkflowName: string;
```
- *Type:* string
- *Default:* "release"
The name of the default release workflow.
---
##### `releaseWorkflowSetupSteps`Optional
```typescript
public readonly releaseWorkflowSetupSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
---
##### `versionrcOptions`Optional
```typescript
public readonly versionrcOptions: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with commit-and-tag-version package.
Given values either append to default configuration or overwrite values in it.
---
##### `workflowContainerImage`Optional
```typescript
public readonly workflowContainerImage: string;
```
- *Type:* string
- *Default:* default image
Container image to use for GitHub workflows.
---
##### `workflowRunsOn`Optional
```typescript
public readonly workflowRunsOn: string[];
```
- *Type:* string[]
- *Default:* ["ubuntu-latest"]
Github Runner selection labels.
---
##### `workflowRunsOnGroup`Optional
```typescript
public readonly workflowRunsOnGroup: GroupRunnerOptions;
```
- *Type:* projen.GroupRunnerOptions
Github Runner Group selection options.
---
##### `artifactsDirectory`Optional
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
- *Default:* "dist"
A directory which will contain build artifacts.
---
##### `auditDeps`Optional
```typescript
public readonly auditDeps: boolean;
```
- *Type:* boolean
- *Default:* false
Run security audit on dependencies.
When enabled, creates an "audit" task that checks for known security vulnerabilities
in dependencies. By default, runs during every build and checks for "high" severity
vulnerabilities or above in all dependencies (including dev dependencies).
---
##### `auditDepsOptions`Optional
```typescript
public readonly auditDepsOptions: AuditOptions;
```
- *Type:* projen.javascript.AuditOptions
- *Default:* default options
Security audit options.
---
##### `autoApproveUpgrades`Optional
```typescript
public readonly autoApproveUpgrades: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured).
Throw if set to true but `autoApproveOptions` are not defined.
---
##### `biome`Optional
```typescript
public readonly biome: boolean;
```
- *Type:* boolean
- *Default:* false
Setup Biome.
---
##### `biomeOptions`Optional
```typescript
public readonly biomeOptions: BiomeOptions;
```
- *Type:* projen.javascript.BiomeOptions
- *Default:* default options
Biome options.
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Define a GitHub workflow for building PRs.
---
##### `buildWorkflowOptions`Optional
```typescript
public readonly buildWorkflowOptions: BuildWorkflowOptions;
```
- *Type:* projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
---
##### `bundlerOptions`Optional
```typescript
public readonly bundlerOptions: BundlerOptions;
```
- *Type:* projen.javascript.BundlerOptions
Options for `Bundler`.
---
##### `checkLicenses`Optional
```typescript
public readonly checkLicenses: LicenseCheckerOptions;
```
- *Type:* projen.javascript.LicenseCheckerOptions
- *Default:* no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
---
##### `codeCov`Optional
```typescript
public readonly codeCov: boolean;
```
- *Type:* boolean
- *Default:* false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
---
##### `codeCovTokenSecret`Optional
```typescript
public readonly codeCovTokenSecret: string;
```
- *Type:* string
- *Default:* OIDC auth is used
Define the secret name for a specified https://codecov.io/ token.
---
##### `copyrightOwner`Optional
```typescript
public readonly copyrightOwner: string;
```
- *Type:* string
- *Default:* defaults to the value of authorName or "" if `authorName` is undefined.
License copyright owner.
This value is only used if the selected license text contains the
`$copyright_owner` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `copyrightPeriod`Optional
```typescript
public readonly copyrightPeriod: string;
```
- *Type:* string
- *Default:* current year
The copyright years to put in the LICENSE file.
This value is only used if the selected license text contains the
`$copyright_period` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `defaultReleaseBranch`Optional
```typescript
public readonly defaultReleaseBranch: string;
```
- *Type:* string
- *Default:* "main"
The name of the main release branch.
---
##### `dependabot`Optional
```typescript
public readonly dependabot: boolean;
```
- *Type:* boolean
- *Default:* false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with `depsUpgrade`.
---
##### `dependabotOptions`Optional
```typescript
public readonly dependabotOptions: DependabotOptions;
```
- *Type:* projen.github.DependabotOptions
- *Default:* default options
Options for dependabot.
---
##### `depsUpgrade`Optional
```typescript
public readonly depsUpgrade: boolean;
```
- *Type:* boolean
- *Default:* `true` for root projects, `false` for subprojects
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with `dependabot`.
---
##### `depsUpgradeOptions`Optional
```typescript
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
```
- *Type:* projen.javascript.UpgradeDependenciesOptions
- *Default:* default options
Options for `UpgradeDependencies`.
---
##### `gitignore`Optional
```typescript
public readonly gitignore: string[];
```
- *Type:* string[]
Additional entries to .gitignore.
---
##### `jest`Optional
```typescript
public readonly jest: boolean;
```
- *Type:* boolean
- *Default:* true
Setup jest unit tests.
---
##### `jestOptions`Optional
```typescript
public readonly jestOptions: JestOptions;
```
- *Type:* projen.javascript.JestOptions
- *Default:* default options
Jest options.
---
##### `npmignoreEnabled`Optional
```typescript
public readonly npmignoreEnabled: boolean;
```
- *Type:* boolean
- *Default:* true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
---
##### `npmIgnoreOptions`Optional
```typescript
public readonly npmIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .npmignore file.
---
##### `package`Optional
```typescript
public readonly package: boolean;
```
- *Type:* boolean
- *Default:* true
Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
---
##### `prettier`Optional
```typescript
public readonly prettier: boolean;
```
- *Type:* boolean
- *Default:* false
Setup prettier.
---
##### `prettierOptions`Optional
```typescript
public readonly prettierOptions: PrettierOptions;
```
- *Type:* projen.javascript.PrettierOptions
- *Default:* default options
Prettier options.
---
##### `projenDevDependency`Optional
```typescript
public readonly projenDevDependency: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Indicates of "projen" should be installed as a devDependency.
---
##### `projenrcJs`Optional
```typescript
public readonly projenrcJs: boolean;
```
- *Type:* boolean
- *Default:* true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
---
##### `projenrcJsOptions`Optional
```typescript
public readonly projenrcJsOptions: ProjenrcOptions;
```
- *Type:* projen.javascript.ProjenrcOptions
- *Default:* default options
Options for .projenrc.js.
---
##### `projenVersion`Optional
```typescript
public readonly projenVersion: string;
```
- *Type:* string
- *Default:* Defaults to the latest version.
Version of projen to install.
---
##### `pullRequestTemplate`Optional
```typescript
public readonly pullRequestTemplate: boolean;
```
- *Type:* boolean
- *Default:* true
Include a GitHub pull request template.
---
##### `pullRequestTemplateContents`Optional
```typescript
public readonly pullRequestTemplateContents: string[];
```
- *Type:* string[]
- *Default:* default content
The contents of the pull request template.
---
##### `release`Optional
```typescript
public readonly release: boolean;
```
- *Type:* boolean
- *Default:* true (false for subprojects)
Add release management to this project.
---
##### `releaseToNpm`Optional
```typescript
public readonly releaseToNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Automatically release to npm when new versions are introduced.
---
##### `workflowBootstrapSteps`Optional
```typescript
public readonly workflowBootstrapSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
---
##### `workflowGitIdentity`Optional
```typescript
public readonly workflowGitIdentity: GitIdentity;
```
- *Type:* projen.github.GitIdentity
- *Default:* default GitHub Actions user
The git identity to use in workflows.
---
##### `workflowNodeVersion`Optional
```typescript
public readonly workflowNodeVersion: string;
```
- *Type:* string
- *Default:* `minNodeVersion` if set, otherwise `lts/*`.
The node version used in GitHub Actions workflows.
Always use this option if your GitHub Actions workflows require a specific to run.
---
##### `workflowPackageCache`Optional
```typescript
public readonly workflowPackageCache: boolean;
```
- *Type:* boolean
- *Default:* false
Enable Node.js package cache in GitHub workflows.
---
##### `disableTsconfig`Optional
```typescript
public readonly disableTsconfig: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
---
##### `disableTsconfigDev`Optional
```typescript
public readonly disableTsconfigDev: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a development tsconfig file.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
- *Default:* false
Docgen by Typedoc.
---
##### `docsDirectory`Optional
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
- *Default:* "docs"
Docs directory.
---
##### `entrypointTypes`Optional
```typescript
public readonly entrypointTypes: string;
```
- *Type:* string
- *Default:* .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
---
##### `eslint`Optional
```typescript
public readonly eslint: boolean;
```
- *Type:* boolean
- *Default:* true, unless biome is enabled
Setup eslint.
---
##### `eslintOptions`Optional
```typescript
public readonly eslintOptions: EslintOptions;
```
- *Type:* projen.javascript.EslintOptions
- *Default:* opinionated default options
Eslint options.
---
##### `libdir`Optional
```typescript
public readonly libdir: string;
```
- *Type:* string
- *Default:* "lib"
Typescript artifacts output directory.
---
##### `projenrcTs`Optional
```typescript
public readonly projenrcTs: boolean;
```
- *Type:* boolean
- *Default:* false
Use TypeScript for your projenrc file (`.projenrc.ts`).
---
##### `projenrcTsOptions`Optional
```typescript
public readonly projenrcTsOptions: ProjenrcOptions;
```
- *Type:* projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
---
##### `runner`Optional
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
- *Default:* TypeScriptRunner.tsNode()
The TypeScript runner to use for executing TypeScript files.
This is a project-level setting that components (e.g. projenrc) will
use as their default runner.
---
##### `sampleCode`Optional
```typescript
public readonly sampleCode: boolean;
```
- *Type:* boolean
- *Default:* true
Generate one-time sample in `src/` and `test/` if there are no files there.
---
##### `srcdir`Optional
```typescript
public readonly srcdir: string;
```
- *Type:* string
- *Default:* "src"
Typescript sources directory.
---
##### `testdir`Optional
```typescript
public readonly testdir: string;
```
- *Type:* string
- *Default:* "test"
Jest tests directory. Tests files should be named `xxx.test.ts`.
If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
then tests are going to be compiled into `lib/` and executed as javascript.
If the test directory is outside of `src`, then we configure jest to
compile the code in-memory.
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* default options
Custom TSConfig.
---
##### `tsconfigDev`Optional
```typescript
public readonly tsconfigDev: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
---
##### `tsconfigDevFile`Optional
```typescript
public readonly tsconfigDevFile: string;
```
- *Type:* string
- *Default:* "{testdir}/tsconfig.json"
The name (and path) of the development tsconfig file.
By default this lives inside the test directory (e.g. `test/tsconfig.json`)
so that the TypeScript language service resolves it as the nearest config
for test files.
---
##### `tsJestOptions`Optional
```typescript
public readonly tsJestOptions: TsJestOptions;
```
- *Type:* projen.typescript.TsJestOptions
Options for ts-jest.
---
##### `typescriptVersion`Optional
```typescript
public readonly typescriptVersion: string;
```
- *Type:* string
- *Default:* "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
---
##### `buildCommand`Optional
```typescript
public readonly buildCommand: string;
```
- *Type:* string
- *Default:* no build command
A command to execute before synthesis.
This command will be called when
running `cdk synth` or when `cdk watch` identifies a change in your source
code before redeployment.
---
##### `cdkout`Optional
```typescript
public readonly cdkout: string;
```
- *Type:* string
- *Default:* "cdk.out"
cdk.out directory.
---
##### `context`Optional
```typescript
public readonly context: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* no additional context
Additional context to include in `cdk.json`.
---
##### `featureFlags`Optional
```typescript
public readonly featureFlags: ICdkFeatureFlags;
```
- *Type:* projen.awscdk.ICdkFeatureFlags
- *Default:* no feature flags are enabled by default
Feature flags that should be enabled in `cdk.json`.
Make sure to double-check any changes to feature flags in `cdk.json` before deploying.
Unexpected changes may cause breaking changes in your CDK app.
You can overwrite any feature flag by passing it into the context field.
---
##### `requireApproval`Optional
```typescript
public readonly requireApproval: ApprovalLevel;
```
- *Type:* projen.awscdk.ApprovalLevel
- *Default:* ApprovalLevel.BROADENING
To protect you against unintended changes that affect your security posture, the AWS CDK Toolkit prompts you to approve security-related changes before deploying them.
---
##### `watchExcludes`Optional
```typescript
public readonly watchExcludes: string[];
```
- *Type:* string[]
- *Default:* []
Glob patterns to exclude from `cdk watch`.
---
##### `watchIncludes`Optional
```typescript
public readonly watchIncludes: string[];
```
- *Type:* string[]
- *Default:* []
Glob patterns to include in `cdk watch`.
---
##### `cdkVersion`Required
```typescript
public readonly cdkVersion: string;
```
- *Type:* string
- *Default:* "2.189.1"
Minimum version of the AWS CDK to depend on.
---
##### `cdkCliVersion`Optional
```typescript
public readonly cdkCliVersion: string;
```
- *Type:* string
- *Default:* "^2"
Version range of the AWS CDK CLI to depend on.
Can be either a specific version, or an NPM version range.
By default, the latest 2.x version will be installed; you can use this
option to restrict it to a specific version or version range.
---
##### `cdkVersionPinning`Optional
```typescript
public readonly cdkVersionPinning: boolean;
```
- *Type:* boolean
Use pinned version instead of caret version for CDK.
You can use this to prevent mixed versions for your CDK dependencies and to prevent auto-updates.
If you use experimental features this will let you define the moment you include breaking changes.
---
##### `constructsVersion`Optional
```typescript
public readonly constructsVersion: string;
```
- *Type:* string
- *Default:* for CDK 1.x the default is "3.2.27", for CDK 2.x the default is "10.5.1".
Minimum version of the `constructs` library to depend on.
---
##### `app`Optional
```typescript
public readonly app: string;
```
- *Type:* string
The command line to execute in order to synthesize the CDK application (language specific).
---
##### `appEntrypoint`Optional
```typescript
public readonly appEntrypoint: string;
```
- *Type:* string
- *Default:* "main.ts"
The CDK app's entrypoint (relative to the source directory, which is "src" by default).
---
##### `edgeLambdaAutoDiscover`Optional
```typescript
public readonly edgeLambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `experimentalIntegRunner`Optional
```typescript
public readonly experimentalIntegRunner: boolean;
```
- *Type:* boolean
- *Default:* false
Enable experimental support for the AWS CDK integ-runner.
---
##### `integrationTestAutoDiscover`Optional
```typescript
public readonly integrationTestAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically discovers and creates integration tests for each `.integ.ts` file in under your test directory.
---
##### `lambdaAutoDiscover`Optional
```typescript
public readonly lambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.LambdaFunction` for each `.lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `lambdaExtensionAutoDiscover`Optional
```typescript
public readonly lambdaExtensionAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `lambdaOptions`Optional
```typescript
public readonly lambdaOptions: LambdaFunctionCommonOptions;
```
- *Type:* projen.awscdk.LambdaFunctionCommonOptions
- *Default:* default options
Common options for all AWS Lambda functions.
---
##### `singletonLambdaAutoDiscover`Optional
```typescript
public readonly singletonLambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.SingletonFunction` for each `.singleton-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `privateNpm`Optional
```typescript
public readonly privateNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Whether to enable private NPM registry authentication.
---
##### `privateNpmTokenEnvVar`Optional
```typescript
public readonly privateNpmTokenEnvVar: string;
```
- *Type:* string
- *Default:* 'NPM_TOKEN'
The environment variable name containing the NPM authentication token.
---
### ProductionTaimosCdkAppOptions
#### Initializer
```typescript
import { ProductionTaimosCdkAppOptions } from '@taimos/projen'
const productionTaimosCdkAppOptions: ProductionTaimosCdkAppOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| name | string | This is the name of your project. |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| gitIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .gitignore file. |
| gitOptions | projen.GitOptions | Configuration options for git. |
| logging | projen.LoggerOptions | Configure logging options such as verbosity. |
| outdir | string | The root directory of the project. |
| parent | projen.Project | The parent project, if this project is part of a bigger project. |
| projectTree | boolean | Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging. |
| projenCommand | string | The shell command to use in order to run the projen CLI. |
| projenrcJson | boolean | Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. |
| projenrcJsonOptions | projen.ProjenrcJsonOptions | Options for .projenrc.json. |
| renovatebot | boolean | Use renovatebot to handle dependency upgrades. |
| renovatebotOptions | projen.RenovatebotOptions | Options for renovatebot. |
| autoApproveOptions | projen.github.AutoApproveOptions | Enable and configure the 'auto approve' workflow. |
| autoMerge | boolean | Enable automatic merging on GitHub. |
| autoMergeOptions | projen.github.AutoMergeOptions | Configure options for automatic merging on GitHub. |
| clobber | boolean | Add a `clobber` task which resets the repo to origin. |
| devContainer | boolean | Add a VSCode development environment (used for GitHub Codespaces). |
| github | boolean | Enable GitHub integration. |
| githubOptions | projen.github.GitHubOptions | Options for GitHub integration. |
| gitpod | boolean | Add a Gitpod development environment. |
| projenCredentials | projen.github.GithubCredentials | Choose a method of providing GitHub API access for projen workflows. |
| readme | projen.SampleReadmeProps | The README setup. |
| stale | boolean | Auto-close of stale issues and pull request. |
| staleOptions | projen.github.StaleOptions | Auto-close stale issues and pull requests. |
| vscode | boolean | Enable VSCode integration. |
| addPackageManagerToDevEngines | boolean | Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`. |
| allowLibraryDependencies | boolean | Allow the project to include `peerDependencies` and `bundledDependencies`. |
| allowScripts | string[] | List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation. |
| authorEmail | string | Author's e-mail. |
| authorName | string | Author's name. |
| authorOrganization | boolean | Is the author an organization. |
| authorUrl | string | Author's URL / Website. |
| autoDetectBin | boolean | Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. |
| bin | {[ key: string ]: string} | Binary programs vended with your module. |
| bugsEmail | string | The email address to which issues should be reported. |
| bugsUrl | string | The url to your project's issue tracker. |
| bundledDeps | string[] | List of dependencies to bundle into this module. |
| bunVersion | string | The version of Bun to use if using Bun as a package manager. |
| codeArtifactOptions | projen.javascript.CodeArtifactOptions | Options for npm packages using AWS CodeArtifact. |
| deleteOrphanedLockFiles | boolean | Automatically delete lockfiles from package managers that are not the active one. |
| deps | string[] | Runtime dependencies of this module. |
| description | string | The description is just a string that helps people understand the purpose of the package. |
| devDeps | string[] | Build dependencies for this module. |
| devEngines | projen.javascript.DevEngines | Configure the `devEngines` field in `package.json`. |
| entrypoint | string | Module entrypoint (`main` in `package.json`). |
| homepage | string | Package's Homepage / Website. |
| keywords | string[] | Keywords to include in `package.json`. |
| license | string | License's SPDX identifier. |
| licensed | boolean | Indicates if a license should be added. |
| maxNodeVersion | string | The maximum node version supported by this package. Most projects should not use this option. |
| minNodeVersion | string | The minimum node version required by this package to function. Most projects should not use this option. |
| npmAccess | projen.javascript.NpmAccess | Access level of the npm package. |
| npmProvenance | boolean | Should provenance statements be generated when the package is published. |
| npmRegistryUrl | string | The base URL of the npm package registry. |
| npmTokenSecret | string | GitHub secret which contains the NPM token to use when publishing packages. |
| npmTrustedPublishing | boolean | Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. |
| packageManager | projen.javascript.NodePackageManager | The Node Package Manager used to execute scripts. |
| packageName | string | The "name" in package.json. |
| peerDependencyOptions | projen.javascript.PeerDependencyOptions | Options for `peerDeps`. |
| peerDeps | string[] | Peer dependencies for this module. |
| pnpmOptions | projen.javascript.PnpmOptions | Options for pnpm. |
| pnpmVersion | string | The version of PNPM to use if using PNPM as a package manager. |
| repository | string | The repository is the location where the actual code for your package lives. |
| repositoryDirectory | string | If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
| scopedPackagesOptions | projen.javascript.ScopedPackagesOptions[] | Options for privately hosted scoped packages. |
| stability | string | Package's Stability. |
| yarnBerryOptions | projen.javascript.YarnBerryOptions | Options for Yarn Berry. |
| bumpPackage | string | The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string. |
| jsiiReleaseVersion | string | Version requirement of `publib` which is used to publish modules to npm. |
| majorVersion | number | Major version to release from the default branch. |
| minMajorVersion | number | Minimal Major version to release. |
| nextVersionCommand | string | A shell command to control the next version to release. |
| npmDistTag | string | The npmDistTag to use when publishing from the default branch. |
| postBuildSteps | projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| prerelease | string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| publishDryRun | boolean | Instead of actually publishing to package managers, just print the publishing command. |
| publishTasks | boolean | Define publishing tasks that can be executed manually as well as workflows. |
| releasableCommits | projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
| releaseBranches | {[ key: string ]: projen.release.BranchOptions} | Defines additional release branches. |
| releaseEnvironment | string | The GitHub Actions environment used for the release. |
| releaseFailureIssue | boolean | Create a github issue on every failed publishing task. |
| releaseFailureIssueLabel | string | The label to apply to issues indicating publish failures. |
| releaseTagPrefix | string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
| releaseTrigger | projen.release.ReleaseTrigger | The release trigger to use. |
| releaseWorkflowEnv | {[ key: string ]: string} | Build environment variables for release workflows. |
| releaseWorkflowName | string | The name of the default release workflow. |
| releaseWorkflowSetupSteps | projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| versionrcOptions | {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| workflowContainerImage | string | Container image to use for GitHub workflows. |
| workflowRunsOn | string[] | Github Runner selection labels. |
| workflowRunsOnGroup | projen.GroupRunnerOptions | Github Runner Group selection options. |
| artifactsDirectory | string | A directory which will contain build artifacts. |
| auditDeps | boolean | Run security audit on dependencies. |
| auditDepsOptions | projen.javascript.AuditOptions | Security audit options. |
| autoApproveUpgrades | boolean | Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured). |
| biome | boolean | Setup Biome. |
| biomeOptions | projen.javascript.BiomeOptions | Biome options. |
| buildWorkflow | boolean | Define a GitHub workflow for building PRs. |
| buildWorkflowOptions | projen.javascript.BuildWorkflowOptions | Options for PR build workflow. |
| bundlerOptions | projen.javascript.BundlerOptions | Options for `Bundler`. |
| checkLicenses | projen.javascript.LicenseCheckerOptions | Configure which licenses should be deemed acceptable for use by dependencies. |
| codeCov | boolean | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`. |
| codeCovTokenSecret | string | Define the secret name for a specified https://codecov.io/ token. |
| copyrightOwner | string | License copyright owner. |
| copyrightPeriod | string | The copyright years to put in the LICENSE file. |
| defaultReleaseBranch | string | The name of the main release branch. |
| dependabot | boolean | Use dependabot to handle dependency upgrades. |
| dependabotOptions | projen.github.DependabotOptions | Options for dependabot. |
| depsUpgrade | boolean | Use tasks and github workflows to handle dependency upgrades. |
| depsUpgradeOptions | projen.javascript.UpgradeDependenciesOptions | Options for `UpgradeDependencies`. |
| gitignore | string[] | Additional entries to .gitignore. |
| jest | boolean | Setup jest unit tests. |
| jestOptions | projen.javascript.JestOptions | Jest options. |
| npmignoreEnabled | boolean | Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
| npmIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .npmignore file. |
| package | boolean | Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). |
| prettier | boolean | Setup prettier. |
| prettierOptions | projen.javascript.PrettierOptions | Prettier options. |
| projenDevDependency | boolean | Indicates of "projen" should be installed as a devDependency. |
| projenrcJs | boolean | Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. |
| projenrcJsOptions | projen.javascript.ProjenrcOptions | Options for .projenrc.js. |
| projenVersion | string | Version of projen to install. |
| pullRequestTemplate | boolean | Include a GitHub pull request template. |
| pullRequestTemplateContents | string[] | The contents of the pull request template. |
| release | boolean | Add release management to this project. |
| releaseToNpm | boolean | Automatically release to npm when new versions are introduced. |
| workflowBootstrapSteps | projen.github.workflows.JobStep[] | Workflow steps to use in order to bootstrap this repo. |
| workflowGitIdentity | projen.github.GitIdentity | The git identity to use in workflows. |
| workflowNodeVersion | string | The node version used in GitHub Actions workflows. |
| workflowPackageCache | boolean | Enable Node.js package cache in GitHub workflows. |
| disableTsconfig | boolean | Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
| disableTsconfigDev | boolean | Do not generate a development tsconfig file. |
| docgen | boolean | Docgen by Typedoc. |
| docsDirectory | string | Docs directory. |
| entrypointTypes | string | The .d.ts file that includes the type declarations for this module. |
| eslint | boolean | Setup eslint. |
| eslintOptions | projen.javascript.EslintOptions | Eslint options. |
| libdir | string | Typescript artifacts output directory. |
| projenrcTs | boolean | Use TypeScript for your projenrc file (`.projenrc.ts`). |
| projenrcTsOptions | projen.typescript.ProjenrcOptions | Options for .projenrc.ts. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner to use for executing TypeScript files. |
| sampleCode | boolean | Generate one-time sample in `src/` and `test/` if there are no files there. |
| srcdir | string | Typescript sources directory. |
| testdir | string | Jest tests directory. Tests files should be named `xxx.test.ts`. |
| tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. |
| tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). |
| tsconfigDevFile | string | The name (and path) of the development tsconfig file. |
| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. |
| typescriptVersion | string | TypeScript version to use. |
| buildCommand | string | A command to execute before synthesis. |
| cdkout | string | cdk.out directory. |
| context | {[ key: string ]: any} | Additional context to include in `cdk.json`. |
| featureFlags | projen.awscdk.ICdkFeatureFlags | Feature flags that should be enabled in `cdk.json`. |
| requireApproval | projen.awscdk.ApprovalLevel | To protect you against unintended changes that affect your security posture, the AWS CDK Toolkit prompts you to approve security-related changes before deploying them. |
| watchExcludes | string[] | Glob patterns to exclude from `cdk watch`. |
| watchIncludes | string[] | Glob patterns to include in `cdk watch`. |
| cdkVersion | string | Minimum version of the AWS CDK to depend on. |
| cdkCliVersion | string | Version range of the AWS CDK CLI to depend on. |
| cdkVersionPinning | boolean | Use pinned version instead of caret version for CDK. |
| constructsVersion | string | Minimum version of the `constructs` library to depend on. |
| app | string | The command line to execute in order to synthesize the CDK application (language specific). |
| appEntrypoint | string | The CDK app's entrypoint (relative to the source directory, which is "src" by default). |
| edgeLambdaAutoDiscover | boolean | Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| experimentalIntegRunner | boolean | Enable experimental support for the AWS CDK integ-runner. |
| integrationTestAutoDiscover | boolean | Automatically discovers and creates integration tests for each `.integ.ts` file in under your test directory. |
| lambdaAutoDiscover | boolean | Automatically adds an `awscdk.LambdaFunction` for each `.lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| lambdaExtensionAutoDiscover | boolean | Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| lambdaOptions | projen.awscdk.LambdaFunctionCommonOptions | Common options for all AWS Lambda functions. |
| singletonLambdaAutoDiscover | boolean | Automatically adds an `awscdk.SingletonFunction` for each `.singleton-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| privateNpm | boolean | Whether to enable private NPM registry authentication. |
| privateNpmTokenEnvVar | string | The environment variable name containing the NPM authentication token. |
| lumigo | boolean | Whether to enable Lumigo. |
| sonarcloud | boolean | Whether to enable SonarCloud. |
| sonarcloudOptions | SonarcloudOptions | The SonarCloud options. |
| sops | boolean | Whether to enable SOPS. |
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
- *Default:* $BASEDIR
This is the name of your project.
---
##### `commitGenerated`Optional
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to commit the managed files by default.
---
##### `gitIgnoreOptions`Optional
```typescript
public readonly gitIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .gitignore file.
---
##### `gitOptions`Optional
```typescript
public readonly gitOptions: GitOptions;
```
- *Type:* projen.GitOptions
Configuration options for git.
---
##### `logging`Optional
```typescript
public readonly logging: LoggerOptions;
```
- *Type:* projen.LoggerOptions
- *Default:* {}
Configure logging options such as verbosity.
---
##### `outdir`Optional
```typescript
public readonly outdir: string;
```
- *Type:* string
- *Default:* "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent
directory and it cannot be the same as the parent or any of it's other
subprojects.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
The parent project, if this project is part of a bigger project.
---
##### `projectTree`Optional
```typescript
public readonly projectTree: boolean;
```
- *Type:* boolean
- *Default:* false
Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging.
---
##### `projenCommand`Optional
```typescript
public readonly projenCommand: string;
```
- *Type:* string
- *Default:* "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
---
##### `projenrcJson`Optional
```typescript
public readonly projenrcJson: boolean;
```
- *Type:* boolean
- *Default:* false
Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
---
##### `projenrcJsonOptions`Optional
```typescript
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
```
- *Type:* projen.ProjenrcJsonOptions
- *Default:* default options
Options for .projenrc.json.
---
##### `renovatebot`Optional
```typescript
public readonly renovatebot: boolean;
```
- *Type:* boolean
- *Default:* false
Use renovatebot to handle dependency upgrades.
---
##### `renovatebotOptions`Optional
```typescript
public readonly renovatebotOptions: RenovatebotOptions;
```
- *Type:* projen.RenovatebotOptions
- *Default:* default options
Options for renovatebot.
---
##### `autoApproveOptions`Optional
```typescript
public readonly autoApproveOptions: AutoApproveOptions;
```
- *Type:* projen.github.AutoApproveOptions
- *Default:* auto approve is disabled
Enable and configure the 'auto approve' workflow.
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: boolean;
```
- *Type:* boolean
- *Default:* true
Enable automatic merging on GitHub.
Has no effect if `github.mergify`
is set to false.
---
##### `autoMergeOptions`Optional
```typescript
public readonly autoMergeOptions: AutoMergeOptions;
```
- *Type:* projen.github.AutoMergeOptions
- *Default:* see defaults in `AutoMergeOptions`
Configure options for automatic merging on GitHub.
Has no effect if
`github.mergify` or `autoMerge` is set to false.
---
##### `clobber`Optional
```typescript
public readonly clobber: boolean;
```
- *Type:* boolean
- *Default:* true, but false for subprojects
Add a `clobber` task which resets the repo to origin.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: boolean;
```
- *Type:* boolean
- *Default:* false
Add a VSCode development environment (used for GitHub Codespaces).
---
##### `github`Optional
```typescript
public readonly github: boolean;
```
- *Type:* boolean
- *Default:* true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `githubOptions`Optional
```typescript
public readonly githubOptions: GitHubOptions;
```
- *Type:* projen.github.GitHubOptions
- *Default:* see GitHubOptions
Options for GitHub integration.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: boolean;
```
- *Type:* boolean
- *Default:* false
Add a Gitpod development environment.
---
##### `projenCredentials`Optional
```typescript
public readonly projenCredentials: GithubCredentials;
```
- *Type:* projen.github.GithubCredentials
- *Default:* use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
---
##### `readme`Optional
```typescript
public readonly readme: SampleReadmeProps;
```
- *Type:* projen.SampleReadmeProps
- *Default:* { filename: 'README.md', contents: '# replace this' }
The README setup.
---
*Example*
```typescript
"{ filename: 'readme.md', contents: '# title' }"
```
##### `stale`Optional
```typescript
public readonly stale: boolean;
```
- *Type:* boolean
- *Default:* false
Auto-close of stale issues and pull request.
See `staleOptions` for options.
---
##### `staleOptions`Optional
```typescript
public readonly staleOptions: StaleOptions;
```
- *Type:* projen.github.StaleOptions
- *Default:* see defaults in `StaleOptions`
Auto-close stale issues and pull requests.
To disable set `stale` to `false`.
---
##### `vscode`Optional
```typescript
public readonly vscode: boolean;
```
- *Type:* boolean
- *Default:* true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `addPackageManagerToDevEngines`Optional
```typescript
public readonly addPackageManagerToDevEngines: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`.
---
##### `allowLibraryDependencies`Optional
```typescript
public readonly allowLibraryDependencies: boolean;
```
- *Type:* boolean
- *Default:* true
Allow the project to include `peerDependencies` and `bundledDependencies`.
This is normally only allowed for libraries. For apps, there's no meaning
for specifying these.
---
##### `allowScripts`Optional
```typescript
public readonly allowScripts: string[];
```
- *Type:* string[]
- *Default:* all install scripts are allowed to run (package manager default)
List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation.
These scripts can execute arbitrary code, making them a common
supply-chain attack vector. Package managers are moving toward
blocking them by default and requiring an explicit allowlist.
Configuring `allowScripts` sets up that allowlist so scripts only run
for the packages you have explicitly reviewed and trust.
Support for this setting depends on the configured `packageManager`:
- `NPM`: written to the native `allowScripts` field in `package.json`
(requires npm >= 11.16; see https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts).
- `BUN`: written to the native `trustedDependencies` field in
`package.json` (see https://bun.com/docs/pm/lifecycle).
- `PNPM`: written to the `onlyBuiltDependencies` setting in
`pnpm-workspace.yaml` (see https://pnpm.io/settings#onlybuiltdependencies).
- `YARN2`, `YARN_BERRY`: written to the native
`dependenciesMeta..built` allowlist in `package.json`, combined
with `enableScripts: false` in `.yarnrc.yml` (see
https://yarnpkg.com/features/security#postinstalls). If you set
`yarnBerryOptions.yarnRcOptions.enableScripts` explicitly, that value
is respected instead of being overridden.
- `YARN`, `YARN_CLASSIC`: not supported. Yarn Classic has no native
mechanism to allowlist install scripts for specific dependencies.
Setting this option with one of these package managers throws an
error at synthesis time.
---
##### `authorEmail`Optional
```typescript
public readonly authorEmail: string;
```
- *Type:* string
Author's e-mail.
---
##### `authorName`Optional
```typescript
public readonly authorName: string;
```
- *Type:* string
Author's name.
---
##### `authorOrganization`Optional
```typescript
public readonly authorOrganization: boolean;
```
- *Type:* boolean
Is the author an organization.
---
##### `authorUrl`Optional
```typescript
public readonly authorUrl: string;
```
- *Type:* string
Author's URL / Website.
---
##### `autoDetectBin`Optional
```typescript
public readonly autoDetectBin: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
---
##### `bin`Optional
```typescript
public readonly bin: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your `package.json`, but unless `autoDetectBin` is `false`, every
executable file under `bin` will automatically be added to this section.
---
##### `bugsEmail`Optional
```typescript
public readonly bugsEmail: string;
```
- *Type:* string
The email address to which issues should be reported.
---
##### `bugsUrl`Optional
```typescript
public readonly bugsUrl: string;
```
- *Type:* string
The url to your project's issue tracker.
---
##### `bundledDeps`Optional
```typescript
public readonly bundledDeps: string[];
```
- *Type:* string[]
List of dependencies to bundle into this module.
These modules will be
added both to the `dependencies` section and `bundledDependencies` section of
your `package.json`.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
##### `bunVersion`Optional
```typescript
public readonly bunVersion: string;
```
- *Type:* string
- *Default:* "latest"
The version of Bun to use if using Bun as a package manager.
---
##### `codeArtifactOptions`Optional
```typescript
public readonly codeArtifactOptions: CodeArtifactOptions;
```
- *Type:* projen.javascript.CodeArtifactOptions
- *Default:* undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
---
##### `deleteOrphanedLockFiles`Optional
```typescript
public readonly deleteOrphanedLockFiles: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically delete lockfiles from package managers that are not the active one.
Only triggered when the lockfile for the configured package
manager already exists.
This is useful when migrating between package managers to avoid conflicts.
---
##### `deps`Optional
```typescript
public readonly deps: string[];
```
- *Type:* string[]
- *Default:* []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'express', 'lodash', 'foo@^2' ]
```
##### `description`Optional
```typescript
public readonly description: string;
```
- *Type:* string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
---
##### `devDeps`Optional
```typescript
public readonly devDeps: string[];
```
- *Type:* string[]
- *Default:* []
Build dependencies for this module.
These dependencies will only be
available in your build environment but will not be fetched when this
module is consumed.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'typescript', '@types/express' ]
```
##### `devEngines`Optional
```typescript
public readonly devEngines: DevEngines;
```
- *Type:* projen.javascript.DevEngines
Configure the `devEngines` field in `package.json`.
The `devEngines.packageManager` field is automatically populated based on
the resolved `packageManager` value. Any fields provided here are merged
with the auto-populated `packageManager` entry.
> [https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines)
---
##### `entrypoint`Optional
```typescript
public readonly entrypoint: string;
```
- *Type:* string
- *Default:* "lib/index.js"
Module entrypoint (`main` in `package.json`).
Set to an empty string to not include `main` in your package.json
---
##### `homepage`Optional
```typescript
public readonly homepage: string;
```
- *Type:* string
Package's Homepage / Website.
---
##### `keywords`Optional
```typescript
public readonly keywords: string[];
```
- *Type:* string[]
Keywords to include in `package.json`.
---
##### `license`Optional
```typescript
public readonly license: string;
```
- *Type:* string
- *Default:* "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the `licensed` option if you want to no license to be specified.
---
##### `licensed`Optional
```typescript
public readonly licensed: boolean;
```
- *Type:* boolean
- *Default:* true
Indicates if a license should be added.
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
- *Default:* no maximum version is enforced
The maximum node version supported by this package. Most projects should not use this option.
The value indicates that the package is incompatible with any newer versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option.
Consider this option only if your package is known to not function with newer versions of node.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
- *Default:* no minimum version is enforced
The minimum node version required by this package to function. Most projects should not use this option.
The value indicates that the package is incompatible with any older versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
Setting this option has very high impact on the consumers of your package,
as package managers will actively prevent usage with node versions you have marked as incompatible.
To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
---
##### `npmAccess`Optional
```typescript
public readonly npmAccess: NpmAccess;
```
- *Type:* projen.javascript.NpmAccess
- *Default:* for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
Access level of the npm package.
---
##### `npmProvenance`Optional
```typescript
public readonly npmProvenance: boolean;
```
- *Type:* boolean
- *Default:* true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and
you will need to use a supported CI/CD provider.
Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
> [https://docs.npmjs.com/generating-provenance-statements](https://docs.npmjs.com/generating-provenance-statements)
---
##### `npmRegistryUrl`Optional
```typescript
public readonly npmRegistryUrl: string;
```
- *Type:* string
- *Default:* "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
---
##### `npmTokenSecret`Optional
```typescript
public readonly npmTokenSecret: string;
```
- *Type:* string
- *Default:* "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
---
##### `npmTrustedPublishing`Optional
```typescript
public readonly npmTrustedPublishing: boolean;
```
- *Type:* boolean
- *Default:* false
Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
---
##### `packageManager`Optional
```typescript
public readonly packageManager: NodePackageManager;
```
- *Type:* projen.javascript.NodePackageManager
- *Default:* Detected from the calling process or `YARN_CLASSIC` if detection fails.
The Node Package Manager used to execute scripts.
---
##### `packageName`Optional
```typescript
public readonly packageName: string;
```
- *Type:* string
- *Default:* defaults to project name
The "name" in package.json.
---
##### `peerDependencyOptions`Optional
```typescript
public readonly peerDependencyOptions: PeerDependencyOptions;
```
- *Type:* projen.javascript.PeerDependencyOptions
Options for `peerDeps`.
---
##### `peerDeps`Optional
```typescript
public readonly peerDeps: string[];
```
- *Type:* string[]
- *Default:* []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the _consumer_ of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the `node_modules` tree of your consumers.
Note that prior to npm@7, peer dependencies are _not_ automatically
installed, which means that adding peer dependencies to a library will be a
breaking change for your customers.
Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
---
##### `pnpmOptions`Optional
```typescript
public readonly pnpmOptions: PnpmOptions;
```
- *Type:* projen.javascript.PnpmOptions
- *Default:* all default options
Options for pnpm.
---
##### `pnpmVersion`Optional
```typescript
public readonly pnpmVersion: string;
```
- *Type:* string
- *Default:* "10.33.0"
The version of PNPM to use if using PNPM as a package manager.
---
##### `repository`Optional
```typescript
public readonly repository: string;
```
- *Type:* string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
---
##### `repositoryDirectory`Optional
```typescript
public readonly repositoryDirectory: string;
```
- *Type:* string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
---
##### `scopedPackagesOptions`Optional
```typescript
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
```
- *Type:* projen.javascript.ScopedPackagesOptions[]
- *Default:* fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
---
##### `stability`Optional
```typescript
public readonly stability: string;
```
- *Type:* string
Package's Stability.
---
##### `yarnBerryOptions`Optional
```typescript
public readonly yarnBerryOptions: YarnBerryOptions;
```
- *Type:* projen.javascript.YarnBerryOptions
- *Default:* Yarn Berry v4 with all default options
Options for Yarn Berry.
---
##### `bumpPackage`Optional
```typescript
public readonly bumpPackage: string;
```
- *Type:* string
- *Default:* A recent version of "commit-and-tag-version"
The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
This can be any compatible package version, including the deprecated `standard-version@9`.
---
##### `jsiiReleaseVersion`Optional
```typescript
public readonly jsiiReleaseVersion: string;
```
- *Type:* string
- *Default:* "latest"
Version requirement of `publib` which is used to publish modules to npm.
---
##### `majorVersion`Optional
```typescript
public readonly majorVersion: number;
```
- *Type:* number
- *Default:* Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line.
If not specified, we bump the global latest version.
---
##### `minMajorVersion`Optional
```typescript
public readonly minMajorVersion: number;
```
- *Type:* number
- *Default:* No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major
release are not incrementing the major version number.
Can not be set together with `majorVersion`.
---
##### `nextVersionCommand`Optional
```typescript
public readonly nextVersionCommand: string;
```
- *Type:* string
- *Default:* The next version will be determined based on the commit history and project settings.
A shell command to control the next version to release.
If present, this shell command will be run before the bump is executed, and
it determines what version to release. It will be executed in the following
environment:
- Working directory: the project directory.
- `$VERSION`: the current version. Looks like `1.2.3`.
- `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
- `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
The command should print one of the following to `stdout`:
- Nothing: the next version number will be determined based on commit history.
- `x.y.z`: the next version number will be `x.y.z`.
- `major|minor|patch`: the next version number will be the current version number
with the indicated component bumped.
This setting cannot be specified together with `minMajorVersion`; the invoked
script can be used to achieve the effects of `minMajorVersion`.
---
##### `npmDistTag`Optional
```typescript
public readonly npmDistTag: string;
```
- *Type:* string
- *Default:* "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the `npmDistTag` property
for each branch.
---
##### `postBuildSteps`Optional
```typescript
public readonly postBuildSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* []
Steps to execute after build as part of the release workflow.
---
##### `prerelease`Optional
```typescript
public readonly prerelease: string;
```
- *Type:* string
- *Default:* normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
---
##### `publishDryRun`Optional
```typescript
public readonly publishDryRun: boolean;
```
- *Type:* boolean
- *Default:* false
Instead of actually publishing to package managers, just print the publishing command.
---
##### `publishTasks`Optional
```typescript
public readonly publishTasks: boolean;
```
- *Type:* boolean
- *Default:* false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this
in order to create a publishing task for each publishing activity.
---
##### `releasableCommits`Optional
```typescript
public readonly releasableCommits: ReleasableCommits;
```
- *Type:* projen.ReleasableCommits
- *Default:* ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
---
##### `releaseBranches`Optional
```typescript
public readonly releaseBranches: {[ key: string ]: BranchOptions};
```
- *Type:* {[ key: string ]: projen.release.BranchOptions}
- *Default:* no additional branches are used for release. you can use `addBranch()` to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch _must_ be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the `majorVersion` field must also
be provided for the default branch.
---
##### `releaseEnvironment`Optional
```typescript
public readonly releaseEnvironment: string;
```
- *Type:* string
- *Default:* no environment used, unless set at the artifact level
The GitHub Actions environment used for the release.
This can be used to add an explicit approval step to the release
or limit who can initiate a release through environment protection rules.
When multiple artifacts are released, the environment can be overwritten
on a per artifact basis.
---
##### `releaseFailureIssue`Optional
```typescript
public readonly releaseFailureIssue: boolean;
```
- *Type:* boolean
- *Default:* false
Create a github issue on every failed publishing task.
---
##### `releaseFailureIssueLabel`Optional
```typescript
public readonly releaseFailureIssueLabel: string;
```
- *Type:* string
- *Default:* "failed-release"
The label to apply to issues indicating publish failures.
Only applies if `releaseFailureIssue` is true.
---
##### `releaseTagPrefix`Optional
```typescript
public readonly releaseTagPrefix: string;
```
- *Type:* string
- *Default:* "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version
when bumping, so if you change this on a project with an existing version
history, you may need to manually tag your latest release
with the new prefix.
---
##### `releaseTrigger`Optional
```typescript
public readonly releaseTrigger: ReleaseTrigger;
```
- *Type:* projen.release.ReleaseTrigger
- *Default:* Continuous releases (`ReleaseTrigger.continuous()`)
The release trigger to use.
---
##### `releaseWorkflowEnv`Optional
```typescript
public readonly releaseWorkflowEnv: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
- *Default:* {}
Build environment variables for release workflows.
---
##### `releaseWorkflowName`Optional
```typescript
public readonly releaseWorkflowName: string;
```
- *Type:* string
- *Default:* "release"
The name of the default release workflow.
---
##### `releaseWorkflowSetupSteps`Optional
```typescript
public readonly releaseWorkflowSetupSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
---
##### `versionrcOptions`Optional
```typescript
public readonly versionrcOptions: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with commit-and-tag-version package.
Given values either append to default configuration or overwrite values in it.
---
##### `workflowContainerImage`Optional
```typescript
public readonly workflowContainerImage: string;
```
- *Type:* string
- *Default:* default image
Container image to use for GitHub workflows.
---
##### `workflowRunsOn`Optional
```typescript
public readonly workflowRunsOn: string[];
```
- *Type:* string[]
- *Default:* ["ubuntu-latest"]
Github Runner selection labels.
---
##### `workflowRunsOnGroup`Optional
```typescript
public readonly workflowRunsOnGroup: GroupRunnerOptions;
```
- *Type:* projen.GroupRunnerOptions
Github Runner Group selection options.
---
##### `artifactsDirectory`Optional
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
- *Default:* "dist"
A directory which will contain build artifacts.
---
##### `auditDeps`Optional
```typescript
public readonly auditDeps: boolean;
```
- *Type:* boolean
- *Default:* false
Run security audit on dependencies.
When enabled, creates an "audit" task that checks for known security vulnerabilities
in dependencies. By default, runs during every build and checks for "high" severity
vulnerabilities or above in all dependencies (including dev dependencies).
---
##### `auditDepsOptions`Optional
```typescript
public readonly auditDepsOptions: AuditOptions;
```
- *Type:* projen.javascript.AuditOptions
- *Default:* default options
Security audit options.
---
##### `autoApproveUpgrades`Optional
```typescript
public readonly autoApproveUpgrades: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured).
Throw if set to true but `autoApproveOptions` are not defined.
---
##### `biome`Optional
```typescript
public readonly biome: boolean;
```
- *Type:* boolean
- *Default:* false
Setup Biome.
---
##### `biomeOptions`Optional
```typescript
public readonly biomeOptions: BiomeOptions;
```
- *Type:* projen.javascript.BiomeOptions
- *Default:* default options
Biome options.
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Define a GitHub workflow for building PRs.
---
##### `buildWorkflowOptions`Optional
```typescript
public readonly buildWorkflowOptions: BuildWorkflowOptions;
```
- *Type:* projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
---
##### `bundlerOptions`Optional
```typescript
public readonly bundlerOptions: BundlerOptions;
```
- *Type:* projen.javascript.BundlerOptions
Options for `Bundler`.
---
##### `checkLicenses`Optional
```typescript
public readonly checkLicenses: LicenseCheckerOptions;
```
- *Type:* projen.javascript.LicenseCheckerOptions
- *Default:* no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
---
##### `codeCov`Optional
```typescript
public readonly codeCov: boolean;
```
- *Type:* boolean
- *Default:* false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
---
##### `codeCovTokenSecret`Optional
```typescript
public readonly codeCovTokenSecret: string;
```
- *Type:* string
- *Default:* OIDC auth is used
Define the secret name for a specified https://codecov.io/ token.
---
##### `copyrightOwner`Optional
```typescript
public readonly copyrightOwner: string;
```
- *Type:* string
- *Default:* defaults to the value of authorName or "" if `authorName` is undefined.
License copyright owner.
This value is only used if the selected license text contains the
`$copyright_owner` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `copyrightPeriod`Optional
```typescript
public readonly copyrightPeriod: string;
```
- *Type:* string
- *Default:* current year
The copyright years to put in the LICENSE file.
This value is only used if the selected license text contains the
`$copyright_period` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `defaultReleaseBranch`Optional
```typescript
public readonly defaultReleaseBranch: string;
```
- *Type:* string
- *Default:* "main"
The name of the main release branch.
---
##### `dependabot`Optional
```typescript
public readonly dependabot: boolean;
```
- *Type:* boolean
- *Default:* false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with `depsUpgrade`.
---
##### `dependabotOptions`Optional
```typescript
public readonly dependabotOptions: DependabotOptions;
```
- *Type:* projen.github.DependabotOptions
- *Default:* default options
Options for dependabot.
---
##### `depsUpgrade`Optional
```typescript
public readonly depsUpgrade: boolean;
```
- *Type:* boolean
- *Default:* `true` for root projects, `false` for subprojects
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with `dependabot`.
---
##### `depsUpgradeOptions`Optional
```typescript
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
```
- *Type:* projen.javascript.UpgradeDependenciesOptions
- *Default:* default options
Options for `UpgradeDependencies`.
---
##### `gitignore`Optional
```typescript
public readonly gitignore: string[];
```
- *Type:* string[]
Additional entries to .gitignore.
---
##### `jest`Optional
```typescript
public readonly jest: boolean;
```
- *Type:* boolean
- *Default:* true
Setup jest unit tests.
---
##### `jestOptions`Optional
```typescript
public readonly jestOptions: JestOptions;
```
- *Type:* projen.javascript.JestOptions
- *Default:* default options
Jest options.
---
##### `npmignoreEnabled`Optional
```typescript
public readonly npmignoreEnabled: boolean;
```
- *Type:* boolean
- *Default:* true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
---
##### `npmIgnoreOptions`Optional
```typescript
public readonly npmIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .npmignore file.
---
##### `package`Optional
```typescript
public readonly package: boolean;
```
- *Type:* boolean
- *Default:* true
Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
---
##### `prettier`Optional
```typescript
public readonly prettier: boolean;
```
- *Type:* boolean
- *Default:* false
Setup prettier.
---
##### `prettierOptions`Optional
```typescript
public readonly prettierOptions: PrettierOptions;
```
- *Type:* projen.javascript.PrettierOptions
- *Default:* default options
Prettier options.
---
##### `projenDevDependency`Optional
```typescript
public readonly projenDevDependency: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Indicates of "projen" should be installed as a devDependency.
---
##### `projenrcJs`Optional
```typescript
public readonly projenrcJs: boolean;
```
- *Type:* boolean
- *Default:* true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
---
##### `projenrcJsOptions`Optional
```typescript
public readonly projenrcJsOptions: ProjenrcOptions;
```
- *Type:* projen.javascript.ProjenrcOptions
- *Default:* default options
Options for .projenrc.js.
---
##### `projenVersion`Optional
```typescript
public readonly projenVersion: string;
```
- *Type:* string
- *Default:* Defaults to the latest version.
Version of projen to install.
---
##### `pullRequestTemplate`Optional
```typescript
public readonly pullRequestTemplate: boolean;
```
- *Type:* boolean
- *Default:* true
Include a GitHub pull request template.
---
##### `pullRequestTemplateContents`Optional
```typescript
public readonly pullRequestTemplateContents: string[];
```
- *Type:* string[]
- *Default:* default content
The contents of the pull request template.
---
##### `release`Optional
```typescript
public readonly release: boolean;
```
- *Type:* boolean
- *Default:* true (false for subprojects)
Add release management to this project.
---
##### `releaseToNpm`Optional
```typescript
public readonly releaseToNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Automatically release to npm when new versions are introduced.
---
##### `workflowBootstrapSteps`Optional
```typescript
public readonly workflowBootstrapSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
---
##### `workflowGitIdentity`Optional
```typescript
public readonly workflowGitIdentity: GitIdentity;
```
- *Type:* projen.github.GitIdentity
- *Default:* default GitHub Actions user
The git identity to use in workflows.
---
##### `workflowNodeVersion`Optional
```typescript
public readonly workflowNodeVersion: string;
```
- *Type:* string
- *Default:* `minNodeVersion` if set, otherwise `lts/*`.
The node version used in GitHub Actions workflows.
Always use this option if your GitHub Actions workflows require a specific to run.
---
##### `workflowPackageCache`Optional
```typescript
public readonly workflowPackageCache: boolean;
```
- *Type:* boolean
- *Default:* false
Enable Node.js package cache in GitHub workflows.
---
##### `disableTsconfig`Optional
```typescript
public readonly disableTsconfig: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
---
##### `disableTsconfigDev`Optional
```typescript
public readonly disableTsconfigDev: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a development tsconfig file.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
- *Default:* false
Docgen by Typedoc.
---
##### `docsDirectory`Optional
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
- *Default:* "docs"
Docs directory.
---
##### `entrypointTypes`Optional
```typescript
public readonly entrypointTypes: string;
```
- *Type:* string
- *Default:* .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
---
##### `eslint`Optional
```typescript
public readonly eslint: boolean;
```
- *Type:* boolean
- *Default:* true, unless biome is enabled
Setup eslint.
---
##### `eslintOptions`Optional
```typescript
public readonly eslintOptions: EslintOptions;
```
- *Type:* projen.javascript.EslintOptions
- *Default:* opinionated default options
Eslint options.
---
##### `libdir`Optional
```typescript
public readonly libdir: string;
```
- *Type:* string
- *Default:* "lib"
Typescript artifacts output directory.
---
##### `projenrcTs`Optional
```typescript
public readonly projenrcTs: boolean;
```
- *Type:* boolean
- *Default:* false
Use TypeScript for your projenrc file (`.projenrc.ts`).
---
##### `projenrcTsOptions`Optional
```typescript
public readonly projenrcTsOptions: ProjenrcOptions;
```
- *Type:* projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
---
##### `runner`Optional
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
- *Default:* TypeScriptRunner.tsNode()
The TypeScript runner to use for executing TypeScript files.
This is a project-level setting that components (e.g. projenrc) will
use as their default runner.
---
##### `sampleCode`Optional
```typescript
public readonly sampleCode: boolean;
```
- *Type:* boolean
- *Default:* true
Generate one-time sample in `src/` and `test/` if there are no files there.
---
##### `srcdir`Optional
```typescript
public readonly srcdir: string;
```
- *Type:* string
- *Default:* "src"
Typescript sources directory.
---
##### `testdir`Optional
```typescript
public readonly testdir: string;
```
- *Type:* string
- *Default:* "test"
Jest tests directory. Tests files should be named `xxx.test.ts`.
If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
then tests are going to be compiled into `lib/` and executed as javascript.
If the test directory is outside of `src`, then we configure jest to
compile the code in-memory.
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* default options
Custom TSConfig.
---
##### `tsconfigDev`Optional
```typescript
public readonly tsconfigDev: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
---
##### `tsconfigDevFile`Optional
```typescript
public readonly tsconfigDevFile: string;
```
- *Type:* string
- *Default:* "{testdir}/tsconfig.json"
The name (and path) of the development tsconfig file.
By default this lives inside the test directory (e.g. `test/tsconfig.json`)
so that the TypeScript language service resolves it as the nearest config
for test files.
---
##### `tsJestOptions`Optional
```typescript
public readonly tsJestOptions: TsJestOptions;
```
- *Type:* projen.typescript.TsJestOptions
Options for ts-jest.
---
##### `typescriptVersion`Optional
```typescript
public readonly typescriptVersion: string;
```
- *Type:* string
- *Default:* "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
---
##### `buildCommand`Optional
```typescript
public readonly buildCommand: string;
```
- *Type:* string
- *Default:* no build command
A command to execute before synthesis.
This command will be called when
running `cdk synth` or when `cdk watch` identifies a change in your source
code before redeployment.
---
##### `cdkout`Optional
```typescript
public readonly cdkout: string;
```
- *Type:* string
- *Default:* "cdk.out"
cdk.out directory.
---
##### `context`Optional
```typescript
public readonly context: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* no additional context
Additional context to include in `cdk.json`.
---
##### `featureFlags`Optional
```typescript
public readonly featureFlags: ICdkFeatureFlags;
```
- *Type:* projen.awscdk.ICdkFeatureFlags
- *Default:* no feature flags are enabled by default
Feature flags that should be enabled in `cdk.json`.
Make sure to double-check any changes to feature flags in `cdk.json` before deploying.
Unexpected changes may cause breaking changes in your CDK app.
You can overwrite any feature flag by passing it into the context field.
---
##### `requireApproval`Optional
```typescript
public readonly requireApproval: ApprovalLevel;
```
- *Type:* projen.awscdk.ApprovalLevel
- *Default:* ApprovalLevel.BROADENING
To protect you against unintended changes that affect your security posture, the AWS CDK Toolkit prompts you to approve security-related changes before deploying them.
---
##### `watchExcludes`Optional
```typescript
public readonly watchExcludes: string[];
```
- *Type:* string[]
- *Default:* []
Glob patterns to exclude from `cdk watch`.
---
##### `watchIncludes`Optional
```typescript
public readonly watchIncludes: string[];
```
- *Type:* string[]
- *Default:* []
Glob patterns to include in `cdk watch`.
---
##### `cdkVersion`Required
```typescript
public readonly cdkVersion: string;
```
- *Type:* string
- *Default:* "2.189.1"
Minimum version of the AWS CDK to depend on.
---
##### `cdkCliVersion`Optional
```typescript
public readonly cdkCliVersion: string;
```
- *Type:* string
- *Default:* "^2"
Version range of the AWS CDK CLI to depend on.
Can be either a specific version, or an NPM version range.
By default, the latest 2.x version will be installed; you can use this
option to restrict it to a specific version or version range.
---
##### `cdkVersionPinning`Optional
```typescript
public readonly cdkVersionPinning: boolean;
```
- *Type:* boolean
Use pinned version instead of caret version for CDK.
You can use this to prevent mixed versions for your CDK dependencies and to prevent auto-updates.
If you use experimental features this will let you define the moment you include breaking changes.
---
##### `constructsVersion`Optional
```typescript
public readonly constructsVersion: string;
```
- *Type:* string
- *Default:* for CDK 1.x the default is "3.2.27", for CDK 2.x the default is "10.5.1".
Minimum version of the `constructs` library to depend on.
---
##### `app`Optional
```typescript
public readonly app: string;
```
- *Type:* string
The command line to execute in order to synthesize the CDK application (language specific).
---
##### `appEntrypoint`Optional
```typescript
public readonly appEntrypoint: string;
```
- *Type:* string
- *Default:* "main.ts"
The CDK app's entrypoint (relative to the source directory, which is "src" by default).
---
##### `edgeLambdaAutoDiscover`Optional
```typescript
public readonly edgeLambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `experimentalIntegRunner`Optional
```typescript
public readonly experimentalIntegRunner: boolean;
```
- *Type:* boolean
- *Default:* false
Enable experimental support for the AWS CDK integ-runner.
---
##### `integrationTestAutoDiscover`Optional
```typescript
public readonly integrationTestAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically discovers and creates integration tests for each `.integ.ts` file in under your test directory.
---
##### `lambdaAutoDiscover`Optional
```typescript
public readonly lambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.LambdaFunction` for each `.lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `lambdaExtensionAutoDiscover`Optional
```typescript
public readonly lambdaExtensionAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `lambdaOptions`Optional
```typescript
public readonly lambdaOptions: LambdaFunctionCommonOptions;
```
- *Type:* projen.awscdk.LambdaFunctionCommonOptions
- *Default:* default options
Common options for all AWS Lambda functions.
---
##### `singletonLambdaAutoDiscover`Optional
```typescript
public readonly singletonLambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.SingletonFunction` for each `.singleton-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `privateNpm`Optional
```typescript
public readonly privateNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Whether to enable private NPM registry authentication.
---
##### `privateNpmTokenEnvVar`Optional
```typescript
public readonly privateNpmTokenEnvVar: string;
```
- *Type:* string
- *Default:* 'NPM_TOKEN'
The environment variable name containing the NPM authentication token.
---
##### `lumigo`Optional
```typescript
public readonly lumigo: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to enable Lumigo.
---
##### `sonarcloud`Optional
```typescript
public readonly sonarcloud: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to enable SonarCloud.
---
##### `sonarcloudOptions`Optional
```typescript
public readonly sonarcloudOptions: SonarcloudOptions;
```
- *Type:* SonarcloudOptions
The SonarCloud options.
---
##### `sops`Optional
```typescript
public readonly sops: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to enable SOPS.
---
### SonarcloudOptions
#### Initializer
```typescript
import { SonarcloudOptions } from '@taimos/projen'
const sonarcloudOptions: SonarcloudOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| exclude | string[] | The paths to exclude from SonarCloud analysis. |
| excludeDuplications | string[] | The paths to exclude from SonarCloud duplication analysis. |
---
##### `exclude`Optional
```typescript
public readonly exclude: string[];
```
- *Type:* string[]
The paths to exclude from SonarCloud analysis.
---
##### `excludeDuplications`Optional
```typescript
public readonly excludeDuplications: string[];
```
- *Type:* string[]
The paths to exclude from SonarCloud duplication analysis.
---
### TaimosCdkAppOptions
#### Initializer
```typescript
import { TaimosCdkAppOptions } from '@taimos/projen'
const taimosCdkAppOptions: TaimosCdkAppOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| name | string | This is the name of your project. |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| gitIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .gitignore file. |
| gitOptions | projen.GitOptions | Configuration options for git. |
| logging | projen.LoggerOptions | Configure logging options such as verbosity. |
| outdir | string | The root directory of the project. |
| parent | projen.Project | The parent project, if this project is part of a bigger project. |
| projectTree | boolean | Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging. |
| projenCommand | string | The shell command to use in order to run the projen CLI. |
| projenrcJson | boolean | Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. |
| projenrcJsonOptions | projen.ProjenrcJsonOptions | Options for .projenrc.json. |
| renovatebot | boolean | Use renovatebot to handle dependency upgrades. |
| renovatebotOptions | projen.RenovatebotOptions | Options for renovatebot. |
| autoApproveOptions | projen.github.AutoApproveOptions | Enable and configure the 'auto approve' workflow. |
| autoMerge | boolean | Enable automatic merging on GitHub. |
| autoMergeOptions | projen.github.AutoMergeOptions | Configure options for automatic merging on GitHub. |
| clobber | boolean | Add a `clobber` task which resets the repo to origin. |
| devContainer | boolean | Add a VSCode development environment (used for GitHub Codespaces). |
| github | boolean | Enable GitHub integration. |
| githubOptions | projen.github.GitHubOptions | Options for GitHub integration. |
| gitpod | boolean | Add a Gitpod development environment. |
| projenCredentials | projen.github.GithubCredentials | Choose a method of providing GitHub API access for projen workflows. |
| readme | projen.SampleReadmeProps | The README setup. |
| stale | boolean | Auto-close of stale issues and pull request. |
| staleOptions | projen.github.StaleOptions | Auto-close stale issues and pull requests. |
| vscode | boolean | Enable VSCode integration. |
| addPackageManagerToDevEngines | boolean | Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`. |
| allowLibraryDependencies | boolean | Allow the project to include `peerDependencies` and `bundledDependencies`. |
| allowScripts | string[] | List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation. |
| authorEmail | string | Author's e-mail. |
| authorName | string | Author's name. |
| authorOrganization | boolean | Is the author an organization. |
| authorUrl | string | Author's URL / Website. |
| autoDetectBin | boolean | Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. |
| bin | {[ key: string ]: string} | Binary programs vended with your module. |
| bugsEmail | string | The email address to which issues should be reported. |
| bugsUrl | string | The url to your project's issue tracker. |
| bundledDeps | string[] | List of dependencies to bundle into this module. |
| bunVersion | string | The version of Bun to use if using Bun as a package manager. |
| codeArtifactOptions | projen.javascript.CodeArtifactOptions | Options for npm packages using AWS CodeArtifact. |
| deleteOrphanedLockFiles | boolean | Automatically delete lockfiles from package managers that are not the active one. |
| deps | string[] | Runtime dependencies of this module. |
| description | string | The description is just a string that helps people understand the purpose of the package. |
| devDeps | string[] | Build dependencies for this module. |
| devEngines | projen.javascript.DevEngines | Configure the `devEngines` field in `package.json`. |
| entrypoint | string | Module entrypoint (`main` in `package.json`). |
| homepage | string | Package's Homepage / Website. |
| keywords | string[] | Keywords to include in `package.json`. |
| license | string | License's SPDX identifier. |
| licensed | boolean | Indicates if a license should be added. |
| maxNodeVersion | string | The maximum node version supported by this package. Most projects should not use this option. |
| minNodeVersion | string | The minimum node version required by this package to function. Most projects should not use this option. |
| npmAccess | projen.javascript.NpmAccess | Access level of the npm package. |
| npmProvenance | boolean | Should provenance statements be generated when the package is published. |
| npmRegistryUrl | string | The base URL of the npm package registry. |
| npmTokenSecret | string | GitHub secret which contains the NPM token to use when publishing packages. |
| npmTrustedPublishing | boolean | Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. |
| packageManager | projen.javascript.NodePackageManager | The Node Package Manager used to execute scripts. |
| packageName | string | The "name" in package.json. |
| peerDependencyOptions | projen.javascript.PeerDependencyOptions | Options for `peerDeps`. |
| peerDeps | string[] | Peer dependencies for this module. |
| pnpmOptions | projen.javascript.PnpmOptions | Options for pnpm. |
| pnpmVersion | string | The version of PNPM to use if using PNPM as a package manager. |
| repository | string | The repository is the location where the actual code for your package lives. |
| repositoryDirectory | string | If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
| scopedPackagesOptions | projen.javascript.ScopedPackagesOptions[] | Options for privately hosted scoped packages. |
| stability | string | Package's Stability. |
| yarnBerryOptions | projen.javascript.YarnBerryOptions | Options for Yarn Berry. |
| bumpPackage | string | The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string. |
| jsiiReleaseVersion | string | Version requirement of `publib` which is used to publish modules to npm. |
| majorVersion | number | Major version to release from the default branch. |
| minMajorVersion | number | Minimal Major version to release. |
| nextVersionCommand | string | A shell command to control the next version to release. |
| npmDistTag | string | The npmDistTag to use when publishing from the default branch. |
| postBuildSteps | projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| prerelease | string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| publishDryRun | boolean | Instead of actually publishing to package managers, just print the publishing command. |
| publishTasks | boolean | Define publishing tasks that can be executed manually as well as workflows. |
| releasableCommits | projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
| releaseBranches | {[ key: string ]: projen.release.BranchOptions} | Defines additional release branches. |
| releaseEnvironment | string | The GitHub Actions environment used for the release. |
| releaseFailureIssue | boolean | Create a github issue on every failed publishing task. |
| releaseFailureIssueLabel | string | The label to apply to issues indicating publish failures. |
| releaseTagPrefix | string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
| releaseTrigger | projen.release.ReleaseTrigger | The release trigger to use. |
| releaseWorkflowEnv | {[ key: string ]: string} | Build environment variables for release workflows. |
| releaseWorkflowName | string | The name of the default release workflow. |
| releaseWorkflowSetupSteps | projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| versionrcOptions | {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| workflowContainerImage | string | Container image to use for GitHub workflows. |
| workflowRunsOn | string[] | Github Runner selection labels. |
| workflowRunsOnGroup | projen.GroupRunnerOptions | Github Runner Group selection options. |
| artifactsDirectory | string | A directory which will contain build artifacts. |
| auditDeps | boolean | Run security audit on dependencies. |
| auditDepsOptions | projen.javascript.AuditOptions | Security audit options. |
| autoApproveUpgrades | boolean | Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured). |
| biome | boolean | Setup Biome. |
| biomeOptions | projen.javascript.BiomeOptions | Biome options. |
| buildWorkflow | boolean | Define a GitHub workflow for building PRs. |
| buildWorkflowOptions | projen.javascript.BuildWorkflowOptions | Options for PR build workflow. |
| bundlerOptions | projen.javascript.BundlerOptions | Options for `Bundler`. |
| checkLicenses | projen.javascript.LicenseCheckerOptions | Configure which licenses should be deemed acceptable for use by dependencies. |
| codeCov | boolean | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`. |
| codeCovTokenSecret | string | Define the secret name for a specified https://codecov.io/ token. |
| copyrightOwner | string | License copyright owner. |
| copyrightPeriod | string | The copyright years to put in the LICENSE file. |
| defaultReleaseBranch | string | The name of the main release branch. |
| dependabot | boolean | Use dependabot to handle dependency upgrades. |
| dependabotOptions | projen.github.DependabotOptions | Options for dependabot. |
| depsUpgrade | boolean | Use tasks and github workflows to handle dependency upgrades. |
| depsUpgradeOptions | projen.javascript.UpgradeDependenciesOptions | Options for `UpgradeDependencies`. |
| gitignore | string[] | Additional entries to .gitignore. |
| jest | boolean | Setup jest unit tests. |
| jestOptions | projen.javascript.JestOptions | Jest options. |
| npmignoreEnabled | boolean | Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
| npmIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .npmignore file. |
| package | boolean | Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). |
| prettier | boolean | Setup prettier. |
| prettierOptions | projen.javascript.PrettierOptions | Prettier options. |
| projenDevDependency | boolean | Indicates of "projen" should be installed as a devDependency. |
| projenrcJs | boolean | Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. |
| projenrcJsOptions | projen.javascript.ProjenrcOptions | Options for .projenrc.js. |
| projenVersion | string | Version of projen to install. |
| pullRequestTemplate | boolean | Include a GitHub pull request template. |
| pullRequestTemplateContents | string[] | The contents of the pull request template. |
| release | boolean | Add release management to this project. |
| releaseToNpm | boolean | Automatically release to npm when new versions are introduced. |
| workflowBootstrapSteps | projen.github.workflows.JobStep[] | Workflow steps to use in order to bootstrap this repo. |
| workflowGitIdentity | projen.github.GitIdentity | The git identity to use in workflows. |
| workflowNodeVersion | string | The node version used in GitHub Actions workflows. |
| workflowPackageCache | boolean | Enable Node.js package cache in GitHub workflows. |
| disableTsconfig | boolean | Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
| disableTsconfigDev | boolean | Do not generate a development tsconfig file. |
| docgen | boolean | Docgen by Typedoc. |
| docsDirectory | string | Docs directory. |
| entrypointTypes | string | The .d.ts file that includes the type declarations for this module. |
| eslint | boolean | Setup eslint. |
| eslintOptions | projen.javascript.EslintOptions | Eslint options. |
| libdir | string | Typescript artifacts output directory. |
| projenrcTs | boolean | Use TypeScript for your projenrc file (`.projenrc.ts`). |
| projenrcTsOptions | projen.typescript.ProjenrcOptions | Options for .projenrc.ts. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner to use for executing TypeScript files. |
| sampleCode | boolean | Generate one-time sample in `src/` and `test/` if there are no files there. |
| srcdir | string | Typescript sources directory. |
| testdir | string | Jest tests directory. Tests files should be named `xxx.test.ts`. |
| tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. |
| tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). |
| tsconfigDevFile | string | The name (and path) of the development tsconfig file. |
| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. |
| typescriptVersion | string | TypeScript version to use. |
| buildCommand | string | A command to execute before synthesis. |
| cdkout | string | cdk.out directory. |
| context | {[ key: string ]: any} | Additional context to include in `cdk.json`. |
| featureFlags | projen.awscdk.ICdkFeatureFlags | Feature flags that should be enabled in `cdk.json`. |
| requireApproval | projen.awscdk.ApprovalLevel | To protect you against unintended changes that affect your security posture, the AWS CDK Toolkit prompts you to approve security-related changes before deploying them. |
| watchExcludes | string[] | Glob patterns to exclude from `cdk watch`. |
| watchIncludes | string[] | Glob patterns to include in `cdk watch`. |
| cdkVersion | string | Minimum version of the AWS CDK to depend on. |
| cdkCliVersion | string | Version range of the AWS CDK CLI to depend on. |
| cdkVersionPinning | boolean | Use pinned version instead of caret version for CDK. |
| constructsVersion | string | Minimum version of the `constructs` library to depend on. |
| app | string | The command line to execute in order to synthesize the CDK application (language specific). |
| appEntrypoint | string | The CDK app's entrypoint (relative to the source directory, which is "src" by default). |
| edgeLambdaAutoDiscover | boolean | Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| experimentalIntegRunner | boolean | Enable experimental support for the AWS CDK integ-runner. |
| integrationTestAutoDiscover | boolean | Automatically discovers and creates integration tests for each `.integ.ts` file in under your test directory. |
| lambdaAutoDiscover | boolean | Automatically adds an `awscdk.LambdaFunction` for each `.lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| lambdaExtensionAutoDiscover | boolean | Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| lambdaOptions | projen.awscdk.LambdaFunctionCommonOptions | Common options for all AWS Lambda functions. |
| singletonLambdaAutoDiscover | boolean | Automatically adds an `awscdk.SingletonFunction` for each `.singleton-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| privateNpm | boolean | Whether to enable private NPM registry authentication. |
| privateNpmTokenEnvVar | string | The environment variable name containing the NPM authentication token. |
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
- *Default:* $BASEDIR
This is the name of your project.
---
##### `commitGenerated`Optional
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to commit the managed files by default.
---
##### `gitIgnoreOptions`Optional
```typescript
public readonly gitIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .gitignore file.
---
##### `gitOptions`Optional
```typescript
public readonly gitOptions: GitOptions;
```
- *Type:* projen.GitOptions
Configuration options for git.
---
##### `logging`Optional
```typescript
public readonly logging: LoggerOptions;
```
- *Type:* projen.LoggerOptions
- *Default:* {}
Configure logging options such as verbosity.
---
##### `outdir`Optional
```typescript
public readonly outdir: string;
```
- *Type:* string
- *Default:* "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent
directory and it cannot be the same as the parent or any of it's other
subprojects.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
The parent project, if this project is part of a bigger project.
---
##### `projectTree`Optional
```typescript
public readonly projectTree: boolean;
```
- *Type:* boolean
- *Default:* false
Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging.
---
##### `projenCommand`Optional
```typescript
public readonly projenCommand: string;
```
- *Type:* string
- *Default:* "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
---
##### `projenrcJson`Optional
```typescript
public readonly projenrcJson: boolean;
```
- *Type:* boolean
- *Default:* false
Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
---
##### `projenrcJsonOptions`Optional
```typescript
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
```
- *Type:* projen.ProjenrcJsonOptions
- *Default:* default options
Options for .projenrc.json.
---
##### `renovatebot`Optional
```typescript
public readonly renovatebot: boolean;
```
- *Type:* boolean
- *Default:* false
Use renovatebot to handle dependency upgrades.
---
##### `renovatebotOptions`Optional
```typescript
public readonly renovatebotOptions: RenovatebotOptions;
```
- *Type:* projen.RenovatebotOptions
- *Default:* default options
Options for renovatebot.
---
##### `autoApproveOptions`Optional
```typescript
public readonly autoApproveOptions: AutoApproveOptions;
```
- *Type:* projen.github.AutoApproveOptions
- *Default:* auto approve is disabled
Enable and configure the 'auto approve' workflow.
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: boolean;
```
- *Type:* boolean
- *Default:* true
Enable automatic merging on GitHub.
Has no effect if `github.mergify`
is set to false.
---
##### `autoMergeOptions`Optional
```typescript
public readonly autoMergeOptions: AutoMergeOptions;
```
- *Type:* projen.github.AutoMergeOptions
- *Default:* see defaults in `AutoMergeOptions`
Configure options for automatic merging on GitHub.
Has no effect if
`github.mergify` or `autoMerge` is set to false.
---
##### `clobber`Optional
```typescript
public readonly clobber: boolean;
```
- *Type:* boolean
- *Default:* true, but false for subprojects
Add a `clobber` task which resets the repo to origin.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: boolean;
```
- *Type:* boolean
- *Default:* false
Add a VSCode development environment (used for GitHub Codespaces).
---
##### `github`Optional
```typescript
public readonly github: boolean;
```
- *Type:* boolean
- *Default:* true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `githubOptions`Optional
```typescript
public readonly githubOptions: GitHubOptions;
```
- *Type:* projen.github.GitHubOptions
- *Default:* see GitHubOptions
Options for GitHub integration.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: boolean;
```
- *Type:* boolean
- *Default:* false
Add a Gitpod development environment.
---
##### `projenCredentials`Optional
```typescript
public readonly projenCredentials: GithubCredentials;
```
- *Type:* projen.github.GithubCredentials
- *Default:* use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
---
##### `readme`Optional
```typescript
public readonly readme: SampleReadmeProps;
```
- *Type:* projen.SampleReadmeProps
- *Default:* { filename: 'README.md', contents: '# replace this' }
The README setup.
---
*Example*
```typescript
"{ filename: 'readme.md', contents: '# title' }"
```
##### `stale`Optional
```typescript
public readonly stale: boolean;
```
- *Type:* boolean
- *Default:* false
Auto-close of stale issues and pull request.
See `staleOptions` for options.
---
##### `staleOptions`Optional
```typescript
public readonly staleOptions: StaleOptions;
```
- *Type:* projen.github.StaleOptions
- *Default:* see defaults in `StaleOptions`
Auto-close stale issues and pull requests.
To disable set `stale` to `false`.
---
##### `vscode`Optional
```typescript
public readonly vscode: boolean;
```
- *Type:* boolean
- *Default:* true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `addPackageManagerToDevEngines`Optional
```typescript
public readonly addPackageManagerToDevEngines: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`.
---
##### `allowLibraryDependencies`Optional
```typescript
public readonly allowLibraryDependencies: boolean;
```
- *Type:* boolean
- *Default:* true
Allow the project to include `peerDependencies` and `bundledDependencies`.
This is normally only allowed for libraries. For apps, there's no meaning
for specifying these.
---
##### `allowScripts`Optional
```typescript
public readonly allowScripts: string[];
```
- *Type:* string[]
- *Default:* all install scripts are allowed to run (package manager default)
List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation.
These scripts can execute arbitrary code, making them a common
supply-chain attack vector. Package managers are moving toward
blocking them by default and requiring an explicit allowlist.
Configuring `allowScripts` sets up that allowlist so scripts only run
for the packages you have explicitly reviewed and trust.
Support for this setting depends on the configured `packageManager`:
- `NPM`: written to the native `allowScripts` field in `package.json`
(requires npm >= 11.16; see https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts).
- `BUN`: written to the native `trustedDependencies` field in
`package.json` (see https://bun.com/docs/pm/lifecycle).
- `PNPM`: written to the `onlyBuiltDependencies` setting in
`pnpm-workspace.yaml` (see https://pnpm.io/settings#onlybuiltdependencies).
- `YARN2`, `YARN_BERRY`: written to the native
`dependenciesMeta..built` allowlist in `package.json`, combined
with `enableScripts: false` in `.yarnrc.yml` (see
https://yarnpkg.com/features/security#postinstalls). If you set
`yarnBerryOptions.yarnRcOptions.enableScripts` explicitly, that value
is respected instead of being overridden.
- `YARN`, `YARN_CLASSIC`: not supported. Yarn Classic has no native
mechanism to allowlist install scripts for specific dependencies.
Setting this option with one of these package managers throws an
error at synthesis time.
---
##### `authorEmail`Optional
```typescript
public readonly authorEmail: string;
```
- *Type:* string
Author's e-mail.
---
##### `authorName`Optional
```typescript
public readonly authorName: string;
```
- *Type:* string
Author's name.
---
##### `authorOrganization`Optional
```typescript
public readonly authorOrganization: boolean;
```
- *Type:* boolean
Is the author an organization.
---
##### `authorUrl`Optional
```typescript
public readonly authorUrl: string;
```
- *Type:* string
Author's URL / Website.
---
##### `autoDetectBin`Optional
```typescript
public readonly autoDetectBin: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
---
##### `bin`Optional
```typescript
public readonly bin: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your `package.json`, but unless `autoDetectBin` is `false`, every
executable file under `bin` will automatically be added to this section.
---
##### `bugsEmail`Optional
```typescript
public readonly bugsEmail: string;
```
- *Type:* string
The email address to which issues should be reported.
---
##### `bugsUrl`Optional
```typescript
public readonly bugsUrl: string;
```
- *Type:* string
The url to your project's issue tracker.
---
##### `bundledDeps`Optional
```typescript
public readonly bundledDeps: string[];
```
- *Type:* string[]
List of dependencies to bundle into this module.
These modules will be
added both to the `dependencies` section and `bundledDependencies` section of
your `package.json`.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
##### `bunVersion`Optional
```typescript
public readonly bunVersion: string;
```
- *Type:* string
- *Default:* "latest"
The version of Bun to use if using Bun as a package manager.
---
##### `codeArtifactOptions`Optional
```typescript
public readonly codeArtifactOptions: CodeArtifactOptions;
```
- *Type:* projen.javascript.CodeArtifactOptions
- *Default:* undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
---
##### `deleteOrphanedLockFiles`Optional
```typescript
public readonly deleteOrphanedLockFiles: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically delete lockfiles from package managers that are not the active one.
Only triggered when the lockfile for the configured package
manager already exists.
This is useful when migrating between package managers to avoid conflicts.
---
##### `deps`Optional
```typescript
public readonly deps: string[];
```
- *Type:* string[]
- *Default:* []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'express', 'lodash', 'foo@^2' ]
```
##### `description`Optional
```typescript
public readonly description: string;
```
- *Type:* string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
---
##### `devDeps`Optional
```typescript
public readonly devDeps: string[];
```
- *Type:* string[]
- *Default:* []
Build dependencies for this module.
These dependencies will only be
available in your build environment but will not be fetched when this
module is consumed.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'typescript', '@types/express' ]
```
##### `devEngines`Optional
```typescript
public readonly devEngines: DevEngines;
```
- *Type:* projen.javascript.DevEngines
Configure the `devEngines` field in `package.json`.
The `devEngines.packageManager` field is automatically populated based on
the resolved `packageManager` value. Any fields provided here are merged
with the auto-populated `packageManager` entry.
> [https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines)
---
##### `entrypoint`Optional
```typescript
public readonly entrypoint: string;
```
- *Type:* string
- *Default:* "lib/index.js"
Module entrypoint (`main` in `package.json`).
Set to an empty string to not include `main` in your package.json
---
##### `homepage`Optional
```typescript
public readonly homepage: string;
```
- *Type:* string
Package's Homepage / Website.
---
##### `keywords`Optional
```typescript
public readonly keywords: string[];
```
- *Type:* string[]
Keywords to include in `package.json`.
---
##### `license`Optional
```typescript
public readonly license: string;
```
- *Type:* string
- *Default:* "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the `licensed` option if you want to no license to be specified.
---
##### `licensed`Optional
```typescript
public readonly licensed: boolean;
```
- *Type:* boolean
- *Default:* true
Indicates if a license should be added.
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
- *Default:* no maximum version is enforced
The maximum node version supported by this package. Most projects should not use this option.
The value indicates that the package is incompatible with any newer versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option.
Consider this option only if your package is known to not function with newer versions of node.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
- *Default:* no minimum version is enforced
The minimum node version required by this package to function. Most projects should not use this option.
The value indicates that the package is incompatible with any older versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
Setting this option has very high impact on the consumers of your package,
as package managers will actively prevent usage with node versions you have marked as incompatible.
To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
---
##### `npmAccess`Optional
```typescript
public readonly npmAccess: NpmAccess;
```
- *Type:* projen.javascript.NpmAccess
- *Default:* for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
Access level of the npm package.
---
##### `npmProvenance`Optional
```typescript
public readonly npmProvenance: boolean;
```
- *Type:* boolean
- *Default:* true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and
you will need to use a supported CI/CD provider.
Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
> [https://docs.npmjs.com/generating-provenance-statements](https://docs.npmjs.com/generating-provenance-statements)
---
##### `npmRegistryUrl`Optional
```typescript
public readonly npmRegistryUrl: string;
```
- *Type:* string
- *Default:* "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
---
##### `npmTokenSecret`Optional
```typescript
public readonly npmTokenSecret: string;
```
- *Type:* string
- *Default:* "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
---
##### `npmTrustedPublishing`Optional
```typescript
public readonly npmTrustedPublishing: boolean;
```
- *Type:* boolean
- *Default:* false
Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
---
##### `packageManager`Optional
```typescript
public readonly packageManager: NodePackageManager;
```
- *Type:* projen.javascript.NodePackageManager
- *Default:* Detected from the calling process or `YARN_CLASSIC` if detection fails.
The Node Package Manager used to execute scripts.
---
##### `packageName`Optional
```typescript
public readonly packageName: string;
```
- *Type:* string
- *Default:* defaults to project name
The "name" in package.json.
---
##### `peerDependencyOptions`Optional
```typescript
public readonly peerDependencyOptions: PeerDependencyOptions;
```
- *Type:* projen.javascript.PeerDependencyOptions
Options for `peerDeps`.
---
##### `peerDeps`Optional
```typescript
public readonly peerDeps: string[];
```
- *Type:* string[]
- *Default:* []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the _consumer_ of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the `node_modules` tree of your consumers.
Note that prior to npm@7, peer dependencies are _not_ automatically
installed, which means that adding peer dependencies to a library will be a
breaking change for your customers.
Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
---
##### `pnpmOptions`Optional
```typescript
public readonly pnpmOptions: PnpmOptions;
```
- *Type:* projen.javascript.PnpmOptions
- *Default:* all default options
Options for pnpm.
---
##### `pnpmVersion`Optional
```typescript
public readonly pnpmVersion: string;
```
- *Type:* string
- *Default:* "10.33.0"
The version of PNPM to use if using PNPM as a package manager.
---
##### `repository`Optional
```typescript
public readonly repository: string;
```
- *Type:* string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
---
##### `repositoryDirectory`Optional
```typescript
public readonly repositoryDirectory: string;
```
- *Type:* string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
---
##### `scopedPackagesOptions`Optional
```typescript
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
```
- *Type:* projen.javascript.ScopedPackagesOptions[]
- *Default:* fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
---
##### `stability`Optional
```typescript
public readonly stability: string;
```
- *Type:* string
Package's Stability.
---
##### `yarnBerryOptions`Optional
```typescript
public readonly yarnBerryOptions: YarnBerryOptions;
```
- *Type:* projen.javascript.YarnBerryOptions
- *Default:* Yarn Berry v4 with all default options
Options for Yarn Berry.
---
##### `bumpPackage`Optional
```typescript
public readonly bumpPackage: string;
```
- *Type:* string
- *Default:* A recent version of "commit-and-tag-version"
The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
This can be any compatible package version, including the deprecated `standard-version@9`.
---
##### `jsiiReleaseVersion`Optional
```typescript
public readonly jsiiReleaseVersion: string;
```
- *Type:* string
- *Default:* "latest"
Version requirement of `publib` which is used to publish modules to npm.
---
##### `majorVersion`Optional
```typescript
public readonly majorVersion: number;
```
- *Type:* number
- *Default:* Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line.
If not specified, we bump the global latest version.
---
##### `minMajorVersion`Optional
```typescript
public readonly minMajorVersion: number;
```
- *Type:* number
- *Default:* No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major
release are not incrementing the major version number.
Can not be set together with `majorVersion`.
---
##### `nextVersionCommand`Optional
```typescript
public readonly nextVersionCommand: string;
```
- *Type:* string
- *Default:* The next version will be determined based on the commit history and project settings.
A shell command to control the next version to release.
If present, this shell command will be run before the bump is executed, and
it determines what version to release. It will be executed in the following
environment:
- Working directory: the project directory.
- `$VERSION`: the current version. Looks like `1.2.3`.
- `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
- `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
The command should print one of the following to `stdout`:
- Nothing: the next version number will be determined based on commit history.
- `x.y.z`: the next version number will be `x.y.z`.
- `major|minor|patch`: the next version number will be the current version number
with the indicated component bumped.
This setting cannot be specified together with `minMajorVersion`; the invoked
script can be used to achieve the effects of `minMajorVersion`.
---
##### `npmDistTag`Optional
```typescript
public readonly npmDistTag: string;
```
- *Type:* string
- *Default:* "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the `npmDistTag` property
for each branch.
---
##### `postBuildSteps`Optional
```typescript
public readonly postBuildSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* []
Steps to execute after build as part of the release workflow.
---
##### `prerelease`Optional
```typescript
public readonly prerelease: string;
```
- *Type:* string
- *Default:* normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
---
##### `publishDryRun`Optional
```typescript
public readonly publishDryRun: boolean;
```
- *Type:* boolean
- *Default:* false
Instead of actually publishing to package managers, just print the publishing command.
---
##### `publishTasks`Optional
```typescript
public readonly publishTasks: boolean;
```
- *Type:* boolean
- *Default:* false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this
in order to create a publishing task for each publishing activity.
---
##### `releasableCommits`Optional
```typescript
public readonly releasableCommits: ReleasableCommits;
```
- *Type:* projen.ReleasableCommits
- *Default:* ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
---
##### `releaseBranches`Optional
```typescript
public readonly releaseBranches: {[ key: string ]: BranchOptions};
```
- *Type:* {[ key: string ]: projen.release.BranchOptions}
- *Default:* no additional branches are used for release. you can use `addBranch()` to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch _must_ be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the `majorVersion` field must also
be provided for the default branch.
---
##### `releaseEnvironment`Optional
```typescript
public readonly releaseEnvironment: string;
```
- *Type:* string
- *Default:* no environment used, unless set at the artifact level
The GitHub Actions environment used for the release.
This can be used to add an explicit approval step to the release
or limit who can initiate a release through environment protection rules.
When multiple artifacts are released, the environment can be overwritten
on a per artifact basis.
---
##### `releaseFailureIssue`Optional
```typescript
public readonly releaseFailureIssue: boolean;
```
- *Type:* boolean
- *Default:* false
Create a github issue on every failed publishing task.
---
##### `releaseFailureIssueLabel`Optional
```typescript
public readonly releaseFailureIssueLabel: string;
```
- *Type:* string
- *Default:* "failed-release"
The label to apply to issues indicating publish failures.
Only applies if `releaseFailureIssue` is true.
---
##### `releaseTagPrefix`Optional
```typescript
public readonly releaseTagPrefix: string;
```
- *Type:* string
- *Default:* "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version
when bumping, so if you change this on a project with an existing version
history, you may need to manually tag your latest release
with the new prefix.
---
##### `releaseTrigger`Optional
```typescript
public readonly releaseTrigger: ReleaseTrigger;
```
- *Type:* projen.release.ReleaseTrigger
- *Default:* Continuous releases (`ReleaseTrigger.continuous()`)
The release trigger to use.
---
##### `releaseWorkflowEnv`Optional
```typescript
public readonly releaseWorkflowEnv: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
- *Default:* {}
Build environment variables for release workflows.
---
##### `releaseWorkflowName`Optional
```typescript
public readonly releaseWorkflowName: string;
```
- *Type:* string
- *Default:* "release"
The name of the default release workflow.
---
##### `releaseWorkflowSetupSteps`Optional
```typescript
public readonly releaseWorkflowSetupSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
---
##### `versionrcOptions`Optional
```typescript
public readonly versionrcOptions: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with commit-and-tag-version package.
Given values either append to default configuration or overwrite values in it.
---
##### `workflowContainerImage`Optional
```typescript
public readonly workflowContainerImage: string;
```
- *Type:* string
- *Default:* default image
Container image to use for GitHub workflows.
---
##### `workflowRunsOn`Optional
```typescript
public readonly workflowRunsOn: string[];
```
- *Type:* string[]
- *Default:* ["ubuntu-latest"]
Github Runner selection labels.
---
##### `workflowRunsOnGroup`Optional
```typescript
public readonly workflowRunsOnGroup: GroupRunnerOptions;
```
- *Type:* projen.GroupRunnerOptions
Github Runner Group selection options.
---
##### `artifactsDirectory`Optional
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
- *Default:* "dist"
A directory which will contain build artifacts.
---
##### `auditDeps`Optional
```typescript
public readonly auditDeps: boolean;
```
- *Type:* boolean
- *Default:* false
Run security audit on dependencies.
When enabled, creates an "audit" task that checks for known security vulnerabilities
in dependencies. By default, runs during every build and checks for "high" severity
vulnerabilities or above in all dependencies (including dev dependencies).
---
##### `auditDepsOptions`Optional
```typescript
public readonly auditDepsOptions: AuditOptions;
```
- *Type:* projen.javascript.AuditOptions
- *Default:* default options
Security audit options.
---
##### `autoApproveUpgrades`Optional
```typescript
public readonly autoApproveUpgrades: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured).
Throw if set to true but `autoApproveOptions` are not defined.
---
##### `biome`Optional
```typescript
public readonly biome: boolean;
```
- *Type:* boolean
- *Default:* false
Setup Biome.
---
##### `biomeOptions`Optional
```typescript
public readonly biomeOptions: BiomeOptions;
```
- *Type:* projen.javascript.BiomeOptions
- *Default:* default options
Biome options.
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Define a GitHub workflow for building PRs.
---
##### `buildWorkflowOptions`Optional
```typescript
public readonly buildWorkflowOptions: BuildWorkflowOptions;
```
- *Type:* projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
---
##### `bundlerOptions`Optional
```typescript
public readonly bundlerOptions: BundlerOptions;
```
- *Type:* projen.javascript.BundlerOptions
Options for `Bundler`.
---
##### `checkLicenses`Optional
```typescript
public readonly checkLicenses: LicenseCheckerOptions;
```
- *Type:* projen.javascript.LicenseCheckerOptions
- *Default:* no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
---
##### `codeCov`Optional
```typescript
public readonly codeCov: boolean;
```
- *Type:* boolean
- *Default:* false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
---
##### `codeCovTokenSecret`Optional
```typescript
public readonly codeCovTokenSecret: string;
```
- *Type:* string
- *Default:* OIDC auth is used
Define the secret name for a specified https://codecov.io/ token.
---
##### `copyrightOwner`Optional
```typescript
public readonly copyrightOwner: string;
```
- *Type:* string
- *Default:* defaults to the value of authorName or "" if `authorName` is undefined.
License copyright owner.
This value is only used if the selected license text contains the
`$copyright_owner` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `copyrightPeriod`Optional
```typescript
public readonly copyrightPeriod: string;
```
- *Type:* string
- *Default:* current year
The copyright years to put in the LICENSE file.
This value is only used if the selected license text contains the
`$copyright_period` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `defaultReleaseBranch`Optional
```typescript
public readonly defaultReleaseBranch: string;
```
- *Type:* string
- *Default:* "main"
The name of the main release branch.
---
##### `dependabot`Optional
```typescript
public readonly dependabot: boolean;
```
- *Type:* boolean
- *Default:* false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with `depsUpgrade`.
---
##### `dependabotOptions`Optional
```typescript
public readonly dependabotOptions: DependabotOptions;
```
- *Type:* projen.github.DependabotOptions
- *Default:* default options
Options for dependabot.
---
##### `depsUpgrade`Optional
```typescript
public readonly depsUpgrade: boolean;
```
- *Type:* boolean
- *Default:* `true` for root projects, `false` for subprojects
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with `dependabot`.
---
##### `depsUpgradeOptions`Optional
```typescript
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
```
- *Type:* projen.javascript.UpgradeDependenciesOptions
- *Default:* default options
Options for `UpgradeDependencies`.
---
##### `gitignore`Optional
```typescript
public readonly gitignore: string[];
```
- *Type:* string[]
Additional entries to .gitignore.
---
##### `jest`Optional
```typescript
public readonly jest: boolean;
```
- *Type:* boolean
- *Default:* true
Setup jest unit tests.
---
##### `jestOptions`Optional
```typescript
public readonly jestOptions: JestOptions;
```
- *Type:* projen.javascript.JestOptions
- *Default:* default options
Jest options.
---
##### `npmignoreEnabled`Optional
```typescript
public readonly npmignoreEnabled: boolean;
```
- *Type:* boolean
- *Default:* true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
---
##### `npmIgnoreOptions`Optional
```typescript
public readonly npmIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .npmignore file.
---
##### `package`Optional
```typescript
public readonly package: boolean;
```
- *Type:* boolean
- *Default:* true
Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
---
##### `prettier`Optional
```typescript
public readonly prettier: boolean;
```
- *Type:* boolean
- *Default:* false
Setup prettier.
---
##### `prettierOptions`Optional
```typescript
public readonly prettierOptions: PrettierOptions;
```
- *Type:* projen.javascript.PrettierOptions
- *Default:* default options
Prettier options.
---
##### `projenDevDependency`Optional
```typescript
public readonly projenDevDependency: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Indicates of "projen" should be installed as a devDependency.
---
##### `projenrcJs`Optional
```typescript
public readonly projenrcJs: boolean;
```
- *Type:* boolean
- *Default:* true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
---
##### `projenrcJsOptions`Optional
```typescript
public readonly projenrcJsOptions: ProjenrcOptions;
```
- *Type:* projen.javascript.ProjenrcOptions
- *Default:* default options
Options for .projenrc.js.
---
##### `projenVersion`Optional
```typescript
public readonly projenVersion: string;
```
- *Type:* string
- *Default:* Defaults to the latest version.
Version of projen to install.
---
##### `pullRequestTemplate`Optional
```typescript
public readonly pullRequestTemplate: boolean;
```
- *Type:* boolean
- *Default:* true
Include a GitHub pull request template.
---
##### `pullRequestTemplateContents`Optional
```typescript
public readonly pullRequestTemplateContents: string[];
```
- *Type:* string[]
- *Default:* default content
The contents of the pull request template.
---
##### `release`Optional
```typescript
public readonly release: boolean;
```
- *Type:* boolean
- *Default:* true (false for subprojects)
Add release management to this project.
---
##### `releaseToNpm`Optional
```typescript
public readonly releaseToNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Automatically release to npm when new versions are introduced.
---
##### `workflowBootstrapSteps`Optional
```typescript
public readonly workflowBootstrapSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
---
##### `workflowGitIdentity`Optional
```typescript
public readonly workflowGitIdentity: GitIdentity;
```
- *Type:* projen.github.GitIdentity
- *Default:* default GitHub Actions user
The git identity to use in workflows.
---
##### `workflowNodeVersion`Optional
```typescript
public readonly workflowNodeVersion: string;
```
- *Type:* string
- *Default:* `minNodeVersion` if set, otherwise `lts/*`.
The node version used in GitHub Actions workflows.
Always use this option if your GitHub Actions workflows require a specific to run.
---
##### `workflowPackageCache`Optional
```typescript
public readonly workflowPackageCache: boolean;
```
- *Type:* boolean
- *Default:* false
Enable Node.js package cache in GitHub workflows.
---
##### `disableTsconfig`Optional
```typescript
public readonly disableTsconfig: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
---
##### `disableTsconfigDev`Optional
```typescript
public readonly disableTsconfigDev: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a development tsconfig file.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
- *Default:* false
Docgen by Typedoc.
---
##### `docsDirectory`Optional
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
- *Default:* "docs"
Docs directory.
---
##### `entrypointTypes`Optional
```typescript
public readonly entrypointTypes: string;
```
- *Type:* string
- *Default:* .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
---
##### `eslint`Optional
```typescript
public readonly eslint: boolean;
```
- *Type:* boolean
- *Default:* true, unless biome is enabled
Setup eslint.
---
##### `eslintOptions`Optional
```typescript
public readonly eslintOptions: EslintOptions;
```
- *Type:* projen.javascript.EslintOptions
- *Default:* opinionated default options
Eslint options.
---
##### `libdir`Optional
```typescript
public readonly libdir: string;
```
- *Type:* string
- *Default:* "lib"
Typescript artifacts output directory.
---
##### `projenrcTs`Optional
```typescript
public readonly projenrcTs: boolean;
```
- *Type:* boolean
- *Default:* false
Use TypeScript for your projenrc file (`.projenrc.ts`).
---
##### `projenrcTsOptions`Optional
```typescript
public readonly projenrcTsOptions: ProjenrcOptions;
```
- *Type:* projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
---
##### `runner`Optional
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
- *Default:* TypeScriptRunner.tsNode()
The TypeScript runner to use for executing TypeScript files.
This is a project-level setting that components (e.g. projenrc) will
use as their default runner.
---
##### `sampleCode`Optional
```typescript
public readonly sampleCode: boolean;
```
- *Type:* boolean
- *Default:* true
Generate one-time sample in `src/` and `test/` if there are no files there.
---
##### `srcdir`Optional
```typescript
public readonly srcdir: string;
```
- *Type:* string
- *Default:* "src"
Typescript sources directory.
---
##### `testdir`Optional
```typescript
public readonly testdir: string;
```
- *Type:* string
- *Default:* "test"
Jest tests directory. Tests files should be named `xxx.test.ts`.
If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
then tests are going to be compiled into `lib/` and executed as javascript.
If the test directory is outside of `src`, then we configure jest to
compile the code in-memory.
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* default options
Custom TSConfig.
---
##### `tsconfigDev`Optional
```typescript
public readonly tsconfigDev: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
---
##### `tsconfigDevFile`Optional
```typescript
public readonly tsconfigDevFile: string;
```
- *Type:* string
- *Default:* "{testdir}/tsconfig.json"
The name (and path) of the development tsconfig file.
By default this lives inside the test directory (e.g. `test/tsconfig.json`)
so that the TypeScript language service resolves it as the nearest config
for test files.
---
##### `tsJestOptions`Optional
```typescript
public readonly tsJestOptions: TsJestOptions;
```
- *Type:* projen.typescript.TsJestOptions
Options for ts-jest.
---
##### `typescriptVersion`Optional
```typescript
public readonly typescriptVersion: string;
```
- *Type:* string
- *Default:* "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
---
##### `buildCommand`Optional
```typescript
public readonly buildCommand: string;
```
- *Type:* string
- *Default:* no build command
A command to execute before synthesis.
This command will be called when
running `cdk synth` or when `cdk watch` identifies a change in your source
code before redeployment.
---
##### `cdkout`Optional
```typescript
public readonly cdkout: string;
```
- *Type:* string
- *Default:* "cdk.out"
cdk.out directory.
---
##### `context`Optional
```typescript
public readonly context: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* no additional context
Additional context to include in `cdk.json`.
---
##### `featureFlags`Optional
```typescript
public readonly featureFlags: ICdkFeatureFlags;
```
- *Type:* projen.awscdk.ICdkFeatureFlags
- *Default:* no feature flags are enabled by default
Feature flags that should be enabled in `cdk.json`.
Make sure to double-check any changes to feature flags in `cdk.json` before deploying.
Unexpected changes may cause breaking changes in your CDK app.
You can overwrite any feature flag by passing it into the context field.
---
##### `requireApproval`Optional
```typescript
public readonly requireApproval: ApprovalLevel;
```
- *Type:* projen.awscdk.ApprovalLevel
- *Default:* ApprovalLevel.BROADENING
To protect you against unintended changes that affect your security posture, the AWS CDK Toolkit prompts you to approve security-related changes before deploying them.
---
##### `watchExcludes`Optional
```typescript
public readonly watchExcludes: string[];
```
- *Type:* string[]
- *Default:* []
Glob patterns to exclude from `cdk watch`.
---
##### `watchIncludes`Optional
```typescript
public readonly watchIncludes: string[];
```
- *Type:* string[]
- *Default:* []
Glob patterns to include in `cdk watch`.
---
##### `cdkVersion`Required
```typescript
public readonly cdkVersion: string;
```
- *Type:* string
- *Default:* "2.189.1"
Minimum version of the AWS CDK to depend on.
---
##### `cdkCliVersion`Optional
```typescript
public readonly cdkCliVersion: string;
```
- *Type:* string
- *Default:* "^2"
Version range of the AWS CDK CLI to depend on.
Can be either a specific version, or an NPM version range.
By default, the latest 2.x version will be installed; you can use this
option to restrict it to a specific version or version range.
---
##### `cdkVersionPinning`Optional
```typescript
public readonly cdkVersionPinning: boolean;
```
- *Type:* boolean
Use pinned version instead of caret version for CDK.
You can use this to prevent mixed versions for your CDK dependencies and to prevent auto-updates.
If you use experimental features this will let you define the moment you include breaking changes.
---
##### `constructsVersion`Optional
```typescript
public readonly constructsVersion: string;
```
- *Type:* string
- *Default:* for CDK 1.x the default is "3.2.27", for CDK 2.x the default is "10.5.1".
Minimum version of the `constructs` library to depend on.
---
##### `app`Optional
```typescript
public readonly app: string;
```
- *Type:* string
The command line to execute in order to synthesize the CDK application (language specific).
---
##### `appEntrypoint`Optional
```typescript
public readonly appEntrypoint: string;
```
- *Type:* string
- *Default:* "main.ts"
The CDK app's entrypoint (relative to the source directory, which is "src" by default).
---
##### `edgeLambdaAutoDiscover`Optional
```typescript
public readonly edgeLambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `experimentalIntegRunner`Optional
```typescript
public readonly experimentalIntegRunner: boolean;
```
- *Type:* boolean
- *Default:* false
Enable experimental support for the AWS CDK integ-runner.
---
##### `integrationTestAutoDiscover`Optional
```typescript
public readonly integrationTestAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically discovers and creates integration tests for each `.integ.ts` file in under your test directory.
---
##### `lambdaAutoDiscover`Optional
```typescript
public readonly lambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.LambdaFunction` for each `.lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `lambdaExtensionAutoDiscover`Optional
```typescript
public readonly lambdaExtensionAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `lambdaOptions`Optional
```typescript
public readonly lambdaOptions: LambdaFunctionCommonOptions;
```
- *Type:* projen.awscdk.LambdaFunctionCommonOptions
- *Default:* default options
Common options for all AWS Lambda functions.
---
##### `singletonLambdaAutoDiscover`Optional
```typescript
public readonly singletonLambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.SingletonFunction` for each `.singleton-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `privateNpm`Optional
```typescript
public readonly privateNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Whether to enable private NPM registry authentication.
---
##### `privateNpmTokenEnvVar`Optional
```typescript
public readonly privateNpmTokenEnvVar: string;
```
- *Type:* string
- *Default:* 'NPM_TOKEN'
The environment variable name containing the NPM authentication token.
---
### TaimosCdkConstructLibraryOptions
#### Initializer
```typescript
import { TaimosCdkConstructLibraryOptions } from '@taimos/projen'
const taimosCdkConstructLibraryOptions: TaimosCdkConstructLibraryOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| name | string | This is the name of your project. |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| gitIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .gitignore file. |
| gitOptions | projen.GitOptions | Configuration options for git. |
| logging | projen.LoggerOptions | Configure logging options such as verbosity. |
| outdir | string | The root directory of the project. |
| parent | projen.Project | The parent project, if this project is part of a bigger project. |
| projectTree | boolean | Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging. |
| projenCommand | string | The shell command to use in order to run the projen CLI. |
| projenrcJson | boolean | Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. |
| projenrcJsonOptions | projen.ProjenrcJsonOptions | Options for .projenrc.json. |
| renovatebot | boolean | Use renovatebot to handle dependency upgrades. |
| renovatebotOptions | projen.RenovatebotOptions | Options for renovatebot. |
| autoApproveOptions | projen.github.AutoApproveOptions | Enable and configure the 'auto approve' workflow. |
| autoMerge | boolean | Enable automatic merging on GitHub. |
| autoMergeOptions | projen.github.AutoMergeOptions | Configure options for automatic merging on GitHub. |
| clobber | boolean | Add a `clobber` task which resets the repo to origin. |
| devContainer | boolean | Add a VSCode development environment (used for GitHub Codespaces). |
| github | boolean | Enable GitHub integration. |
| githubOptions | projen.github.GitHubOptions | Options for GitHub integration. |
| gitpod | boolean | Add a Gitpod development environment. |
| projenCredentials | projen.github.GithubCredentials | Choose a method of providing GitHub API access for projen workflows. |
| readme | projen.SampleReadmeProps | The README setup. |
| stale | boolean | Auto-close of stale issues and pull request. |
| staleOptions | projen.github.StaleOptions | Auto-close stale issues and pull requests. |
| vscode | boolean | Enable VSCode integration. |
| addPackageManagerToDevEngines | boolean | Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`. |
| allowLibraryDependencies | boolean | Allow the project to include `peerDependencies` and `bundledDependencies`. |
| allowScripts | string[] | List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation. |
| authorEmail | string | Author's e-mail. |
| authorName | string | Author's name. |
| authorOrganization | boolean | Is the author an organization. |
| authorUrl | string | Author's URL / Website. |
| autoDetectBin | boolean | Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. |
| bin | {[ key: string ]: string} | Binary programs vended with your module. |
| bugsEmail | string | The email address to which issues should be reported. |
| bugsUrl | string | The url to your project's issue tracker. |
| bundledDeps | string[] | List of dependencies to bundle into this module. |
| bunVersion | string | The version of Bun to use if using Bun as a package manager. |
| codeArtifactOptions | projen.javascript.CodeArtifactOptions | Options for npm packages using AWS CodeArtifact. |
| deleteOrphanedLockFiles | boolean | Automatically delete lockfiles from package managers that are not the active one. |
| deps | string[] | Runtime dependencies of this module. |
| description | string | The description is just a string that helps people understand the purpose of the package. |
| devDeps | string[] | Build dependencies for this module. |
| devEngines | projen.javascript.DevEngines | Configure the `devEngines` field in `package.json`. |
| entrypoint | string | Module entrypoint (`main` in `package.json`). |
| homepage | string | Package's Homepage / Website. |
| keywords | string[] | Keywords to include in `package.json`. |
| license | string | License's SPDX identifier. |
| licensed | boolean | Indicates if a license should be added. |
| maxNodeVersion | string | The maximum node version supported by this package. Most projects should not use this option. |
| minNodeVersion | string | The minimum node version required by this package to function. Most projects should not use this option. |
| npmAccess | projen.javascript.NpmAccess | Access level of the npm package. |
| npmProvenance | boolean | Should provenance statements be generated when the package is published. |
| npmRegistryUrl | string | The base URL of the npm package registry. |
| npmTokenSecret | string | GitHub secret which contains the NPM token to use when publishing packages. |
| npmTrustedPublishing | boolean | Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. |
| packageManager | projen.javascript.NodePackageManager | The Node Package Manager used to execute scripts. |
| packageName | string | The "name" in package.json. |
| peerDependencyOptions | projen.javascript.PeerDependencyOptions | Options for `peerDeps`. |
| peerDeps | string[] | Peer dependencies for this module. |
| pnpmOptions | projen.javascript.PnpmOptions | Options for pnpm. |
| pnpmVersion | string | The version of PNPM to use if using PNPM as a package manager. |
| repository | string | The repository is the location where the actual code for your package lives. |
| repositoryDirectory | string | If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
| scopedPackagesOptions | projen.javascript.ScopedPackagesOptions[] | Options for privately hosted scoped packages. |
| stability | string | Package's Stability. |
| yarnBerryOptions | projen.javascript.YarnBerryOptions | Options for Yarn Berry. |
| bumpPackage | string | The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string. |
| jsiiReleaseVersion | string | Version requirement of `publib` which is used to publish modules to npm. |
| majorVersion | number | Major version to release from the default branch. |
| minMajorVersion | number | Minimal Major version to release. |
| nextVersionCommand | string | A shell command to control the next version to release. |
| npmDistTag | string | The npmDistTag to use when publishing from the default branch. |
| postBuildSteps | projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| prerelease | string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| publishDryRun | boolean | Instead of actually publishing to package managers, just print the publishing command. |
| publishTasks | boolean | Define publishing tasks that can be executed manually as well as workflows. |
| releasableCommits | projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
| releaseBranches | {[ key: string ]: projen.release.BranchOptions} | Defines additional release branches. |
| releaseEnvironment | string | The GitHub Actions environment used for the release. |
| releaseFailureIssue | boolean | Create a github issue on every failed publishing task. |
| releaseFailureIssueLabel | string | The label to apply to issues indicating publish failures. |
| releaseTagPrefix | string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
| releaseTrigger | projen.release.ReleaseTrigger | The release trigger to use. |
| releaseWorkflowEnv | {[ key: string ]: string} | Build environment variables for release workflows. |
| releaseWorkflowName | string | The name of the default release workflow. |
| releaseWorkflowSetupSteps | projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| versionrcOptions | {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| workflowContainerImage | string | Container image to use for GitHub workflows. |
| workflowRunsOn | string[] | Github Runner selection labels. |
| workflowRunsOnGroup | projen.GroupRunnerOptions | Github Runner Group selection options. |
| artifactsDirectory | string | A directory which will contain build artifacts. |
| auditDeps | boolean | Run security audit on dependencies. |
| auditDepsOptions | projen.javascript.AuditOptions | Security audit options. |
| autoApproveUpgrades | boolean | Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured). |
| biome | boolean | Setup Biome. |
| biomeOptions | projen.javascript.BiomeOptions | Biome options. |
| buildWorkflow | boolean | Define a GitHub workflow for building PRs. |
| buildWorkflowOptions | projen.javascript.BuildWorkflowOptions | Options for PR build workflow. |
| bundlerOptions | projen.javascript.BundlerOptions | Options for `Bundler`. |
| checkLicenses | projen.javascript.LicenseCheckerOptions | Configure which licenses should be deemed acceptable for use by dependencies. |
| codeCov | boolean | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`. |
| codeCovTokenSecret | string | Define the secret name for a specified https://codecov.io/ token. |
| copyrightOwner | string | License copyright owner. |
| copyrightPeriod | string | The copyright years to put in the LICENSE file. |
| defaultReleaseBranch | string | The name of the main release branch. |
| dependabot | boolean | Use dependabot to handle dependency upgrades. |
| dependabotOptions | projen.github.DependabotOptions | Options for dependabot. |
| depsUpgrade | boolean | Use tasks and github workflows to handle dependency upgrades. |
| depsUpgradeOptions | projen.javascript.UpgradeDependenciesOptions | Options for `UpgradeDependencies`. |
| gitignore | string[] | Additional entries to .gitignore. |
| jest | boolean | Setup jest unit tests. |
| jestOptions | projen.javascript.JestOptions | Jest options. |
| npmignoreEnabled | boolean | Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
| npmIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .npmignore file. |
| package | boolean | Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). |
| prettier | boolean | Setup prettier. |
| prettierOptions | projen.javascript.PrettierOptions | Prettier options. |
| projenDevDependency | boolean | Indicates of "projen" should be installed as a devDependency. |
| projenrcJs | boolean | Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. |
| projenrcJsOptions | projen.javascript.ProjenrcOptions | Options for .projenrc.js. |
| projenVersion | string | Version of projen to install. |
| pullRequestTemplate | boolean | Include a GitHub pull request template. |
| pullRequestTemplateContents | string[] | The contents of the pull request template. |
| release | boolean | Add release management to this project. |
| releaseToNpm | boolean | Automatically release to npm when new versions are introduced. |
| workflowBootstrapSteps | projen.github.workflows.JobStep[] | Workflow steps to use in order to bootstrap this repo. |
| workflowGitIdentity | projen.github.GitIdentity | The git identity to use in workflows. |
| workflowNodeVersion | string | The node version used in GitHub Actions workflows. |
| workflowPackageCache | boolean | Enable Node.js package cache in GitHub workflows. |
| disableTsconfig | boolean | Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
| disableTsconfigDev | boolean | Do not generate a development tsconfig file. |
| docgen | boolean | Docgen by Typedoc. |
| docsDirectory | string | Docs directory. |
| entrypointTypes | string | The .d.ts file that includes the type declarations for this module. |
| eslint | boolean | Setup eslint. |
| eslintOptions | projen.javascript.EslintOptions | Eslint options. |
| libdir | string | Typescript artifacts output directory. |
| projenrcTs | boolean | Use TypeScript for your projenrc file (`.projenrc.ts`). |
| projenrcTsOptions | projen.typescript.ProjenrcOptions | Options for .projenrc.ts. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner to use for executing TypeScript files. |
| sampleCode | boolean | Generate one-time sample in `src/` and `test/` if there are no files there. |
| srcdir | string | Typescript sources directory. |
| testdir | string | Jest tests directory. Tests files should be named `xxx.test.ts`. |
| tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. |
| tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). |
| tsconfigDevFile | string | The name (and path) of the development tsconfig file. |
| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. |
| typescriptVersion | string | TypeScript version to use. |
| author | string | The name of the library author. |
| authorAddress | string | Email or URL of the library author. |
| repositoryUrl | string | Git repository URL. |
| compat | boolean | Automatically run API compatibility test against the latest version published to npm after compilation. |
| compatIgnore | string | Name of the ignore file for API compatibility tests. |
| compressAssembly | boolean | Emit a compressed version of the assembly. |
| docgenFilePath | string | File path for generated docs. |
| excludeTypescript | string[] | Accepts a list of glob patterns. |
| jsiiVersion | string | Version of the jsii compiler to use. |
| publishToGo | projen.cdk.JsiiGoTarget | Publish Go bindings to a git repository. |
| publishToMaven | projen.cdk.JsiiJavaTarget | Publish to maven. |
| publishToNuget | projen.cdk.JsiiDotNetTarget | Publish to NuGet. |
| publishToPypi | projen.cdk.JsiiPythonTarget | Publish to pypi. |
| rootdir | string | *No description.* |
| validateTsconfig | projen.cdk.ValidateTsconfig | Level of tsconfig validation jsii should perform on the user-provided tsconfig. |
| catalog | projen.cdk.Catalog | Libraries will be picked up by the construct catalog when they are published to npm as jsii modules and will be published under:. |
| cdkVersion | string | Minimum version of the AWS CDK to depend on. |
| cdkCliVersion | string | Version range of the AWS CDK CLI to depend on. |
| cdkVersionPinning | boolean | Use pinned version instead of caret version for CDK. |
| constructsVersion | string | Minimum version of the `constructs` library to depend on. |
| edgeLambdaAutoDiscover | boolean | Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| experimentalIntegRunner | boolean | Enable experimental support for the AWS CDK integ-runner. |
| integrationTestAutoDiscover | boolean | Automatically discovers and creates integration tests for each `.integ.ts` file under your test directory. |
| lambdaAutoDiscover | boolean | Automatically adds an `aws_lambda.Function` for each `.lambda.ts` handler in your source tree. If this is disabled, you either need to explicitly call `aws_lambda.Function.autoDiscover()` or define a `new aws_lambda.Function()` for each handler. |
| lambdaExtensionAutoDiscover | boolean | Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| lambdaOptions | projen.awscdk.LambdaFunctionCommonOptions | Common options for all AWS Lambda functions. |
| singletonLambdaAutoDiscover | boolean | Automatically adds an `awscdk.SingletonFunction` for each `.singleton-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project. |
| privateNpm | boolean | Whether to enable private NPM registry authentication. |
| privateNpmTokenEnvVar | string | The environment variable name containing the NPM authentication token. |
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
- *Default:* $BASEDIR
This is the name of your project.
---
##### `commitGenerated`Optional
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to commit the managed files by default.
---
##### `gitIgnoreOptions`Optional
```typescript
public readonly gitIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .gitignore file.
---
##### `gitOptions`Optional
```typescript
public readonly gitOptions: GitOptions;
```
- *Type:* projen.GitOptions
Configuration options for git.
---
##### `logging`Optional
```typescript
public readonly logging: LoggerOptions;
```
- *Type:* projen.LoggerOptions
- *Default:* {}
Configure logging options such as verbosity.
---
##### `outdir`Optional
```typescript
public readonly outdir: string;
```
- *Type:* string
- *Default:* "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent
directory and it cannot be the same as the parent or any of it's other
subprojects.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
The parent project, if this project is part of a bigger project.
---
##### `projectTree`Optional
```typescript
public readonly projectTree: boolean;
```
- *Type:* boolean
- *Default:* false
Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging.
---
##### `projenCommand`Optional
```typescript
public readonly projenCommand: string;
```
- *Type:* string
- *Default:* "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
---
##### `projenrcJson`Optional
```typescript
public readonly projenrcJson: boolean;
```
- *Type:* boolean
- *Default:* false
Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
---
##### `projenrcJsonOptions`Optional
```typescript
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
```
- *Type:* projen.ProjenrcJsonOptions
- *Default:* default options
Options for .projenrc.json.
---
##### `renovatebot`Optional
```typescript
public readonly renovatebot: boolean;
```
- *Type:* boolean
- *Default:* false
Use renovatebot to handle dependency upgrades.
---
##### `renovatebotOptions`Optional
```typescript
public readonly renovatebotOptions: RenovatebotOptions;
```
- *Type:* projen.RenovatebotOptions
- *Default:* default options
Options for renovatebot.
---
##### `autoApproveOptions`Optional
```typescript
public readonly autoApproveOptions: AutoApproveOptions;
```
- *Type:* projen.github.AutoApproveOptions
- *Default:* auto approve is disabled
Enable and configure the 'auto approve' workflow.
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: boolean;
```
- *Type:* boolean
- *Default:* true
Enable automatic merging on GitHub.
Has no effect if `github.mergify`
is set to false.
---
##### `autoMergeOptions`Optional
```typescript
public readonly autoMergeOptions: AutoMergeOptions;
```
- *Type:* projen.github.AutoMergeOptions
- *Default:* see defaults in `AutoMergeOptions`
Configure options for automatic merging on GitHub.
Has no effect if
`github.mergify` or `autoMerge` is set to false.
---
##### `clobber`Optional
```typescript
public readonly clobber: boolean;
```
- *Type:* boolean
- *Default:* true, but false for subprojects
Add a `clobber` task which resets the repo to origin.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: boolean;
```
- *Type:* boolean
- *Default:* false
Add a VSCode development environment (used for GitHub Codespaces).
---
##### `github`Optional
```typescript
public readonly github: boolean;
```
- *Type:* boolean
- *Default:* true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `githubOptions`Optional
```typescript
public readonly githubOptions: GitHubOptions;
```
- *Type:* projen.github.GitHubOptions
- *Default:* see GitHubOptions
Options for GitHub integration.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: boolean;
```
- *Type:* boolean
- *Default:* false
Add a Gitpod development environment.
---
##### `projenCredentials`Optional
```typescript
public readonly projenCredentials: GithubCredentials;
```
- *Type:* projen.github.GithubCredentials
- *Default:* use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
---
##### `readme`Optional
```typescript
public readonly readme: SampleReadmeProps;
```
- *Type:* projen.SampleReadmeProps
- *Default:* { filename: 'README.md', contents: '# replace this' }
The README setup.
---
*Example*
```typescript
"{ filename: 'readme.md', contents: '# title' }"
```
##### `stale`Optional
```typescript
public readonly stale: boolean;
```
- *Type:* boolean
- *Default:* false
Auto-close of stale issues and pull request.
See `staleOptions` for options.
---
##### `staleOptions`Optional
```typescript
public readonly staleOptions: StaleOptions;
```
- *Type:* projen.github.StaleOptions
- *Default:* see defaults in `StaleOptions`
Auto-close stale issues and pull requests.
To disable set `stale` to `false`.
---
##### `vscode`Optional
```typescript
public readonly vscode: boolean;
```
- *Type:* boolean
- *Default:* true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `addPackageManagerToDevEngines`Optional
```typescript
public readonly addPackageManagerToDevEngines: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`.
---
##### `allowLibraryDependencies`Optional
```typescript
public readonly allowLibraryDependencies: boolean;
```
- *Type:* boolean
- *Default:* true
Allow the project to include `peerDependencies` and `bundledDependencies`.
This is normally only allowed for libraries. For apps, there's no meaning
for specifying these.
---
##### `allowScripts`Optional
```typescript
public readonly allowScripts: string[];
```
- *Type:* string[]
- *Default:* all install scripts are allowed to run (package manager default)
List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation.
These scripts can execute arbitrary code, making them a common
supply-chain attack vector. Package managers are moving toward
blocking them by default and requiring an explicit allowlist.
Configuring `allowScripts` sets up that allowlist so scripts only run
for the packages you have explicitly reviewed and trust.
Support for this setting depends on the configured `packageManager`:
- `NPM`: written to the native `allowScripts` field in `package.json`
(requires npm >= 11.16; see https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts).
- `BUN`: written to the native `trustedDependencies` field in
`package.json` (see https://bun.com/docs/pm/lifecycle).
- `PNPM`: written to the `onlyBuiltDependencies` setting in
`pnpm-workspace.yaml` (see https://pnpm.io/settings#onlybuiltdependencies).
- `YARN2`, `YARN_BERRY`: written to the native
`dependenciesMeta..built` allowlist in `package.json`, combined
with `enableScripts: false` in `.yarnrc.yml` (see
https://yarnpkg.com/features/security#postinstalls). If you set
`yarnBerryOptions.yarnRcOptions.enableScripts` explicitly, that value
is respected instead of being overridden.
- `YARN`, `YARN_CLASSIC`: not supported. Yarn Classic has no native
mechanism to allowlist install scripts for specific dependencies.
Setting this option with one of these package managers throws an
error at synthesis time.
---
##### `authorEmail`Optional
```typescript
public readonly authorEmail: string;
```
- *Type:* string
Author's e-mail.
---
##### `authorName`Optional
```typescript
public readonly authorName: string;
```
- *Type:* string
Author's name.
---
##### `authorOrganization`Optional
```typescript
public readonly authorOrganization: boolean;
```
- *Type:* boolean
Is the author an organization.
---
##### `authorUrl`Optional
```typescript
public readonly authorUrl: string;
```
- *Type:* string
Author's URL / Website.
---
##### `autoDetectBin`Optional
```typescript
public readonly autoDetectBin: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
---
##### `bin`Optional
```typescript
public readonly bin: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your `package.json`, but unless `autoDetectBin` is `false`, every
executable file under `bin` will automatically be added to this section.
---
##### `bugsEmail`Optional
```typescript
public readonly bugsEmail: string;
```
- *Type:* string
The email address to which issues should be reported.
---
##### `bugsUrl`Optional
```typescript
public readonly bugsUrl: string;
```
- *Type:* string
The url to your project's issue tracker.
---
##### `bundledDeps`Optional
```typescript
public readonly bundledDeps: string[];
```
- *Type:* string[]
List of dependencies to bundle into this module.
These modules will be
added both to the `dependencies` section and `bundledDependencies` section of
your `package.json`.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
##### `bunVersion`Optional
```typescript
public readonly bunVersion: string;
```
- *Type:* string
- *Default:* "latest"
The version of Bun to use if using Bun as a package manager.
---
##### `codeArtifactOptions`Optional
```typescript
public readonly codeArtifactOptions: CodeArtifactOptions;
```
- *Type:* projen.javascript.CodeArtifactOptions
- *Default:* undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
---
##### `deleteOrphanedLockFiles`Optional
```typescript
public readonly deleteOrphanedLockFiles: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically delete lockfiles from package managers that are not the active one.
Only triggered when the lockfile for the configured package
manager already exists.
This is useful when migrating between package managers to avoid conflicts.
---
##### `deps`Optional
```typescript
public readonly deps: string[];
```
- *Type:* string[]
- *Default:* []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'express', 'lodash', 'foo@^2' ]
```
##### `description`Optional
```typescript
public readonly description: string;
```
- *Type:* string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
---
##### `devDeps`Optional
```typescript
public readonly devDeps: string[];
```
- *Type:* string[]
- *Default:* []
Build dependencies for this module.
These dependencies will only be
available in your build environment but will not be fetched when this
module is consumed.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'typescript', '@types/express' ]
```
##### `devEngines`Optional
```typescript
public readonly devEngines: DevEngines;
```
- *Type:* projen.javascript.DevEngines
Configure the `devEngines` field in `package.json`.
The `devEngines.packageManager` field is automatically populated based on
the resolved `packageManager` value. Any fields provided here are merged
with the auto-populated `packageManager` entry.
> [https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines)
---
##### `entrypoint`Optional
```typescript
public readonly entrypoint: string;
```
- *Type:* string
- *Default:* "lib/index.js"
Module entrypoint (`main` in `package.json`).
Set to an empty string to not include `main` in your package.json
---
##### `homepage`Optional
```typescript
public readonly homepage: string;
```
- *Type:* string
Package's Homepage / Website.
---
##### `keywords`Optional
```typescript
public readonly keywords: string[];
```
- *Type:* string[]
Keywords to include in `package.json`.
---
##### `license`Optional
```typescript
public readonly license: string;
```
- *Type:* string
- *Default:* "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the `licensed` option if you want to no license to be specified.
---
##### `licensed`Optional
```typescript
public readonly licensed: boolean;
```
- *Type:* boolean
- *Default:* true
Indicates if a license should be added.
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
- *Default:* no maximum version is enforced
The maximum node version supported by this package. Most projects should not use this option.
The value indicates that the package is incompatible with any newer versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option.
Consider this option only if your package is known to not function with newer versions of node.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
- *Default:* no minimum version is enforced
The minimum node version required by this package to function. Most projects should not use this option.
The value indicates that the package is incompatible with any older versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
Setting this option has very high impact on the consumers of your package,
as package managers will actively prevent usage with node versions you have marked as incompatible.
To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
---
##### `npmAccess`Optional
```typescript
public readonly npmAccess: NpmAccess;
```
- *Type:* projen.javascript.NpmAccess
- *Default:* for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
Access level of the npm package.
---
##### `npmProvenance`Optional
```typescript
public readonly npmProvenance: boolean;
```
- *Type:* boolean
- *Default:* true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and
you will need to use a supported CI/CD provider.
Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
> [https://docs.npmjs.com/generating-provenance-statements](https://docs.npmjs.com/generating-provenance-statements)
---
##### `npmRegistryUrl`Optional
```typescript
public readonly npmRegistryUrl: string;
```
- *Type:* string
- *Default:* "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
---
##### `npmTokenSecret`Optional
```typescript
public readonly npmTokenSecret: string;
```
- *Type:* string
- *Default:* "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
---
##### `npmTrustedPublishing`Optional
```typescript
public readonly npmTrustedPublishing: boolean;
```
- *Type:* boolean
- *Default:* false
Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
---
##### `packageManager`Optional
```typescript
public readonly packageManager: NodePackageManager;
```
- *Type:* projen.javascript.NodePackageManager
- *Default:* Detected from the calling process or `YARN_CLASSIC` if detection fails.
The Node Package Manager used to execute scripts.
---
##### `packageName`Optional
```typescript
public readonly packageName: string;
```
- *Type:* string
- *Default:* defaults to project name
The "name" in package.json.
---
##### `peerDependencyOptions`Optional
```typescript
public readonly peerDependencyOptions: PeerDependencyOptions;
```
- *Type:* projen.javascript.PeerDependencyOptions
Options for `peerDeps`.
---
##### `peerDeps`Optional
```typescript
public readonly peerDeps: string[];
```
- *Type:* string[]
- *Default:* []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the _consumer_ of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the `node_modules` tree of your consumers.
Note that prior to npm@7, peer dependencies are _not_ automatically
installed, which means that adding peer dependencies to a library will be a
breaking change for your customers.
Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
---
##### `pnpmOptions`Optional
```typescript
public readonly pnpmOptions: PnpmOptions;
```
- *Type:* projen.javascript.PnpmOptions
- *Default:* all default options
Options for pnpm.
---
##### `pnpmVersion`Optional
```typescript
public readonly pnpmVersion: string;
```
- *Type:* string
- *Default:* "10.33.0"
The version of PNPM to use if using PNPM as a package manager.
---
##### `repository`Optional
```typescript
public readonly repository: string;
```
- *Type:* string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
---
##### `repositoryDirectory`Optional
```typescript
public readonly repositoryDirectory: string;
```
- *Type:* string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
---
##### `scopedPackagesOptions`Optional
```typescript
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
```
- *Type:* projen.javascript.ScopedPackagesOptions[]
- *Default:* fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
---
##### `stability`Optional
```typescript
public readonly stability: string;
```
- *Type:* string
Package's Stability.
---
##### `yarnBerryOptions`Optional
```typescript
public readonly yarnBerryOptions: YarnBerryOptions;
```
- *Type:* projen.javascript.YarnBerryOptions
- *Default:* Yarn Berry v4 with all default options
Options for Yarn Berry.
---
##### `bumpPackage`Optional
```typescript
public readonly bumpPackage: string;
```
- *Type:* string
- *Default:* A recent version of "commit-and-tag-version"
The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
This can be any compatible package version, including the deprecated `standard-version@9`.
---
##### `jsiiReleaseVersion`Optional
```typescript
public readonly jsiiReleaseVersion: string;
```
- *Type:* string
- *Default:* "latest"
Version requirement of `publib` which is used to publish modules to npm.
---
##### `majorVersion`Optional
```typescript
public readonly majorVersion: number;
```
- *Type:* number
- *Default:* Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line.
If not specified, we bump the global latest version.
---
##### `minMajorVersion`Optional
```typescript
public readonly minMajorVersion: number;
```
- *Type:* number
- *Default:* No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major
release are not incrementing the major version number.
Can not be set together with `majorVersion`.
---
##### `nextVersionCommand`Optional
```typescript
public readonly nextVersionCommand: string;
```
- *Type:* string
- *Default:* The next version will be determined based on the commit history and project settings.
A shell command to control the next version to release.
If present, this shell command will be run before the bump is executed, and
it determines what version to release. It will be executed in the following
environment:
- Working directory: the project directory.
- `$VERSION`: the current version. Looks like `1.2.3`.
- `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
- `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
The command should print one of the following to `stdout`:
- Nothing: the next version number will be determined based on commit history.
- `x.y.z`: the next version number will be `x.y.z`.
- `major|minor|patch`: the next version number will be the current version number
with the indicated component bumped.
This setting cannot be specified together with `minMajorVersion`; the invoked
script can be used to achieve the effects of `minMajorVersion`.
---
##### `npmDistTag`Optional
```typescript
public readonly npmDistTag: string;
```
- *Type:* string
- *Default:* "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the `npmDistTag` property
for each branch.
---
##### `postBuildSteps`Optional
```typescript
public readonly postBuildSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* []
Steps to execute after build as part of the release workflow.
---
##### `prerelease`Optional
```typescript
public readonly prerelease: string;
```
- *Type:* string
- *Default:* normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
---
##### `publishDryRun`Optional
```typescript
public readonly publishDryRun: boolean;
```
- *Type:* boolean
- *Default:* false
Instead of actually publishing to package managers, just print the publishing command.
---
##### `publishTasks`Optional
```typescript
public readonly publishTasks: boolean;
```
- *Type:* boolean
- *Default:* false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this
in order to create a publishing task for each publishing activity.
---
##### `releasableCommits`Optional
```typescript
public readonly releasableCommits: ReleasableCommits;
```
- *Type:* projen.ReleasableCommits
- *Default:* ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
---
##### `releaseBranches`Optional
```typescript
public readonly releaseBranches: {[ key: string ]: BranchOptions};
```
- *Type:* {[ key: string ]: projen.release.BranchOptions}
- *Default:* no additional branches are used for release. you can use `addBranch()` to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch _must_ be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the `majorVersion` field must also
be provided for the default branch.
---
##### `releaseEnvironment`Optional
```typescript
public readonly releaseEnvironment: string;
```
- *Type:* string
- *Default:* no environment used, unless set at the artifact level
The GitHub Actions environment used for the release.
This can be used to add an explicit approval step to the release
or limit who can initiate a release through environment protection rules.
When multiple artifacts are released, the environment can be overwritten
on a per artifact basis.
---
##### `releaseFailureIssue`Optional
```typescript
public readonly releaseFailureIssue: boolean;
```
- *Type:* boolean
- *Default:* false
Create a github issue on every failed publishing task.
---
##### `releaseFailureIssueLabel`Optional
```typescript
public readonly releaseFailureIssueLabel: string;
```
- *Type:* string
- *Default:* "failed-release"
The label to apply to issues indicating publish failures.
Only applies if `releaseFailureIssue` is true.
---
##### `releaseTagPrefix`Optional
```typescript
public readonly releaseTagPrefix: string;
```
- *Type:* string
- *Default:* "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version
when bumping, so if you change this on a project with an existing version
history, you may need to manually tag your latest release
with the new prefix.
---
##### `releaseTrigger`Optional
```typescript
public readonly releaseTrigger: ReleaseTrigger;
```
- *Type:* projen.release.ReleaseTrigger
- *Default:* Continuous releases (`ReleaseTrigger.continuous()`)
The release trigger to use.
---
##### `releaseWorkflowEnv`Optional
```typescript
public readonly releaseWorkflowEnv: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
- *Default:* {}
Build environment variables for release workflows.
---
##### `releaseWorkflowName`Optional
```typescript
public readonly releaseWorkflowName: string;
```
- *Type:* string
- *Default:* "release"
The name of the default release workflow.
---
##### `releaseWorkflowSetupSteps`Optional
```typescript
public readonly releaseWorkflowSetupSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
---
##### `versionrcOptions`Optional
```typescript
public readonly versionrcOptions: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with commit-and-tag-version package.
Given values either append to default configuration or overwrite values in it.
---
##### `workflowContainerImage`Optional
```typescript
public readonly workflowContainerImage: string;
```
- *Type:* string
- *Default:* default image
Container image to use for GitHub workflows.
---
##### `workflowRunsOn`Optional
```typescript
public readonly workflowRunsOn: string[];
```
- *Type:* string[]
- *Default:* ["ubuntu-latest"]
Github Runner selection labels.
---
##### `workflowRunsOnGroup`Optional
```typescript
public readonly workflowRunsOnGroup: GroupRunnerOptions;
```
- *Type:* projen.GroupRunnerOptions
Github Runner Group selection options.
---
##### `artifactsDirectory`Optional
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
- *Default:* "dist"
A directory which will contain build artifacts.
---
##### `auditDeps`Optional
```typescript
public readonly auditDeps: boolean;
```
- *Type:* boolean
- *Default:* false
Run security audit on dependencies.
When enabled, creates an "audit" task that checks for known security vulnerabilities
in dependencies. By default, runs during every build and checks for "high" severity
vulnerabilities or above in all dependencies (including dev dependencies).
---
##### `auditDepsOptions`Optional
```typescript
public readonly auditDepsOptions: AuditOptions;
```
- *Type:* projen.javascript.AuditOptions
- *Default:* default options
Security audit options.
---
##### `autoApproveUpgrades`Optional
```typescript
public readonly autoApproveUpgrades: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured).
Throw if set to true but `autoApproveOptions` are not defined.
---
##### `biome`Optional
```typescript
public readonly biome: boolean;
```
- *Type:* boolean
- *Default:* false
Setup Biome.
---
##### `biomeOptions`Optional
```typescript
public readonly biomeOptions: BiomeOptions;
```
- *Type:* projen.javascript.BiomeOptions
- *Default:* default options
Biome options.
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Define a GitHub workflow for building PRs.
---
##### `buildWorkflowOptions`Optional
```typescript
public readonly buildWorkflowOptions: BuildWorkflowOptions;
```
- *Type:* projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
---
##### `bundlerOptions`Optional
```typescript
public readonly bundlerOptions: BundlerOptions;
```
- *Type:* projen.javascript.BundlerOptions
Options for `Bundler`.
---
##### `checkLicenses`Optional
```typescript
public readonly checkLicenses: LicenseCheckerOptions;
```
- *Type:* projen.javascript.LicenseCheckerOptions
- *Default:* no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
---
##### `codeCov`Optional
```typescript
public readonly codeCov: boolean;
```
- *Type:* boolean
- *Default:* false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
---
##### `codeCovTokenSecret`Optional
```typescript
public readonly codeCovTokenSecret: string;
```
- *Type:* string
- *Default:* OIDC auth is used
Define the secret name for a specified https://codecov.io/ token.
---
##### `copyrightOwner`Optional
```typescript
public readonly copyrightOwner: string;
```
- *Type:* string
- *Default:* defaults to the value of authorName or "" if `authorName` is undefined.
License copyright owner.
This value is only used if the selected license text contains the
`$copyright_owner` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `copyrightPeriod`Optional
```typescript
public readonly copyrightPeriod: string;
```
- *Type:* string
- *Default:* current year
The copyright years to put in the LICENSE file.
This value is only used if the selected license text contains the
`$copyright_period` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `defaultReleaseBranch`Optional
```typescript
public readonly defaultReleaseBranch: string;
```
- *Type:* string
- *Default:* "main"
The name of the main release branch.
---
##### `dependabot`Optional
```typescript
public readonly dependabot: boolean;
```
- *Type:* boolean
- *Default:* false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with `depsUpgrade`.
---
##### `dependabotOptions`Optional
```typescript
public readonly dependabotOptions: DependabotOptions;
```
- *Type:* projen.github.DependabotOptions
- *Default:* default options
Options for dependabot.
---
##### `depsUpgrade`Optional
```typescript
public readonly depsUpgrade: boolean;
```
- *Type:* boolean
- *Default:* `true` for root projects, `false` for subprojects
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with `dependabot`.
---
##### `depsUpgradeOptions`Optional
```typescript
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
```
- *Type:* projen.javascript.UpgradeDependenciesOptions
- *Default:* default options
Options for `UpgradeDependencies`.
---
##### `gitignore`Optional
```typescript
public readonly gitignore: string[];
```
- *Type:* string[]
Additional entries to .gitignore.
---
##### `jest`Optional
```typescript
public readonly jest: boolean;
```
- *Type:* boolean
- *Default:* true
Setup jest unit tests.
---
##### `jestOptions`Optional
```typescript
public readonly jestOptions: JestOptions;
```
- *Type:* projen.javascript.JestOptions
- *Default:* default options
Jest options.
---
##### `npmignoreEnabled`Optional
```typescript
public readonly npmignoreEnabled: boolean;
```
- *Type:* boolean
- *Default:* true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
---
##### `npmIgnoreOptions`Optional
```typescript
public readonly npmIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .npmignore file.
---
##### `package`Optional
```typescript
public readonly package: boolean;
```
- *Type:* boolean
- *Default:* true
Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
---
##### `prettier`Optional
```typescript
public readonly prettier: boolean;
```
- *Type:* boolean
- *Default:* false
Setup prettier.
---
##### `prettierOptions`Optional
```typescript
public readonly prettierOptions: PrettierOptions;
```
- *Type:* projen.javascript.PrettierOptions
- *Default:* default options
Prettier options.
---
##### `projenDevDependency`Optional
```typescript
public readonly projenDevDependency: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Indicates of "projen" should be installed as a devDependency.
---
##### `projenrcJs`Optional
```typescript
public readonly projenrcJs: boolean;
```
- *Type:* boolean
- *Default:* true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
---
##### `projenrcJsOptions`Optional
```typescript
public readonly projenrcJsOptions: ProjenrcOptions;
```
- *Type:* projen.javascript.ProjenrcOptions
- *Default:* default options
Options for .projenrc.js.
---
##### `projenVersion`Optional
```typescript
public readonly projenVersion: string;
```
- *Type:* string
- *Default:* Defaults to the latest version.
Version of projen to install.
---
##### `pullRequestTemplate`Optional
```typescript
public readonly pullRequestTemplate: boolean;
```
- *Type:* boolean
- *Default:* true
Include a GitHub pull request template.
---
##### `pullRequestTemplateContents`Optional
```typescript
public readonly pullRequestTemplateContents: string[];
```
- *Type:* string[]
- *Default:* default content
The contents of the pull request template.
---
##### `release`Optional
```typescript
public readonly release: boolean;
```
- *Type:* boolean
- *Default:* true (false for subprojects)
Add release management to this project.
---
##### `releaseToNpm`Optional
```typescript
public readonly releaseToNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Automatically release to npm when new versions are introduced.
---
##### `workflowBootstrapSteps`Optional
```typescript
public readonly workflowBootstrapSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
---
##### `workflowGitIdentity`Optional
```typescript
public readonly workflowGitIdentity: GitIdentity;
```
- *Type:* projen.github.GitIdentity
- *Default:* default GitHub Actions user
The git identity to use in workflows.
---
##### `workflowNodeVersion`Optional
```typescript
public readonly workflowNodeVersion: string;
```
- *Type:* string
- *Default:* `minNodeVersion` if set, otherwise `lts/*`.
The node version used in GitHub Actions workflows.
Always use this option if your GitHub Actions workflows require a specific to run.
---
##### `workflowPackageCache`Optional
```typescript
public readonly workflowPackageCache: boolean;
```
- *Type:* boolean
- *Default:* false
Enable Node.js package cache in GitHub workflows.
---
##### `disableTsconfig`Optional
```typescript
public readonly disableTsconfig: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
---
##### `disableTsconfigDev`Optional
```typescript
public readonly disableTsconfigDev: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a development tsconfig file.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
- *Default:* false
Docgen by Typedoc.
---
##### `docsDirectory`Optional
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
- *Default:* "docs"
Docs directory.
---
##### `entrypointTypes`Optional
```typescript
public readonly entrypointTypes: string;
```
- *Type:* string
- *Default:* .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
---
##### `eslint`Optional
```typescript
public readonly eslint: boolean;
```
- *Type:* boolean
- *Default:* true, unless biome is enabled
Setup eslint.
---
##### `eslintOptions`Optional
```typescript
public readonly eslintOptions: EslintOptions;
```
- *Type:* projen.javascript.EslintOptions
- *Default:* opinionated default options
Eslint options.
---
##### `libdir`Optional
```typescript
public readonly libdir: string;
```
- *Type:* string
- *Default:* "lib"
Typescript artifacts output directory.
---
##### `projenrcTs`Optional
```typescript
public readonly projenrcTs: boolean;
```
- *Type:* boolean
- *Default:* false
Use TypeScript for your projenrc file (`.projenrc.ts`).
---
##### `projenrcTsOptions`Optional
```typescript
public readonly projenrcTsOptions: ProjenrcOptions;
```
- *Type:* projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
---
##### `runner`Optional
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
- *Default:* TypeScriptRunner.tsNode()
The TypeScript runner to use for executing TypeScript files.
This is a project-level setting that components (e.g. projenrc) will
use as their default runner.
---
##### `sampleCode`Optional
```typescript
public readonly sampleCode: boolean;
```
- *Type:* boolean
- *Default:* true
Generate one-time sample in `src/` and `test/` if there are no files there.
---
##### `srcdir`Optional
```typescript
public readonly srcdir: string;
```
- *Type:* string
- *Default:* "src"
Typescript sources directory.
---
##### `testdir`Optional
```typescript
public readonly testdir: string;
```
- *Type:* string
- *Default:* "test"
Jest tests directory. Tests files should be named `xxx.test.ts`.
If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
then tests are going to be compiled into `lib/` and executed as javascript.
If the test directory is outside of `src`, then we configure jest to
compile the code in-memory.
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* default options
Custom TSConfig.
---
##### `tsconfigDev`Optional
```typescript
public readonly tsconfigDev: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
---
##### `tsconfigDevFile`Optional
```typescript
public readonly tsconfigDevFile: string;
```
- *Type:* string
- *Default:* "{testdir}/tsconfig.json"
The name (and path) of the development tsconfig file.
By default this lives inside the test directory (e.g. `test/tsconfig.json`)
so that the TypeScript language service resolves it as the nearest config
for test files.
---
##### `tsJestOptions`Optional
```typescript
public readonly tsJestOptions: TsJestOptions;
```
- *Type:* projen.typescript.TsJestOptions
Options for ts-jest.
---
##### `typescriptVersion`Optional
```typescript
public readonly typescriptVersion: string;
```
- *Type:* string
- *Default:* "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
---
##### `author`Required
```typescript
public readonly author: string;
```
- *Type:* string
- *Default:* $GIT_USER_NAME
The name of the library author.
---
##### `authorAddress`Required
```typescript
public readonly authorAddress: string;
```
- *Type:* string
- *Default:* $GIT_USER_EMAIL
Email or URL of the library author.
---
##### `repositoryUrl`Required
```typescript
public readonly repositoryUrl: string;
```
- *Type:* string
- *Default:* $GIT_REMOTE
Git repository URL.
---
##### `compat`Optional
```typescript
public readonly compat: boolean;
```
- *Type:* boolean
- *Default:* false
Automatically run API compatibility test against the latest version published to npm after compilation.
You can manually run compatibility tests using `yarn compat` if this feature is disabled.
- You can ignore compatibility failures by adding lines to a ".compatignore" file.
---
##### `compatIgnore`Optional
```typescript
public readonly compatIgnore: string;
```
- *Type:* string
- *Default:* ".compatignore"
Name of the ignore file for API compatibility tests.
---
##### `compressAssembly`Optional
```typescript
public readonly compressAssembly: boolean;
```
- *Type:* boolean
- *Default:* false
Emit a compressed version of the assembly.
---
##### `docgenFilePath`Optional
```typescript
public readonly docgenFilePath: string;
```
- *Type:* string
- *Default:* "API.md"
File path for generated docs.
---
##### `excludeTypescript`Optional
```typescript
public readonly excludeTypescript: string[];
```
- *Type:* string[]
Accepts a list of glob patterns.
Files matching any of those patterns will be excluded from the TypeScript compiler input.
By default, jsii will include all *.ts files (except .d.ts files) in the TypeScript compiler input.
This can be problematic for example when the package's build or test procedure generates .ts files
that cannot be compiled with jsii's compiler settings.
---
##### `jsiiVersion`Optional
```typescript
public readonly jsiiVersion: string;
```
- *Type:* string
- *Default:* "~5.9.0"
Version of the jsii compiler to use.
Set to "*" if you want to manually manage the version of jsii in your
project by managing updates to `package.json` on your own.
NOTE: The jsii compiler releases since 5.0.0 are not semantically versioned
and should remain on the same minor, so we recommend using a `~` dependency
(e.g. `~5.0.0`).
---
##### `publishToGo`Optional
```typescript
public readonly publishToGo: JsiiGoTarget;
```
- *Type:* projen.cdk.JsiiGoTarget
- *Default:* no publishing
Publish Go bindings to a git repository.
---
##### `publishToMaven`Optional
```typescript
public readonly publishToMaven: JsiiJavaTarget;
```
- *Type:* projen.cdk.JsiiJavaTarget
- *Default:* no publishing
Publish to maven.
---
##### `publishToNuget`Optional
```typescript
public readonly publishToNuget: JsiiDotNetTarget;
```
- *Type:* projen.cdk.JsiiDotNetTarget
- *Default:* no publishing
Publish to NuGet.
---
##### `publishToPypi`Optional
```typescript
public readonly publishToPypi: JsiiPythonTarget;
```
- *Type:* projen.cdk.JsiiPythonTarget
- *Default:* no publishing
Publish to pypi.
---
##### `rootdir`Optional
```typescript
public readonly rootdir: string;
```
- *Type:* string
- *Default:* "."
---
##### `validateTsconfig`Optional
```typescript
public readonly validateTsconfig: ValidateTsconfig;
```
- *Type:* projen.cdk.ValidateTsconfig
- *Default:* ValidateTsconfig.STRICT
Level of tsconfig validation jsii should perform on the user-provided tsconfig.
Only relevant when the project synthesizes its own tsconfig
(i.e. `disableTsconfig` is not set on the TypeScriptProject).
> [https://aws.github.io/jsii/user-guides/lib-author/configuration/#validatetsconfig](https://aws.github.io/jsii/user-guides/lib-author/configuration/#validatetsconfig)
---
##### `catalog`Optional
```typescript
public readonly catalog: Catalog;
```
- *Type:* projen.cdk.Catalog
- *Default:* new version will be announced
Libraries will be picked up by the construct catalog when they are published to npm as jsii modules and will be published under:.
https://awscdk.io/packages/[@SCOPE/]PACKAGE@VERSION
The catalog will also post a tweet to https://twitter.com/awscdkio with the
package name, description and the above link. You can disable these tweets
through `{ announce: false }`.
You can also add a Twitter handle through `{ twitter: 'xx' }` which will be
mentioned in the tweet.
> [https://github.com/construct-catalog/catalog](https://github.com/construct-catalog/catalog)
---
##### `cdkVersion`Required
```typescript
public readonly cdkVersion: string;
```
- *Type:* string
- *Default:* "2.189.1"
Minimum version of the AWS CDK to depend on.
---
##### `cdkCliVersion`Optional
```typescript
public readonly cdkCliVersion: string;
```
- *Type:* string
- *Default:* "^2"
Version range of the AWS CDK CLI to depend on.
Can be either a specific version, or an NPM version range.
By default, the latest 2.x version will be installed; you can use this
option to restrict it to a specific version or version range.
---
##### `cdkVersionPinning`Optional
```typescript
public readonly cdkVersionPinning: boolean;
```
- *Type:* boolean
Use pinned version instead of caret version for CDK.
You can use this to prevent mixed versions for your CDK dependencies and to prevent auto-updates.
If you use experimental features this will let you define the moment you include breaking changes.
---
##### `constructsVersion`Optional
```typescript
public readonly constructsVersion: string;
```
- *Type:* string
- *Default:* for CDK 1.x the default is "3.2.27", for CDK 2.x the default is "10.5.1".
Minimum version of the `constructs` library to depend on.
---
##### `edgeLambdaAutoDiscover`Optional
```typescript
public readonly edgeLambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `cloudfront.experimental.EdgeFunction` for each `.edge-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `experimentalIntegRunner`Optional
```typescript
public readonly experimentalIntegRunner: boolean;
```
- *Type:* boolean
- *Default:* false
Enable experimental support for the AWS CDK integ-runner.
---
##### `integrationTestAutoDiscover`Optional
```typescript
public readonly integrationTestAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically discovers and creates integration tests for each `.integ.ts` file under your test directory.
---
##### `lambdaAutoDiscover`Optional
```typescript
public readonly lambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `aws_lambda.Function` for each `.lambda.ts` handler in your source tree. If this is disabled, you either need to explicitly call `aws_lambda.Function.autoDiscover()` or define a `new aws_lambda.Function()` for each handler.
---
##### `lambdaExtensionAutoDiscover`Optional
```typescript
public readonly lambdaExtensionAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.LambdaExtension` for each `.lambda-extension.ts` entrypoint in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `lambdaOptions`Optional
```typescript
public readonly lambdaOptions: LambdaFunctionCommonOptions;
```
- *Type:* projen.awscdk.LambdaFunctionCommonOptions
- *Default:* default options
Common options for all AWS Lambda functions.
---
##### `singletonLambdaAutoDiscover`Optional
```typescript
public readonly singletonLambdaAutoDiscover: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically adds an `awscdk.SingletonFunction` for each `.singleton-lambda.ts` handler in your source tree. If this is disabled, you can manually add an `awscdk.AutoDiscover` component to your project.
---
##### `privateNpm`Optional
```typescript
public readonly privateNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Whether to enable private NPM registry authentication.
---
##### `privateNpmTokenEnvVar`Optional
```typescript
public readonly privateNpmTokenEnvVar: string;
```
- *Type:* string
- *Default:* 'NPM_TOKEN'
The environment variable name containing the NPM authentication token.
---
### TaimosPrivateTypescriptLibraryOptions
#### Initializer
```typescript
import { TaimosPrivateTypescriptLibraryOptions } from '@taimos/projen'
const taimosPrivateTypescriptLibraryOptions: TaimosPrivateTypescriptLibraryOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| name | string | This is the name of your project. |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| gitIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .gitignore file. |
| gitOptions | projen.GitOptions | Configuration options for git. |
| logging | projen.LoggerOptions | Configure logging options such as verbosity. |
| outdir | string | The root directory of the project. |
| parent | projen.Project | The parent project, if this project is part of a bigger project. |
| projectTree | boolean | Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging. |
| projenCommand | string | The shell command to use in order to run the projen CLI. |
| projenrcJson | boolean | Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. |
| projenrcJsonOptions | projen.ProjenrcJsonOptions | Options for .projenrc.json. |
| renovatebot | boolean | Use renovatebot to handle dependency upgrades. |
| renovatebotOptions | projen.RenovatebotOptions | Options for renovatebot. |
| autoApproveOptions | projen.github.AutoApproveOptions | Enable and configure the 'auto approve' workflow. |
| autoMerge | boolean | Enable automatic merging on GitHub. |
| autoMergeOptions | projen.github.AutoMergeOptions | Configure options for automatic merging on GitHub. |
| clobber | boolean | Add a `clobber` task which resets the repo to origin. |
| devContainer | boolean | Add a VSCode development environment (used for GitHub Codespaces). |
| github | boolean | Enable GitHub integration. |
| githubOptions | projen.github.GitHubOptions | Options for GitHub integration. |
| gitpod | boolean | Add a Gitpod development environment. |
| projenCredentials | projen.github.GithubCredentials | Choose a method of providing GitHub API access for projen workflows. |
| readme | projen.SampleReadmeProps | The README setup. |
| stale | boolean | Auto-close of stale issues and pull request. |
| staleOptions | projen.github.StaleOptions | Auto-close stale issues and pull requests. |
| vscode | boolean | Enable VSCode integration. |
| addPackageManagerToDevEngines | boolean | Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`. |
| allowLibraryDependencies | boolean | Allow the project to include `peerDependencies` and `bundledDependencies`. |
| allowScripts | string[] | List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation. |
| authorEmail | string | Author's e-mail. |
| authorName | string | Author's name. |
| authorOrganization | boolean | Is the author an organization. |
| authorUrl | string | Author's URL / Website. |
| autoDetectBin | boolean | Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. |
| bin | {[ key: string ]: string} | Binary programs vended with your module. |
| bugsEmail | string | The email address to which issues should be reported. |
| bugsUrl | string | The url to your project's issue tracker. |
| bundledDeps | string[] | List of dependencies to bundle into this module. |
| bunVersion | string | The version of Bun to use if using Bun as a package manager. |
| codeArtifactOptions | projen.javascript.CodeArtifactOptions | Options for npm packages using AWS CodeArtifact. |
| deleteOrphanedLockFiles | boolean | Automatically delete lockfiles from package managers that are not the active one. |
| deps | string[] | Runtime dependencies of this module. |
| description | string | The description is just a string that helps people understand the purpose of the package. |
| devDeps | string[] | Build dependencies for this module. |
| devEngines | projen.javascript.DevEngines | Configure the `devEngines` field in `package.json`. |
| entrypoint | string | Module entrypoint (`main` in `package.json`). |
| homepage | string | Package's Homepage / Website. |
| keywords | string[] | Keywords to include in `package.json`. |
| license | string | License's SPDX identifier. |
| licensed | boolean | Indicates if a license should be added. |
| maxNodeVersion | string | The maximum node version supported by this package. Most projects should not use this option. |
| minNodeVersion | string | The minimum node version required by this package to function. Most projects should not use this option. |
| npmAccess | projen.javascript.NpmAccess | Access level of the npm package. |
| npmProvenance | boolean | Should provenance statements be generated when the package is published. |
| npmRegistryUrl | string | The base URL of the npm package registry. |
| npmTokenSecret | string | GitHub secret which contains the NPM token to use when publishing packages. |
| npmTrustedPublishing | boolean | Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. |
| packageManager | projen.javascript.NodePackageManager | The Node Package Manager used to execute scripts. |
| packageName | string | The "name" in package.json. |
| peerDependencyOptions | projen.javascript.PeerDependencyOptions | Options for `peerDeps`. |
| peerDeps | string[] | Peer dependencies for this module. |
| pnpmOptions | projen.javascript.PnpmOptions | Options for pnpm. |
| pnpmVersion | string | The version of PNPM to use if using PNPM as a package manager. |
| repository | string | The repository is the location where the actual code for your package lives. |
| repositoryDirectory | string | If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
| scopedPackagesOptions | projen.javascript.ScopedPackagesOptions[] | Options for privately hosted scoped packages. |
| stability | string | Package's Stability. |
| yarnBerryOptions | projen.javascript.YarnBerryOptions | Options for Yarn Berry. |
| bumpPackage | string | The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string. |
| jsiiReleaseVersion | string | Version requirement of `publib` which is used to publish modules to npm. |
| majorVersion | number | Major version to release from the default branch. |
| minMajorVersion | number | Minimal Major version to release. |
| nextVersionCommand | string | A shell command to control the next version to release. |
| npmDistTag | string | The npmDistTag to use when publishing from the default branch. |
| postBuildSteps | projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| prerelease | string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| publishDryRun | boolean | Instead of actually publishing to package managers, just print the publishing command. |
| publishTasks | boolean | Define publishing tasks that can be executed manually as well as workflows. |
| releasableCommits | projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
| releaseBranches | {[ key: string ]: projen.release.BranchOptions} | Defines additional release branches. |
| releaseEnvironment | string | The GitHub Actions environment used for the release. |
| releaseFailureIssue | boolean | Create a github issue on every failed publishing task. |
| releaseFailureIssueLabel | string | The label to apply to issues indicating publish failures. |
| releaseTagPrefix | string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
| releaseTrigger | projen.release.ReleaseTrigger | The release trigger to use. |
| releaseWorkflowEnv | {[ key: string ]: string} | Build environment variables for release workflows. |
| releaseWorkflowName | string | The name of the default release workflow. |
| releaseWorkflowSetupSteps | projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| versionrcOptions | {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| workflowContainerImage | string | Container image to use for GitHub workflows. |
| workflowRunsOn | string[] | Github Runner selection labels. |
| workflowRunsOnGroup | projen.GroupRunnerOptions | Github Runner Group selection options. |
| artifactsDirectory | string | A directory which will contain build artifacts. |
| auditDeps | boolean | Run security audit on dependencies. |
| auditDepsOptions | projen.javascript.AuditOptions | Security audit options. |
| autoApproveUpgrades | boolean | Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured). |
| biome | boolean | Setup Biome. |
| biomeOptions | projen.javascript.BiomeOptions | Biome options. |
| buildWorkflow | boolean | Define a GitHub workflow for building PRs. |
| buildWorkflowOptions | projen.javascript.BuildWorkflowOptions | Options for PR build workflow. |
| bundlerOptions | projen.javascript.BundlerOptions | Options for `Bundler`. |
| checkLicenses | projen.javascript.LicenseCheckerOptions | Configure which licenses should be deemed acceptable for use by dependencies. |
| codeCov | boolean | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`. |
| codeCovTokenSecret | string | Define the secret name for a specified https://codecov.io/ token. |
| copyrightOwner | string | License copyright owner. |
| copyrightPeriod | string | The copyright years to put in the LICENSE file. |
| defaultReleaseBranch | string | The name of the main release branch. |
| dependabot | boolean | Use dependabot to handle dependency upgrades. |
| dependabotOptions | projen.github.DependabotOptions | Options for dependabot. |
| depsUpgrade | boolean | Use tasks and github workflows to handle dependency upgrades. |
| depsUpgradeOptions | projen.javascript.UpgradeDependenciesOptions | Options for `UpgradeDependencies`. |
| gitignore | string[] | Additional entries to .gitignore. |
| jest | boolean | Setup jest unit tests. |
| jestOptions | projen.javascript.JestOptions | Jest options. |
| npmignoreEnabled | boolean | Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
| npmIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .npmignore file. |
| package | boolean | Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). |
| prettier | boolean | Setup prettier. |
| prettierOptions | projen.javascript.PrettierOptions | Prettier options. |
| projenDevDependency | boolean | Indicates of "projen" should be installed as a devDependency. |
| projenrcJs | boolean | Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. |
| projenrcJsOptions | projen.javascript.ProjenrcOptions | Options for .projenrc.js. |
| projenVersion | string | Version of projen to install. |
| pullRequestTemplate | boolean | Include a GitHub pull request template. |
| pullRequestTemplateContents | string[] | The contents of the pull request template. |
| release | boolean | Add release management to this project. |
| releaseToNpm | boolean | Automatically release to npm when new versions are introduced. |
| workflowBootstrapSteps | projen.github.workflows.JobStep[] | Workflow steps to use in order to bootstrap this repo. |
| workflowGitIdentity | projen.github.GitIdentity | The git identity to use in workflows. |
| workflowNodeVersion | string | The node version used in GitHub Actions workflows. |
| workflowPackageCache | boolean | Enable Node.js package cache in GitHub workflows. |
| disableTsconfig | boolean | Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
| disableTsconfigDev | boolean | Do not generate a development tsconfig file. |
| docgen | boolean | Docgen by Typedoc. |
| docsDirectory | string | Docs directory. |
| entrypointTypes | string | The .d.ts file that includes the type declarations for this module. |
| eslint | boolean | Setup eslint. |
| eslintOptions | projen.javascript.EslintOptions | Eslint options. |
| libdir | string | Typescript artifacts output directory. |
| projenrcTs | boolean | Use TypeScript for your projenrc file (`.projenrc.ts`). |
| projenrcTsOptions | projen.typescript.ProjenrcOptions | Options for .projenrc.ts. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner to use for executing TypeScript files. |
| sampleCode | boolean | Generate one-time sample in `src/` and `test/` if there are no files there. |
| srcdir | string | Typescript sources directory. |
| testdir | string | Jest tests directory. Tests files should be named `xxx.test.ts`. |
| tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. |
| tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). |
| tsconfigDevFile | string | The name (and path) of the development tsconfig file. |
| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. |
| typescriptVersion | string | TypeScript version to use. |
| privateNpm | boolean | Whether to enable private NPM registry authentication. |
| privateNpmTokenEnvVar | string | The environment variable name containing the NPM authentication token. |
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
- *Default:* $BASEDIR
This is the name of your project.
---
##### `commitGenerated`Optional
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to commit the managed files by default.
---
##### `gitIgnoreOptions`Optional
```typescript
public readonly gitIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .gitignore file.
---
##### `gitOptions`Optional
```typescript
public readonly gitOptions: GitOptions;
```
- *Type:* projen.GitOptions
Configuration options for git.
---
##### `logging`Optional
```typescript
public readonly logging: LoggerOptions;
```
- *Type:* projen.LoggerOptions
- *Default:* {}
Configure logging options such as verbosity.
---
##### `outdir`Optional
```typescript
public readonly outdir: string;
```
- *Type:* string
- *Default:* "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent
directory and it cannot be the same as the parent or any of it's other
subprojects.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
The parent project, if this project is part of a bigger project.
---
##### `projectTree`Optional
```typescript
public readonly projectTree: boolean;
```
- *Type:* boolean
- *Default:* false
Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging.
---
##### `projenCommand`Optional
```typescript
public readonly projenCommand: string;
```
- *Type:* string
- *Default:* "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
---
##### `projenrcJson`Optional
```typescript
public readonly projenrcJson: boolean;
```
- *Type:* boolean
- *Default:* false
Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
---
##### `projenrcJsonOptions`Optional
```typescript
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
```
- *Type:* projen.ProjenrcJsonOptions
- *Default:* default options
Options for .projenrc.json.
---
##### `renovatebot`Optional
```typescript
public readonly renovatebot: boolean;
```
- *Type:* boolean
- *Default:* false
Use renovatebot to handle dependency upgrades.
---
##### `renovatebotOptions`Optional
```typescript
public readonly renovatebotOptions: RenovatebotOptions;
```
- *Type:* projen.RenovatebotOptions
- *Default:* default options
Options for renovatebot.
---
##### `autoApproveOptions`Optional
```typescript
public readonly autoApproveOptions: AutoApproveOptions;
```
- *Type:* projen.github.AutoApproveOptions
- *Default:* auto approve is disabled
Enable and configure the 'auto approve' workflow.
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: boolean;
```
- *Type:* boolean
- *Default:* true
Enable automatic merging on GitHub.
Has no effect if `github.mergify`
is set to false.
---
##### `autoMergeOptions`Optional
```typescript
public readonly autoMergeOptions: AutoMergeOptions;
```
- *Type:* projen.github.AutoMergeOptions
- *Default:* see defaults in `AutoMergeOptions`
Configure options for automatic merging on GitHub.
Has no effect if
`github.mergify` or `autoMerge` is set to false.
---
##### `clobber`Optional
```typescript
public readonly clobber: boolean;
```
- *Type:* boolean
- *Default:* true, but false for subprojects
Add a `clobber` task which resets the repo to origin.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: boolean;
```
- *Type:* boolean
- *Default:* false
Add a VSCode development environment (used for GitHub Codespaces).
---
##### `github`Optional
```typescript
public readonly github: boolean;
```
- *Type:* boolean
- *Default:* true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `githubOptions`Optional
```typescript
public readonly githubOptions: GitHubOptions;
```
- *Type:* projen.github.GitHubOptions
- *Default:* see GitHubOptions
Options for GitHub integration.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: boolean;
```
- *Type:* boolean
- *Default:* false
Add a Gitpod development environment.
---
##### `projenCredentials`Optional
```typescript
public readonly projenCredentials: GithubCredentials;
```
- *Type:* projen.github.GithubCredentials
- *Default:* use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
---
##### `readme`Optional
```typescript
public readonly readme: SampleReadmeProps;
```
- *Type:* projen.SampleReadmeProps
- *Default:* { filename: 'README.md', contents: '# replace this' }
The README setup.
---
*Example*
```typescript
"{ filename: 'readme.md', contents: '# title' }"
```
##### `stale`Optional
```typescript
public readonly stale: boolean;
```
- *Type:* boolean
- *Default:* false
Auto-close of stale issues and pull request.
See `staleOptions` for options.
---
##### `staleOptions`Optional
```typescript
public readonly staleOptions: StaleOptions;
```
- *Type:* projen.github.StaleOptions
- *Default:* see defaults in `StaleOptions`
Auto-close stale issues and pull requests.
To disable set `stale` to `false`.
---
##### `vscode`Optional
```typescript
public readonly vscode: boolean;
```
- *Type:* boolean
- *Default:* true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `addPackageManagerToDevEngines`Optional
```typescript
public readonly addPackageManagerToDevEngines: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`.
---
##### `allowLibraryDependencies`Optional
```typescript
public readonly allowLibraryDependencies: boolean;
```
- *Type:* boolean
- *Default:* true
Allow the project to include `peerDependencies` and `bundledDependencies`.
This is normally only allowed for libraries. For apps, there's no meaning
for specifying these.
---
##### `allowScripts`Optional
```typescript
public readonly allowScripts: string[];
```
- *Type:* string[]
- *Default:* all install scripts are allowed to run (package manager default)
List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation.
These scripts can execute arbitrary code, making them a common
supply-chain attack vector. Package managers are moving toward
blocking them by default and requiring an explicit allowlist.
Configuring `allowScripts` sets up that allowlist so scripts only run
for the packages you have explicitly reviewed and trust.
Support for this setting depends on the configured `packageManager`:
- `NPM`: written to the native `allowScripts` field in `package.json`
(requires npm >= 11.16; see https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts).
- `BUN`: written to the native `trustedDependencies` field in
`package.json` (see https://bun.com/docs/pm/lifecycle).
- `PNPM`: written to the `onlyBuiltDependencies` setting in
`pnpm-workspace.yaml` (see https://pnpm.io/settings#onlybuiltdependencies).
- `YARN2`, `YARN_BERRY`: written to the native
`dependenciesMeta..built` allowlist in `package.json`, combined
with `enableScripts: false` in `.yarnrc.yml` (see
https://yarnpkg.com/features/security#postinstalls). If you set
`yarnBerryOptions.yarnRcOptions.enableScripts` explicitly, that value
is respected instead of being overridden.
- `YARN`, `YARN_CLASSIC`: not supported. Yarn Classic has no native
mechanism to allowlist install scripts for specific dependencies.
Setting this option with one of these package managers throws an
error at synthesis time.
---
##### `authorEmail`Optional
```typescript
public readonly authorEmail: string;
```
- *Type:* string
Author's e-mail.
---
##### `authorName`Optional
```typescript
public readonly authorName: string;
```
- *Type:* string
Author's name.
---
##### `authorOrganization`Optional
```typescript
public readonly authorOrganization: boolean;
```
- *Type:* boolean
Is the author an organization.
---
##### `authorUrl`Optional
```typescript
public readonly authorUrl: string;
```
- *Type:* string
Author's URL / Website.
---
##### `autoDetectBin`Optional
```typescript
public readonly autoDetectBin: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
---
##### `bin`Optional
```typescript
public readonly bin: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your `package.json`, but unless `autoDetectBin` is `false`, every
executable file under `bin` will automatically be added to this section.
---
##### `bugsEmail`Optional
```typescript
public readonly bugsEmail: string;
```
- *Type:* string
The email address to which issues should be reported.
---
##### `bugsUrl`Optional
```typescript
public readonly bugsUrl: string;
```
- *Type:* string
The url to your project's issue tracker.
---
##### `bundledDeps`Optional
```typescript
public readonly bundledDeps: string[];
```
- *Type:* string[]
List of dependencies to bundle into this module.
These modules will be
added both to the `dependencies` section and `bundledDependencies` section of
your `package.json`.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
##### `bunVersion`Optional
```typescript
public readonly bunVersion: string;
```
- *Type:* string
- *Default:* "latest"
The version of Bun to use if using Bun as a package manager.
---
##### `codeArtifactOptions`Optional
```typescript
public readonly codeArtifactOptions: CodeArtifactOptions;
```
- *Type:* projen.javascript.CodeArtifactOptions
- *Default:* undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
---
##### `deleteOrphanedLockFiles`Optional
```typescript
public readonly deleteOrphanedLockFiles: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically delete lockfiles from package managers that are not the active one.
Only triggered when the lockfile for the configured package
manager already exists.
This is useful when migrating between package managers to avoid conflicts.
---
##### `deps`Optional
```typescript
public readonly deps: string[];
```
- *Type:* string[]
- *Default:* []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'express', 'lodash', 'foo@^2' ]
```
##### `description`Optional
```typescript
public readonly description: string;
```
- *Type:* string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
---
##### `devDeps`Optional
```typescript
public readonly devDeps: string[];
```
- *Type:* string[]
- *Default:* []
Build dependencies for this module.
These dependencies will only be
available in your build environment but will not be fetched when this
module is consumed.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'typescript', '@types/express' ]
```
##### `devEngines`Optional
```typescript
public readonly devEngines: DevEngines;
```
- *Type:* projen.javascript.DevEngines
Configure the `devEngines` field in `package.json`.
The `devEngines.packageManager` field is automatically populated based on
the resolved `packageManager` value. Any fields provided here are merged
with the auto-populated `packageManager` entry.
> [https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines)
---
##### `entrypoint`Optional
```typescript
public readonly entrypoint: string;
```
- *Type:* string
- *Default:* "lib/index.js"
Module entrypoint (`main` in `package.json`).
Set to an empty string to not include `main` in your package.json
---
##### `homepage`Optional
```typescript
public readonly homepage: string;
```
- *Type:* string
Package's Homepage / Website.
---
##### `keywords`Optional
```typescript
public readonly keywords: string[];
```
- *Type:* string[]
Keywords to include in `package.json`.
---
##### `license`Optional
```typescript
public readonly license: string;
```
- *Type:* string
- *Default:* "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the `licensed` option if you want to no license to be specified.
---
##### `licensed`Optional
```typescript
public readonly licensed: boolean;
```
- *Type:* boolean
- *Default:* true
Indicates if a license should be added.
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
- *Default:* no maximum version is enforced
The maximum node version supported by this package. Most projects should not use this option.
The value indicates that the package is incompatible with any newer versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option.
Consider this option only if your package is known to not function with newer versions of node.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
- *Default:* no minimum version is enforced
The minimum node version required by this package to function. Most projects should not use this option.
The value indicates that the package is incompatible with any older versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
Setting this option has very high impact on the consumers of your package,
as package managers will actively prevent usage with node versions you have marked as incompatible.
To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
---
##### `npmAccess`Optional
```typescript
public readonly npmAccess: NpmAccess;
```
- *Type:* projen.javascript.NpmAccess
- *Default:* for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
Access level of the npm package.
---
##### `npmProvenance`Optional
```typescript
public readonly npmProvenance: boolean;
```
- *Type:* boolean
- *Default:* true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and
you will need to use a supported CI/CD provider.
Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
> [https://docs.npmjs.com/generating-provenance-statements](https://docs.npmjs.com/generating-provenance-statements)
---
##### `npmRegistryUrl`Optional
```typescript
public readonly npmRegistryUrl: string;
```
- *Type:* string
- *Default:* "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
---
##### `npmTokenSecret`Optional
```typescript
public readonly npmTokenSecret: string;
```
- *Type:* string
- *Default:* "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
---
##### `npmTrustedPublishing`Optional
```typescript
public readonly npmTrustedPublishing: boolean;
```
- *Type:* boolean
- *Default:* false
Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
---
##### `packageManager`Optional
```typescript
public readonly packageManager: NodePackageManager;
```
- *Type:* projen.javascript.NodePackageManager
- *Default:* Detected from the calling process or `YARN_CLASSIC` if detection fails.
The Node Package Manager used to execute scripts.
---
##### `packageName`Optional
```typescript
public readonly packageName: string;
```
- *Type:* string
- *Default:* defaults to project name
The "name" in package.json.
---
##### `peerDependencyOptions`Optional
```typescript
public readonly peerDependencyOptions: PeerDependencyOptions;
```
- *Type:* projen.javascript.PeerDependencyOptions
Options for `peerDeps`.
---
##### `peerDeps`Optional
```typescript
public readonly peerDeps: string[];
```
- *Type:* string[]
- *Default:* []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the _consumer_ of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the `node_modules` tree of your consumers.
Note that prior to npm@7, peer dependencies are _not_ automatically
installed, which means that adding peer dependencies to a library will be a
breaking change for your customers.
Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
---
##### `pnpmOptions`Optional
```typescript
public readonly pnpmOptions: PnpmOptions;
```
- *Type:* projen.javascript.PnpmOptions
- *Default:* all default options
Options for pnpm.
---
##### `pnpmVersion`Optional
```typescript
public readonly pnpmVersion: string;
```
- *Type:* string
- *Default:* "10.33.0"
The version of PNPM to use if using PNPM as a package manager.
---
##### `repository`Optional
```typescript
public readonly repository: string;
```
- *Type:* string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
---
##### `repositoryDirectory`Optional
```typescript
public readonly repositoryDirectory: string;
```
- *Type:* string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
---
##### `scopedPackagesOptions`Optional
```typescript
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
```
- *Type:* projen.javascript.ScopedPackagesOptions[]
- *Default:* fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
---
##### `stability`Optional
```typescript
public readonly stability: string;
```
- *Type:* string
Package's Stability.
---
##### `yarnBerryOptions`Optional
```typescript
public readonly yarnBerryOptions: YarnBerryOptions;
```
- *Type:* projen.javascript.YarnBerryOptions
- *Default:* Yarn Berry v4 with all default options
Options for Yarn Berry.
---
##### `bumpPackage`Optional
```typescript
public readonly bumpPackage: string;
```
- *Type:* string
- *Default:* A recent version of "commit-and-tag-version"
The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
This can be any compatible package version, including the deprecated `standard-version@9`.
---
##### `jsiiReleaseVersion`Optional
```typescript
public readonly jsiiReleaseVersion: string;
```
- *Type:* string
- *Default:* "latest"
Version requirement of `publib` which is used to publish modules to npm.
---
##### `majorVersion`Optional
```typescript
public readonly majorVersion: number;
```
- *Type:* number
- *Default:* Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line.
If not specified, we bump the global latest version.
---
##### `minMajorVersion`Optional
```typescript
public readonly minMajorVersion: number;
```
- *Type:* number
- *Default:* No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major
release are not incrementing the major version number.
Can not be set together with `majorVersion`.
---
##### `nextVersionCommand`Optional
```typescript
public readonly nextVersionCommand: string;
```
- *Type:* string
- *Default:* The next version will be determined based on the commit history and project settings.
A shell command to control the next version to release.
If present, this shell command will be run before the bump is executed, and
it determines what version to release. It will be executed in the following
environment:
- Working directory: the project directory.
- `$VERSION`: the current version. Looks like `1.2.3`.
- `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
- `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
The command should print one of the following to `stdout`:
- Nothing: the next version number will be determined based on commit history.
- `x.y.z`: the next version number will be `x.y.z`.
- `major|minor|patch`: the next version number will be the current version number
with the indicated component bumped.
This setting cannot be specified together with `minMajorVersion`; the invoked
script can be used to achieve the effects of `minMajorVersion`.
---
##### `npmDistTag`Optional
```typescript
public readonly npmDistTag: string;
```
- *Type:* string
- *Default:* "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the `npmDistTag` property
for each branch.
---
##### `postBuildSteps`Optional
```typescript
public readonly postBuildSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* []
Steps to execute after build as part of the release workflow.
---
##### `prerelease`Optional
```typescript
public readonly prerelease: string;
```
- *Type:* string
- *Default:* normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
---
##### `publishDryRun`Optional
```typescript
public readonly publishDryRun: boolean;
```
- *Type:* boolean
- *Default:* false
Instead of actually publishing to package managers, just print the publishing command.
---
##### `publishTasks`Optional
```typescript
public readonly publishTasks: boolean;
```
- *Type:* boolean
- *Default:* false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this
in order to create a publishing task for each publishing activity.
---
##### `releasableCommits`Optional
```typescript
public readonly releasableCommits: ReleasableCommits;
```
- *Type:* projen.ReleasableCommits
- *Default:* ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
---
##### `releaseBranches`Optional
```typescript
public readonly releaseBranches: {[ key: string ]: BranchOptions};
```
- *Type:* {[ key: string ]: projen.release.BranchOptions}
- *Default:* no additional branches are used for release. you can use `addBranch()` to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch _must_ be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the `majorVersion` field must also
be provided for the default branch.
---
##### `releaseEnvironment`Optional
```typescript
public readonly releaseEnvironment: string;
```
- *Type:* string
- *Default:* no environment used, unless set at the artifact level
The GitHub Actions environment used for the release.
This can be used to add an explicit approval step to the release
or limit who can initiate a release through environment protection rules.
When multiple artifacts are released, the environment can be overwritten
on a per artifact basis.
---
##### `releaseFailureIssue`Optional
```typescript
public readonly releaseFailureIssue: boolean;
```
- *Type:* boolean
- *Default:* false
Create a github issue on every failed publishing task.
---
##### `releaseFailureIssueLabel`Optional
```typescript
public readonly releaseFailureIssueLabel: string;
```
- *Type:* string
- *Default:* "failed-release"
The label to apply to issues indicating publish failures.
Only applies if `releaseFailureIssue` is true.
---
##### `releaseTagPrefix`Optional
```typescript
public readonly releaseTagPrefix: string;
```
- *Type:* string
- *Default:* "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version
when bumping, so if you change this on a project with an existing version
history, you may need to manually tag your latest release
with the new prefix.
---
##### `releaseTrigger`Optional
```typescript
public readonly releaseTrigger: ReleaseTrigger;
```
- *Type:* projen.release.ReleaseTrigger
- *Default:* Continuous releases (`ReleaseTrigger.continuous()`)
The release trigger to use.
---
##### `releaseWorkflowEnv`Optional
```typescript
public readonly releaseWorkflowEnv: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
- *Default:* {}
Build environment variables for release workflows.
---
##### `releaseWorkflowName`Optional
```typescript
public readonly releaseWorkflowName: string;
```
- *Type:* string
- *Default:* "release"
The name of the default release workflow.
---
##### `releaseWorkflowSetupSteps`Optional
```typescript
public readonly releaseWorkflowSetupSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
---
##### `versionrcOptions`Optional
```typescript
public readonly versionrcOptions: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with commit-and-tag-version package.
Given values either append to default configuration or overwrite values in it.
---
##### `workflowContainerImage`Optional
```typescript
public readonly workflowContainerImage: string;
```
- *Type:* string
- *Default:* default image
Container image to use for GitHub workflows.
---
##### `workflowRunsOn`Optional
```typescript
public readonly workflowRunsOn: string[];
```
- *Type:* string[]
- *Default:* ["ubuntu-latest"]
Github Runner selection labels.
---
##### `workflowRunsOnGroup`Optional
```typescript
public readonly workflowRunsOnGroup: GroupRunnerOptions;
```
- *Type:* projen.GroupRunnerOptions
Github Runner Group selection options.
---
##### `artifactsDirectory`Optional
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
- *Default:* "dist"
A directory which will contain build artifacts.
---
##### `auditDeps`Optional
```typescript
public readonly auditDeps: boolean;
```
- *Type:* boolean
- *Default:* false
Run security audit on dependencies.
When enabled, creates an "audit" task that checks for known security vulnerabilities
in dependencies. By default, runs during every build and checks for "high" severity
vulnerabilities or above in all dependencies (including dev dependencies).
---
##### `auditDepsOptions`Optional
```typescript
public readonly auditDepsOptions: AuditOptions;
```
- *Type:* projen.javascript.AuditOptions
- *Default:* default options
Security audit options.
---
##### `autoApproveUpgrades`Optional
```typescript
public readonly autoApproveUpgrades: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured).
Throw if set to true but `autoApproveOptions` are not defined.
---
##### `biome`Optional
```typescript
public readonly biome: boolean;
```
- *Type:* boolean
- *Default:* false
Setup Biome.
---
##### `biomeOptions`Optional
```typescript
public readonly biomeOptions: BiomeOptions;
```
- *Type:* projen.javascript.BiomeOptions
- *Default:* default options
Biome options.
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Define a GitHub workflow for building PRs.
---
##### `buildWorkflowOptions`Optional
```typescript
public readonly buildWorkflowOptions: BuildWorkflowOptions;
```
- *Type:* projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
---
##### `bundlerOptions`Optional
```typescript
public readonly bundlerOptions: BundlerOptions;
```
- *Type:* projen.javascript.BundlerOptions
Options for `Bundler`.
---
##### `checkLicenses`Optional
```typescript
public readonly checkLicenses: LicenseCheckerOptions;
```
- *Type:* projen.javascript.LicenseCheckerOptions
- *Default:* no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
---
##### `codeCov`Optional
```typescript
public readonly codeCov: boolean;
```
- *Type:* boolean
- *Default:* false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
---
##### `codeCovTokenSecret`Optional
```typescript
public readonly codeCovTokenSecret: string;
```
- *Type:* string
- *Default:* OIDC auth is used
Define the secret name for a specified https://codecov.io/ token.
---
##### `copyrightOwner`Optional
```typescript
public readonly copyrightOwner: string;
```
- *Type:* string
- *Default:* defaults to the value of authorName or "" if `authorName` is undefined.
License copyright owner.
This value is only used if the selected license text contains the
`$copyright_owner` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `copyrightPeriod`Optional
```typescript
public readonly copyrightPeriod: string;
```
- *Type:* string
- *Default:* current year
The copyright years to put in the LICENSE file.
This value is only used if the selected license text contains the
`$copyright_period` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `defaultReleaseBranch`Optional
```typescript
public readonly defaultReleaseBranch: string;
```
- *Type:* string
- *Default:* "main"
The name of the main release branch.
---
##### `dependabot`Optional
```typescript
public readonly dependabot: boolean;
```
- *Type:* boolean
- *Default:* false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with `depsUpgrade`.
---
##### `dependabotOptions`Optional
```typescript
public readonly dependabotOptions: DependabotOptions;
```
- *Type:* projen.github.DependabotOptions
- *Default:* default options
Options for dependabot.
---
##### `depsUpgrade`Optional
```typescript
public readonly depsUpgrade: boolean;
```
- *Type:* boolean
- *Default:* `true` for root projects, `false` for subprojects
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with `dependabot`.
---
##### `depsUpgradeOptions`Optional
```typescript
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
```
- *Type:* projen.javascript.UpgradeDependenciesOptions
- *Default:* default options
Options for `UpgradeDependencies`.
---
##### `gitignore`Optional
```typescript
public readonly gitignore: string[];
```
- *Type:* string[]
Additional entries to .gitignore.
---
##### `jest`Optional
```typescript
public readonly jest: boolean;
```
- *Type:* boolean
- *Default:* true
Setup jest unit tests.
---
##### `jestOptions`Optional
```typescript
public readonly jestOptions: JestOptions;
```
- *Type:* projen.javascript.JestOptions
- *Default:* default options
Jest options.
---
##### `npmignoreEnabled`Optional
```typescript
public readonly npmignoreEnabled: boolean;
```
- *Type:* boolean
- *Default:* true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
---
##### `npmIgnoreOptions`Optional
```typescript
public readonly npmIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .npmignore file.
---
##### `package`Optional
```typescript
public readonly package: boolean;
```
- *Type:* boolean
- *Default:* true
Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
---
##### `prettier`Optional
```typescript
public readonly prettier: boolean;
```
- *Type:* boolean
- *Default:* false
Setup prettier.
---
##### `prettierOptions`Optional
```typescript
public readonly prettierOptions: PrettierOptions;
```
- *Type:* projen.javascript.PrettierOptions
- *Default:* default options
Prettier options.
---
##### `projenDevDependency`Optional
```typescript
public readonly projenDevDependency: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Indicates of "projen" should be installed as a devDependency.
---
##### `projenrcJs`Optional
```typescript
public readonly projenrcJs: boolean;
```
- *Type:* boolean
- *Default:* true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
---
##### `projenrcJsOptions`Optional
```typescript
public readonly projenrcJsOptions: ProjenrcOptions;
```
- *Type:* projen.javascript.ProjenrcOptions
- *Default:* default options
Options for .projenrc.js.
---
##### `projenVersion`Optional
```typescript
public readonly projenVersion: string;
```
- *Type:* string
- *Default:* Defaults to the latest version.
Version of projen to install.
---
##### `pullRequestTemplate`Optional
```typescript
public readonly pullRequestTemplate: boolean;
```
- *Type:* boolean
- *Default:* true
Include a GitHub pull request template.
---
##### `pullRequestTemplateContents`Optional
```typescript
public readonly pullRequestTemplateContents: string[];
```
- *Type:* string[]
- *Default:* default content
The contents of the pull request template.
---
##### `release`Optional
```typescript
public readonly release: boolean;
```
- *Type:* boolean
- *Default:* true (false for subprojects)
Add release management to this project.
---
##### `releaseToNpm`Optional
```typescript
public readonly releaseToNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Automatically release to npm when new versions are introduced.
---
##### `workflowBootstrapSteps`Optional
```typescript
public readonly workflowBootstrapSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
---
##### `workflowGitIdentity`Optional
```typescript
public readonly workflowGitIdentity: GitIdentity;
```
- *Type:* projen.github.GitIdentity
- *Default:* default GitHub Actions user
The git identity to use in workflows.
---
##### `workflowNodeVersion`Optional
```typescript
public readonly workflowNodeVersion: string;
```
- *Type:* string
- *Default:* `minNodeVersion` if set, otherwise `lts/*`.
The node version used in GitHub Actions workflows.
Always use this option if your GitHub Actions workflows require a specific to run.
---
##### `workflowPackageCache`Optional
```typescript
public readonly workflowPackageCache: boolean;
```
- *Type:* boolean
- *Default:* false
Enable Node.js package cache in GitHub workflows.
---
##### `disableTsconfig`Optional
```typescript
public readonly disableTsconfig: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
---
##### `disableTsconfigDev`Optional
```typescript
public readonly disableTsconfigDev: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a development tsconfig file.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
- *Default:* false
Docgen by Typedoc.
---
##### `docsDirectory`Optional
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
- *Default:* "docs"
Docs directory.
---
##### `entrypointTypes`Optional
```typescript
public readonly entrypointTypes: string;
```
- *Type:* string
- *Default:* .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
---
##### `eslint`Optional
```typescript
public readonly eslint: boolean;
```
- *Type:* boolean
- *Default:* true, unless biome is enabled
Setup eslint.
---
##### `eslintOptions`Optional
```typescript
public readonly eslintOptions: EslintOptions;
```
- *Type:* projen.javascript.EslintOptions
- *Default:* opinionated default options
Eslint options.
---
##### `libdir`Optional
```typescript
public readonly libdir: string;
```
- *Type:* string
- *Default:* "lib"
Typescript artifacts output directory.
---
##### `projenrcTs`Optional
```typescript
public readonly projenrcTs: boolean;
```
- *Type:* boolean
- *Default:* false
Use TypeScript for your projenrc file (`.projenrc.ts`).
---
##### `projenrcTsOptions`Optional
```typescript
public readonly projenrcTsOptions: ProjenrcOptions;
```
- *Type:* projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
---
##### `runner`Optional
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
- *Default:* TypeScriptRunner.tsNode()
The TypeScript runner to use for executing TypeScript files.
This is a project-level setting that components (e.g. projenrc) will
use as their default runner.
---
##### `sampleCode`Optional
```typescript
public readonly sampleCode: boolean;
```
- *Type:* boolean
- *Default:* true
Generate one-time sample in `src/` and `test/` if there are no files there.
---
##### `srcdir`Optional
```typescript
public readonly srcdir: string;
```
- *Type:* string
- *Default:* "src"
Typescript sources directory.
---
##### `testdir`Optional
```typescript
public readonly testdir: string;
```
- *Type:* string
- *Default:* "test"
Jest tests directory. Tests files should be named `xxx.test.ts`.
If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
then tests are going to be compiled into `lib/` and executed as javascript.
If the test directory is outside of `src`, then we configure jest to
compile the code in-memory.
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* default options
Custom TSConfig.
---
##### `tsconfigDev`Optional
```typescript
public readonly tsconfigDev: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
---
##### `tsconfigDevFile`Optional
```typescript
public readonly tsconfigDevFile: string;
```
- *Type:* string
- *Default:* "{testdir}/tsconfig.json"
The name (and path) of the development tsconfig file.
By default this lives inside the test directory (e.g. `test/tsconfig.json`)
so that the TypeScript language service resolves it as the nearest config
for test files.
---
##### `tsJestOptions`Optional
```typescript
public readonly tsJestOptions: TsJestOptions;
```
- *Type:* projen.typescript.TsJestOptions
Options for ts-jest.
---
##### `typescriptVersion`Optional
```typescript
public readonly typescriptVersion: string;
```
- *Type:* string
- *Default:* "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
---
##### `privateNpm`Optional
```typescript
public readonly privateNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Whether to enable private NPM registry authentication.
---
##### `privateNpmTokenEnvVar`Optional
```typescript
public readonly privateNpmTokenEnvVar: string;
```
- *Type:* string
- *Default:* 'NPM_TOKEN'
The environment variable name containing the NPM authentication token.
---
### TaimosTypescriptLibraryOptions
#### Initializer
```typescript
import { TaimosTypescriptLibraryOptions } from '@taimos/projen'
const taimosTypescriptLibraryOptions: TaimosTypescriptLibraryOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| name | string | This is the name of your project. |
| commitGenerated | boolean | Whether to commit the managed files by default. |
| gitIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .gitignore file. |
| gitOptions | projen.GitOptions | Configuration options for git. |
| logging | projen.LoggerOptions | Configure logging options such as verbosity. |
| outdir | string | The root directory of the project. |
| parent | projen.Project | The parent project, if this project is part of a bigger project. |
| projectTree | boolean | Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging. |
| projenCommand | string | The shell command to use in order to run the projen CLI. |
| projenrcJson | boolean | Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. |
| projenrcJsonOptions | projen.ProjenrcJsonOptions | Options for .projenrc.json. |
| renovatebot | boolean | Use renovatebot to handle dependency upgrades. |
| renovatebotOptions | projen.RenovatebotOptions | Options for renovatebot. |
| autoApproveOptions | projen.github.AutoApproveOptions | Enable and configure the 'auto approve' workflow. |
| autoMerge | boolean | Enable automatic merging on GitHub. |
| autoMergeOptions | projen.github.AutoMergeOptions | Configure options for automatic merging on GitHub. |
| clobber | boolean | Add a `clobber` task which resets the repo to origin. |
| devContainer | boolean | Add a VSCode development environment (used for GitHub Codespaces). |
| github | boolean | Enable GitHub integration. |
| githubOptions | projen.github.GitHubOptions | Options for GitHub integration. |
| gitpod | boolean | Add a Gitpod development environment. |
| projenCredentials | projen.github.GithubCredentials | Choose a method of providing GitHub API access for projen workflows. |
| readme | projen.SampleReadmeProps | The README setup. |
| stale | boolean | Auto-close of stale issues and pull request. |
| staleOptions | projen.github.StaleOptions | Auto-close stale issues and pull requests. |
| vscode | boolean | Enable VSCode integration. |
| addPackageManagerToDevEngines | boolean | Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`. |
| allowLibraryDependencies | boolean | Allow the project to include `peerDependencies` and `bundledDependencies`. |
| allowScripts | string[] | List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation. |
| authorEmail | string | Author's e-mail. |
| authorName | string | Author's name. |
| authorOrganization | boolean | Is the author an organization. |
| authorUrl | string | Author's URL / Website. |
| autoDetectBin | boolean | Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. |
| bin | {[ key: string ]: string} | Binary programs vended with your module. |
| bugsEmail | string | The email address to which issues should be reported. |
| bugsUrl | string | The url to your project's issue tracker. |
| bundledDeps | string[] | List of dependencies to bundle into this module. |
| bunVersion | string | The version of Bun to use if using Bun as a package manager. |
| codeArtifactOptions | projen.javascript.CodeArtifactOptions | Options for npm packages using AWS CodeArtifact. |
| deleteOrphanedLockFiles | boolean | Automatically delete lockfiles from package managers that are not the active one. |
| deps | string[] | Runtime dependencies of this module. |
| description | string | The description is just a string that helps people understand the purpose of the package. |
| devDeps | string[] | Build dependencies for this module. |
| devEngines | projen.javascript.DevEngines | Configure the `devEngines` field in `package.json`. |
| entrypoint | string | Module entrypoint (`main` in `package.json`). |
| homepage | string | Package's Homepage / Website. |
| keywords | string[] | Keywords to include in `package.json`. |
| license | string | License's SPDX identifier. |
| licensed | boolean | Indicates if a license should be added. |
| maxNodeVersion | string | The maximum node version supported by this package. Most projects should not use this option. |
| minNodeVersion | string | The minimum node version required by this package to function. Most projects should not use this option. |
| npmAccess | projen.javascript.NpmAccess | Access level of the npm package. |
| npmProvenance | boolean | Should provenance statements be generated when the package is published. |
| npmRegistryUrl | string | The base URL of the npm package registry. |
| npmTokenSecret | string | GitHub secret which contains the NPM token to use when publishing packages. |
| npmTrustedPublishing | boolean | Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work. |
| packageManager | projen.javascript.NodePackageManager | The Node Package Manager used to execute scripts. |
| packageName | string | The "name" in package.json. |
| peerDependencyOptions | projen.javascript.PeerDependencyOptions | Options for `peerDeps`. |
| peerDeps | string[] | Peer dependencies for this module. |
| pnpmOptions | projen.javascript.PnpmOptions | Options for pnpm. |
| pnpmVersion | string | The version of PNPM to use if using PNPM as a package manager. |
| repository | string | The repository is the location where the actual code for your package lives. |
| repositoryDirectory | string | If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
| scopedPackagesOptions | projen.javascript.ScopedPackagesOptions[] | Options for privately hosted scoped packages. |
| stability | string | Package's Stability. |
| yarnBerryOptions | projen.javascript.YarnBerryOptions | Options for Yarn Berry. |
| bumpPackage | string | The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string. |
| jsiiReleaseVersion | string | Version requirement of `publib` which is used to publish modules to npm. |
| majorVersion | number | Major version to release from the default branch. |
| minMajorVersion | number | Minimal Major version to release. |
| nextVersionCommand | string | A shell command to control the next version to release. |
| npmDistTag | string | The npmDistTag to use when publishing from the default branch. |
| postBuildSteps | projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. |
| prerelease | string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
| publishDryRun | boolean | Instead of actually publishing to package managers, just print the publishing command. |
| publishTasks | boolean | Define publishing tasks that can be executed manually as well as workflows. |
| releasableCommits | projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. |
| releaseBranches | {[ key: string ]: projen.release.BranchOptions} | Defines additional release branches. |
| releaseEnvironment | string | The GitHub Actions environment used for the release. |
| releaseFailureIssue | boolean | Create a github issue on every failed publishing task. |
| releaseFailureIssueLabel | string | The label to apply to issues indicating publish failures. |
| releaseTagPrefix | string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
| releaseTrigger | projen.release.ReleaseTrigger | The release trigger to use. |
| releaseWorkflowEnv | {[ key: string ]: string} | Build environment variables for release workflows. |
| releaseWorkflowName | string | The name of the default release workflow. |
| releaseWorkflowSetupSteps | projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. |
| versionrcOptions | {[ key: string ]: any} | Custom configuration used when creating changelog with commit-and-tag-version package. |
| workflowContainerImage | string | Container image to use for GitHub workflows. |
| workflowRunsOn | string[] | Github Runner selection labels. |
| workflowRunsOnGroup | projen.GroupRunnerOptions | Github Runner Group selection options. |
| artifactsDirectory | string | A directory which will contain build artifacts. |
| auditDeps | boolean | Run security audit on dependencies. |
| auditDepsOptions | projen.javascript.AuditOptions | Security audit options. |
| autoApproveUpgrades | boolean | Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured). |
| biome | boolean | Setup Biome. |
| biomeOptions | projen.javascript.BiomeOptions | Biome options. |
| buildWorkflow | boolean | Define a GitHub workflow for building PRs. |
| buildWorkflowOptions | projen.javascript.BuildWorkflowOptions | Options for PR build workflow. |
| bundlerOptions | projen.javascript.BundlerOptions | Options for `Bundler`. |
| checkLicenses | projen.javascript.LicenseCheckerOptions | Configure which licenses should be deemed acceptable for use by dependencies. |
| codeCov | boolean | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`. |
| codeCovTokenSecret | string | Define the secret name for a specified https://codecov.io/ token. |
| copyrightOwner | string | License copyright owner. |
| copyrightPeriod | string | The copyright years to put in the LICENSE file. |
| defaultReleaseBranch | string | The name of the main release branch. |
| dependabot | boolean | Use dependabot to handle dependency upgrades. |
| dependabotOptions | projen.github.DependabotOptions | Options for dependabot. |
| depsUpgrade | boolean | Use tasks and github workflows to handle dependency upgrades. |
| depsUpgradeOptions | projen.javascript.UpgradeDependenciesOptions | Options for `UpgradeDependencies`. |
| gitignore | string[] | Additional entries to .gitignore. |
| jest | boolean | Setup jest unit tests. |
| jestOptions | projen.javascript.JestOptions | Jest options. |
| npmignoreEnabled | boolean | Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
| npmIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .npmignore file. |
| package | boolean | Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). |
| prettier | boolean | Setup prettier. |
| prettierOptions | projen.javascript.PrettierOptions | Prettier options. |
| projenDevDependency | boolean | Indicates of "projen" should be installed as a devDependency. |
| projenrcJs | boolean | Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. |
| projenrcJsOptions | projen.javascript.ProjenrcOptions | Options for .projenrc.js. |
| projenVersion | string | Version of projen to install. |
| pullRequestTemplate | boolean | Include a GitHub pull request template. |
| pullRequestTemplateContents | string[] | The contents of the pull request template. |
| release | boolean | Add release management to this project. |
| releaseToNpm | boolean | Automatically release to npm when new versions are introduced. |
| workflowBootstrapSteps | projen.github.workflows.JobStep[] | Workflow steps to use in order to bootstrap this repo. |
| workflowGitIdentity | projen.github.GitIdentity | The git identity to use in workflows. |
| workflowNodeVersion | string | The node version used in GitHub Actions workflows. |
| workflowPackageCache | boolean | Enable Node.js package cache in GitHub workflows. |
| disableTsconfig | boolean | Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
| disableTsconfigDev | boolean | Do not generate a development tsconfig file. |
| docgen | boolean | Docgen by Typedoc. |
| docsDirectory | string | Docs directory. |
| entrypointTypes | string | The .d.ts file that includes the type declarations for this module. |
| eslint | boolean | Setup eslint. |
| eslintOptions | projen.javascript.EslintOptions | Eslint options. |
| libdir | string | Typescript artifacts output directory. |
| projenrcTs | boolean | Use TypeScript for your projenrc file (`.projenrc.ts`). |
| projenrcTsOptions | projen.typescript.ProjenrcOptions | Options for .projenrc.ts. |
| runner | projen.typescript.TypeScriptRunner | The TypeScript runner to use for executing TypeScript files. |
| sampleCode | boolean | Generate one-time sample in `src/` and `test/` if there are no files there. |
| srcdir | string | Typescript sources directory. |
| testdir | string | Jest tests directory. Tests files should be named `xxx.test.ts`. |
| tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. |
| tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). |
| tsconfigDevFile | string | The name (and path) of the development tsconfig file. |
| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. |
| typescriptVersion | string | TypeScript version to use. |
| privateNpm | boolean | Whether to enable private NPM registry authentication. |
| privateNpmTokenEnvVar | string | The environment variable name containing the NPM authentication token. |
---
##### `name`Required
```typescript
public readonly name: string;
```
- *Type:* string
- *Default:* $BASEDIR
This is the name of your project.
---
##### `commitGenerated`Optional
```typescript
public readonly commitGenerated: boolean;
```
- *Type:* boolean
- *Default:* true
Whether to commit the managed files by default.
---
##### `gitIgnoreOptions`Optional
```typescript
public readonly gitIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .gitignore file.
---
##### `gitOptions`Optional
```typescript
public readonly gitOptions: GitOptions;
```
- *Type:* projen.GitOptions
Configuration options for git.
---
##### `logging`Optional
```typescript
public readonly logging: LoggerOptions;
```
- *Type:* projen.LoggerOptions
- *Default:* {}
Configure logging options such as verbosity.
---
##### `outdir`Optional
```typescript
public readonly outdir: string;
```
- *Type:* string
- *Default:* "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent
directory and it cannot be the same as the parent or any of it's other
subprojects.
---
##### `parent`Optional
```typescript
public readonly parent: Project;
```
- *Type:* projen.Project
The parent project, if this project is part of a bigger project.
---
##### `projectTree`Optional
```typescript
public readonly projectTree: boolean;
```
- *Type:* boolean
- *Default:* false
Generate a project tree file (`.projen/tree.json`) that shows all components and their relationships. Useful for understanding your project structure and debugging.
---
##### `projenCommand`Optional
```typescript
public readonly projenCommand: string;
```
- *Type:* string
- *Default:* "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
---
##### `projenrcJson`Optional
```typescript
public readonly projenrcJson: boolean;
```
- *Type:* boolean
- *Default:* false
Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
---
##### `projenrcJsonOptions`Optional
```typescript
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
```
- *Type:* projen.ProjenrcJsonOptions
- *Default:* default options
Options for .projenrc.json.
---
##### `renovatebot`Optional
```typescript
public readonly renovatebot: boolean;
```
- *Type:* boolean
- *Default:* false
Use renovatebot to handle dependency upgrades.
---
##### `renovatebotOptions`Optional
```typescript
public readonly renovatebotOptions: RenovatebotOptions;
```
- *Type:* projen.RenovatebotOptions
- *Default:* default options
Options for renovatebot.
---
##### `autoApproveOptions`Optional
```typescript
public readonly autoApproveOptions: AutoApproveOptions;
```
- *Type:* projen.github.AutoApproveOptions
- *Default:* auto approve is disabled
Enable and configure the 'auto approve' workflow.
---
##### `autoMerge`Optional
```typescript
public readonly autoMerge: boolean;
```
- *Type:* boolean
- *Default:* true
Enable automatic merging on GitHub.
Has no effect if `github.mergify`
is set to false.
---
##### `autoMergeOptions`Optional
```typescript
public readonly autoMergeOptions: AutoMergeOptions;
```
- *Type:* projen.github.AutoMergeOptions
- *Default:* see defaults in `AutoMergeOptions`
Configure options for automatic merging on GitHub.
Has no effect if
`github.mergify` or `autoMerge` is set to false.
---
##### `clobber`Optional
```typescript
public readonly clobber: boolean;
```
- *Type:* boolean
- *Default:* true, but false for subprojects
Add a `clobber` task which resets the repo to origin.
---
##### `devContainer`Optional
```typescript
public readonly devContainer: boolean;
```
- *Type:* boolean
- *Default:* false
Add a VSCode development environment (used for GitHub Codespaces).
---
##### `github`Optional
```typescript
public readonly github: boolean;
```
- *Type:* boolean
- *Default:* true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `githubOptions`Optional
```typescript
public readonly githubOptions: GitHubOptions;
```
- *Type:* projen.github.GitHubOptions
- *Default:* see GitHubOptions
Options for GitHub integration.
---
##### `gitpod`Optional
```typescript
public readonly gitpod: boolean;
```
- *Type:* boolean
- *Default:* false
Add a Gitpod development environment.
---
##### `projenCredentials`Optional
```typescript
public readonly projenCredentials: GithubCredentials;
```
- *Type:* projen.github.GithubCredentials
- *Default:* use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
---
##### `readme`Optional
```typescript
public readonly readme: SampleReadmeProps;
```
- *Type:* projen.SampleReadmeProps
- *Default:* { filename: 'README.md', contents: '# replace this' }
The README setup.
---
*Example*
```typescript
"{ filename: 'readme.md', contents: '# title' }"
```
##### `stale`Optional
```typescript
public readonly stale: boolean;
```
- *Type:* boolean
- *Default:* false
Auto-close of stale issues and pull request.
See `staleOptions` for options.
---
##### `staleOptions`Optional
```typescript
public readonly staleOptions: StaleOptions;
```
- *Type:* projen.github.StaleOptions
- *Default:* see defaults in `StaleOptions`
Auto-close stale issues and pull requests.
To disable set `stale` to `false`.
---
##### `vscode`Optional
```typescript
public readonly vscode: boolean;
```
- *Type:* boolean
- *Default:* true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
---
##### `addPackageManagerToDevEngines`Optional
```typescript
public readonly addPackageManagerToDevEngines: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add the resolved `packageManager` to `devEngines.packageManager` in `package.json`, setting `onFail` to `ignore`.
---
##### `allowLibraryDependencies`Optional
```typescript
public readonly allowLibraryDependencies: boolean;
```
- *Type:* boolean
- *Default:* true
Allow the project to include `peerDependencies` and `bundledDependencies`.
This is normally only allowed for libraries. For apps, there's no meaning
for specifying these.
---
##### `allowScripts`Optional
```typescript
public readonly allowScripts: string[];
```
- *Type:* string[]
- *Default:* all install scripts are allowed to run (package manager default)
List of dependency (package) names that are allowed to run lifecycle install scripts (`preinstall`, `install`, `postinstall`, `prepare`) during dependency installation.
These scripts can execute arbitrary code, making them a common
supply-chain attack vector. Package managers are moving toward
blocking them by default and requiring an explicit allowlist.
Configuring `allowScripts` sets up that allowlist so scripts only run
for the packages you have explicitly reviewed and trust.
Support for this setting depends on the configured `packageManager`:
- `NPM`: written to the native `allowScripts` field in `package.json`
(requires npm >= 11.16; see https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts).
- `BUN`: written to the native `trustedDependencies` field in
`package.json` (see https://bun.com/docs/pm/lifecycle).
- `PNPM`: written to the `onlyBuiltDependencies` setting in
`pnpm-workspace.yaml` (see https://pnpm.io/settings#onlybuiltdependencies).
- `YARN2`, `YARN_BERRY`: written to the native
`dependenciesMeta..built` allowlist in `package.json`, combined
with `enableScripts: false` in `.yarnrc.yml` (see
https://yarnpkg.com/features/security#postinstalls). If you set
`yarnBerryOptions.yarnRcOptions.enableScripts` explicitly, that value
is respected instead of being overridden.
- `YARN`, `YARN_CLASSIC`: not supported. Yarn Classic has no native
mechanism to allowlist install scripts for specific dependencies.
Setting this option with one of these package managers throws an
error at synthesis time.
---
##### `authorEmail`Optional
```typescript
public readonly authorEmail: string;
```
- *Type:* string
Author's e-mail.
---
##### `authorName`Optional
```typescript
public readonly authorName: string;
```
- *Type:* string
Author's name.
---
##### `authorOrganization`Optional
```typescript
public readonly authorOrganization: boolean;
```
- *Type:* boolean
Is the author an organization.
---
##### `authorUrl`Optional
```typescript
public readonly authorUrl: string;
```
- *Type:* string
Author's URL / Website.
---
##### `autoDetectBin`Optional
```typescript
public readonly autoDetectBin: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
---
##### `bin`Optional
```typescript
public readonly bin: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your `package.json`, but unless `autoDetectBin` is `false`, every
executable file under `bin` will automatically be added to this section.
---
##### `bugsEmail`Optional
```typescript
public readonly bugsEmail: string;
```
- *Type:* string
The email address to which issues should be reported.
---
##### `bugsUrl`Optional
```typescript
public readonly bugsUrl: string;
```
- *Type:* string
The url to your project's issue tracker.
---
##### `bundledDeps`Optional
```typescript
public readonly bundledDeps: string[];
```
- *Type:* string[]
List of dependencies to bundle into this module.
These modules will be
added both to the `dependencies` section and `bundledDependencies` section of
your `package.json`.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
##### `bunVersion`Optional
```typescript
public readonly bunVersion: string;
```
- *Type:* string
- *Default:* "latest"
The version of Bun to use if using Bun as a package manager.
---
##### `codeArtifactOptions`Optional
```typescript
public readonly codeArtifactOptions: CodeArtifactOptions;
```
- *Type:* projen.javascript.CodeArtifactOptions
- *Default:* undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
---
##### `deleteOrphanedLockFiles`Optional
```typescript
public readonly deleteOrphanedLockFiles: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically delete lockfiles from package managers that are not the active one.
Only triggered when the lockfile for the configured package
manager already exists.
This is useful when migrating between package managers to avoid conflicts.
---
##### `deps`Optional
```typescript
public readonly deps: string[];
```
- *Type:* string[]
- *Default:* []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'express', 'lodash', 'foo@^2' ]
```
##### `description`Optional
```typescript
public readonly description: string;
```
- *Type:* string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
---
##### `devDeps`Optional
```typescript
public readonly devDeps: string[];
```
- *Type:* string[]
- *Default:* []
Build dependencies for this module.
These dependencies will only be
available in your build environment but will not be fetched when this
module is consumed.
The recommendation is to only specify the module name here (e.g.
`express`). This will behave similar to `pnpm add` or `npm install` in the
sense that it will add the module as a dependency to your `package.json`
file with the latest version (`^`). You can specify semver requirements in
the same syntax passed to `pnpm add` or `npm i` (e.g. `express@^2`) and
this will be what your `package.json` will eventually include.
---
*Example*
```typescript
[ 'typescript', '@types/express' ]
```
##### `devEngines`Optional
```typescript
public readonly devEngines: DevEngines;
```
- *Type:* projen.javascript.DevEngines
Configure the `devEngines` field in `package.json`.
The `devEngines.packageManager` field is automatically populated based on
the resolved `packageManager` value. Any fields provided here are merged
with the auto-populated `packageManager` entry.
> [https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines)
---
##### `entrypoint`Optional
```typescript
public readonly entrypoint: string;
```
- *Type:* string
- *Default:* "lib/index.js"
Module entrypoint (`main` in `package.json`).
Set to an empty string to not include `main` in your package.json
---
##### `homepage`Optional
```typescript
public readonly homepage: string;
```
- *Type:* string
Package's Homepage / Website.
---
##### `keywords`Optional
```typescript
public readonly keywords: string[];
```
- *Type:* string[]
Keywords to include in `package.json`.
---
##### `license`Optional
```typescript
public readonly license: string;
```
- *Type:* string
- *Default:* "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the `licensed` option if you want to no license to be specified.
---
##### `licensed`Optional
```typescript
public readonly licensed: boolean;
```
- *Type:* boolean
- *Default:* true
Indicates if a license should be added.
---
##### `maxNodeVersion`Optional
```typescript
public readonly maxNodeVersion: string;
```
- *Type:* string
- *Default:* no maximum version is enforced
The maximum node version supported by this package. Most projects should not use this option.
The value indicates that the package is incompatible with any newer versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option.
Consider this option only if your package is known to not function with newer versions of node.
---
##### `minNodeVersion`Optional
```typescript
public readonly minNodeVersion: string;
```
- *Type:* string
- *Default:* no minimum version is enforced
The minimum node version required by this package to function. Most projects should not use this option.
The value indicates that the package is incompatible with any older versions of node.
This requirement is enforced via the engines field.
You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
Setting this option has very high impact on the consumers of your package,
as package managers will actively prevent usage with node versions you have marked as incompatible.
To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
---
##### `npmAccess`Optional
```typescript
public readonly npmAccess: NpmAccess;
```
- *Type:* projen.javascript.NpmAccess
- *Default:* for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
Access level of the npm package.
---
##### `npmProvenance`Optional
```typescript
public readonly npmProvenance: boolean;
```
- *Type:* boolean
- *Default:* true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and
you will need to use a supported CI/CD provider.
Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
> [https://docs.npmjs.com/generating-provenance-statements](https://docs.npmjs.com/generating-provenance-statements)
---
##### `npmRegistryUrl`Optional
```typescript
public readonly npmRegistryUrl: string;
```
- *Type:* string
- *Default:* "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
---
##### `npmTokenSecret`Optional
```typescript
public readonly npmTokenSecret: string;
```
- *Type:* string
- *Default:* "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
---
##### `npmTrustedPublishing`Optional
```typescript
public readonly npmTrustedPublishing: boolean;
```
- *Type:* boolean
- *Default:* false
Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
---
##### `packageManager`Optional
```typescript
public readonly packageManager: NodePackageManager;
```
- *Type:* projen.javascript.NodePackageManager
- *Default:* Detected from the calling process or `YARN_CLASSIC` if detection fails.
The Node Package Manager used to execute scripts.
---
##### `packageName`Optional
```typescript
public readonly packageName: string;
```
- *Type:* string
- *Default:* defaults to project name
The "name" in package.json.
---
##### `peerDependencyOptions`Optional
```typescript
public readonly peerDependencyOptions: PeerDependencyOptions;
```
- *Type:* projen.javascript.PeerDependencyOptions
Options for `peerDeps`.
---
##### `peerDeps`Optional
```typescript
public readonly peerDeps: string[];
```
- *Type:* string[]
- *Default:* []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the _consumer_ of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the `node_modules` tree of your consumers.
Note that prior to npm@7, peer dependencies are _not_ automatically
installed, which means that adding peer dependencies to a library will be a
breaking change for your customers.
Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
---
##### `pnpmOptions`Optional
```typescript
public readonly pnpmOptions: PnpmOptions;
```
- *Type:* projen.javascript.PnpmOptions
- *Default:* all default options
Options for pnpm.
---
##### `pnpmVersion`Optional
```typescript
public readonly pnpmVersion: string;
```
- *Type:* string
- *Default:* "10.33.0"
The version of PNPM to use if using PNPM as a package manager.
---
##### `repository`Optional
```typescript
public readonly repository: string;
```
- *Type:* string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
---
##### `repositoryDirectory`Optional
```typescript
public readonly repositoryDirectory: string;
```
- *Type:* string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
---
##### `scopedPackagesOptions`Optional
```typescript
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
```
- *Type:* projen.javascript.ScopedPackagesOptions[]
- *Default:* fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
---
##### `stability`Optional
```typescript
public readonly stability: string;
```
- *Type:* string
Package's Stability.
---
##### `yarnBerryOptions`Optional
```typescript
public readonly yarnBerryOptions: YarnBerryOptions;
```
- *Type:* projen.javascript.YarnBerryOptions
- *Default:* Yarn Berry v4 with all default options
Options for Yarn Berry.
---
##### `bumpPackage`Optional
```typescript
public readonly bumpPackage: string;
```
- *Type:* string
- *Default:* A recent version of "commit-and-tag-version"
The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
This can be any compatible package version, including the deprecated `standard-version@9`.
---
##### `jsiiReleaseVersion`Optional
```typescript
public readonly jsiiReleaseVersion: string;
```
- *Type:* string
- *Default:* "latest"
Version requirement of `publib` which is used to publish modules to npm.
---
##### `majorVersion`Optional
```typescript
public readonly majorVersion: number;
```
- *Type:* number
- *Default:* Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line.
If not specified, we bump the global latest version.
---
##### `minMajorVersion`Optional
```typescript
public readonly minMajorVersion: number;
```
- *Type:* number
- *Default:* No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major
release are not incrementing the major version number.
Can not be set together with `majorVersion`.
---
##### `nextVersionCommand`Optional
```typescript
public readonly nextVersionCommand: string;
```
- *Type:* string
- *Default:* The next version will be determined based on the commit history and project settings.
A shell command to control the next version to release.
If present, this shell command will be run before the bump is executed, and
it determines what version to release. It will be executed in the following
environment:
- Working directory: the project directory.
- `$VERSION`: the current version. Looks like `1.2.3`.
- `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
- `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
The command should print one of the following to `stdout`:
- Nothing: the next version number will be determined based on commit history.
- `x.y.z`: the next version number will be `x.y.z`.
- `major|minor|patch`: the next version number will be the current version number
with the indicated component bumped.
This setting cannot be specified together with `minMajorVersion`; the invoked
script can be used to achieve the effects of `minMajorVersion`.
---
##### `npmDistTag`Optional
```typescript
public readonly npmDistTag: string;
```
- *Type:* string
- *Default:* "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the `npmDistTag` property
for each branch.
---
##### `postBuildSteps`Optional
```typescript
public readonly postBuildSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* []
Steps to execute after build as part of the release workflow.
---
##### `prerelease`Optional
```typescript
public readonly prerelease: string;
```
- *Type:* string
- *Default:* normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
---
##### `publishDryRun`Optional
```typescript
public readonly publishDryRun: boolean;
```
- *Type:* boolean
- *Default:* false
Instead of actually publishing to package managers, just print the publishing command.
---
##### `publishTasks`Optional
```typescript
public readonly publishTasks: boolean;
```
- *Type:* boolean
- *Default:* false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this
in order to create a publishing task for each publishing activity.
---
##### `releasableCommits`Optional
```typescript
public readonly releasableCommits: ReleasableCommits;
```
- *Type:* projen.ReleasableCommits
- *Default:* ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
---
##### `releaseBranches`Optional
```typescript
public readonly releaseBranches: {[ key: string ]: BranchOptions};
```
- *Type:* {[ key: string ]: projen.release.BranchOptions}
- *Default:* no additional branches are used for release. you can use `addBranch()` to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch _must_ be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the `majorVersion` field must also
be provided for the default branch.
---
##### `releaseEnvironment`Optional
```typescript
public readonly releaseEnvironment: string;
```
- *Type:* string
- *Default:* no environment used, unless set at the artifact level
The GitHub Actions environment used for the release.
This can be used to add an explicit approval step to the release
or limit who can initiate a release through environment protection rules.
When multiple artifacts are released, the environment can be overwritten
on a per artifact basis.
---
##### `releaseFailureIssue`Optional
```typescript
public readonly releaseFailureIssue: boolean;
```
- *Type:* boolean
- *Default:* false
Create a github issue on every failed publishing task.
---
##### `releaseFailureIssueLabel`Optional
```typescript
public readonly releaseFailureIssueLabel: string;
```
- *Type:* string
- *Default:* "failed-release"
The label to apply to issues indicating publish failures.
Only applies if `releaseFailureIssue` is true.
---
##### `releaseTagPrefix`Optional
```typescript
public readonly releaseTagPrefix: string;
```
- *Type:* string
- *Default:* "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version
when bumping, so if you change this on a project with an existing version
history, you may need to manually tag your latest release
with the new prefix.
---
##### `releaseTrigger`Optional
```typescript
public readonly releaseTrigger: ReleaseTrigger;
```
- *Type:* projen.release.ReleaseTrigger
- *Default:* Continuous releases (`ReleaseTrigger.continuous()`)
The release trigger to use.
---
##### `releaseWorkflowEnv`Optional
```typescript
public readonly releaseWorkflowEnv: {[ key: string ]: string};
```
- *Type:* {[ key: string ]: string}
- *Default:* {}
Build environment variables for release workflows.
---
##### `releaseWorkflowName`Optional
```typescript
public readonly releaseWorkflowName: string;
```
- *Type:* string
- *Default:* "release"
The name of the default release workflow.
---
##### `releaseWorkflowSetupSteps`Optional
```typescript
public readonly releaseWorkflowSetupSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
---
##### `versionrcOptions`Optional
```typescript
public readonly versionrcOptions: {[ key: string ]: any};
```
- *Type:* {[ key: string ]: any}
- *Default:* standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with commit-and-tag-version package.
Given values either append to default configuration or overwrite values in it.
---
##### `workflowContainerImage`Optional
```typescript
public readonly workflowContainerImage: string;
```
- *Type:* string
- *Default:* default image
Container image to use for GitHub workflows.
---
##### `workflowRunsOn`Optional
```typescript
public readonly workflowRunsOn: string[];
```
- *Type:* string[]
- *Default:* ["ubuntu-latest"]
Github Runner selection labels.
---
##### `workflowRunsOnGroup`Optional
```typescript
public readonly workflowRunsOnGroup: GroupRunnerOptions;
```
- *Type:* projen.GroupRunnerOptions
Github Runner Group selection options.
---
##### `artifactsDirectory`Optional
```typescript
public readonly artifactsDirectory: string;
```
- *Type:* string
- *Default:* "dist"
A directory which will contain build artifacts.
---
##### `auditDeps`Optional
```typescript
public readonly auditDeps: boolean;
```
- *Type:* boolean
- *Default:* false
Run security audit on dependencies.
When enabled, creates an "audit" task that checks for known security vulnerabilities
in dependencies. By default, runs during every build and checks for "high" severity
vulnerabilities or above in all dependencies (including dev dependencies).
---
##### `auditDepsOptions`Optional
```typescript
public readonly auditDepsOptions: AuditOptions;
```
- *Type:* projen.javascript.AuditOptions
- *Default:* default options
Security audit options.
---
##### `autoApproveUpgrades`Optional
```typescript
public readonly autoApproveUpgrades: boolean;
```
- *Type:* boolean
- *Default:* true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured).
Throw if set to true but `autoApproveOptions` are not defined.
---
##### `biome`Optional
```typescript
public readonly biome: boolean;
```
- *Type:* boolean
- *Default:* false
Setup Biome.
---
##### `biomeOptions`Optional
```typescript
public readonly biomeOptions: BiomeOptions;
```
- *Type:* projen.javascript.BiomeOptions
- *Default:* default options
Biome options.
---
##### `buildWorkflow`Optional
```typescript
public readonly buildWorkflow: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Define a GitHub workflow for building PRs.
---
##### `buildWorkflowOptions`Optional
```typescript
public readonly buildWorkflowOptions: BuildWorkflowOptions;
```
- *Type:* projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
---
##### `bundlerOptions`Optional
```typescript
public readonly bundlerOptions: BundlerOptions;
```
- *Type:* projen.javascript.BundlerOptions
Options for `Bundler`.
---
##### `checkLicenses`Optional
```typescript
public readonly checkLicenses: LicenseCheckerOptions;
```
- *Type:* projen.javascript.LicenseCheckerOptions
- *Default:* no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
---
##### `codeCov`Optional
```typescript
public readonly codeCov: boolean;
```
- *Type:* boolean
- *Default:* false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
---
##### `codeCovTokenSecret`Optional
```typescript
public readonly codeCovTokenSecret: string;
```
- *Type:* string
- *Default:* OIDC auth is used
Define the secret name for a specified https://codecov.io/ token.
---
##### `copyrightOwner`Optional
```typescript
public readonly copyrightOwner: string;
```
- *Type:* string
- *Default:* defaults to the value of authorName or "" if `authorName` is undefined.
License copyright owner.
This value is only used if the selected license text contains the
`$copyright_owner` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `copyrightPeriod`Optional
```typescript
public readonly copyrightPeriod: string;
```
- *Type:* string
- *Default:* current year
The copyright years to put in the LICENSE file.
This value is only used if the selected license text contains the
`$copyright_period` placeholder. For example, it has no effect on the
MPL-2.0 license text.
---
##### `defaultReleaseBranch`Optional
```typescript
public readonly defaultReleaseBranch: string;
```
- *Type:* string
- *Default:* "main"
The name of the main release branch.
---
##### `dependabot`Optional
```typescript
public readonly dependabot: boolean;
```
- *Type:* boolean
- *Default:* false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with `depsUpgrade`.
---
##### `dependabotOptions`Optional
```typescript
public readonly dependabotOptions: DependabotOptions;
```
- *Type:* projen.github.DependabotOptions
- *Default:* default options
Options for dependabot.
---
##### `depsUpgrade`Optional
```typescript
public readonly depsUpgrade: boolean;
```
- *Type:* boolean
- *Default:* `true` for root projects, `false` for subprojects
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with `dependabot`.
---
##### `depsUpgradeOptions`Optional
```typescript
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
```
- *Type:* projen.javascript.UpgradeDependenciesOptions
- *Default:* default options
Options for `UpgradeDependencies`.
---
##### `gitignore`Optional
```typescript
public readonly gitignore: string[];
```
- *Type:* string[]
Additional entries to .gitignore.
---
##### `jest`Optional
```typescript
public readonly jest: boolean;
```
- *Type:* boolean
- *Default:* true
Setup jest unit tests.
---
##### `jestOptions`Optional
```typescript
public readonly jestOptions: JestOptions;
```
- *Type:* projen.javascript.JestOptions
- *Default:* default options
Jest options.
---
##### `npmignoreEnabled`Optional
```typescript
public readonly npmignoreEnabled: boolean;
```
- *Type:* boolean
- *Default:* true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
---
##### `npmIgnoreOptions`Optional
```typescript
public readonly npmIgnoreOptions: IgnoreFileOptions;
```
- *Type:* projen.IgnoreFileOptions
Configuration options for .npmignore file.
---
##### `package`Optional
```typescript
public readonly package: boolean;
```
- *Type:* boolean
- *Default:* true
Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
---
##### `prettier`Optional
```typescript
public readonly prettier: boolean;
```
- *Type:* boolean
- *Default:* false
Setup prettier.
---
##### `prettierOptions`Optional
```typescript
public readonly prettierOptions: PrettierOptions;
```
- *Type:* projen.javascript.PrettierOptions
- *Default:* default options
Prettier options.
---
##### `projenDevDependency`Optional
```typescript
public readonly projenDevDependency: boolean;
```
- *Type:* boolean
- *Default:* true if not a subproject
Indicates of "projen" should be installed as a devDependency.
---
##### `projenrcJs`Optional
```typescript
public readonly projenrcJs: boolean;
```
- *Type:* boolean
- *Default:* true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
---
##### `projenrcJsOptions`Optional
```typescript
public readonly projenrcJsOptions: ProjenrcOptions;
```
- *Type:* projen.javascript.ProjenrcOptions
- *Default:* default options
Options for .projenrc.js.
---
##### `projenVersion`Optional
```typescript
public readonly projenVersion: string;
```
- *Type:* string
- *Default:* Defaults to the latest version.
Version of projen to install.
---
##### `pullRequestTemplate`Optional
```typescript
public readonly pullRequestTemplate: boolean;
```
- *Type:* boolean
- *Default:* true
Include a GitHub pull request template.
---
##### `pullRequestTemplateContents`Optional
```typescript
public readonly pullRequestTemplateContents: string[];
```
- *Type:* string[]
- *Default:* default content
The contents of the pull request template.
---
##### `release`Optional
```typescript
public readonly release: boolean;
```
- *Type:* boolean
- *Default:* true (false for subprojects)
Add release management to this project.
---
##### `releaseToNpm`Optional
```typescript
public readonly releaseToNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Automatically release to npm when new versions are introduced.
---
##### `workflowBootstrapSteps`Optional
```typescript
public readonly workflowBootstrapSteps: JobStep[];
```
- *Type:* projen.github.workflows.JobStep[]
- *Default:* "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
---
##### `workflowGitIdentity`Optional
```typescript
public readonly workflowGitIdentity: GitIdentity;
```
- *Type:* projen.github.GitIdentity
- *Default:* default GitHub Actions user
The git identity to use in workflows.
---
##### `workflowNodeVersion`Optional
```typescript
public readonly workflowNodeVersion: string;
```
- *Type:* string
- *Default:* `minNodeVersion` if set, otherwise `lts/*`.
The node version used in GitHub Actions workflows.
Always use this option if your GitHub Actions workflows require a specific to run.
---
##### `workflowPackageCache`Optional
```typescript
public readonly workflowPackageCache: boolean;
```
- *Type:* boolean
- *Default:* false
Enable Node.js package cache in GitHub workflows.
---
##### `disableTsconfig`Optional
```typescript
public readonly disableTsconfig: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
---
##### `disableTsconfigDev`Optional
```typescript
public readonly disableTsconfigDev: boolean;
```
- *Type:* boolean
- *Default:* false
Do not generate a development tsconfig file.
---
##### `docgen`Optional
```typescript
public readonly docgen: boolean;
```
- *Type:* boolean
- *Default:* false
Docgen by Typedoc.
---
##### `docsDirectory`Optional
```typescript
public readonly docsDirectory: string;
```
- *Type:* string
- *Default:* "docs"
Docs directory.
---
##### `entrypointTypes`Optional
```typescript
public readonly entrypointTypes: string;
```
- *Type:* string
- *Default:* .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
---
##### `eslint`Optional
```typescript
public readonly eslint: boolean;
```
- *Type:* boolean
- *Default:* true, unless biome is enabled
Setup eslint.
---
##### `eslintOptions`Optional
```typescript
public readonly eslintOptions: EslintOptions;
```
- *Type:* projen.javascript.EslintOptions
- *Default:* opinionated default options
Eslint options.
---
##### `libdir`Optional
```typescript
public readonly libdir: string;
```
- *Type:* string
- *Default:* "lib"
Typescript artifacts output directory.
---
##### `projenrcTs`Optional
```typescript
public readonly projenrcTs: boolean;
```
- *Type:* boolean
- *Default:* false
Use TypeScript for your projenrc file (`.projenrc.ts`).
---
##### `projenrcTsOptions`Optional
```typescript
public readonly projenrcTsOptions: ProjenrcOptions;
```
- *Type:* projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
---
##### `runner`Optional
```typescript
public readonly runner: TypeScriptRunner;
```
- *Type:* projen.typescript.TypeScriptRunner
- *Default:* TypeScriptRunner.tsNode()
The TypeScript runner to use for executing TypeScript files.
This is a project-level setting that components (e.g. projenrc) will
use as their default runner.
---
##### `sampleCode`Optional
```typescript
public readonly sampleCode: boolean;
```
- *Type:* boolean
- *Default:* true
Generate one-time sample in `src/` and `test/` if there are no files there.
---
##### `srcdir`Optional
```typescript
public readonly srcdir: string;
```
- *Type:* string
- *Default:* "src"
Typescript sources directory.
---
##### `testdir`Optional
```typescript
public readonly testdir: string;
```
- *Type:* string
- *Default:* "test"
Jest tests directory. Tests files should be named `xxx.test.ts`.
If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
then tests are going to be compiled into `lib/` and executed as javascript.
If the test directory is outside of `src`, then we configure jest to
compile the code in-memory.
---
##### `tsconfig`Optional
```typescript
public readonly tsconfig: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* default options
Custom TSConfig.
---
##### `tsconfigDev`Optional
```typescript
public readonly tsconfigDev: TypescriptConfigOptions;
```
- *Type:* projen.javascript.TypescriptConfigOptions
- *Default:* use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
---
##### `tsconfigDevFile`Optional
```typescript
public readonly tsconfigDevFile: string;
```
- *Type:* string
- *Default:* "{testdir}/tsconfig.json"
The name (and path) of the development tsconfig file.
By default this lives inside the test directory (e.g. `test/tsconfig.json`)
so that the TypeScript language service resolves it as the nearest config
for test files.
---
##### `tsJestOptions`Optional
```typescript
public readonly tsJestOptions: TsJestOptions;
```
- *Type:* projen.typescript.TsJestOptions
Options for ts-jest.
---
##### `typescriptVersion`Optional
```typescript
public readonly typescriptVersion: string;
```
- *Type:* string
- *Default:* "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
---
##### `privateNpm`Optional
```typescript
public readonly privateNpm: boolean;
```
- *Type:* boolean
- *Default:* false
Whether to enable private NPM registry authentication.
---
##### `privateNpmTokenEnvVar`Optional
```typescript
public readonly privateNpmTokenEnvVar: string;
```
- *Type:* string
- *Default:* 'NPM_TOKEN'
The environment variable name containing the NPM authentication token.
---
## Enums
### MonorepoAmplifyFramework
The frontend framework an Amplify Hosting application is built with.
Selects sensible defaults for the build command, artifact directory and
cache paths in the generated `amplify.yml`.
#### Members
| **Name** | **Description** |
| --- | --- |
| NEXTJS | A Next.js app — artifacts in `/.next`, built via `run build`. |
| ANGULAR | An Angular app — artifacts in `/dist//browser`, built via `run build:${BUILD_ENV}`. |
---
##### `NEXTJS`
A Next.js app — artifacts in `/.next`, built via `run build`.
---
##### `ANGULAR`
An Angular app — artifacts in `/dist//browser`, built via `run build:${BUILD_ENV}`.
---