rna
rna copied to clipboard
`estransform` package readme seems completely wrong
I was browsing NPM for sourcemap related packages and came across this @chialab/estransform package.
According to the current published version on NPM and the README in the repo today, the usage is:
import { transform } from '@chialab/estransform';
const { code, map } = await transform(
'require("tslib"); module.exports = function() {}',
{ sourceContents: true },
(magicCode, contents) => {
magicCode.overwrite(0, contents.length, 'Hello!');
}
);
But, looking at both the source code and the current published version on NPM (0.18.1), I don't see a transform method listed anywhere.
It does look like there was a rewrite of the package logic to use oxc instead of sucrase, which was never published, but I don't see a transform method in that older version.
Do you plan to publish a newer version of the package with the changes? And could you clarify what the actual current API usage is?