feat: refactoring project

This commit is contained in:
Carlos
2024-11-23 14:56:07 -05:00
parent f0c2a50c18
commit 1c6db5818d
2351 changed files with 39323 additions and 60326 deletions

View File

@@ -49,9 +49,11 @@ class JsonParser extends Parser {
data =
typeof source === "object"
? source
: parseFn(source[0] === "\ufeff" ? source.slice(1) : source);
} catch (e) {
throw new Error(`Cannot parse JSON: ${/** @type {Error} */ (e).message}`);
: parseFn(source[0] === "\uFEFF" ? source.slice(1) : source);
} catch (err) {
throw new Error(
`Cannot parse JSON: ${/** @type {Error} */ (err).message}`
);
}
const jsonData = new JsonData(/** @type {Buffer | RawJsonData} */ (data));
const buildInfo = /** @type {BuildInfo} */ (state.module.buildInfo);