Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
Description: 

Library definitions can now specific a 'moved_files' key. This should be used when you are moving files between, or within a library definition.

This supports backwards compatibility and triggering deprecated messages for themes are using libraries_overrides to override a file in its old location.

The 'moved_files' key should be used only on the library definition that the files have been moved to, because it is the file in its new location that needs bc support for overrides.

The 'moved_files' key contains a list of libraries, for each library that files have been moved from, there is the 'deprecation_version', 'removed_version', 'deprecation_link' (for a change record), and 'css and 'js keys. For the css and js keys, the files should be listed as they would have been in their previous library.

new_library_definition:
  version: VERSION
  css:
    base:
      css/base-remove.css: {}
  js:
    js/foo.js: {}
  moved_files:
    theme_test/old_library_definition_to_replace:
      deprecation_version: drupal:X.0.0
      removed_version: drupal:Y.0.0
      deprecation_link: https://example.com
      css:
        base:
          css/foo.css:
            base: 'css/base-remove.css'
      js:
        js/bar.js: 'js/foo.js'

old_library_definition_to_replace:
  version: VERSION
  css:
    base:
      css/foo.css: {}
  js:
    js/bar.js: {}

Impacts: 
Module developers
Themers