wiki.techinc.nl/tests/phpunit/includes/ResourceLoader
Timo Tijhof 30f515ec1d ResourceLoader: adopt SourceMap header instead of inline comment
Follows-up 7c2c016e46 (I086e275148). This separates the link from
the response such that when it gets copied elsewhere, hosted elsewhere,
saved offline, proxied, archived, or otherwise served from a different
place or with different content; the header is most likely naturally
not copied along.

This is based on upstream experience by the jQuery Team where e.g.
distributions of jQuery, or concatenations, etc would lead to
confusing errors or inability to see any source in the devtools.

In the Wikimedia community we two similar use cases:

1. people sometimes copy load.php responses to a wiki page, e.g.
   as a way to "distribute" a ResoureLoader-built gadget or to
   fork/debug some core code.

2. the Internet Archive stores copies of our responses, but doesn't
   proactively download source map links.

For example, archiving
https://people.wikimedia.org/~krinkle/wikimedia-minify-2.5.0-test-sourcemap/combine.html
results in:

 > … /~krinkle/wikimedia-minify-2.5.0-test-sourcemap/combine.html
 > … /~krinkle/wikimedia-minify-2.5.0-test-sourcemap/combine.min.js
 > Archived at
 > http://web.archive.org/web/20230905211332/https://people.wikimedia.org/~krinkle/wikimedia-minify-2.5.0-test-sourcemap/combine.html

Bug: T47514
Change-Id: I3e85c2afb107ce1185651ab038379e4abe87a445
2023-09-06 00:47:46 +01:00
..
templates ResourceLoader namespace (attempt 2) 2022-05-24 15:41:46 +00:00
ClientHtmlTest.php ResourceLoader: Document the clientPrefs system and make Skin option 2023-08-18 13:32:01 -07:00
ContextTest.php tests: Use MainConfigNames consts to refer config names 2023-06-19 20:21:08 +00:00
DerivativeContextTest.php build: Updating mediawiki/mediawiki-codesniffer to 41.0.0 2023-03-11 19:04:09 +00:00
FileModuleTest.php ResourceLoader: Have FileModule deliver additional path information 2023-08-23 04:06:20 +01:00
ImageModuleTest.php ResourceLoader: Remove unused rasterized URL in ImageModule::getCssDeclarations 2023-07-13 01:52:57 +00:00
LessVarFileModuleTest.php ResourceLoader: Hoist and simplify @covers in test cases 2022-08-23 23:59:17 +00:00
MessageBlobStoreTest.php objectcache: Remove $wgMainWANCache and $wgWANObjectCaches 2023-03-07 22:47:04 +00:00
ModuleTest.php ResourceLoader: Have FileModule deliver additional path information 2023-08-23 04:06:20 +01:00
OOUIImageModuleTest.php ResourceLoader: Remove SVG fallback hack from ImageModule 2023-02-08 01:32:07 +01:00
ResourceLoaderTest.php ResourceLoader: adopt SourceMap header instead of inline comment 2023-09-06 00:47:46 +01:00
SkinModuleTest.php Create mediawiki.tempUserBanner module 2023-06-30 00:41:46 +00:00
StartUpModuleTest.php Avoid DB access in non-database tests 2023-08-06 22:57:48 +00:00
UserOptionsModuleTest.php ResourceLoader namespace (attempt 2) 2022-05-24 15:41:46 +00:00
WikiModuleTest.php Fix DB usage in non-database tests (part 2) 2023-08-06 22:57:28 +00:00