Skip to main content

Changelog: swc v1.1.25

ยท One min read

Reduced dependencies#

  • npmlog is replaced with progress
  • request is replaced with node-fetch

The tree of dependency is now

@swc/core@1.1.25 /Users/kdy1/projects/node-swcโ”œโ”€โ”ฌ mkdirp@0.5.1โ”‚ โ””โ”€โ”€ minimist@0.0.8โ”œโ”€โ”€ node-fetch@2.6.0โ”œโ”€โ”€ progress@2.0.3โ””โ”€โ”ฌ true-case-path@1.0.3  โ””โ”€โ”ฌ glob@7.1.6    โ”œโ”€โ”€ fs.realpath@1.0.0    โ”œโ”€โ”ฌ inflight@1.0.6    โ”‚ โ”œโ”€โ”€ once@1.4.0 deduped    โ”‚ โ””โ”€โ”€ wrappy@1.0.2    โ”œโ”€โ”€ inherits@2.0.4    โ”œโ”€โ”ฌ minimatch@3.0.4    โ”‚ โ””โ”€โ”ฌ brace-expansion@1.1.11    โ”‚   โ”œโ”€โ”€ balanced-match@1.0.0    โ”‚   โ””โ”€โ”€ concat-map@0.0.1    โ”œโ”€โ”ฌ once@1.4.0    โ”‚ โ””โ”€โ”€ wrappy@1.0.2 deduped    โ””โ”€โ”€ path-is-absolute@1.0.1

Removed random panic (#672)#

swc internally maintain positions information in a struct named SourceMap. Previously, it had a bug that different files have overlapping spans when new_source_file is called concurrently. It was fixed by introducing an atomic variable.

Fixed source map of async generator (#669)#

swc previously had a bug which generated invalid source map for the code below.

function* foo() {  try {    return yield call();  } finally {  }}