Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(virtual): prepare for Rollup 3 #1280

Merged
merged 1 commit into from
Oct 10, 2022
Merged

fix(virtual): prepare for Rollup 3 #1280

merged 1 commit into from
Oct 10, 2022

Conversation

lukastaegert
Copy link
Member

Rollup Plugin Name: virtual

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary) Requires Node 14
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

This PR updates the plugin for Rollup 3 compatibility. This will not change compatibility with older Rollup versions.

It contains the following:

  • Update minimal required Node version to 14 (also reflected in README, breaking change)
  • Extend Rollup peerDependency version with ||^3.0.0
  • Make Rollup an optional peerDependency as technically, plugins do not require Rollup but only depend on its API. Apparently solves issues with pnpm, see fix(inject): rollup is optional peer dependency #1272
  • Use a shared Rollup config for all plugins
    • This allows to share bundling improvements and unifies the build

    • All plugins now use strictDeprecations to fail early if they use deprecated Rollup features as well as an onward handler that fails the build

    • The CJS output now uses

      exports: 'named',
      footer: 'module.exports = Object.assign(exports.default, exports);'
      

      which will allow the default export to be directly required while still supporting named exports

  • The "exports" package.json field is now properly configured for require and import.
  • CJS and ESM output are now in different sub-folders with a package.json file with "type": "module" next to the CJS output (via the shared Rollup config)
  • Internally, the latest Rollup 3 pre-release build is used to ensure compatibility
  • Rollup configs now follow Node semantics, i.e. .mjs for ESM configs, no direct import of package.json
  • TypeScript output has been changed to target ES2019

@lukastaegert lukastaegert changed the base branch from master to repo/rollup3-updates September 30, 2022 05:14
@lukastaegert lukastaegert marked this pull request as ready for review October 1, 2022 04:33
Base automatically changed from repo/rollup3-updates to master October 7, 2022 18:41
BREAKING CHANGES: Requires Node 14
@shellscape
Copy link
Collaborator

PLEASE HOLD UP. THERE ARE BREAKING CHANGES IN THE REPO. PLEASE CHECK COMMENTS AND DISCORS

@lukastaegert
Copy link
Member Author

I actually need to merge the remaining PRs to resolve these

@lukastaegert lukastaegert merged commit 8da116c into master Oct 10, 2022
@lukastaegert lukastaegert deleted the virtual/rollup-3 branch October 10, 2022 16:55
@shellscape
Copy link
Collaborator

in the future please coordinate so that we can knock out all of those changes at once - that's doable given the changes being made. anybody who opens up a PR right now is going to have a bad day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants