Commit graph

8 commits

Author SHA1 Message Date
Gergő Tisza
2e19512ca9 foreign-resources.yaml: Add doc-only type
Add a noop entry type for documenting upstream libraries which we
use in some non-standard way (patched, with a build step etc).

Use it to document jquery.ui (heavily patched). Also fix alphabetic
ordering of the entries.

Bug: T335690
Change-Id: Ieb75f23dfd103ebec8bdf7911d8bb6a0c77bb95d
2023-05-03 19:33:04 +00:00
Gergő Tisza
9d26c3f446
ForeignResourceManager: Add transform step
Add a transformation step to foreign-resources.yaml that allows
for simple modifications after the files are fetched and hashed.

This is experimental and mainly meant as a short-term solution
for T335326. In the long term, we might decide to handle the
issue of libraries with ES2017 syntax differently, and this
functionality might be removed. Use at your own risk.

Currently the only supported modification is adding a 'nomin'
filter to the beginning of the file, which is useful for files
which are already minified or which the MediaWiki minifier can't
deal with for some reason. In the future, this could be used
e.g. to apply patches.

Change-Id: I4d93bf6d04683cc4072e99f6ab02d0e618d85914
2023-04-26 14:52:12 +02:00
Gergő Tisza
5099f79718 Add ForeignResourceDirs extension/skin attribute
Add an extension/skin attribute and a command line option for
manageForeignResources.php, for management of an extension's or
skin's foreign resources. This is less clumsy and more
introspectable than each extension/skin creating its own copy
of manageForeignResources.php.

Bug: T330508
Change-Id: I5df95ea4799d0efce60b58a35cb916c8e0f555b0
2023-04-25 09:27:35 -04:00
Timo Tijhof
102f184cc0 ResourceLoader: Strengthen ForeignResourceManager cache key
It is currently possible to update the source URL of a package
in foreign-resources.yaml without updating the integrity hash (
or updating it but forgetting to stage/commit it). And yet CI would
still pass if the URL ends with an unversioned filename, because
the cache key would remain unchanged and thus CI would not download
the URL.

Change-Id: I04d77c438b7b083b1981f92cf6ddeaae0633ec86
2023-03-28 17:28:54 -07:00
Tim Starling
819efb3234 Don't write to the source tree in ForeignResourceManagerTest
* Wait until we know the action before choosing the temp directory.
  Use the configured temp directory if the action is verify, since the
  arguments for using a subdirectory of the source tree do not apply on
  verify.
* Use the configured cache directory in precedence over the source tree.

Change-Id: I0431db332238c8e2de14ec71fb611e0a8d4e959b
2023-03-17 20:45:05 +11:00
Reedy
cd29104a8b ResourceLoader: Check for valid SPDX license in ForeignResourceManager
Bug: T330428
Change-Id: Iddccef5d3c6a1baf89a6c626671323b6eed49c42
2023-03-01 20:11:31 +00:00
Reedy
23acb9421b ForeignResourceManager: Add import for SplFileInfo
Change-Id: I07b9ada2c15367d6a756fb677d43dc149be999cc
2023-01-08 03:45:50 +00:00
Amir Sarabadani
719ce204a0 Reorg: Move ForeignResourceManager to ResourceLoader directory
It literally has @ingroup ResourceLoader

Bug: T321882
Change-Id: Ia5c7c56c9235f98754f6d5e602da4626a76ff083
2022-11-08 10:54:17 +01:00
Renamed from includes/ForeignResourceManager.php (Browse further)