taplo
taplo copied to clipboard
No/incorrect documentation for @taplo/lib
There is just no documentation for the JS packages on the websites, and the JSDoc comments are incorrect when they exist (i.e. https://github.com/tamasfe/taplo/blob/5c8ad75a5c80a9275e9fab2f0842ad35d61e01e7/js/lib/src/index.ts#L73C1-L73C1 the package should be under @taplo/lib not taplo).
I forgot to mention that the @taplo/lib package is just not even an ESM package - just published as CJS.
import { Taplo } from "@taplo/lib";
^^^^^
SyntaxError: Named export 'Taplo' not found. The requested module '@taplo/lib' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@taplo/lib';
const { Taplo } = pkg;
It should either be ESM only or publish both ESM and CJS.
This isn't a VSCode issue though? Just the npm package.
Yes, but we don't really have that distinction in the labels. So for me anything related to javascript or VScode is just vscode and I don't look at it because I don't use VSCode and don't know javascript.
Okay aha. No worries.