Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-jest

Package Overview
Dependencies
Maintainers
3
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-jest - npm Package Versions

1
20

27.0.6

Diff

Changelog

Source

27.0.6 (2021-10-14)

Bug Fixes

  • use specific lodash package instead of full package lodash (#2959) (dc89fe5), closes #2954
kul
published 27.0.5 •

Changelog

Source

27.0.5 (2021-08-14)

Bug Fixes

  • cli: add migration tsConfig option for ts-jest config options (#2794) (781710b), closes #2764
  • cli: fix config:init genarate invalid type comment (#2773) (ede8a20), closes #2772
  • config: handle ./ in tsconfig paths for pathsToModuleNameMapper (#2797) (42ff5e4), closes #2709

Code Refactoring

kul
published 27.0.4 •

Changelog

Source

27.0.4 (2021-07-21)

Bug Fixes

  • add @types/jest as optional peerDependencies to solve yarn 2 (#2756) (5fbf43e)
  • add babel-jest as optional peerDependencies to solve yarn 2 (#2751) (8bede2e)
  • config: include AST transformer's name and version into cache key (#2755) (310fb9a), closes #2753

Features

kul
published 27.0.3 •

Changelog

Source

27.0.3 (2021-06-06)

Bug Fixes

  • revert exports field to support all node versions (#2658) (132c8ba)

Features

kul
published 27.0.2 •

Changelog

Source

27.0.2 (2021-05-30)

Bug Fixes

  • compiler: add empty string file content to compiler cache (#2633) (0feb556), closes #2625
  • config: exclude should only exclude files which match glob values (#2637) (c5ce979), closes #2634
kul
published 27.0.1 •

Changelog

Source

27.0.1 (2021-05-26)

Bug Fixes

kul
published 27.0.0 •

Changelog

Source

27.0.0 (2021-05-25)

Bug Fixes

  • compiler: return file content on emitSkipped for non ts/tsx files (#2519) (a4e5640), closes #2513
  • compiler: retype check other files if processing file is used by those ones in watch mode (#2481) (ac8f3d0), closes #943
  • compiler: initialize compiler with .ts/.tsx/.d.ts files only (#2458) (a89f0e2), closes #2445
  • compiler: resolve nested imported modules for each processing file (#2436) (3cb9019), closes #1390 #1747
  • config: create fallback jest config when jest config is undefined (#2433) (c6d6e4c), closes #2085
  • remove @types/jest from direct dep (#2409) (8913120), closes #2406 #2411
  • compiler: return original file content and show warning on emit skip (#2410) (c2b2164), closes #2407
  • compiler: type check correctly in watch mode when a file content itself has changed (#2405) (064bf3a), closes #2118
  • compiler: exclude files in outDir from compiler source files (#2375) (ec68c74), closes #2350 #2374
  • config: cache config and compiler correctly between runs (#2356) (5f91336)
  • config: improve emit skipped error message (#2358) (2ae8df4), closes #2350
  • typings: set correct typing for tsconfig option (#2383) (584324a), closes #2368
  • config: invalidate Jest transform cache when astTransformers value changes (#2345) (d726016)
  • reduce size of node_modules when adding ts-jest (#2263) (8e0675c)

Features

  • config: allow disable sourcemap (#2544) (47da6ad)
  • compiler: expose TsCompiler as public api (#2344) (871cd6a)
  • config: support typed config options for jest config typescript (#2335) (3cfc37b)
  • presets: add typing for presets entry point (#2337) (1a3058f)
  • compiler: allow custom transformers to access internal Program (#2299) (387964f)
  • config: replace pathRegex with exclude (#2295) (f2f99c3)
  • config: type checking js files based on checkJs (#2283) (1e04433)
  • compiler: support ESM for isolatedModules: false (#2269) (9bb0c05), closes #1709
  • compiler: support ESM for isolatedModule: true (#2219) (e101db0), closes #1709
  • presets: add 3 new presets to work with ESM (#2207) (c277858)
  • allow subclasses of TsJestTransformer to have version checking (#2176) (ca8d7c4)

Performance Improvements

  • reuse jest file system cache for isolatedModules: false (#2189) (68f446b)

Code Refactoring

  • config: remove support for astTransformers string array (#2129) (1e0b2ce)
  • config: remove support for packageJson option (#2128) (05916b9)
  • move jest transformer class to package entry (#2122) (5bbfd06)
  • config: remove support for tsConfig option (#2127) (3cc9b80)

BREAKING CHANGES

  • By default, ts-jest will use sourceMap option from your tsconfig. If users want to have sourcemap on, they need to set sourceMap: true in tsconfig.
  • follow Jest support Node engines (#2478) (1fecf7f)
  • add exports field to package.json, see https://nodejs.org/api/packages.html#packages_package_entry_points (#2467) (d3aba3e)
  • ts-jest custom AST transformer function signature has changed to
import type { TsCompilerInstance } from 'ts-jest/dist/types'

export function factory(compilerInstance: TsCompilerInstance) {
   //...
}
  • One is currently using pathRegex should use exclude with glob patterns.
  • If one currently relies on type check for js files, please set checkJs: true in your tsconfig.
  • Now both isolatedModules: true and isolatedModule: false codes are in one single class TsCompiler which is an instance created in TsJestCompiler based on config option compiler with value typescript or ttypescript.
  • config: packageJson config option is not used in internal ts-jest so this option is now removed.
  • config: One is defining ast transformers in jest.config.js/package.json should change to
// jest.config.js
module.exports = {
   //...
   globals: {
      'ts-jest': {
         astTransformers: {
           before: ['your_before_transformer_path'],
           after: ['your_after_transformer_path'],
           afterDeclarations: ['your_afterDeclarations_transformer_path'],
         }
      }
   }
}

or

// package.json
{
  "jest": {
     "globals": {
        "ts-jest": {
           "astTransformers": {
              "before": ["your_before_transformer_path"],
              "after": ["your_after_transformer_path"],
              "afterDeclarations": ["your_afterDeclarations_transformer_path"]
           }
        }
     }
  }
}
  • One currently refers type in jest.config.js
/** @typedef {import('ts-jest')} */
module.exports = {
  //...
}

should change to

/** @typedef {import('ts-jest/dist/types')} */
module.exports = {
  //...
}
  • Remove possibilities to import mocked, createJestPreset, pathsToModuleNameMapper from package entry. One should change to
import { mocked, createJestPreset, pathsToModuleNameMapper } from 'ts-jest/utils'
  • config: One currently uses tsConfig should change to tsconfig in your jest.config.js or package.json.
kul
published 26.5.6 •

Changelog

Source

26.5.6 (2021-05-05)

Code Refactoring

  • refactor(config): show warning message for sourceMap: false (#2557) (cf60990).
kul
published 27.0.0-next.12 •

Changelog

Source

27.0.0-next.12 (2021-05-05)

Features

BREAKING CHANGES

  • By default, ts-jest will use sourceMap option from your tsconfig. If users want to have sourcemap on, they need to either remove sourceMap or set sourceMap: true in tsconfig
kul
published 27.0.0-next.11 •

Changelog

Source

27.0.0-next.11 (2021-04-15)

Bug Fixes

  • compiler: return file content on emitSkipped for non ts/tsx files (#2519) (a4e5640), closes #2513
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc