Skip to content

[v3.0] Remove actively deprecated features, show warnings for other deprecated features#4551

Merged
lukastaegert merged 5 commits into
masterfrom
remove-active-deprecations
Jul 4, 2022
Merged

[v3.0] Remove actively deprecated features, show warnings for other deprecated features#4551
lukastaegert merged 5 commits into
masterfrom
remove-active-deprecations

Conversation

@lukastaegert

Copy link
Copy Markdown
Member

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)
  • no

List any relevant issue numbers:

Description

This removes the following deprecated features that were already showing warnings when used in Rollup 2:

  • Removed the plugin context methods:
    • this.emitAsset()
    • this.emitChunk()
    • this.getAssetFileName()
    • this.getChunkFileName()
    • this.isExternal()
    • this.resolveId()
  • The resolveAssetUrl hook is removed
  • Rollup no longer pass an assetReferenceId or a chunkReferenceId parameter to resolveFileUrl
  • The treeshake.pureExternalModules option is removed
  • Emitted assets no longer have an isAsset flag in the bundle
  • Rollup will no longer fix assets added directly to the bundle by adding the type: "asset" field

On the other hand, the following deprecated features will no show warnings when used:

  • inlineDynamicImports as part of the input options
  • preserveModules as part of the input options
  • manualChunks as part of the input options
  • output.preferConst
  • output.dynamicImportFunction
  • Using true or false for output.interop
  • output.namespaceToStringTag
  • Accessing this.moduleIds on the plugin context
  • Accessing this.getModuleInfo(...).hasModuleSideEffects in plugins

@github-actions

github-actions Bot commented Jul 4, 2022

Copy link
Copy Markdown

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#remove-active-deprecations

or load it into the REPL:
https://rollupjs.org/repl/?pr=4551

@codecov

codecov Bot commented Jul 4, 2022

Copy link
Copy Markdown

Codecov Report

Merging #4551 (c8e361d) into master (437131a) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4551      +/-   ##
==========================================
- Coverage   98.89%   98.88%   -0.01%     
==========================================
  Files         208      208              
  Lines        7332     7282      -50     
  Branches     2094     2081      -13     
==========================================
- Hits         7251     7201      -50     
  Misses         26       26              
  Partials       55       55              
Impacted Files Coverage Δ
cli/run/waitForInput.ts 100.00% <ø> (ø)
src/Bundle.ts 100.00% <ø> (ø)
src/ExternalModule.ts 100.00% <ø> (ø)
src/Module.ts 100.00% <ø> (ø)
src/utils/FileEmitter.ts 100.00% <ø> (ø)
src/utils/PluginContext.ts 100.00% <ø> (ø)
src/utils/PluginDriver.ts 100.00% <ø> (ø)
src/utils/options/normalizeOutputOptions.ts 100.00% <ø> (ø)
src/utils/pluginUtils.ts 100.00% <ø> (ø)
src/utils/transform.ts 100.00% <ø> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 437131a...c8e361d. Read the comment docs.

@lukastaegert
lukastaegert merged commit 2e2a659 into master Jul 4, 2022
@lukastaegert
lukastaegert deleted the remove-active-deprecations branch July 4, 2022 12:54
@lukastaegert
lukastaegert restored the remove-active-deprecations branch July 4, 2022 12:55
@lukastaegert
lukastaegert deleted the remove-active-deprecations branch July 4, 2022 13:12
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.

1 participant