For the detailed release notes, see below.
After one year finally a new major:
🎉🕺💃 Welcome rollup@2.0.0! 🎇🎆
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: rollup/rollup#3369
For those living in the future: Rollup can now be imported in Node as an ES-Module—without a bundler: rollup/rollup#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:
The main ESM entry point is now at rollup/dist/es/rollup.js instead of rollup/dist/rollup.es.js
The ESM browser build is at rollup/dist/es/rollup.browser.js instead of rollup/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 of rollup/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 and chunkGroupingSize options have been removed
acorn plugins can only be used if they accept a passed-in acorn instance instead of importing it themselves. See acornjs/acorn#870 for what needs to be done to make plugins compatible that do not support this yet (#3391)
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:
The main ESM entry point is now at rollup/dist/es/rollup.js instead of rollup/dist/rollup.es.js
The ESM browser build is at rollup/dist/es/rollup.browser.js instead of rollup/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 of rollup/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 and chunkGroupingSize options have been removed
acorn plugins can only be used if they accept a passed-in acorn instance instead of importing it themselves. See acornjs/acorn#870 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 of Buffer. A Buffer 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 match generateBundle: 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:
ongenerate: use generateBundle instead
onwrite: use writeBundle instead
transformBundle: use renderChunk instead
transformChunk: use renderChunk instead
You can no longer access this.watcher on the plugin context.
The transform hook can no longer return dependencies.
The treeshake.pureExternalModules option will now show a deprecation warning when used: use treeshake.moduleSideEffects: 'no-external' instead
Using import.meta.ROLLUP_ASSET_URL_<..> and import.meta.ROLLUP_CHUNK_URL_<..> in code will now show warnings: use import.meta.ROLLUP_FILE_URL_<..> instead
The resolveAssetUrl hook will now show a deprecation warning when used: use resolveFileUrl instead
The following plugin context functions will show warnings when used:
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Bumps rollup from 1.31.1 to 2.0.2.
Release notes
Sourced from rollup's releases.
Changelog
Sourced from rollup's changelog.
Commits
b43bb7e
2.0.2a2ac44e
Update changelogb5b9164
Fix conditional exports again for ESM (#3430)676bb03
2.0.1473b6b2
Update changelog4f1c7ef
Fix conditional exports in Node 13.0 - 13.7 (#3428)1e4b9bb
2.0.00c4a5db
Update changelogc43c463
Update magic-string and fix sourcemaps (#3423)21a7a3b
Update changelogDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)