@ncfour-us/projen-utils / TypeScriptESMProjectOptions
Interface: TypeScriptESMProjectOptions
Options for TypeScriptESMProject
Extends
TypeScriptProjectOptions
Properties
addPackageManagerToDevEngines?
readonlyoptionaladdPackageManagerToDevEngines?:boolean
Automatically add the resolved packageManager to devEngines.packageManager
in package.json, setting onFail to ignore.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.addPackageManagerToDevEngines
addVersionFile?
readonlyoptionaladdVersionFile?:boolean
Add a version.ts file which contains a LIB_VERSION global.
The LIB_VERSION value is set based on the version field in package.json.
Default
false
allowLibraryDependencies?
readonlyoptionalallowLibraryDependencies?:boolean
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there’s no meaning
for specifying these.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.allowLibraryDependencies
apiDocumentation?
readonlyoptionalapiDocumentation?:boolean
Add API documentation to docs/api using typedoc
Default
false
apiEntryPoints?
readonlyoptionalapiEntryPoints?:string[]
API entry points for typedoc to use
Default
undefined if not specified, then information in package.json
will be used by typedoc to determine what entry points to include
in the documentation.
artifactsDirectory?
readonlyoptionalartifactsDirectory?:string
A directory which will contain build artifacts.
Default
"dist"
Inherited from
typescript.TypeScriptProjectOptions.artifactsDirectory
auditDeps?
readonlyoptionalauditDeps?:boolean
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).
Default
false
Inherited from
typescript.TypeScriptProjectOptions.auditDeps
auditDepsOptions?
readonlyoptionalauditDepsOptions?:AuditOptions
Security audit options.
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.auditDepsOptions
authorEmail?
readonlyoptionalauthorEmail?:string
Author’s e-mail
Inherited from
typescript.TypeScriptProjectOptions.authorEmail
authorName?
readonlyoptionalauthorName?:string
Author’s name
Inherited from
typescript.TypeScriptProjectOptions.authorName
authorOrganization?
readonlyoptionalauthorOrganization?:boolean
Is the author an organization
Inherited from
typescript.TypeScriptProjectOptions.authorOrganization
authorUrl?
readonlyoptionalauthorUrl?:string
Author’s URL / Website
Inherited from
typescript.TypeScriptProjectOptions.authorUrl
autoApproveOptions?
readonlyoptionalautoApproveOptions?:AutoApproveOptions
Enable and configure the ‘auto approve’ workflow.
Default
- auto approve is disabled
Inherited from
typescript.TypeScriptProjectOptions.autoApproveOptions
autoApproveUpgrades?
readonlyoptionalautoApproveUpgrades?:boolean
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configured).
Throw if set to true but autoApproveOptions are not defined.
Default
- true
Inherited from
typescript.TypeScriptProjectOptions.autoApproveUpgrades
autoDetectBin?
readonlyoptionalautoDetectBin?:boolean
Automatically add all executables under the bin directory to your
package.json file under the bin section.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.autoDetectBin
autoMerge?
readonlyoptionalautoMerge?:boolean
Enable automatic merging on GitHub. Has no effect if github.mergify
is set to false.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.autoMerge
autoMergeOptions?
readonlyoptionalautoMergeOptions?:AutoMergeOptions
Configure options for automatic merging on GitHub. Has no effect if
github.mergify or autoMerge is set to false.
Default
- see defaults in
AutoMergeOptions
Inherited from
typescript.TypeScriptProjectOptions.autoMergeOptions
bin?
readonlyoptionalbin?:Record<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.
Inherited from
typescript.TypeScriptProjectOptions.bin
biome?
readonlyoptionalbiome?:boolean
Setup Biome.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.biome
biomeOptions?
readonlyoptionalbiomeOptions?:BiomeOptions
Biome options
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.biomeOptions
bugsEmail?
readonlyoptionalbugsEmail?:string
The email address to which issues should be reported.
Inherited from
typescript.TypeScriptProjectOptions.bugsEmail
bugsUrl?
readonlyoptionalbugsUrl?:string
The url to your project’s issue tracker.
Inherited from
typescript.TypeScriptProjectOptions.bugsUrl
buildTagTask?
readonlyoptionalbuildTagTask?:boolean
Add a build:tag task to the set of tasks for the project.
The build:tag task requires a single argument which MUST
match an existing tag (released version) in the git repository.
This task runs only in “local” (non-CI) environments.
Example for running the task (assumes tag/release v0.0.4 exists):
pnpm build:tag v0.0.4
Default
false
buildWorkflow?
readonlyoptionalbuildWorkflow?:boolean
Define a GitHub workflow for building PRs.
Default
- true if not a subproject
Inherited from
typescript.TypeScriptProjectOptions.buildWorkflow
buildWorkflowOptions?
readonlyoptionalbuildWorkflowOptions?:BuildWorkflowOptions
Options for PR build workflow.
Inherited from
typescript.TypeScriptProjectOptions.buildWorkflowOptions
buildWorkflowTriggers?
readonlyoptionalbuildWorkflowTriggers?:Triggers
Build workflow triggers
Default
"{ pullRequest: {}, workflowDispatch: {} }"
Deprecated
- Use
buildWorkflowOptions.workflowTriggers
Inherited from
typescript.TypeScriptProjectOptions.buildWorkflowTriggers
bumpPackage?
readonlyoptionalbumpPackage?:string
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.
Default
- A recent version of "commit-and-tag-version"
Inherited from
typescript.TypeScriptProjectOptions.bumpPackage
bundledDeps?
readonlyoptionalbundledDeps?: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.
Inherited from
typescript.TypeScriptProjectOptions.bundledDeps
bundlerOptions?
readonlyoptionalbundlerOptions?:BundlerOptions
Options for Bundler.
Inherited from
typescript.TypeScriptProjectOptions.bundlerOptions
bunVersion?
readonlyoptionalbunVersion?:string
The version of Bun to use if using Bun as a package manager.
Default
"latest"
Inherited from
typescript.TypeScriptProjectOptions.bunVersion
checkLicenses?
readonlyoptionalcheckLicenses?:LicenseCheckerOptions
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.
Default
- no license checks are run during the build and all licenses will be accepted
Inherited from
typescript.TypeScriptProjectOptions.checkLicenses
clobber?
readonlyoptionalclobber?:boolean
Add a clobber task which resets the repo to origin.
Default
- true, but false for subprojects
Inherited from
typescript.TypeScriptProjectOptions.clobber
codeArtifactOptions?
readonlyoptionalcodeArtifactOptions?:CodeArtifactOptions
Options for npm packages using AWS CodeArtifact. This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
Default
- undefined
Inherited from
typescript.TypeScriptProjectOptions.codeArtifactOptions
codeCov?
readonlyoptionalcodeCov?: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.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.codeCov
codeCovTokenSecret?
readonlyoptionalcodeCovTokenSecret?:string
Define the secret name for a specified https://codecov.io/ token
Default
- OIDC auth is used
Inherited from
typescript.TypeScriptProjectOptions.codeCovTokenSecret
commands?
readonlyoptionalcommands?:CommandParameters[]
Additional commands (scripts) to add to the package.json file.
Default
[]
commitGenerated?
readonlyoptionalcommitGenerated?:boolean
Whether to commit the managed files by default.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.commitGenerated
copyrightOwner?
readonlyoptionalcopyrightOwner?:string
License copyright owner.
Default
- defaults to the value of authorName or “” if
authorNameis undefined.
Inherited from
typescript.TypeScriptProjectOptions.copyrightOwner
copyrightPeriod?
readonlyoptionalcopyrightPeriod?:string
The copyright years to put in the LICENSE file.
Default
- current year
Inherited from
typescript.TypeScriptProjectOptions.copyrightPeriod
defaultReleaseBranch
readonlydefaultReleaseBranch:string
The name of the main release branch.
Default
"main"
Inherited from
typescript.TypeScriptProjectOptions.defaultReleaseBranch
deleteOrphanedLockFiles?
readonlyoptionaldeleteOrphanedLockFiles?:boolean
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.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.deleteOrphanedLockFiles
dependabot?
readonlyoptionaldependabot?:boolean
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.dependabot
dependabotOptions?
readonlyoptionaldependabotOptions?:DependabotOptions
Options for dependabot.
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.dependabotOptions
deps?
readonlyoptionaldeps?:string[]
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
[ 'express', 'lodash', 'foo@^2' ]
Default
[]
Featured
Inherited from
typescript.TypeScriptProjectOptions.deps
depsUpgrade?
readonlyoptionaldepsUpgrade?:boolean
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
Default
truefor root projects,falsefor subprojects
Inherited from
typescript.TypeScriptProjectOptions.depsUpgrade
depsUpgradeOptions?
readonlyoptionaldepsUpgradeOptions?:UpgradeDependenciesOptions
Options for UpgradeDependencies.
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.depsUpgradeOptions
description?
readonlyoptionaldescription?: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
Featured
Inherited from
typescript.TypeScriptProjectOptions.description
devContainer?
readonlyoptionaldevContainer?:boolean
Add a VSCode development environment (used for GitHub Codespaces)
Default
false
Inherited from
typescript.TypeScriptProjectOptions.devContainer
devDeps?
readonlyoptionaldevDeps?:string[]
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', '@types/express' ]
Default
[]
Featured
Inherited from
typescript.TypeScriptProjectOptions.devDeps
devEngines?
readonlyoptionaldevEngines?: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.
See
https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines
Inherited from
typescript.TypeScriptProjectOptions.devEngines
disableTsconfig?
readonlyoptionaldisableTsconfig?:boolean
Do not generate a tsconfig.json file (used by jsii projects since
tsconfig.json is generated by the jsii compiler).
Default
false
Inherited from
typescript.TypeScriptProjectOptions.disableTsconfig
disableTsconfigDev?
readonlyoptionaldisableTsconfigDev?:boolean
Do not generate a tsconfig.dev.json file.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.disableTsconfigDev
docgen?
readonlyoptionaldocgen?:boolean
Docgen by Typedoc
Default
false
Inherited from
typescript.TypeScriptProjectOptions.docgen
docsDirectory?
readonlyoptionaldocsDirectory?:string
Docs directory
Default
"docs"
Inherited from
typescript.TypeScriptProjectOptions.docsDirectory
docsIndex?
readonlyoptionaldocsIndex?:boolean
Add a docs/index.md file to the project as a sample file
Default
false
entrypoint?
readonlyoptionalentrypoint?:string
Module entrypoint (main in package.json)
Set to an empty string to not include main in your package.json
Default
"lib/index.js"
Inherited from
typescript.TypeScriptProjectOptions.entrypoint
entrypointTypes?
readonlyoptionalentrypointTypes?:string
The .d.ts file that includes the type declarations for this module.
Default
- .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
Inherited from
typescript.TypeScriptProjectOptions.entrypointTypes
eslint?
readonlyoptionaleslint?:boolean
Setup eslint.
Default
- true, unless biome is enabled
Inherited from
typescript.TypeScriptProjectOptions.eslint
eslintFlatConfig?
readonlyoptionaleslintFlatConfig?:boolean
Use eslint.config.ts instead of .eslintrc.json for eslint config
Default
false
eslintOptions?
readonlyoptionaleslintOptions?:EslintOptions
Eslint options
Default
- opinionated default options
Inherited from
typescript.TypeScriptProjectOptions.eslintOptions
github?
readonlyoptionalgithub?:boolean
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.github
githubOptions?
readonlyoptionalgithubOptions?:GitHubOptions
Options for GitHub integration
Default
- see GitHubOptions
Inherited from
typescript.TypeScriptProjectOptions.githubOptions
gitignore?
readonlyoptionalgitignore?:string[]
Additional entries to .gitignore
Inherited from
typescript.TypeScriptProjectOptions.gitignore
gitIgnoreOptions?
readonlyoptionalgitIgnoreOptions?:IgnoreFileOptions
Configuration options for .gitignore file
Inherited from
typescript.TypeScriptProjectOptions.gitIgnoreOptions
gitOptions?
readonlyoptionalgitOptions?:GitOptions
Configuration options for git
Inherited from
typescript.TypeScriptProjectOptions.gitOptions
gitpod?
readonlyoptionalgitpod?:boolean
Add a Gitpod development environment
Default
false
Inherited from
typescript.TypeScriptProjectOptions.gitpod
homepage?
readonlyoptionalhomepage?:string
Package’s Homepage / Website
Inherited from
typescript.TypeScriptProjectOptions.homepage
jest?
readonlyoptionaljest?:boolean
Setup jest unit tests
Default
true
Inherited from
typescript.TypeScriptProjectOptions.jest
jestOptions?
readonlyoptionaljestOptions?:JestOptions
Jest options
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.jestOptions
jsiiReleaseVersion?
readonlyoptionaljsiiReleaseVersion?:string
Version requirement of publib which is used to publish modules to npm.
Default
"latest"
Inherited from
typescript.TypeScriptProjectOptions.jsiiReleaseVersion
keywords?
readonlyoptionalkeywords?:string[]
Keywords to include in package.json.
Inherited from
typescript.TypeScriptProjectOptions.keywords
libdir?
readonlyoptionallibdir?:string
Typescript artifacts output directory
Default
"lib"
Inherited from
typescript.TypeScriptProjectOptions.libdir
license?
readonlyoptionallicense?:string
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.
Default
"Apache-2.0"
Inherited from
typescript.TypeScriptProjectOptions.license
licensed?
readonlyoptionallicensed?:boolean
Indicates if a license should be added.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.licensed
localPackageArchiveDir?
readonlyoptionallocalPackageArchiveDir?:string
Location for local archive of released artifacts.
Used only when repoBuildPackageModel is set to
RepoBuildPackageModel.LOCAL_DEV_BUILD_REGISTRY`.
Default
~/.local-build-packages
Featured
logging?
readonlyoptionallogging?:LoggerOptions
Configure logging options such as verbosity.
Default
{}
Inherited from
typescript.TypeScriptProjectOptions.logging
majorVersion?
readonlyoptionalmajorVersion?:number
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.
Default
- Major version is not enforced.
Inherited from
typescript.TypeScriptProjectOptions.majorVersion
maxNodeVersion?
readonlyoptionalmaxNodeVersion?:string
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.
Default
- no maximum version is enforced
Inherited from
typescript.TypeScriptProjectOptions.maxNodeVersion
mergify?
readonlyoptionalmergify?:boolean
Whether mergify should be enabled on this repository or not.
Default
true
Deprecated
use githubOptions.mergify instead
Inherited from
typescript.TypeScriptProjectOptions.mergify
mergifyOptions?
readonlyoptionalmergifyOptions?:MergifyOptions
Options for mergify
Default
- default options
Deprecated
use githubOptions.mergifyOptions instead
Inherited from
typescript.TypeScriptProjectOptions.mergifyOptions
minMajorVersion?
readonlyoptionalminMajorVersion?:number
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.
Default
- No minimum version is being enforced
Inherited from
typescript.TypeScriptProjectOptions.minMajorVersion
minNodeVersion?
readonlyoptionalminNodeVersion?:string
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.
Default
- no minimum version is enforced
Inherited from
typescript.TypeScriptProjectOptions.minNodeVersion
mutableBuild?
readonlyoptionalmutableBuild?:boolean
Automatically update files modified during builds to pull-request branches. This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
Default
true
Deprecated
- Use
buildWorkflowOptions.mutableBuild
Inherited from
typescript.TypeScriptProjectOptions.mutableBuild
name
readonlyname:string
This is the name of your project.
Default
$BASEDIR
Featured
Inherited from
typescript.TypeScriptProjectOptions.name
nextVersionCommand?
readonlyoptionalnextVersionCommand?:string
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 like1.2.3.$LATEST_TAG: the most recent tag. Looks likeprefix-v1.2.3, or may be unset.$SUGGESTED_BUMP: the suggested bump action based on commits. One ofmajor|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 bex.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.
Default
- The next version will be determined based on the commit history and project settings.
Inherited from
typescript.TypeScriptProjectOptions.nextVersionCommand
npmAccess?
readonlyoptionalnpmAccess?:NpmAccess
Access level of the npm package.
Default
- for scoped packages (e.g.
foo@bar), the default isNpmAccess.RESTRICTED, for non-scoped packages, the default isNpmAccess.PUBLIC.
Inherited from
typescript.TypeScriptProjectOptions.npmAccess
npmDistTag?
readonlyoptionalnpmDistTag?:string
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.
Default
"latest"
Inherited from
typescript.TypeScriptProjectOptions.npmDistTag
npmignore?
readonlyoptionalnpmignore?:string[]
Additional entries to .npmignore.
Deprecated
- use
project.addPackageIgnore
Inherited from
typescript.TypeScriptProjectOptions.npmignore
npmignoreEnabled?
readonlyoptionalnpmignoreEnabled?:boolean
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.npmignoreEnabled
npmIgnoreOptions?
readonlyoptionalnpmIgnoreOptions?:IgnoreFileOptions
Configuration options for .npmignore file
Inherited from
typescript.TypeScriptProjectOptions.npmIgnoreOptions
npmProvenance?
readonlyoptionalnpmProvenance?:boolean
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.
See
https://docs.npmjs.com/generating-provenance-statements
Default
- true for public packages, false otherwise
Inherited from
typescript.TypeScriptProjectOptions.npmProvenance
npmRegistry?
readonlyoptionalnpmRegistry?:string
The host name of the npm registry to publish to. Cannot be set together with npmRegistryUrl.
Deprecated
use npmRegistryUrl instead
Inherited from
typescript.TypeScriptProjectOptions.npmRegistry
npmRegistryUrl?
readonlyoptionalnpmRegistryUrl?:string
The base URL of the npm package registry.
Must be a URL (e.g. start with “https://” or “http://”)
Default
"https://registry.npmjs.org"
Inherited from
typescript.TypeScriptProjectOptions.npmRegistryUrl
npmTokenSecret?
readonlyoptionalnpmTokenSecret?:string
GitHub secret which contains the NPM token to use when publishing packages.
Default
"NPM_TOKEN"
Inherited from
typescript.TypeScriptProjectOptions.npmTokenSecret
npmTrustedPublishing?
readonlyoptionalnpmTrustedPublishing?:boolean
Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
See
Default
- false
Inherited from
typescript.TypeScriptProjectOptions.npmTrustedPublishing
outdir?
readonlyoptionaloutdir?:string
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.
Default
"."
Inherited from
typescript.TypeScriptProjectOptions.outdir
package?
readonlyoptionalpackage?:boolean
Defines a package task that will produce an npm tarball under the
artifacts directory (e.g. dist).
Default
true
Inherited from
typescript.TypeScriptProjectOptions.package
packageManager?
readonlyoptionalpackageManager?:NodePackageManager
The Node Package Manager used to execute scripts
Default
- Detected from the calling process or
YARN_CLASSICif detection fails.
Pjnew
$PACKAGE_MANAGER
Inherited from
typescript.TypeScriptProjectOptions.packageManager
packageName?
readonlyoptionalpackageName?:string
The “name” in package.json
Default
- defaults to project name
Featured
Inherited from
typescript.TypeScriptProjectOptions.packageName
parent?
readonlyoptionalparent?:Project
The parent project, if this project is part of a bigger project.
Inherited from
typescript.TypeScriptProjectOptions.parent
peerDependencyOptions?
readonlyoptionalpeerDependencyOptions?:PeerDependencyOptions
Options for peerDeps.
Inherited from
typescript.TypeScriptProjectOptions.peerDependencyOptions
peerDeps?
readonlyoptionalpeerDeps?:string[]
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.
Default
[]
Inherited from
typescript.TypeScriptProjectOptions.peerDeps
pnpmVersion?
readonlyoptionalpnpmVersion?:string
The version of PNPM to use if using PNPM as a package manager.
Default
"10.33.0"
Inherited from
typescript.TypeScriptProjectOptions.pnpmVersion
postBuildSteps?
readonlyoptionalpostBuildSteps?:JobStep[]
Steps to execute after build as part of the release workflow.
Default
[]
Inherited from
typescript.TypeScriptProjectOptions.postBuildSteps
precommitConfig?
readonlyoptionalprecommitConfig?:boolean
Add a .pre-commit-config.yaml file to support use of pre-commit tool
Default
false
prerelease?
readonlyoptionalprerelease?:string
Bump versions from the default branch as pre-releases (e.g. “beta”, “alpha”, “pre”).
Default
- normal semantic versions
Inherited from
typescript.TypeScriptProjectOptions.prerelease
prettier?
readonlyoptionalprettier?:boolean
Setup prettier.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.prettier
prettierFlatConfig?
readonlyoptionalprettierFlatConfig?:boolean
Use prettier.config.ts instead of .prettierrc.json for eslint config
Default
false
prettierOptions?
readonlyoptionalprettierOptions?:PrettierOptions
Prettier options
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.prettierOptions
projectTree?
readonlyoptionalprojectTree?:boolean
Generate a project tree file (.projen/tree.json) that shows all
components and their relationships. Useful for understanding your
project structure and debugging.
Stability
experimental
Default
false
Inherited from
typescript.TypeScriptProjectOptions.projectTree
projectType?
readonlyoptionalprojectType?:ProjectType
Which type of project this is (library/app).
Default
ProjectType.UNKNOWN
Deprecated
no longer supported at the base project level
Inherited from
typescript.TypeScriptProjectOptions.projectType
projenCommand?
readonlyoptionalprojenCommand?:string
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
Default
"npx projen"
Inherited from
typescript.TypeScriptProjectOptions.projenCommand
projenCredentials?
readonlyoptionalprojenCredentials?:GithubCredentials
Choose a method of providing GitHub API access for projen workflows.
Default
- use a personal access token named PROJEN_GITHUB_TOKEN
Inherited from
typescript.TypeScriptProjectOptions.projenCredentials
projenDevDependency?
readonlyoptionalprojenDevDependency?:boolean
Indicates of “projen” should be installed as a devDependency.
Default
- true if not a subproject
Inherited from
typescript.TypeScriptProjectOptions.projenDevDependency
projenrcJs?
readonlyoptionalprojenrcJs?:boolean
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable
.projenrc.js generation.
Default
- true if projenrcJson is false
Inherited from
typescript.TypeScriptProjectOptions.projenrcJs
projenrcJson?
readonlyoptionalprojenrcJson?:boolean
Generate (once) .projenrc.json (in JSON). Set to false in order to disable
.projenrc.json generation.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.projenrcJson
projenrcJsonOptions?
readonlyoptionalprojenrcJsonOptions?:ProjenrcJsonOptions
Options for .projenrc.json
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.projenrcJsonOptions
projenrcJsOptions?
readonlyoptionalprojenrcJsOptions?:ProjenrcOptions
Options for .projenrc.js
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.projenrcJsOptions
projenrcTs?
readonlyoptionalprojenrcTs?:boolean
Use TypeScript for your projenrc file (.projenrc.ts).
Default
false
Pjnew
true
Inherited from
typescript.TypeScriptProjectOptions.projenrcTs
projenrcTsOptions?
readonlyoptionalprojenrcTsOptions?:ProjenrcOptions
Options for .projenrc.ts
Inherited from
typescript.TypeScriptProjectOptions.projenrcTsOptions
projenTokenSecret?
readonlyoptionalprojenTokenSecret?:string
The name of a secret which includes a GitHub Personal Access Token to be
used by projen workflows. This token needs to have the repo, workflows
and packages scope.
Default
"PROJEN_GITHUB_TOKEN"
Deprecated
use projenCredentials
Inherited from
typescript.TypeScriptProjectOptions.projenTokenSecret
projenVersion?
readonlyoptionalprojenVersion?:string
Version of projen to install.
Default
- Defaults to the latest version.
Inherited from
typescript.TypeScriptProjectOptions.projenVersion
publishDryRun?
readonlyoptionalpublishDryRun?:boolean
Instead of actually publishing to package managers, just print the publishing command.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.publishDryRun
publishTasks?
readonlyoptionalpublishTasks?:boolean
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.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.publishTasks
pullRequestTemplate?
readonlyoptionalpullRequestTemplate?:boolean
Include a GitHub pull request template.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.pullRequestTemplate
pullRequestTemplateContents?
readonlyoptionalpullRequestTemplateContents?:string[]
The contents of the pull request template.
Default
- default content
Inherited from
typescript.TypeScriptProjectOptions.pullRequestTemplateContents
readme?
readonlyoptionalreadme?:SampleReadmeProps
The README setup.
Default
- { filename: 'README.md', contents: '# replace this' }
Example
"{ filename: 'readme.md', contents: '# title' }"
Inherited from
typescript.TypeScriptProjectOptions.readme
releasableCommits?
readonlyoptionalreleasableCommits?:ReleasableCommits
Find commits that should be considered releasable Used to decide if a release is required.
Default
ReleasableCommits.everyCommit()
Inherited from
typescript.TypeScriptProjectOptions.releasableCommits
release?
readonlyoptionalrelease?:boolean
Add release management to this project.
Default
- true (false for subprojects)
Inherited from
typescript.TypeScriptProjectOptions.release
releaseBranches?
readonlyoptionalreleaseBranches?:object
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.
Index Signature
[name: string]: BranchOptions
Default
- no additional branches are used for release. you can use
addBranch()to add additional branches.
Inherited from
typescript.TypeScriptProjectOptions.releaseBranches
releaseEnvironment?
readonlyoptionalreleaseEnvironment?:string
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.
Default
- no environment used, unless set at the artifact level
Inherited from
typescript.TypeScriptProjectOptions.releaseEnvironment
releaseEveryCommit?
readonlyoptionalreleaseEveryCommit?:boolean
Automatically release new versions every commit to one of branches in releaseBranches.
Default
true
Deprecated
Use releaseTrigger: ReleaseTrigger.continuous() instead
Inherited from
typescript.TypeScriptProjectOptions.releaseEveryCommit
releaseFailureIssue?
readonlyoptionalreleaseFailureIssue?:boolean
Create a github issue on every failed publishing task.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.releaseFailureIssue
releaseFailureIssueLabel?
readonlyoptionalreleaseFailureIssueLabel?:string
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
Default
"failed-release"
Inherited from
typescript.TypeScriptProjectOptions.releaseFailureIssueLabel
releaseSchedule?
readonlyoptionalreleaseSchedule?:string
CRON schedule to trigger new releases.
Default
- no scheduled releases
Deprecated
Use releaseTrigger: ReleaseTrigger.scheduled() instead
Inherited from
typescript.TypeScriptProjectOptions.releaseSchedule
releaseTagPrefix?
readonlyoptionalreleaseTagPrefix?:string
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.
Default
"v"
Inherited from
typescript.TypeScriptProjectOptions.releaseTagPrefix
releaseToGithub?
readonlyoptionalreleaseToGithub?:boolean
Release to Github when running release tasks
Default
true if repository is set, false otherwise
releaseToLocal?
readonlyoptionalreleaseToLocal?:boolean
Release to Local archive folder when running release tasks
Default
true
releaseToNpm?
readonlyoptionalreleaseToNpm?:boolean
Automatically release to npm when new versions are introduced.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.releaseToNpm
releaseTrigger?
readonlyoptionalreleaseTrigger?:ReleaseTrigger
The release trigger to use.
Default
- Continuous releases (
ReleaseTrigger.continuous())
Inherited from
typescript.TypeScriptProjectOptions.releaseTrigger
releaseWorkflow?
readonlyoptionalreleaseWorkflow?:boolean
DEPRECATED: renamed to release.
Default
- true if not a subproject
Deprecated
see release.
Inherited from
typescript.TypeScriptProjectOptions.releaseWorkflow
releaseWorkflowEnv?
readonlyoptionalreleaseWorkflowEnv?:object
Build environment variables for release workflows.
Index Signature
[key: string]: string
Default
{}
Inherited from
typescript.TypeScriptProjectOptions.releaseWorkflowEnv
releaseWorkflowName?
readonlyoptionalreleaseWorkflowName?:string
The name of the default release workflow.
Default
"release"
Inherited from
typescript.TypeScriptProjectOptions.releaseWorkflowName
releaseWorkflowSetupSteps?
readonlyoptionalreleaseWorkflowSetupSteps?:JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
Inherited from
typescript.TypeScriptProjectOptions.releaseWorkflowSetupSteps
renovatebot?
readonlyoptionalrenovatebot?:boolean
Use renovatebot to handle dependency upgrades.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.renovatebot
renovatebotOptions?
readonlyoptionalrenovatebotOptions?:RenovatebotOptions
Options for renovatebot.
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.renovatebotOptions
repoBuildPackageModel?
readonlyoptionalrepoBuildPackageModel?:RepoBuildPackageModel
Type of repository, packaging, and release model to use.
Use value RepoBuildPackageModel.SKIP_SETUP to skip
any opinionated setup by the component.
Default
RepoBuildPackageModel.LOCAL_DEV_BUILD_REGISTRY
Featured
repository?
readonlyoptionalrepository?: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
Inherited from
typescript.TypeScriptProjectOptions.repository
repositoryDirectory?
readonlyoptionalrepositoryDirectory?: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.
Inherited from
typescript.TypeScriptProjectOptions.repositoryDirectory
sampleCode?
readonlyoptionalsampleCode?:boolean
Generate one-time sample in src/ and test/ if there are no files there.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.sampleCode
scopedPackagesOptions?
readonlyoptionalscopedPackagesOptions?:ScopedPackagesOptions[]
Options for privately hosted scoped packages
Default
- fetch all scoped packages from the public npm registry
Inherited from
typescript.TypeScriptProjectOptions.scopedPackagesOptions
scripts?
readonlyoptionalscripts?:object
npm scripts to include. If a script has the same name as a standard script, the standard script will be overwritten. Also adds the script as a task.
Index Signature
[name: string]: string
Default
{}
Deprecated
use project.addTask() or package.setScript()
Inherited from
typescript.TypeScriptProjectOptions.scripts
srcdir?
readonlyoptionalsrcdir?:string
Typescript sources directory.
Default
"src"
Inherited from
typescript.TypeScriptProjectOptions.srcdir
stability?
readonlyoptionalstability?:string
Package’s Stability
Inherited from
typescript.TypeScriptProjectOptions.stability
stale?
readonlyoptionalstale?:boolean
Auto-close of stale issues and pull request. See staleOptions for options.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.stale
staleOptions?
readonlyoptionalstaleOptions?:StaleOptions
Auto-close stale issues and pull requests. To disable set stale to false.
Default
- see defaults in
StaleOptions
Inherited from
typescript.TypeScriptProjectOptions.staleOptions
testdir?
readonlyoptionaltestdir?:string
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.
Default
"test"
Inherited from
typescript.TypeScriptProjectOptions.testdir
tsconfig?
readonlyoptionaltsconfig?:TypescriptConfigOptions
Custom TSConfig
Default
- default options
Inherited from
typescript.TypeScriptProjectOptions.tsconfig
tsconfigDev?
readonlyoptionaltsconfigDev?:TypescriptConfigOptions
Custom tsconfig options for the development tsconfig.json file (used for testing).
Default
- use the production tsconfig options
Inherited from
typescript.TypeScriptProjectOptions.tsconfigDev
tsconfigDevFile?
readonlyoptionaltsconfigDevFile?:string
The name of the development tsconfig.json file.
Default
"tsconfig.dev.json"
Inherited from
typescript.TypeScriptProjectOptions.tsconfigDevFile
tsJestOptions?
readonlyoptionaltsJestOptions?:TsJestOptions
Options for ts-jest
Inherited from
typescript.TypeScriptProjectOptions.tsJestOptions
typescriptVersion?
readonlyoptionaltypescriptVersion?:string
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).
Default
"latest"
Inherited from
typescript.TypeScriptProjectOptions.typescriptVersion
versionrcOptions?
readonlyoptionalversionrcOptions?:Record<string,any>
Custom configuration used when creating changelog with commit-and-tag-version package. Given values either append to default configuration or overwrite values in it.
Default
- standard configuration applicable for GitHub repositories
Inherited from
typescript.TypeScriptProjectOptions.versionrcOptions
vscode?
readonlyoptionalvscode?:boolean
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
Default
true
Inherited from
typescript.TypeScriptProjectOptions.vscode
workflowBootstrapSteps?
readonlyoptionalworkflowBootstrapSteps?:JobStep[]
Workflow steps to use in order to bootstrap this repo.
Default
"yarn install --frozen-lockfile && yarn projen"
Inherited from
typescript.TypeScriptProjectOptions.workflowBootstrapSteps
workflowContainerImage?
readonlyoptionalworkflowContainerImage?:string
Container image to use for GitHub workflows.
Default
- default image
Inherited from
typescript.TypeScriptProjectOptions.workflowContainerImage
workflowGitIdentity?
readonlyoptionalworkflowGitIdentity?:GitIdentity
The git identity to use in workflows.
Default
- default GitHub Actions user
Inherited from
typescript.TypeScriptProjectOptions.workflowGitIdentity
workflowNodeVersion?
readonlyoptionalworkflowNodeVersion?:string
The node version used in GitHub Actions workflows.
Always use this option if your GitHub Actions workflows require a specific to run.
Default
minNodeVersionif set, otherwiselts/*.
Inherited from
typescript.TypeScriptProjectOptions.workflowNodeVersion
workflowPackageCache?
readonlyoptionalworkflowPackageCache?:boolean
Enable Node.js package cache in GitHub workflows.
Default
false
Inherited from
typescript.TypeScriptProjectOptions.workflowPackageCache
workflowRunsOn?
readonlyoptionalworkflowRunsOn?:string[]
Github Runner selection labels
Default
["ubuntu-latest"]
Description
Defines a target Runner by labels
Throws
if both runsOn and runsOnGroup are specified
Inherited from
typescript.TypeScriptProjectOptions.workflowRunsOn
workflowRunsOnGroup?
readonlyoptionalworkflowRunsOnGroup?:GroupRunnerOptions
Github Runner Group selection options
Description
Defines a target Runner Group by name and/or labels
Throws
if both runsOn and runsOnGroup are specified
Inherited from
typescript.TypeScriptProjectOptions.workflowRunsOnGroup
yarnBerryOptions?
readonlyoptionalyarnBerryOptions?:YarnBerryOptions
Options for Yarn Berry
Default
- Yarn Berry v4 with all default options
Inherited from
typescript.TypeScriptProjectOptions.yarnBerryOptions