Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LernaProjectOptions

Hierarchy

  • NodeProjectOptions
    • LernaProjectOptions

Index

Properties

Optional Readonly allowLibraryDependencies

allowLibraryDependencies: boolean

(experimental) 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

experimental

Optional Readonly antitamper

antitamper: boolean

(experimental) Checks that after build there are no modified files on git.

default

true

experimental

Optional Readonly artifactsDirectory

artifactsDirectory: string

(experimental) A directory which will contain artifacts to be published to npm.

default

"dist"

experimental

Optional Readonly authorEmail

authorEmail: string

(experimental) Author's e-mail.

experimental

Optional Readonly authorName

authorName: string

(experimental) Author's name.

experimental

Optional Readonly authorOrganization

authorOrganization: boolean

(experimental) Author's Organization.

experimental

Optional Readonly authorUrl

authorUrl: string

(experimental) Author's URL / Website.

experimental

Optional Readonly autoApproveOptions

autoApproveOptions: AutoApproveOptions

(experimental) Enable and configure the 'auto approve' workflow.

default
  • auto approve is disabled
experimental

Optional Readonly autoApproveProjenUpgrades

autoApproveProjenUpgrades: boolean

(experimental) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued).

Throw if set to true but autoApproveOptions are not defined.

default

false

experimental

Optional Readonly autoApproveUpgrades

autoApproveUpgrades: boolean

(experimental) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).

Throw if set to true but autoApproveOptions are not defined.

default
  • true
experimental

Optional Readonly autoDetectBin

autoDetectBin: boolean

(experimental) Automatically add all executables under the bin directory to your package.json file under the bin section.

default

true

experimental

Optional Readonly autoMergeOptions

autoMergeOptions: AutoMergeOptions

(experimental) Configure options for automatic merging on GitHub.

Has no effect if github.mergify is set to false.

default
  • see defaults in AutoMergeOptions
experimental

Optional Readonly bin

bin: Record<string, string>

(experimental) 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.

experimental

Optional Readonly buildWorkflow

buildWorkflow: boolean

(experimental) Define a GitHub workflow for building PRs.

default
  • true if not a subproject
experimental

Optional Readonly bundledDeps

bundledDeps: string[]

(experimental) List of dependencies to bundle into this module.

These modules will be added both to the dependencies section and peerDependencies section of your package.json.

The recommendation is to only specify the module name here (e.g. express). This will behave similar to yarn 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 npm i or yarn add (e.g. express@^2) and this will be what you package.json will eventually include.

experimental

Optional Readonly clobber

clobber: boolean

(experimental) Add a clobber task which resets the repo to origin.

default

true

experimental

Optional Readonly codeCov

codeCov: boolean

(experimental) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret.

default

false

experimental

Optional Readonly codeCovTokenSecret

codeCovTokenSecret: string

(experimental) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.

default
  • if this option is not specified, only public repositories are supported
experimental

Optional Readonly copyrightOwner

copyrightOwner: string

(experimental) License copyright owner.

default
  • defaults to the value of authorName or "" if authorName is undefined.
experimental

Optional Readonly copyrightPeriod

copyrightPeriod: string

(experimental) The copyright years to put in the LICENSE file.

default
  • current year
experimental

Readonly defaultReleaseBranch

defaultReleaseBranch: string

(experimental) The name of the main release branch.

default

"main"

experimental

Optional Readonly dependabot

dependabot: boolean

(deprecated) Include dependabot configuration.

default

false

deprecated
  • use depsUpgrade: DependenciesUpgradeMechanism.dependabot()

Optional Readonly dependabotOptions

dependabotOptions: DependabotOptions

(deprecated) Options for dependabot.

default
  • default options
deprecated
  • use depsUpgrade: DependenciesUpgradeMechanism.dependabot()

Optional Readonly deps

deps: string[]

(experimental) Runtime dependencies of this module.

The recommendation is to only specify the module name here (e.g. express). This will behave similar to yarn 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 npm i or yarn add (e.g. express@^2) and this will be what you package.json will eventually include.

default

[]

experimental
featured

true

example

[ 'express', 'lodash', 'foo@^2' ]

Optional Readonly depsUpgrade

depsUpgrade: DependenciesUpgradeMechanism

(experimental) How to handle dependency upgrades.

default
  • DependenciesUpgradeMechanism.dependabot if dependabot is true, otherwise a DependenciesUpgradeMechanism.githubWorkflow configured from other passed-in NodeProjectOptions
experimental

Optional Readonly description

description: string

(experimental) 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

experimental
featured

true

Optional Readonly devContainer

devContainer: boolean

(experimental) Add a VSCode development environment (used for GitHub Codespaces).

default

false

experimental

Optional Readonly devDeps

devDeps: string[]

(experimental) 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 yarn 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 npm i or yarn add (e.g. express@^2) and this will be what you package.json will eventually include.

default

[]

experimental
featured

true

example

[ 'typescript', '@types/express' ]

Optional Readonly entrypoint

entrypoint: string

(experimental) Module entrypoint (main in package.json).

Set to an empty string to not include main in your package.json

default

"lib/index.js"

experimental

Optional Readonly github

github: boolean

(experimental) Enable GitHub integration.

Enabled by default for root projects. Disabled for non-root projects.

default

true

experimental

Optional Readonly githubOptions

githubOptions: GitHubOptions

(experimental) Options for GitHub integration.

default
  • see GitHubOptions
experimental

Optional Readonly gitignore

gitignore: string[]

(experimental) Additional entries to .gitignore.

experimental

Optional Readonly gitpod

gitpod: boolean

(experimental) Add a Gitpod development environment.

default

false

experimental

Optional Readonly homepage

homepage: string

(experimental) Package's Homepage / Website.

experimental

Optional Readonly jest

jest: boolean

(experimental) Setup jest unit tests.

default

true

experimental

Optional Readonly jestOptions

jestOptions: JestOptions

(experimental) Jest options.

default
  • default options
experimental

Optional Readonly jsiiReleaseVersion

jsiiReleaseVersion: string

(experimental) Version requirement of jsii-release which is used to publish modules to npm.

default

"latest"

experimental

Optional Readonly keywords

keywords: string[]

(experimental) Keywords to include in package.json.

experimental

Optional Readonly license

license: string

(experimental) License's SPDX identifier.

See https://github.com/projen/projen/tree/master/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"

experimental

Optional Readonly licensed

licensed: boolean

(experimental) Indicates if a license should be added.

default

true

experimental

Optional Readonly logging

logging: LoggerOptions

(experimental) Configure logging options such as verbosity.

default

{}

experimental

Optional Readonly majorVersion

majorVersion: number

(experimental) 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.
experimental

Optional Readonly maxNodeVersion

maxNodeVersion: string

(experimental) Minimum node.js version to require via engines (inclusive).

default
  • no max
experimental

Optional Readonly mergify

mergify: boolean

(deprecated) Whether mergify should be enabled on this repository or not.

default

true

deprecated

use githubOptions.mergify instead

Optional Readonly mergifyOptions

mergifyOptions: MergifyOptions

(experimental) Options for mergify.

default
  • default options
experimental

Optional Readonly minNodeVersion

minNodeVersion: string

(experimental) Minimum Node.js version to require via package.json engines (inclusive).

default
  • no "engines" specified
experimental

Optional Readonly mutableBuild

mutableBuild: boolean

(experimental) 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

experimental

Readonly name

name: string

(experimental) This is the name of your project.

default

$BASEDIR

experimental
featured

true

Optional Readonly npmAccess

npmAccess: NpmAccess

(experimental) Access level of the npm package.

default
  • for scoped packages (e.g. foo@bar), the default is NpmAccess.RESTRICTED, for non-scoped packages, the default is NpmAccess.PUBLIC.
experimental

Optional Readonly npmDistTag

npmDistTag: string

(experimental) Tags can be used to provide an alias instead of version numbers.

For example, a project might choose to have multiple streams of development and use a different tag for each stream, e.g., stable, beta, dev, canary.

By default, the latest tag is used by npm to identify the current version of a package, and npm install <pkg> (without any @<version> or @<tag> specifier) installs the latest tag. Typically, projects only use the latest tag for stable release versions, and use other tags for unstable versions such as prereleases.

The next tag is used by some projects to identify the upcoming version.

default

"latest"

experimental

Optional Readonly npmRegistry

npmRegistry: string

(deprecated) The host name of the npm registry to publish to.

Cannot be set together with npmRegistryUrl.

deprecated

use npmRegistryUrl instead

Optional Readonly npmRegistryUrl

npmRegistryUrl: string

(experimental) The base URL of the npm package registry.

Must be a URL (e.g. start with "https://" or "http://")

default

"https://registry.npmjs.org"

experimental

Optional Readonly npmTokenSecret

npmTokenSecret: string

(experimental) GitHub secret which contains the NPM token to use when publishing packages.

default

"NPM_TOKEN"

experimental

Optional Readonly npmignore

npmignore: string[]

(deprecated) Additional entries to .npmignore.

deprecated
  • use project.addPackageIgnore

Optional Readonly npmignoreEnabled

npmignoreEnabled: boolean

(experimental) Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.

default

true

experimental

Optional Readonly outdir

outdir: string

(experimental) 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 sub-projects.

default

"."

experimental

Optional Readonly packageManager

packageManager: NodePackageManager

(experimental) The Node Package Manager used to execute scripts.

default

NodePackageManager.YARN

experimental

Optional Readonly packageName

packageName: string

(experimental) The "name" in package.json.

default
  • defaults to project name
experimental
featured

true

Optional Readonly parent

parent: Project

(experimental) The parent project, if this project is part of a bigger project.

experimental

Optional Readonly peerDependencyOptions

peerDependencyOptions: PeerDependencyOptions

(experimental) Options for peerDeps.

experimental

Optional Readonly peerDeps

peerDeps: string[]

(experimental) 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

[]

experimental

Optional Readonly postBuildSteps

postBuildSteps: JobStep[]

(experimental) Steps to execute after build as part of the release workflow.

default

[]

experimental

Optional Readonly prerelease

prerelease: string

(experimental) Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").

default
  • normal semantic versions
experimental

Optional Readonly projectType

projectType: ProjectType

(deprecated) Which type of project this is (library/app).

default

ProjectType.UNKNOWN

deprecated

no longer supported at the base project level

Optional Readonly projenCommand

projenCommand: string

(experimental) The shell command to use in order to run the projen CLI.

Can be used to customize in special environments.

default

"npx projen"

experimental

Optional Readonly projenDevDependency

projenDevDependency: boolean

(experimental) Indicates of "projen" should be installed as a devDependency.

default

true

experimental

Optional Readonly projenDuringBuild

projenDuringBuild: boolean

(experimental) Execute projen as the first step of the build task to synthesize project files.

This applies both to local builds and to CI builds.

Disabling this feature is NOT RECOMMENDED and means that manual changes to synthesized project files will be persisted.

default

true

experimental

Optional Readonly projenUpgradeAutoMerge

projenUpgradeAutoMerge: boolean

(deprecated) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued).

Throw if set to true but autoApproveOptions are not defined.

default

false

deprecated

use autoApproveProjenUpgrades.

Optional Readonly projenUpgradeSchedule

projenUpgradeSchedule: string[]

(experimental) Customize the projenUpgrade schedule in cron expression.

default

[ "0 6 * * *" ]

experimental

Optional Readonly projenUpgradeSecret

projenUpgradeSecret: string

(experimental) Periodically submits a pull request for projen upgrades (executes yarn projen:upgrade).

This setting is a GitHub secret name which contains a GitHub Access Token with repo and workflow permissions.

This token is used to submit the upgrade pull request, which will likely include workflow updates.

To create a personal access token see https://github.com/settings/tokens

default
  • no automatic projen upgrade pull requests
experimental

Optional Readonly projenVersion

projenVersion: string

(experimental) Version of projen to install.

default
  • Defaults to the latest version.
experimental

Optional Readonly projenrcJs

projenrcJs: boolean

(experimental) Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.

default
  • true if projenrcJson is false
experimental

Optional Readonly projenrcJsOptions

projenrcJsOptions: ProjenrcOptions

(experimental) Options for .projenrc.js.

default
  • default options
experimental

Optional Readonly projenrcJson

projenrcJson: boolean

(experimental) Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.

default

false

experimental

Optional Readonly projenrcJsonOptions

projenrcJsonOptions: ProjenrcOptions

(experimental) Options for .projenrc.json.

default
  • default options
experimental

Optional Readonly pullRequestTemplate

pullRequestTemplate: boolean

(experimental) Include a GitHub pull request template.

default

true

experimental

Optional Readonly pullRequestTemplateContents

pullRequestTemplateContents: string

(experimental) The contents of the pull request template.

default
  • default content
experimental

Optional Readonly readme

readme: SampleReadmeProps

(experimental) The README setup.

default
  • { filename: 'README.md', contents: '# replace this' }
experimental
example

"{ filename: 'readme.md', contents: '# title' }"

Optional Readonly release

release: boolean

(experimental) Add release management to this project.

default
  • true (false for subprojects)
experimental
featured

true

Optional Readonly releaseBranches

releaseBranches: {}

(experimental) 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.

default
  • no additional branches are used for release. you can use addBranch() to add additional branches.
experimental

Type declaration

  • [name: string]: BranchOptions

Optional Readonly releaseEveryCommit

releaseEveryCommit: boolean

(experimental) Automatically release new versions every commit to one of branches in releaseBranches.

default

true

experimental

Optional Readonly releaseFailureIssue

releaseFailureIssue: boolean

(experimental) Create a github issue on every failed publishing task.

default

false

experimental

Optional Readonly releaseFailureIssueLabel

releaseFailureIssueLabel: string

(experimental) The label to apply to issues indicating publish failures.

Only applies if releaseFailureIssue is true.

default

"failed-release"

experimental

Optional Readonly releaseSchedule

releaseSchedule: string

(experimental) CRON schedule to trigger new releases.

default
  • no scheduled releases
experimental

Optional Readonly releaseToNpm

releaseToNpm: boolean

(experimental) Automatically release to npm when new versions are introduced.

default

false

experimental

Optional Readonly releaseWorkflow

releaseWorkflow: boolean

(deprecated) DEPRECATED: renamed to release.

default
  • true if not a subproject
deprecated

see release.

Optional Readonly releaseWorkflowName

releaseWorkflowName: string

(experimental) The name of the default release workflow.

default

"Release"

experimental

Optional Readonly releaseWorkflowSetupSteps

releaseWorkflowSetupSteps: JobStep[]

(experimental) A set of workflow steps to execute in order to setup the workflow container.

experimental

Optional Readonly repository

repository: string

(experimental) The repository is the location where the actual code for your package lives.

See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository

experimental

Optional Readonly repositoryDirectory

repositoryDirectory: string

(experimental) 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.

experimental

Optional Readonly scripts

scripts: {}

(experimental) npm scripts to include.

If a script has the same name as a standard script, the standard script will be overwritten.

default

{}

experimental

Type declaration

  • [name: string]: string

Optional Readonly stability

stability: string

(experimental) Package's Stability.

experimental

Optional Readonly stale

stale: boolean

(experimental) Auto-close of stale issues and pull request.

See staleOptions for options.

default

true

experimental

Optional Readonly staleOptions

staleOptions: StaleOptions

(experimental) Auto-close stale issues and pull requests.

To disable set stale to false.

default
  • see defaults in StaleOptions
experimental

Optional Readonly vscode

vscode: boolean

(experimental) Enable VSCode integration.

Enabled by default for root projects. Disabled for non-root projects.

default

true

experimental

Optional Readonly workflowBootstrapSteps

workflowBootstrapSteps: any[]

(experimental) Workflow steps to use in order to bootstrap this repo.

default

"yarn install --frozen-lockfile && yarn projen"

experimental

Optional Readonly workflowContainerImage

workflowContainerImage: string

(experimental) Container image to use for GitHub workflows.

default
  • default image
experimental

Optional Readonly workflowNodeVersion

workflowNodeVersion: string

(experimental) The node version to use in GitHub workflows.

default
  • same as minNodeVersion
experimental

Generated using TypeDoc