Skip to content

Releases: wessberg/ts-evaluator

v1.2.0

04 Aug 12:47
Compare
Choose a tag to compare
  • feat: add TypeScript v5.1 support. Add support for newer JSDOM versions 6f06ef0
  • Merge pull request #14 from astahmer/chore/update-deps f7ade86
  • feat: add Typescript v[4.9.5 ; 5.1.6] support b699f23

v1.1.0...v1.2.0

v1.1.0

10 Jan 00:16
Compare
Choose a tag to compare
  • feat: add TypeScript v4.9 support 590293c

v1.0.7...v1.1.0

v1.0.7

29 Jul 22:33
Compare
Choose a tag to compare

v1.0.6...v1.0.7

v1.0.6

29 Jul 11:04
Compare
Choose a tag to compare
  • feat: change error handling to a continuation function approach 8f7cfdb
  • test: add an additional test b67b873

v1.0.5...v1.0.6

v1.0.5

23 Jul 21:46
Compare
Choose a tag to compare
  • fix: add null-check to avoid runtime exceptions under some circumstances on returned values d89671c

v1.0.4...v1.0.5

v1.0.4

23 Jul 21:10
Compare
Choose a tag to compare
  • feat: add 'ModuleOverrides' option. e121d66

v1.0.3...v1.0.4

v1.0.3

22 Jul 21:33
Compare
Choose a tag to compare
  • feat: make evaluating identifiers more robust 8436f68
  • feat: make behavior when not passing in a typechecker far more robust 5f6634f

v1.0.2...v1.0.3

v1.0.2

22 Jul 14:33
Compare
Choose a tag to compare
  • feat: make passing in a typechecker optional and document its operation 3966d4b
  • chore: update lockfile 7e5078c

v1.0.1...v1.0.2

v1.0.1

07 Jun 20:22
Compare
Choose a tag to compare

New Features

ts-evaluator is now based on ESM and requires Node v14.19.0 (BREAKING CHANGE)

Now that TypeScript v4.7 is out, it has finally received great support for ES modules in a Node.js environment that aligns with how it has been implemented across Node.js and browsers.

Because of this, now is a good time to make ts-evaluator a type: "module" package. However, it still provides a CommonJS fallback. If your codebase is still based on CommonJS, you should be fine. Please know however, that ts-evaluator requires an environment running Node v14.19.0 or newer going forward.

TypeScript v4.7 support

ts-evaluator now supports TypeScript v4.7 and its new features.

New presets: NODE_CJS and NODE_ESM

Nowadays, Node.js files may either be based on CommonJS or ES Modules, and depending on which it is, the execution environment has some differences. For example, in a CommonJS based Node.js file, globals like require, __dirname, and __filename is available, whereas import.meta is available in an ES Module based Node.js file.

To reflect this, two new Lexical Environment presets have been added to ts-evaluator:

  • NODE_CJS - An alias for NODE.
  • NODE_ESM - Assumes an ESM-based Node.js environment. This means that built-in modules such as fs and path can be resolved, and Node-specific globals such as process is present, as well as ones that are only present in an ESM-based Node.js environment, such as import.meta.

Support for evaluating new.target and import.meta

ts-evaluator can now handle new.target syntax, as well as import.meta syntax inside ES Modules.

v1.0.0...v1.0.1

v0.2.0

25 May 18:22
Compare
Choose a tag to compare
  • feat: add TypeScript v4.7 support. Add new sponsor: scrubtheweb 1e91aab
  • feat: fix issues with ShorthandPropertyAssignments. Move jsdom and chalk to optional peer dependencies d963c22

v0.1.0...v0.2.0