Issue #3272872 by nod_: deprecate underscore and mark it internal

merge-requests/2059/head
Alex Pott 2022-04-04 17:03:35 +02:00
parent 426e5178b5
commit 49a6133d90
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
6 changed files with 28 additions and 5 deletions

View File

@ -10,7 +10,7 @@ backbone:
js:
assets/vendor/backbone/backbone-min.js: { weight: -19, minified: true }
dependencies:
- core/underscore
- core/internal.underscore
ckeditor:
remote: https://github.com/ckeditor/ckeditor4
@ -1082,6 +1082,24 @@ underscore:
gpl-compatible: true
js:
assets/vendor/underscore/underscore-min.js: { weight: -20, minified: true }
deprecated: The %library_id% asset library is deprecated in Drupal 9.4.0 and will be removed in Drupal 10.0.0.
internal.underscore:
# Internal library, do not depend on it.
# The library will be removed as soon as the following issues are fixed:
# - https://www.drupal.org/project/drupal/issues/3270395
# - https://www.drupal.org/project/drupal/issues/3203920
# - https://www.drupal.org/project/drupal/issues/3204011
# - https://www.drupal.org/project/drupal/issues/3204015
remote: https://github.com/jashkenas/underscore
version: "1.13.2"
license:
name: MIT
url: https://raw.githubusercontent.com/jashkenas/underscore/1.13.2/LICENSE
gpl-compatible: true
js:
assets/vendor/underscore/underscore-min.js: { weight: -20, minified: true }
drupal.dialog.off_canvas:
version: VERSION

View File

@ -6,7 +6,7 @@ drupal.editor.admin:
- core/jquery
- core/once
- core/drupal
- core/underscore
- core/internal.underscore
drupal.editor:
version: VERSION

View File

@ -15,7 +15,7 @@ drupal.filter.filter_html.admin:
dependencies:
- core/jquery
- core/once
- core/underscore
- core/internal.underscore
drupal.filter:
version: VERSION

View File

@ -17,5 +17,5 @@ quickedit.inPlaceEditor.image:
dependencies:
- core/jquery
- core/drupal
- core/underscore
- core/internal.underscore
- quickedit/quickedit

View File

@ -29,7 +29,7 @@ quickedit:
dependencies:
- core/jquery
- core/once
- core/underscore
- core/internal.underscore
- core/backbone
- core/jquery.form
- core/drupal

View File

@ -171,8 +171,13 @@ const assetsFolder = `${coreFolder}/assets/vendor`;
},
{
pack: 'underscore',
library: 'internal.underscore',
files: ['underscore-min.js', 'underscore-min.js.map'],
},
// Only used to update the version number of the deprecated library.
{
pack: 'underscore',
},
{
pack: 'loadjs',
files: [{ from: 'dist/loadjs.min.js', to: 'loadjs.min.js' }],