Skip to content

Releases: val-town/codemirror-ts

Improved tree-shakeability

08 Nov 22:02
0363769
Compare
Choose a tag to compare

The only change in this release is adding a sideEffects key to package.json, which should make this module more tree-shakeable for bundlers that support that.

Adds diagnosticCodesToIgnore for tsLinter

10 Sep 15:05
1dd3222
Compare
Choose a tag to compare

This new option lets you ignore expected lint errors by listing their error codes.

Example:

tsLinter({
    diagnosticCodesToIgnore: [
        2354, // tslib not found
		2307, // Cannot find module 'xxx' or its corresponding type declarations
		1375, // 'await' expressions are only allowed at the top level of a file when that file is a module
    ],
}),

Thanks @KABBOUCHI for this contribution!

Fixes compatibility with bundlers

21 Jun 16:54
15b083e
Compare
Choose a tag to compare

This module is published as ESM, and imports from the TypeScript module. It previously used named imports from TypeScript, but the TypeScript module doesn't expose named imports. Some bundlers create compatibility for this, basically importing the default and destructuring from it. But others don't. This update just uses the default import to ensure compatibility across bundlers.

Add getEnv method

12 Feb 13:04
c95ccf9
Compare
Choose a tag to compare
  • Adds worker.getEnv() to allow the window access to the worker's instance of the TypeScript language server. Contributed in #19 - thanks @peterje!

v2.0.0

14 Dec 22:27
095e03f
Compare
Choose a tag to compare

BREAKING CHANGE: if you use 1.0.0, you'll definitely have to update code.

I realized that this module wasn't doing things right! And it was good to fix it. The right way to manage configuration in CodeMirror is with a Facet, not with passing parameters!

So before, something like lint was

tsLinter({ env, path });

But in 2.0.0, you use it like

tsLinter();

And you need a new thing, the facet!

tsFacet.of({ env, path });

You need that in your extensions list - that's where the other extensions get their configuration from.