@rollup/wasm-node 4.10.0 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/rollup +10 -4
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +1003 -153
- package/dist/es/shared/parseAst.js +90 -44
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +3 -3
- package/dist/parseAst.js +2 -2
- package/dist/rollup.d.ts +15 -4
- package/dist/rollup.js +3 -3
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/parseAst.js +108 -43
- package/dist/shared/rollup.js +1024 -174
- package/dist/shared/watch-cli.js +3 -3
- package/dist/shared/watch.js +2 -2
- package/dist/wasm-node/bindings_wasm_bg.wasm +0 -0
- package/package.json +15 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.12.0
|
|
4
|
+
Fri, 16 Feb 2024 13:31:42 GMT - commit 0146b84be33a8416b4df4b9382549a7ca19dd64a
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -10,6 +10,20 @@
|
|
|
10
10
|
import { parse, parseAsync } from '../../native.js';
|
|
11
11
|
import { resolve, basename, extname, dirname } from 'node:path';
|
|
12
12
|
|
|
13
|
+
const ArrowFunctionExpression = 'ArrowFunctionExpression';
|
|
14
|
+
const BlockStatement = 'BlockStatement';
|
|
15
|
+
const CallExpression = 'CallExpression';
|
|
16
|
+
const CatchClause = 'CatchClause';
|
|
17
|
+
const ExpressionStatement = 'ExpressionStatement';
|
|
18
|
+
const Identifier = 'Identifier';
|
|
19
|
+
const Literal = 'Literal';
|
|
20
|
+
const PanicError = 'PanicError';
|
|
21
|
+
const ParseError = 'ParseError';
|
|
22
|
+
const Program = 'Program';
|
|
23
|
+
const Property = 'Property';
|
|
24
|
+
const ReturnStatement = 'ReturnStatement';
|
|
25
|
+
const TemplateLiteral = 'TemplateLiteral';
|
|
26
|
+
|
|
13
27
|
const FIXED_STRINGS = [
|
|
14
28
|
'var',
|
|
15
29
|
'let',
|
|
@@ -73,6 +87,28 @@ const FIXED_STRINGS = [
|
|
|
73
87
|
'noSideEffects'
|
|
74
88
|
];
|
|
75
89
|
|
|
90
|
+
const ANNOTATION_KEY = '_rollupAnnotations';
|
|
91
|
+
const INVALID_ANNOTATION_KEY = '_rollupRemoved';
|
|
92
|
+
const convertAnnotations = (position, buffer) => {
|
|
93
|
+
const length = buffer[position++];
|
|
94
|
+
const list = [];
|
|
95
|
+
for (let index = 0; index < length; index++) {
|
|
96
|
+
list.push(convertAnnotation(buffer[position++], buffer));
|
|
97
|
+
}
|
|
98
|
+
return list;
|
|
99
|
+
};
|
|
100
|
+
const convertAnnotation = (position, buffer) => {
|
|
101
|
+
const start = buffer[position++];
|
|
102
|
+
const end = buffer[position++];
|
|
103
|
+
const type = FIXED_STRINGS[buffer[position]];
|
|
104
|
+
return { end, start, type };
|
|
105
|
+
};
|
|
106
|
+
const convertString = (position, buffer, readString) => {
|
|
107
|
+
const length = buffer[position++];
|
|
108
|
+
const bytePosition = position << 2;
|
|
109
|
+
return readString(bytePosition, length);
|
|
110
|
+
};
|
|
111
|
+
|
|
76
112
|
/** @typedef {import('./types').Location} Location */
|
|
77
113
|
|
|
78
114
|
/**
|
|
@@ -333,11 +369,12 @@ const URL_TREESHAKE_MODULESIDEEFFECTS = 'configuration-options/#treeshake-module
|
|
|
333
369
|
const URL_WATCH = 'configuration-options/#watch';
|
|
334
370
|
|
|
335
371
|
function error(base) {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
372
|
+
throw base instanceof Error ? base : getRollupEror(base);
|
|
373
|
+
}
|
|
374
|
+
function getRollupEror(base) {
|
|
375
|
+
const errorInstance = Object.assign(new Error(base.message), base);
|
|
376
|
+
Object.defineProperty(errorInstance, 'name', { value: 'RollupError', writable: true });
|
|
377
|
+
return errorInstance;
|
|
341
378
|
}
|
|
342
379
|
function augmentCodeLocation(properties, pos, source, id) {
|
|
343
380
|
if (typeof pos === 'object') {
|
|
@@ -360,7 +397,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
360
397
|
}
|
|
361
398
|
// Error codes should be sorted alphabetically while errors should be sorted by
|
|
362
399
|
// error code below
|
|
363
|
-
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', CYCLIC_CROSS_CHUNK_REEXPORT = 'CYCLIC_CROSS_CHUNK_REEXPORT', DEPRECATED_FEATURE = 'DEPRECATED_FEATURE', DUPLICATE_ARGUMENT_NAME = 'DUPLICATE_ARGUMENT_NAME', DUPLICATE_EXPORT = 'DUPLICATE_EXPORT', 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', 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_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_EXPORT = 'MISSING_EXPORT', 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', 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';
|
|
400
|
+
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_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', 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_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_EXPORT = 'MISSING_EXPORT', 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', 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';
|
|
364
401
|
function logAddonNotGenerated(message, hook, plugin) {
|
|
365
402
|
return {
|
|
366
403
|
code: ADDON_ERROR,
|
|
@@ -476,6 +513,12 @@ function logDeprecation(deprecation, urlSnippet, plugin) {
|
|
|
476
513
|
...(plugin ? { plugin } : {})
|
|
477
514
|
};
|
|
478
515
|
}
|
|
516
|
+
function logConstVariableReassignError() {
|
|
517
|
+
return {
|
|
518
|
+
code: CONST_REASSIGN,
|
|
519
|
+
message: 'Cannot reassign a variable declared with `const`'
|
|
520
|
+
};
|
|
521
|
+
}
|
|
479
522
|
function logDuplicateArgumentNameError(name) {
|
|
480
523
|
return { code: DUPLICATE_ARGUMENT_NAME, message: `Duplicate argument name "${name}"` };
|
|
481
524
|
}
|
|
@@ -959,21 +1002,43 @@ function warnDeprecationWithOptions(deprecation, urlSnippet, activeDeprecation,
|
|
|
959
1002
|
|
|
960
1003
|
// This file is generated by scripts/generate-ast-converters.js.
|
|
961
1004
|
// Do not edit this file directly.
|
|
962
|
-
const ANNOTATION_KEY = '_rollupAnnotations';
|
|
963
|
-
const INVALID_ANNOTATION_KEY = '_rollupRemoved';
|
|
964
1005
|
function convertProgram(buffer, readString) {
|
|
965
|
-
|
|
1006
|
+
const node = convertNode(0, new Uint32Array(buffer), readString);
|
|
1007
|
+
switch (node.type) {
|
|
1008
|
+
case PanicError: {
|
|
1009
|
+
return error(getRollupEror(logParseError(node.message)));
|
|
1010
|
+
}
|
|
1011
|
+
case ParseError: {
|
|
1012
|
+
return error(getRollupEror(logParseError(node.message, node.start)));
|
|
1013
|
+
}
|
|
1014
|
+
default: {
|
|
1015
|
+
return node;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
966
1018
|
}
|
|
967
1019
|
/* eslint-disable sort-keys */
|
|
968
1020
|
const nodeConverters = [
|
|
969
|
-
function
|
|
970
|
-
const
|
|
1021
|
+
function panicError(position, buffer, readString) {
|
|
1022
|
+
const start = buffer[position++];
|
|
1023
|
+
const end = buffer[position++];
|
|
971
1024
|
const message = convertString(position, buffer, readString);
|
|
972
|
-
|
|
1025
|
+
return {
|
|
1026
|
+
type: 'PanicError',
|
|
1027
|
+
start,
|
|
1028
|
+
end,
|
|
1029
|
+
message
|
|
1030
|
+
};
|
|
973
1031
|
},
|
|
974
|
-
function
|
|
1032
|
+
function parseError(position, buffer, readString) {
|
|
1033
|
+
const start = buffer[position++];
|
|
1034
|
+
const end = buffer[position++];
|
|
975
1035
|
const message = convertString(position, buffer, readString);
|
|
976
|
-
|
|
1036
|
+
return {
|
|
1037
|
+
type: 'ParseError',
|
|
1038
|
+
start,
|
|
1039
|
+
end,
|
|
1040
|
+
message
|
|
1041
|
+
};
|
|
977
1042
|
},
|
|
978
1043
|
function arrayExpression(position, buffer, readString) {
|
|
979
1044
|
const start = buffer[position++];
|
|
@@ -1674,8 +1739,8 @@ const nodeConverters = [
|
|
|
1674
1739
|
const start = buffer[position++];
|
|
1675
1740
|
const end = buffer[position++];
|
|
1676
1741
|
const flags = buffer[position++];
|
|
1677
|
-
const
|
|
1678
|
-
const
|
|
1742
|
+
const isStatic = (flags & 1) === 1;
|
|
1743
|
+
const computed = (flags & 2) === 2;
|
|
1679
1744
|
const value = convertNode(buffer[position++], buffer, readString);
|
|
1680
1745
|
const kind = FIXED_STRINGS[buffer[position++]];
|
|
1681
1746
|
const key = convertNode(position, buffer, readString);
|
|
@@ -1683,8 +1748,8 @@ const nodeConverters = [
|
|
|
1683
1748
|
type: 'MethodDefinition',
|
|
1684
1749
|
start,
|
|
1685
1750
|
end,
|
|
1686
|
-
computed,
|
|
1687
1751
|
static: isStatic,
|
|
1752
|
+
computed,
|
|
1688
1753
|
key,
|
|
1689
1754
|
value,
|
|
1690
1755
|
kind
|
|
@@ -1741,14 +1806,14 @@ const nodeConverters = [
|
|
|
1741
1806
|
function program(position, buffer, readString) {
|
|
1742
1807
|
const start = buffer[position++];
|
|
1743
1808
|
const end = buffer[position++];
|
|
1744
|
-
const
|
|
1809
|
+
const invalidAnnotations = convertAnnotations(buffer[position++], buffer);
|
|
1745
1810
|
const body = convertNodeList(position, buffer, readString);
|
|
1746
1811
|
return {
|
|
1747
1812
|
type: 'Program',
|
|
1748
1813
|
start,
|
|
1749
1814
|
end,
|
|
1750
1815
|
body,
|
|
1751
|
-
...(
|
|
1816
|
+
...(invalidAnnotations.length > 0 ? { [INVALID_ANNOTATION_KEY]: invalidAnnotations } : {}),
|
|
1752
1817
|
sourceType: 'module'
|
|
1753
1818
|
};
|
|
1754
1819
|
},
|
|
@@ -1778,8 +1843,8 @@ const nodeConverters = [
|
|
|
1778
1843
|
const start = buffer[position++];
|
|
1779
1844
|
const end = buffer[position++];
|
|
1780
1845
|
const flags = buffer[position++];
|
|
1781
|
-
const
|
|
1782
|
-
const
|
|
1846
|
+
const isStatic = (flags & 1) === 1;
|
|
1847
|
+
const computed = (flags & 2) === 2;
|
|
1783
1848
|
const valuePosition = buffer[position++];
|
|
1784
1849
|
const value = valuePosition === 0 ? null : convertNode(valuePosition, buffer, readString);
|
|
1785
1850
|
const key = convertNode(position, buffer, readString);
|
|
@@ -1787,8 +1852,8 @@ const nodeConverters = [
|
|
|
1787
1852
|
type: 'PropertyDefinition',
|
|
1788
1853
|
start,
|
|
1789
1854
|
end,
|
|
1790
|
-
computed,
|
|
1791
1855
|
static: isStatic,
|
|
1856
|
+
computed,
|
|
1792
1857
|
key,
|
|
1793
1858
|
value
|
|
1794
1859
|
};
|
|
@@ -2069,25 +2134,6 @@ function convertNodeList(position, buffer, readString) {
|
|
|
2069
2134
|
}
|
|
2070
2135
|
return list;
|
|
2071
2136
|
}
|
|
2072
|
-
const convertAnnotations = (position, buffer) => {
|
|
2073
|
-
const length = buffer[position++];
|
|
2074
|
-
const list = [];
|
|
2075
|
-
for (let index = 0; index < length; index++) {
|
|
2076
|
-
list.push(convertAnnotation(buffer[position++], buffer));
|
|
2077
|
-
}
|
|
2078
|
-
return list;
|
|
2079
|
-
};
|
|
2080
|
-
const convertAnnotation = (position, buffer) => {
|
|
2081
|
-
const start = buffer[position++];
|
|
2082
|
-
const end = buffer[position++];
|
|
2083
|
-
const type = FIXED_STRINGS[buffer[position]];
|
|
2084
|
-
return { end, start, type };
|
|
2085
|
-
};
|
|
2086
|
-
const convertString = (position, buffer, readString) => {
|
|
2087
|
-
const length = buffer[position++];
|
|
2088
|
-
const bytePosition = position << 2;
|
|
2089
|
-
return readString(bytePosition, length);
|
|
2090
|
-
};
|
|
2091
2137
|
|
|
2092
2138
|
function getReadStringFunction(astBuffer) {
|
|
2093
2139
|
if (typeof Buffer !== 'undefined' && astBuffer instanceof Buffer) {
|
|
@@ -2112,4 +2158,4 @@ const parseAstAsync = async (input, { allowReturnOutsideFunction = false, signal
|
|
|
2112
2158
|
return convertProgram(astBuffer.buffer, getReadStringFunction(astBuffer));
|
|
2113
2159
|
};
|
|
2114
2160
|
|
|
2115
|
-
export { ANNOTATION_KEY, INVALID_ANNOTATION_KEY, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, addTrailingSlashIfMissed, augmentCodeLocation, error, getAliasName, getImportPath, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logOptimizeChunkStatus, logPluginError, logRedeclarationError, logShimmedExport, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
|
|
2161
|
+
export { ANNOTATION_KEY, ArrowFunctionExpression, BlockStatement, CallExpression, CatchClause, ExpressionStatement, FIXED_STRINGS, INVALID_ANNOTATION_KEY, Identifier, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_INFO, LOGLEVEL_WARN, Literal, Program, Property, ReturnStatement, TemplateLiteral, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_AMD_ID, URL_OUTPUT_DIR, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, URL_OUTPUT_FORMAT, URL_OUTPUT_GENERATEDCODE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_OUTPUT_INTEROP, URL_OUTPUT_MANUALCHUNKS, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_SOURCEMAPFILE, URL_PRESERVEENTRYSIGNATURES, URL_TREESHAKE, URL_TREESHAKE_MODULESIDEEFFECTS, URL_WATCH, addTrailingSlashIfMissed, augmentCodeLocation, convertAnnotations, convertNode, convertString, error, getAliasName, getImportPath, getReadStringFunction, getRollupEror, isAbsolute, isPathFragment, isRelative, isValidUrl, locate, logAddonNotGenerated, logAlreadyClosed, logAmbiguousExternalNamespaces, logAnonymousPluginCache, logAssetNotFinalisedForFileName, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logBadLoader, logCannotAssignModuleToChunk, logCannotCallNamespace, logCannotEmitFromOptionsHook, logChunkInvalid, logChunkNotGeneratedForFileName, logCircularDependency, logCircularReexport, logConflictingSourcemapSources, logConstVariableReassignError, logCyclicCrossChunkReexport, logDuplicateArgumentNameError, logDuplicateExportError, logDuplicatePluginName, logEmptyChunk, logEntryCannotBeExternal, logEval, logExternalModulesCannotBeIncludedInManualChunks, logExternalModulesCannotBeTransformedToModules, logExternalSyntheticExports, logFailedValidation, logFileNameConflict, logFileReferenceIdNotFoundForFilename, logFirstSideEffect, logIllegalIdentifierAsName, logIllegalImportReassignment, logImplicitDependantCannotBeExternal, logImplicitDependantIsNotIncluded, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logIncompatibleExportOptionValue, logInconsistentImportAttributes, logInputHookInOutputPlugin, logInternalIdCannotBeExternal, logInvalidAddonPluginHook, logInvalidAnnotation, logInvalidExportOptionValue, logInvalidFormatForTopLevelAwait, logInvalidFunctionPluginHook, logInvalidLogPosition, logInvalidOption, logInvalidRollupPhaseForChunkEmission, logInvalidSetAssetSourceCall, logInvalidSourcemapForError, logLevelPriority, logMissingEntryExport, logMissingExport, logMissingFileOrDirOption, logMissingGlobalName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, logMissingNodeBuiltins, logMixedExport, logModuleLevelDirective, logModuleParseError, logNamespaceConflict, logNoAssetSourceSet, logNoTransformMapOrAstWithoutCode, logOptimizeChunkStatus, logParseError, logPluginError, logRedeclarationError, logShimmedExport, logSourcemapBroken, logSyntheticNamedExportsNeedNamespaceExport, logThisIsUndefined, logUnexpectedNamedImport, logUnexpectedNamespaceReexport, logUnknownOption, logUnresolvedEntry, logUnresolvedImplicitDependant, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logUnusedExternalImports, normalize, parseAst, parseAstAsync, printQuotedStringList, relative, relativeId, warnDeprecation };
|
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.12.0
|
|
4
|
+
Fri, 16 Feb 2024 13:31:42 GMT - commit 0146b84be33a8416b4df4b9382549a7ca19dd64a
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -20,8 +20,8 @@ require('./shared/parseAst.js');
|
|
|
20
20
|
const loadConfigFile_js = require('./shared/loadConfigFile.js');
|
|
21
21
|
require('tty');
|
|
22
22
|
require('path');
|
|
23
|
-
require('node:perf_hooks');
|
|
24
23
|
require('./native.js');
|
|
24
|
+
require('node:perf_hooks');
|
|
25
25
|
require('./getLogFilter.js');
|
|
26
26
|
|
|
27
27
|
|
package/dist/parseAst.js
CHANGED
package/dist/rollup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Program } from 'estree';
|
|
1
|
+
import type { Node as EstreeNode, Program } from 'estree';
|
|
2
2
|
|
|
3
3
|
export const VERSION: string;
|
|
4
4
|
|
|
@@ -725,6 +725,7 @@ export interface OutputOptions {
|
|
|
725
725
|
plugins?: OutputPluginOption;
|
|
726
726
|
preserveModules?: boolean;
|
|
727
727
|
preserveModulesRoot?: string;
|
|
728
|
+
reexportProtoFromExternal?: boolean;
|
|
728
729
|
sanitizeFileName?: boolean | ((fileName: string) => string);
|
|
729
730
|
sourcemap?: boolean | 'inline' | 'hidden';
|
|
730
731
|
sourcemapBaseUrl?: string;
|
|
@@ -776,6 +777,7 @@ export interface NormalizedOutputOptions {
|
|
|
776
777
|
plugins: OutputPlugin[];
|
|
777
778
|
preserveModules: boolean;
|
|
778
779
|
preserveModulesRoot: string | undefined;
|
|
780
|
+
reexportProtoFromExternal: boolean;
|
|
779
781
|
sanitizeFileName: (fileName: string) => string;
|
|
780
782
|
sourcemap: boolean | 'inline' | 'hidden';
|
|
781
783
|
sourcemapBaseUrl: string | undefined;
|
|
@@ -977,13 +979,22 @@ export type RollupWatcher = AwaitingEventEmitter<{
|
|
|
977
979
|
|
|
978
980
|
export function watch(config: RollupWatchOptions | RollupWatchOptions[]): RollupWatcher;
|
|
979
981
|
|
|
980
|
-
interface
|
|
982
|
+
interface AstNodeLocation {
|
|
981
983
|
end: number;
|
|
982
984
|
start: number;
|
|
983
|
-
type: string;
|
|
984
985
|
}
|
|
985
986
|
|
|
986
|
-
type
|
|
987
|
+
type OmittedEstreeKeys =
|
|
988
|
+
| 'loc'
|
|
989
|
+
| 'range'
|
|
990
|
+
| 'leadingComments'
|
|
991
|
+
| 'trailingComments'
|
|
992
|
+
| 'innerComments'
|
|
993
|
+
| 'comments';
|
|
994
|
+
type RollupAstNode<T> = Omit<T, OmittedEstreeKeys> & AstNodeLocation;
|
|
995
|
+
|
|
996
|
+
type ProgramNode = RollupAstNode<Program>;
|
|
997
|
+
export type AstNode = RollupAstNode<EstreeNode>;
|
|
987
998
|
|
|
988
999
|
export function defineConfig(options: RollupOptions): RollupOptions;
|
|
989
1000
|
export function defineConfig(options: RollupOptions[]): RollupOptions[];
|
package/dist/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
|
|
3
|
+
Rollup.js v4.12.0
|
|
4
|
+
Fri, 16 Feb 2024 13:31:42 GMT - commit 0146b84be33a8416b4df4b9382549a7ca19dd64a
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -18,8 +18,8 @@ require('node:process');
|
|
|
18
18
|
require('tty');
|
|
19
19
|
require('node:path');
|
|
20
20
|
require('path');
|
|
21
|
-
require('node:perf_hooks');
|
|
22
21
|
require('./native.js');
|
|
22
|
+
require('node:perf_hooks');
|
|
23
23
|
require('node:fs/promises');
|
|
24
24
|
|
|
25
25
|
class WatchEmitter {
|
package/dist/shared/index.js
CHANGED