@nikovirtala/projen-constructs 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1055 @@
1
+ import type { cdk, github, GitOptions, GroupRunnerOptions, IgnoreFileOptions, javascript, LoggerOptions, Project, ProjenrcJsonOptions, ReleasableCommits, release, RenovatebotOptions, SampleReadmeProps, typescript } from 'projen';
2
+ import type { VitestOptions } from '../';
3
+ /**
4
+ * JsiiProjectOptions
5
+ */
6
+ export interface JsiiProjectOptions {
7
+ /**
8
+ * @default "."
9
+ * @stability experimental
10
+ */
11
+ readonly rootdir?: string;
12
+ /**
13
+ * Publish to pypi.
14
+ * @default - no publishing
15
+ * @stability experimental
16
+ */
17
+ readonly publishToPypi?: cdk.JsiiPythonTarget;
18
+ /**
19
+ * Publish to NuGet.
20
+ * @default - no publishing
21
+ * @stability experimental
22
+ */
23
+ readonly publishToNuget?: cdk.JsiiDotNetTarget;
24
+ /**
25
+ * Publish to maven.
26
+ * @default - no publishing
27
+ * @stability experimental
28
+ */
29
+ readonly publishToMaven?: cdk.JsiiJavaTarget;
30
+ /**
31
+ * Publish Go bindings to a git repository.
32
+ * @default - no publishing
33
+ * @stability experimental
34
+ */
35
+ readonly publishToGo?: cdk.JsiiGoTarget;
36
+ /**
37
+ * Version of the jsii compiler to use.
38
+ * Set to "*" if you want to manually manage the version of jsii in your
39
+ * project by managing updates to `package.json` on your own.
40
+ *
41
+ * NOTE: The jsii compiler releases since 5.0.0 are not semantically versioned
42
+ * and should remain on the same minor, so we recommend using a `~` dependency
43
+ * (e.g. `~5.0.0`).
44
+ * @default "~5.8.0"
45
+ * @stability experimental
46
+ * @pjnew "~5.9.0"
47
+ */
48
+ readonly jsiiVersion?: string;
49
+ /**
50
+ * Accepts a list of glob patterns.
51
+ * Files matching any of those patterns will be excluded from the TypeScript compiler input.
52
+ *
53
+ * By default, jsii will include all *.ts files (except .d.ts files) in the TypeScript compiler input.
54
+ * This can be problematic for example when the package's build or test procedure generates .ts files
55
+ * that cannot be compiled with jsii's compiler settings.
56
+ * @stability experimental
57
+ */
58
+ readonly excludeTypescript?: Array<string>;
59
+ /**
60
+ * File path for generated docs.
61
+ * @default "API.md"
62
+ * @stability experimental
63
+ */
64
+ readonly docgenFilePath?: string;
65
+ /**
66
+ * Emit a compressed version of the assembly.
67
+ * @default false
68
+ * @stability experimental
69
+ */
70
+ readonly compressAssembly?: boolean;
71
+ /**
72
+ * Name of the ignore file for API compatibility tests.
73
+ * @default ".compatignore"
74
+ * @stability experimental
75
+ */
76
+ readonly compatIgnore?: string;
77
+ /**
78
+ * Automatically run API compatibility test against the latest version published to npm after compilation.
79
+ * - You can manually run compatibility tests using `yarn compat` if this feature is disabled.
80
+ * - You can ignore compatibility failures by adding lines to a ".compatignore" file.
81
+ * @default false
82
+ * @stability experimental
83
+ */
84
+ readonly compat?: boolean;
85
+ /**
86
+ * Git repository URL.
87
+ * @default $GIT_REMOTE
88
+ * @stability experimental
89
+ */
90
+ readonly repositoryUrl: string;
91
+ /**
92
+ * Email or URL of the library author.
93
+ * @default $GIT_USER_EMAIL
94
+ * @stability experimental
95
+ */
96
+ readonly authorAddress: string;
97
+ /**
98
+ * The name of the library author.
99
+ * @default $GIT_USER_NAME
100
+ * @stability experimental
101
+ */
102
+ readonly author: string;
103
+ /**
104
+ * TypeScript version to use.
105
+ * NOTE: Typescript is not semantically versioned and should remain on the
106
+ * same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`).
107
+ * @default "latest"
108
+ * @stability experimental
109
+ */
110
+ readonly typescriptVersion?: string;
111
+ /**
112
+ * The name of the development tsconfig.json file.
113
+ * @default "tsconfig.dev.json"
114
+ * @stability experimental
115
+ */
116
+ readonly tsconfigDevFile?: string;
117
+ /**
118
+ * Custom tsconfig options for the development tsconfig.json file (used for testing).
119
+ * @default - use the production tsconfig options
120
+ * @stability experimental
121
+ */
122
+ readonly tsconfigDev?: javascript.TypescriptConfigOptions;
123
+ /**
124
+ * Custom TSConfig.
125
+ * @default - default options
126
+ * @stability experimental
127
+ */
128
+ readonly tsconfig?: javascript.TypescriptConfigOptions;
129
+ /**
130
+ * Jest tests directory. Tests files should be named `xxx.test.ts`.
131
+ * If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`),
132
+ * then tests are going to be compiled into `lib/` and executed as javascript.
133
+ * If the test directory is outside of `src`, then we configure jest to
134
+ * compile the code in-memory.
135
+ * @default "test"
136
+ * @stability experimental
137
+ */
138
+ readonly testdir?: string;
139
+ /**
140
+ * Typescript sources directory.
141
+ * @default "src"
142
+ * @stability experimental
143
+ */
144
+ readonly srcdir?: string;
145
+ /**
146
+ * Options for .projenrc.ts.
147
+ * @stability experimental
148
+ */
149
+ readonly projenrcTsOptions?: typescript.ProjenrcOptions;
150
+ /**
151
+ * Use TypeScript for your projenrc file (`.projenrc.ts`).
152
+ * @default false
153
+ * @stability experimental
154
+ * @pjnew true
155
+ */
156
+ readonly projenrcTs?: boolean;
157
+ /**
158
+ * Typescript artifacts output directory.
159
+ * @default "lib"
160
+ * @stability experimental
161
+ */
162
+ readonly libdir?: string;
163
+ /**
164
+ * The .d.ts file that includes the type declarations for this module.
165
+ * @default - .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
166
+ * @stability experimental
167
+ */
168
+ readonly entrypointTypes?: string;
169
+ /**
170
+ * Docs directory.
171
+ * @default "docs"
172
+ * @stability experimental
173
+ */
174
+ readonly docsDirectory?: string;
175
+ /**
176
+ * Docgen by Typedoc.
177
+ * @default false
178
+ * @stability experimental
179
+ */
180
+ readonly docgen?: boolean;
181
+ /**
182
+ * Do not generate a `tsconfig.dev.json` file.
183
+ * @default false
184
+ * @stability experimental
185
+ */
186
+ readonly disableTsconfigDev?: boolean;
187
+ /**
188
+ * Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
189
+ * @default false
190
+ * @stability experimental
191
+ */
192
+ readonly disableTsconfig?: boolean;
193
+ /**
194
+ * Enable Node.js package cache in GitHub workflows.
195
+ * @default false
196
+ * @stability experimental
197
+ */
198
+ readonly workflowPackageCache?: boolean;
199
+ /**
200
+ * The node version used in GitHub Actions workflows.
201
+ * Always use this option if your GitHub Actions workflows require a specific to run.
202
+ * @default - `minNodeVersion` if set, otherwise `lts/*`.
203
+ * @stability experimental
204
+ */
205
+ readonly workflowNodeVersion?: string;
206
+ /**
207
+ * The git identity to use in workflows.
208
+ * @default - default GitHub Actions user
209
+ * @stability experimental
210
+ */
211
+ readonly workflowGitIdentity?: github.GitIdentity;
212
+ /**
213
+ * Workflow steps to use in order to bootstrap this repo.
214
+ * @default "yarn install --frozen-lockfile && yarn projen"
215
+ * @stability experimental
216
+ */
217
+ readonly workflowBootstrapSteps?: Array<github.workflows.JobStep>;
218
+ /**
219
+ * Automatically release to npm when new versions are introduced.
220
+ * @default false
221
+ * @stability experimental
222
+ */
223
+ readonly releaseToNpm?: boolean;
224
+ /**
225
+ * Add release management to this project.
226
+ * @default - true (false for subprojects)
227
+ * @stability experimental
228
+ */
229
+ readonly release?: boolean;
230
+ /**
231
+ * The contents of the pull request template.
232
+ * @default - default content
233
+ * @stability experimental
234
+ */
235
+ readonly pullRequestTemplateContents?: Array<string>;
236
+ /**
237
+ * Include a GitHub pull request template.
238
+ * @default true
239
+ * @stability experimental
240
+ */
241
+ readonly pullRequestTemplate?: boolean;
242
+ /**
243
+ * Version of projen to install.
244
+ * @default - Defaults to the latest version.
245
+ * @stability experimental
246
+ */
247
+ readonly projenVersion?: string;
248
+ /**
249
+ * Options for .projenrc.js.
250
+ * @default - default options
251
+ * @stability experimental
252
+ */
253
+ readonly projenrcJsOptions?: javascript.ProjenrcOptions;
254
+ /**
255
+ * Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation.
256
+ * @default - true if projenrcJson is false
257
+ * @stability experimental
258
+ */
259
+ readonly projenrcJs?: boolean;
260
+ /**
261
+ * Indicates of "projen" should be installed as a devDependency.
262
+ * @default - true if not a subproject
263
+ * @stability experimental
264
+ */
265
+ readonly projenDevDependency?: boolean;
266
+ /**
267
+ * Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`).
268
+ * @default true
269
+ * @stability experimental
270
+ */
271
+ readonly package?: boolean;
272
+ /**
273
+ * Configuration options for .npmignore file.
274
+ * @stability experimental
275
+ */
276
+ readonly npmIgnoreOptions?: IgnoreFileOptions;
277
+ /**
278
+ * Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
279
+ * @default true
280
+ * @stability experimental
281
+ */
282
+ readonly npmignoreEnabled?: boolean;
283
+ /**
284
+ * Additional entries to .gitignore.
285
+ * @stability experimental
286
+ */
287
+ readonly gitignore?: Array<string>;
288
+ /**
289
+ * Options for `UpgradeDependencies`.
290
+ * @default - default options
291
+ * @stability experimental
292
+ */
293
+ readonly depsUpgradeOptions?: javascript.UpgradeDependenciesOptions;
294
+ /**
295
+ * Use tasks and github workflows to handle dependency upgrades.
296
+ * Cannot be used in conjunction with `dependabot`.
297
+ * @default true
298
+ * @stability experimental
299
+ */
300
+ readonly depsUpgrade?: boolean;
301
+ /**
302
+ * Options for dependabot.
303
+ * @default - default options
304
+ * @stability experimental
305
+ */
306
+ readonly dependabotOptions?: github.DependabotOptions;
307
+ /**
308
+ * Use dependabot to handle dependency upgrades.
309
+ * Cannot be used in conjunction with `depsUpgrade`.
310
+ * @default false
311
+ * @stability experimental
312
+ */
313
+ readonly dependabot?: boolean;
314
+ /**
315
+ * The copyright years to put in the LICENSE file.
316
+ * @default - current year
317
+ * @stability experimental
318
+ */
319
+ readonly copyrightPeriod?: string;
320
+ /**
321
+ * License copyright owner.
322
+ * @default - defaults to the value of authorName or "" if `authorName` is undefined.
323
+ * @stability experimental
324
+ */
325
+ readonly copyrightOwner?: string;
326
+ /**
327
+ * Define the secret name for a specified https://codecov.io/ token.
328
+ * @default - OIDC auth is used
329
+ * @stability experimental
330
+ */
331
+ readonly codeCovTokenSecret?: string;
332
+ /**
333
+ * Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v5 By default, OIDC auth is used. Alternatively a token can be provided via `codeCovTokenSecret`.
334
+ * @default false
335
+ * @stability experimental
336
+ */
337
+ readonly codeCov?: boolean;
338
+ /**
339
+ * Configure which licenses should be deemed acceptable for use by dependencies.
340
+ * This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
341
+ * @default - no license checks are run during the build and all licenses will be accepted
342
+ * @stability experimental
343
+ */
344
+ readonly checkLicenses?: javascript.LicenseCheckerOptions;
345
+ /**
346
+ * Options for `Bundler`.
347
+ * @stability experimental
348
+ */
349
+ readonly bundlerOptions?: javascript.BundlerOptions;
350
+ /**
351
+ * Options for PR build workflow.
352
+ * @stability experimental
353
+ */
354
+ readonly buildWorkflowOptions?: javascript.BuildWorkflowOptions;
355
+ /**
356
+ * Define a GitHub workflow for building PRs.
357
+ * @default - true if not a subproject
358
+ * @stability experimental
359
+ */
360
+ readonly buildWorkflow?: boolean;
361
+ /**
362
+ * Biome options.
363
+ * @default - default options
364
+ * @stability experimental
365
+ */
366
+ readonly biomeOptions?: javascript.BiomeOptions;
367
+ /**
368
+ * Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
369
+ * Throw if set to true but `autoApproveOptions` are not defined.
370
+ * @default - true
371
+ * @stability experimental
372
+ */
373
+ readonly autoApproveUpgrades?: boolean;
374
+ /**
375
+ * Security audit options.
376
+ * @default - default options
377
+ * @stability experimental
378
+ */
379
+ readonly auditDepsOptions?: javascript.AuditOptions;
380
+ /**
381
+ * Run security audit on dependencies.
382
+ * When enabled, creates an "audit" task that checks for known security vulnerabilities
383
+ * in dependencies. By default, runs during every build and checks for "high" severity
384
+ * vulnerabilities or above in all dependencies (including dev dependencies).
385
+ * @default false
386
+ * @stability experimental
387
+ */
388
+ readonly auditDeps?: boolean;
389
+ /**
390
+ * A directory which will contain build artifacts.
391
+ * @default "dist"
392
+ * @stability experimental
393
+ */
394
+ readonly artifactsDirectory?: string;
395
+ /**
396
+ * The name of the main release branch.
397
+ * @default "main"
398
+ * @stability experimental
399
+ */
400
+ readonly defaultReleaseBranch: string;
401
+ /**
402
+ * Github Runner Group selection options.
403
+ * @stability experimental
404
+ * @description Defines a target Runner Group by name and/or labels
405
+ * @throws {Error} if both `runsOn` and `runsOnGroup` are specified
406
+ */
407
+ readonly workflowRunsOnGroup?: GroupRunnerOptions;
408
+ /**
409
+ * Github Runner selection labels.
410
+ * @default ["ubuntu-latest"]
411
+ * @stability experimental
412
+ * @description Defines a target Runner by labels
413
+ * @throws {Error} if both `runsOn` and `runsOnGroup` are specified
414
+ */
415
+ readonly workflowRunsOn?: Array<string>;
416
+ /**
417
+ * Container image to use for GitHub workflows.
418
+ * @default - default image
419
+ * @stability experimental
420
+ */
421
+ readonly workflowContainerImage?: string;
422
+ /**
423
+ * Custom configuration used when creating changelog with commit-and-tag-version package.
424
+ * Given values either append to default configuration or overwrite values in it.
425
+ * @default - standard configuration applicable for GitHub repositories
426
+ * @stability experimental
427
+ */
428
+ readonly versionrcOptions?: Record<string, any>;
429
+ /**
430
+ * A set of workflow steps to execute in order to setup the workflow container.
431
+ * @stability experimental
432
+ */
433
+ readonly releaseWorkflowSetupSteps?: Array<github.workflows.JobStep>;
434
+ /**
435
+ * The name of the default release workflow.
436
+ * @default "release"
437
+ * @stability experimental
438
+ */
439
+ readonly releaseWorkflowName?: string;
440
+ /**
441
+ * Build environment variables for release workflows.
442
+ * @default {}
443
+ * @stability experimental
444
+ */
445
+ readonly releaseWorkflowEnv?: Record<string, string>;
446
+ /**
447
+ * The release trigger to use.
448
+ * @default - Continuous releases (`ReleaseTrigger.continuous()`)
449
+ * @stability experimental
450
+ */
451
+ readonly releaseTrigger?: release.ReleaseTrigger;
452
+ /**
453
+ * Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
454
+ * Note: this prefix is used to detect the latest tagged version
455
+ * when bumping, so if you change this on a project with an existing version
456
+ * history, you may need to manually tag your latest release
457
+ * with the new prefix.
458
+ * @default "v"
459
+ * @stability experimental
460
+ */
461
+ readonly releaseTagPrefix?: string;
462
+ /**
463
+ * The label to apply to issues indicating publish failures.
464
+ * Only applies if `releaseFailureIssue` is true.
465
+ * @default "failed-release"
466
+ * @stability experimental
467
+ */
468
+ readonly releaseFailureIssueLabel?: string;
469
+ /**
470
+ * Create a github issue on every failed publishing task.
471
+ * @default false
472
+ * @stability experimental
473
+ */
474
+ readonly releaseFailureIssue?: boolean;
475
+ /**
476
+ * The GitHub Actions environment used for the release.
477
+ * This can be used to add an explicit approval step to the release
478
+ * or limit who can initiate a release through environment protection rules.
479
+ *
480
+ * When multiple artifacts are released, the environment can be overwritten
481
+ * on a per artifact basis.
482
+ * @default - no environment used, unless set at the artifact level
483
+ * @stability experimental
484
+ */
485
+ readonly releaseEnvironment?: string;
486
+ /**
487
+ * Defines additional release branches.
488
+ * A workflow will be created for each
489
+ * release branch which will publish releases from commits in this branch.
490
+ * Each release branch _must_ be assigned a major version number which is used
491
+ * to enforce that versions published from that branch always use that major
492
+ * version. If multiple branches are used, the `majorVersion` field must also
493
+ * be provided for the default branch.
494
+ * @default - no additional branches are used for release. you can use
495
+ `addBranch()` to add additional branches.
496
+ * @stability experimental
497
+ */
498
+ readonly releaseBranches?: Record<string, release.BranchOptions>;
499
+ /**
500
+ * Find commits that should be considered releasable Used to decide if a release is required.
501
+ * @default ReleasableCommits.everyCommit()
502
+ * @stability experimental
503
+ */
504
+ readonly releasableCommits?: ReleasableCommits;
505
+ /**
506
+ * Define publishing tasks that can be executed manually as well as workflows.
507
+ * Normally, publishing only happens within automated workflows. Enable this
508
+ * in order to create a publishing task for each publishing activity.
509
+ * @default false
510
+ * @stability experimental
511
+ */
512
+ readonly publishTasks?: boolean;
513
+ /**
514
+ * Instead of actually publishing to package managers, just print the publishing command.
515
+ * @default false
516
+ * @stability experimental
517
+ */
518
+ readonly publishDryRun?: boolean;
519
+ /**
520
+ * Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
521
+ * @default - normal semantic versions
522
+ * @stability experimental
523
+ */
524
+ readonly prerelease?: string;
525
+ /**
526
+ * Steps to execute after build as part of the release workflow.
527
+ * @default []
528
+ * @stability experimental
529
+ */
530
+ readonly postBuildSteps?: Array<github.workflows.JobStep>;
531
+ /**
532
+ * The npmDistTag to use when publishing from the default branch.
533
+ * To set the npm dist-tag for release branches, set the `npmDistTag` property
534
+ * for each branch.
535
+ * @default "latest"
536
+ * @stability experimental
537
+ */
538
+ readonly npmDistTag?: string;
539
+ /**
540
+ * A shell command to control the next version to release.
541
+ * If present, this shell command will be run before the bump is executed, and
542
+ * it determines what version to release. It will be executed in the following
543
+ * environment:
544
+ *
545
+ * - Working directory: the project directory.
546
+ * - `$VERSION`: the current version. Looks like `1.2.3`.
547
+ * - `$LATEST_TAG`: the most recent tag. Looks like `prefix-v1.2.3`, or may be unset.
548
+ * - `$SUGGESTED_BUMP`: the suggested bump action based on commits. One of `major|minor|patch|none`.
549
+ *
550
+ * The command should print one of the following to `stdout`:
551
+ *
552
+ * - Nothing: the next version number will be determined based on commit history.
553
+ * - `x.y.z`: the next version number will be `x.y.z`.
554
+ * - `major|minor|patch`: the next version number will be the current version number
555
+ * with the indicated component bumped.
556
+ *
557
+ * This setting cannot be specified together with `minMajorVersion`; the invoked
558
+ * script can be used to achieve the effects of `minMajorVersion`.
559
+ * @default - The next version will be determined based on the commit history and project settings.
560
+ * @stability experimental
561
+ */
562
+ readonly nextVersionCommand?: string;
563
+ /**
564
+ * Minimal Major version to release.
565
+ * This can be useful to set to 1, as breaking changes before the 1.x major
566
+ * release are not incrementing the major version number.
567
+ *
568
+ * Can not be set together with `majorVersion`.
569
+ * @default - No minimum version is being enforced
570
+ * @stability experimental
571
+ */
572
+ readonly minMajorVersion?: number;
573
+ /**
574
+ * Major version to release from the default branch.
575
+ * If this is specified, we bump the latest version of this major version line.
576
+ * If not specified, we bump the global latest version.
577
+ * @default - Major version is not enforced.
578
+ * @stability experimental
579
+ */
580
+ readonly majorVersion?: number;
581
+ /**
582
+ * Version requirement of `publib` which is used to publish modules to npm.
583
+ * @default "latest"
584
+ * @stability experimental
585
+ */
586
+ readonly jsiiReleaseVersion?: string;
587
+ /**
588
+ * The `commit-and-tag-version` compatible package used to bump the package version, as a dependency string.
589
+ * This can be any compatible package version, including the deprecated `standard-version@9`.
590
+ * @default - A recent version of "commit-and-tag-version"
591
+ * @stability experimental
592
+ */
593
+ readonly bumpPackage?: string;
594
+ /**
595
+ * Options for Yarn Berry.
596
+ * @default - Yarn Berry v4 with all default options
597
+ * @stability experimental
598
+ */
599
+ readonly yarnBerryOptions?: javascript.YarnBerryOptions;
600
+ /**
601
+ * Package's Stability.
602
+ * @stability experimental
603
+ */
604
+ readonly stability?: string;
605
+ /**
606
+ * Options for privately hosted scoped packages.
607
+ * @default - fetch all scoped packages from the public npm registry
608
+ * @stability experimental
609
+ */
610
+ readonly scopedPackagesOptions?: Array<javascript.ScopedPackagesOptions>;
611
+ /**
612
+ * 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.
613
+ * @stability experimental
614
+ */
615
+ readonly repositoryDirectory?: string;
616
+ /**
617
+ * The repository is the location where the actual code for your package lives.
618
+ * See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
619
+ * @stability experimental
620
+ */
621
+ readonly repository?: string;
622
+ /**
623
+ * The version of PNPM to use if using PNPM as a package manager.
624
+ * @default "9"
625
+ * @stability experimental
626
+ */
627
+ readonly pnpmVersion?: string;
628
+ /**
629
+ * Peer dependencies for this module.
630
+ * Dependencies listed here are required to
631
+ * be installed (and satisfied) by the _consumer_ of this library. Using peer
632
+ * dependencies allows you to ensure that only a single module of a certain
633
+ * library exists in the `node_modules` tree of your consumers.
634
+ *
635
+ * Note that prior to npm@7, peer dependencies are _not_ automatically
636
+ * installed, which means that adding peer dependencies to a library will be a
637
+ * breaking change for your customers.
638
+ *
639
+ * Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is
640
+ * enabled by default), projen will automatically add a dev dependency with a
641
+ * pinned version for each peer dependency. This will ensure that you build &
642
+ * test your module against the lowest peer version required.
643
+ * @default []
644
+ * @stability experimental
645
+ */
646
+ readonly peerDeps?: Array<string>;
647
+ /**
648
+ * Options for `peerDeps`.
649
+ * @stability experimental
650
+ */
651
+ readonly peerDependencyOptions?: javascript.PeerDependencyOptions;
652
+ /**
653
+ * The "name" in package.json.
654
+ * @default - defaults to project name
655
+ * @stability experimental
656
+ * @featured true
657
+ */
658
+ readonly packageName?: string;
659
+ /**
660
+ * The Node Package Manager used to execute scripts.
661
+ * @default NodePackageManager.YARN_CLASSIC
662
+ * @stability experimental
663
+ */
664
+ readonly packageManager?: javascript.NodePackageManager;
665
+ /**
666
+ * Use trusted publishing for publishing to npmjs.com Needs to be pre-configured on npm.js to work.
667
+ * @default - false
668
+ * @stability experimental
669
+ */
670
+ readonly npmTrustedPublishing?: boolean;
671
+ /**
672
+ * GitHub secret which contains the NPM token to use when publishing packages.
673
+ * @default "NPM_TOKEN"
674
+ * @stability experimental
675
+ */
676
+ readonly npmTokenSecret?: string;
677
+ /**
678
+ * The base URL of the npm package registry.
679
+ * Must be a URL (e.g. start with "https://" or "http://")
680
+ * @default "https://registry.npmjs.org"
681
+ * @stability experimental
682
+ */
683
+ readonly npmRegistryUrl?: string;
684
+ /**
685
+ * Should provenance statements be generated when the package is published.
686
+ * A supported package manager is required to publish a package with npm provenance statements and
687
+ * you will need to use a supported CI/CD provider.
688
+ *
689
+ * Note that the projen `Release` and `Publisher` components are using `publib` to publish packages,
690
+ * which is using npm internally and supports provenance statements independently of the package manager used.
691
+ * @default - true for public packages, false otherwise
692
+ * @stability experimental
693
+ */
694
+ readonly npmProvenance?: boolean;
695
+ /**
696
+ * Access level of the npm package.
697
+ * @default - for scoped packages (e.g. `foo@bar`), the default is
698
+ `NpmAccess.RESTRICTED`, for non-scoped packages, the default is
699
+ `NpmAccess.PUBLIC`.
700
+ * @stability experimental
701
+ */
702
+ readonly npmAccess?: javascript.NpmAccess;
703
+ /**
704
+ * The minimum node version required by this package to function. Most projects should not use this option.
705
+ * The value indicates that the package is incompatible with any older versions of node.
706
+ * This requirement is enforced via the engines field.
707
+ *
708
+ * You will normally not need to set this option, even if your package is incompatible with EOL versions of node.
709
+ * Consider this option only if your package depends on a specific feature, that is not available in other LTS versions.
710
+ * Setting this option has very high impact on the consumers of your package,
711
+ * as package managers will actively prevent usage with node versions you have marked as incompatible.
712
+ *
713
+ * To change the node version of your CI/CD workflows, use `workflowNodeVersion`.
714
+ * @default - no minimum version is enforced
715
+ * @stability experimental
716
+ */
717
+ readonly minNodeVersion?: string;
718
+ /**
719
+ * The maximum node version supported by this package. Most projects should not use this option.
720
+ * The value indicates that the package is incompatible with any newer versions of node.
721
+ * This requirement is enforced via the engines field.
722
+ *
723
+ * You will normally not need to set this option.
724
+ * Consider this option only if your package is known to not function with newer versions of node.
725
+ * @default - no maximum version is enforced
726
+ * @stability experimental
727
+ */
728
+ readonly maxNodeVersion?: string;
729
+ /**
730
+ * Indicates if a license should be added.
731
+ * @default true
732
+ * @stability experimental
733
+ */
734
+ readonly licensed?: boolean;
735
+ /**
736
+ * License's SPDX identifier.
737
+ * See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
738
+ * Use the `licensed` option if you want to no license to be specified.
739
+ * @default "Apache-2.0"
740
+ * @stability experimental
741
+ */
742
+ readonly license?: string;
743
+ /**
744
+ * Keywords to include in `package.json`.
745
+ * @stability experimental
746
+ */
747
+ readonly keywords?: Array<string>;
748
+ /**
749
+ * Package's Homepage / Website.
750
+ * @stability experimental
751
+ */
752
+ readonly homepage?: string;
753
+ /**
754
+ * Module entrypoint (`main` in `package.json`).
755
+ * Set to an empty string to not include `main` in your package.json
756
+ * @default "lib/index.js"
757
+ * @stability experimental
758
+ */
759
+ readonly entrypoint?: string;
760
+ /**
761
+ * Build dependencies for this module.
762
+ * These dependencies will only be
763
+ * available in your build environment but will not be fetched when this
764
+ * module is consumed.
765
+ *
766
+ * The recommendation is to only specify the module name here (e.g.
767
+ * `express`). This will behave similar to `yarn add` or `npm install` in the
768
+ * sense that it will add the module as a dependency to your `package.json`
769
+ * file with the latest version (`^`). You can specify semver requirements in
770
+ * the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
771
+ * this will be what you `package.json` will eventually include.
772
+ * @default []
773
+ * @stability experimental
774
+ * @featured true
775
+ */
776
+ readonly devDeps?: Array<string>;
777
+ /**
778
+ * The description is just a string that helps people understand the purpose of the package.
779
+ * It can be used when searching for packages in a package manager as well.
780
+ * See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
781
+ * @stability experimental
782
+ * @featured true
783
+ */
784
+ readonly description?: string;
785
+ /**
786
+ * Runtime dependencies of this module.
787
+ * The recommendation is to only specify the module name here (e.g.
788
+ * `express`). This will behave similar to `yarn add` or `npm install` in the
789
+ * sense that it will add the module as a dependency to your `package.json`
790
+ * file with the latest version (`^`). You can specify semver requirements in
791
+ * the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
792
+ * this will be what you `package.json` will eventually include.
793
+ * @default []
794
+ * @stability experimental
795
+ * @featured true
796
+ */
797
+ readonly deps?: Array<string>;
798
+ /**
799
+ * Options for npm packages using AWS CodeArtifact.
800
+ * This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
801
+ * @default - undefined
802
+ * @stability experimental
803
+ */
804
+ readonly codeArtifactOptions?: javascript.CodeArtifactOptions;
805
+ /**
806
+ * The version of Bun to use if using Bun as a package manager.
807
+ * @default "latest"
808
+ * @stability experimental
809
+ */
810
+ readonly bunVersion?: string;
811
+ /**
812
+ * List of dependencies to bundle into this module.
813
+ * These modules will be
814
+ * added both to the `dependencies` section and `bundledDependencies` section of
815
+ * your `package.json`.
816
+ *
817
+ * The recommendation is to only specify the module name here (e.g.
818
+ * `express`). This will behave similar to `yarn add` or `npm install` in the
819
+ * sense that it will add the module as a dependency to your `package.json`
820
+ * file with the latest version (`^`). You can specify semver requirements in
821
+ * the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and
822
+ * this will be what you `package.json` will eventually include.
823
+ * @stability experimental
824
+ */
825
+ readonly bundledDeps?: Array<string>;
826
+ /**
827
+ * The url to your project's issue tracker.
828
+ * @stability experimental
829
+ */
830
+ readonly bugsUrl?: string;
831
+ /**
832
+ * The email address to which issues should be reported.
833
+ * @stability experimental
834
+ */
835
+ readonly bugsEmail?: string;
836
+ /**
837
+ * Binary programs vended with your module.
838
+ * You can use this option to add/customize how binaries are represented in
839
+ * your `package.json`, but unless `autoDetectBin` is `false`, every
840
+ * executable file under `bin` will automatically be added to this section.
841
+ * @stability experimental
842
+ */
843
+ readonly bin?: Record<string, string>;
844
+ /**
845
+ * Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
846
+ * @default true
847
+ * @stability experimental
848
+ */
849
+ readonly autoDetectBin?: boolean;
850
+ /**
851
+ * Author's URL / Website.
852
+ * @stability experimental
853
+ */
854
+ readonly authorUrl?: string;
855
+ /**
856
+ * Is the author an organization.
857
+ * @stability experimental
858
+ */
859
+ readonly authorOrganization?: boolean;
860
+ /**
861
+ * Author's name.
862
+ * @stability experimental
863
+ */
864
+ readonly authorName?: string;
865
+ /**
866
+ * Author's e-mail.
867
+ * @stability experimental
868
+ */
869
+ readonly authorEmail?: string;
870
+ /**
871
+ * Allow the project to include `peerDependencies` and `bundledDependencies`.
872
+ * This is normally only allowed for libraries. For apps, there's no meaning
873
+ * for specifying these.
874
+ * @default true
875
+ * @stability experimental
876
+ */
877
+ readonly allowLibraryDependencies?: boolean;
878
+ /**
879
+ * Enable VSCode integration.
880
+ * Enabled by default for root projects. Disabled for non-root projects.
881
+ * @default true
882
+ * @stability experimental
883
+ */
884
+ readonly vscode?: boolean;
885
+ /**
886
+ * Auto-close stale issues and pull requests.
887
+ * To disable set `stale` to `false`.
888
+ * @default - see defaults in `StaleOptions`
889
+ * @stability experimental
890
+ */
891
+ readonly staleOptions?: github.StaleOptions;
892
+ /**
893
+ * Auto-close of stale issues and pull request.
894
+ * See `staleOptions` for options.
895
+ * @default false
896
+ * @stability experimental
897
+ */
898
+ readonly stale?: boolean;
899
+ /**
900
+ * The README setup.
901
+ * @default - { filename: 'README.md', contents: '# replace this' }
902
+ * @stability experimental
903
+ */
904
+ readonly readme?: SampleReadmeProps;
905
+ /**
906
+ * Choose a method of providing GitHub API access for projen workflows.
907
+ * @default - use a personal access token named PROJEN_GITHUB_TOKEN
908
+ * @stability experimental
909
+ */
910
+ readonly projenCredentials?: github.GithubCredentials;
911
+ /**
912
+ * Add a Gitpod development environment.
913
+ * @default false
914
+ * @stability experimental
915
+ */
916
+ readonly gitpod?: boolean;
917
+ /**
918
+ * Options for GitHub integration.
919
+ * @default - see GitHubOptions
920
+ * @stability experimental
921
+ */
922
+ readonly githubOptions?: github.GitHubOptions;
923
+ /**
924
+ * Enable GitHub integration.
925
+ * Enabled by default for root projects. Disabled for non-root projects.
926
+ * @default true
927
+ * @stability experimental
928
+ */
929
+ readonly github?: boolean;
930
+ /**
931
+ * Add a VSCode development environment (used for GitHub Codespaces).
932
+ * @default false
933
+ * @stability experimental
934
+ */
935
+ readonly devContainer?: boolean;
936
+ /**
937
+ * Add a `clobber` task which resets the repo to origin.
938
+ * @default - true, but false for subprojects
939
+ * @stability experimental
940
+ */
941
+ readonly clobber?: boolean;
942
+ /**
943
+ * Configure options for automatic merging on GitHub.
944
+ * Has no effect if
945
+ * `github.mergify` or `autoMerge` is set to false.
946
+ * @default - see defaults in `AutoMergeOptions`
947
+ * @stability experimental
948
+ */
949
+ readonly autoMergeOptions?: github.AutoMergeOptions;
950
+ /**
951
+ * Enable automatic merging on GitHub.
952
+ * Has no effect if `github.mergify`
953
+ * is set to false.
954
+ * @default true
955
+ * @stability experimental
956
+ */
957
+ readonly autoMerge?: boolean;
958
+ /**
959
+ * Enable and configure the 'auto approve' workflow.
960
+ * @default - auto approve is disabled
961
+ * @stability experimental
962
+ */
963
+ readonly autoApproveOptions?: github.AutoApproveOptions;
964
+ /**
965
+ * Options for renovatebot.
966
+ * @default - default options
967
+ * @stability experimental
968
+ */
969
+ readonly renovatebotOptions?: RenovatebotOptions;
970
+ /**
971
+ * Use renovatebot to handle dependency upgrades.
972
+ * @default false
973
+ * @stability experimental
974
+ */
975
+ readonly renovatebot?: boolean;
976
+ /**
977
+ * Options for .projenrc.json.
978
+ * @default - default options
979
+ * @stability experimental
980
+ */
981
+ readonly projenrcJsonOptions?: ProjenrcJsonOptions;
982
+ /**
983
+ * Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
984
+ * @default false
985
+ * @stability experimental
986
+ */
987
+ readonly projenrcJson?: boolean;
988
+ /**
989
+ * The shell command to use in order to run the projen CLI.
990
+ * Can be used to customize in special environments.
991
+ * @default "npx projen"
992
+ * @stability experimental
993
+ */
994
+ readonly projenCommand?: string;
995
+ /**
996
+ * The parent project, if this project is part of a bigger project.
997
+ * @stability experimental
998
+ */
999
+ readonly parent?: Project;
1000
+ /**
1001
+ * The root directory of the project.
1002
+ * Relative to this directory, all files are synthesized.
1003
+ *
1004
+ * If this project has a parent, this directory is relative to the parent
1005
+ * directory and it cannot be the same as the parent or any of it's other
1006
+ * subprojects.
1007
+ * @default "."
1008
+ * @stability experimental
1009
+ */
1010
+ readonly outdir?: string;
1011
+ /**
1012
+ * Configure logging options such as verbosity.
1013
+ * @default {}
1014
+ * @stability experimental
1015
+ */
1016
+ readonly logging?: LoggerOptions;
1017
+ /**
1018
+ * Configuration options for git.
1019
+ * @stability experimental
1020
+ */
1021
+ readonly gitOptions?: GitOptions;
1022
+ /**
1023
+ * Configuration options for .gitignore file.
1024
+ * @stability experimental
1025
+ */
1026
+ readonly gitIgnoreOptions?: IgnoreFileOptions;
1027
+ /**
1028
+ * Whether to commit the managed files by default.
1029
+ * @default true
1030
+ * @stability experimental
1031
+ */
1032
+ readonly commitGenerated?: boolean;
1033
+ /**
1034
+ * This is the name of your project.
1035
+ * @default $BASEDIR
1036
+ * @stability experimental
1037
+ * @featured true
1038
+ */
1039
+ readonly name: string;
1040
+ /**
1041
+ * The Vitest configuration (when enabled).
1042
+ * @default - default Vitest configuration
1043
+ */
1044
+ readonly vitestOptions?: VitestOptions;
1045
+ /**
1046
+ * Enable testing with Vitest.
1047
+ * @default true
1048
+ */
1049
+ readonly vitest?: boolean;
1050
+ /**
1051
+ * Create mise.toml with project Node.js version
1052
+ * @default true
1053
+ */
1054
+ readonly mise?: boolean;
1055
+ }