Skip to content

Commit 21e9216

Browse files
authored
Merge branch 'master' into dep-updates
2 parents 6bc1d90 + f6de2dc commit 21e9216

File tree

16 files changed

+280
-153
lines changed

16 files changed

+280
-153
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ uncaughtExceptions.log
1111
src/*.json
1212
.idea
1313
test.ts
14-
notes.md
14+
notes.md
15+
.nvmrc

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ Create a `.env` file and add OpenCommit config variables there like this:
109109
OCO_AI_PROVIDER=<openai (default), anthropic, azure, ollama, gemini, flowise, deepseek>
110110
OCO_API_KEY=<your OpenAI API token> // or other LLM provider API token
111111
OCO_API_URL=<may be used to set proxy path to OpenAI api>
112+
OCO_API_CUSTOM_HEADERS=<JSON string of custom HTTP headers to include in API requests>
112113
OCO_TOKENS_MAX_INPUT=<max model token limit (default: 4096)>
113114
OCO_TOKENS_MAX_OUTPUT=<max response tokens (default: 500)>
114115
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>

jest.config.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,38 @@ const config: Config = {
99
testTimeout: 100_000,
1010
coverageProvider: 'v8',
1111
moduleDirectories: ['node_modules', 'src'],
12-
preset: 'ts-jest/presets/js-with-ts-esm',
12+
preset: 'ts-jest/presets/default-esm',
1313
setupFilesAfterEnv: ['<rootDir>/test/jest-setup.ts'],
1414
testEnvironment: 'node',
1515
testRegex: ['.*\\.test\\.ts$'],
16-
transformIgnorePatterns: ['node_modules/(?!cli-testing-library)'],
17-
1816
// Tell Jest to ignore the specific duplicate package.json files
1917
// that are causing Haste module naming collisions
2018
modulePathIgnorePatterns: [
2119
'<rootDir>/test/e2e/prompt-module/data/commitlint_18/',
2220
'<rootDir>/test/e2e/prompt-module/data/commitlint_19/'
2321
],
22+
transformIgnorePatterns: [
23+
'node_modules/(?!(cli-testing-library|@clack|cleye)/.*)'
24+
],
2425
transform: {
25-
'^.+\\.(ts|tsx)$': [
26+
'^.+\\.(ts|tsx|js|jsx|mjs)$': [
2627
'ts-jest',
2728
{
2829
diagnostics: false,
29-
useESM: true
30+
useESM: true,
31+
tsconfig: {
32+
module: 'ESNext',
33+
target: 'ES2022'
34+
}
3035
}
3136
]
37+
},
38+
// Fix Haste module naming collision
39+
modulePathIgnorePatterns: [
40+
'<rootDir>/test/e2e/prompt-module/data/'
41+
],
42+
moduleNameMapper: {
43+
'^(\\.{1,2}/.*)\\.js$': '$1'
3244
}
3345
};
3446

0 commit comments

Comments
 (0)