diff --git a/API.md b/API.md index 8a2f124b..8ac90736 100644 --- a/API.md +++ b/API.md @@ -1479,6 +1479,7 @@ public readonly tsconfigEslint: TypescriptConfig; | **Name** | **Type** | **Description** | | --- | --- | --- | | DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). | +| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* | --- @@ -1497,6 +1498,16 @@ this task should synthesize the project files. --- +##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required + +```typescript +public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string; +``` + +- *Type:* string + +--- + ### Cdk8sTeamNodeProject #### Initializers @@ -4341,6 +4352,7 @@ public readonly tsconfigEslint: TypescriptConfig; | **Name** | **Type** | **Description** | | --- | --- | --- | | DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). | +| DEFAULT_TS_JEST_TRANFORM_PATTERN | string | *No description.* | --- @@ -4359,6 +4371,16 @@ this task should synthesize the project files. --- +##### `DEFAULT_TS_JEST_TRANFORM_PATTERN`Required + +```typescript +public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string; +``` + +- *Type:* string + +--- + ## Structs ### Cdk8sTeamJsiiProjectOptions @@ -4524,6 +4546,7 @@ const cdk8sTeamJsiiProjectOptions: Cdk8sTeamJsiiProjectOptions = { ... } | tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. | | tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). | | tsconfigDevFile | string | The name of the development tsconfig.json file. | +| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. | | typescriptVersion | string | TypeScript version to use. | | additionalCompilerDependencies | string[] | Packages that compile the project apart from the typescript/jsii compiler. | | backport | boolean | Configure a backport workflow. | @@ -6530,6 +6553,18 @@ The name of the development tsconfig.json file. --- +##### `tsJestOptions`Optional + +```typescript +public readonly tsJestOptions: TsJestOptions; +``` + +- *Type:* projen.typescript.TsJestOptions + +Options for ts-jest. + +--- + ##### `typescriptVersion`Optional ```typescript @@ -8801,6 +8836,7 @@ const cdk8sTeamTypeScriptProjectOptions: Cdk8sTeamTypeScriptProjectOptions = { . | tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. | | tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). | | tsconfigDevFile | string | The name of the development tsconfig.json file. | +| tsJestOptions | projen.typescript.TsJestOptions | Options for ts-jest. | | typescriptVersion | string | TypeScript version to use. | | additionalCompilerDependencies | string[] | Packages that compile the project apart from the typescript/jsii compiler. | | backport | boolean | Configure a backport workflow. | @@ -10801,6 +10837,18 @@ The name of the development tsconfig.json file. --- +##### `tsJestOptions`Optional + +```typescript +public readonly tsJestOptions: TsJestOptions; +``` + +- *Type:* projen.typescript.TsJestOptions + +Options for ts-jest. + +--- + ##### `typescriptVersion`Optional ```typescript diff --git a/package.json b/package.json index ae035756..ade32e3f 100644 --- a/package.json +++ b/package.json @@ -53,14 +53,14 @@ "jsii-docgen": "^7.2.9", "jsii-pacmak": "^1.93.0", "jsii-rosetta": "1.x", - "projen": "^0.78.2", + "projen": "^0.78.4", "standard-version": "^9", "ts-jest": "^27", "ts-node": "^10.9.2", "typescript": "^4.9.5" }, "peerDependencies": { - "projen": "^0.78.2" + "projen": "^0.78.4" }, "dependencies": { "codemaker": "^1.93.0", diff --git a/test/projects/__snapshots__/jsii.test.ts.snap b/test/projects/__snapshots__/jsii.test.ts.snap index 94292dd6..23591347 100644 --- a/test/projects/__snapshots__/jsii.test.ts.snap +++ b/test/projects/__snapshots__/jsii.test.ts.snap @@ -5769,7 +5769,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -5858,7 +5857,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -5947,7 +5945,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -6036,7 +6033,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -7828,7 +7824,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -7917,7 +7912,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -8006,7 +8000,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -8095,7 +8088,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -9847,7 +9839,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -9936,7 +9927,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -10025,7 +10015,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -10114,7 +10103,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -11906,7 +11894,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -11995,7 +11982,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -12084,7 +12070,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -12173,7 +12158,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -13925,7 +13909,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -14014,7 +13997,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -14103,7 +14085,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -14192,7 +14173,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -15984,7 +15964,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -16073,7 +16052,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -16162,7 +16140,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -16251,7 +16228,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: diff --git a/test/projects/__snapshots__/node.test.ts.snap b/test/projects/__snapshots__/node.test.ts.snap index f93dbbe3..ee79170d 100644 --- a/test/projects/__snapshots__/node.test.ts.snap +++ b/test/projects/__snapshots__/node.test.ts.snap @@ -1992,7 +1992,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -2081,7 +2080,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -2170,7 +2168,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -3337,7 +3334,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -3426,7 +3422,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -3515,7 +3510,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -4682,7 +4676,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -4771,7 +4764,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -4860,7 +4852,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: diff --git a/test/projects/__snapshots__/typescript.test.ts.snap b/test/projects/__snapshots__/typescript.test.ts.snap index 0cd9fb19..831a00c9 100644 --- a/test/projects/__snapshots__/typescript.test.ts.snap +++ b/test/projects/__snapshots__/typescript.test.ts.snap @@ -1901,12 +1901,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -1923,6 +1917,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -4021,12 +4023,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -4043,6 +4039,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -4807,7 +4811,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -4896,7 +4899,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -4985,7 +4987,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -5074,7 +5075,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -5910,12 +5910,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -5932,6 +5926,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -6688,7 +6690,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -6777,7 +6778,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -6866,7 +6866,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -6955,7 +6954,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -7791,12 +7789,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -7813,6 +7805,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -8569,7 +8569,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -8658,7 +8657,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -8747,7 +8745,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -8836,7 +8833,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: {} - name: Download patch uses: actions/download-artifact@v3 with: @@ -9672,12 +9668,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -9694,6 +9684,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -11710,12 +11708,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -11732,6 +11724,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -13751,12 +13751,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -13773,6 +13767,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -15792,12 +15794,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -15814,6 +15810,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -17833,12 +17837,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -17855,6 +17853,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], @@ -19874,12 +19880,6 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "cobertura", "text", ], - "globals": Object { - "ts-jest": Object { - "tsconfig": "tsconfig.dev.json", - }, - }, - "preset": "ts-jest", "reporters": Array [ "default", Array [ @@ -19896,6 +19896,14 @@ echo \\"Configured core.hooksPath to \${hooksdir}\\" "testPathIgnorePatterns": Array [ "/node_modules/", ], + "transform": Object { + "^.+\\\\.[t]sx?$": Array [ + "ts-jest", + Object { + "tsconfig": "tsconfig.dev.json", + }, + ], + }, "watchPathIgnorePatterns": Array [ "/node_modules/", ], diff --git a/yarn.lock b/yarn.lock index 5bcacd3b..42f2e954 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4133,10 +4133,10 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -projen@^0.78.2: - version "0.78.2" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.78.2.tgz#53a3bf9a7ae9f0cb02dbb3cf717866d2aa657245" - integrity sha512-A4y0pLAEHdGJMydbBY44GRruPV5tBwXm18XmDHSS94XIexZOuWdRrxptl+vKTmiDrkDXqa1pNCt7u8YBbIVDtA== +projen@^0.78.4: + version "0.78.4" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.78.4.tgz#47ab90c449d63a1393af93104796099eb2f55f89" + integrity sha512-lj8U6OC6Ac5ToObt8HwcPsWd6o81yM2Vdkj/hK9lS0EpwDq1YcIxeSnM0udVpg4YwxF3Bw3+W96HL1KuEE0UMg== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3"