projen 0.101.0 → 0.101.1

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 (143) hide show
  1. package/.jsii +700 -111
  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/integration-test.js +1 -1
  15. package/lib/awscdk/lambda-extension.js +1 -1
  16. package/lib/awscdk/lambda-function.js +2 -2
  17. package/lib/build/build-workflow.js +1 -1
  18. package/lib/cdk/auto-discover-base.js +2 -2
  19. package/lib/cdk/construct-lib.js +1 -1
  20. package/lib/cdk/integration-test-base.js +1 -1
  21. package/lib/cdk/jsii-build.js +1 -1
  22. package/lib/cdk/jsii-docgen.js +1 -1
  23. package/lib/cdk/jsii-project.js +1 -1
  24. package/lib/cdk8s/auto-discover.js +2 -2
  25. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  26. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  27. package/lib/cdk8s/cdk8s-construct.js +1 -1
  28. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  29. package/lib/cdk8s/cdk8s-deps.js +1 -1
  30. package/lib/cdk8s/integration-test.js +1 -1
  31. package/lib/cdktf/cdktf-construct.js +1 -1
  32. package/lib/circleci/circleci.js +1 -1
  33. package/lib/component.js +1 -1
  34. package/lib/dependencies.js +1 -1
  35. package/lib/dev-env.js +1 -1
  36. package/lib/docker-compose/docker-compose-service.js +1 -1
  37. package/lib/docker-compose/docker-compose.js +1 -1
  38. package/lib/file.js +1 -1
  39. package/lib/gitattributes.js +1 -1
  40. package/lib/github/actions-provider.js +1 -1
  41. package/lib/github/auto-approve.js +1 -1
  42. package/lib/github/auto-merge.js +1 -1
  43. package/lib/github/auto-queue.js +1 -1
  44. package/lib/github/dependabot.js +1 -1
  45. package/lib/github/dependency-review.js +1 -1
  46. package/lib/github/github-credentials.js +1 -1
  47. package/lib/github/github-project.js +1 -1
  48. package/lib/github/github.js +1 -1
  49. package/lib/github/merge-queue.js +1 -1
  50. package/lib/github/mergify.js +1 -1
  51. package/lib/github/pr-template.js +1 -1
  52. package/lib/github/pull-request-backport.js +1 -1
  53. package/lib/github/pull-request-lint.js +1 -1
  54. package/lib/github/stale.js +1 -1
  55. package/lib/github/task-workflow-job.js +1 -1
  56. package/lib/github/task-workflow.js +1 -1
  57. package/lib/github/workflow-actions.js +1 -1
  58. package/lib/github/workflow-jobs.js +1 -1
  59. package/lib/github/workflow-steps.js +1 -1
  60. package/lib/github/workflows.js +1 -1
  61. package/lib/gitlab/configuration.js +1 -1
  62. package/lib/gitlab/gitlab-configuration.js +1 -1
  63. package/lib/gitlab/nested-configuration.js +1 -1
  64. package/lib/gitpod.js +1 -1
  65. package/lib/ignore-file.js +1 -1
  66. package/lib/ini.js +1 -1
  67. package/lib/java/java-project.js +1 -1
  68. package/lib/java/junit.js +1 -1
  69. package/lib/java/maven-compile.js +1 -1
  70. package/lib/java/maven-packaging.js +1 -1
  71. package/lib/java/maven-sample.js +1 -1
  72. package/lib/java/pom.js +2 -2
  73. package/lib/java/projenrc.js +1 -1
  74. package/lib/javascript/biome/biome.js +1 -1
  75. package/lib/javascript/bundler.js +1 -1
  76. package/lib/javascript/eslint.js +1 -1
  77. package/lib/javascript/jest.d.ts +179 -7
  78. package/lib/javascript/jest.js +5 -5
  79. package/lib/javascript/license-checker.js +1 -1
  80. package/lib/javascript/node-package.js +1 -1
  81. package/lib/javascript/node-project.js +1 -1
  82. package/lib/javascript/npm-config.js +1 -1
  83. package/lib/javascript/prettier.js +1 -1
  84. package/lib/javascript/projenrc.js +1 -1
  85. package/lib/javascript/typescript-config.js +2 -2
  86. package/lib/javascript/upgrade-dependencies.js +2 -2
  87. package/lib/javascript/yarnrc.js +1 -1
  88. package/lib/json-patch.js +1 -1
  89. package/lib/json.js +1 -1
  90. package/lib/license.js +1 -1
  91. package/lib/logger.js +1 -1
  92. package/lib/makefile.js +1 -1
  93. package/lib/object-file.js +1 -1
  94. package/lib/project-build.js +1 -1
  95. package/lib/project-tree.js +1 -1
  96. package/lib/project.js +1 -1
  97. package/lib/projects.js +1 -1
  98. package/lib/projenrc-json.js +1 -1
  99. package/lib/projenrc.js +1 -1
  100. package/lib/python/pip.js +1 -1
  101. package/lib/python/poetry.js +2 -2
  102. package/lib/python/projenrc.js +1 -1
  103. package/lib/python/pyproject-toml-file.js +1 -1
  104. package/lib/python/pytest-sample.js +1 -1
  105. package/lib/python/pytest.js +1 -1
  106. package/lib/python/python-project.js +1 -1
  107. package/lib/python/python-sample.js +1 -1
  108. package/lib/python/requirements-file.js +1 -1
  109. package/lib/python/setuppy.js +1 -1
  110. package/lib/python/setuptools.js +1 -1
  111. package/lib/python/uv.js +1 -1
  112. package/lib/python/venv.js +1 -1
  113. package/lib/readme.js +1 -1
  114. package/lib/release/publisher.js +1 -1
  115. package/lib/release/release-trigger.js +1 -1
  116. package/lib/release/release.js +1 -1
  117. package/lib/renovatebot.js +1 -1
  118. package/lib/run-task.cjs +1 -1
  119. package/lib/sample-file.js +2 -2
  120. package/lib/source-code.js +1 -1
  121. package/lib/task-shell.js +1 -1
  122. package/lib/task.js +1 -1
  123. package/lib/tasks.js +1 -1
  124. package/lib/testing.js +1 -1
  125. package/lib/textfile.js +1 -1
  126. package/lib/toml.js +1 -1
  127. package/lib/typescript/projenrc-ts.js +1 -1
  128. package/lib/typescript/projenrc.js +1 -1
  129. package/lib/typescript/typescript-typedoc.js +1 -1
  130. package/lib/typescript/typescript.js +5 -5
  131. package/lib/version.js +2 -2
  132. package/lib/vscode/devcontainer.js +1 -1
  133. package/lib/vscode/extensions.js +1 -1
  134. package/lib/vscode/launch-config.js +1 -1
  135. package/lib/vscode/settings.js +1 -1
  136. package/lib/vscode/vscode.js +1 -1
  137. package/lib/web/next.js +3 -3
  138. package/lib/web/postcss.js +1 -1
  139. package/lib/web/react.js +3 -3
  140. package/lib/web/tailwind.js +1 -1
  141. package/lib/xmlfile.js +1 -1
  142. package/lib/yaml.js +1 -1
  143. package/package.json +1 -1
@@ -13,7 +13,7 @@ const runner_options_1 = require("../runner-options");
13
13
  class PullRequestLint extends component_1.Component {
14
14
  github;
15
15
  options;
16
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.PullRequestLint", version: "0.101.0" };
16
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.PullRequestLint", version: "0.101.1" };
17
17
  constructor(github, options = {}) {
18
18
  super(github.project);
19
19
  this.github = github;
@@ -18,7 +18,7 @@ const runner_options_1 = require("../runner-options");
18
18
  * @see https://github.com/actions/stale
19
19
  */
20
20
  class Stale extends component_1.Component {
21
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.Stale", version: "0.101.0" };
21
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.Stale", version: "0.101.1" };
22
22
  constructor(github, options = {}) {
23
23
  super(github.project);
24
24
  const stale = github.addWorkflow("stale");
@@ -13,7 +13,7 @@ const util_1 = require("./private/util");
13
13
  * @implements {Job}
14
14
  */
15
15
  class TaskWorkflowJob extends component_1.Component {
16
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.TaskWorkflowJob", version: "0.101.0" };
16
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.TaskWorkflowJob", version: "0.101.1" };
17
17
  runsOn;
18
18
  runsOnGroup;
19
19
  steps;
@@ -9,7 +9,7 @@ const DEFAULT_JOB_ID = "build";
9
9
  * A GitHub workflow for common build tasks within a project.
10
10
  */
11
11
  class TaskWorkflow extends workflows_1.GithubWorkflow {
12
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.TaskWorkflow", version: "0.101.0" };
12
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.TaskWorkflow", version: "0.101.1" };
13
13
  jobId;
14
14
  artifactsDirectory;
15
15
  constructor(github, options) {
@@ -15,7 +15,7 @@ const RUNNER_TEMP = "${{ runner.temp }}";
15
15
  * A set of utility functions for creating GitHub actions in workflows.
16
16
  */
17
17
  class WorkflowActions {
18
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.WorkflowActions", version: "0.101.0" };
18
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.WorkflowActions", version: "0.101.1" };
19
19
  /**
20
20
  * Creates a .patch file from the current git diff and uploads it as an
21
21
  * artifact. Use `checkoutWithPatch` to download and apply in another job.
@@ -10,7 +10,7 @@ const runner_options_1 = require("../runner-options");
10
10
  * A set of utility functions for creating jobs in GitHub Workflows.
11
11
  */
12
12
  class WorkflowJobs {
13
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.WorkflowJobs", version: "0.101.0" };
13
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.WorkflowJobs", version: "0.101.1" };
14
14
  /**
15
15
  * Creates a pull request with the changes of a patch file.
16
16
  *
@@ -25,7 +25,7 @@ var CheckoutSubmodules;
25
25
  * A collection of very commonly used, individual, GitHub Workflow Job steps.
26
26
  */
27
27
  class WorkflowSteps {
28
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.WorkflowSteps", version: "0.101.0" };
28
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.WorkflowSteps", version: "0.101.1" };
29
29
  /**
30
30
  * Checks out a repository.
31
31
  *
@@ -16,7 +16,7 @@ const yaml_1 = require("../yaml");
16
16
  * @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
17
17
  */
18
18
  class GithubWorkflow extends component_1.Component {
19
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.GithubWorkflow", version: "0.101.0" };
19
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.github.GithubWorkflow", version: "0.101.1" };
20
20
  /**
21
21
  * The name of the workflow. GitHub displays the names of your workflows under your repository's
22
22
  * "Actions" tab.
@@ -45,7 +45,7 @@ const yaml_1 = require("../yaml");
45
45
  * @see https://docs.gitlab.com/ee/ci/yaml/
46
46
  */
47
47
  class CiConfiguration extends component_1.Component {
48
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.gitlab.CiConfiguration", version: "0.101.0" };
48
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.gitlab.CiConfiguration", version: "0.101.1" };
49
49
  /**
50
50
  * The name of the configuration.
51
51
  */
@@ -8,7 +8,7 @@ const nested_configuration_1 = require("./nested-configuration");
8
8
  * A GitLab CI for the main `.gitlab-ci.yml` file.
9
9
  */
10
10
  class GitlabConfiguration extends configuration_1.CiConfiguration {
11
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.gitlab.GitlabConfiguration", version: "0.101.0" };
11
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.gitlab.GitlabConfiguration", version: "0.101.1" };
12
12
  nestedTemplates = {};
13
13
  constructor(project, options) {
14
14
  super(project, "gitlab-ci", options);
@@ -7,7 +7,7 @@ const configuration_1 = require("./configuration");
7
7
  * A GitLab CI for templates that are created and included in the `.gitlab-ci.yml` file.
8
8
  */
9
9
  class NestedConfiguration extends configuration_1.CiConfiguration {
10
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.gitlab.NestedConfiguration", version: "0.101.0" };
10
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.gitlab.NestedConfiguration", version: "0.101.1" };
11
11
  parent;
12
12
  constructor(project, parent, name, options) {
13
13
  super(project, name, options);
package/lib/gitpod.js CHANGED
@@ -106,7 +106,7 @@ var GitpodPortVisibility;
106
106
  * The Gitpod component which emits .gitpod.yml
107
107
  */
108
108
  class Gitpod extends component_1.Component {
109
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Gitpod", version: "0.101.0" };
109
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Gitpod", version: "0.101.1" };
110
110
  dockerImage;
111
111
  prebuilds;
112
112
  tasks = new Array();
@@ -5,7 +5,7 @@ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
5
5
  const file_1 = require("./file");
6
6
  const util_1 = require("./util");
7
7
  class IgnoreFile extends file_1.FileBase {
8
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.IgnoreFile", version: "0.101.0" };
8
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.IgnoreFile", version: "0.101.1" };
9
9
  _patterns;
10
10
  filterCommentLines;
11
11
  filterEmptyLines;
package/lib/ini.js CHANGED
@@ -41,7 +41,7 @@ const object_file_1 = require("./object-file");
41
41
  * Represents an INI file.
42
42
  */
43
43
  class IniFile extends object_file_1.ObjectFile {
44
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.IniFile", version: "0.101.0" };
44
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.IniFile", version: "0.101.1" };
45
45
  constructor(project, filePath, options) {
46
46
  super(project, filePath, options);
47
47
  }
@@ -16,7 +16,7 @@ const util_1 = require("../util");
16
16
  * @pjid java
17
17
  */
18
18
  class JavaProject extends github_1.GitHubProject {
19
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.JavaProject", version: "0.101.0" };
19
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.JavaProject", version: "0.101.1" };
20
20
  /**
21
21
  * API for managing `pom.xml`.
22
22
  */
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.101.0" };
13
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Junit", version: "0.101.1" };
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.101.0" };
10
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenCompile", version: "0.101.1" };
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.101.0" };
10
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenPackaging", version: "0.101.1" };
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.101.0" };
12
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.MavenSample", version: "0.101.1" };
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.101.0" };
16
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.UpdatePolicy", version: "0.101.1" };
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.101.0" };
40
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Pom", version: "0.101.1" };
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.101.0" };
22
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.java.Projenrc", version: "0.101.1" };
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.101.0" };
103
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Biome", version: "0.101.1" };
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.101.0" };
48
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Bundler", version: "0.101.1" };
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.101.0" };
13
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.javascript.Eslint", version: "0.101.1" };
14
14
  /**
15
15
  * Returns the singleton Eslint component of a project or undefined if there is none.
16
16
  */
@@ -60,7 +60,7 @@ export interface JestConfigOptions {
60
60
  readonly coverageProvider?: "babel" | "v8";
61
61
  /**
62
62
  * A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter can be used
63
- * @default - ["json", "lcov", "text", "clover", "cobertura"]
63
+ * @default - ["json", "lcov", "clover", "cobertura", "text"]
64
64
  */
65
65
  readonly coverageReporters?: string[];
66
66
  /**
@@ -86,12 +86,26 @@ export interface JestConfigOptions {
86
86
  * @default - false
87
87
  */
88
88
  readonly errorOnDeprecated?: boolean;
89
+ /**
90
+ * Jest will run `.mjs` and `.js` files with nearest package.json's `type` field set to `module` as
91
+ * ECMAScript Modules. If you have any other files that should run with native ESM, you need to specify
92
+ * their file extension here.
93
+ * @default - []
94
+ */
95
+ readonly extensionsToTreatAsEsm?: string[];
89
96
  /**
90
97
  * Test files run inside a vm, which slows calls to global context properties (e.g. Math).
91
98
  * With this option you can specify extra properties to be defined inside the vm for faster lookups.
92
99
  * @default - undefined
100
+ * @deprecated Renamed to `sandboxInjectedGlobals` in Jest 28. Use `sandboxInjectedGlobals` instead.
93
101
  */
94
102
  readonly extraGlobals?: string[];
103
+ /**
104
+ * The fake timers may be useful when a piece of code sets a long timeout that we don't want to wait for
105
+ * in a test. This option provides the default configuration of fake timers for all tests.
106
+ * @default - {}
107
+ */
108
+ readonly fakeTimers?: FakeTimers;
95
109
  /**
96
110
  * Test files are normally ignored from collecting code coverage.
97
111
  * With this option, you can overwrite this behavior and include otherwise ignored files in code coverage.
@@ -185,6 +199,12 @@ export interface JestConfigOptions {
185
199
  * @default - failure-change
186
200
  */
187
201
  readonly notifyMode?: "always" | "failure" | "success" | "change" | "success-change" | "failure-change";
202
+ /**
203
+ * Print a warning indicating that there are probable open handles if Jest does not exit cleanly this
204
+ * number of milliseconds after it completes. Use `0` to disable the warning.
205
+ * @default - 1000
206
+ */
207
+ readonly openHandlesTimeout?: number;
188
208
  /**
189
209
  * A preset that is used as a base for Jest's configuration. A preset should point to an npm module
190
210
  * that has a jest-preset.json or jest-preset.js file at the root.
@@ -205,6 +225,11 @@ export interface JestConfigOptions {
205
225
  readonly projects?: Array<string | {
206
226
  [key: string]: any;
207
227
  }>;
228
+ /**
229
+ * The equivalent of the `--randomize` flag to randomize the order of the tests in a file.
230
+ * @default - false
231
+ */
232
+ readonly randomize?: boolean;
208
233
  /**
209
234
  * Use this configuration option to add custom reporters to Jest. A custom reporter is a class
210
235
  * that implements onRunStart, onTestStart, onTestResult, onRunComplete methods that will be
@@ -250,11 +275,23 @@ export interface JestConfigOptions {
250
275
  * @default - ["<rootDir>"]
251
276
  */
252
277
  readonly roots?: string[];
278
+ /**
279
+ * This option allows the use of a custom runtime to execute test files. A custom runtime can be
280
+ * provided by specifying a path to a runtime implementation.
281
+ * @default - "jest-runtime"
282
+ */
283
+ readonly runtime?: string;
253
284
  /**
254
285
  * This option allows you to use a custom runner instead of Jest's default test runner.
255
286
  * @default - "jest-runner"
256
287
  */
257
288
  readonly runner?: string;
289
+ /**
290
+ * Test files run inside a vm, which slows calls to global context properties (e.g. Math).
291
+ * With this option you can specify extra properties to be defined inside the vm for faster lookups.
292
+ * @default - undefined
293
+ */
294
+ readonly sandboxInjectedGlobals?: string[];
258
295
  /**
259
296
  * A list of paths to modules that run some code to configure or set up the testing environment.
260
297
  * Each setupFile will be run once per test file. Since every test runs in its own environment,
@@ -271,11 +308,22 @@ export interface JestConfigOptions {
271
308
  * @default - []
272
309
  */
273
310
  readonly setupFilesAfterEnv?: string[];
311
+ /**
312
+ * The equivalent of the `--showSeed` flag to print the seed in the test report summary.
313
+ * @default - false
314
+ */
315
+ readonly showSeed?: boolean;
274
316
  /**
275
317
  * The number of seconds after which a test is considered as slow and reported as such in the results.
276
318
  * @default - 5
277
319
  */
278
320
  readonly slowTestThreshold?: number;
321
+ /**
322
+ * Allows overriding specific snapshot formatting options documented in the pretty-format readme,
323
+ * with the exceptions of `compareKeys` and `plugins`.
324
+ * @default - {escapeString: false, printBasicPrototype: false}
325
+ */
326
+ readonly snapshotFormat?: SnapshotFormatOptions;
279
327
  /**
280
328
  * The path to a module that can resolve test<->snapshot path. This config option lets you customize
281
329
  * where Jest stores snapshot files on disk.
@@ -289,9 +337,9 @@ export interface JestConfigOptions {
289
337
  readonly snapshotSerializers?: string[];
290
338
  /**
291
339
  * The test environment that will be used for testing. The default environment in Jest is a
292
- * browser-like environment through jsdom. If you are building a node service, you can use the node
293
- * option to use a node-like environment instead.
294
- * @default - "jsdom"
340
+ * Node.js environment. If you are building a web app, you can use a browser-like environment
341
+ * through jsdom instead.
342
+ * @default - "node"
295
343
  */
296
344
  readonly testEnvironment?: string;
297
345
  /**
@@ -331,9 +379,9 @@ export interface JestConfigOptions {
331
379
  */
332
380
  readonly testResultsProcessor?: string;
333
381
  /**
334
- * This option allows the use of a custom test runner. The default is jasmine2. A custom test runner
382
+ * This option allows the use of a custom test runner. The default is jest-circus. A custom test runner
335
383
  * can be provided by specifying a path to a test runner implementation.
336
- * @default - "jasmine2"
384
+ * @default - "jest-circus/runner"
337
385
  */
338
386
  readonly testRunner?: string;
339
387
  /**
@@ -350,12 +398,14 @@ export interface JestConfigOptions {
350
398
  /**
351
399
  * This option sets the URL for the jsdom environment. It is reflected in properties such as location.href.
352
400
  * @default - "http://localhost"
401
+ * @deprecated Removed in Jest 28. Use `testEnvironmentOptions.url` instead.
353
402
  */
354
403
  readonly testURL?: string;
355
404
  /**
356
405
  * Setting this value to legacy or fake allows the use of fake timers for functions such as setTimeout.
357
406
  * Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.
358
407
  * @default - "real"
408
+ * @deprecated Renamed to `fakeTimers` in Jest 27. Use `fakeTimers` instead.
359
409
  */
360
410
  readonly timers?: string;
361
411
  /**
@@ -386,11 +436,18 @@ export interface JestConfigOptions {
386
436
  * @default - false
387
437
  */
388
438
  readonly verbose?: boolean;
439
+ /**
440
+ * Gives one event loop turn to handle `rejectionHandled`, `uncaughtException` or `unhandledRejection`.
441
+ * Without this flag Jest may report false-positive errors or fail to report actually unhandled rejections.
442
+ * This option may add a noticeable overhead for fast test suites.
443
+ * @default - false
444
+ */
445
+ readonly waitForUnhandledRejections?: boolean;
389
446
  /**
390
447
  * An array of RegExp patterns that are matched against all source file paths before re-running tests
391
448
  * in watch mode. If the file path matches any of the patterns, when it is updated, it will not trigger
392
449
  * a re-run of tests.
393
- * @default - []
450
+ * @default - ["/node_modules/"]
394
451
  */
395
452
  readonly watchPathIgnorePatterns?: string[];
396
453
  /**
@@ -403,6 +460,25 @@ export interface JestConfigOptions {
403
460
  * @default - true
404
461
  */
405
462
  readonly watchman?: boolean;
463
+ /**
464
+ * Timeout in milliseconds for a worker process to exit gracefully after all tests have completed.
465
+ * If a worker does not exit within this timeout, it is force-killed.
466
+ * @default - 500
467
+ */
468
+ readonly workerGracefulExitTimeout?: number;
469
+ /**
470
+ * Specifies the memory limit for workers before they are recycled and is primarily a work-around for
471
+ * memory leaks. The limit can be specified as a percentage of system memory (e.g. `0.5` or `"50%"`)
472
+ * or as a fixed byte value (e.g. `"512MB"`).
473
+ * @default - undefined
474
+ */
475
+ readonly workerIdleMemoryLimit?: number | string;
476
+ /**
477
+ * Whether to use worker threads for parallelization. Child processes are used by default.
478
+ * Using worker threads may help to improve performance.
479
+ * @default - false
480
+ */
481
+ readonly workerThreads?: boolean;
406
482
  /**
407
483
  * Escape hatch to allow any value
408
484
  */
@@ -521,6 +597,102 @@ export interface HasteConfig {
521
597
  readonly platforms?: Array<string>;
522
598
  readonly throwOnModuleCollision?: boolean;
523
599
  }
600
+ /**
601
+ * The default configuration of fake timers for all tests.
602
+ *
603
+ * @see https://jestjs.io/docs/configuration#faketimers-object
604
+ */
605
+ export interface FakeTimers {
606
+ /**
607
+ * If set to `true` all timers will be advanced automatically by 20 milliseconds every 20 milliseconds.
608
+ * A custom time delta may be provided by passing a number.
609
+ * @default - false
610
+ */
611
+ readonly advanceTimers?: boolean | number;
612
+ /**
613
+ * List of names of APIs (e.g. `Date`, `nextTick`, `setTimeout`) that should not be faked.
614
+ * @default - [] (all APIs are faked)
615
+ */
616
+ readonly doNotFake?: string[];
617
+ /**
618
+ * Whether fake timers should be enabled for all test files.
619
+ * @default - false
620
+ */
621
+ readonly enableGlobally?: boolean;
622
+ /**
623
+ * Use the old fake timers implementation instead of one backed by `@sinonjs/fake-timers`.
624
+ * @default - false
625
+ */
626
+ readonly legacyFakeTimers?: boolean;
627
+ /**
628
+ * Sets current system time to be used by fake timers, in milliseconds.
629
+ * @default - Date.now()
630
+ */
631
+ readonly now?: number;
632
+ /**
633
+ * Maximum number of recursive timers that will be run.
634
+ * @default - 100000
635
+ */
636
+ readonly timerLimit?: number;
637
+ }
638
+ /**
639
+ * Snapshot formatting options. Mirrors the pretty-format options, with the exceptions of
640
+ * `compareKeys` and `plugins`.
641
+ *
642
+ * @see https://jestjs.io/docs/configuration#snapshotformat-object
643
+ */
644
+ export interface SnapshotFormatOptions {
645
+ /**
646
+ * Calls `toJSON` on objects that have such a method.
647
+ * @default - true
648
+ */
649
+ readonly callToJSON?: boolean;
650
+ /**
651
+ * Escapes special characters in regular expressions.
652
+ * @default - false
653
+ */
654
+ readonly escapeRegex?: boolean;
655
+ /**
656
+ * Escapes quotes in strings.
657
+ * @default - false
658
+ */
659
+ readonly escapeString?: boolean;
660
+ /**
661
+ * Highlights syntax with colors in terminal (some plugins).
662
+ * @default - false
663
+ */
664
+ readonly highlight?: boolean;
665
+ /**
666
+ * Spaces of indentation between levels of nesting.
667
+ * @default - 2
668
+ */
669
+ readonly indent?: number;
670
+ /**
671
+ * Maximum number of levels to print.
672
+ * @default - Infinity
673
+ */
674
+ readonly maxDepth?: number;
675
+ /**
676
+ * Maximum number of elements to print at a given level.
677
+ * @default - Infinity
678
+ */
679
+ readonly maxWidth?: number;
680
+ /**
681
+ * Prints objects on a single line when `true`.
682
+ * @default - false
683
+ */
684
+ readonly min?: boolean;
685
+ /**
686
+ * Prints the prototype for basic objects and arrays.
687
+ * @default - false
688
+ */
689
+ readonly printBasicPrototype?: boolean;
690
+ /**
691
+ * Prints the name of functions.
692
+ * @default - true
693
+ */
694
+ readonly printFunctionName?: boolean;
695
+ }
524
696
  export declare class JestReporter {
525
697
  private readonly name;
526
698
  private readonly options?;