Merged
Conversation
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#release-3.0.0or load it into the REPL: |
Codecov Report
@@ Coverage Diff @@
## master #4549 +/- ##
==========================================
+ Coverage 98.87% 99.06% +0.18%
==========================================
Files 211 214 +3
Lines 7384 7554 +170
Branches 2107 2096 -11
==========================================
+ Hits 7301 7483 +182
+ Misses 27 23 -4
+ Partials 56 48 -8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
ca1bd42 to
490b49b
Compare
Member
Author
|
Feedback about specific changes should go to the pull requests listed above. |
48ce34d to
11ee71f
Compare
b54ae56 to
7bdd7c5
Compare
Member
Author
|
Just released a new beta. This changes some defaults and finally makes changing file names in preserveModules a lot saner. |
13b0ef8 to
46910f4
Compare
32dfb1e to
4c3b1a4
Compare
c322542 to
28e8a5d
Compare
71c12c3 to
3926096
Compare
Member
Author
|
With the latest pre-release 3.0.0-5, Rollup 3 is now feature complete. In the next week(s), we will start taking a look at the plugin eco system. cc @patak-dev @antfu |
1020537 to
a59e5e1
Compare
6ce8096 to
2477228
Compare
* [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Initial new hashing idea * Simplify external import path generation 197 broken tests left * Use correct file names in chunk info 197 broken tests left * Implement first draft for hashing algorithm 189 broken tests left * Remove active deprecations this.emitAsset this.emitChunk this.getAssetFileName this.getChunkFileName import.meta.ROLLUP_ASSET_URL_ import.meta.ROLLUP_CHUNK_URL_ * Reduce render parameters * Always scan all chunks for hashes * Fix asset emission and remaining tests * Reintroduce augmentChunkHash and get OutputChunk by converting RenderedChunk * Provide chunk graph in renderChunk * Handle hash collisions * Remove deprecated hacky asset emission * Allow to configure hash sizes per file * Update documentation * Extend tests * Minor improvements * Improve documentation about hashing * Replace hash in sourcemap file * Provide ChunkInfo in banner/footer/intro/outro * Extract hashing logic * Clean up hashing logic * Add ExternalChunk wrapper * Store inputBase on Chunk * Store snippets on Chunk * Align chunk interfaces * Reduce this. property access * Move dynamicImportFunction warning to options normalization * Restructure rendering logic * Do not run on Node 10 * Update documentation * Try to fix Windows tests * Improve coverage * Remove graph background colors 3.0.0-0 * [v3.0] Change default for output.generatedCode.reservedNamesAsProps (#4568) * [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Initial new hashing idea * Simplify external import path generation 197 broken tests left * Use correct file names in chunk info 197 broken tests left * Implement first draft for hashing algorithm 189 broken tests left * Remove active deprecations this.emitAsset this.emitChunk this.getAssetFileName this.getChunkFileName import.meta.ROLLUP_ASSET_URL_ import.meta.ROLLUP_CHUNK_URL_ * Reduce render parameters * Always scan all chunks for hashes * Fix asset emission and remaining tests * Reintroduce augmentChunkHash and get OutputChunk by converting RenderedChunk * Provide chunk graph in renderChunk * Handle hash collisions * Remove deprecated hacky asset emission * Allow to configure hash sizes per file * Update documentation * Extend tests * Minor improvements * Improve documentation about hashing * Replace hash in sourcemap file * Provide ChunkInfo in banner/footer/intro/outro * Extract hashing logic * Clean up hashing logic * Add ExternalChunk wrapper * Store inputBase on Chunk * Store snippets on Chunk * Align chunk interfaces * Reduce this. property access * Move dynamicImportFunction warning to options normalization * Restructure rendering logic * Do not run on Node 10 * Update documentation * Try to fix Windows tests * Improve coverage * Remove graph background colors 3.0.0-0 * Rework warnings and errors * Refine some error messages * Reduce number of different props of errors * All errors are declared in error.ts * Use name RollupError for errors that do not have a cause * Extend documentation
* [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Initial new hashing idea * Simplify external import path generation 197 broken tests left * Use correct file names in chunk info 197 broken tests left * Implement first draft for hashing algorithm 189 broken tests left * Remove active deprecations this.emitAsset this.emitChunk this.getAssetFileName this.getChunkFileName import.meta.ROLLUP_ASSET_URL_ import.meta.ROLLUP_CHUNK_URL_ * Reduce render parameters * Always scan all chunks for hashes * Fix asset emission and remaining tests * Reintroduce augmentChunkHash and get OutputChunk by converting RenderedChunk * Provide chunk graph in renderChunk * Handle hash collisions * Remove deprecated hacky asset emission * Allow to configure hash sizes per file * Update documentation * Extend tests * Minor improvements * Improve documentation about hashing * Replace hash in sourcemap file * Provide ChunkInfo in banner/footer/intro/outro * Extract hashing logic * Clean up hashing logic * Add ExternalChunk wrapper * Store inputBase on Chunk * Store snippets on Chunk * Align chunk interfaces * Reduce this. property access * Move dynamicImportFunction warning to options normalization * Restructure rendering logic * Do not run on Node 10 * Update documentation * Try to fix Windows tests * Improve coverage * Remove graph background colors 3.0.0-0 * Set up browser build * Generate commithash inline * Remove execa * Chmod executable from rollup config * Adjust pkg.files * Copy types into build * Work on release script * Continue work on release script * Continue work on release script * Finish release script * Push correct REPL artefacts * Add comments to released PRs and issues * fixup! [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Add Rollup-in-browser example
* [v3.0] Use named export for loadConfigFile * Only expose files in dist with their full names * Move browser sources to src subfolder 3.0.0-3 Fix release script
* [v3.0] Deprecate Node 12 (#4548) * [v3.0] Remove actively deprecated features, show warnings for other deprecated features (#4552) * Remove all active deprecations * Make all inactive deprecations active * Try to make test more stable * Update CLI help screen * [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Initial new hashing idea * Simplify external import path generation 197 broken tests left * Use correct file names in chunk info 197 broken tests left * Implement first draft for hashing algorithm 189 broken tests left * Remove active deprecations this.emitAsset this.emitChunk this.getAssetFileName this.getChunkFileName import.meta.ROLLUP_ASSET_URL_ import.meta.ROLLUP_CHUNK_URL_ * Reduce render parameters * Always scan all chunks for hashes * Fix asset emission and remaining tests * Reintroduce augmentChunkHash and get OutputChunk by converting RenderedChunk * Provide chunk graph in renderChunk * Handle hash collisions * Remove deprecated hacky asset emission * Allow to configure hash sizes per file * Update documentation * Extend tests * Minor improvements * Improve documentation about hashing * Replace hash in sourcemap file * Provide ChunkInfo in banner/footer/intro/outro * Extract hashing logic * Clean up hashing logic * Add ExternalChunk wrapper * Store inputBase on Chunk * Store snippets on Chunk * Align chunk interfaces * Reduce this. property access * Move dynamicImportFunction warning to options normalization * Restructure rendering logic * Do not run on Node 10 * Update documentation * Try to fix Windows tests * Improve coverage * Remove graph background colors 3.0.0-0 * [v3.0] Run output plugins last (#3846) * fix: run output plugins last * Add test Co-authored-by: Lukas Taegert-Atkinson <lukas.taegert-atkinson@tngtech.com> * [v3.0] Convert build scripts to ESM, update dependencies (#4558) * Convert scripts to ESM, update dependencies * Fix lint issue 3.0.0-1 * [v3.0] Better esm config file support (#4574) * More precise native ESM support check * Use import to load .js config file if package type is module * Update and add tests handling type module * Remove Node version check and simplify logic * Update documentation * Document how to replace __dirname and import JSON Co-authored-by: Linus Miller <linus.miller@bitmill.io> * [v3.0] Rework file name patterns when preserving modules (#4565) * Put preserveModules path into Chunk name * Use regular entryFileNames logic * Clarify documentation for `preserveModules` * Improve coverage * Improve wording in docs * [v3.0] Show deprecation warning for maxParallelFileReads (#4575) * [v3.0] Restructure timings (#4566) * [v3.0] Change default for makeAbsoluteExternalsRelative (#4567) * [v3.0] Change default for output.generatedCode.reservedNamesAsProps (#4568) * [v3.0] Change default for preserveEntrySignatures to exports-only (#4576) * Port doc changes from #4572 and #4583 to 3.0 (#4592) * [v3.0] Refine errors and warnings (#4579) * [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Initial new hashing idea * Simplify external import path generation 197 broken tests left * Use correct file names in chunk info 197 broken tests left * Implement first draft for hashing algorithm 189 broken tests left * Remove active deprecations this.emitAsset this.emitChunk this.getAssetFileName this.getChunkFileName import.meta.ROLLUP_ASSET_URL_ import.meta.ROLLUP_CHUNK_URL_ * Reduce render parameters * Always scan all chunks for hashes * Fix asset emission and remaining tests * Reintroduce augmentChunkHash and get OutputChunk by converting RenderedChunk * Provide chunk graph in renderChunk * Handle hash collisions * Remove deprecated hacky asset emission * Allow to configure hash sizes per file * Update documentation * Extend tests * Minor improvements * Improve documentation about hashing * Replace hash in sourcemap file * Provide ChunkInfo in banner/footer/intro/outro * Extract hashing logic * Clean up hashing logic * Add ExternalChunk wrapper * Store inputBase on Chunk * Store snippets on Chunk * Align chunk interfaces * Reduce this. property access * Move dynamicImportFunction warning to options normalization * Restructure rendering logic * Do not run on Node 10 * Update documentation * Try to fix Windows tests * Improve coverage * Remove graph background colors 3.0.0-0 * [v3.0] Change default for output.generatedCode.reservedNamesAsProps (#4568) * [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Initial new hashing idea * Simplify external import path generation 197 broken tests left * Use correct file names in chunk info 197 broken tests left * Implement first draft for hashing algorithm 189 broken tests left * Remove active deprecations this.emitAsset this.emitChunk this.getAssetFileName this.getChunkFileName import.meta.ROLLUP_ASSET_URL_ import.meta.ROLLUP_CHUNK_URL_ * Reduce render parameters * Always scan all chunks for hashes * Fix asset emission and remaining tests * Reintroduce augmentChunkHash and get OutputChunk by converting RenderedChunk * Provide chunk graph in renderChunk * Handle hash collisions * Remove deprecated hacky asset emission * Allow to configure hash sizes per file * Update documentation * Extend tests * Minor improvements * Improve documentation about hashing * Replace hash in sourcemap file * Provide ChunkInfo in banner/footer/intro/outro * Extract hashing logic * Clean up hashing logic * Add ExternalChunk wrapper * Store inputBase on Chunk * Store snippets on Chunk * Align chunk interfaces * Reduce this. property access * Move dynamicImportFunction warning to options normalization * Restructure rendering logic * Do not run on Node 10 * Update documentation * Try to fix Windows tests * Improve coverage * Remove graph background colors 3.0.0-0 * Rework warnings and errors * Refine some error messages * Reduce number of different props of errors * All errors are declared in error.ts * Use name RollupError for errors that do not have a cause * Extend documentation * [v3.0] Browser build (#4593) * [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Initial new hashing idea * Simplify external import path generation 197 broken tests left * Use correct file names in chunk info 197 broken tests left * Implement first draft for hashing algorithm 189 broken tests left * Remove active deprecations this.emitAsset this.emitChunk this.getAssetFileName this.getChunkFileName import.meta.ROLLUP_ASSET_URL_ import.meta.ROLLUP_CHUNK_URL_ * Reduce render parameters * Always scan all chunks for hashes * Fix asset emission and remaining tests * Reintroduce augmentChunkHash and get OutputChunk by converting RenderedChunk * Provide chunk graph in renderChunk * Handle hash collisions * Remove deprecated hacky asset emission * Allow to configure hash sizes per file * Update documentation * Extend tests * Minor improvements * Improve documentation about hashing * Replace hash in sourcemap file * Provide ChunkInfo in banner/footer/intro/outro * Extract hashing logic * Clean up hashing logic * Add ExternalChunk wrapper * Store inputBase on Chunk * Store snippets on Chunk * Align chunk interfaces * Reduce this. property access * Move dynamicImportFunction warning to options normalization * Restructure rendering logic * Do not run on Node 10 * Update documentation * Try to fix Windows tests * Improve coverage * Remove graph background colors 3.0.0-0 * Set up browser build * Generate commithash inline * Remove execa * Chmod executable from rollup config * Adjust pkg.files * Copy types into build * Work on release script * Continue work on release script * Continue work on release script * Finish release script * Push correct REPL artefacts * Add comments to released PRs and issues * fixup! [v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543) * Add Rollup-in-browser example * [v3.0] Use named export for loadConfigFile (#4581) * [v3.0] Use named export for loadConfigFile * Only expose files in dist with their full names * Move browser sources to src subfolder * 3.0.0-3 * Fix release script * [v3.0] Use "node:" prefix for imports of node builtins (#4596) * Support inline sourcemaps * Emit sourcemaps as assets and add comments before generateBundle Co-authored-by: Alec Larson <1925840+aleclarson@users.noreply.github.com> Co-authored-by: Linus Miller <linus.miller@bitmill.io> Co-authored-by: Bertrand Guay-Paquet <berniegp@gmail.com> 3.0.0-4
* Use a custom watch emitter implementation * Add documentation * Improve coverage
* Dummy commit * Change default for output.interop to "default", deprecate boolean and add "compat" * Add esModule: 'if-default-prop' and make it the default value * Statically resolve Symbol.toStringTag
* Support ES modules in bundles config files * Always try to load config files directly if possible * Fix build * Fix test * Debug test
3.0.0-5 Improve issue comment RegExp
* Use ASCII characters for hash placeholders * Back to 8 character hashes with base-64 encoding 3.0.0-6 Improve issue comment RegExp
a59e5e1 to
52d9ca2
Compare
BREAKING CHANGES: Typed array sources will no longer be deduplicated 3.0.0-7
* Support dynamic imports in cjs output and make default * Add documentation * Also use import for unresolvable dynamic imports * Extend CLI docs
* Add acorn support for import assertions and extend AST * Ignore pre-existing assertions on input files * Naive support for JSON assertions in output * Inject arbitrary import assertions * Allows to disable import assertions altogether via `false` * Support shorthand syntax for type assertions * Keep assertions on fully dynamic imports * Add documentation * Add assertions to types * Keep original assertions * Make option a boolean * Some extractions * Allow plugins to add and change assertions * Allow to pass assertions in this.resolve * Warn for inconsistent import assertions * Add new documentation * Improve coverage
0ae9bb5 to
3accf61
Compare
3accf61 to
d9237e8
Compare
Update packages before building Rollup for correct bundled version
dd3f2d6 to
f4faf31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
preserveModulesoption generatenode_modulesfolder #3684assert { type: 'json' }results in "Error: Unexpected token" #4530TRANSPILED_ESM_CONFIGprovides insufficient information #4616Description
This is the collection of everything that is included so far in the 3.0 release branch. Snapshots of this branch will be released as pre-release versions under the
betatag, i.e. to try it out, install Rollup viaBreaking Changes
General Changes
@rollup/browser([v3.0] Browser build #4593)node:prefix for imports of builtin modules ([v3.0] Use node: prefix for builtin imports #4596)this.emitAsset(): usethis.emitFile()this.emitChunk(): usethis.emitFile()this.getAssetFileName(): usethis.getFileName()this.getChunkFileName(): usethis.getFileName()this.isExternal(): usethis.resolve()this.resolveId(): usethis.resolve()resolveAssetUrlplugin hook has been removed: useresolveFileUrlassetReferenceIdorchunkReferenceIdparameters toresolveFileUrltreeshake.pureExternalModulesoption has been removed: usetreeshake.moduleSideEffects: 'no-external'trueorfalseforoutput.interop. As a replacement fortrue, you can use "compat"isAssetflag in the bundletype: "asset"fieldinlineDynamicImportsas part of the input options: useoutput. inlineDynamicImportsmanualChunksas part of the input options: useoutput. manualChunksmaxParallelFileReads: use `maxParallelFileOpsoutput.preferConst: useoutput.generatedCode.constBindingsoutput.dynamicImportFunction: use therenderDynamicImportplugin hookoutput.namespaceToStringTag: useoutput.generatedCode.symbolspreserveModulesas part of the input options: useoutput. preserveModulesthis.moduleIdsin plugins: usethis.getModuleIds()this.getModuleInfo(...).hasModuleSideEffectsin plugins: usethis.getModuleInfo(...).moduleSideEffects--configPluginor the--bundleConfigAsCjsoptions are used. The configuration is bundled to an ES module unless the--bundleConfigAsCjsoption is used. In all other cases, configuration is now loaded using Node's native mechanisms ([v3.0] Better esm config file support #4574 and [v3.0] Always try to load config files via Node if possible #4621)rollup/dist/*can only be required using their file extension ([v3.0] Use named export for loadConfigFile #4581)loadConfigFilehelper now has a named export of the same name instead of a default export ([v3.0] Use named export for loadConfigFile #4581)string([v3.0] Improve asset emission performance #4644)import(…)in commonjs output unlessoutput.dynamicImportInCjsis set to false ([v3.0] Keep dynamic imports in CommonJS output #4647)Changes to Rollup Options
output.banner/footer/intro/outroare now called per-chunk, they should be careful to avoid performance-heavy operations ([v3.0] New hashing algorithm that "fixes (nearly) everything" #4543)entryFileNames/chunkFileNamesfunctions now longer have access to the rendered module information viamodules, only to a list of includedmoduleIds([v3.0] New hashing algorithm that "fixes (nearly) everything" #4543)[name]placeholder (as well as thechunkInfo.nameproperty when using a function) now includes the relative path of the chunk as well as optionally the file extension if the extension is not one of.js,.jsx,.mjs,.cjs,.ts,.tsx,.mts, or.cts([v3.0] Rework file name patterns when preserving modules #4565)[ext],[extName]and[assetExtName]placeholders are no longer supported when preserving modules ([v3.0] Rework file name patterns when preserving modules #4565)perfoption no longer collects timings for the asynchronous part of plugin hooks as the readings were wildly inaccurate and very misleading, and timings are adapted to the new hashing algorithm ([v3.0] Restructure perf timings #4566)makeAbsoluteExternalsRelativeto "ifRelativeSource" so that absolute external imports will no longer become relative imports in the output, while relative external imports will still be renormalized ([v3.0] Change default for makeAbsoluteExternalsRelative #4567)output.generatedCode.reservedNamesAsPropsto no longer quote properties likedefaultby default ([v3.0] Change default for output.generatedCode.reservedNamesAsProps #4568)preserveEntrySignaturesto "exports-only" so that by default, empty facades for entry chunks are no longer created ([v3.0] Change default for preserveEntrySignatures to exports-only #4576)output.interopto "default" to better align with NodeJS interop ([v3.0] Improve interop defaults #4611)output.esModuleto "if-default-prop", which only adds __esModule when the default export would be a property ([v3.0] Improve interop defaults #4611)output.systemNullSetterstotrue, which requires at least SystemJS 6.3.3 ([v3.0] Change default for systemNullSetters #4649)Plugin API Changes
renderChunkshould make sure to updateChunkInfo.imports/importedBindings/exportsaccordingly ([v3.0] New hashing algorithm that "fixes (nearly) everything" #4543)renderChunknow contains names with hash placeholders instead of final names, which will be replaced when used in the returned code orChunkInfo.imports/importedBindings/exports([v3.0] New hashing algorithm that "fixes (nearly) everything" #4543 and [v3.0] Use ASCII characters for hash placeholders #4631)Features
output.banner/footer/intro/outroare now called per-chunk with some chunk information ([v3.0] New hashing algorithm that "fixes (nearly) everything" #4543)renderChunk([v3.0] New hashing algorithm that "fixes (nearly) everything" #4543)entryFileNameslogic is used and the path is included in the[name]property. This finally gives full control over file names when preserving modules ([v3.0] Rework file name patterns when preserving modules #4565)output.entryFileNamesnow also supports the[hash]placeholder when preserving modules ([v3.0] Rework file name patterns when preserving modules #4565)perfoption will now collect (synchronous) timings for all plugin hooks, not just a small selection ([v3.0] Restructure perf timings #4566)name: RollupErrornow to make clearer that those are custom error types ([v3.0] Refine errors and warnings #4579)generateBundleand sourcemap files are available as regular assets ([v3.0] Better sourcemap emission #4605)__esModulemarker to the bundle if there is a default export that is rendered as a property ([v3.0] Improve interop defaults #4611)foo[Symbol.toStringTag]to "Module" if foo is a namespace ([v3.0] Improve interop defaults #4611)--bundleConfigAsCjswhich will force the configuration to be bundled to CommonJS ([v3.0] Always try to load config files via Node if possible #4621)output.externalImportAssertionsoption allows to turn off emission of import assertions ([v3.0] Basic support for import assertions #4646)output.dynamicImportInCjsto control if dynamic imports are emitted asimport(…)or wrappedrequire(…)when generating commonjs output ([v3.0] Keep dynamic imports in CommonJS output #4647)Bug Fixes
renderChunk, e.g. minification, into account ([v3.0] New hashing algorithm that "fixes (nearly) everything" #4543)Pull Requests