projen 0.104.24 → 0.104.26

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.
Files changed (174) hide show
  1. package/.jsii +297 -200
  2. package/lib/ai-instructions.js +2 -2
  3. package/lib/awscdk/auto-discover.js +6 -6
  4. package/lib/awscdk/awscdk-app-java.js +1 -1
  5. package/lib/awscdk/awscdk-app-py.js +1 -1
  6. package/lib/awscdk/awscdk-app-ts.js +1 -1
  7. package/lib/awscdk/awscdk-construct.js +1 -1
  8. package/lib/awscdk/awscdk-deps-java.js +1 -1
  9. package/lib/awscdk/awscdk-deps-js.js +1 -1
  10. package/lib/awscdk/awscdk-deps-py.js +1 -1
  11. package/lib/awscdk/awscdk-deps.js +1 -1
  12. package/lib/awscdk/cdk-config.js +3 -3
  13. package/lib/awscdk/cdk-tasks.js +1 -1
  14. package/lib/awscdk/integ-runner.js +6 -1
  15. package/lib/awscdk/integration-test.js +1 -1
  16. package/lib/awscdk/lambda-extension.js +7 -3
  17. package/lib/awscdk/lambda-function.js +17 -8
  18. package/lib/build/build-workflow.js +1 -1
  19. package/lib/cdk/auto-discover-base.js +2 -2
  20. package/lib/cdk/construct-lib.js +1 -1
  21. package/lib/cdk/integration-test-base.js +1 -1
  22. package/lib/cdk/jsii-build.d.ts +2 -0
  23. package/lib/cdk/jsii-build.js +6 -2
  24. package/lib/cdk/jsii-docgen.js +1 -1
  25. package/lib/cdk/jsii-project.d.ts +2 -0
  26. package/lib/cdk/jsii-project.js +2 -2
  27. package/lib/cdk8s/auto-discover.js +2 -2
  28. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  29. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  30. package/lib/cdk8s/cdk8s-construct.js +1 -1
  31. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  32. package/lib/cdk8s/cdk8s-deps.js +1 -1
  33. package/lib/cdk8s/integration-test.js +1 -1
  34. package/lib/cdktf/cdktf-construct.js +1 -1
  35. package/lib/cdktn/cdktn-app-ts.js +1 -1
  36. package/lib/cdktn/cdktn-config.js +1 -1
  37. package/lib/cdktn/cdktn-construct.js +1 -1
  38. package/lib/cdktn/cdktn-deps.js +1 -1
  39. package/lib/cdktn/cdktn-tasks.js +1 -1
  40. package/lib/circleci/circleci.js +1 -1
  41. package/lib/clobber.js +8 -4
  42. package/lib/component.js +2 -2
  43. package/lib/dependencies.js +1 -1
  44. package/lib/dev-env.js +1 -1
  45. package/lib/docker-compose/docker-compose-service.js +1 -1
  46. package/lib/docker-compose/docker-compose.js +1 -1
  47. package/lib/file.js +1 -1
  48. package/lib/gitattributes.js +1 -1
  49. package/lib/github/actions-provider.js +1 -1
  50. package/lib/github/actions.const.js +1 -1
  51. package/lib/github/auto-approve.js +1 -1
  52. package/lib/github/auto-merge.js +1 -1
  53. package/lib/github/auto-queue.js +1 -1
  54. package/lib/github/dependabot.js +1 -1
  55. package/lib/github/dependency-review.js +1 -1
  56. package/lib/github/github-credentials.js +1 -1
  57. package/lib/github/github-project.js +1 -1
  58. package/lib/github/github.js +1 -1
  59. package/lib/github/merge-queue.js +1 -1
  60. package/lib/github/mergify.js +1 -1
  61. package/lib/github/pr-template.js +1 -1
  62. package/lib/github/pull-request-backport.js +1 -1
  63. package/lib/github/pull-request-lint.js +1 -1
  64. package/lib/github/pull-request-source.js +1 -1
  65. package/lib/github/stale.js +1 -1
  66. package/lib/github/task-workflow-job.js +1 -1
  67. package/lib/github/task-workflow.js +1 -1
  68. package/lib/github/workflow-actions.js +1 -1
  69. package/lib/github/workflow-jobs.js +1 -1
  70. package/lib/github/workflow-steps.js +1 -1
  71. package/lib/github/workflows.js +11 -6
  72. package/lib/gitlab/configuration.js +1 -1
  73. package/lib/gitlab/gitlab-configuration.js +1 -1
  74. package/lib/gitlab/nested-configuration.js +1 -1
  75. package/lib/gitpod.js +1 -1
  76. package/lib/ignore-file.js +1 -1
  77. package/lib/ini.js +1 -1
  78. package/lib/java/java-project.js +1 -1
  79. package/lib/java/junit.js +1 -1
  80. package/lib/java/maven-compile.js +1 -1
  81. package/lib/java/maven-packaging.js +1 -1
  82. package/lib/java/maven-sample.js +1 -1
  83. package/lib/java/pom.js +2 -2
  84. package/lib/java/projenrc.js +1 -1
  85. package/lib/javascript/biome/biome.js +1 -1
  86. package/lib/javascript/bundler.js +1 -1
  87. package/lib/javascript/eslint.js +1 -1
  88. package/lib/javascript/jest.js +4 -4
  89. package/lib/javascript/license-checker.js +1 -1
  90. package/lib/javascript/node-config-file.js +1 -1
  91. package/lib/javascript/node-native-test-runner.js +2 -2
  92. package/lib/javascript/node-package.d.ts +38 -0
  93. package/lib/javascript/node-package.js +34 -2
  94. package/lib/javascript/node-project.js +1 -1
  95. package/lib/javascript/npm-config.js +1 -1
  96. package/lib/javascript/pnpm-workspace-config.js +2 -2
  97. package/lib/javascript/pnpm-workspace.js +1 -1
  98. package/lib/javascript/prettier.js +1 -1
  99. package/lib/javascript/projenrc.js +1 -1
  100. package/lib/javascript/typescript-config.js +2 -2
  101. package/lib/javascript/upgrade-dependencies.js +2 -2
  102. package/lib/javascript/yarnrc.js +1 -1
  103. package/lib/json-patch.js +1 -1
  104. package/lib/json.js +1 -1
  105. package/lib/license.js +1 -1
  106. package/lib/logger.js +1 -1
  107. package/lib/makefile.js +1 -1
  108. package/lib/object-file.js +1 -1
  109. package/lib/polaris/coverity-go.js +1 -1
  110. package/lib/polaris/coverity-java.js +1 -1
  111. package/lib/polaris/coverity-javascript.js +1 -1
  112. package/lib/polaris/coverity.js +1 -1
  113. package/lib/project-build.js +1 -1
  114. package/lib/project-tree.js +1 -1
  115. package/lib/project.js +1 -1
  116. package/lib/projects.js +1 -1
  117. package/lib/projenrc-json.js +1 -1
  118. package/lib/projenrc.js +1 -1
  119. package/lib/properties-file.js +1 -1
  120. package/lib/python/pip.js +1 -1
  121. package/lib/python/poetry.js +2 -2
  122. package/lib/python/projenrc.js +1 -1
  123. package/lib/python/pyproject-toml-file.js +1 -1
  124. package/lib/python/pytest-sample.js +1 -1
  125. package/lib/python/pytest.js +1 -1
  126. package/lib/python/python-project.js +1 -1
  127. package/lib/python/python-sample.js +1 -1
  128. package/lib/python/requirements-file.js +1 -1
  129. package/lib/python/setuppy.js +1 -1
  130. package/lib/python/setuptools.js +1 -1
  131. package/lib/python/uv-config.js +1 -1
  132. package/lib/python/uv.js +1 -1
  133. package/lib/python/venv.js +1 -1
  134. package/lib/readme.js +1 -1
  135. package/lib/release/publisher.js +1 -1
  136. package/lib/release/release-trigger.js +1 -1
  137. package/lib/release/release.js +1 -1
  138. package/lib/renovatebot.js +1 -1
  139. package/lib/run-task.cjs +2 -2
  140. package/lib/sample-file.js +2 -2
  141. package/lib/script-runner.js +1 -1
  142. package/lib/sonarqube/javascript.js +1 -1
  143. package/lib/sonarqube/rust.js +1 -1
  144. package/lib/sonarqube/sonarqube.js +1 -1
  145. package/lib/sonarqube/typescript.js +1 -1
  146. package/lib/source-code.js +1 -1
  147. package/lib/task-shell.js +1 -1
  148. package/lib/task.js +1 -1
  149. package/lib/tasks.js +1 -1
  150. package/lib/testing.js +1 -1
  151. package/lib/textfile.js +1 -1
  152. package/lib/toml.js +1 -1
  153. package/lib/typescript/projenrc-ts.js +1 -1
  154. package/lib/typescript/projenrc.js +1 -1
  155. package/lib/typescript/typescript-runner.js +1 -1
  156. package/lib/typescript/typescript-typedoc.js +1 -1
  157. package/lib/typescript/typescript.js +5 -5
  158. package/lib/version.js +2 -2
  159. package/lib/vscode/devcontainer.js +1 -1
  160. package/lib/vscode/extensions.js +1 -1
  161. package/lib/vscode/launch-config.js +1 -1
  162. package/lib/vscode/settings.js +1 -1
  163. package/lib/vscode/vscode.js +1 -1
  164. package/lib/web/next.js +3 -3
  165. package/lib/web/postcss.js +1 -1
  166. package/lib/web/react.js +6 -14
  167. package/lib/web/tailwind.js +1 -1
  168. package/lib/xmlfile.js +1 -1
  169. package/lib/yaml.js +1 -1
  170. package/node_modules/semver/classes/range.js +2 -2
  171. package/node_modules/semver/internal/constants.js +30 -0
  172. package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  173. package/node_modules/semver/package.json +1 -1
  174. package/package.json +2 -2
package/lib/java/junit.js CHANGED
@@ -10,7 +10,7 @@ const TESTDIR = (0, path_1.join)("src", "test", "java");
10
10
  * Implements JUnit-based testing.
11
11
  */
12
12
  class Junit extends component_1.Component {
13
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Junit", version: "0.104.24" };
13
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Junit", version: "0.104.26" };
14
14
  constructor(project, options) {
15
15
  super(project);
16
16
  const pom = options.pom;
@@ -7,7 +7,7 @@ const component_1 = require("../component");
7
7
  * Adds the maven-compiler plugin to a POM file and the `compile` task.
8
8
  */
9
9
  class MavenCompile extends component_1.Component {
10
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenCompile", version: "0.104.24" };
10
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenCompile", version: "0.104.26" };
11
11
  constructor(project, pom, options = {}) {
12
12
  super(project);
13
13
  project.gitignore.exclude("target");
@@ -7,7 +7,7 @@ const component_1 = require("../component");
7
7
  * Configures a maven project to produce a .jar archive with sources and javadocs.
8
8
  */
9
9
  class MavenPackaging extends component_1.Component {
10
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenPackaging", version: "0.104.24" };
10
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenPackaging", version: "0.104.26" };
11
11
  /**
12
12
  * The directory containing the package output, relative to the project outdir
13
13
  */
@@ -9,7 +9,7 @@ const sample_file_1 = require("../sample-file");
9
9
  * Java code sample.
10
10
  */
11
11
  class MavenSample extends component_1.Component {
12
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenSample", version: "0.104.24" };
12
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenSample", version: "0.104.26" };
13
13
  constructor(project, options) {
14
14
  super(project);
15
15
  const pkg = options.package.split(".");
package/lib/java/pom.js CHANGED
@@ -13,7 +13,7 @@ const POM_XML_ATTRS = {
13
13
  "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
14
14
  };
15
15
  class UpdatePolicy {
16
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.UpdatePolicy", version: "0.104.24" };
16
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.UpdatePolicy", version: "0.104.26" };
17
17
  static ALWAYS = "always";
18
18
  static DAILY = "daily";
19
19
  static NEVER = "never";
@@ -37,7 +37,7 @@ var ChecksumPolicy;
37
37
  * details used by Maven to build the project.
38
38
  */
39
39
  class Pom extends component_1.Component {
40
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Pom", version: "0.104.24" };
40
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Pom", version: "0.104.26" };
41
41
  /**
42
42
  * The name of the pom file.
43
43
  */
@@ -19,7 +19,7 @@ const util_1 = require("../util");
19
19
  * `src/main/java/projenrc.java`.
20
20
  */
21
21
  class Projenrc extends projenrc_1.ProjenrcFile {
22
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Projenrc", version: "0.104.24" };
22
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Projenrc", version: "0.104.26" };
23
23
  /**
24
24
  * The name of the java class that includes the projen entrypoint.
25
25
  */
@@ -100,7 +100,7 @@ const DEFAULT_ASSIST = {
100
100
  */
101
101
  class Biome extends component_1.Component {
102
102
  options;
103
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Biome", version: "0.104.24" };
103
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Biome", version: "0.104.26" };
104
104
  static of(project) {
105
105
  const isBiome = (c) => c instanceof Biome;
106
106
  return project.components.find(isBiome);
@@ -45,7 +45,7 @@ const dependencies_1 = require("../dependencies");
45
45
  * single file. In the future, this will also supports bundling websites.
46
46
  */
47
47
  class Bundler extends component_1.Component {
48
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Bundler", version: "0.104.24" };
48
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Bundler", version: "0.104.26" };
49
49
  /**
50
50
  * Returns the `Bundler` instance associated with a project or `undefined` if
51
51
  * there is no Bundler.
@@ -10,7 +10,7 @@ const yaml_1 = require("../yaml");
10
10
  * Represents eslint configuration.
11
11
  */
12
12
  class Eslint extends component_1.Component {
13
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Eslint", version: "0.104.24" };
13
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Eslint", version: "0.104.26" };
14
14
  /**
15
15
  * Returns the singleton Eslint component of a project or undefined if there is none.
16
16
  */
@@ -45,7 +45,7 @@ const DEFAULT_TEST_REPORTS_DIR = "test-reports";
45
45
  class Transform {
46
46
  name;
47
47
  options;
48
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Transform", version: "0.104.24" };
48
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Transform", version: "0.104.26" };
49
49
  constructor(name, options) {
50
50
  this.name = name;
51
51
  this.options = options;
@@ -65,7 +65,7 @@ exports.Transform = Transform;
65
65
  class WatchPlugin {
66
66
  name;
67
67
  options;
68
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.WatchPlugin", version: "0.104.24" };
68
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.WatchPlugin", version: "0.104.26" };
69
69
  constructor(name, options) {
70
70
  this.name = name;
71
71
  this.options = options;
@@ -96,7 +96,7 @@ var UpdateSnapshot;
96
96
  class JestReporter {
97
97
  name;
98
98
  options;
99
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.JestReporter", version: "0.104.24" };
99
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.JestReporter", version: "0.104.26" };
100
100
  constructor(name, options) {
101
101
  this.name = name;
102
102
  this.options = options;
@@ -122,7 +122,7 @@ exports.JestReporter = JestReporter;
122
122
  *
123
123
  */
124
124
  class Jest extends component_1.Component {
125
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Jest", version: "0.104.24" };
125
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Jest", version: "0.104.26" };
126
126
  /**
127
127
  * Returns the singleton Jest component of a project or undefined if there is none.
128
128
  */
@@ -8,7 +8,7 @@ const dependencies_1 = require("../dependencies");
8
8
  * Enforces allowed licenses used by dependencies.
9
9
  */
10
10
  class LicenseChecker extends component_1.Component {
11
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.LicenseChecker", version: "0.104.24" };
11
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.LicenseChecker", version: "0.104.26" };
12
12
  task;
13
13
  constructor(scope, options) {
14
14
  const taskName = options.taskName ?? "check-licenses";
@@ -12,7 +12,7 @@ const node_config_1 = require("./node-config");
12
12
  * @see https://nodejs.org/api/cli.html#configuration-via-nodeconfig
13
13
  */
14
14
  class NodeConfigFile extends component_1.Component {
15
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.NodeConfigFile", version: "0.104.24" };
15
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.NodeConfigFile", version: "0.104.26" };
16
16
  /**
17
17
  * Returns the `NodeConfigFile` instance associated with a project or
18
18
  * `undefined` if there is none.
@@ -85,7 +85,7 @@ class TestMatch {
85
85
  */
86
86
  class Destination {
87
87
  value;
88
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Destination", version: "0.104.24" };
88
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Destination", version: "0.104.26" };
89
89
  /**
90
90
  * Write to standard output.
91
91
  */
@@ -177,7 +177,7 @@ class NodeReporters {
177
177
  * and "test:watch" tasks, and the reporters and test match patterns they use.
178
178
  */
179
179
  class NodeNativeTestRunner extends component_1.Component {
180
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.NodeNativeTestRunner", version: "0.104.24" };
180
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.NodeNativeTestRunner", version: "0.104.26" };
181
181
  /**
182
182
  * Returns the singleton NodeNativeTestRunner component of a project or undefined
183
183
  * if there is none.
@@ -85,6 +85,18 @@ export interface NodePackageOptions {
85
85
  * Options for `peerDeps`.
86
86
  */
87
87
  readonly peerDependencyOptions?: PeerDependencyOptions;
88
+ /**
89
+ * Additional information about how peer dependencies are used, rendered as
90
+ * `peerDependenciesMeta` in `package.json`. For example, this can mark peer
91
+ * dependencies as optional.
92
+ *
93
+ * Each key must also be declared as a peer dependency.
94
+ *
95
+ * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependenciesmeta
96
+ * @example { "aws-cdk-lib": { optional: true } }
97
+ * @default - no `peerDependenciesMeta`
98
+ */
99
+ readonly peerDependenciesMeta?: Record<string, PeerDependencyMeta>;
88
100
  /**
89
101
  * Allow the project to include `peerDependencies` and `bundledDependencies`.
90
102
  * This is normally only allowed for libraries. For apps, there's no meaning
@@ -650,6 +662,7 @@ export declare class NodePackage extends Component {
650
662
  private readonly bin;
651
663
  private readonly engines;
652
664
  private readonly peerDependencyOptions;
665
+ private readonly peerDependenciesMeta;
653
666
  private readonly _prev?;
654
667
  private _renderedDeps?;
655
668
  private readonly _packageManagerExplicit;
@@ -695,6 +708,16 @@ export declare class NodePackage extends Component {
695
708
  * `module@^7`.
696
709
  */
697
710
  addPeerDeps(...deps: string[]): void;
711
+ /**
712
+ * Adds `peerDependenciesMeta` information for a peer dependency, e.g. to
713
+ * mark it as optional.
714
+ *
715
+ * The dependency must also be declared as a peer dependency.
716
+ *
717
+ * @param name The name of the peer dependency.
718
+ * @param meta The metadata for the peer dependency.
719
+ */
720
+ addPeerDependencyMeta(name: string, meta: PeerDependencyMeta): void;
698
721
  /**
699
722
  * Defines bundled dependencies.
700
723
  *
@@ -860,6 +883,7 @@ export declare class NodePackage extends Component {
860
883
  * @see https://bun.com/docs/pm/lifecycle
861
884
  */
862
885
  private renderBunTrustedDependencies;
886
+ private renderPeerDependenciesMeta;
863
887
  /**
864
888
  * Renders the native yarn berry per-package script allowlist via
865
889
  * `dependenciesMeta.<pkg>.built = true`. Combined with the global
@@ -924,6 +948,20 @@ export declare class NodePackage extends Component {
924
948
  /** See https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored */
925
949
  private configureYarnBerryGitignore;
926
950
  }
951
+ /**
952
+ * Additional information about how a peer dependency is used.
953
+ *
954
+ * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependenciesmeta
955
+ */
956
+ export interface PeerDependencyMeta {
957
+ /**
958
+ * Marks the peer dependency as optional. Package managers will not
959
+ * install it or warn if it is missing.
960
+ *
961
+ * @default false
962
+ */
963
+ readonly optional?: boolean;
964
+ }
927
965
  export interface PeerDependencyOptions {
928
966
  /**
929
967
  * Automatically add a pinned dev dependency.