Changelog: swc v1.1.48

Bugfixes#

typescript casts (#794)#

Previously, swc dropped the type information in casts without visiting it. It caused

import { IPerson } from "../types/types";
export function createPerson(person) {
const a = {} as IPerson;
}

to be compiled as

// The import is not dropped.
import { IPerson } from "../types/types";
export function createPerson(person) {
const a = {};
}

This is fixed by visiting types, and swc now emits

export function createPerson(person) {
const a = {};
}

Plugin (#785)#

Plugin was broken because swc.transformSync emits original code even though user modified the ast. This is fixed and to prevent such regession, I moved node-swc into the main repository.