Skip to content
This repository was archived by the owner on Sep 7, 2026. It is now read-only.

feat: deprecate in favor of webpack's output.copy - #839

Merged
alexander-akait merged 2 commits into
mainfrom
feat/deprecate
Sep 7, 2026
Merged

feat: deprecate in favor of webpack's output.copy#839
alexander-akait merged 2 commits into
mainfrom
feat/deprecate

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

webpack copies files itself since 5.111.0 (webpack/webpack#21938), through output.copy and the webpack.CopyPlugin behind it, so this package is no longer needed there. Adds a one-time DeprecationWarning and a README section saying what each option becomes, linking the worked example in webpack's examples/output-copy.

The warning is a capability check, not a version comparison: it fires only when the compiler's compiler.webpack has CopyPlugin, so anyone on an older webpack — where this plugin is still the answer — sees nothing.

What kind of change does this PR introduce?

feat

Did you add tests for your changes?

Yes — test/deprecation.test.js covers the warning's message, type and code, that it fires once across several compilers, and that it stays silent both when webpack cannot copy files itself and when there is no compiler.webpack at all.

Does this PR introduce a breaking change?

No. The package keeps working unchanged; only a Node deprecation warning is added, which --no-deprecation silences like any other.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

The README carries the deprecation notice, the migration diff and the option-by-option table. If the package is later marked deprecated on npm, the same text fits.

Use of AI

Claude Code wrote the deprecation warning, the tests and the README section, and verified them: lint:prettier, lint:code, lint:spelling and lint:types all pass, and the full suite is green (15 suites, 264 tests). It also checked the migration table against both option schemas rather than from memory, and corrected one claim it had got wrong — a late processAssets stage does not keep a copied file out of the minimizer, because the minimizer taps with additionalAssets: true and so re-runs for assets added later; info: { minimized: true } is what does.


Generated by Claude Code

webpack copies files itself since 5.111.0. Warns once per process when the
compiler running the plugin has 'webpack.CopyPlugin', so a webpack with
nothing to migrate to stays quiet, and documents what each option becomes.
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.21%. Comparing base (08b3a64) to head (9ab3543).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #839      +/-   ##
==========================================
+ Coverage   92.00%   92.21%   +0.20%     
==========================================
  Files           2        2              
  Lines         413      424      +11     
  Branches      124      126       +2     
==========================================
+ Hits          380      391      +11     
  Misses         32       32              
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Clears four high-severity advisories covering 3.0.0-3.1.5, which turned the
lint job's 'npm audit --production' red on every branch once they were
published. Transitive through ajv, so only the lockfile moves.
@alexander-akait
alexander-akait merged commit eaddf25 into main Sep 7, 2026
19 checks passed
@alexander-akait
alexander-akait deleted the feat/deprecate branch September 7, 2026 12:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant