Skip to content

Commit a844b93

Browse files
committed
build: downgrade Prettier to 2.x
Jest 29 doesn't fully support Prettier 3
1 parent c2b56ca commit a844b93

6 files changed

Lines changed: 28 additions & 91 deletions

File tree

e2e/ast-transformers/hoist-jest/__tests__/typescript.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { color } from '../entry'
22

3-
jest.mock('some-module', () => ({}) as Partial<Record<string, unknown>>, { virtual: true })
3+
jest.mock('some-module', () => ({} as Partial<Record<string, unknown>>), { virtual: true })
44

55
jest.mock('../entry', () => {
66
return { color: 'blue' }

package-lock.json

Lines changed: 21 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"eslint-plugin-jest": "^28.6.0",
125125
"eslint-plugin-jsdoc": "^48.5.0",
126126
"eslint-plugin-prefer-arrow": "^1.2.3",
127-
"eslint-plugin-prettier": "^5.1.3",
127+
"eslint-plugin-prettier": "^4.2.1",
128128
"execa": "5.1.1",
129129
"fs-extra": "11.2.0",
130130
"glob": "^10.2.6",
@@ -137,7 +137,7 @@
137137
"lint-staged": "latest",
138138
"lodash.camelcase": "^4.3.0",
139139
"lodash.set": "^4.3.2",
140-
"prettier": "^3.3.2",
140+
"prettier": "^2.8.8",
141141
"typescript": "~5.5.2"
142142
},
143143
"lint-staged": {

src/cli/config/migrate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ Visit https://kulshekhar.github.io/ts-jest/user/config/#jest-preset for more inf
158158
return shouldRemoveDuplicatedConfig
159159
? acc
160160
: acc
161-
? { ...acc, [fileRegex]: transformerConfig }
162-
: { [fileRegex]: transformerConfig }
161+
? { ...acc, [fileRegex]: transformerConfig }
162+
: { [fileRegex]: transformerConfig }
163163
},
164164
undefined,
165165
)

src/legacy/compiler/ts-compiler.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ export class TsCompiler implements TsCompilerInstance {
8181

8282
program: Program | undefined
8383

84-
constructor(
85-
readonly configSet: ConfigSet,
86-
readonly runtimeCacheFS: StringMap,
87-
) {
84+
constructor(readonly configSet: ConfigSet, readonly runtimeCacheFS: StringMap) {
8885
this._ts = configSet.compilerModule
8986
this._logger = rootLogger.child({ namespace: 'ts-compiler' })
9087
this._parsedTsConfig = this.configSet.parsedTsConfig as ParsedCommandLine

src/utils/ts-error.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ export const INSPECT_CUSTOM = inspect.custom || 'inspect'
2020
export class TSError extends BaseError {
2121
name = 'TSError'
2222

23-
constructor(
24-
public diagnosticText: string,
25-
public diagnosticCodes: number[],
26-
) {
23+
constructor(public diagnosticText: string, public diagnosticCodes: number[]) {
2724
super(
2825
interpolate(Errors.UnableToCompileTypeScript, {
2926
diagnostics: diagnosticText.trim(),

0 commit comments

Comments
 (0)