Documentation
¶
Index ¶
- func Bundler_IsComponent(x interface{}) *bool
- func Bundler_IsConstruct(x interface{}) *bool
- func Eslint_IsComponent(x interface{}) *bool
- func Eslint_IsConstruct(x interface{}) *bool
- func Jest_IsComponent(x interface{}) *bool
- func Jest_IsConstruct(x interface{}) *bool
- func LicenseChecker_IsComponent(x interface{}) *bool
- func LicenseChecker_IsConstruct(x interface{}) *bool
- func NewBundler_Override(b Bundler, project projen.Project, options *BundlerOptions)
- func NewEslint_Override(e Eslint, project NodeProject, options *EslintOptions)
- func NewJestReporter_Override(j JestReporter, name *string, options *map[string]interface{})
- func NewJest_Override(j Jest, project NodeProject, options *JestOptions)
- func NewLicenseChecker_Override(l LicenseChecker, scope constructs.Construct, options *LicenseCheckerOptions)
- func NewNodePackage_Override(n NodePackage, project projen.Project, options *NodePackageOptions)
- func NewNodeProject_Override(n NodeProject, options *NodeProjectOptions)
- func NewNpmConfig_Override(n NpmConfig, project NodeProject, options *NpmConfigOptions)
- func NewPrettier_Override(p Prettier, project NodeProject, options *PrettierOptions)
- func NewProjenrc_Override(p Projenrc, project projen.Project, options *ProjenrcOptions)
- func NewTransform_Override(t Transform, name *string, options interface{})
- func NewTypescriptConfig_Override(t TypescriptConfig, project projen.Project, options *TypescriptConfigOptions)
- func NewUpgradeDependencies_Override(u UpgradeDependencies, project NodeProject, ...)
- func NewWatchPlugin_Override(w WatchPlugin, name *string, options interface{})
- func NewYarnrc_Override(y Yarnrc, project projen.Project, version *string, options *YarnrcOptions)
- func NodePackage_IsComponent(x interface{}) *bool
- func NodePackage_IsConstruct(x interface{}) *bool
- func NodeProject_DEFAULT_TASK() *string
- func NodeProject_IsConstruct(x interface{}) *bool
- func NodeProject_IsProject(x interface{}) *bool
- func NodeProject_Of(construct constructs.IConstruct) projen.Project
- func NpmConfig_IsComponent(x interface{}) *bool
- func NpmConfig_IsConstruct(x interface{}) *bool
- func Prettier_IsComponent(x interface{}) *bool
- func Prettier_IsConstruct(x interface{}) *bool
- func Projenrc_IsComponent(x interface{}) *bool
- func Projenrc_IsConstruct(x interface{}) *bool
- func Projenrc_Of(project projen.Project) projen.ProjenrcFile
- func TypescriptConfig_IsComponent(x interface{}) *bool
- func TypescriptConfig_IsConstruct(x interface{}) *bool
- func UpgradeDependencies_IsComponent(x interface{}) *bool
- func UpgradeDependencies_IsConstruct(x interface{}) *bool
- func Yarnrc_IsComponent(x interface{}) *bool
- func Yarnrc_IsConstruct(x interface{}) *bool
- type AddBundleOptions
- type ArrowParens
- type AutoRelease
- type BuildWorkflowOptions
- type Bundle
- type BundleLogLevel
- type Bundler
- type BundlerOptions
- type BundlingOptions
- type Charset
- type CodeArtifactAuthProvider
- type CodeArtifactOptions
- type CoverageThreshold
- type EmbeddedLanguageFormatting
- type EndOfLine
- type Eslint
- type EslintOptions
- type EslintOverride
- type HTMLWhitespaceSensitivity
- type HasteConfig
- type Jest
- type JestConfigOptions
- type JestOptions
- type JestReporter
- type LicenseChecker
- type LicenseCheckerOptions
- type NodePackage
- type NodePackageManager
- type NodePackageOptions
- type NodeProject
- type NodeProjectOptions
- type NpmAccess
- type NpmConfig
- type NpmConfigOptions
- type PeerDependencyOptions
- type Prettier
- type PrettierOptions
- type PrettierOverride
- type PrettierSettings
- type Projenrc
- type ProjenrcOptions
- type ProseWrap
- type QuoteProps
- type RenderWorkflowSetupOptions
- type RunBundleTask
- type ScopedPackagesOptions
- type SourceMapMode
- type TrailingComma
- type Transform
- type TypeScriptCompilerOptions
- type TypeScriptImportsNotUsedAsValues
- type TypeScriptJsxMode
- type TypeScriptModuleDetection
- type TypeScriptModuleResolution
- type TypescriptConfig
- type TypescriptConfigExtends
- type TypescriptConfigOptions
- type UpdateSnapshot
- type UpgradeDependencies
- type UpgradeDependenciesOptions
- type UpgradeDependenciesSchedule
- func UpgradeDependenciesSchedule_DAILY() UpgradeDependenciesSchedule
- func UpgradeDependenciesSchedule_Expressions(cron *[]*string) UpgradeDependenciesSchedule
- func UpgradeDependenciesSchedule_MONTHLY() UpgradeDependenciesSchedule
- func UpgradeDependenciesSchedule_NEVER() UpgradeDependenciesSchedule
- func UpgradeDependenciesSchedule_WEEKDAY() UpgradeDependenciesSchedule
- func UpgradeDependenciesSchedule_WEEKLY() UpgradeDependenciesSchedule
- type UpgradeDependenciesWorkflowOptions
- type WatchPlugin
- type YarnBerryOptions
- type YarnCacheMigrationMode
- type YarnChecksumBehavior
- type YarnDefaultSemverRangePrefix
- type YarnLogFilter
- type YarnLogFilterLevel
- type YarnNetworkSetting
- type YarnNmHoistingLimit
- type YarnNmMode
- type YarnNodeLinker
- type YarnNpmPublishAccess
- type YarnNpmRegistry
- type YarnNpmScope
- type YarnPackageExtension
- type YarnPeerDependencyMeta
- type YarnPnpFallbackMode
- type YarnPnpMode
- type YarnProgressBarStyle
- type YarnSupportedArchitectures
- type YarnWinLinkType
- type YarnWorkerPoolMode
- type Yarnrc
- type YarnrcOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bundler_IsComponent ¶ added in v0.76.9
func Bundler_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Bundler_IsConstruct ¶ added in v0.76.9
func Bundler_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Eslint_IsComponent ¶ added in v0.76.9
func Eslint_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Eslint_IsConstruct ¶ added in v0.76.9
func Eslint_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Jest_IsComponent ¶ added in v0.76.9
func Jest_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Jest_IsConstruct ¶ added in v0.76.9
func Jest_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func LicenseChecker_IsComponent ¶ added in v0.78.2
func LicenseChecker_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func LicenseChecker_IsConstruct ¶ added in v0.78.2
func LicenseChecker_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func NewBundler_Override ¶
func NewBundler_Override(b Bundler, project projen.Project, options *BundlerOptions)
Creates a `Bundler`. Experimental.
func NewEslint_Override ¶
func NewEslint_Override(e Eslint, project NodeProject, options *EslintOptions)
Experimental.
func NewJestReporter_Override ¶
func NewJestReporter_Override(j JestReporter, name *string, options *map[string]interface{})
Experimental.
func NewJest_Override ¶
func NewJest_Override(j Jest, project NodeProject, options *JestOptions)
Experimental.
func NewLicenseChecker_Override ¶ added in v0.78.2
func NewLicenseChecker_Override(l LicenseChecker, scope constructs.Construct, options *LicenseCheckerOptions)
Experimental.
func NewNodePackage_Override ¶
func NewNodePackage_Override(n NodePackage, project projen.Project, options *NodePackageOptions)
Experimental.
func NewNodeProject_Override ¶
func NewNodeProject_Override(n NodeProject, options *NodeProjectOptions)
Experimental.
func NewNpmConfig_Override ¶
func NewNpmConfig_Override(n NpmConfig, project NodeProject, options *NpmConfigOptions)
Experimental.
func NewPrettier_Override ¶
func NewPrettier_Override(p Prettier, project NodeProject, options *PrettierOptions)
Experimental.
func NewProjenrc_Override ¶
func NewProjenrc_Override(p Projenrc, project projen.Project, options *ProjenrcOptions)
Experimental.
func NewTransform_Override ¶
Experimental.
func NewTypescriptConfig_Override ¶
func NewTypescriptConfig_Override(t TypescriptConfig, project projen.Project, options *TypescriptConfigOptions)
Experimental.
func NewUpgradeDependencies_Override ¶
func NewUpgradeDependencies_Override(u UpgradeDependencies, project NodeProject, options *UpgradeDependenciesOptions)
Experimental.
func NewWatchPlugin_Override ¶
func NewWatchPlugin_Override(w WatchPlugin, name *string, options interface{})
Experimental.
func NewYarnrc_Override ¶ added in v0.76.21
func NewYarnrc_Override(y Yarnrc, project projen.Project, version *string, options *YarnrcOptions)
Experimental.
func NodePackage_IsComponent ¶ added in v0.76.9
func NodePackage_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func NodePackage_IsConstruct ¶ added in v0.76.9
func NodePackage_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func NodeProject_DEFAULT_TASK ¶
func NodeProject_DEFAULT_TASK() *string
func NodeProject_IsConstruct ¶ added in v0.76.9
func NodeProject_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func NodeProject_IsProject ¶ added in v0.76.9
func NodeProject_IsProject(x interface{}) *bool
Test whether the given construct is a project. Experimental.
func NodeProject_Of ¶ added in v0.76.9
func NodeProject_Of(construct constructs.IConstruct) projen.Project
Find the closest ancestor project for given construct.
When given a project, this it the project itself. Experimental.
func NpmConfig_IsComponent ¶ added in v0.76.9
func NpmConfig_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func NpmConfig_IsConstruct ¶ added in v0.76.9
func NpmConfig_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Prettier_IsComponent ¶ added in v0.76.9
func Prettier_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Prettier_IsConstruct ¶ added in v0.76.9
func Prettier_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Projenrc_IsComponent ¶ added in v0.76.9
func Projenrc_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Projenrc_IsConstruct ¶ added in v0.76.9
func Projenrc_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Projenrc_Of ¶
func Projenrc_Of(project projen.Project) projen.ProjenrcFile
Returns the `Projenrc` instance associated with a project or `undefined` if there is no Projenrc.
Returns: A Projenrc. Experimental.
func TypescriptConfig_IsComponent ¶ added in v0.76.9
func TypescriptConfig_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func TypescriptConfig_IsConstruct ¶ added in v0.76.9
func TypescriptConfig_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func UpgradeDependencies_IsComponent ¶ added in v0.76.9
func UpgradeDependencies_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func UpgradeDependencies_IsConstruct ¶ added in v0.76.9
func UpgradeDependencies_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Yarnrc_IsComponent ¶ added in v0.76.21
func Yarnrc_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Yarnrc_IsConstruct ¶ added in v0.76.21
func Yarnrc_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
Types ¶
type AddBundleOptions ¶
type AddBundleOptions struct {
// You can mark a file or a package as external to exclude it from your build.
//
// Instead of being bundled, the import will be preserved (using require for
// the iife and cjs formats and using import for the esm format) and will be
// evaluated at run time instead.
//
// This has several uses. First of all, it can be used to trim unnecessary
// code from your bundle for a code path that you know will never be executed.
// For example, a package may contain code that only runs in node but you will
// only be using that package in the browser. It can also be used to import
// code in node at run time from a package that cannot be bundled. For
// example, the fsevents package contains a native extension, which esbuild
// doesn't support.
// Default: [].
//
// Experimental.
Externals *[]*string `field:"optional" json:"externals" yaml:"externals"`
// Include a source map in the bundle.
// Default: false.
//
// Experimental.
Sourcemap *bool `field:"optional" json:"sourcemap" yaml:"sourcemap"`
// In addition to the `bundle:xyz` task, creates `bundle:xyz:watch` task which will invoke the same esbuild command with the `--watch` flag.
//
// This can be used
// to continusouly watch for changes.
// Default: true.
//
// Experimental.
WatchTask *bool `field:"optional" json:"watchTask" yaml:"watchTask"`
// esbuild platform.
//
// Example:
// "node"
//
// Experimental.
Platform *string `field:"required" json:"platform" yaml:"platform"`
// esbuild target.
//
// Example:
// "node12"
//
// Experimental.
Target *string `field:"required" json:"target" yaml:"target"`
// Use this to insert an arbitrary string at the beginning of generated JavaScript files.
//
// This is similar to footer which inserts at the end instead of the beginning.
//
// This is commonly used to insert comments:.
// Default: - no comments are passed.
//
// Experimental.
Banner *string `field:"optional" json:"banner" yaml:"banner"`
// The charset to use for esbuild's output.
//
// By default esbuild's output is ASCII-only. Any non-ASCII characters are escaped
// using backslash escape sequences. Using escape sequences makes the generated output
// slightly bigger, and also makes it harder to read. If you would like for esbuild to print
// the original characters without using escape sequences, use `Charset.UTF8`.
// See: https://esbuild.github.io/api/#charset
//
// Default: Charset.ASCII
//
// Experimental.
Charset Charset `field:"optional" json:"charset" yaml:"charset"`
// Replace global identifiers with constant expressions.
//
// For example, `{ 'process.env.DEBUG': 'true' }`.
//
// Another example, `{ 'process.env.API_KEY': JSON.stringify('xxx-xxxx-xxx') }`.
// Default: - no replacements are made.
//
// Experimental.
Define *map[string]*string `field:"optional" json:"define" yaml:"define"`
// Build arguments to pass into esbuild.
//
// For example, to add the [--log-limit](https://esbuild.github.io/api/#log-limit) flag:
//
// “`text
// project.bundler.addBundle("./src/hello.ts", {
// platform: "node",
// target: "node18",
// sourcemap: true,
// format: "esm",
// esbuildArgs: {
// "--log-limit": "0",
// },
// });
// “`.
// Default: - no additional esbuild arguments are passed.
//
// Experimental.
EsbuildArgs *map[string]interface{} `field:"optional" json:"esbuildArgs" yaml:"esbuildArgs"`
// Mark the output file as executable.
// Default: false.
//
// Experimental.
Executable *bool `field:"optional" json:"executable" yaml:"executable"`
//
// This is similar to banner which inserts at the beginning instead of the end.
//
// This is commonly used to insert comments.
// Default: - no comments are passed.
//
// Experimental.
Footer *string `field:"optional" json:"footer" yaml:"footer"`
// Output format for the generated JavaScript files.
//
// There are currently three possible values that can be configured: `"iife"`, `"cjs"`, and `"esm"`.
//
// If not set (`undefined`), esbuild picks an output format for you based on `platform`:
// - `"cjs"` if `platform` is `"node"`
// - `"iife"` if `platform` is `"browser"`
// - `"esm"` if `platform` is `"neutral"`
//
// Note: If making a bundle to run under node with ESM, set `format` to `"esm"` instead of setting `platform` to `"neutral"`.
// See: https://esbuild.github.io/api/#format
//
// Default: undefined.
//
// Experimental.
Format *string `field:"optional" json:"format" yaml:"format"`
// This option allows you to automatically replace a global variable with an import from another file.
// See: https://esbuild.github.io/api/#inject
//
// Default: - no code is injected.
//
// Experimental.
Inject *[]*string `field:"optional" json:"inject" yaml:"inject"`
// Whether to preserve the original `name` values even in minified code.
//
// In JavaScript the `name` property on functions and classes defaults to a
// nearby identifier in the source code.
//
// However, minification renames symbols to reduce code size and bundling
// sometimes need to rename symbols to avoid collisions. That changes value of
// the `name` property for many of these cases. This is usually fine because
// the `name` property is normally only used for debugging. However, some
// frameworks rely on the `name` property for registration and binding purposes.
// If this is the case, you can enable this option to preserve the original
// `name` values even in minified code.
// Default: false.
//
// Experimental.
KeepNames *bool `field:"optional" json:"keepNames" yaml:"keepNames"`
// Map of file extensions (without dot) and loaders to use for this file type.
//
// Loaders are appended to the esbuild command by `--loader:.extension=loader`
// Experimental.
Loaders *map[string]*string `field:"optional" json:"loaders" yaml:"loaders"`
// Log level for esbuild.
//
// This is also propagated to the package manager and
// applies to its specific install command.
// Default: LogLevel.WARNING
//
// Experimental.
LogLevel BundleLogLevel `field:"optional" json:"logLevel" yaml:"logLevel"`
// How to determine the entry point for modules.
//
// Try ['module', 'main'] to default to ES module versions.
// Default: [].
//
// Experimental.
MainFields *[]*string `field:"optional" json:"mainFields" yaml:"mainFields"`
// This option tells esbuild to write out a JSON file relative to output directory with metadata about the build.
//
// The metadata in this JSON file follows this schema (specified using TypeScript syntax):
//
// “`text
// {
// outputs: {
// [path: string]: {
// bytes: number
// inputs: {
// [path: string]: { bytesInOutput: number }
// }
// imports: { path: string }[]
// exports: string[]
// }
// }
// }
// “`
// This data can then be analyzed by other tools. For example,
// bundle buddy can consume esbuild's metadata format and generates a treemap visualization
// of the modules in your bundle and how much space each one takes up.
// See: https://esbuild.github.io/api/#metafile
//
// Default: false.
//
// Experimental.
Metafile *bool `field:"optional" json:"metafile" yaml:"metafile"`
// Whether to minify files when bundling.
// Default: false.
//
// Experimental.
Minify *bool `field:"optional" json:"minify" yaml:"minify"`
// Bundler output path relative to the asset's output directory.
// Default: "index.js"
//
// Experimental.
Outfile *string `field:"optional" json:"outfile" yaml:"outfile"`
// Source map mode to be used when bundling.
// See: https://esbuild.github.io/api/#sourcemap
//
// Default: SourceMapMode.DEFAULT
//
// Experimental.
SourceMapMode SourceMapMode `field:"optional" json:"sourceMapMode" yaml:"sourceMapMode"`
// Whether to include original source code in source maps when bundling.
// See: https://esbuild.github.io/api/#sources-content
//
// Default: true.
//
// Experimental.
SourcesContent *bool `field:"optional" json:"sourcesContent" yaml:"sourcesContent"`
// The path of the tsconfig.json file to use for bundling.
// Default: "tsconfig.json"
//
// Experimental.
TsconfigPath *string `field:"optional" json:"tsconfigPath" yaml:"tsconfigPath"`
}
Options for `addBundle()`. Experimental.
type ArrowParens ¶
type ArrowParens string
Experimental.
const ( // Always include parens. // // Example: `(x) => x`. // Experimental. ArrowParens_ALWAYS ArrowParens = "ALWAYS" // Omit parens when possible. // // Example: `x => x`. // Experimental. ArrowParens_AVOID ArrowParens = "AVOID" )
type AutoRelease ¶
type AutoRelease string
Automatic bump modes. Experimental.
const ( // Automatically bump & release a new version for every commit to "main". // Experimental. AutoRelease_EVERY_COMMIT AutoRelease = "EVERY_COMMIT" // Automatically bump & release a new version on a daily basis. // Experimental. AutoRelease_DAILY AutoRelease = "DAILY" )
type BuildWorkflowOptions ¶ added in v0.80.16
type BuildWorkflowOptions struct {
// Name of the buildfile (e.g. "build" becomes "build.yml").
// Default: "build".
//
// Experimental.
Name *string `field:"optional" json:"name" yaml:"name"`
// Permissions granted to the build job To limit job permissions for `contents`, the desired permissions have to be explicitly set, e.g.: `{ contents: JobPermission.NONE }`.
// Default: `{ contents: JobPermission.WRITE }`
//
// Experimental.
Permissions *workflows.JobPermissions `field:"optional" json:"permissions" yaml:"permissions"`
// Steps to execute before the build.
// Default: [].
//
// Experimental.
PreBuildSteps *[]*workflows.JobStep `field:"optional" json:"preBuildSteps" yaml:"preBuildSteps"`
// Build workflow triggers.
// Default: "{ pullRequest: {}, workflowDispatch: {} }".
//
// Experimental.
WorkflowTriggers *workflows.Triggers `field:"optional" json:"workflowTriggers" yaml:"workflowTriggers"`
// 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.
MutableBuild *bool `field:"optional" json:"mutableBuild" yaml:"mutableBuild"`
}
Build workflow options for NodeProject. Experimental.
type Bundle ¶
type Bundle struct {
// The task that produces this bundle.
// Experimental.
BundleTask projen.Task `field:"required" json:"bundleTask" yaml:"bundleTask"`
// Base directory containing the output file (relative to project root).
// Experimental.
Outdir *string `field:"required" json:"outdir" yaml:"outdir"`
// Location of the output file (relative to project root).
// Experimental.
Outfile *string `field:"required" json:"outfile" yaml:"outfile"`
// The "watch" task for this bundle.
// Experimental.
WatchTask projen.Task `field:"optional" json:"watchTask" yaml:"watchTask"`
}
Experimental.
type BundleLogLevel ¶ added in v0.79.23
type BundleLogLevel string
Log levels for esbuild and package managers' install commands. Experimental.
const ( // Show everything. // Experimental. BundleLogLevel_VERBOSE BundleLogLevel = "VERBOSE" // Show everything from info and some additional messages for debugging. // Experimental. BundleLogLevel_DEBUG BundleLogLevel = "DEBUG" // Show warnings, errors, and an output file summary. // Experimental. BundleLogLevel_INFO BundleLogLevel = "INFO" // Show warnings and errors. // Experimental. BundleLogLevel_WARNING BundleLogLevel = "WARNING" // Show errors only. // Experimental. BundleLogLevel_ERROR BundleLogLevel = "ERROR" // Show nothing. // Experimental. BundleLogLevel_SILENT BundleLogLevel = "SILENT" )
type Bundler ¶
type Bundler interface {
projen.Component
// Root bundle directory.
// Experimental.
Bundledir() *string
// Gets or creates the singleton "bundle" task of the project.
//
// If the project doesn't have a "bundle" task, it will be created and spawned
// during the pre-compile phase.
// Experimental.
BundleTask() projen.Task
// The semantic version requirement for `esbuild` (if defined).
// Experimental.
EsbuildVersion() *string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Adds a task to the project which bundles a specific entrypoint and all of its dependencies into a single javascript output file.
// Experimental.
AddBundle(entrypoint *string, options *AddBundleOptions) *Bundle
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Adds support for bundling JavaScript applications and dependencies into a single file.
In the future, this will also supports bundling websites. Experimental.
func Bundler_Of ¶
Returns the `Bundler` instance associated with a project or `undefined` if there is no Bundler.
Returns: A bundler. Experimental.
func NewBundler ¶
func NewBundler(project projen.Project, options *BundlerOptions) Bundler
Creates a `Bundler`. Experimental.
type BundlerOptions ¶
type BundlerOptions struct {
// Install the `bundle` command as a pre-compile phase.
// Default: true.
//
// Deprecated: Use `runBundleTask` instead.
AddToPreCompile *bool `field:"optional" json:"addToPreCompile" yaml:"addToPreCompile"`
// Output directory for all bundles.
// Default: "assets".
//
// Experimental.
AssetsDir *string `field:"optional" json:"assetsDir" yaml:"assetsDir"`
// The semantic version requirement for `esbuild`.
// Default: - no specific version (implies latest).
//
// Experimental.
EsbuildVersion *string `field:"optional" json:"esbuildVersion" yaml:"esbuildVersion"`
// Map of file extensions (without dot) and loaders to use for this file type.
//
// Loaders are appended to the esbuild command by `--loader:.extension=loader`
// Experimental.
Loaders *map[string]*string `field:"optional" json:"loaders" yaml:"loaders"`
// Choose which phase (if any) to add the `bundle` command to.
//
// Note: If using `addBundle()` with the `bundleCompiledResults`, this option
// must be set to `RunBundleTask.POST_COMPILE` or `RunBundleTask.MANUAL`.
// See: AddBundleOptions.bundleCompiledResults *
//
// Default: RunBundleTask.PRE_COMPILE
//
// Experimental.
RunBundleTask RunBundleTask `field:"optional" json:"runBundleTask" yaml:"runBundleTask"`
}
Options for `Bundler`. Experimental.
type BundlingOptions ¶
type BundlingOptions struct {
// You can mark a file or a package as external to exclude it from your build.
//
// Instead of being bundled, the import will be preserved (using require for
// the iife and cjs formats and using import for the esm format) and will be
// evaluated at run time instead.
//
// This has several uses. First of all, it can be used to trim unnecessary
// code from your bundle for a code path that you know will never be executed.
// For example, a package may contain code that only runs in node but you will
// only be using that package in the browser. It can also be used to import
// code in node at run time from a package that cannot be bundled. For
// example, the fsevents package contains a native extension, which esbuild
// doesn't support.
// Default: [].
//
// Experimental.
Externals *[]*string `field:"optional" json:"externals" yaml:"externals"`
// Include a source map in the bundle.
// Default: false.
//
// Experimental.
Sourcemap *bool `field:"optional" json:"sourcemap" yaml:"sourcemap"`
// In addition to the `bundle:xyz` task, creates `bundle:xyz:watch` task which will invoke the same esbuild command with the `--watch` flag.
//
// This can be used
// to continusouly watch for changes.
// Default: true.
//
// Experimental.
WatchTask *bool `field:"optional" json:"watchTask" yaml:"watchTask"`
}
Options for bundling. Experimental.
type CodeArtifactAuthProvider ¶
type CodeArtifactAuthProvider string
Options for authorizing requests to a AWS CodeArtifact npm repository. Experimental.
const ( // Fixed credentials provided via Github secrets. // Experimental. CodeArtifactAuthProvider_ACCESS_AND_SECRET_KEY_PAIR CodeArtifactAuthProvider = "ACCESS_AND_SECRET_KEY_PAIR" // Ephemeral credentials provided via Github's OIDC integration with an IAM role. // // See: // https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html // https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services // Experimental. CodeArtifactAuthProvider_GITHUB_OIDC CodeArtifactAuthProvider = "GITHUB_OIDC" )
type CodeArtifactOptions ¶
type CodeArtifactOptions struct {
// GitHub secret which contains the AWS access key ID to use when publishing packages to AWS CodeArtifact.
//
// This property must be specified only when publishing to AWS CodeArtifact (`npmRegistryUrl` contains AWS CodeArtifact URL).
// Default: - When the `authProvider` value is set to
// `CodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR`, the default is
// "AWS_ACCESS_KEY_ID". For `CodeArtifactAuthProvider.GITHUB_OIDC`, this
// value must be left undefined.
//
// Experimental.
AccessKeyIdSecret *string `field:"optional" json:"accessKeyIdSecret" yaml:"accessKeyIdSecret"`
// Provider to use for authorizing requests to AWS CodeArtifact.
// Default: CodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR
//
// Experimental.
AuthProvider CodeArtifactAuthProvider `field:"optional" json:"authProvider" yaml:"authProvider"`
// ARN of AWS role to be assumed prior to get authorization token from AWS CodeArtifact This property must be specified only when publishing to AWS CodeArtifact (`registry` contains AWS CodeArtifact URL).
//
// When using the `CodeArtifactAuthProvider.GITHUB_OIDC` auth provider, this value must be defined.
// Default: undefined.
//
// Experimental.
RoleToAssume *string `field:"optional" json:"roleToAssume" yaml:"roleToAssume"`
// GitHub secret which contains the AWS secret access key to use when publishing packages to AWS CodeArtifact.
//
// This property must be specified only when publishing to AWS CodeArtifact (`npmRegistryUrl` contains AWS CodeArtifact URL).
// Default: - When the `authProvider` value is set to
// `CodeArtifactAuthProvider.ACCESS_AND_SECRET_KEY_PAIR`, the default is
// "AWS_SECRET_ACCESS_KEY". For `CodeArtifactAuthProvider.GITHUB_OIDC`, this
// value must be left undefined.
//
// Experimental.
SecretAccessKeySecret *string `field:"optional" json:"secretAccessKeySecret" yaml:"secretAccessKeySecret"`
}
Options for publishing npm packages to AWS CodeArtifact. Experimental.
type CoverageThreshold ¶
type CoverageThreshold struct {
// Experimental.
Branches *float64 `field:"optional" json:"branches" yaml:"branches"`
// Experimental.
Functions *float64 `field:"optional" json:"functions" yaml:"functions"`
// Experimental.
Lines *float64 `field:"optional" json:"lines" yaml:"lines"`
// Experimental.
Statements *float64 `field:"optional" json:"statements" yaml:"statements"`
}
Experimental.
type EmbeddedLanguageFormatting ¶
type EmbeddedLanguageFormatting string
Experimental.
const ( // Format embedded code if Prettier can automatically identify it. // Experimental. EmbeddedLanguageFormatting_AUTO EmbeddedLanguageFormatting = "AUTO" // Never automatically format embedded code. // Experimental. EmbeddedLanguageFormatting_OFF EmbeddedLanguageFormatting = "OFF" )
type EndOfLine ¶
type EndOfLine string
Experimental.
const ( // Maintain existing (mixed values within one file are normalised by looking at what's used after the first line). // Experimental. EndOfLine_AUTO EndOfLine = "AUTO" // Carriage Return character only (\r), used very rarely. // Experimental. EndOfLine_CR EndOfLine = "CR" // Carriage Return + Line Feed characters (\r\n), common on Windows. // Experimental. EndOfLine_CRLF EndOfLine = "CRLF" // Line Feed only (\n), common on Linux and macOS as well as inside git repos. // Experimental. EndOfLine_LF EndOfLine = "LF" )
type Eslint ¶
type Eslint interface {
projen.Component
// Direct access to the eslint configuration (escape hatch).
// Experimental.
Config() interface{}
// eslint task.
// Experimental.
EslintTask() projen.Task
// File patterns that should not be linted.
// Experimental.
IgnorePatterns() *[]*string
// Returns an immutable copy of the lintPatterns being used by this eslint configuration.
// Experimental.
LintPatterns() *[]*string
// The tree node.
// Experimental.
Node() constructs.Node
// eslint overrides.
// Experimental.
Overrides() *[]*EslintOverride
// Experimental.
Project() projen.Project
// eslint rules.
// Experimental.
Rules() *map[string]*[]interface{}
// Adds an `extends` item to the eslint configuration.
// Experimental.
AddExtends(extendList ...*string)
// Do not lint these files.
// Experimental.
AddIgnorePattern(pattern *string)
// Add a file, glob pattern or directory with source files to lint (e.g. [ "src" ]).
// Experimental.
AddLintPattern(pattern *string)
// Add an eslint override.
// Experimental.
AddOverride(override *EslintOverride)
// Adds an eslint plugin.
// Experimental.
AddPlugins(plugins ...*string)
// Add an eslint rule.
// Experimental.
AddRules(rules *map[string]interface{})
// Add a glob file pattern which allows importing dev dependencies.
// Experimental.
AllowDevDeps(pattern *string)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Represents eslint configuration. Experimental.
type EslintOptions ¶
type EslintOptions struct {
// Files or glob patterns or directories with source files to lint (e.g. [ "src" ]).
// Experimental.
Dirs *[]*string `field:"required" json:"dirs" yaml:"dirs"`
// Enable import alias for module paths.
// Default: undefined.
//
// Experimental.
AliasExtensions *[]*string `field:"optional" json:"aliasExtensions" yaml:"aliasExtensions"`
// Enable import alias for module paths.
// Default: undefined.
//
// Experimental.
AliasMap *map[string]*string `field:"optional" json:"aliasMap" yaml:"aliasMap"`
// Files or glob patterns or directories with source files that include tests and build tools.
//
// These sources are linted but may also import packages from `devDependencies`.
// Default: [].
//
// Experimental.
Devdirs *[]*string `field:"optional" json:"devdirs" yaml:"devdirs"`
// File types that should be linted (e.g. [ ".js", ".ts" ]).
// Default: [".ts"]
//
// Experimental.
FileExtensions *[]*string `field:"optional" json:"fileExtensions" yaml:"fileExtensions"`
// List of file patterns that should not be linted, using the same syntax as .gitignore patterns.
// Default: [ '*.js', '*.d.ts', 'node_modules/', '*.generated.ts', 'coverage' ]
//
// Experimental.
IgnorePatterns *[]*string `field:"optional" json:"ignorePatterns" yaml:"ignorePatterns"`
// Should we lint .projenrc.js.
// Default: true.
//
// Deprecated: set to `false` to remove any automatic rules and add manually.
LintProjenRc *bool `field:"optional" json:"lintProjenRc" yaml:"lintProjenRc"`
// Projenrc file to lint.
//
// Use empty string to disable.
// Default: "projenrc.js"
//
// Deprecated: provide as `devdirs`.
LintProjenRcFile *string `field:"optional" json:"lintProjenRcFile" yaml:"lintProjenRcFile"`
// Enable prettier for code formatting.
// Default: false.
//
// Experimental.
Prettier *bool `field:"optional" json:"prettier" yaml:"prettier"`
// Always try to resolve types under `<root>@types` directory even it doesn't contain any source code.
//
// This prevents `import/no-unresolved` eslint errors when importing a `@types/*` module that would otherwise remain unresolved.
// Default: true.
//
// Experimental.
TsAlwaysTryTypes *bool `field:"optional" json:"tsAlwaysTryTypes" yaml:"tsAlwaysTryTypes"`
// Path to `tsconfig.json` which should be used by eslint.
// Default: "./tsconfig.json"
//
// Experimental.
TsconfigPath *string `field:"optional" json:"tsconfigPath" yaml:"tsconfigPath"`
// Write eslint configuration as YAML instead of JSON.
// Default: false.
//
// Experimental.
Yaml *bool `field:"optional" json:"yaml" yaml:"yaml"`
}
Experimental.
type EslintOverride ¶
type EslintOverride struct {
// Files or file patterns on which to apply the override.
// Experimental.
Files *[]*string `field:"required" json:"files" yaml:"files"`
// Pattern(s) to exclude from this override.
//
// If a file matches any of the excluded patterns, the configuration won’t apply.
// Experimental.
ExcludedFiles *[]*string `field:"optional" json:"excludedFiles" yaml:"excludedFiles"`
// Config(s) to extend in this override.
// Experimental.
Extends *[]*string `field:"optional" json:"extends" yaml:"extends"`
// The overridden parser.
// Experimental.
Parser *string `field:"optional" json:"parser" yaml:"parser"`
// `plugins` override.
// Experimental.
Plugins *[]*string `field:"optional" json:"plugins" yaml:"plugins"`
// The overriden rules.
// Experimental.
Rules *map[string]interface{} `field:"optional" json:"rules" yaml:"rules"`
}
eslint rules override. Experimental.
type HTMLWhitespaceSensitivity ¶
type HTMLWhitespaceSensitivity string
Experimental.
const ( // Respect the default value of CSS display property. // Experimental. HTMLWhitespaceSensitivity_CSS HTMLWhitespaceSensitivity = "CSS" // Whitespaces are considered insignificant. // Experimental. HTMLWhitespaceSensitivity_IGNORE HTMLWhitespaceSensitivity = "IGNORE" // Whitespaces are considered significant. // Experimental. HTMLWhitespaceSensitivity_STRICT HTMLWhitespaceSensitivity = "STRICT" )
type HasteConfig ¶
type HasteConfig struct {
// Experimental.
ComputeSha1 *bool `field:"optional" json:"computeSha1" yaml:"computeSha1"`
// Experimental.
DefaultPlatform *string `field:"optional" json:"defaultPlatform" yaml:"defaultPlatform"`
// Experimental.
HasteImplModulePath *string `field:"optional" json:"hasteImplModulePath" yaml:"hasteImplModulePath"`
// Experimental.
Platforms *[]*string `field:"optional" json:"platforms" yaml:"platforms"`
// Experimental.
ThrowOnModuleCollision *bool `field:"optional" json:"throwOnModuleCollision" yaml:"throwOnModuleCollision"`
}
Experimental.
type Jest ¶
type Jest interface {
projen.Component
// Escape hatch.
// Experimental.
Config() interface{}
// Jest config file.
//
// `undefined` if settings are written to `package.json`
// Experimental.
File() projen.JsonFile
// Jest version, including `@` symbol, like `@^29`.
// Experimental.
JestVersion() *string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Experimental.
AddIgnorePattern(pattern *string)
// Adds one or more moduleNameMapper entries to Jest's configuration.
//
// Will overwrite if the same key is used as a pre-existing one.
// Experimental.
AddModuleNameMappers(moduleNameMapperAdditions *map[string]interface{})
// Adds one or more modulePaths to Jest's configuration.
// Experimental.
AddModulePaths(modulePaths ...*string)
// Experimental.
AddReporter(reporter JestReporter)
// Adds one or more roots to Jest's configuration.
// Experimental.
AddRoots(roots ...*string)
// Adds a a setup file to Jest's setupFiles configuration.
// Experimental.
AddSetupFile(file *string)
// Adds a a setup file to Jest's setupFilesAfterEnv configuration.
// Experimental.
AddSetupFileAfterEnv(file *string)
// Experimental.
AddSnapshotResolver(file *string)
// Adds a test match pattern.
// Experimental.
AddTestMatch(pattern *string)
// Adds a watch ignore pattern.
// Experimental.
AddWatchIgnorePattern(pattern *string)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Installs the following npm scripts:.
- `test`, intended for testing locally and in CI. Will update snapshots unless `updateSnapshot: UpdateSnapshot: NEVER` is set. - `test:watch`, intended for automatically rerunning tests when files change. - `test:update`, intended for testing locally and updating snapshots to match the latest unit under test. Only available when `updateSnapshot: UpdateSnapshot: NEVER`. Experimental.
type JestConfigOptions ¶
type JestConfigOptions struct {
// Escape hatch to allow any value.
// Experimental.
AdditionalOptions *map[string]interface{} `field:"optional" json:"additionalOptions" yaml:"additionalOptions"`
// This option tells Jest that all imported modules in your tests should be mocked automatically.
//
// All modules used in your tests will have a replacement implementation, keeping the API surface.
// Default: - false.
//
// Experimental.
Automock *bool `field:"optional" json:"automock" yaml:"automock"`
// By default, Jest runs all tests and produces all errors into the console upon completion.
//
// The bail config option can be used here to have Jest stop running tests after n failures.
// Setting bail to true is the same as setting bail to 1.
// Default: - 0.
//
// Experimental.
Bail interface{} `field:"optional" json:"bail" yaml:"bail"`
// The directory where Jest should store its cached dependency information.
// Default: - "/tmp/<path>".
//
// Experimental.
CacheDirectory *string `field:"optional" json:"cacheDirectory" yaml:"cacheDirectory"`
// Automatically clear mock calls and instances before every test.
//
// Equivalent to calling jest.clearAllMocks() before each test.
// This does not remove any mock implementation that may have been provided.
// Default: true.
//
// Experimental.
ClearMocks *bool `field:"optional" json:"clearMocks" yaml:"clearMocks"`
// Indicates whether the coverage information should be collected while executing the test.
//
// Because this retrofits all executed files with coverage collection statements,
// it may significantly slow down your tests.
// Default: true.
//
// Experimental.
CollectCoverage *bool `field:"optional" json:"collectCoverage" yaml:"collectCoverage"`
// An array of glob patterns indicating a set of files for which coverage information should be collected.
// Default: - undefined.
//
// Experimental.
CollectCoverageFrom *[]*string `field:"optional" json:"collectCoverageFrom" yaml:"collectCoverageFrom"`
// The directory where Jest should output its coverage files.
// Default: "coverage".
//
// Experimental.
CoverageDirectory *string `field:"optional" json:"coverageDirectory" yaml:"coverageDirectory"`
// An array of regexp pattern strings that are matched against all file paths before executing the test.
//
// If the file path matches any of the patterns, coverage information will be skipped.
// Default: "/node_modules/".
//
// Experimental.
CoveragePathIgnorePatterns *[]*string `field:"optional" json:"coveragePathIgnorePatterns" yaml:"coveragePathIgnorePatterns"`
// Indicates which provider should be used to instrument code for coverage.
//
// Allowed values are v8 (default) or babel.
// Default: - "v8".
//
// Experimental.
CoverageProvider *string `field:"optional" json:"coverageProvider" yaml:"coverageProvider"`
// A list of reporter names that Jest uses when writing coverage reports.
//
// Any istanbul reporter can be used.
// Default: - ["json", "lcov", "text", "clover", "cobertura"].
//
// Experimental.
CoverageReporters *[]*string `field:"optional" json:"coverageReporters" yaml:"coverageReporters"`
// Specify the global coverage thresholds.
//
// This will be used to configure minimum threshold enforcement
// for coverage results. Thresholds can be specified as global, as a glob, and as a directory or file path.
// If thresholds aren't met, jest will fail.
// Default: - undefined.
//
// Experimental.
CoverageThreshold *CoverageThreshold `field:"optional" json:"coverageThreshold" yaml:"coverageThreshold"`
// This option allows the use of a custom dependency extractor.
//
// It must be a node module that exports an object with an extract function.
// Default: - undefined.
//
// Experimental.
DependencyExtractor *string `field:"optional" json:"dependencyExtractor" yaml:"dependencyExtractor"`
// Allows for a label to be printed alongside a test while it is running.
// Default: - undefined.
//
// Experimental.
DisplayName interface{} `field:"optional" json:"displayName" yaml:"displayName"`
// Make calling deprecated APIs throw helpful error messages.
//
// Useful for easing the upgrade process.
// Default: - false.
//
// Experimental.
ErrorOnDeprecated *bool `field:"optional" json:"errorOnDeprecated" yaml:"errorOnDeprecated"`
// Test files run inside a vm, which slows calls to global context properties (e.g. Math). With this option you can specify extra properties to be defined inside the vm for faster lookups.
// Default: - undefined.
//
// Experimental.
ExtraGlobals *[]*string `field:"optional" json:"extraGlobals" yaml:"extraGlobals"`
// Test files are normally ignored from collecting code coverage.
//
// With this option, you can overwrite this behavior and include otherwise ignored files in code coverage.
// Default: - [”].
//
// Experimental.
ForceCoverageMatch *[]*string `field:"optional" json:"forceCoverageMatch" yaml:"forceCoverageMatch"`
// A set of global variables that need to be available in all test environments.
// Default: - {}.
//
// Experimental.
Globals interface{} `field:"optional" json:"globals" yaml:"globals"`
// This option allows the use of a custom global setup module which exports an async function that is triggered once before all test suites.
//
// This function gets Jest's globalConfig object as a parameter.
// Default: - undefined.
//
// Experimental.
GlobalSetup *string `field:"optional" json:"globalSetup" yaml:"globalSetup"`
// This option allows the use of a custom global teardown module which exports an async function that is triggered once after all test suites.
//
// This function gets Jest's globalConfig object as a parameter.
// Default: - undefined.
//
// Experimental.
GlobalTeardown *string `field:"optional" json:"globalTeardown" yaml:"globalTeardown"`
// This will be used to configure the behavior of jest-haste-map, Jest's internal file crawler/cache system.
// Default: - {}.
//
// Experimental.
Haste *HasteConfig `field:"optional" json:"haste" yaml:"haste"`
// Insert Jest's globals (expect, test, describe, beforeEach etc.) into the global environment. If you set this to false, you should import from.
// Default: - true.
//
// Experimental.
InjectGlobals *bool `field:"optional" json:"injectGlobals" yaml:"injectGlobals"`
// A number limiting the number of tests that are allowed to run at the same time when using test.concurrent. Any test above this limit will be queued and executed once a slot is released.
// Default: - 5.
//
// Experimental.
MaxConcurrency *float64 `field:"optional" json:"maxConcurrency" yaml:"maxConcurrency"`
// Specifies the maximum number of workers the worker-pool will spawn for running tests.
//
// In single run mode,
// this defaults to the number of the cores available on your machine minus one for the main thread
// In watch mode, this defaults to half of the available cores on your machine.
// For environments with variable CPUs available, you can use percentage based configuration: "maxWorkers": "50%".
// Default: - the number of the cores available on your machine minus one for the main thread.
//
// Experimental.
MaxWorkers interface{} `field:"optional" json:"maxWorkers" yaml:"maxWorkers"`
// An array of directory names to be searched recursively up from the requiring module's location.
//
// Setting this option will override the default, if you wish to still search node_modules for packages
// include it along with any other options: ["node_modules", "bower_components"].
// Default: - ["node_modules"].
//
// Experimental.
ModuleDirectories *[]*string `field:"optional" json:"moduleDirectories" yaml:"moduleDirectories"`
// An array of file extensions your modules use.
//
// If you require modules without specifying a file extension,
// these are the extensions Jest will look for, in left-to-right order.
// Default: - ["js", "json", "jsx", "ts", "tsx", "node"].
//
// Experimental.
ModuleFileExtensions *[]*string `field:"optional" json:"moduleFileExtensions" yaml:"moduleFileExtensions"`
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources, like images or styles with a single module.
// Default: - null.
//
// Experimental.
ModuleNameMapper *map[string]interface{} `field:"optional" json:"moduleNameMapper" yaml:"moduleNameMapper"`
// An array of regexp pattern strings that are matched against all module paths before those paths are to be considered 'visible' to the module loader.
//
// If a given module's path matches any of the patterns,
// it will not be require()-able in the test environment.
// Default: - [].
//
// Experimental.
ModulePathIgnorePatterns *[]*string `field:"optional" json:"modulePathIgnorePatterns" yaml:"modulePathIgnorePatterns"`
// An alternative API to setting the NODE_PATH env variable, modulePaths is an array of absolute paths to additional locations to search when resolving modules.
//
// Use the <rootDir> string token to include
// the path to your project's root directory. Example: ["<rootDir>/app/"].
// Default: - [].
//
// Experimental.
ModulePaths *[]*string `field:"optional" json:"modulePaths" yaml:"modulePaths"`
// Activates notifications for test results.
// Default: - false.
//
// Experimental.
Notify *bool `field:"optional" json:"notify" yaml:"notify"`
// Specifies notification mode.
//
// Requires notify: true.
// Default: - failure-change.
//
// Experimental.
NotifyMode *string `field:"optional" json:"notifyMode" yaml:"notifyMode"`
// A preset that is used as a base for Jest's configuration.
//
// A preset should point to an npm module
// that has a jest-preset.json or jest-preset.js file at the root.
// Default: - undefined.
//
// Experimental.
Preset *string `field:"optional" json:"preset" yaml:"preset"`
// Sets the path to the prettier node module used to update inline snapshots.
// Default: - "prettier".
//
// Experimental.
PrettierPath *string `field:"optional" json:"prettierPath" yaml:"prettierPath"`
// When the projects configuration is provided with an array of paths or glob patterns, Jest will run tests in all of the specified projects at the same time.
//
// This is great for monorepos or
// when working on multiple projects at the same time.
// Default: - undefined.
//
// Experimental.
Projects *[]interface{} `field:"optional" json:"projects" yaml:"projects"`
// Use this configuration option to add custom reporters to Jest.
//
// A custom reporter is a class
// that implements onRunStart, onTestStart, onTestResult, onRunComplete methods that will be
// called when any of those events occurs.
// Default: - undefined.
//
// Experimental.
Reporters *[]JestReporter `field:"optional" json:"reporters" yaml:"reporters"`
// Automatically reset mock state before every test.
//
// Equivalent to calling jest.resetAllMocks()
// before each test. This will lead to any mocks having their fake implementations removed but
// does not restore their initial implementation.
// Default: - false.
//
// Experimental.
ResetMocks *bool `field:"optional" json:"resetMocks" yaml:"resetMocks"`
// By default, each test file gets its own independent module registry.
//
// Enabling resetModules
// goes a step further and resets the module registry before running each individual test.
// Default: - false.
//
// Experimental.
ResetModules *bool `field:"optional" json:"resetModules" yaml:"resetModules"`
// This option allows the use of a custom resolver.
//
// https://jestjs.io/docs/en/configuration#resolver-string
// Default: - undefined.
//
// Experimental.
Resolver *string `field:"optional" json:"resolver" yaml:"resolver"`
// Automatically restore mock state before every test.
//
// Equivalent to calling jest.restoreAllMocks()
// before each test. This will lead to any mocks having their fake implementations removed and
// restores their initial implementation.
// Default: - false.
//
// Experimental.
RestoreMocks *bool `field:"optional" json:"restoreMocks" yaml:"restoreMocks"`
// The root directory that Jest should scan for tests and modules within.
//
// If you put your Jest
// config inside your package.json and want the root directory to be the root of your repo, the
// value for this config param will default to the directory of the package.json.
// Default: - directory of the package.json
//
// Experimental.
RootDir *string `field:"optional" json:"rootDir" yaml:"rootDir"`
// A list of paths to directories that Jest should use to search for files in.
// Default: - ["<rootDir>"].
//
// Experimental.
Roots *[]*string `field:"optional" json:"roots" yaml:"roots"`
// This option allows you to use a custom runner instead of Jest's default test runner.
// Default: - "jest-runner".
//
// Experimental.
Runner *string `field:"optional" json:"runner" yaml:"runner"`
// A list of paths to modules that run some code to configure or set up the testing environment.
//
// Each setupFile will be run once per test file. Since every test runs in its own environment,
// these scripts will be executed in the testing environment immediately before executing the
// test code itself.
// Default: - [].
//
// Experimental.
SetupFiles *[]*string `field:"optional" json:"setupFiles" yaml:"setupFiles"`
// A list of paths to modules that run some code to configure or set up the testing framework before each test file in the suite is executed.
//
// Since setupFiles executes before the test
// framework is installed in the environment, this script file presents you the opportunity of
// running some code immediately after the test framework has been installed in the environment.
// Default: - [].
//
// Experimental.
SetupFilesAfterEnv *[]*string `field:"optional" json:"setupFilesAfterEnv" yaml:"setupFilesAfterEnv"`
// The number of seconds after which a test is considered as slow and reported as such in the results.
// Default: - 5.
//
// Experimental.
SlowTestThreshold *float64 `field:"optional" json:"slowTestThreshold" yaml:"slowTestThreshold"`
// The path to a module that can resolve test<->snapshot path.
//
// This config option lets you customize
// where Jest stores snapshot files on disk.
// Default: - undefined.
//
// Experimental.
SnapshotResolver *string `field:"optional" json:"snapshotResolver" yaml:"snapshotResolver"`
// A list of paths to snapshot serializer modules Jest should use for snapshot testing.
// Default: = [].
//
// Experimental.
SnapshotSerializers *[]*string `field:"optional" json:"snapshotSerializers" yaml:"snapshotSerializers"`
// The test environment that will be used for testing.
//
// The default environment in Jest is a
// browser-like environment through jsdom. If you are building a node service, you can use the node
// option to use a node-like environment instead.
// Default: - "jsdom".
//
// Experimental.
TestEnvironment *string `field:"optional" json:"testEnvironment" yaml:"testEnvironment"`
// Test environment options that will be passed to the testEnvironment.
//
// The relevant options depend on the environment.
// Default: - {}.
//
// Experimental.
TestEnvironmentOptions interface{} `field:"optional" json:"testEnvironmentOptions" yaml:"testEnvironmentOptions"`
// The exit code Jest returns on test failure.
// Default: - 1.
//
// Experimental.
TestFailureExitCode *float64 `field:"optional" json:"testFailureExitCode" yaml:"testFailureExitCode"`
// The glob patterns Jest uses to detect test files.
//
// By default it looks for .js, .jsx, .ts and .tsx
// files inside of __tests__ folders, as well as any files with a suffix of .test or .spec
// (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.
// Default: ['**\/__tests__/**\/*.[jt]s?(x)', '**\/?(*.)+(spec|test).[tj]s?(x)']
//
// Experimental.
TestMatch *[]*string `field:"optional" json:"testMatch" yaml:"testMatch"`
// An array of regexp pattern strings that are matched against all test paths before executing the test.
//
// If the test path matches any of the patterns, it will be skipped.
// Default: - ["/node_modules/"].
//
// Experimental.
TestPathIgnorePatterns *[]*string `field:"optional" json:"testPathIgnorePatterns" yaml:"testPathIgnorePatterns"`
// The pattern or patterns Jest uses to detect test files.
//
// By default it looks for .js, .jsx, .ts and .tsx
// files inside of __tests__ folders, as well as any files with a suffix of .test or .spec
// (e.g. Component.test.js or Component.spec.js). It will also find files called test.js or spec.js.
// Default: - (/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$
//
// Experimental.
TestRegex interface{} `field:"optional" json:"testRegex" yaml:"testRegex"`
// This option allows the use of a custom results processor.
// Default: - undefined.
//
// Experimental.
TestResultsProcessor *string `field:"optional" json:"testResultsProcessor" yaml:"testResultsProcessor"`
// This option allows the use of a custom test runner.
//
// The default is jasmine2. A custom test runner
// can be provided by specifying a path to a test runner implementation.
// Default: - "jasmine2".
//
// Experimental.
TestRunner *string `field:"optional" json:"testRunner" yaml:"testRunner"`
// This option allows you to use a custom sequencer instead of Jest's default.
//
// Sort may optionally return a Promise.
// Default: - "@jest/test-sequencer".
//
// Experimental.
TestSequencer *string `field:"optional" json:"testSequencer" yaml:"testSequencer"`
// Default timeout of a test in milliseconds.
// Default: - 5000.
//
// Experimental.
TestTimeout *float64 `field:"optional" json:"testTimeout" yaml:"testTimeout"`
// This option sets the URL for the jsdom environment.
//
// It is reflected in properties such as location.href.
// Default: - "http://localhost".
//
// Experimental.
TestURL *string `field:"optional" json:"testURL" yaml:"testURL"`
// Setting this value to legacy or fake allows the use of fake timers for functions such as setTimeout.
//
// Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.
// Default: - "real".
//
// Experimental.
Timers *string `field:"optional" json:"timers" yaml:"timers"`
// A map from regular expressions to paths to transformers.
//
// A transformer is a module that provides a
// synchronous function for transforming source files.
// Default: - {"\\.[jt]sx?$": "babel-jest"}
//
// Experimental.
Transform *map[string]Transform `field:"optional" json:"transform" yaml:"transform"`
// An array of regexp pattern strings that are matched against all source file paths before transformation.
//
// If the test path matches any of the patterns, it will not be transformed.
// Default: - ["/node_modules/", "\\.pnp\\.[^\\\/]+$"]
//
// Experimental.
TransformIgnorePatterns *[]*string `field:"optional" json:"transformIgnorePatterns" yaml:"transformIgnorePatterns"`
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them.
//
// If a module's path matches any of the patterns in this list, it
// will not be automatically mocked by the module loader.
// Default: - [].
//
// Experimental.
UnmockedModulePathPatterns *[]*string `field:"optional" json:"unmockedModulePathPatterns" yaml:"unmockedModulePathPatterns"`
// Indicates whether each individual test should be reported during the run.
//
// All errors will also
// still be shown on the bottom after execution. Note that if there is only one test file being run
// it will default to true.
// Default: - false.
//
// Experimental.
Verbose *bool `field:"optional" json:"verbose" yaml:"verbose"`
// Whether to use watchman for file crawling.
// Default: - true.
//
// Experimental.
Watchman *bool `field:"optional" json:"watchman" yaml:"watchman"`
// An array of RegExp patterns that are matched against all source file paths before re-running tests in watch mode.
//
// If the file path matches any of the patterns, when it is updated, it will not trigger
// a re-run of tests.
// Default: - [].
//
// Experimental.
WatchPathIgnorePatterns *[]*string `field:"optional" json:"watchPathIgnorePatterns" yaml:"watchPathIgnorePatterns"`
// Default: -.
//
// Experimental.
WatchPlugins *[]WatchPlugin `field:"optional" json:"watchPlugins" yaml:"watchPlugins"`
}
Experimental.
type JestOptions ¶
type JestOptions struct {
// Path to JSON config file for Jest.
// Default: - No separate config file, jest settings are stored in package.json
//
// Experimental.
ConfigFilePath *string `field:"optional" json:"configFilePath" yaml:"configFilePath"`
// Collect coverage.
//
// Deprecated.
// Default: true.
//
// Deprecated: use jestConfig.collectCoverage
Coverage *bool `field:"optional" json:"coverage" yaml:"coverage"`
// Include the `text` coverage reporter, which means that coverage summary is printed at the end of the jest execution.
// Default: true.
//
// Experimental.
CoverageText *bool `field:"optional" json:"coverageText" yaml:"coverageText"`
// Additional options to pass to the Jest CLI invocation.
// Default: - no extra options.
//
// Experimental.
ExtraCliOptions *[]*string `field:"optional" json:"extraCliOptions" yaml:"extraCliOptions"`
// Defines `testPathIgnorePatterns` and `coveragePathIgnorePatterns`.
// Default: ["/node_modules/"].
//
// Deprecated: use jestConfig.coveragePathIgnorePatterns or jestConfig.testPathIgnorePatterns respectively
IgnorePatterns *[]*string `field:"optional" json:"ignorePatterns" yaml:"ignorePatterns"`
// Jest configuration.
// Default: - default jest configuration.
//
// Experimental.
JestConfig *JestConfigOptions `field:"optional" json:"jestConfig" yaml:"jestConfig"`
// The version of jest to use.
//
// Note that same version is used as version of `@types/jest` and `ts-jest` (if Typescript in use), so given version should work also for those.
// Default: - installs the latest jest version.
//
// Experimental.
JestVersion *string `field:"optional" json:"jestVersion" yaml:"jestVersion"`
// Result processing with jest-junit.
//
// Output directory is `test-reports/`.
// Default: true.
//
// Experimental.
JunitReporting *bool `field:"optional" json:"junitReporting" yaml:"junitReporting"`
// Preserve the default Jest reporter when additional reporters are added.
// Default: true.
//
// Experimental.
PreserveDefaultReporters *bool `field:"optional" json:"preserveDefaultReporters" yaml:"preserveDefaultReporters"`
// Whether to update snapshots in task "test" (which is executed in task "build" and build workflows), or create a separate task "test:update" for updating snapshots.
// Default: - ALWAYS.
//
// Experimental.
UpdateSnapshot UpdateSnapshot `field:"optional" json:"updateSnapshot" yaml:"updateSnapshot"`
}
Experimental.
type JestReporter ¶
type JestReporter interface {
}
Experimental.
func NewJestReporter ¶
func NewJestReporter(name *string, options *map[string]interface{}) JestReporter
Experimental.
type LicenseChecker ¶ added in v0.78.2
type LicenseChecker interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Experimental.
Task() projen.Task
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Enforces allowed licenses used by dependencies. Experimental.
func NewLicenseChecker ¶ added in v0.78.2
func NewLicenseChecker(scope constructs.Construct, options *LicenseCheckerOptions) LicenseChecker
Experimental.
type LicenseCheckerOptions ¶ added in v0.78.2
type LicenseCheckerOptions struct {
// List of SPDX license identifiers that are allowed to be used.
//
// For the license check to pass, all detected licenses MUST be in this list.
// Only one of `allowedLicenses` and `prohibitedLicenses` can be provided and must not be empty.
// Default: - no licenses are allowed.
//
// Experimental.
Allow *[]*string `field:"optional" json:"allow" yaml:"allow"`
// List of SPDX license identifiers that are prohibited to be used.
//
// For the license check to pass, no detected licenses can be in this list.
// Only one of `allowedLicenses` and `prohibitedLicenses` can be provided and must not be empty.
// Default: - no licenses are prohibited.
//
// Experimental.
Deny *[]*string `field:"optional" json:"deny" yaml:"deny"`
// Check development dependencies.
// Default: false.
//
// Experimental.
Development *bool `field:"optional" json:"development" yaml:"development"`
// Check production dependencies.
// Default: true.
//
// Experimental.
Production *bool `field:"optional" json:"production" yaml:"production"`
// The name of the task that is added to check licenses.
// Default: "check-licenses".
//
// Experimental.
TaskName *string `field:"optional" json:"taskName" yaml:"taskName"`
}
Options to configure the license checker. Experimental.
type NodePackage ¶
type NodePackage interface {
projen.Component
// Allow project to take library dependencies.
// Experimental.
AllowLibraryDependencies() *bool
// Options for npm packages using AWS CodeArtifact.
//
// This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact.
// Default: - undefined.
//
// Experimental.
CodeArtifactOptions() *CodeArtifactOptions
// The module's entrypoint (e.g. `lib/index.js`).
// Experimental.
Entrypoint() *string
// The package.json file.
// Experimental.
File() projen.JsonFile
// Renders `yarn install` or `npm install` with lockfile update (not frozen).
// Experimental.
InstallAndUpdateLockfileCommand() *string
// The task for installing project dependencies (frozen).
// Experimental.
InstallCiTask() projen.Task
// Returns the command to execute in order to install all dependencies (always frozen).
// Experimental.
InstallCommand() *string
// The task for installing project dependencies (non-frozen).
// Experimental.
InstallTask() projen.Task
// The SPDX license of this module.
//
// `undefined` if this package is not licensed.
// Experimental.
License() *string
// The name of the lock file.
// Experimental.
LockFile() *string
// Deprecated: use `addField(x, y)`.
Manifest() interface{}
// Maximum node version required by this package.
// Default: - no maximum.
//
// Experimental.
MaxNodeVersion() *string
// Minimum node.js version required by this package.
// Default: - no minimum.
//
// Experimental.
MinNodeVersion() *string
// The tree node.
// Experimental.
Node() constructs.Node
// npm package access level.
// Experimental.
NpmAccess() NpmAccess
// Should provenance statements be generated when package is published.
// Experimental.
NpmProvenance() *bool
// The npm registry host (e.g. `registry.npmjs.org`).
// Experimental.
NpmRegistry() *string
// npm registry (e.g. `https://registry.npmjs.org`). Use `npmRegistryHost` to get just the host name.
// Experimental.
NpmRegistryUrl() *string
// GitHub secret which contains the NPM token to use when publishing packages.
// Experimental.
NpmTokenSecret() *string
// The package manager to use.
// Experimental.
PackageManager() NodePackageManager
// The name of the npm package.
// Experimental.
PackageName() *string
// The version of PNPM to use if using PNPM as a package manager.
// Default: "7".
//
// Experimental.
PnpmVersion() *string
// Experimental.
Project() projen.Project
// The command which executes "projen".
// Deprecated: use `project.projenCommand` instead.
ProjenCommand() *string
// Options for privately hosted scoped packages.
// Default: undefined.
//
// Experimental.
ScopedPackagesOptions() *[]*ScopedPackagesOptions
// Experimental.
AddBin(bins *map[string]*string)
// Defines bundled dependencies.
//
// Bundled dependencies will be added as normal dependencies as well as to the
// `bundledDependencies` section of your `package.json`.
// Experimental.
AddBundledDeps(deps ...*string)
// Defines normal dependencies.
// Experimental.
AddDeps(deps ...*string)
// Defines development/test dependencies.
// Experimental.
AddDevDeps(deps ...*string)
// Adds an `engines` requirement to your package.
// Experimental.
AddEngine(engine *string, version *string)
// Directly set fields in `package.json`.
// Experimental.
AddField(name *string, value interface{})
// Adds keywords to package.json (deduplicated).
// Experimental.
AddKeywords(keywords ...*string)
// Defines resolutions for dependencies to change the normally resolved version of a dependency to something else.
// Experimental.
AddPackageResolutions(resolutions ...*string)
// 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.
// Experimental.
AddPeerDeps(deps ...*string)
// Sets the package version.
// Experimental.
AddVersion(version *string)
// Indicates if a script by the given name is defined.
// Deprecated: Use `project.tasks.tryFind(name)`
HasScript(name *string) *bool
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Removes an npm script (always successful).
// Experimental.
RemoveScript(name *string)
// Add a npm package.json script.
// Experimental.
SetScript(name *string, command *string)
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
// Attempt to resolve the currently installed version for a given dependency.
// Experimental.
TryResolveDependencyVersion(dependencyName *string) *string
}
Represents the npm `package.json` file. Experimental.
func NewNodePackage ¶
func NewNodePackage(project projen.Project, options *NodePackageOptions) NodePackage
Experimental.
func NodePackage_Of ¶ added in v0.79.1
func NodePackage_Of(project projen.Project) NodePackage
Returns the `NodePackage` instance associated with a project or `undefined` if there is no NodePackage.
Returns: A NodePackage, or undefined. Experimental.
type NodePackageManager ¶
type NodePackageManager string
The node package manager to use. Experimental.
const ( // Use `yarn` as the package manager. // Deprecated: For `yarn` 1.x use `YARN_CLASSIC` for `yarn` >= 2 use `YARN_BERRY`. Currently, `NodePackageManager.YARN` means `YARN_CLASSIC`. In the future, we might repurpose it to mean `YARN_BERRY`. NodePackageManager_YARN NodePackageManager = "YARN" // Use `yarn` versions >= 2 as the package manager. // Deprecated: use YARN_BERRY instead. NodePackageManager_YARN2 NodePackageManager = "YARN2" // Use `yarn` 1.x as the package manager. // Experimental. NodePackageManager_YARN_CLASSIC NodePackageManager = "YARN_CLASSIC" // Use `yarn` versions >= 2 as the package manager. // Experimental. NodePackageManager_YARN_BERRY NodePackageManager = "YARN_BERRY" // Use `npm` as the package manager. // Experimental. NodePackageManager_NPM NodePackageManager = "NPM" // Use `pnpm` as the package manager. // Experimental. NodePackageManager_PNPM NodePackageManager = "PNPM" // Use `bun` as the package manager. // Experimental. NodePackageManager_BUN NodePackageManager = "BUN" )
type NodePackageOptions ¶
type NodePackageOptions struct {
// 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.
AllowLibraryDependencies *bool `field:"optional" json:"allowLibraryDependencies" yaml:"allowLibraryDependencies"`
// Author's e-mail.
// Experimental.
AuthorEmail *string `field:"optional" json:"authorEmail" yaml:"authorEmail"`
// Author's name.
// Experimental.
AuthorName *string `field:"optional" json:"authorName" yaml:"authorName"`
// Is the author an organization.
// Experimental.
AuthorOrganization *bool `field:"optional" json:"authorOrganization" yaml:"authorOrganization"`
// Author's URL / Website.
// Experimental.
AuthorUrl *string `field:"optional" json:"authorUrl" yaml:"authorUrl"`
// Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
// Default: true.
//
// Experimental.
AutoDetectBin *bool `field:"optional" json:"autoDetectBin" yaml:"autoDetectBin"`
// 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.
Bin *map[string]*string `field:"optional" json:"bin" yaml:"bin"`
// The email address to which issues should be reported.
// Experimental.
BugsEmail *string `field:"optional" json:"bugsEmail" yaml:"bugsEmail"`
// The url to your project's issue tracker.
// Experimental.
BugsUrl *string `field:"optional" json:"bugsUrl" yaml:"bugsUrl"`
// 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 `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.
BundledDeps *[]*string `field:"optional" json:"bundledDeps" yaml:"bundledDeps"`
// Options for npm packages using AWS CodeArtifact.
//
// This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact.
// Default: - undefined.
//
// Experimental.
CodeArtifactOptions *CodeArtifactOptions `field:"optional" json:"codeArtifactOptions" yaml:"codeArtifactOptions"`
// 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.
//
// Example:
// [ 'express', 'lodash', 'foo@^2' ]
//
// Default: [].
//
// Experimental.
Deps *[]*string `field:"optional" json:"deps" yaml:"deps"`
// 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.
Description *string `field:"optional" json:"description" yaml:"description"`
// 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.
//
// Example:
// [ 'typescript', '@types/express' ]
//
// Default: [].
//
// Experimental.
DevDeps *[]*string `field:"optional" json:"devDeps" yaml:"devDeps"`
// Module entrypoint (`main` in `package.json`).
//
// Set to an empty string to not include `main` in your package.json
// Default: "lib/index.js"
//
// Experimental.
Entrypoint *string `field:"optional" json:"entrypoint" yaml:"entrypoint"`
// Package's Homepage / Website.
// Experimental.
Homepage *string `field:"optional" json:"homepage" yaml:"homepage"`
// Keywords to include in `package.json`.
// Experimental.
Keywords *[]*string `field:"optional" json:"keywords" yaml:"keywords"`
// 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"
//
// Experimental.
License *string `field:"optional" json:"license" yaml:"license"`
// Indicates if a license should be added.
// Default: true.
//
// Experimental.
Licensed *bool `field:"optional" json:"licensed" yaml:"licensed"`
// Minimum node.js version to require via `engines` (inclusive).
// Default: - no max.
//
// Experimental.
MaxNodeVersion *string `field:"optional" json:"maxNodeVersion" yaml:"maxNodeVersion"`
// Minimum Node.js version to require via package.json `engines` (inclusive).
// Default: - no "engines" specified.
//
// Experimental.
MinNodeVersion *string `field:"optional" json:"minNodeVersion" yaml:"minNodeVersion"`
// 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.
NpmAccess NpmAccess `field:"optional" json:"npmAccess" yaml:"npmAccess"`
// 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.
//
// Experimental.
NpmProvenance *bool `field:"optional" json:"npmProvenance" yaml:"npmProvenance"`
// The host name of the npm registry to publish to.
//
// Cannot be set together with `npmRegistryUrl`.
// Deprecated: use `npmRegistryUrl` instead.
NpmRegistry *string `field:"optional" json:"npmRegistry" yaml:"npmRegistry"`
// 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.
NpmRegistryUrl *string `field:"optional" json:"npmRegistryUrl" yaml:"npmRegistryUrl"`
// GitHub secret which contains the NPM token to use when publishing packages.
// Default: "NPM_TOKEN".
//
// Experimental.
NpmTokenSecret *string `field:"optional" json:"npmTokenSecret" yaml:"npmTokenSecret"`
// The Node Package Manager used to execute scripts.
// Default: NodePackageManager.YARN_CLASSIC
//
// Experimental.
PackageManager NodePackageManager `field:"optional" json:"packageManager" yaml:"packageManager"`
// The "name" in package.json.
// Default: - defaults to project name.
//
// Experimental.
PackageName *string `field:"optional" json:"packageName" yaml:"packageName"`
// Options for `peerDeps`.
// Experimental.
PeerDependencyOptions *PeerDependencyOptions `field:"optional" json:"peerDependencyOptions" yaml:"peerDependencyOptions"`
// 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.
PeerDeps *[]*string `field:"optional" json:"peerDeps" yaml:"peerDeps"`
// The version of PNPM to use if using PNPM as a package manager.
// Default: "7".
//
// Experimental.
PnpmVersion *string `field:"optional" json:"pnpmVersion" yaml:"pnpmVersion"`
// 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.
Repository *string `field:"optional" json:"repository" yaml:"repository"`
// 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.
RepositoryDirectory *string `field:"optional" json:"repositoryDirectory" yaml:"repositoryDirectory"`
// Options for privately hosted scoped packages.
// Default: - fetch all scoped packages from the public npm registry.
//
// Experimental.
ScopedPackagesOptions *[]*ScopedPackagesOptions `field:"optional" json:"scopedPackagesOptions" yaml:"scopedPackagesOptions"`
// 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.
// Default: {}.
//
// Deprecated: use `project.addTask()` or `package.setScript()`
Scripts *map[string]*string `field:"optional" json:"scripts" yaml:"scripts"`
// Package's Stability.
// Experimental.
Stability *string `field:"optional" json:"stability" yaml:"stability"`
// Options for Yarn Berry.
// Default: - Yarn Berry v4 with all default options.
//
// Experimental.
YarnBerryOptions *YarnBerryOptions `field:"optional" json:"yarnBerryOptions" yaml:"yarnBerryOptions"`
}
Experimental.
type NodeProject ¶
type NodeProject interface {
github.GitHubProject
// Deprecated: use `package.allowLibraryDependencies`
AllowLibraryDependencies() *bool
// 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`.
// Experimental.
ArtifactsDirectory() *string
// The location of the npm tarball after build (`${artifactsDirectory}/js`).
// Experimental.
ArtifactsJavascriptDirectory() *string
// Auto approve set up for this project.
// Deprecated.
AutoApprove() github.AutoApprove
// Component that sets up mergify for merging approved pull requests.
// Experimental.
AutoMerge() github.AutoMerge
// Experimental.
BuildTask() projen.Task
// The PR build GitHub workflow.
//
// `undefined` if `buildWorkflow` is disabled.
// Experimental.
BuildWorkflow() build.BuildWorkflow
// The job ID of the build workflow.
// Experimental.
BuildWorkflowJobId() *string
// Experimental.
Bundler() Bundler
// Whether to commit the managed files by default.
// Experimental.
CommitGenerated() *bool
// Experimental.
CompileTask() projen.Task
// Returns all the components within this project.
// Experimental.
Components() *[]projen.Component
// This is the "default" task, the one that executes "projen".
//
// Undefined if
// the project is being ejected.
// Experimental.
DefaultTask() projen.Task
// Project dependencies.
// Experimental.
Deps() projen.Dependencies
// Access for .devcontainer.json (used for GitHub Codespaces).
//
// This will be `undefined` if devContainer boolean is false.
// Deprecated.
DevContainer() vscode.DevContainer
// Whether or not the project is being ejected.
// Experimental.
Ejected() *bool
// Deprecated: use `package.entrypoint`
Entrypoint() *string
// All files in this project.
// Experimental.
Files() *[]projen.FileBase
// The .gitattributes file for this repository.
// Experimental.
Gitattributes() projen.GitAttributesFile
// Access all github components.
//
// This will be `undefined` for subprojects.
// Deprecated.
Github() github.GitHub
// .gitignore.
// Experimental.
Gitignore() projen.IgnoreFile
// Access for Gitpod.
//
// This will be `undefined` if gitpod boolean is false.
// Deprecated.
Gitpod() projen.Gitpod
// 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.
// Experimental.
InitProject() *projen.InitProject
// The Jest configuration (if enabled).
// Experimental.
Jest() Jest
// Logging utilities.
// Experimental.
Logger() projen.Logger
// Deprecated: use `package.addField(x, y)`
Manifest() interface{}
// Maximum node version required by this package.
// Experimental.
MaxNodeVersion() *string
// Minimum node.js version required by this package.
// Experimental.
MinNodeVersion() *string
// Project name.
// Experimental.
Name() *string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
NodeVersion() *string
// The .npmignore file.
// Experimental.
Npmignore() projen.IgnoreFile
// The .npmrc file.
// Experimental.
Npmrc() NpmConfig
// Absolute output directory of this project.
// Experimental.
Outdir() *string
// API for managing the node package.
// Experimental.
Package() NodePackage
// The package manager to use.
// Deprecated: use `package.packageManager`
PackageManager() NodePackageManager
// Experimental.
PackageTask() projen.Task
// A parent project.
//
// If undefined, this is the root project.
// Experimental.
Parent() projen.Project
// Experimental.
PostCompileTask() projen.Task
// Experimental.
PreCompileTask() projen.Task
// Experimental.
Prettier() Prettier
// Manages the build process of the project.
// Experimental.
ProjectBuild() projen.ProjectBuild
// Deprecated.
ProjectType() projen.ProjectType
// The command to use in order to run the projen CLI.
// Experimental.
ProjenCommand() *string
// Package publisher.
//
// This will be `undefined` if the project does not have a
// release workflow.
// Deprecated: use `release.publisher`.
Publisher() release.Publisher
// Release management.
// Experimental.
Release() release.Release
// The root project.
// Experimental.
Root() projen.Project
// The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
// Experimental.
RunScriptCommand() *string
// Returns all the subprojects within this project.
// Experimental.
Subprojects() *[]projen.Project
// Project tasks.
// Experimental.
Tasks() projen.Tasks
// Experimental.
TestTask() projen.Task
// The upgrade workflow.
// Experimental.
UpgradeWorkflow() UpgradeDependencies
// Access all VSCode components.
//
// This will be `undefined` for subprojects.
// Deprecated.
Vscode() vscode.VsCode
// Experimental.
WorkflowBootstrapSteps() *[]*workflows.JobStep
// Experimental.
WorkflowPackageCache() *bool
// Experimental.
AddBins(bins *map[string]*string)
// Defines bundled dependencies.
//
// Bundled dependencies will be added as normal dependencies as well as to the
// `bundledDependencies` section of your `package.json`.
// Experimental.
AddBundledDeps(deps ...*string)
// DEPRECATED.
// Deprecated: use `project.compileTask.exec()`
AddCompileCommand(commands ...*string)
// Defines normal dependencies.
// Experimental.
AddDeps(deps ...*string)
// Defines development/test dependencies.
// Experimental.
AddDevDeps(deps ...*string)
// 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.
// Experimental.
AddExcludeFromCleanup(globs ...*string)
// Directly set fields in `package.json`.
// Experimental.
AddFields(fields *map[string]interface{})
// Adds a .gitignore pattern.
// Experimental.
AddGitIgnore(pattern *string)
// Adds keywords to package.json (deduplicated).
// Experimental.
AddKeywords(keywords ...*string)
// Adds patterns to be ignored by npm.
// Experimental.
AddPackageIgnore(pattern *string)
// 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.
// Experimental.
AddPeerDeps(deps ...*string)
// Replaces the contents of multiple npm package.json scripts.
// Experimental.
AddScripts(scripts *map[string]*string)
// Adds a new task to this project.
//
// This will fail if the project already has
// a task with this name.
// Experimental.
AddTask(name *string, props *projen.TaskOptions) projen.Task
// DEPRECATED.
// Deprecated: use `project.testTask.exec()`
AddTestCommand(commands ...*string)
// Prints a "tip" message during synthesis.
// Deprecated: - use `project.logger.info(message)` to show messages during synthesis
AddTip(message *string)
// 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.
// See: https://github.com/github/linguist/blob/master/docs/overrides.md
//
// Deprecated.
AnnotateGenerated(glob *string)
// Indicates if a script by the name name is defined.
// Deprecated: Use `project.tasks.tryFind(name)`
HasScript(name *string) *bool
// Called after all components are synthesized.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before all components are synthesized.
// Experimental.
PreSynthesize()
// Removes the npm script (always successful).
// Experimental.
RemoveScript(name *string)
// Removes a task from a project.
//
// Returns: The `Task` that was removed, otherwise `undefined`.
// Experimental.
RemoveTask(name *string) projen.Task
// Returns the set of workflow steps which should be executed to bootstrap a workflow.
//
// Returns: Job steps.
// Experimental.
RenderWorkflowSetup(options *RenderWorkflowSetupOptions) *[]*workflows.JobStep
// Returns the shell command to execute in order to run a task.
//
// This will
// typically be `npx projen TASK`.
// Experimental.
RunTaskCommand(task projen.Task) *string
// Replaces the contents of an npm package.json script.
// Experimental.
SetScript(name *string, command *string)
// 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 "postSynthesize()" for all components of this project
// 6. Call "this.postSynthesize()"
// Experimental.
Synth()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
// Finds a file at the specified relative path within this project and all its subprojects.
//
// Returns: a `FileBase` or undefined if there is no file in that path.
// Experimental.
TryFindFile(filePath *string) projen.FileBase
// Finds a json file by name.
// Deprecated: use `tryFindObjectFile`.
TryFindJsonFile(filePath *string) projen.JsonFile
// Finds an object file (like JsonFile, YamlFile, etc.) by name.
// Experimental.
TryFindObjectFile(filePath *string) projen.ObjectFile
// Finds a file at the specified relative path within this project and removes it.
//
// Returns: a `FileBase` if the file was found and removed, or undefined if
// the file was not found.
// Experimental.
TryRemoveFile(filePath *string) projen.FileBase
}
Node.js project. Experimental.
type NodeProjectOptions ¶
type NodeProjectOptions struct {
// This is the name of your project.
// Default: $BASEDIR.
//
// Experimental.
Name *string `field:"required" json:"name" yaml:"name"`
// Whether to commit the managed files by default.
// Default: true.
//
// Experimental.
CommitGenerated *bool `field:"optional" json:"commitGenerated" yaml:"commitGenerated"`
// Configuration options for .gitignore file.
// Experimental.
GitIgnoreOptions *projen.IgnoreFileOptions `field:"optional" json:"gitIgnoreOptions" yaml:"gitIgnoreOptions"`
// Configuration options for git.
// Experimental.
GitOptions *projen.GitOptions `field:"optional" json:"gitOptions" yaml:"gitOptions"`
// Configure logging options such as verbosity.
// Default: {}.
//
// Experimental.
Logging *projen.LoggerOptions `field:"optional" json:"logging" yaml:"logging"`
// 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: "."
//
// Experimental.
Outdir *string `field:"optional" json:"outdir" yaml:"outdir"`
// The parent project, if this project is part of a bigger project.
// Experimental.
Parent projen.Project `field:"optional" json:"parent" yaml:"parent"`
// The shell command to use in order to run the projen CLI.
//
// Can be used to customize in special environments.
// Default: "npx projen".
//
// Experimental.
ProjenCommand *string `field:"optional" json:"projenCommand" yaml:"projenCommand"`
// Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
// Default: false.
//
// Experimental.
ProjenrcJson *bool `field:"optional" json:"projenrcJson" yaml:"projenrcJson"`
// Options for .projenrc.json.
// Default: - default options.
//
// Experimental.
ProjenrcJsonOptions *projen.ProjenrcJsonOptions `field:"optional" json:"projenrcJsonOptions" yaml:"projenrcJsonOptions"`
// Use renovatebot to handle dependency upgrades.
// Default: false.
//
// Experimental.
Renovatebot *bool `field:"optional" json:"renovatebot" yaml:"renovatebot"`
// Options for renovatebot.
// Default: - default options.
//
// Experimental.
RenovatebotOptions *projen.RenovatebotOptions `field:"optional" json:"renovatebotOptions" yaml:"renovatebotOptions"`
// Enable and configure the 'auto approve' workflow.
// Default: - auto approve is disabled.
//
// Experimental.
AutoApproveOptions *github.AutoApproveOptions `field:"optional" json:"autoApproveOptions" yaml:"autoApproveOptions"`
// Enable automatic merging on GitHub.
//
// Has no effect if `github.mergify`
// is set to false.
// Default: true.
//
// Experimental.
AutoMerge *bool `field:"optional" json:"autoMerge" yaml:"autoMerge"`
// Configure options for automatic merging on GitHub.
//
// Has no effect if
// `github.mergify` or `autoMerge` is set to false.
// Default: - see defaults in `AutoMergeOptions`.
//
// Experimental.
AutoMergeOptions *github.AutoMergeOptions `field:"optional" json:"autoMergeOptions" yaml:"autoMergeOptions"`
// Add a `clobber` task which resets the repo to origin.
// Default: - true, but false for subprojects.
//
// Experimental.
Clobber *bool `field:"optional" json:"clobber" yaml:"clobber"`
// Add a VSCode development environment (used for GitHub Codespaces).
// Default: false.
//
// Experimental.
DevContainer *bool `field:"optional" json:"devContainer" yaml:"devContainer"`
// Enable GitHub integration.
//
// Enabled by default for root projects. Disabled for non-root projects.
// Default: true.
//
// Experimental.
Github *bool `field:"optional" json:"github" yaml:"github"`
// Options for GitHub integration.
// Default: - see GitHubOptions.
//
// Experimental.
GithubOptions *github.GitHubOptions `field:"optional" json:"githubOptions" yaml:"githubOptions"`
// Add a Gitpod development environment.
// Default: false.
//
// Experimental.
Gitpod *bool `field:"optional" json:"gitpod" yaml:"gitpod"`
// Whether mergify should be enabled on this repository or not.
// Default: true.
//
// Deprecated: use `githubOptions.mergify` instead
Mergify *bool `field:"optional" json:"mergify" yaml:"mergify"`
// Options for mergify.
// Default: - default options.
//
// Deprecated: use `githubOptions.mergifyOptions` instead
MergifyOptions *github.MergifyOptions `field:"optional" json:"mergifyOptions" yaml:"mergifyOptions"`
// Which type of project this is (library/app).
// Default: ProjectType.UNKNOWN
//
// Deprecated: no longer supported at the base project level.
ProjectType projen.ProjectType `field:"optional" json:"projectType" yaml:"projectType"`
// Choose a method of providing GitHub API access for projen workflows.
// Default: - use a personal access token named PROJEN_GITHUB_TOKEN.
//
// Experimental.
ProjenCredentials github.GithubCredentials `field:"optional" json:"projenCredentials" yaml:"projenCredentials"`
// 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`.
ProjenTokenSecret *string `field:"optional" json:"projenTokenSecret" yaml:"projenTokenSecret"`
// The README setup.
//
// Example:
// "{ filename: 'readme.md', contents: '# title' }"
//
// Default: - { filename: 'README.md', contents: '# replace this' }
//
// Experimental.
Readme *projen.SampleReadmeProps `field:"optional" json:"readme" yaml:"readme"`
// Auto-close of stale issues and pull request.
//
// See `staleOptions` for options.
// Default: false.
//
// Experimental.
Stale *bool `field:"optional" json:"stale" yaml:"stale"`
// Auto-close stale issues and pull requests.
//
// To disable set `stale` to `false`.
// Default: - see defaults in `StaleOptions`.
//
// Experimental.
StaleOptions *github.StaleOptions `field:"optional" json:"staleOptions" yaml:"staleOptions"`
// Enable VSCode integration.
//
// Enabled by default for root projects. Disabled for non-root projects.
// Default: true.
//
// Experimental.
Vscode *bool `field:"optional" json:"vscode" yaml:"vscode"`
// 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.
AllowLibraryDependencies *bool `field:"optional" json:"allowLibraryDependencies" yaml:"allowLibraryDependencies"`
// Author's e-mail.
// Experimental.
AuthorEmail *string `field:"optional" json:"authorEmail" yaml:"authorEmail"`
// Author's name.
// Experimental.
AuthorName *string `field:"optional" json:"authorName" yaml:"authorName"`
// Is the author an organization.
// Experimental.
AuthorOrganization *bool `field:"optional" json:"authorOrganization" yaml:"authorOrganization"`
// Author's URL / Website.
// Experimental.
AuthorUrl *string `field:"optional" json:"authorUrl" yaml:"authorUrl"`
// Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
// Default: true.
//
// Experimental.
AutoDetectBin *bool `field:"optional" json:"autoDetectBin" yaml:"autoDetectBin"`
// 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.
Bin *map[string]*string `field:"optional" json:"bin" yaml:"bin"`
// The email address to which issues should be reported.
// Experimental.
BugsEmail *string `field:"optional" json:"bugsEmail" yaml:"bugsEmail"`
// The url to your project's issue tracker.
// Experimental.
BugsUrl *string `field:"optional" json:"bugsUrl" yaml:"bugsUrl"`
// 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 `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.
BundledDeps *[]*string `field:"optional" json:"bundledDeps" yaml:"bundledDeps"`
// Options for npm packages using AWS CodeArtifact.
//
// This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact.
// Default: - undefined.
//
// Experimental.
CodeArtifactOptions *CodeArtifactOptions `field:"optional" json:"codeArtifactOptions" yaml:"codeArtifactOptions"`
// 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.
//
// Example:
// [ 'express', 'lodash', 'foo@^2' ]
//
// Default: [].
//
// Experimental.
Deps *[]*string `field:"optional" json:"deps" yaml:"deps"`
// 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.
Description *string `field:"optional" json:"description" yaml:"description"`
// 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.
//
// Example:
// [ 'typescript', '@types/express' ]
//
// Default: [].
//
// Experimental.
DevDeps *[]*string `field:"optional" json:"devDeps" yaml:"devDeps"`
// Module entrypoint (`main` in `package.json`).
//
// Set to an empty string to not include `main` in your package.json
// Default: "lib/index.js"
//
// Experimental.
Entrypoint *string `field:"optional" json:"entrypoint" yaml:"entrypoint"`
// Package's Homepage / Website.
// Experimental.
Homepage *string `field:"optional" json:"homepage" yaml:"homepage"`
// Keywords to include in `package.json`.
// Experimental.
Keywords *[]*string `field:"optional" json:"keywords" yaml:"keywords"`
// 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"
//
// Experimental.
License *string `field:"optional" json:"license" yaml:"license"`
// Indicates if a license should be added.
// Default: true.
//
// Experimental.
Licensed *bool `field:"optional" json:"licensed" yaml:"licensed"`
// Minimum node.js version to require via `engines` (inclusive).
// Default: - no max.
//
// Experimental.
MaxNodeVersion *string `field:"optional" json:"maxNodeVersion" yaml:"maxNodeVersion"`
// Minimum Node.js version to require via package.json `engines` (inclusive).
// Default: - no "engines" specified.
//
// Experimental.
MinNodeVersion *string `field:"optional" json:"minNodeVersion" yaml:"minNodeVersion"`
// 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.
NpmAccess NpmAccess `field:"optional" json:"npmAccess" yaml:"npmAccess"`
// 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.
//
// Experimental.
NpmProvenance *bool `field:"optional" json:"npmProvenance" yaml:"npmProvenance"`
// The host name of the npm registry to publish to.
//
// Cannot be set together with `npmRegistryUrl`.
// Deprecated: use `npmRegistryUrl` instead.
NpmRegistry *string `field:"optional" json:"npmRegistry" yaml:"npmRegistry"`
// 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.
NpmRegistryUrl *string `field:"optional" json:"npmRegistryUrl" yaml:"npmRegistryUrl"`
// GitHub secret which contains the NPM token to use when publishing packages.
// Default: "NPM_TOKEN".
//
// Experimental.
NpmTokenSecret *string `field:"optional" json:"npmTokenSecret" yaml:"npmTokenSecret"`
// The Node Package Manager used to execute scripts.
// Default: NodePackageManager.YARN_CLASSIC
//
// Experimental.
PackageManager NodePackageManager `field:"optional" json:"packageManager" yaml:"packageManager"`
// The "name" in package.json.
// Default: - defaults to project name.
//
// Experimental.
PackageName *string `field:"optional" json:"packageName" yaml:"packageName"`
// Options for `peerDeps`.
// Experimental.
PeerDependencyOptions *PeerDependencyOptions `field:"optional" json:"peerDependencyOptions" yaml:"peerDependencyOptions"`
// 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.
PeerDeps *[]*string `field:"optional" json:"peerDeps" yaml:"peerDeps"`
// The version of PNPM to use if using PNPM as a package manager.
// Default: "7".
//
// Experimental.
PnpmVersion *string `field:"optional" json:"pnpmVersion" yaml:"pnpmVersion"`
// 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.
Repository *string `field:"optional" json:"repository" yaml:"repository"`
// 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.
RepositoryDirectory *string `field:"optional" json:"repositoryDirectory" yaml:"repositoryDirectory"`
// Options for privately hosted scoped packages.
// Default: - fetch all scoped packages from the public npm registry.
//
// Experimental.
ScopedPackagesOptions *[]*ScopedPackagesOptions `field:"optional" json:"scopedPackagesOptions" yaml:"scopedPackagesOptions"`
// 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.
// Default: {}.
//
// Deprecated: use `project.addTask()` or `package.setScript()`
Scripts *map[string]*string `field:"optional" json:"scripts" yaml:"scripts"`
// Package's Stability.
// Experimental.
Stability *string `field:"optional" json:"stability" yaml:"stability"`
// Options for Yarn Berry.
// Default: - Yarn Berry v4 with all default options.
//
// Experimental.
YarnBerryOptions *YarnBerryOptions `field:"optional" json:"yarnBerryOptions" yaml:"yarnBerryOptions"`
// Version requirement of `publib` which is used to publish modules to npm.
// Default: "latest".
//
// Experimental.
JsiiReleaseVersion *string `field:"optional" json:"jsiiReleaseVersion" yaml:"jsiiReleaseVersion"`
// 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.
MajorVersion *float64 `field:"optional" json:"majorVersion" yaml:"majorVersion"`
// 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.
//
// Experimental.
MinMajorVersion *float64 `field:"optional" json:"minMajorVersion" yaml:"minMajorVersion"`
// 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".
//
// Experimental.
NpmDistTag *string `field:"optional" json:"npmDistTag" yaml:"npmDistTag"`
// Steps to execute after build as part of the release workflow.
// Default: [].
//
// Experimental.
PostBuildSteps *[]*workflows.JobStep `field:"optional" json:"postBuildSteps" yaml:"postBuildSteps"`
// Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
// Default: - normal semantic versions.
//
// Experimental.
Prerelease *string `field:"optional" json:"prerelease" yaml:"prerelease"`
// Instead of actually publishing to package managers, just print the publishing command.
// Default: false.
//
// Experimental.
PublishDryRun *bool `field:"optional" json:"publishDryRun" yaml:"publishDryRun"`
// 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.
//
// Experimental.
PublishTasks *bool `field:"optional" json:"publishTasks" yaml:"publishTasks"`
// Find commits that should be considered releasable Used to decide if a release is required.
// Default: ReleasableCommits.everyCommit()
//
// Experimental.
ReleasableCommits projen.ReleasableCommits `field:"optional" json:"releasableCommits" yaml:"releasableCommits"`
// 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.
ReleaseBranches *map[string]*release.BranchOptions `field:"optional" json:"releaseBranches" yaml:"releaseBranches"`
// Automatically release new versions every commit to one of branches in `releaseBranches`.
// Default: true.
//
// Deprecated: Use `releaseTrigger: ReleaseTrigger.continuous()` instead
ReleaseEveryCommit *bool `field:"optional" json:"releaseEveryCommit" yaml:"releaseEveryCommit"`
// Create a github issue on every failed publishing task.
// Default: false.
//
// Experimental.
ReleaseFailureIssue *bool `field:"optional" json:"releaseFailureIssue" yaml:"releaseFailureIssue"`
// The label to apply to issues indicating publish failures.
//
// Only applies if `releaseFailureIssue` is true.
// Default: "failed-release".
//
// Experimental.
ReleaseFailureIssueLabel *string `field:"optional" json:"releaseFailureIssueLabel" yaml:"releaseFailureIssueLabel"`
// CRON schedule to trigger new releases.
// Default: - no scheduled releases.
//
// Deprecated: Use `releaseTrigger: ReleaseTrigger.scheduled()` instead
ReleaseSchedule *string `field:"optional" json:"releaseSchedule" yaml:"releaseSchedule"`
// 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".
//
// Experimental.
ReleaseTagPrefix *string `field:"optional" json:"releaseTagPrefix" yaml:"releaseTagPrefix"`
// The release trigger to use.
// Default: - Continuous releases (`ReleaseTrigger.continuous()`)
//
// Experimental.
ReleaseTrigger release.ReleaseTrigger `field:"optional" json:"releaseTrigger" yaml:"releaseTrigger"`
// The name of the default release workflow.
// Default: "release".
//
// Experimental.
ReleaseWorkflowName *string `field:"optional" json:"releaseWorkflowName" yaml:"releaseWorkflowName"`
// A set of workflow steps to execute in order to setup the workflow container.
// Experimental.
ReleaseWorkflowSetupSteps *[]*workflows.JobStep `field:"optional" json:"releaseWorkflowSetupSteps" yaml:"releaseWorkflowSetupSteps"`
// Custom configuration used when creating changelog with standard-version package.
//
// Given values either append to default configuration or overwrite values in it.
// Default: - standard configuration applicable for GitHub repositories.
//
// Experimental.
VersionrcOptions *map[string]interface{} `field:"optional" json:"versionrcOptions" yaml:"versionrcOptions"`
// Container image to use for GitHub workflows.
// Default: - default image.
//
// Experimental.
WorkflowContainerImage *string `field:"optional" json:"workflowContainerImage" yaml:"workflowContainerImage"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
WorkflowRunsOn *[]*string `field:"optional" json:"workflowRunsOn" yaml:"workflowRunsOn"`
// Github Runner Group selection options.
// Experimental.
WorkflowRunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"workflowRunsOnGroup" yaml:"workflowRunsOnGroup"`
// The name of the main release branch.
// Default: "main".
//
// Experimental.
DefaultReleaseBranch *string `field:"required" json:"defaultReleaseBranch" yaml:"defaultReleaseBranch"`
// A directory which will contain build artifacts.
// Default: "dist".
//
// Experimental.
ArtifactsDirectory *string `field:"optional" json:"artifactsDirectory" yaml:"artifactsDirectory"`
// 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.
AutoApproveUpgrades *bool `field:"optional" json:"autoApproveUpgrades" yaml:"autoApproveUpgrades"`
// Define a GitHub workflow for building PRs.
// Default: - true if not a subproject.
//
// Experimental.
BuildWorkflow *bool `field:"optional" json:"buildWorkflow" yaml:"buildWorkflow"`
// Options for PR build workflow.
// Experimental.
BuildWorkflowOptions *BuildWorkflowOptions `field:"optional" json:"buildWorkflowOptions" yaml:"buildWorkflowOptions"`
// Build workflow triggers.
// Default: "{ pullRequest: {}, workflowDispatch: {} }".
//
// Deprecated: - Use `buildWorkflowOptions.workflowTriggers`
BuildWorkflowTriggers *workflows.Triggers `field:"optional" json:"buildWorkflowTriggers" yaml:"buildWorkflowTriggers"`
// Options for `Bundler`.
// Experimental.
BundlerOptions *BundlerOptions `field:"optional" json:"bundlerOptions" yaml:"bundlerOptions"`
// 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.
//
// Experimental.
CheckLicenses *LicenseCheckerOptions `field:"optional" json:"checkLicenses" yaml:"checkLicenses"`
// Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with `@codeCovTokenSecret`.
// Default: false.
//
// Experimental.
CodeCov *bool `field:"optional" json:"codeCov" yaml:"codeCov"`
// 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.
CodeCovTokenSecret *string `field:"optional" json:"codeCovTokenSecret" yaml:"codeCovTokenSecret"`
// License copyright owner.
// Default: - defaults to the value of authorName or "" if `authorName` is undefined.
//
// Experimental.
CopyrightOwner *string `field:"optional" json:"copyrightOwner" yaml:"copyrightOwner"`
// The copyright years to put in the LICENSE file.
// Default: - current year.
//
// Experimental.
CopyrightPeriod *string `field:"optional" json:"copyrightPeriod" yaml:"copyrightPeriod"`
// Use dependabot to handle dependency upgrades.
//
// Cannot be used in conjunction with `depsUpgrade`.
// Default: false.
//
// Experimental.
Dependabot *bool `field:"optional" json:"dependabot" yaml:"dependabot"`
// Options for dependabot.
// Default: - default options.
//
// Experimental.
DependabotOptions *github.DependabotOptions `field:"optional" json:"dependabotOptions" yaml:"dependabotOptions"`
// Use tasks and github workflows to handle dependency upgrades.
//
// Cannot be used in conjunction with `dependabot`.
// Default: true.
//
// Experimental.
DepsUpgrade *bool `field:"optional" json:"depsUpgrade" yaml:"depsUpgrade"`
// Options for `UpgradeDependencies`.
// Default: - default options.
//
// Experimental.
DepsUpgradeOptions *UpgradeDependenciesOptions `field:"optional" json:"depsUpgradeOptions" yaml:"depsUpgradeOptions"`
// Additional entries to .gitignore.
// Experimental.
Gitignore *[]*string `field:"optional" json:"gitignore" yaml:"gitignore"`
// Setup jest unit tests.
// Default: true.
//
// Experimental.
Jest *bool `field:"optional" json:"jest" yaml:"jest"`
// Jest options.
// Default: - default options.
//
// Experimental.
JestOptions *JestOptions `field:"optional" json:"jestOptions" yaml:"jestOptions"`
// 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`
MutableBuild *bool `field:"optional" json:"mutableBuild" yaml:"mutableBuild"`
// Additional entries to .npmignore.
// Deprecated: - use `project.addPackageIgnore`
Npmignore *[]*string `field:"optional" json:"npmignore" yaml:"npmignore"`
// Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
// Default: true.
//
// Experimental.
NpmignoreEnabled *bool `field:"optional" json:"npmignoreEnabled" yaml:"npmignoreEnabled"`
// Configuration options for .npmignore file.
// Experimental.
NpmIgnoreOptions *projen.IgnoreFileOptions `field:"optional" json:"npmIgnoreOptions" yaml:"npmIgnoreOptions"`
// Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
// Default: true.
//
// Experimental.
Package *bool `field:"optional" json:"package" yaml:"package"`
// Setup prettier.
// Default: false.
//
// Experimental.
Prettier *bool `field:"optional" json:"prettier" yaml:"prettier"`
// Prettier options.
// Default: - default options.
//
// Experimental.
PrettierOptions *PrettierOptions `field:"optional" json:"prettierOptions" yaml:"prettierOptions"`
// Indicates of "projen" should be installed as a devDependency.
// Default: - true if not a subproject.
//
// Experimental.
ProjenDevDependency *bool `field:"optional" json:"projenDevDependency" yaml:"projenDevDependency"`
// Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
// Default: - true if projenrcJson is false.
//
// Experimental.
ProjenrcJs *bool `field:"optional" json:"projenrcJs" yaml:"projenrcJs"`
// Options for .projenrc.js.
// Default: - default options.
//
// Experimental.
ProjenrcJsOptions *ProjenrcOptions `field:"optional" json:"projenrcJsOptions" yaml:"projenrcJsOptions"`
// Version of projen to install.
// Default: - Defaults to the latest version.
//
// Experimental.
ProjenVersion *string `field:"optional" json:"projenVersion" yaml:"projenVersion"`
// Include a GitHub pull request template.
// Default: true.
//
// Experimental.
PullRequestTemplate *bool `field:"optional" json:"pullRequestTemplate" yaml:"pullRequestTemplate"`
// The contents of the pull request template.
// Default: - default content.
//
// Experimental.
PullRequestTemplateContents *[]*string `field:"optional" json:"pullRequestTemplateContents" yaml:"pullRequestTemplateContents"`
// Add release management to this project.
// Default: - true (false for subprojects).
//
// Experimental.
Release *bool `field:"optional" json:"release" yaml:"release"`
// Automatically release to npm when new versions are introduced.
// Default: false.
//
// Experimental.
ReleaseToNpm *bool `field:"optional" json:"releaseToNpm" yaml:"releaseToNpm"`
// DEPRECATED: renamed to `release`.
// Default: - true if not a subproject.
//
// Deprecated: see `release`.
ReleaseWorkflow *bool `field:"optional" json:"releaseWorkflow" yaml:"releaseWorkflow"`
// Workflow steps to use in order to bootstrap this repo.
// Default: "yarn install --frozen-lockfile && yarn projen".
//
// Experimental.
WorkflowBootstrapSteps *[]*workflows.JobStep `field:"optional" json:"workflowBootstrapSteps" yaml:"workflowBootstrapSteps"`
// The git identity to use in workflows.
// Default: - GitHub Actions.
//
// Experimental.
WorkflowGitIdentity *github.GitIdentity `field:"optional" json:"workflowGitIdentity" yaml:"workflowGitIdentity"`
// The node version to use in GitHub workflows.
// Default: - same as `minNodeVersion`.
//
// Experimental.
WorkflowNodeVersion *string `field:"optional" json:"workflowNodeVersion" yaml:"workflowNodeVersion"`
// Enable Node.js package cache in GitHub workflows.
// Default: false.
//
// Experimental.
WorkflowPackageCache *bool `field:"optional" json:"workflowPackageCache" yaml:"workflowPackageCache"`
}
Experimental.
type NpmConfig ¶
type NpmConfig interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// configure a generic property.
// Experimental.
AddConfig(name *string, value *string)
// configure a scoped registry.
// Experimental.
AddRegistry(url *string, scope *string)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
File representing the local NPM config in .npmrc. Experimental.
func NewNpmConfig ¶
func NewNpmConfig(project NodeProject, options *NpmConfigOptions) NpmConfig
Experimental.
type NpmConfigOptions ¶
type NpmConfigOptions struct {
// Omits empty objects and arrays.
// Default: false.
//
// Experimental.
OmitEmpty *bool `field:"optional" json:"omitEmpty" yaml:"omitEmpty"`
// URL of the registry mirror to use.
//
// You can change this or add scoped registries using the addRegistry method.
// Default: - use npmjs default registry.
//
// Experimental.
Registry *string `field:"optional" json:"registry" yaml:"registry"`
}
Options to configure the local NPM config. Experimental.
type PeerDependencyOptions ¶
type PeerDependencyOptions struct {
// Automatically add a pinned dev dependency.
// Default: true.
//
// Experimental.
PinnedDevDependency *bool `field:"optional" json:"pinnedDevDependency" yaml:"pinnedDevDependency"`
}
Experimental.
type Prettier ¶
type Prettier interface {
projen.Component
// The .prettierIgnore file.
// Experimental.
IgnoreFile() projen.IgnoreFile
// The tree node.
// Experimental.
Node() constructs.Node
// Returns all Prettier overrides.
// Experimental.
Overrides() *[]*PrettierOverride
// Experimental.
Project() projen.Project
// Direct access to the prettier settings.
// Experimental.
Settings() *PrettierSettings
// Defines Prettier ignore Patterns these patterns will be added to the file .prettierignore.
// Experimental.
AddIgnorePattern(pattern *string)
// Add a prettier override.
// See: https://prettier.io/docs/en/configuration.html#configuration-overrides
//
// Experimental.
AddOverride(override *PrettierOverride)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Represents prettier configuration. Experimental.
func NewPrettier ¶
func NewPrettier(project NodeProject, options *PrettierOptions) Prettier
Experimental.
type PrettierOptions ¶
type PrettierOptions struct {
// Defines an .prettierIgnore file.
// Default: true.
//
// Experimental.
IgnoreFile *bool `field:"optional" json:"ignoreFile" yaml:"ignoreFile"`
// Configuration options for .prettierignore file.
// Experimental.
IgnoreFileOptions *projen.IgnoreFileOptions `field:"optional" json:"ignoreFileOptions" yaml:"ignoreFileOptions"`
// Provide a list of patterns to override prettier configuration.
// See: https://prettier.io/docs/en/configuration.html#configuration-overrides
//
// Default: [].
//
// Experimental.
Overrides *[]*PrettierOverride `field:"optional" json:"overrides" yaml:"overrides"`
// Prettier settings.
// Default: - default settings.
//
// Experimental.
Settings *PrettierSettings `field:"optional" json:"settings" yaml:"settings"`
// Write prettier configuration as YAML instead of JSON.
// Default: false.
//
// Experimental.
Yaml *bool `field:"optional" json:"yaml" yaml:"yaml"`
}
Options for Prettier. Experimental.
type PrettierOverride ¶
type PrettierOverride struct {
// Include these files in this override.
// Experimental.
Files interface{} `field:"required" json:"files" yaml:"files"`
// The options to apply for this override.
// Experimental.
Options *PrettierSettings `field:"required" json:"options" yaml:"options"`
// Exclude these files from this override.
// Experimental.
ExcludeFiles interface{} `field:"optional" json:"excludeFiles" yaml:"excludeFiles"`
}
Experimental.
type PrettierSettings ¶
type PrettierSettings struct {
// Include parentheses around a sole arrow function parameter.
// Default: ArrowParens.ALWAYS
//
// Experimental.
ArrowParens ArrowParens `field:"optional" json:"arrowParens" yaml:"arrowParens"`
// Put > of opening tags on the last line instead of on a new line.
// Default: false.
//
// Experimental.
BracketSameLine *bool `field:"optional" json:"bracketSameLine" yaml:"bracketSameLine"`
// Print spaces between brackets.
// Default: true.
//
// Experimental.
BracketSpacing *bool `field:"optional" json:"bracketSpacing" yaml:"bracketSpacing"`
// Print (to stderr) where a cursor at the given position would move to after formatting.
//
// This option cannot be used with --range-start and --range-end.
// Default: -1.
//
// Experimental.
CursorOffset *float64 `field:"optional" json:"cursorOffset" yaml:"cursorOffset"`
// Control how Prettier formats quoted code embedded in the file.
// Default: EmbeddedLanguageFormatting.AUTO
//
// Experimental.
EmbeddedLanguageFormatting EmbeddedLanguageFormatting `field:"optional" json:"embeddedLanguageFormatting" yaml:"embeddedLanguageFormatting"`
// Which end of line characters to apply.
// Default: EndOfLine.LF
//
// Experimental.
EndOfLine EndOfLine `field:"optional" json:"endOfLine" yaml:"endOfLine"`
// Specify the input filepath.
//
// This will be used to do parser inference.
// Default: none.
//
// Experimental.
Filepath *string `field:"optional" json:"filepath" yaml:"filepath"`
// How to handle whitespaces in HTML.
// Default: HTMLWhitespaceSensitivity.CSS
//
// Experimental.
HtmlWhitespaceSensitivity HTMLWhitespaceSensitivity `field:"optional" json:"htmlWhitespaceSensitivity" yaml:"htmlWhitespaceSensitivity"`
// Insert.
// Default: false.
//
// Experimental.
InsertPragma *bool `field:"optional" json:"insertPragma" yaml:"insertPragma"`
// Use single quotes in JSX.
// Default: false.
//
// Experimental.
JsxSingleQuote *bool `field:"optional" json:"jsxSingleQuote" yaml:"jsxSingleQuote"`
// Which parser to use.
// Default: - Prettier automatically infers the parser from the input file path, so you shouldn’t have to change this setting.
//
// Experimental.
Parser *string `field:"optional" json:"parser" yaml:"parser"`
// Add a plugin.
//
// Multiple plugins can be passed as separate `--plugin`s.
// Default: [].
//
// Experimental.
Plugins *[]*string `field:"optional" json:"plugins" yaml:"plugins"`
// Custom directory that contains prettier plugins in node_modules subdirectory.
//
// Overrides default behavior when plugins are searched relatively to the location of
// Prettier.
// Multiple values are accepted.
// Default: [].
//
// Experimental.
PluginSearchDirs *[]*string `field:"optional" json:"pluginSearchDirs" yaml:"pluginSearchDirs"`
// The line length where Prettier will try wrap.
// Default: 80.
//
// Experimental.
PrintWidth *float64 `field:"optional" json:"printWidth" yaml:"printWidth"`
// How to wrap prose.
// Default: ProseWrap.PRESERVE
//
// Experimental.
ProseWrap ProseWrap `field:"optional" json:"proseWrap" yaml:"proseWrap"`
// Change when properties in objects are quoted.
// Default: QuoteProps.ASNEEDED
//
// Experimental.
QuoteProps QuoteProps `field:"optional" json:"quoteProps" yaml:"quoteProps"`
// Format code ending at a given character offset (exclusive).
//
// The range will extend forwards to the end of the selected statement.
// This option cannot be used with --cursor-offset.
// Default: null.
//
// Experimental.
RangeEnd *float64 `field:"optional" json:"rangeEnd" yaml:"rangeEnd"`
// Format code starting at a given character offset.
//
// The range will extend backwards to the start of the first line containing the selected
// statement.
// This option cannot be used with --cursor-offset.
// Default: 0.
//
// Experimental.
RangeStart *float64 `field:"optional" json:"rangeStart" yaml:"rangeStart"`
// Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.
// Default: false.
//
// Experimental.
RequirePragma *bool `field:"optional" json:"requirePragma" yaml:"requirePragma"`
// Print semicolons.
// Default: true.
//
// Experimental.
Semi *bool `field:"optional" json:"semi" yaml:"semi"`
// Use single quotes instead of double quotes.
// Default: false.
//
// Experimental.
SingleQuote *bool `field:"optional" json:"singleQuote" yaml:"singleQuote"`
// Number of spaces per indentation level.
// Default: 2.
//
// Experimental.
TabWidth *float64 `field:"optional" json:"tabWidth" yaml:"tabWidth"`
// Print trailing commas wherever possible when multi-line.
// Default: TrailingComma.ES5
//
// Experimental.
TrailingComma TrailingComma `field:"optional" json:"trailingComma" yaml:"trailingComma"`
// Indent with tabs instead of spaces.
// Default: false.
//
// Experimental.
UseTabs *bool `field:"optional" json:"useTabs" yaml:"useTabs"`
// Indent script and style tags in Vue files.
// Default: false.
//
// Experimental.
VueIndentScriptAndStyle *bool `field:"optional" json:"vueIndentScriptAndStyle" yaml:"vueIndentScriptAndStyle"`
}
Options to set in Prettier directly or through overrides. See: https://prettier.io/docs/en/options.html
Experimental.
type Projenrc ¶
type Projenrc interface {
projen.ProjenrcFile
// The path of the projenrc file.
// Experimental.
FilePath() *string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Sets up a javascript project to use TypeScript for projenrc. Experimental.
func NewProjenrc ¶
func NewProjenrc(project projen.Project, options *ProjenrcOptions) Projenrc
Experimental.
type ProjenrcOptions ¶
type ProjenrcOptions struct {
// The name of the projenrc file.
// Default: ".projenrc.js"
//
// Experimental.
Filename *string `field:"optional" json:"filename" yaml:"filename"`
}
Experimental.
type QuoteProps ¶
type QuoteProps string
Experimental.
const ( // Only add quotes around object properties where required. // Experimental. QuoteProps_ASNEEDED QuoteProps = "ASNEEDED" // If at least one property in an object requires quotes, quote all properties. // Experimental. QuoteProps_CONSISTENT QuoteProps = "CONSISTENT" // Respect the input use of quotes in object properties. // Experimental. QuoteProps_PRESERVE QuoteProps = "PRESERVE" )
type RenderWorkflowSetupOptions ¶
type RenderWorkflowSetupOptions struct {
// Configure the install step in the workflow setup.
//
// Example:
// - { env: { NPM_TOKEN: "token" }} for installing from private npm registry.
//
// Default: - `{ name: "Install dependencies" }`.
//
// Experimental.
InstallStepConfiguration *workflows.JobStepConfiguration `field:"optional" json:"installStepConfiguration" yaml:"installStepConfiguration"`
// Should the package lockfile be updated?
// Default: false.
//
// Experimental.
Mutable *bool `field:"optional" json:"mutable" yaml:"mutable"`
}
Options for `renderWorkflowSetup()`. Experimental.
type RunBundleTask ¶ added in v0.79.23
type RunBundleTask string
Options for BundlerOptions.runBundleTask. Experimental.
const ( // Don't bundle automatically as part of the build. // Experimental. RunBundleTask_MANUAL RunBundleTask = "MANUAL" // Bundle automatically before compilation. // Experimental. RunBundleTask_PRE_COMPILE RunBundleTask = "PRE_COMPILE" // Bundle automatically after compilation. This is useful if you want to bundle the compiled results. // // Thus will run compilation tasks (using tsc, etc.) before running file // through bundling step. // // This is only required unless you are using new experimental features that // are not supported by `esbuild` but are supported by typescript's `tsc` // compiler. One example of such feature is `emitDecoratorMetadata`. // // “`typescript // // In a TypeScript project with output configured // // to go to the "lib" directory: // const project = new TypeScriptProject({ // name: "test", // defaultReleaseBranch: "main", // tsconfig: { // compilerOptions: { // outDir: "lib", // }, // }, // bundlerOptions: { // // ensure we compile with `tsc` before bundling // runBundleTask: RunBundleTask.POST_COMPILE, // }, // }); // // // Tell the bundler to bundle the compiled results (from the "lib" directory) // project.bundler.addBundle("./lib/index.js", { // platform: "node", // target: "node18", // sourcemap: false, // format: "esm", // }); // “`. // Experimental. RunBundleTask_POST_COMPILE RunBundleTask = "POST_COMPILE" )
type ScopedPackagesOptions ¶
type ScopedPackagesOptions struct {
// URL of the registry for scoped packages.
// Experimental.
RegistryUrl *string `field:"required" json:"registryUrl" yaml:"registryUrl"`
// Scope of the packages.
//
// Example:
// "@angular"
//
// Experimental.
Scope *string `field:"required" json:"scope" yaml:"scope"`
}
Options for scoped packages. Experimental.
type SourceMapMode ¶ added in v0.79.23
type SourceMapMode string
SourceMap mode for esbuild. See: https://esbuild.github.io/api/#sourcemap
Experimental.
const ( // Default sourceMap mode - will generate a .js.map file alongside any generated .js file and add a special //# sourceMappingURL= comment to the bottom of the .js file pointing to the .js.map file. // Experimental. SourceMapMode_DEFAULT SourceMapMode = "DEFAULT" // External sourceMap mode - If you want to omit the special //# sourceMappingURL= comment from the generated .js file but you still want to generate the .js.map files. // Experimental. SourceMapMode_EXTERNAL SourceMapMode = "EXTERNAL" // Inline sourceMap mode - If you want to insert the entire source map into the .js file instead of generating a separate .js.map file. // Experimental. SourceMapMode_INLINE SourceMapMode = "INLINE" // Both sourceMap mode - If you want to have the effect of both inline and external simultaneously. // Experimental. SourceMapMode_BOTH SourceMapMode = "BOTH" )
type TrailingComma ¶
type TrailingComma string
Experimental.
const ( // Trailing commas wherever possible (including function arguments). // Experimental. TrailingComma_ALL TrailingComma = "ALL" // Trailing commas where valid in ES5 (objects, arrays, etc.). // Experimental. TrailingComma_ES5 TrailingComma = "ES5" // No trailing commas. // Experimental. TrailingComma_NONE TrailingComma = "NONE" )
type TypeScriptCompilerOptions ¶
type TypeScriptCompilerOptions struct {
// Suppress arbitrary extension import errors with the assumption that a bundler will be handling it.
// See: https://www.typescriptlang.org/tsconfig#allowArbitraryExtensions
//
// Default: undefined.
//
// Experimental.
AllowArbitraryExtensions *bool `field:"optional" json:"allowArbitraryExtensions" yaml:"allowArbitraryExtensions"`
// Allows TypeScript files to import each other with TypeScript-specific extensions (`.ts`, `.mts`, `.tsx`). Requires `noEmit` or `emitDeclarationOnly`.
// Default: undefined.
//
// Experimental.
AllowImportingTsExtensions *bool `field:"optional" json:"allowImportingTsExtensions" yaml:"allowImportingTsExtensions"`
// Allow JavaScript files to be compiled.
// Default: false.
//
// Experimental.
AllowJs *bool `field:"optional" json:"allowJs" yaml:"allowJs"`
// Allow default imports from modules with no default export.
//
// This does not affect code emit, just typechecking.
// Experimental.
AllowSyntheticDefaultImports *bool `field:"optional" json:"allowSyntheticDefaultImports" yaml:"allowSyntheticDefaultImports"`
// Allow Unreachable Code.
//
// When:
//
// - `undefined` (default) provide suggestions as warnings to editors
// - `true` unreachable code is ignored
// - `false` raises compiler errors about unreachable code
//
// These warnings are only about code which is provably unreachable due to the use of JavaScript syntax.
// See: https://www.typescriptlang.org/tsconfig#allowUnreachableCode
//
// Experimental.
AllowUnreachableCode *bool `field:"optional" json:"allowUnreachableCode" yaml:"allowUnreachableCode"`
// Allow Unused Labels.
//
// When:
//
// - `undefined` (default) provide suggestions as warnings to editors
// - `true` unused labels are ignored
// - `false` raises compiler errors about unused labels
//
// Labels are very rare in JavaScript and typically indicate an attempt to write an object literal:
//
// “`ts
// function verifyAge(age: number) {
// // Forgot 'return' statement
// if (age > 18) {
// verified: true;
// // ^^^^^^^^ Unused label.
// }
// }
// “`.
// See: https://www.typescriptlang.org/tsconfig#allowUnusedLabels
//
// Experimental.
AllowUnusedLabels *bool `field:"optional" json:"allowUnusedLabels" yaml:"allowUnusedLabels"`
// Ensures that your files are parsed in the ECMAScript strict mode, and emit “use strict” for each source file.
// Default: true.
//
// Experimental.
AlwaysStrict *bool `field:"optional" json:"alwaysStrict" yaml:"alwaysStrict"`
// Lets you set a base directory to resolve non-absolute module names.
//
// You can define a root folder where you can do absolute file resolution.
// Experimental.
BaseUrl *string `field:"optional" json:"baseUrl" yaml:"baseUrl"`
// Check JS.
//
// Works in tandem with [allowJs](https://www.typescriptlang.org/tsconfig#allowJs). When checkJs is enabled then
// errors are reported in JavaScript files. This is the equivalent of including //
// See: https://www.typescriptlang.org/tsconfig#checkJs
//
// Experimental.
CheckJs *bool `field:"optional" json:"checkJs" yaml:"checkJs"`
// List of additional conditions that should succeed when TypeScript resolves from an `exports` or `imports` field of a `package.json`.
// See: https://www.typescriptlang.org/tsconfig#customConditions
//
// Default: undefined.
//
// Experimental.
CustomConditions *[]*string `field:"optional" json:"customConditions" yaml:"customConditions"`
// To be specified along with the above.
// Experimental.
Declaration *bool `field:"optional" json:"declaration" yaml:"declaration"`
// Offers a way to configure the root directory for where declaration files are emitted.
// Experimental.
DeclarationDir *string `field:"optional" json:"declarationDir" yaml:"declarationDir"`
// Generates a source map for .d.ts files which map back to the original .ts source file. This will allow editors such as VS Code to go to the original .ts file when using features like Go to Definition.
// See: {@link https://www.typescriptlang.org/tsconfig#declarationMap}
//
// Experimental.
DeclarationMap *bool `field:"optional" json:"declarationMap" yaml:"declarationMap"`
// Downleveling is TypeScript’s term for transpiling to an older version of JavaScript.
//
// This flag is to enable support for a more accurate implementation of how modern JavaScript iterates through new concepts in older JavaScript runtimes.
//
// ECMAScript 6 added several new iteration primitives: the for / of loop (for (el of arr)), Array spread ([a, ...b]), argument spread (fn(...args)), and Symbol.iterator.
// downlevelIteration allows for these iteration primitives to be used more accurately in ES5 environments if a Symbol.iterator implementation is present.
// Experimental.
DownlevelIteration *bool `field:"optional" json:"downlevelIteration" yaml:"downlevelIteration"`
// Only emit .d.ts files; do not emit .js files.
// Default: false.
//
// Experimental.
EmitDeclarationOnly *bool `field:"optional" json:"emitDeclarationOnly" yaml:"emitDeclarationOnly"`
// Enables experimental support for decorators, which is in stage 2 of the TC39 standardization process.
//
// Decorators are a language feature which hasn’t yet been fully ratified into the JavaScript specification.
// This means that the implementation version in TypeScript may differ from the implementation in JavaScript when it it decided by TC39.
// You can find out more about decorator support in TypeScript in the handbook.
// See: https://www.typescriptlang.org/docs/handbook/decorators.html
//
// Default: undefined.
//
// Experimental.
EmitDecoratorMetadata *bool `field:"optional" json:"emitDecoratorMetadata" yaml:"emitDecoratorMetadata"`
// Emit __importStar and __importDefault helpers for runtime babel ecosystem compatibility and enable --allowSyntheticDefaultImports for typesystem compatibility.
// Default: false.
//
// Experimental.
EsModuleInterop *bool `field:"optional" json:"esModuleInterop" yaml:"esModuleInterop"`
// Specifies that optional property types should be interpreted exactly as written, meaning that `| undefined` is not added to the type Available with TypeScript 4.4 and newer.
// Default: false.
//
// Experimental.
ExactOptionalPropertyTypes *bool `field:"optional" json:"exactOptionalPropertyTypes" yaml:"exactOptionalPropertyTypes"`
// Enables experimental support for decorators, which is in stage 2 of the TC39 standardization process.
// Default: true.
//
// Experimental.
ExperimentalDecorators *bool `field:"optional" json:"experimentalDecorators" yaml:"experimentalDecorators"`
// Disallow inconsistently-cased references to the same file.
// Default: false.
//
// Experimental.
ForceConsistentCasingInFileNames *bool `field:"optional" json:"forceConsistentCasingInFileNames" yaml:"forceConsistentCasingInFileNames"`
// This flag works because you can use `import type` to explicitly create an `import` statement which should never be emitted into JavaScript.
// See: https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues
//
// Default: "remove".
//
// Experimental.
ImportsNotUsedAsValues TypeScriptImportsNotUsedAsValues `field:"optional" json:"importsNotUsedAsValues" yaml:"importsNotUsedAsValues"`
// Tells TypeScript to save information about the project graph from the last compilation to files stored on disk.
//
// This creates a series of .tsbuildinfo files in the same folder as your compilation output.
// They are not used by your JavaScript at runtime and can be safely deleted.
// You can read more about the flag in the 3.4 release notes.
// See: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#faster-subsequent-builds-with-the---incremental-flag
//
// To control which folders you want to the files to be built to, use the config option tsBuildInfoFile.
//
// Experimental.
Incremental *bool `field:"optional" json:"incremental" yaml:"incremental"`
// When set, instead of writing out a .js.map file to provide source maps, TypeScript will embed the source map content in the .js files.
// Default: true.
//
// Experimental.
InlineSourceMap *bool `field:"optional" json:"inlineSourceMap" yaml:"inlineSourceMap"`
// When set, TypeScript will include the original content of the .ts file as an embedded string in the source map. This is often useful in the same cases as inlineSourceMap.
// Default: true.
//
// Experimental.
InlineSources *bool `field:"optional" json:"inlineSources" yaml:"inlineSources"`
// Perform additional checks to ensure that separate compilation (such as with transpileModule or.
// Default: false.
//
// Experimental.
IsolatedModules *bool `field:"optional" json:"isolatedModules" yaml:"isolatedModules"`
// Support JSX in .tsx files: "react", "preserve", "react-native" etc.
// Default: undefined.
//
// Experimental.
Jsx TypeScriptJsxMode `field:"optional" json:"jsx" yaml:"jsx"`
// Declares the module specifier to be used for importing the jsx and jsxs factory functions when using jsx.
// Default: undefined.
//
// Experimental.
JsxImportSource *string `field:"optional" json:"jsxImportSource" yaml:"jsxImportSource"`
// Reference for type definitions / libraries to use (eg.
//
// ES2016, ES5, ES2018).
// Default: [ "es2018" ].
//
// Experimental.
Lib *[]*string `field:"optional" json:"lib" yaml:"lib"`
// Sets the module system for the program.
//
// See https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules.
// Default: "CommonJS".
//
// Experimental.
Module *string `field:"optional" json:"module" yaml:"module"`
// This setting controls how TypeScript determines whether a file is a [script or a module](https://www.typescriptlang.org/docs/handbook/modules/theory.html#scripts-and-modules-in-javascript).
// Default: "auto".
//
// Experimental.
ModuleDetection TypeScriptModuleDetection `field:"optional" json:"moduleDetection" yaml:"moduleDetection"`
// Determine how modules get resolved.
//
// Either "Node" for Node.js/io.js style resolution, or "Classic".
// Default: "node".
//
// Experimental.
ModuleResolution TypeScriptModuleResolution `field:"optional" json:"moduleResolution" yaml:"moduleResolution"`
// Do not emit outputs.
// Default: false.
//
// Experimental.
NoEmit *bool `field:"optional" json:"noEmit" yaml:"noEmit"`
// Do not emit compiler output files like JavaScript source code, source-maps or declarations if any errors were reported.
// Default: true.
//
// Experimental.
NoEmitOnError *bool `field:"optional" json:"noEmitOnError" yaml:"noEmitOnError"`
// Report errors for fallthrough cases in switch statements.
//
// Ensures that any non-empty
// case inside a switch statement includes either break or return. This means you won’t
// accidentally ship a case fallthrough bug.
// Default: true.
//
// Experimental.
NoFallthroughCasesInSwitch *bool `field:"optional" json:"noFallthroughCasesInSwitch" yaml:"noFallthroughCasesInSwitch"`
// In some cases where no type annotations are present, TypeScript will fall back to a type of any for a variable when it cannot infer the type.
// Default: true.
//
// Experimental.
NoImplicitAny *bool `field:"optional" json:"noImplicitAny" yaml:"noImplicitAny"`
// Using `noImplicitOverride`, you can ensure that sub-classes never go out of sync as they are required to explicitly declare that they are overriding a member using the `override` keyword.
//
// This also improves readability of the programmer's intent.
//
// Available with TypeScript 4.3 and newer.
// Default: false.
//
// Experimental.
NoImplicitOverride *bool `field:"optional" json:"noImplicitOverride" yaml:"noImplicitOverride"`
// When enabled, TypeScript will check all code paths in a function to ensure they return a value.
// Default: true.
//
// Experimental.
NoImplicitReturns *bool `field:"optional" json:"noImplicitReturns" yaml:"noImplicitReturns"`
// Raise error on ‘this’ expressions with an implied ‘any’ type.
// Default: true.
//
// Experimental.
NoImplicitThis *bool `field:"optional" json:"noImplicitThis" yaml:"noImplicitThis"`
// Raise error on use of the dot syntax to access fields which are not defined.
// Default: true.
//
// Experimental.
NoPropertyAccessFromIndexSignature *bool `field:"optional" json:"noPropertyAccessFromIndexSignature" yaml:"noPropertyAccessFromIndexSignature"`
// Raise error when accessing indexes on objects with unknown keys defined in index signatures.
// Default: true.
//
// Experimental.
NoUncheckedIndexedAccess *bool `field:"optional" json:"noUncheckedIndexedAccess" yaml:"noUncheckedIndexedAccess"`
// Report errors on unused local variables.
// Default: true.
//
// Experimental.
NoUnusedLocals *bool `field:"optional" json:"noUnusedLocals" yaml:"noUnusedLocals"`
// Report errors on unused parameters in functions.
// Default: true.
//
// Experimental.
NoUnusedParameters *bool `field:"optional" json:"noUnusedParameters" yaml:"noUnusedParameters"`
// Output directory for the compiled files.
// Experimental.
OutDir *string `field:"optional" json:"outDir" yaml:"outDir"`
// A series of entries which re-map imports to lookup locations relative to the baseUrl, there is a larger coverage of paths in the handbook.
//
// paths lets you declare how TypeScript should resolve an import in your require/imports.
// Experimental.
Paths *map[string]*[]*string `field:"optional" json:"paths" yaml:"paths"`
// Allows importing modules with a ‘.json’ extension, which is a common practice in node projects. This includes generating a type for the import based on the static JSON shape.
// Default: true.
//
// Experimental.
ResolveJsonModule *bool `field:"optional" json:"resolveJsonModule" yaml:"resolveJsonModule"`
// Forces TypeScript to consult the `exports` field of `package.json` files if it ever reads from a package in `node_modules`.
// Default: true.
//
// Experimental.
ResolvePackageJsonExports *bool `field:"optional" json:"resolvePackageJsonExports" yaml:"resolvePackageJsonExports"`
// Forces TypeScript to consult the `imports` field of `package.json` when performing a lookup that begins with `#` from a file that has a `package.json` as an ancestor.
// Default: undefined.
//
// Experimental.
ResolvePackageJsonImports *bool `field:"optional" json:"resolvePackageJsonImports" yaml:"resolvePackageJsonImports"`
// Specifies the root directory of input files.
//
// Only use to control the output directory structure with `outDir`.
// Experimental.
RootDir *string `field:"optional" json:"rootDir" yaml:"rootDir"`
// Skip type checking of all declaration files (*.d.ts).
// Default: false.
//
// Experimental.
SkipLibCheck *bool `field:"optional" json:"skipLibCheck" yaml:"skipLibCheck"`
// Enables the generation of sourcemap files.
// Default: undefined.
//
// Experimental.
SourceMap *bool `field:"optional" json:"sourceMap" yaml:"sourceMap"`
// Specify the location where a debugger should locate TypeScript files instead of relative source locations.
// Default: undefined.
//
// Experimental.
SourceRoot *string `field:"optional" json:"sourceRoot" yaml:"sourceRoot"`
// The strict flag enables a wide range of type checking behavior that results in stronger guarantees of program correctness.
//
// Turning this on is equivalent to enabling all of the strict mode family
// options, which are outlined below. You can then turn off individual strict mode family checks as
// needed.
// Default: true.
//
// Experimental.
Strict *bool `field:"optional" json:"strict" yaml:"strict"`
// When strictNullChecks is false, null and undefined are effectively ignored by the language.
//
// This can lead to unexpected errors at runtime.
// When strictNullChecks is true, null and undefined have their own distinct types and you’ll
// get a type error if you try to use them where a concrete value is expected.
// Default: true.
//
// Experimental.
StrictNullChecks *bool `field:"optional" json:"strictNullChecks" yaml:"strictNullChecks"`
// When set to true, TypeScript will raise an error when a class property was declared but not set in the constructor.
// Default: true.
//
// Experimental.
StrictPropertyInitialization *bool `field:"optional" json:"strictPropertyInitialization" yaml:"strictPropertyInitialization"`
// Do not emit declarations for code that has an `@internal` annotation in it’s JSDoc comment.
// Default: true.
//
// Experimental.
StripInternal *bool `field:"optional" json:"stripInternal" yaml:"stripInternal"`
// Modern browsers support all ES6 features, so ES6 is a good choice.
//
// You might choose to set
// a lower target if your code is deployed to older environments, or a higher target if your
// code is guaranteed to run in newer environments.
// Default: "ES2018".
//
// Experimental.
Target *string `field:"optional" json:"target" yaml:"target"`
// This setting lets you specify a file for storing incremental compilation information as a part of composite projects which enables faster building of larger TypeScript codebases.
//
// You can read more about composite projects in the handbook.
// Experimental.
TsBuildInfoFile *string `field:"optional" json:"tsBuildInfoFile" yaml:"tsBuildInfoFile"`
// If typeRoots is specified, only packages under typeRoots will be included.
// See: https://www.typescriptlang.org/tsconfig/#typeRoots
//
// Experimental.
TypeRoots *[]*string `field:"optional" json:"typeRoots" yaml:"typeRoots"`
// If types is specified, only packages listed will be included in the global scope.
// See: https://www.typescriptlang.org/tsconfig#types
//
// Experimental.
Types *[]*string `field:"optional" json:"types" yaml:"types"`
// Change the type of the variable in a catch clause from any to unknown Available with TypeScript 4.4 and newer.
// Default: true.
//
// Experimental.
UseUnknownInCatchVariables *bool `field:"optional" json:"useUnknownInCatchVariables" yaml:"useUnknownInCatchVariables"`
// Simplifies TypeScript's handling of import/export `type` modifiers.
// See: https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax
//
// Default: undefined.
//
// Experimental.
VerbatimModuleSyntax *bool `field:"optional" json:"verbatimModuleSyntax" yaml:"verbatimModuleSyntax"`
}
Experimental.
type TypeScriptImportsNotUsedAsValues ¶
type TypeScriptImportsNotUsedAsValues string
This flag controls how `import` works, there are 3 different options. See: https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues
Experimental.
const ( // The default behavior of dropping `import` statements which only reference types. // Experimental. TypeScriptImportsNotUsedAsValues_REMOVE TypeScriptImportsNotUsedAsValues = "REMOVE" // Preserves all `import` statements whose values or types are never used. // // This can cause imports/side-effects to be preserved. // Experimental. TypeScriptImportsNotUsedAsValues_PRESERVE TypeScriptImportsNotUsedAsValues = "PRESERVE" // This preserves all imports (the same as the preserve option), but will error when a value import is only used as a type. // // This might be useful if you want to ensure no values are being accidentally imported, but still make side-effect imports explicit. // Experimental. TypeScriptImportsNotUsedAsValues_ERROR TypeScriptImportsNotUsedAsValues = "ERROR" )
type TypeScriptJsxMode ¶
type TypeScriptJsxMode string
Determines how JSX should get transformed into valid JavaScript. See: https://www.typescriptlang.org/docs/handbook/jsx.html
Experimental.
const ( // Keeps the JSX as part of the output to be further consumed by another transform step (e.g. Babel). // Experimental. TypeScriptJsxMode_PRESERVE TypeScriptJsxMode = "PRESERVE" // Converts JSX syntax into React.createElement, does not need to go through a JSX transformation before use, and the output will have a .js file extension. // Experimental. TypeScriptJsxMode_REACT TypeScriptJsxMode = "REACT" // Keeps all JSX like 'preserve' mode, but output will have a .js extension. // Experimental. TypeScriptJsxMode_REACT_NATIVE TypeScriptJsxMode = "REACT_NATIVE" // Passes `key` separately from props and always passes `children` as props (since React 17). // See: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html#react-17-jsx-factories // // Experimental. TypeScriptJsxMode_REACT_JSX TypeScriptJsxMode = "REACT_JSX" // Same as `REACT_JSX` with additional debug data. // Experimental. TypeScriptJsxMode_REACT_JSXDEV TypeScriptJsxMode = "REACT_JSXDEV" )
type TypeScriptModuleDetection ¶ added in v0.82.2
type TypeScriptModuleDetection string
This setting controls how TypeScript determines whether a file is a script or a module. See: https://www.typescriptlang.org/docs/handbook/modules/theory.html#scripts-and-modules-in-javascript
Experimental.
const ( // TypeScript will not only look for import and export statements, but it will also check whether the "type" field in a package.json is set to "module" when running with module: nodenext or node16, and check whether the current file is a JSX file when running under jsx: react-jsx. // See: https://www.typescriptlang.org/tsconfig/#moduleDetection // // Experimental. TypeScriptModuleDetection_AUTO TypeScriptModuleDetection = "AUTO" // The same behavior as 4.6 and prior, usings import and export statements to determine whether a file is a module. // See: https://www.typescriptlang.org/tsconfig/#moduleDetection // // Experimental. TypeScriptModuleDetection_LEGACY TypeScriptModuleDetection = "LEGACY" // Ensures that every non-declaration file is treated as a module. // See: https://www.typescriptlang.org/tsconfig/#moduleDetection // // Experimental. TypeScriptModuleDetection_FORCE TypeScriptModuleDetection = "FORCE" )
type TypeScriptModuleResolution ¶
type TypeScriptModuleResolution string
Determines how modules get resolved. See: https://www.typescriptlang.org/docs/handbook/module-resolution.html
Experimental.
const ( // TypeScript's former default resolution strategy. // See: https://www.typescriptlang.org/docs/handbook/module-resolution.html#classic // // Experimental. TypeScriptModuleResolution_CLASSIC TypeScriptModuleResolution = "CLASSIC" // Resolution strategy which attempts to mimic the Node.js module resolution strategy at runtime. // See: https://www.typescriptlang.org/docs/handbook/module-resolution.html#node // // Experimental. TypeScriptModuleResolution_NODE TypeScriptModuleResolution = "NODE" // Node.js’ ECMAScript Module Support from TypeScript 4.7 onwards. // See: https://www.typescriptlang.org/tsconfig#moduleResolution // // Experimental. TypeScriptModuleResolution_NODE16 TypeScriptModuleResolution = "NODE16" // Node.js’ ECMAScript Module Support from TypeScript 4.7 onwards. // See: https://www.typescriptlang.org/tsconfig#moduleResolution // // Experimental. TypeScriptModuleResolution_NODE_NEXT TypeScriptModuleResolution = "NODE_NEXT" // Resolution strategy which attempts to mimic resolution patterns of modern bundlers; // // from TypeScript 5.0 onwards. // See: https://www.typescriptlang.org/tsconfig#moduleResolution // // Experimental. TypeScriptModuleResolution_BUNDLER TypeScriptModuleResolution = "BUNDLER" )
type TypescriptConfig ¶
type TypescriptConfig interface {
projen.Component
// Experimental.
CompilerOptions() *TypeScriptCompilerOptions
// Experimental.
Exclude() *[]*string
// Array of base `tsconfig.json` paths. Any absolute paths are resolved relative to this instance, while any relative paths are used as is.
// Experimental.
Extends() *[]*string
// Experimental.
File() projen.JsonFile
// Experimental.
FileName() *string
// Experimental.
Include() *[]*string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Experimental.
AddExclude(pattern *string)
// Extend from base `TypescriptConfig` instance.
// Experimental.
AddExtends(value TypescriptConfig)
// Experimental.
AddInclude(pattern *string)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Resolve valid TypeScript extends paths relative to this config.
// Experimental.
ResolveExtendsPath(configPath *string) *string
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Experimental.
func NewTypescriptConfig ¶
func NewTypescriptConfig(project projen.Project, options *TypescriptConfigOptions) TypescriptConfig
Experimental.
type TypescriptConfigExtends ¶
type TypescriptConfigExtends interface {
// Experimental.
ToJSON() *[]*string
}
Container for `TypescriptConfig` `tsconfig.json` base configuration(s). Extending from more than one base config file requires TypeScript 5.0+. Experimental.
func TypescriptConfigExtends_FromPaths ¶
func TypescriptConfigExtends_FromPaths(paths *[]*string) TypescriptConfigExtends
Factory for creation from array of file paths. Experimental.
func TypescriptConfigExtends_FromTypescriptConfigs ¶
func TypescriptConfigExtends_FromTypescriptConfigs(configs *[]TypescriptConfig) TypescriptConfigExtends
Factory for creation from array of other `TypescriptConfig` instances. Experimental.
type TypescriptConfigOptions ¶
type TypescriptConfigOptions struct {
// Compiler options to use.
// Experimental.
CompilerOptions *TypeScriptCompilerOptions `field:"optional" json:"compilerOptions" yaml:"compilerOptions"`
// Filters results from the "include" option.
// Default: - node_modules is excluded by default.
//
// Experimental.
Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"`
// Base `tsconfig.json` configuration(s) to inherit from.
// Experimental.
Extends TypescriptConfigExtends `field:"optional" json:"extends" yaml:"extends"`
// Default: "tsconfig.json"
//
// Experimental.
FileName *string `field:"optional" json:"fileName" yaml:"fileName"`
// Specifies a list of glob patterns that match TypeScript files to be included in compilation.
// Default: - all .ts files recursively
//
// Experimental.
Include *[]*string `field:"optional" json:"include" yaml:"include"`
}
Experimental.
type UpdateSnapshot ¶
type UpdateSnapshot string
Experimental.
const ( // Always update snapshots in "test" task. // Experimental. UpdateSnapshot_ALWAYS UpdateSnapshot = "ALWAYS" // Never update snapshots in "test" task and create a separate "test:update" task. // Experimental. UpdateSnapshot_NEVER UpdateSnapshot = "NEVER" )
type UpgradeDependencies ¶
type UpgradeDependencies interface {
projen.Component
// Container definitions for the upgrade workflow.
// Experimental.
ContainerOptions() *workflows.ContainerOptions
// Experimental.
SetContainerOptions(val *workflows.ContainerOptions)
// The tree node.
// Experimental.
Node() constructs.Node
// A task run after the upgrade task.
// Experimental.
PostUpgradeTask() projen.Task
// Experimental.
Project() projen.Project
// The upgrade task.
// Experimental.
UpgradeTask() projen.Task
// The workflows that execute the upgrades.
//
// One workflow per branch.
// Experimental.
Workflows() *[]github.GithubWorkflow
// Add steps to execute a successful build.
// Experimental.
AddPostBuildSteps(steps ...*workflows.JobStep)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Upgrade node project dependencies. Experimental.
func NewUpgradeDependencies ¶
func NewUpgradeDependencies(project NodeProject, options *UpgradeDependenciesOptions) UpgradeDependencies
Experimental.
type UpgradeDependenciesOptions ¶
type UpgradeDependenciesOptions struct {
// List of package names to exclude during the upgrade.
// Default: - Nothing is excluded.
//
// Experimental.
Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"`
// List of package names to include during the upgrade.
// Default: - Everything is included.
//
// Experimental.
Include *[]*string `field:"optional" json:"include" yaml:"include"`
// Title of the pull request to use (should be all lower-case).
// Default: "upgrade dependencies".
//
// Experimental.
PullRequestTitle *string `field:"optional" json:"pullRequestTitle" yaml:"pullRequestTitle"`
// Check peer dependencies of installed packages and filter updates to compatible versions.
//
// By default, the upgrade workflow will adhere to version constraints from peer dependencies.
// Sometimes this is not desirable and can be disabled.
// See: https://github.com/raineorshine/npm-check-updates#peer
//
// Default: true.
//
// Experimental.
SatisfyPeerDependencies *bool `field:"optional" json:"satisfyPeerDependencies" yaml:"satisfyPeerDependencies"`
// The semantic commit type.
// Default: 'chore'.
//
// Experimental.
SemanticCommit *string `field:"optional" json:"semanticCommit" yaml:"semanticCommit"`
// Add Signed-off-by line by the committer at the end of the commit log message.
// Default: true.
//
// Experimental.
Signoff *bool `field:"optional" json:"signoff" yaml:"signoff"`
// Determines the target version to upgrade dependencies to.
// See: https://github.com/raineorshine/npm-check-updates#target
//
// Default: "minor".
//
// Experimental.
Target *string `field:"optional" json:"target" yaml:"target"`
// The name of the task that will be created.
//
// This will also be the workflow name.
// Default: "upgrade".
//
// Experimental.
TaskName *string `field:"optional" json:"taskName" yaml:"taskName"`
// Specify which dependency types the upgrade should operate on.
// Default: - All dependency types.
//
// Experimental.
Types *[]projen.DependencyType `field:"optional" json:"types" yaml:"types"`
// Include a github workflow for creating PR's that upgrades the required dependencies, either by manual dispatch, or by a schedule.
//
// If this is `false`, only a local projen task is created, which can be executed manually to
// upgrade the dependencies.
// Default: - true for root projects, false for subprojects.
//
// Experimental.
Workflow *bool `field:"optional" json:"workflow" yaml:"workflow"`
// Options for the github workflow.
//
// Only applies if `workflow` is true.
// Default: - default options.
//
// Experimental.
WorkflowOptions *UpgradeDependenciesWorkflowOptions `field:"optional" json:"workflowOptions" yaml:"workflowOptions"`
}
Options for `UpgradeDependencies`. Experimental.
type UpgradeDependenciesSchedule ¶
type UpgradeDependenciesSchedule interface {
// Experimental.
Cron() *[]*string
}
How often to check for new versions and raise pull requests for version upgrades. Experimental.
func UpgradeDependenciesSchedule_DAILY ¶
func UpgradeDependenciesSchedule_DAILY() UpgradeDependenciesSchedule
func UpgradeDependenciesSchedule_Expressions ¶
func UpgradeDependenciesSchedule_Expressions(cron *[]*string) UpgradeDependenciesSchedule
Create a schedule from a raw cron expression. Experimental.
func UpgradeDependenciesSchedule_MONTHLY ¶
func UpgradeDependenciesSchedule_MONTHLY() UpgradeDependenciesSchedule
func UpgradeDependenciesSchedule_NEVER ¶
func UpgradeDependenciesSchedule_NEVER() UpgradeDependenciesSchedule
func UpgradeDependenciesSchedule_WEEKDAY ¶
func UpgradeDependenciesSchedule_WEEKDAY() UpgradeDependenciesSchedule
func UpgradeDependenciesSchedule_WEEKLY ¶
func UpgradeDependenciesSchedule_WEEKLY() UpgradeDependenciesSchedule
type UpgradeDependenciesWorkflowOptions ¶
type UpgradeDependenciesWorkflowOptions struct {
// Assignees to add on the PR.
// Default: - no assignees.
//
// Experimental.
Assignees *[]*string `field:"optional" json:"assignees" yaml:"assignees"`
// List of branches to create PR's for.
// Default: - All release branches configured for the project.
//
// Experimental.
Branches *[]*string `field:"optional" json:"branches" yaml:"branches"`
// Job container options.
// Default: - defaults.
//
// Experimental.
Container *workflows.ContainerOptions `field:"optional" json:"container" yaml:"container"`
// The git identity to use for commits.
// Default: "github-actions@github.com"
//
// Experimental.
GitIdentity *github.GitIdentity `field:"optional" json:"gitIdentity" yaml:"gitIdentity"`
// Labels to apply on the PR.
// Default: - no labels.
//
// Experimental.
Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
// Permissions granted to the upgrade job To limit job permissions for `contents`, the desired permissions have to be explicitly set, e.g.: `{ contents: JobPermission.NONE }`.
// Default: `{ contents: JobPermission.READ }`
//
// Experimental.
Permissions *workflows.JobPermissions `field:"optional" json:"permissions" yaml:"permissions"`
// Choose a method for authenticating with GitHub for creating the PR.
//
// When using the default github token, PR's created by this workflow
// will not trigger any subsequent workflows (i.e the build workflow), so
// projen requires API access to be provided through e.g. a personal
// access token or other method.
// See: https://github.com/peter-evans/create-pull-request/issues/48
//
// Default: - personal access token named PROJEN_GITHUB_TOKEN.
//
// Experimental.
ProjenCredentials github.GithubCredentials `field:"optional" json:"projenCredentials" yaml:"projenCredentials"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
RunsOn *[]*string `field:"optional" json:"runsOn" yaml:"runsOn"`
// Github Runner Group selection options.
// Experimental.
RunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"runsOnGroup" yaml:"runsOnGroup"`
// Schedule to run on.
// Default: UpgradeDependenciesSchedule.DAILY
//
// Experimental.
Schedule UpgradeDependenciesSchedule `field:"optional" json:"schedule" yaml:"schedule"`
}
Options for `UpgradeDependencies.workflowOptions`. Experimental.
type WatchPlugin ¶
type WatchPlugin interface {
}
Experimental.
func NewWatchPlugin ¶
func NewWatchPlugin(name *string, options interface{}) WatchPlugin
Experimental.
type YarnBerryOptions ¶ added in v0.76.21
type YarnBerryOptions struct {
// A fully specified version to use for yarn (e.g., x.x.x).
// Default: - 4.0.1
//
// Experimental.
Version *string `field:"optional" json:"version" yaml:"version"`
// The yarnrc configuration.
// Default: - a blank Yarn RC file.
//
// Experimental.
YarnRcOptions *YarnrcOptions `field:"optional" json:"yarnRcOptions" yaml:"yarnRcOptions"`
// Should zero-installs be enabled?
//
// Learn more at: https://yarnpkg.com/features/caching#zero-installs
// Default: false.
//
// Experimental.
ZeroInstalls *bool `field:"optional" json:"zeroInstalls" yaml:"zeroInstalls"`
}
Configure Yarn Berry. Experimental.
type YarnCacheMigrationMode ¶ added in v0.76.21
type YarnCacheMigrationMode string
https://yarnpkg.com/configuration/yarnrc#cacheMigrationMode. Experimental.
const ( // Experimental. YarnCacheMigrationMode_REQUIRED_ONLY YarnCacheMigrationMode = "REQUIRED_ONLY" // Experimental. YarnCacheMigrationMode_MATCH_SPEC YarnCacheMigrationMode = "MATCH_SPEC" // Experimental. YarnCacheMigrationMode_ALWAYS YarnCacheMigrationMode = "ALWAYS" )
type YarnChecksumBehavior ¶ added in v0.76.21
type YarnChecksumBehavior string
https://yarnpkg.com/configuration/yarnrc#checksumBehavior. Experimental.
const ( // Experimental. YarnChecksumBehavior_THROW YarnChecksumBehavior = "THROW" // Experimental. YarnChecksumBehavior_UPDATE YarnChecksumBehavior = "UPDATE" // Experimental. YarnChecksumBehavior_RESET YarnChecksumBehavior = "RESET" // Experimental. YarnChecksumBehavior_IGNORE YarnChecksumBehavior = "IGNORE" )
type YarnDefaultSemverRangePrefix ¶ added in v0.76.21
type YarnDefaultSemverRangePrefix string
https://yarnpkg.com/configuration/yarnrc#defaultSemverRangePrefix. Experimental.
const ( // Experimental. YarnDefaultSemverRangePrefix_CARET YarnDefaultSemverRangePrefix = "CARET" // Experimental. YarnDefaultSemverRangePrefix_TILDE YarnDefaultSemverRangePrefix = "TILDE" // Experimental. YarnDefaultSemverRangePrefix_EMPTY_STRING YarnDefaultSemverRangePrefix = "EMPTY_STRING" )
type YarnLogFilter ¶ added in v0.76.21
type YarnLogFilter struct {
// Experimental.
Code *string `field:"optional" json:"code" yaml:"code"`
// Experimental.
Level YarnLogFilterLevel `field:"optional" json:"level" yaml:"level"`
// Experimental.
Pattern *string `field:"optional" json:"pattern" yaml:"pattern"`
// Experimental.
Text *string `field:"optional" json:"text" yaml:"text"`
}
https://yarnpkg.com/configuration/yarnrc#logFilters. Experimental.
type YarnLogFilterLevel ¶ added in v0.76.21
type YarnLogFilterLevel string
https://v3.yarnpkg.com/configuration/yarnrc#logFilters.0.level. Experimental.
const ( // Experimental. YarnLogFilterLevel_INFO YarnLogFilterLevel = "INFO" // Experimental. YarnLogFilterLevel_WARNING YarnLogFilterLevel = "WARNING" // Experimental. YarnLogFilterLevel_ERROR YarnLogFilterLevel = "ERROR" // Experimental. YarnLogFilterLevel_DISCARD YarnLogFilterLevel = "DISCARD" )
type YarnNetworkSetting ¶ added in v0.76.21
type YarnNetworkSetting struct {
// Deprecated: - use httpsCaFilePath in Yarn v4 and newer.
CaFilePath *string `field:"optional" json:"caFilePath" yaml:"caFilePath"`
// Experimental.
EnableNetwork *bool `field:"optional" json:"enableNetwork" yaml:"enableNetwork"`
// Experimental.
HttpProxy *string `field:"optional" json:"httpProxy" yaml:"httpProxy"`
// Experimental.
HttpsCaFilePath *string `field:"optional" json:"httpsCaFilePath" yaml:"httpsCaFilePath"`
// Experimental.
HttpsCertFilePath *string `field:"optional" json:"httpsCertFilePath" yaml:"httpsCertFilePath"`
// Experimental.
HttpsKeyFilePath *string `field:"optional" json:"httpsKeyFilePath" yaml:"httpsKeyFilePath"`
// Experimental.
HttpsProxy *string `field:"optional" json:"httpsProxy" yaml:"httpsProxy"`
}
https://yarnpkg.com/configuration/yarnrc#networkSettings. Experimental.
type YarnNmHoistingLimit ¶ added in v0.76.21
type YarnNmHoistingLimit string
https://yarnpkg.com/configuration/yarnrc#nmHoistingLimits. Experimental.
const ( // Experimental. YarnNmHoistingLimit_DEPENDENCIES YarnNmHoistingLimit = "DEPENDENCIES" // Experimental. YarnNmHoistingLimit_NONE YarnNmHoistingLimit = "NONE" // Experimental. YarnNmHoistingLimit_WORKSPACES YarnNmHoistingLimit = "WORKSPACES" )
type YarnNmMode ¶ added in v0.76.21
type YarnNmMode string
https://yarnpkg.com/configuration/yarnrc#nmMode. Experimental.
const ( // Experimental. YarnNmMode_CLASSIC YarnNmMode = "CLASSIC" // Experimental. YarnNmMode_HARDLINKS_LOCAL YarnNmMode = "HARDLINKS_LOCAL" // Experimental. YarnNmMode_HARDLINKS_GLOBAL YarnNmMode = "HARDLINKS_GLOBAL" )
type YarnNodeLinker ¶ added in v0.76.21
type YarnNodeLinker string
https://yarnpkg.com/configuration/yarnrc#nodeLinker. Experimental.
const ( // Experimental. YarnNodeLinker_PNP YarnNodeLinker = "PNP" // Experimental. YarnNodeLinker_PNPM YarnNodeLinker = "PNPM" // Experimental. YarnNodeLinker_NODE_MODULES YarnNodeLinker = "NODE_MODULES" )
type YarnNpmPublishAccess ¶ added in v0.76.21
type YarnNpmPublishAccess string
https://yarnpkg.com/configuration/yarnrc#npmPublishAccess. Experimental.
const ( // Experimental. YarnNpmPublishAccess_PUBLIC YarnNpmPublishAccess = "PUBLIC" // Experimental. YarnNpmPublishAccess_RESTRICTED YarnNpmPublishAccess = "RESTRICTED" )
type YarnNpmRegistry ¶ added in v0.76.21
type YarnNpmRegistry struct {
// Experimental.
NpmAlwaysAuth *bool `field:"optional" json:"npmAlwaysAuth" yaml:"npmAlwaysAuth"`
// Experimental.
NpmAuthIdent *string `field:"optional" json:"npmAuthIdent" yaml:"npmAuthIdent"`
// Experimental.
NpmAuthToken *string `field:"optional" json:"npmAuthToken" yaml:"npmAuthToken"`
}
https://yarnpkg.com/configuration/yarnrc#npmRegistries. Experimental.
type YarnNpmScope ¶ added in v0.76.21
type YarnNpmScope struct {
// Experimental.
NpmAlwaysAuth *bool `field:"optional" json:"npmAlwaysAuth" yaml:"npmAlwaysAuth"`
// Experimental.
NpmAuthIdent *string `field:"optional" json:"npmAuthIdent" yaml:"npmAuthIdent"`
// Experimental.
NpmAuthToken *string `field:"optional" json:"npmAuthToken" yaml:"npmAuthToken"`
// Experimental.
NpmPublishRegistry *string `field:"optional" json:"npmPublishRegistry" yaml:"npmPublishRegistry"`
// Experimental.
NpmRegistryServer *string `field:"optional" json:"npmRegistryServer" yaml:"npmRegistryServer"`
}
https://yarnpkg.com/configuration/yarnrc#npmScopes. Experimental.
type YarnPackageExtension ¶ added in v0.76.21
type YarnPackageExtension struct {
// Experimental.
Dependencies *map[string]*string `field:"optional" json:"dependencies" yaml:"dependencies"`
// Experimental.
PeerDependencies *map[string]*string `field:"optional" json:"peerDependencies" yaml:"peerDependencies"`
// Experimental.
PeerDependenciesMeta *map[string]*map[string]*YarnPeerDependencyMeta `field:"optional" json:"peerDependenciesMeta" yaml:"peerDependenciesMeta"`
}
https://yarnpkg.com/configuration/yarnrc#packageExtensions. Experimental.
type YarnPeerDependencyMeta ¶ added in v0.76.21
type YarnPeerDependencyMeta struct {
// Experimental.
Optional *bool `field:"optional" json:"optional" yaml:"optional"`
}
https://yarnpkg.com/configuration/yarnrc#packageExtensions. Experimental.
type YarnPnpFallbackMode ¶ added in v0.76.21
type YarnPnpFallbackMode string
https://yarnpkg.com/configuration/yarnrc#pnpFallbackMode. Experimental.
const ( // Experimental. YarnPnpFallbackMode_NONE YarnPnpFallbackMode = "NONE" // Experimental. YarnPnpFallbackMode_DEPENDENCIES_ONLY YarnPnpFallbackMode = "DEPENDENCIES_ONLY" // Experimental. YarnPnpFallbackMode_ALL YarnPnpFallbackMode = "ALL" )
type YarnPnpMode ¶ added in v0.76.21
type YarnPnpMode string
https://yarnpkg.com/configuration/yarnrc#pnpMode. Experimental.
const ( // Experimental. YarnPnpMode_STRICT YarnPnpMode = "STRICT" // Experimental. YarnPnpMode_LOOSE YarnPnpMode = "LOOSE" )
type YarnProgressBarStyle ¶ added in v0.76.21
type YarnProgressBarStyle string
https://yarnpkg.com/configuration/yarnrc#progressBarStyle. Experimental.
const ( // Experimental. YarnProgressBarStyle_PATRICK YarnProgressBarStyle = "PATRICK" // Experimental. YarnProgressBarStyle_SIMBA YarnProgressBarStyle = "SIMBA" // Experimental. YarnProgressBarStyle_JACK YarnProgressBarStyle = "JACK" // Experimental. YarnProgressBarStyle_HOGSFATHER YarnProgressBarStyle = "HOGSFATHER" // Experimental. YarnProgressBarStyle_DEFAULT YarnProgressBarStyle = "DEFAULT" )
type YarnSupportedArchitectures ¶ added in v0.76.21
type YarnSupportedArchitectures struct {
// Experimental.
Cpu *[]*string `field:"optional" json:"cpu" yaml:"cpu"`
// Experimental.
Libc *[]*string `field:"optional" json:"libc" yaml:"libc"`
// Experimental.
Os *[]*string `field:"optional" json:"os" yaml:"os"`
}
https://yarnpkg.com/configuration/yarnrc#supportedArchitectures. Experimental.
type YarnWinLinkType ¶ added in v0.76.21
type YarnWinLinkType string
https://yarnpkg.com/configuration/yarnrc#winLinkType. Experimental.
const ( // Experimental. YarnWinLinkType_JUNCTIONS YarnWinLinkType = "JUNCTIONS" // Experimental. YarnWinLinkType_SYMLINKS YarnWinLinkType = "SYMLINKS" )
type YarnWorkerPoolMode ¶ added in v0.76.21
type YarnWorkerPoolMode string
Experimental.
const ( // Experimental. YarnWorkerPoolMode_ASYNC YarnWorkerPoolMode = "ASYNC" // Experimental. YarnWorkerPoolMode_WORKERS YarnWorkerPoolMode = "WORKERS" )
type Yarnrc ¶ added in v0.76.21
type Yarnrc interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Experimental.
type YarnrcOptions ¶ added in v0.76.21
type YarnrcOptions struct {
// https://yarnpkg.com/configuration/yarnrc#cacheFolder.
// Experimental.
CacheFolder *string `field:"optional" json:"cacheFolder" yaml:"cacheFolder"`
// https://yarnpkg.com/configuration/yarnrc#cacheMigrationMode.
// Experimental.
CacheMigrationMode YarnCacheMigrationMode `field:"optional" json:"cacheMigrationMode" yaml:"cacheMigrationMode"`
// https://yarnpkg.com/configuration/yarnrc#changesetBaseRefs.
// Experimental.
ChangesetBaseRefs *[]*string `field:"optional" json:"changesetBaseRefs" yaml:"changesetBaseRefs"`
// https://yarnpkg.com/configuration/yarnrc#changesetIgnorePatterns.
// Experimental.
ChangesetIgnorePatterns *[]*string `field:"optional" json:"changesetIgnorePatterns" yaml:"changesetIgnorePatterns"`
// https://yarnpkg.com/configuration/yarnrc#checksumBehavior.
// Experimental.
ChecksumBehavior YarnChecksumBehavior `field:"optional" json:"checksumBehavior" yaml:"checksumBehavior"`
// https://yarnpkg.com/configuration/yarnrc#cloneConcurrency.
// Experimental.
CloneConcurrency *float64 `field:"optional" json:"cloneConcurrency" yaml:"cloneConcurrency"`
// https://yarnpkg.com/configuration/yarnrc#compressionLevel.
// Experimental.
CompressionLevel interface{} `field:"optional" json:"compressionLevel" yaml:"compressionLevel"`
// https://yarnpkg.com/configuration/yarnrc#constraintsPath.
// Experimental.
ConstraintsPath *string `field:"optional" json:"constraintsPath" yaml:"constraintsPath"`
// https://yarnpkg.com/configuration/yarnrc#defaultLanguageName.
// Experimental.
DefaultLanguageName *string `field:"optional" json:"defaultLanguageName" yaml:"defaultLanguageName"`
// https://yarnpkg.com/configuration/yarnrc#defaultProtocol.
// Experimental.
DefaultProtocol *string `field:"optional" json:"defaultProtocol" yaml:"defaultProtocol"`
// https://yarnpkg.com/configuration/yarnrc#defaultSemverRangePrefix.
// Experimental.
DefaultSemverRangePrefix YarnDefaultSemverRangePrefix `field:"optional" json:"defaultSemverRangePrefix" yaml:"defaultSemverRangePrefix"`
// https://yarnpkg.com/configuration/yarnrc#deferredVersionFolder.
// Experimental.
DeferredVersionFolder *string `field:"optional" json:"deferredVersionFolder" yaml:"deferredVersionFolder"`
// https://yarnpkg.com/configuration/yarnrc#enableColors.
// Experimental.
EnableColors *bool `field:"optional" json:"enableColors" yaml:"enableColors"`
// https://yarnpkg.com/configuration/yarnrc#enableConstraintsCheck.
// Experimental.
EnableConstraintsCheck *bool `field:"optional" json:"enableConstraintsCheck" yaml:"enableConstraintsCheck"`
// https://yarnpkg.com/configuration/yarnrc#enableGlobalCache.
// Experimental.
EnableGlobalCache *bool `field:"optional" json:"enableGlobalCache" yaml:"enableGlobalCache"`
// https://yarnpkg.com/configuration/yarnrc#enableHardenedMode.
// Experimental.
EnableHardenedMode *bool `field:"optional" json:"enableHardenedMode" yaml:"enableHardenedMode"`
// https://yarnpkg.com/configuration/yarnrc#enableHyperlinks.
// Experimental.
EnableHyperlinks *bool `field:"optional" json:"enableHyperlinks" yaml:"enableHyperlinks"`
// https://yarnpkg.com/configuration/yarnrc#enableImmutableCache.
// Experimental.
EnableImmutableCache *bool `field:"optional" json:"enableImmutableCache" yaml:"enableImmutableCache"`
// https://yarnpkg.com/configuration/yarnrc#enableImmutableInstalls.
// Experimental.
EnableImmutableInstalls *bool `field:"optional" json:"enableImmutableInstalls" yaml:"enableImmutableInstalls"`
// https://yarnpkg.com/configuration/yarnrc#enableInlineBuilds.
// Experimental.
EnableInlineBuilds *bool `field:"optional" json:"enableInlineBuilds" yaml:"enableInlineBuilds"`
// https://yarnpkg.com/configuration/yarnrc#enableInlineHunks.
// Experimental.
EnableInlineHunks *bool `field:"optional" json:"enableInlineHunks" yaml:"enableInlineHunks"`
// https://yarnpkg.com/configuration/yarnrc#enableMessageNames.
// Experimental.
EnableMessageNames *bool `field:"optional" json:"enableMessageNames" yaml:"enableMessageNames"`
// https://yarnpkg.com/configuration/yarnrc#enableMirror.
// Experimental.
EnableMirror *bool `field:"optional" json:"enableMirror" yaml:"enableMirror"`
// https://yarnpkg.com/configuration/yarnrc#enableNetwork.
// Experimental.
EnableNetwork *bool `field:"optional" json:"enableNetwork" yaml:"enableNetwork"`
// https://yarnpkg.com/configuration/yarnrc#enableOfflineMode.
// Experimental.
EnableOfflineMode *bool `field:"optional" json:"enableOfflineMode" yaml:"enableOfflineMode"`
// https://yarnpkg.com/configuration/yarnrc#enableProgressBars.
// Experimental.
EnableProgressBars *bool `field:"optional" json:"enableProgressBars" yaml:"enableProgressBars"`
// https://yarnpkg.com/configuration/yarnrc#enableScripts.
// Experimental.
EnableScripts *bool `field:"optional" json:"enableScripts" yaml:"enableScripts"`
// https://yarnpkg.com/configuration/yarnrc#enableStrictSsl.
// Experimental.
EnableStrictSsl *bool `field:"optional" json:"enableStrictSsl" yaml:"enableStrictSsl"`
// https://yarnpkg.com/configuration/yarnrc#enableTelemetry.
// Experimental.
EnableTelemetry *bool `field:"optional" json:"enableTelemetry" yaml:"enableTelemetry"`
// https://yarnpkg.com/configuration/yarnrc#enableTimers.
// Experimental.
EnableTimers *bool `field:"optional" json:"enableTimers" yaml:"enableTimers"`
// https://yarnpkg.com/configuration/yarnrc#enableTransparentWorkspaces.
// Experimental.
EnableTransparentWorkspaces *bool `field:"optional" json:"enableTransparentWorkspaces" yaml:"enableTransparentWorkspaces"`
// https://yarnpkg.com/configuration/yarnrc#globalFolder.
// Experimental.
GlobalFolder *string `field:"optional" json:"globalFolder" yaml:"globalFolder"`
// https://yarnpkg.com/configuration/yarnrc#httpProxy.
// Experimental.
HttpProxy *string `field:"optional" json:"httpProxy" yaml:"httpProxy"`
// https://yarnpkg.com/configuration/yarnrc#httpRetry.
// Experimental.
HttpRetry *float64 `field:"optional" json:"httpRetry" yaml:"httpRetry"`
// https://yarnpkg.com/configuration/yarnrc#httpsCaFilePath.
// Experimental.
HttpsCaFilePath *string `field:"optional" json:"httpsCaFilePath" yaml:"httpsCaFilePath"`
// https://yarnpkg.com/configuration/yarnrc#httpsCertFilePath.
// Experimental.
HttpsCertFilePath *string `field:"optional" json:"httpsCertFilePath" yaml:"httpsCertFilePath"`
// https://yarnpkg.com/configuration/yarnrc#httpsKeyFilePath.
// Experimental.
HttpsKeyFilePath *string `field:"optional" json:"httpsKeyFilePath" yaml:"httpsKeyFilePath"`
// https://yarnpkg.com/configuration/yarnrc#httpsProxy.
// Experimental.
HttpsProxy *string `field:"optional" json:"httpsProxy" yaml:"httpsProxy"`
// https://yarnpkg.com/configuration/yarnrc#httpTimeout.
// Experimental.
HttpTimeout *float64 `field:"optional" json:"httpTimeout" yaml:"httpTimeout"`
// https://v3.yarnpkg.com/configuration/yarnrc#ignoreCwd.
// Deprecated: - removed in Yarn v4 and newer.
IgnoreCwd *bool `field:"optional" json:"ignoreCwd" yaml:"ignoreCwd"`
// https://yarnpkg.com/configuration/yarnrc#ignorePath.
// Experimental.
IgnorePath *bool `field:"optional" json:"ignorePath" yaml:"ignorePath"`
// https://yarnpkg.com/configuration/yarnrc#immutablePatterns.
// Experimental.
ImmutablePatterns *[]*string `field:"optional" json:"immutablePatterns" yaml:"immutablePatterns"`
// https://yarnpkg.com/configuration/yarnrc#initFields.
// Experimental.
InitFields *map[string]interface{} `field:"optional" json:"initFields" yaml:"initFields"`
// https://yarnpkg.com/configuration/yarnrc#initScope.
// Experimental.
InitScope *string `field:"optional" json:"initScope" yaml:"initScope"`
// https://yarnpkg.com/configuration/yarnrc#injectEnvironmentFiles.
// Experimental.
InjectEnvironmentFiles *[]*string `field:"optional" json:"injectEnvironmentFiles" yaml:"injectEnvironmentFiles"`
// https://yarnpkg.com/configuration/yarnrc#installStatePath.
// Experimental.
InstallStatePath *string `field:"optional" json:"installStatePath" yaml:"installStatePath"`
// https://v3.yarnpkg.com/configuration/yarnrc#lockfileFilename.
// Deprecated: - removed in Yarn v4 and newer.
LockfileFilename *string `field:"optional" json:"lockfileFilename" yaml:"lockfileFilename"`
// https://yarnpkg.com/configuration/yarnrc#logFilters.
// Experimental.
LogFilters *[]*YarnLogFilter `field:"optional" json:"logFilters" yaml:"logFilters"`
// https://yarnpkg.com/configuration/yarnrc#networkConcurrency.
// Experimental.
NetworkConcurrency *float64 `field:"optional" json:"networkConcurrency" yaml:"networkConcurrency"`
// https://yarnpkg.com/configuration/yarnrc#networkSettings.
// Experimental.
NetworkSettings *map[string]*YarnNetworkSetting `field:"optional" json:"networkSettings" yaml:"networkSettings"`
// https://yarnpkg.com/configuration/yarnrc#nmHoistingLimits.
// Experimental.
NmHoistingLimits YarnNmHoistingLimit `field:"optional" json:"nmHoistingLimits" yaml:"nmHoistingLimits"`
// https://yarnpkg.com/configuration/yarnrc#nmMode.
// Experimental.
NmMode YarnNmMode `field:"optional" json:"nmMode" yaml:"nmMode"`
// https://yarnpkg.com/configuration/yarnrc#nmSelfReferences.
// Experimental.
NmSelfReferences *bool `field:"optional" json:"nmSelfReferences" yaml:"nmSelfReferences"`
// https://yarnpkg.com/configuration/yarnrc#nodeLinker.
// Experimental.
NodeLinker YarnNodeLinker `field:"optional" json:"nodeLinker" yaml:"nodeLinker"`
// https://yarnpkg.com/configuration/yarnrc#npmAlwaysAuth.
// Experimental.
NpmAlwaysAuth *bool `field:"optional" json:"npmAlwaysAuth" yaml:"npmAlwaysAuth"`
// https://yarnpkg.com/configuration/yarnrc#npmAuditExcludePackages.
// Experimental.
NpmAuditExcludePackages *[]*string `field:"optional" json:"npmAuditExcludePackages" yaml:"npmAuditExcludePackages"`
// https://yarnpkg.com/configuration/yarnrc#npmAuditIgnoreAdvisories.
// Experimental.
NpmAuditIgnoreAdvisories *[]*string `field:"optional" json:"npmAuditIgnoreAdvisories" yaml:"npmAuditIgnoreAdvisories"`
// https://yarnpkg.com/configuration/yarnrc#npmAuditRegistry.
// Experimental.
NpmAuditRegistry *string `field:"optional" json:"npmAuditRegistry" yaml:"npmAuditRegistry"`
// https://yarnpkg.com/configuration/yarnrc#npmAuthIdent.
// Experimental.
NpmAuthIdent *string `field:"optional" json:"npmAuthIdent" yaml:"npmAuthIdent"`
// https://yarnpkg.com/configuration/yarnrc#npmAuthToken.
// Experimental.
NpmAuthToken *string `field:"optional" json:"npmAuthToken" yaml:"npmAuthToken"`
// https://yarnpkg.com/configuration/yarnrc#npmPublishAccess.
// Experimental.
NpmPublishAccess YarnNpmPublishAccess `field:"optional" json:"npmPublishAccess" yaml:"npmPublishAccess"`
// https://yarnpkg.com/configuration/yarnrc#npmPublishRegistry.
// Experimental.
NpmPublishRegistry *string `field:"optional" json:"npmPublishRegistry" yaml:"npmPublishRegistry"`
// https://yarnpkg.com/configuration/yarnrc#npmRegistries.
// Experimental.
NpmRegistries *map[string]*YarnNpmRegistry `field:"optional" json:"npmRegistries" yaml:"npmRegistries"`
// https://yarnpkg.com/configuration/yarnrc#npmRegistryServer.
// Experimental.
NpmRegistryServer *string `field:"optional" json:"npmRegistryServer" yaml:"npmRegistryServer"`
// https://yarnpkg.com/configuration/yarnrc#npmScopes.
// Experimental.
NpmScopes *map[string]*YarnNpmScope `field:"optional" json:"npmScopes" yaml:"npmScopes"`
// https://yarnpkg.com/configuration/yarnrc#packageExtensions.
// Experimental.
PackageExtensions *map[string]*YarnPackageExtension `field:"optional" json:"packageExtensions" yaml:"packageExtensions"`
// https://yarnpkg.com/configuration/yarnrc#patchFolder.
// Experimental.
PatchFolder *string `field:"optional" json:"patchFolder" yaml:"patchFolder"`
// https://v3.yarnpkg.com/configuration/yarnrc#pnpDataPath.
// Deprecated: - removed in Yarn v4 and newer.
PnpDataPath *string `field:"optional" json:"pnpDataPath" yaml:"pnpDataPath"`
// https://yarnpkg.com/configuration/yarnrc#pnpEnableEsmLoader.
// Experimental.
PnpEnableEsmLoader *bool `field:"optional" json:"pnpEnableEsmLoader" yaml:"pnpEnableEsmLoader"`
// https://yarnpkg.com/configuration/yarnrc#pnpEnableInlining.
// Experimental.
PnpEnableInlining *bool `field:"optional" json:"pnpEnableInlining" yaml:"pnpEnableInlining"`
// https://yarnpkg.com/configuration/yarnrc#pnpFallbackMode.
// Experimental.
PnpFallbackMode YarnPnpFallbackMode `field:"optional" json:"pnpFallbackMode" yaml:"pnpFallbackMode"`
// https://yarnpkg.com/configuration/yarnrc#pnpIgnorePatterns.
// Experimental.
PnpIgnorePatterns *[]*string `field:"optional" json:"pnpIgnorePatterns" yaml:"pnpIgnorePatterns"`
// https://yarnpkg.com/configuration/yarnrc#pnpMode.
// Experimental.
PnpMode YarnPnpMode `field:"optional" json:"pnpMode" yaml:"pnpMode"`
// https://yarnpkg.com/configuration/yarnrc#pnpShebang.
// Experimental.
PnpShebang *string `field:"optional" json:"pnpShebang" yaml:"pnpShebang"`
// https://yarnpkg.com/configuration/yarnrc#pnpUnpluggedFolder.
// Experimental.
PnpUnpluggedFolder *string `field:"optional" json:"pnpUnpluggedFolder" yaml:"pnpUnpluggedFolder"`
// https://v3.yarnpkg.com/configuration/yarnrc#preferAggregateCacheInfo.
// Deprecated: - removed in Yarn v4 and newer.
PreferAggregateCacheInfo *bool `field:"optional" json:"preferAggregateCacheInfo" yaml:"preferAggregateCacheInfo"`
// https://yarnpkg.com/configuration/yarnrc#preferDeferredVersions.
// Experimental.
PreferDeferredVersions *bool `field:"optional" json:"preferDeferredVersions" yaml:"preferDeferredVersions"`
// https://yarnpkg.com/configuration/yarnrc#preferInteractive.
// Experimental.
PreferInteractive *bool `field:"optional" json:"preferInteractive" yaml:"preferInteractive"`
// https://yarnpkg.com/configuration/yarnrc#preferReuse.
// Experimental.
PreferReuse *bool `field:"optional" json:"preferReuse" yaml:"preferReuse"`
// https://yarnpkg.com/configuration/yarnrc#preferTruncatedLines.
// Experimental.
PreferTruncatedLines *bool `field:"optional" json:"preferTruncatedLines" yaml:"preferTruncatedLines"`
// https://yarnpkg.com/configuration/yarnrc#progressBarStyle.
// Experimental.
ProgressBarStyle YarnProgressBarStyle `field:"optional" json:"progressBarStyle" yaml:"progressBarStyle"`
// https://yarnpkg.com/configuration/yarnrc#rcFilename.
// Experimental.
RcFilename *string `field:"optional" json:"rcFilename" yaml:"rcFilename"`
// https://yarnpkg.com/configuration/yarnrc#supportedArchitectures.
// Experimental.
SupportedArchitectures *YarnSupportedArchitectures `field:"optional" json:"supportedArchitectures" yaml:"supportedArchitectures"`
// https://yarnpkg.com/configuration/yarnrc#taskPoolConcurrency.
// Experimental.
TaskPoolConcurrency *string `field:"optional" json:"taskPoolConcurrency" yaml:"taskPoolConcurrency"`
// https://yarnpkg.com/configuration/yarnrc#telemetryInterval.
// Experimental.
TelemetryInterval *float64 `field:"optional" json:"telemetryInterval" yaml:"telemetryInterval"`
// https://yarnpkg.com/configuration/yarnrc#telemetryUserId.
// Experimental.
TelemetryUserId *string `field:"optional" json:"telemetryUserId" yaml:"telemetryUserId"`
// https://yarnpkg.com/configuration/yarnrc#tsEnableAutoTypes.
// Experimental.
TsEnableAutoTypes *bool `field:"optional" json:"tsEnableAutoTypes" yaml:"tsEnableAutoTypes"`
// https://yarnpkg.com/configuration/yarnrc#unsafeHttpWhitelist.
// Experimental.
UnsafeHttpWhitelist *[]*string `field:"optional" json:"unsafeHttpWhitelist" yaml:"unsafeHttpWhitelist"`
// https://yarnpkg.com/configuration/yarnrc#virtualFolder.
// Experimental.
VirtualFolder *string `field:"optional" json:"virtualFolder" yaml:"virtualFolder"`
// https://yarnpkg.com/configuration/yarnrc#winLinkType.
// Experimental.
WinLinkType YarnWinLinkType `field:"optional" json:"winLinkType" yaml:"winLinkType"`
// https://yarnpkg.com/configuration/yarnrc#workerPoolMode.
// Experimental.
WorkerPoolMode YarnWorkerPoolMode `field:"optional" json:"workerPoolMode" yaml:"workerPoolMode"`
// https://yarnpkg.com/configuration/yarnrc#yarnPath.
// Experimental.
YarnPath *string `field:"optional" json:"yarnPath" yaml:"yarnPath"`
}
Configuration for .yarnrc.yml in Yarn Berry v4. Experimental.
Source Files
¶
- AddBundleOptions.go
- ArrowParens.go
- AutoRelease.go
- BuildWorkflowOptions.go
- Bundle.go
- BundleLogLevel.go
- Bundler.go
- BundlerOptions.go
- Bundler__checks.go
- BundlingOptions.go
- Charset.go
- CodeArtifactAuthProvider.go
- CodeArtifactOptions.go
- CoverageThreshold.go
- EmbeddedLanguageFormatting.go
- EndOfLine.go
- Eslint.go
- EslintOptions.go
- EslintOverride.go
- Eslint__checks.go
- HTMLWhitespaceSensitivity.go
- HasteConfig.go
- Jest.go
- JestConfigOptions.go
- JestOptions.go
- JestReporter.go
- JestReporter__checks.go
- Jest__checks.go
- LicenseChecker.go
- LicenseCheckerOptions.go
- LicenseChecker__checks.go
- NodePackage.go
- NodePackageManager.go
- NodePackageOptions.go
- NodePackage__checks.go
- NodeProject.go
- NodeProjectOptions.go
- NodeProject__checks.go
- NpmAccess.go
- NpmConfig.go
- NpmConfigOptions.go
- NpmConfig__checks.go
- PeerDependencyOptions.go
- Prettier.go
- PrettierOptions.go
- PrettierOverride.go
- PrettierSettings.go
- Prettier__checks.go
- Projenrc.go
- ProjenrcOptions.go
- Projenrc__checks.go
- ProseWrap.go
- QuoteProps.go
- RenderWorkflowSetupOptions.go
- RunBundleTask.go
- ScopedPackagesOptions.go
- SourceMapMode.go
- TrailingComma.go
- Transform.go
- Transform__checks.go
- TypeScriptCompilerOptions.go
- TypeScriptImportsNotUsedAsValues.go
- TypeScriptJsxMode.go
- TypeScriptModuleDetection.go
- TypeScriptModuleResolution.go
- TypescriptConfig.go
- TypescriptConfigExtends.go
- TypescriptConfigExtends__checks.go
- TypescriptConfigOptions.go
- TypescriptConfig__checks.go
- UpdateSnapshot.go
- UpgradeDependencies.go
- UpgradeDependenciesOptions.go
- UpgradeDependenciesSchedule.go
- UpgradeDependenciesSchedule__checks.go
- UpgradeDependenciesWorkflowOptions.go
- UpgradeDependencies__checks.go
- WatchPlugin.go
- WatchPlugin__checks.go
- YarnBerryOptions.go
- YarnCacheMigrationMode.go
- YarnChecksumBehavior.go
- YarnDefaultSemverRangePrefix.go
- YarnLogFilter.go
- YarnLogFilterLevel.go
- YarnNetworkSetting.go
- YarnNmHoistingLimit.go
- YarnNmMode.go
- YarnNodeLinker.go
- YarnNpmPublishAccess.go
- YarnNpmRegistry.go
- YarnNpmScope.go
- YarnPackageExtension.go
- YarnPeerDependencyMeta.go
- YarnPnpFallbackMode.go
- YarnPnpMode.go
- YarnProgressBarStyle.go
- YarnSupportedArchitectures.go
- YarnWinLinkType.go
- YarnWorkerPoolMode.go
- Yarnrc.go
- YarnrcOptions.go
- Yarnrc__checks.go
- main.go