ts-jest 25.0.0 → 25.1.0

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.
package/.ts-jest-digest CHANGED
@@ -1 +1 @@
1
- 63131651c5b10ab3a2b67e8f90d9657f581f7c76
1
+ af7bbf7e663ac60b3ae18315d724364130906791
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ <a name="25.1.0"></a>
2
+ # [25.1.0](https://github.com/kulshekhar/ts-jest/compare/v25.0.0...v25.1.0) (2020-01-30)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * jest 25 type definitions ([ba82a9e](https://github.com/kulshekhar/ts-jest/commit/ba82a9e))
8
+
9
+
10
+
1
11
  <a name="25.0.0"></a>
2
12
  # [25.0.0](https://github.com/kulshekhar/ts-jest/compare/v24.3.0...v25.0.0) (2020-01-23)
3
13
 
@@ -31,9 +41,9 @@
31
41
 
32
42
  ### Bug Fixes
33
43
 
34
- * typescript serviceHost cache miss on Windows operating systems ([26ee731](https://github.com/kulshekhar/ts-jest/commit/26ee731))
35
44
  * **compiler:** pass filename to sha function instead of file extension ([ac1ac97](https://github.com/kulshekhar/ts-jest/commit/ac1ac97))
36
45
  * **transformers:** hoist jest.enableAutomock and jest.disableAutomock ([ac50bc3](https://github.com/kulshekhar/ts-jest/commit/ac50bc3))
46
+ * typescript serviceHost cache miss on Windows operating systems ([26ee731](https://github.com/kulshekhar/ts-jest/commit/26ee731))
37
47
 
38
48
 
39
49
 
@@ -43,9 +53,9 @@
43
53
 
44
54
  ### Bug Fixes
45
55
 
56
+ * **perf:** add cache for fs calls ([#908](https://github.com/kulshekhar/ts-jest/issues/908)) ([3dada81](https://github.com/kulshekhar/ts-jest/commit/3dada81))
46
57
  * [#825](https://github.com/kulshekhar/ts-jest/issues/825) handle symlinked modules (ala pnpm) correctly ([e190b23](https://github.com/kulshekhar/ts-jest/commit/e190b23))
47
58
  * handle tsBuildInfoFile option ([f9583e9](https://github.com/kulshekhar/ts-jest/commit/f9583e9)), closes [#1095](https://github.com/kulshekhar/ts-jest/issues/1095)
48
- * **perf:** add cache for fs calls ([#908](https://github.com/kulshekhar/ts-jest/issues/908)) ([3dada81](https://github.com/kulshekhar/ts-jest/commit/3dada81))
49
59
  * **types:** unforce esModuleInterop in tsconfig.json ([c2d39b6](https://github.com/kulshekhar/ts-jest/commit/c2d39b6))
50
60
 
51
61
 
@@ -257,6 +267,10 @@
257
267
 
258
268
  ### Bug Fixes
259
269
 
270
+ * **ci:** can't use runInBand for e2e: cache collision ([db650f4](https://github.com/kulshekhar/ts-jest/commit/db650f4))
271
+ * **ci:** do not run e2e sub-tests in band ([18ad865](https://github.com/kulshekhar/ts-jest/commit/18ad865))
272
+ * **ci:** ensure npm is present with ci ([edb6eda](https://github.com/kulshekhar/ts-jest/commit/edb6eda))
273
+ * **logger:** removes cyclic imports ([5ef980f](https://github.com/kulshekhar/ts-jest/commit/5ef980f))
260
274
  * babel-config + adds test ([12146c3](https://github.com/kulshekhar/ts-jest/commit/12146c3))
261
275
  * fixes js style to be node < 10 compatible ([83d7517](https://github.com/kulshekhar/ts-jest/commit/83d7517))
262
276
  * hoisting per level + memoize fix ([31847b0](https://github.com/kulshekhar/ts-jest/commit/31847b0))
@@ -264,53 +278,49 @@
264
278
  * makes node 6 happy ([f6f82b8](https://github.com/kulshekhar/ts-jest/commit/f6f82b8))
265
279
  * makes node6 happy ([f170285](https://github.com/kulshekhar/ts-jest/commit/f170285))
266
280
  * makes window happy ([36fbebe](https://github.com/kulshekhar/ts-jest/commit/36fbebe))
267
- * **ci:** can't use runInBand for e2e: cache collision ([db650f4](https://github.com/kulshekhar/ts-jest/commit/db650f4))
268
- * **ci:** do not run e2e sub-tests in band ([18ad865](https://github.com/kulshekhar/ts-jest/commit/18ad865))
269
- * **ci:** ensure npm is present with ci ([edb6eda](https://github.com/kulshekhar/ts-jest/commit/edb6eda))
270
- * **logger:** removes cyclic imports ([5ef980f](https://github.com/kulshekhar/ts-jest/commit/5ef980f))
271
- * **tests:** detect npm version to use or not ci ([683a1e5](https://github.com/kulshekhar/ts-jest/commit/683a1e5))
272
281
  * node 6 unhappy again... ([703ad0b](https://github.com/kulshekhar/ts-jest/commit/703ad0b))
273
- * **tests:** CI fixes ([34a41ea](https://github.com/kulshekhar/ts-jest/commit/34a41ea))
274
- * **tests:** do not use babel in our tests + new API for simple ([3e4de3e](https://github.com/kulshekhar/ts-jest/commit/3e4de3e))
275
282
  * normalizes bundle hash on any node version ([ce7afaf](https://github.com/kulshekhar/ts-jest/commit/ce7afaf))
276
283
  * npm coming with node 6 doesn't talk `ci` ([b87198d](https://github.com/kulshekhar/ts-jest/commit/b87198d))
277
284
  * source maps ([89a30c9](https://github.com/kulshekhar/ts-jest/commit/89a30c9))
278
285
  * typos + node 6 compat ([0ed1587](https://github.com/kulshekhar/ts-jest/commit/0ed1587))
279
- * **tests:** more sanitizing for windows compat ([faae274](https://github.com/kulshekhar/ts-jest/commit/faae274))
280
286
  * updates templates ([f2e1da2](https://github.com/kulshekhar/ts-jest/commit/f2e1da2))
281
287
  * uses cross-platform spawn + fix pkg versions ([ac1599c](https://github.com/kulshekhar/ts-jest/commit/ac1599c))
282
288
  * we are not writing files, use normalized EOL ([47fff43](https://github.com/kulshekhar/ts-jest/commit/47fff43))
289
+ * **tests:** CI fixes ([34a41ea](https://github.com/kulshekhar/ts-jest/commit/34a41ea))
290
+ * **tests:** detect npm version to use or not ci ([683a1e5](https://github.com/kulshekhar/ts-jest/commit/683a1e5))
291
+ * **tests:** do not use babel in our tests + new API for simple ([3e4de3e](https://github.com/kulshekhar/ts-jest/commit/3e4de3e))
292
+ * **tests:** more sanitizing for windows compat ([faae274](https://github.com/kulshekhar/ts-jest/commit/faae274))
283
293
 
284
294
 
285
295
  ### Features
286
296
 
287
- * diagnostics, different compilers, ... ([f26ebf0](https://github.com/kulshekhar/ts-jest/commit/f26ebf0))
288
297
  * **config:** adds a helper to build moduleNameMapper from paths ([7b8598e](https://github.com/kulshekhar/ts-jest/commit/7b8598e)), closes [#364](https://github.com/kulshekhar/ts-jest/issues/364)
289
298
  * **logging:** improves log messages + tests ([5d03c4d](https://github.com/kulshekhar/ts-jest/commit/5d03c4d))
290
- * jest preset ([beb50b5](https://github.com/kulshekhar/ts-jest/commit/beb50b5))
291
- * **test:** jest serializers ([dfa9c0f](https://github.com/kulshekhar/ts-jest/commit/dfa9c0f))
292
299
  * adds logging + better hashing ([4322701](https://github.com/kulshekhar/ts-jest/commit/4322701))
293
- * **tests:** more test tools + adds test related to debuggin issues ([8dcafca](https://github.com/kulshekhar/ts-jest/commit/8dcafca))
294
300
  * allow env var to add diagnostic codes to ignore ([777edf5](https://github.com/kulshekhar/ts-jest/commit/777edf5))
295
301
  * cache key + tests ([bd55448](https://github.com/kulshekhar/ts-jest/commit/bd55448))
302
+ * diagnostics, different compilers, ... ([f26ebf0](https://github.com/kulshekhar/ts-jest/commit/f26ebf0))
296
303
  * directly writes to stdio so jest does not swallow ([6a7f01f](https://github.com/kulshekhar/ts-jest/commit/6a7f01f))
297
304
  * handles stringifyContentPathRegex ([3fcb4bd](https://github.com/kulshekhar/ts-jest/commit/3fcb4bd))
298
305
  * hoisting + tests + many other things ([6186e84](https://github.com/kulshekhar/ts-jest/commit/6186e84))
299
306
  * io serializer + other test utils ([d03e0e7](https://github.com/kulshekhar/ts-jest/commit/d03e0e7))
307
+ * jest preset ([beb50b5](https://github.com/kulshekhar/ts-jest/commit/beb50b5))
300
308
  * warn about unsupported versions ([1103071](https://github.com/kulshekhar/ts-jest/commit/1103071))
309
+ * **test:** jest serializers ([dfa9c0f](https://github.com/kulshekhar/ts-jest/commit/dfa9c0f))
310
+ * **tests:** more test tools + adds test related to debuggin issues ([8dcafca](https://github.com/kulshekhar/ts-jest/commit/8dcafca))
301
311
 
302
312
 
303
313
  ### Performance Improvements
304
314
 
305
- * detects changes in templates and bundle ([2a3da21](https://github.com/kulshekhar/ts-jest/commit/2a3da21))
306
315
  * **babel:** uses babel-jest cache key as part of ours ([f51c4a7](https://github.com/kulshekhar/ts-jest/commit/f51c4a7))
316
+ * **cache:** share config-sets for parallel test running ([090ca7b](https://github.com/kulshekhar/ts-jest/commit/090ca7b))
317
+ * **tests:** run e2e tests in band ([b3e94ff](https://github.com/kulshekhar/ts-jest/commit/b3e94ff))
318
+ * detects changes in templates and bundle ([2a3da21](https://github.com/kulshekhar/ts-jest/commit/2a3da21))
307
319
  * do not type check if fileName doesn't match ([cc45adc](https://github.com/kulshekhar/ts-jest/commit/cc45adc))
308
320
  * faster tests ([37a0187](https://github.com/kulshekhar/ts-jest/commit/37a0187))
309
321
  * improves speed of local test after 1st run ([cc04021](https://github.com/kulshekhar/ts-jest/commit/cc04021))
310
322
  * more cleaning ([c48f7b8](https://github.com/kulshekhar/ts-jest/commit/c48f7b8))
311
323
  * trying to improve travis-ci conf ([e4b4d95](https://github.com/kulshekhar/ts-jest/commit/e4b4d95))
312
- * **cache:** share config-sets for parallel test running ([090ca7b](https://github.com/kulshekhar/ts-jest/commit/090ca7b))
313
- * **tests:** run e2e tests in band ([b3e94ff](https://github.com/kulshekhar/ts-jest/commit/b3e94ff))
314
324
 
315
325
 
316
326
 
@@ -320,21 +330,21 @@
320
330
 
321
331
  ### Bug Fixes
322
332
 
323
- * **html:** correctly transforms html source when needed ([9a2d74f](https://github.com/kulshekhar/ts-jest/commit/9a2d74f))
324
- * **lint:** fixes tslint script & lint issues ([60ab36e](https://github.com/kulshekhar/ts-jest/commit/60ab36e))
325
- * **package:** update fs-extra to version 6.0.1 ([7e73536](https://github.com/kulshekhar/ts-jest/commit/7e73536))
326
333
  * allow (but deprecate) use of old preprocessor.js ([a65079f](https://github.com/kulshekhar/ts-jest/commit/a65079f))
327
334
  * big refactor + fixes (mainly cache key + coverage) ([e46caae](https://github.com/kulshekhar/ts-jest/commit/e46caae))
328
335
  * fixes coverage and tests ([09500c2](https://github.com/kulshekhar/ts-jest/commit/09500c2))
329
336
  * gracefully load [@babel](https://github.com/babel)/core or babel-core ([98b2410](https://github.com/kulshekhar/ts-jest/commit/98b2410))
330
337
  * hack for babel < 6 so that breakpoints do work ([90c74ef](https://github.com/kulshekhar/ts-jest/commit/90c74ef)), closes [#627](https://github.com/kulshekhar/ts-jest/issues/627)
331
- * **package:** update pkg-dir to version 3.0.0 ([3fb8f9f](https://github.com/kulshekhar/ts-jest/commit/3fb8f9f))
332
- * **package:** update yargs to version 12.0.1 ([390ffcd](https://github.com/kulshekhar/ts-jest/commit/390ffcd))
333
338
  * resolves correctly config file path (fix [#636](https://github.com/kulshekhar/ts-jest/issues/636)) ([5ab100c](https://github.com/kulshekhar/ts-jest/commit/5ab100c))
334
339
  * test rootDir to handle preset-angular ([8a6a8f7](https://github.com/kulshekhar/ts-jest/commit/8a6a8f7))
335
- * Typo in utils.ts ([#534](https://github.com/kulshekhar/ts-jest/issues/534)) ([a650260](https://github.com/kulshekhar/ts-jest/commit/a650260))
336
- * **source-maps:** fix source maps options/calls ([76e27c1](https://github.com/kulshekhar/ts-jest/commit/76e27c1))
337
340
  * wrong error message ([c955083](https://github.com/kulshekhar/ts-jest/commit/c955083))
341
+ * **html:** correctly transforms html source when needed ([9a2d74f](https://github.com/kulshekhar/ts-jest/commit/9a2d74f))
342
+ * **lint:** fixes tslint script & lint issues ([60ab36e](https://github.com/kulshekhar/ts-jest/commit/60ab36e))
343
+ * **package:** update fs-extra to version 6.0.1 ([7e73536](https://github.com/kulshekhar/ts-jest/commit/7e73536))
344
+ * **package:** update pkg-dir to version 3.0.0 ([3fb8f9f](https://github.com/kulshekhar/ts-jest/commit/3fb8f9f))
345
+ * **package:** update yargs to version 12.0.1 ([390ffcd](https://github.com/kulshekhar/ts-jest/commit/390ffcd))
346
+ * **source-maps:** fix source maps options/calls ([76e27c1](https://github.com/kulshekhar/ts-jest/commit/76e27c1))
347
+ * Typo in utils.ts ([#534](https://github.com/kulshekhar/ts-jest/issues/534)) ([a650260](https://github.com/kulshekhar/ts-jest/commit/a650260))
338
348
 
339
349
 
340
350
  ### Performance Improvements
@@ -355,9 +365,9 @@
355
365
  ### Bug Fixes
356
366
 
357
367
  * **package:** update source-map-support to version 0.5.0 ([f0aab12](https://github.com/kulshekhar/ts-jest/commit/f0aab12))
358
- * add startDir to if-clause ([eed5311](https://github.com/kulshekhar/ts-jest/commit/eed5311))
359
368
  * **package:** update yargs to version 10.0.3 ([5cdf969](https://github.com/kulshekhar/ts-jest/commit/5cdf969))
360
369
  * **package:** update yargs to version 11.0.0 ([7e9ce40](https://github.com/kulshekhar/ts-jest/commit/7e9ce40))
370
+ * add startDir to if-clause ([eed5311](https://github.com/kulshekhar/ts-jest/commit/eed5311))
361
371
  * **package:** update yargs to version 9.0.1 ([#326](https://github.com/kulshekhar/ts-jest/issues/326)) ([8bf9924](https://github.com/kulshekhar/ts-jest/commit/8bf9924))
362
372
 
363
373
 
@@ -413,10 +423,10 @@
413
423
 
414
424
  ### Bug Fixes
415
425
 
416
- * **package:** update fs-extra to version 3.0.0 ([906be12](https://github.com/kulshekhar/ts-jest/commit/906be12))
417
- * **package:** update yargs to version 8.0.1 ([0b2ea98](https://github.com/kulshekhar/ts-jest/commit/0b2ea98))
418
426
  * peer dependency against Typescript 2.x ([cb08128](https://github.com/kulshekhar/ts-jest/commit/cb08128))
419
427
  * remove outDir when collecting coverage ([c076956](https://github.com/kulshekhar/ts-jest/commit/c076956))
428
+ * **package:** update fs-extra to version 3.0.0 ([906be12](https://github.com/kulshekhar/ts-jest/commit/906be12))
429
+ * **package:** update yargs to version 8.0.1 ([0b2ea98](https://github.com/kulshekhar/ts-jest/commit/0b2ea98))
420
430
 
421
431
 
422
432
  ### Features
@@ -1,4 +1,4 @@
1
- /// <reference types="jest" />
1
+ import { Config } from '@jest/types';
2
2
  import { Logger } from 'bs-logger';
3
3
  import { CompilerOptions, CustomTransformers, ParsedCommandLine } from 'typescript';
4
4
  import { AstTransformerDesc, BabelConfig, BabelJestTransformer, TTypeScript, TsCompiler, TsJestConfig, TsJestGlobalOptions, TsJestHooksMap } from '../types';
@@ -6,7 +6,7 @@ export declare class ConfigSet {
6
6
  readonly parentOptions?: TsJestGlobalOptions | undefined;
7
7
  get projectPackageJson(): Record<string, any>;
8
8
  get projectDependencies(): Record<string, string>;
9
- get jest(): jest.ProjectConfig;
9
+ get jest(): Config.ProjectConfig;
10
10
  get tsJest(): TsJestConfig;
11
11
  get typescript(): ParsedCommandLine;
12
12
  get tsconfig(): any;
@@ -28,7 +28,7 @@ export declare class ConfigSet {
28
28
  get tsJestDigest(): string;
29
29
  get cacheKey(): string;
30
30
  readonly logger: Logger;
31
- constructor(jestConfig: jest.ProjectConfig, parentOptions?: TsJestGlobalOptions | undefined, parentLogger?: Logger);
31
+ constructor(jestConfig: Config.ProjectConfig, parentOptions?: TsJestGlobalOptions | undefined, parentLogger?: Logger);
32
32
  resolvePath(inputPath: string, { throwIfMissing, nodeResolve }?: {
33
33
  throwIfMissing?: boolean;
34
34
  nodeResolve?: boolean;
@@ -1,10 +1,10 @@
1
- /// <reference types="jest" />
1
+ import { Config } from '@jest/types';
2
2
  export interface TsJestPresets {
3
- transform: Record<string, string>;
3
+ transform: Config.InitialOptions['transform'];
4
4
  testMatch?: string[];
5
5
  moduleFileExtensions?: string[];
6
6
  }
7
7
  export interface CreateJestPresetOptions {
8
8
  allowJs?: boolean;
9
9
  }
10
- export declare function createJestPreset({ allowJs }?: CreateJestPresetOptions, from?: jest.InitialOptions): TsJestPresets;
10
+ export declare function createJestPreset({ allowJs }?: CreateJestPresetOptions, from?: Config.InitialOptions): TsJestPresets;
@@ -1,15 +1,16 @@
1
- /// <reference types="jest" />
1
+ import { TransformOptions, TransformedSource, Transformer } from '@jest/transform/build/types';
2
+ import { Config } from '@jest/types';
2
3
  import { Logger } from 'bs-logger';
3
4
  import { ConfigSet } from './config/config-set';
4
5
  import { TsJestGlobalOptions } from './types';
5
- export declare class TsJestTransformer implements jest.Transformer {
6
+ export declare class TsJestTransformer implements Transformer {
6
7
  static get lastTransformerId(): number;
7
8
  readonly logger: Logger;
8
9
  readonly id: number;
9
10
  readonly options: TsJestGlobalOptions;
10
11
  constructor(baseOptions?: TsJestGlobalOptions);
11
- configsFor(jestConfig: jest.ProjectConfig | string): ConfigSet;
12
- process(input: string, filePath: jest.Path, jestConfig: jest.ProjectConfig, transformOptions?: jest.TransformOptions): jest.TransformedSource | string;
12
+ configsFor(jestConfig: Config.ProjectConfig | string): ConfigSet;
13
+ process(input: string, filePath: Config.Path, jestConfig: Config.ProjectConfig, transformOptions?: TransformOptions): TransformedSource | string;
13
14
  getCacheKey(fileContent: string, filePath: string, jestConfigStr: string, transformOptions?: {
14
15
  instrument?: boolean;
15
16
  rootDir?: string;
package/dist/types.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- /// <reference types="jest" />
1
+ import { TransformedSource, Transformer } from '@jest/transform/build/types';
2
2
  import * as _babel from 'babel__core';
3
3
  import { CompilerOptions, SourceFile, TransformerFactory } from 'typescript';
4
4
  import * as _ts from 'typescript';
5
5
  import { ConfigSet } from './config/config-set';
6
6
  export declare type TBabelCore = typeof _babel;
7
7
  export declare type TTypeScript = typeof _ts;
8
- export declare type TBabelJest = Required<jest.Transformer>;
8
+ export declare type TBabelJest = Required<Transformer>;
9
9
  export declare type BabelJestTransformer = {
10
- [K in Exclude<keyof jest.Transformer, 'createTransformer'>]: Exclude<jest.Transformer[K], undefined>;
10
+ [K in Exclude<keyof Transformer, 'createTransformer'>]: Exclude<Transformer[K], undefined>;
11
11
  };
12
12
  export declare type BabelConfig = _babel.TransformOptions;
13
13
  export interface TsJestGlobalOptions {
@@ -70,7 +70,7 @@ export interface TsJestConfig {
70
70
  stringifyContentPathRegex: TsJestConfig$stringifyContentPathRegex;
71
71
  }
72
72
  export interface TsJestHooksMap {
73
- afterProcess?(args: any[], result: string | jest.TransformedSource): string | jest.TransformedSource | void;
73
+ afterProcess?(args: any[], result: string | TransformedSource): string | TransformedSource | void;
74
74
  }
75
75
  export interface TSCommon {
76
76
  version: typeof _ts.version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-jest",
3
- "version": "25.0.0",
3
+ "version": "25.1.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "bin": "cli.js",
@@ -82,11 +82,13 @@
82
82
  "devDependencies": {
83
83
  "@commitlint/cli": "8.x",
84
84
  "@commitlint/config-conventional": "7.x",
85
+ "@jest/transform": "25.x",
86
+ "@jest/types": "25.x",
85
87
  "@types/babel__core": "7.x",
86
88
  "@types/buffer-from": "latest",
87
89
  "@types/cross-spawn": "latest",
88
90
  "@types/fs-extra": "latest",
89
- "@types/jest": "23.x",
91
+ "@types/jest": "25.x",
90
92
  "@types/js-yaml": "latest",
91
93
  "@types/json5": "latest",
92
94
  "@types/lodash.memoize": "4.x",