This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
[Snyk] Upgrade rollup from 1.32.0 to 2.0.0 #21
Merged
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.
Snyk has created this PR to upgrade rollup from 1.32.0 to 2.0.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.Warning: This is a major version upgrade, and may be a breaking change.
Release notes
Package name: rollup
2020-03-06
For the detailed release notes, see below.
After one year finally a new major:
🎉🕺💃 Welcome [email protected]! 🎇🎆
As any major, it is first and foremost about getting rid of old, deprecated, rotting and smelling stuff. But there are some cool things hidden as well…
Rollup has always been rather small, but we are now back to zero dependencies and 2.5 MB install size! This also means: No hidden TS type dependencies any more that smuggle Node types into your AMD setup. Sorry about this. Fixed.
Watch mode: Always not quite perfect in Rollup. So we decided to bundle chokidar as the watch option for everyone. This makes it simpler for us, but should bring improvements for everyone. Chokidar IS the gold standard here!
This is really the hidden gem here if you do code-splitting: Rollup now uses side-effect detection to not only avoid unnecessary empty imports, it will also create much better chunks. Check out the examples here: #3369
For those living in the future: Rollup can now be imported in Node as an ES-Module—without a bundler: #3391
And for all those Stencils out there who are rebundling Rollup: Rollup is now shipping ES2018 code and has also been restructured via code-splitting so that watch mode and CLI are nicely separate but reuse shared code so you only pull in what you really need.
🕵️♂️But here the details:
Breaking Changes
Rollup now requires at least Node 10 to run, or a sufficiently modern browser (#3346)
The file structure of Rollup's ESM builds has changed:
rollup/dist/es/rollup.js
instead ofrollup/dist/rollup.es.js
rollup/dist/es/rollup.browser.js
instead ofrollup/dist/rollup.browser.es.js
In general, the ESM builds now follow the same naming scheme as the CJS builds but are located in the
rollup/dist/es
subfolder instead ofrollup/dist
(#3391)The "watch.chokidar" option no longer accepts a
boolean
value but only an object of parameters that is passed to the bundled Chokidar instance. Chokidar installations by the user will be ignored in favour of the bundled instance (#3331)Modules that are completely tree-shaken will no longer be listed as part of any chunks in
generateBundle
The
experimentalOptimizeChunks
andchunkGroupingSize
options have been removedacorn plugins can only be used if they accept a passed-in acorn instance instead of importing it themselves. See acornjs/acorn#870 (comment) for what needs to be done to make plugins compatible that do not support this yet (#3391)
Emitted chunks now have the TypeScript type
UInt8Array
instead ofBuffer
. ABuffer
can still be used, though (#3395)The TypeScript types no longer use ESTree types for AST nodes but a very generic type that does not contain information specific to certain node types (#3395)
The signature of the
writeBundle
plugin hook has been changed to matchgenerateBundle
: The bundle object is now passed as second parameter instead of first and the first parameter is the output options (#3361)The following plugin hooks have been removed:
generateBundle
insteadwriteBundle
insteadrenderChunk
insteadrenderChunk
insteadYou can no longer access
this.watcher
on the plugin context.The
transform
hook can no longer returndependencies
.The
treeshake.pureExternalModules
option will now show a deprecation warning when used: usetreeshake.moduleSideEffects: 'no-external'
insteadUsing
import.meta.ROLLUP_ASSET_URL_<..>
andimport.meta.ROLLUP_CHUNK_URL_<..>
in code will now show warnings: useimport.meta.ROLLUP_FILE_URL_<..>
insteadThe
resolveAssetUrl
hook will now show a deprecation warning when used: useresolveFileUrl
insteadThe following plugin context functions will show warnings when used:
this.emitAsset
: usethis.emitFile
this.emitChunk
: usethis.emitFile
this.getAssetFileName
: usethis.getFileName
this.getChunkFileName
: usethis.getFileName
this.isExternal
: usethis.resolve
this.resolveId
: usethis.resolve
Directly adding properties to the bundle object in the
generateBundle
is deprecated will show a warning (removing properties is allowed, though): Usethis.emitFile
Accessing
chunk.isAsset
on the bundle is deprecated: Usechunk.type === 'asset'
insteadThe error code for a missing
name
property when targeting UMD has been changed toMISSING_NAME_OPTION_FOR_IIFE_EXPORT
to emphasize this is needed for the IIFE part of UMD (#3393)Features
import {rollup} from 'rollup'
. Note that this relies on Node's experimental conditional package exports feature and is therefore itself experimental (#3391)systemjs
can be used as format alias forsystem
(#3381)Bug Fixes
Pull Requests
@types
dependencies (@lukastaegert)2.0.0-2
2.0.0-1
2.0.0-0
2020-03-06
Bug Fixes
Pull Requests
2020-02-28
Features
--plugin <plugin>
(#3379)Pull Requests
Commit messages
Package name: rollup
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs