Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/rollup/dist/shared/parseAst.js

    rd565449 r0c6b92a  
    11/*
    22  @license
    3         Rollup.js v4.20.0
    4         Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d5
     3        Rollup.js v4.27.4
     4        Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
    55
    66        https://github.com/rollup/rollup
     
    250250const URL_TREATING_MODULE_AS_EXTERNAL_DEPENDENCY = 'troubleshooting/#warning-treating-module-as-external-dependency';
    251251const URL_SOURCEMAP_IS_LIKELY_TO_BE_INCORRECT = 'troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect';
     252// configuration-options
     253const URL_JSX = 'configuration-options/#jsx';
    252254const URL_OUTPUT_AMD_ID = 'configuration-options/#output-amd-id';
    253255const URL_OUTPUT_AMD_BASEPATH = 'configuration-options/#output-amd-basepath';
     
    274276const URL_BUNDLE_CONFIG_AS_CJS = 'command-line-interface/#bundleconfigascjs';
    275277const URL_CONFIGURATION_FILES = 'command-line-interface/#configuration-files';
     278const URL_GENERATEBUNDLE = 'plugin-development/#generatebundle';
    276279
    277280function error(base) {
     
    322325        prefix += `${relativeId(id)}${position}: `;
    323326    }
     327    const oldMessage = log.message;
    324328    log.message = prefix + log.message;
     329    tweakStackMessage(log, oldMessage);
    325330}
    326331// Error codes should be sorted alphabetically while errors should be sorted by
    327332// error code below
    328 const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_IMPORT_OPTIONS = 'DUPLICATE_IMPORT_OPTIONS', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FAIL_AFTER_WARNINGS = 'FAIL_AFTER_WARNINGS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_CONFIG_MODULE_FORMAT = 'INVALID_CONFIG_MODULE_FORMAT', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_CONFIG = 'MISSING_CONFIG', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_EXTERNAL_CONFIG = 'MISSING_EXTERNAL_CONFIG', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', ONLY_INLINE_SOURCEMAPS = 'ONLY_INLINE_SOURCEMAPS', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR';
     333const ADDON_ERROR = 'ADDON_ERROR', ALREADY_CLOSED = 'ALREADY_CLOSED', AMBIGUOUS_EXTERNAL_NAMESPACES = 'AMBIGUOUS_EXTERNAL_NAMESPACES', ANONYMOUS_PLUGIN_CACHE = 'ANONYMOUS_PLUGIN_CACHE', ASSET_NOT_FINALISED = 'ASSET_NOT_FINALISED', ASSET_NOT_FOUND = 'ASSET_NOT_FOUND', ASSET_SOURCE_ALREADY_SET = 'ASSET_SOURCE_ALREADY_SET', ASSET_SOURCE_MISSING = 'ASSET_SOURCE_MISSING', BAD_LOADER = 'BAD_LOADER', CANNOT_CALL_NAMESPACE = 'CANNOT_CALL_NAMESPACE', CANNOT_EMIT_FROM_OPTIONS_HOOK = 'CANNOT_EMIT_FROM_OPTIONS_HOOK', CHUNK_NOT_GENERATED = 'CHUNK_NOT_GENERATED', CHUNK_INVALID = 'CHUNK_INVALID', CIRCULAR_DEPENDENCY = 'CIRCULAR_DEPENDENCY', CIRCULAR_REEXPORT = 'CIRCULAR_REEXPORT', CONST_REASSIGN = 'CONST_REASSIGN', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', DUPLICATE_IMPORT_OPTIONS = 'DUPLICATE_IMPORT_OPTIONS', DUPLICATE_PLUGIN_NAME = 'DUPLICATE_PLUGIN_NAME', EMPTY_BUNDLE = 'EMPTY_BUNDLE', EVAL = 'EVAL', EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS = 'EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS', EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES = 'EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES', EXTERNAL_SYNTHETIC_EXPORTS = 'EXTERNAL_SYNTHETIC_EXPORTS', FAIL_AFTER_WARNINGS = 'FAIL_AFTER_WARNINGS', FILE_NAME_CONFLICT = 'FILE_NAME_CONFLICT', FILE_NOT_FOUND = 'FILE_NOT_FOUND', FIRST_SIDE_EFFECT = 'FIRST_SIDE_EFFECT', ILLEGAL_IDENTIFIER_AS_NAME = 'ILLEGAL_IDENTIFIER_AS_NAME', ILLEGAL_REASSIGNMENT = 'ILLEGAL_REASSIGNMENT', INCONSISTENT_IMPORT_ATTRIBUTES = 'INCONSISTENT_IMPORT_ATTRIBUTES', INVALID_ANNOTATION = 'INVALID_ANNOTATION', INPUT_HOOK_IN_OUTPUT_PLUGIN = 'INPUT_HOOK_IN_OUTPUT_PLUGIN', INVALID_CHUNK = 'INVALID_CHUNK', INVALID_CONFIG_MODULE_FORMAT = 'INVALID_CONFIG_MODULE_FORMAT', INVALID_EXPORT_OPTION = 'INVALID_EXPORT_OPTION', INVALID_EXTERNAL_ID = 'INVALID_EXTERNAL_ID', INVALID_IMPORT_ATTRIBUTE = 'INVALID_IMPORT_ATTRIBUTE', INVALID_LOG_POSITION = 'INVALID_LOG_POSITION', INVALID_OPTION = 'INVALID_OPTION', INVALID_PLUGIN_HOOK = 'INVALID_PLUGIN_HOOK', INVALID_ROLLUP_PHASE = 'INVALID_ROLLUP_PHASE', INVALID_SETASSETSOURCE = 'INVALID_SETASSETSOURCE', INVALID_TLA_FORMAT = 'INVALID_TLA_FORMAT', MISSING_CONFIG = 'MISSING_CONFIG', MISSING_EXPORT = 'MISSING_EXPORT', MISSING_EXTERNAL_CONFIG = 'MISSING_EXTERNAL_CONFIG', MISSING_GLOBAL_NAME = 'MISSING_GLOBAL_NAME', MISSING_IMPLICIT_DEPENDANT = 'MISSING_IMPLICIT_DEPENDANT', MISSING_JSX_EXPORT = 'MISSING_JSX_EXPORT', MISSING_NAME_OPTION_FOR_IIFE_EXPORT = 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT', MISSING_NODE_BUILTINS = 'MISSING_NODE_BUILTINS', MISSING_OPTION = 'MISSING_OPTION', MIXED_EXPORTS = 'MIXED_EXPORTS', MODULE_LEVEL_DIRECTIVE = 'MODULE_LEVEL_DIRECTIVE', NAMESPACE_CONFLICT = 'NAMESPACE_CONFLICT', NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE = 'NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE', ONLY_INLINE_SOURCEMAPS = 'ONLY_INLINE_SOURCEMAPS', OPTIMIZE_CHUNK_STATUS = 'OPTIMIZE_CHUNK_STATUS', PARSE_ERROR = 'PARSE_ERROR', PLUGIN_ERROR = 'PLUGIN_ERROR', REDECLARATION_ERROR = 'REDECLARATION_ERROR', RESERVED_NAMESPACE = 'RESERVED_NAMESPACE', SHIMMED_EXPORT = 'SHIMMED_EXPORT', SOURCEMAP_BROKEN = 'SOURCEMAP_BROKEN', SOURCEMAP_ERROR = 'SOURCEMAP_ERROR', SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT = 'SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT', THIS_IS_UNDEFINED = 'THIS_IS_UNDEFINED', UNEXPECTED_NAMED_IMPORT = 'UNEXPECTED_NAMED_IMPORT', UNKNOWN_OPTION = 'UNKNOWN_OPTION', UNRESOLVED_ENTRY = 'UNRESOLVED_ENTRY', UNRESOLVED_IMPORT = 'UNRESOLVED_IMPORT', UNUSED_EXTERNAL_IMPORT = 'UNUSED_EXTERNAL_IMPORT', VALIDATION_ERROR = 'VALIDATION_ERROR';
    329334function logAddonNotGenerated(message, hook, plugin) {
    330335    return {
     
    560565    };
    561566}
     567function tweakStackMessage(error, oldMessage) {
     568    if (!error.stack) {
     569        return error;
     570    }
     571    error.stack = error.stack.replace(oldMessage, error.message);
     572    return error;
     573}
    562574function logCannotBundleConfigAsEsm(originalError) {
    563     return {
     575    return tweakStackMessage({
    564576        cause: originalError,
    565577        code: INVALID_CONFIG_MODULE_FORMAT,
     
    567579        stack: originalError.stack,
    568580        url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
    569     };
     581    }, originalError.message);
    570582}
    571583function logCannotLoadConfigAsCjs(originalError) {
    572     return {
     584    return tweakStackMessage({
    573585        cause: originalError,
    574586        code: INVALID_CONFIG_MODULE_FORMAT,
     
    576588        stack: originalError.stack,
    577589        url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
    578     };
     590    }, originalError.message);
    579591}
    580592function logCannotLoadConfigAsEsm(originalError) {
    581     return {
     593    return tweakStackMessage({
    582594        cause: originalError,
    583595        code: INVALID_CONFIG_MODULE_FORMAT,
     
    585597        stack: originalError.stack,
    586598        url: getRollupUrl(URL_BUNDLE_CONFIG_AS_CJS)
    587     };
     599    }, originalError.message);
    588600}
    589601function logInvalidExportOptionValue(optionValue) {
     
    730742    };
    731743}
     744function logMissingJsxExport(name, exporter, importer) {
     745    return {
     746        code: MISSING_JSX_EXPORT,
     747        exporter,
     748        id: importer,
     749        message: `Export "${name}" is not defined in module "${relativeId(exporter)}" even though it is needed in "${relativeId(importer)}" to provide JSX syntax. Please check your "jsx" option.`,
     750        names: [name],
     751        url: getRollupUrl(URL_JSX)
     752    };
     753}
    732754function logMissingNameOptionForIifeExport() {
    733755    return {
     
    751773    };
    752774}
    753 // eslint-disable-next-line unicorn/prevent-abbreviations
    754775function logMissingFileOrDirOption() {
    755776    return {
     
    813834    };
    814835}
     836function logReservedNamespace(namespace) {
     837    return {
     838        code: RESERVED_NAMESPACE,
     839        message: `You have overided reserved namespace "${namespace}"`
     840    };
     841}
    815842function logModuleParseError(error, moduleId) {
    816843    let message = error.message.replace(/ \(\d+:\d+\)$/, '');
     
    821848        message += ' (Note that you need plugins to import files that are not JavaScript)';
    822849    }
    823     return {
     850    return tweakStackMessage({
    824851        cause: error,
    825852        code: PARSE_ERROR,
     
    827854        message,
    828855        stack: error.stack
    829     };
     856    }, error.message);
    830857}
    831858function logPluginError(error, plugin, { hook, id } = {}) {
     
    9841011}
    9851012function warnDeprecationWithOptions(deprecation, urlSnippet, activeDeprecation, log, strictDeprecations, plugin) {
    986     {
     1013    if (activeDeprecation || strictDeprecations) {
    9871014        const warning = logDeprecation(deprecation, urlSnippet);
    9881015        if (strictDeprecations) {
     
    10121039const Identifier = 'Identifier';
    10131040const Literal = 'Literal';
     1041const ObjectExpression = 'ObjectExpression';
    10141042const PanicError = 'PanicError';
    10151043const ParseError = 'ParseError';
     
    10951123        return EMPTY_ARRAY;
    10961124    const length = buffer[position++];
    1097     const list = [];
     1125    const list = new Array(length);
    10981126    for (let index = 0; index < length; index++) {
    1099         list.push(convertAnnotation(buffer[position++], buffer));
     1127        list[index] = convertAnnotation(buffer[position++], buffer);
    11001128    }
    11011129    return list;
     
    15481576        };
    15491577    },
     1578    function jsxAttribute(position, buffer) {
     1579        const valuePosition = buffer[position + 3];
     1580        return {
     1581            type: 'JSXAttribute',
     1582            start: buffer[position],
     1583            end: buffer[position + 1],
     1584            name: convertNode(buffer[position + 2], buffer),
     1585            value: valuePosition === 0 ? null : convertNode(valuePosition, buffer)
     1586        };
     1587    },
     1588    function jsxClosingElement(position, buffer) {
     1589        return {
     1590            type: 'JSXClosingElement',
     1591            start: buffer[position],
     1592            end: buffer[position + 1],
     1593            name: convertNode(buffer[position + 2], buffer)
     1594        };
     1595    },
     1596    function jsxClosingFragment(position, buffer) {
     1597        return {
     1598            type: 'JSXClosingFragment',
     1599            start: buffer[position],
     1600            end: buffer[position + 1]
     1601        };
     1602    },
     1603    function jsxElement(position, buffer) {
     1604        const closingElementPosition = buffer[position + 4];
     1605        return {
     1606            type: 'JSXElement',
     1607            start: buffer[position],
     1608            end: buffer[position + 1],
     1609            openingElement: convertNode(buffer[position + 2], buffer),
     1610            children: convertNodeList(buffer[position + 3], buffer),
     1611            closingElement: closingElementPosition === 0 ? null : convertNode(closingElementPosition, buffer)
     1612        };
     1613    },
     1614    function jsxEmptyExpression(position, buffer) {
     1615        return {
     1616            type: 'JSXEmptyExpression',
     1617            start: buffer[position],
     1618            end: buffer[position + 1]
     1619        };
     1620    },
     1621    function jsxExpressionContainer(position, buffer) {
     1622        return {
     1623            type: 'JSXExpressionContainer',
     1624            start: buffer[position],
     1625            end: buffer[position + 1],
     1626            expression: convertNode(buffer[position + 2], buffer)
     1627        };
     1628    },
     1629    function jsxFragment(position, buffer) {
     1630        return {
     1631            type: 'JSXFragment',
     1632            start: buffer[position],
     1633            end: buffer[position + 1],
     1634            openingFragment: convertNode(buffer[position + 2], buffer),
     1635            children: convertNodeList(buffer[position + 3], buffer),
     1636            closingFragment: convertNode(buffer[position + 4], buffer)
     1637        };
     1638    },
     1639    function jsxIdentifier(position, buffer) {
     1640        return {
     1641            type: 'JSXIdentifier',
     1642            start: buffer[position],
     1643            end: buffer[position + 1],
     1644            name: buffer.convertString(buffer[position + 2])
     1645        };
     1646    },
     1647    function jsxMemberExpression(position, buffer) {
     1648        return {
     1649            type: 'JSXMemberExpression',
     1650            start: buffer[position],
     1651            end: buffer[position + 1],
     1652            object: convertNode(buffer[position + 2], buffer),
     1653            property: convertNode(buffer[position + 3], buffer)
     1654        };
     1655    },
     1656    function jsxNamespacedName(position, buffer) {
     1657        return {
     1658            type: 'JSXNamespacedName',
     1659            start: buffer[position],
     1660            end: buffer[position + 1],
     1661            namespace: convertNode(buffer[position + 2], buffer),
     1662            name: convertNode(buffer[position + 3], buffer)
     1663        };
     1664    },
     1665    function jsxOpeningElement(position, buffer) {
     1666        const flags = buffer[position + 2];
     1667        return {
     1668            type: 'JSXOpeningElement',
     1669            start: buffer[position],
     1670            end: buffer[position + 1],
     1671            selfClosing: (flags & 1) === 1,
     1672            name: convertNode(buffer[position + 3], buffer),
     1673            attributes: convertNodeList(buffer[position + 4], buffer)
     1674        };
     1675    },
     1676    function jsxOpeningFragment(position, buffer) {
     1677        return {
     1678            type: 'JSXOpeningFragment',
     1679            start: buffer[position],
     1680            end: buffer[position + 1],
     1681            attributes: [],
     1682            selfClosing: false
     1683        };
     1684    },
     1685    function jsxSpreadAttribute(position, buffer) {
     1686        return {
     1687            type: 'JSXSpreadAttribute',
     1688            start: buffer[position],
     1689            end: buffer[position + 1],
     1690            argument: convertNode(buffer[position + 2], buffer)
     1691        };
     1692    },
     1693    function jsxSpreadChild(position, buffer) {
     1694        return {
     1695            type: 'JSXSpreadChild',
     1696            start: buffer[position],
     1697            end: buffer[position + 1],
     1698            expression: convertNode(buffer[position + 2], buffer)
     1699        };
     1700    },
     1701    function jsxText(position, buffer) {
     1702        return {
     1703            type: 'JSXText',
     1704            start: buffer[position],
     1705            end: buffer[position + 1],
     1706            value: buffer.convertString(buffer[position + 2]),
     1707            raw: buffer.convertString(buffer[position + 3])
     1708        };
     1709    },
    15501710    function labeledStatement(position, buffer) {
    15511711        return {
     
    19412101        return EMPTY_ARRAY;
    19422102    const length = buffer[position++];
    1943     const list = [];
     2103    const list = new Array(length);
    19442104    for (let index = 0; index < length; index++) {
    19452105        const nodePosition = buffer[position++];
    1946         list.push(nodePosition ? convertNode(nodePosition, buffer) : null);
     2106        list[index] = nodePosition ? convertNode(nodePosition, buffer) : null;
    19472107    }
    19482108    return list;
     
    19702130}
    19712131
    1972 const parseAst = (input, { allowReturnOutsideFunction = false } = {}) => convertProgram(getAstBuffer(native_js.parse(input, allowReturnOutsideFunction)));
    1973 const parseAstAsync = async (input, { allowReturnOutsideFunction = false, signal } = {}) => convertProgram(getAstBuffer(await native_js.parseAsync(input, allowReturnOutsideFunction, signal)));
     2132const parseAst = (input, { allowReturnOutsideFunction = false, jsx = false } = {}) => convertProgram(getAstBuffer(native_js.parse(input, allowReturnOutsideFunction, jsx)));
     2133const parseAstAsync = async (input, { allowReturnOutsideFunction = false, jsx = false, signal } = {}) => convertProgram(getAstBuffer(await native_js.parseAsync(input, allowReturnOutsideFunction, jsx, signal)));
    19742134
    19752135exports.ANNOTATION_KEY = ANNOTATION_KEY;
     
    19922152exports.LOGLEVEL_WARN = LOGLEVEL_WARN;
    19932153exports.Literal = Literal;
     2154exports.ObjectExpression = ObjectExpression;
    19942155exports.Program = Program;
    19952156exports.Property = Property;
     
    19982159exports.TemplateLiteral = TemplateLiteral;
    19992160exports.URL_AVOIDING_EVAL = URL_AVOIDING_EVAL;
     2161exports.URL_GENERATEBUNDLE = URL_GENERATEBUNDLE;
     2162exports.URL_JSX = URL_JSX;
    20002163exports.URL_NAME_IS_NOT_EXPORTED = URL_NAME_IS_NOT_EXPORTED;
    20012164exports.URL_OUTPUT_AMD_BASEPATH = URL_OUTPUT_AMD_BASEPATH;
     
    20992262exports.logMissingFileOrDirOption = logMissingFileOrDirOption;
    21002263exports.logMissingGlobalName = logMissingGlobalName;
     2264exports.logMissingJsxExport = logMissingJsxExport;
    21012265exports.logMissingNameOptionForIifeExport = logMissingNameOptionForIifeExport;
    21022266exports.logMissingNameOptionForUmdExport = logMissingNameOptionForUmdExport;
     
    21132277exports.logPluginError = logPluginError;
    21142278exports.logRedeclarationError = logRedeclarationError;
     2279exports.logReservedNamespace = logReservedNamespace;
    21152280exports.logShimmedExport = logShimmedExport;
    21162281exports.logSourcemapBroken = logSourcemapBroken;
Note: See TracChangeset for help on using the changeset viewer.