wiki.techinc.nl/includes
Roan Kattouw fbbd65d2df ResourceLoader: Add support for packageFiles
Package files are files that are part of a module, but are not
immediately executed when the module executes. Instead, they are
lazy-excecuted when require() is called on them. Package files can be
scripts (JS) or data (JSON), and can be real files on the file system,
or virtual files generated by a callback.

Using virtual data files, server-side data and config variables can be
bundled with a module. Support for file-based require() allows us to
import npm modules into ResourceLoader more easily.

The require function passed to each script execution context, which was
previously a reference to the global mw.loader.require() function, is
changed to one that is scoped to the module and the file being executed.
This is needed to support relative paths: require( '../foo.js' ) can
mean a different file depending on the path of the calling file.

The results of require()ing each file (i.e. the value of module.exports
after executing it) are stored, and calling require() on the same file a
second time won't execute it again, but will return the stored value.

Miscellaneous changes:
- Add XmlJsCode::encodeObject(), which combines an associative array of
  XmlJsCode objects into one larger XmlJsCode object. This is needed for
  encoding the packageFiles parameter in mw.loader.implement() calls.

Bug: T133462
Change-Id: I78cc86e626de0720397718cd2bed8ed279579112
2019-02-05 22:05:02 +00:00
..
actions actions: Avoid use of is_null() PHP function where necessary 2019-01-11 16:40:27 +01:00
api Localisation updates from https://translatewiki.net. 2019-02-05 22:05:17 +01:00
auth Merge "Password: replace equals() with verify()" 2019-01-30 23:04:08 +00:00
block Remove a few obscure "done" and "empty" comments 2019-01-30 20:35:14 +00:00
cache Move interface ICacheHelper to own class 2019-02-05 20:04:12 +01:00
changes Separate content parts of mw-usertoollinks from presentation 2019-01-09 00:56:40 +00:00
changetags Fix order of arguments in ChangeTags::getPrevTags 2019-01-09 10:14:40 +01:00
clientpool Merge "Safe replacement of a lot of !count() with === []" 2019-01-16 07:03:47 +00:00
collation collation: Fix non-canonical order of elements 2019-01-11 10:48:14 +01:00
compat Remove UtfNormal class 2018-10-22 12:17:00 -07:00
composer
config Fully extract services framework as a library 2019-01-16 17:31:05 +01:00
content WikiTextStructure: Add an exclusion from WikibaseMediaInfo 2019-01-17 10:31:55 -08:00
context specialpage: Fix login crash caused by unknown language via ?uselang 2019-01-29 16:16:02 +00:00
dao dao: Add a type hint to getConnection() and some extra newlines 2019-01-16 14:29:53 +01:00
db Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
debug Improve documentation of wfDeprecated 2018-12-28 11:10:41 +00:00
deferred build: Updating mediawiki/mediawiki-codesniffer to 23.0.0 2018-12-01 23:11:16 +01:00
diff Remove a few obscure "done" and "empty" comments 2019-01-30 20:35:14 +00:00
edit
editpage Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
exception Move interface ILocalizedException to own file 2019-02-01 20:05:30 +01:00
export export: Mark DumpFilter::mark() as being protected 2019-01-11 18:39:40 +00:00
externalstore Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap 2018-10-29 14:53:37 -07:00
filebackend Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap 2018-10-29 14:53:37 -07:00
filerepo filerepo: avoid dynamic calls to FileRepo::isVirtualUrl 2019-01-18 13:03:45 -08:00
gallery build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-16 15:51:11 +00:00
htmlform Merge "Introduce multiselect widgets for namespaces" 2019-01-23 17:02:41 +00:00
http Fix @param tags 2019-02-03 16:49:10 +01:00
import Do not pass $archiveName two times to OldLocalFile 2019-01-03 09:24:16 +01:00
installer Merge "Fix grammar of "config-db-host-help"" 2019-02-05 10:45:42 +00:00
interwiki Use WikiMap methods in ClassicInterwikiLookup instead of wfWikiId() 2018-10-29 22:01:50 +00:00
jobqueue Move interface IJobSpecification to own file 2019-02-04 21:04:12 +01:00
json Comments, tests, and tweaks for JSON decoding quirks 2018-11-07 13:04:21 -06:00
libs objectcache: avoid duplicate set() calls with lockTSE when no value is in cache 2019-02-03 02:17:59 +00:00
linkeddata
linker
logging Correct whitespace and parentheses typos in BlockLogFormatter 2019-01-30 22:46:28 -08:00
mail Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
media Rename tests/phpunit/includes/media files to match class names 2019-01-29 23:21:13 -08:00
objectcache Merge "No yoda conditions" 2018-12-09 01:34:23 +00:00
page Display translatable images in wiki language on image pages 2019-02-04 15:57:37 -08:00
pager TablePager: Reduce pagination button in visual strength 2019-01-17 16:56:21 -08:00
parser Merge "Safe replacement of a lot of !count() with === []" 2019-01-16 07:03:47 +00:00
password Password: replace equals() with verify() 2019-01-24 13:40:40 -08:00
poolcounter Re-namespace RevisionStore and RevisionRecord classes 2018-10-09 10:22:48 -04:00
preferences Revert "Pass $context to 'GetPreferences' hook" 2018-12-10 02:58:59 +00:00
profiler ProfilerExcimer: allow early start 2018-12-17 14:36:28 +11:00
rcfeed Use WikiMap methods for wiki ID logic in more places 2018-10-29 22:02:00 +00:00
registration registration: Add @codeCoverageIgnore for statement that can't be covered 2019-01-18 13:57:43 -08:00
resourceloader ResourceLoader: Add support for packageFiles 2019-02-05 22:05:02 +00:00
Revision Fix documentation for RevisionRecord::$mPageId 2019-01-15 14:42:50 +01:00
revisiondelete Update type hints and documentation of RevisionDeleteUser 2019-01-31 21:19:38 +00:00
search Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
session
shell Convert RandomImageGenerator to use the new execution framework 2019-01-21 22:33:02 -08:00
site Hard deprecated SiteSQLStore::newInstance() 2018-12-08 22:12:33 -08:00
skins Soft deprecate QuickTemplate::msgWiki() 2019-02-01 13:25:18 -08:00
sparql Use english for message text in SparqlException 2018-12-09 11:18:32 +01:00
specialpage specialpage: Fix login crash caused by unknown language via ?uselang 2019-01-29 16:16:02 +00:00
specials Merge "Prevent undesired toggling on Special:NewPages" 2019-02-04 17:57:00 +00:00
Storage Remove a few obscure "done" and "empty" comments 2019-01-30 20:35:14 +00:00
templates
tidy RemexCompatMunger: Don't split p-wrapping on style/link tags 2019-01-30 09:10:24 -08:00
title No yoda conditions 2018-11-21 17:54:39 +01:00
upload filerepo: avoid dynamic calls to FileRepo::isVirtualUrl 2019-01-18 13:03:45 -08:00
user Password: replace equals() with verify() 2019-01-24 13:40:40 -08:00
utils Better detection for old MS Office files 2019-01-23 09:23:17 +11:00
watcheditem Merge "Add BeforeResetNotificationTimestamp hook" 2019-02-05 09:00:42 +00:00
widget Introduce multiselect widgets for namespaces 2019-01-22 12:48:42 +00:00
.htaccess
ActorMigration.php ActorMigration: Remove possibility of read-both 2018-10-11 12:12:00 +11:00
AjaxDispatcher.php
AjaxResponse.php Deprecate $wgUseESI 2018-10-19 11:44:17 -04:00
AuthPlugin.php
AutoLoader.php Fully extract services framework as a library 2019-01-16 17:31:05 +01:00
Autopromote.php
Block.php Fix 'ipb_sitewide' not matching parent block after update 2019-02-04 17:31:55 -05:00
CategoriesRdf.php
Category.php
CategoryFinder.php
CategoryViewer.php Improve page display title handling for category pages 2018-09-10 08:29:48 +02:00
CommentStore.php Drop the image_comment_temp table 2018-11-14 15:04:31 -05:00
CommentStoreComment.php
ConfiguredReadOnlyMode.php
ContentSecurityPolicy.php
DefaultSettings.php Add option for confirmation prompts on rollbacks 2019-02-04 17:04:46 +01:00
Defines.php Phabricator: Use Tddddd instead of Bug ddddd in comments 2018-10-04 09:15:02 +02:00
DeprecatedGlobal.php
DerivativeRequest.php Fix IP handling in DerivativeRequest 2018-10-31 20:34:58 -07:00
DevelopmentSettings.php
DummyLinker.php Linker: Deprecate non-Language types for $lang of tocList() and generateTOC() 2018-12-21 17:41:30 +01:00
EditPage.php Merge "No yoda conditions" 2018-12-09 01:34:23 +00:00
EventRelayerGroup.php Hard deprecate EventRelayerGroup::singleton() 2018-09-24 16:09:28 -07:00
FauxRequest.php
Feed.php
FeedUtils.php
FileDeleteForm.php Remove a few obscure "done" and "empty" comments 2019-01-30 20:35:14 +00:00
ForeignResourceManager.php resources: Extract ForeignResourceManager from manageForeignResources.php 2018-10-15 03:16:18 +01:00
ForkController.php
FormOptions.php
GitInfo.php
GlobalFunctions.php Hard-deprecate wfArrayFilter() and wfArrayFilterByKey() 2019-01-21 23:04:01 -08:00
HeaderCallback.php
HistoryBlob.php Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
Hooks.php
Html.php Add warning if you give Html::openElement a name with a space 2018-12-20 18:03:56 -08:00
Linker.php Linker: Simplify return paths 2019-01-17 12:25:39 +01:00
LinkFilter.php Use new externallinks.el_index_60 field 2018-11-12 22:33:18 +00:00
ListToggle.php
MagicWord.php
MagicWordArray.php
MagicWordFactory.php Add a way to exclude categories from Special:UnusedCategories 2018-11-16 13:32:27 +00:00
MediaWiki.php Add TransactionProfiler::redefineExpectations and migrate appropriate callers 2018-12-10 16:02:30 +00:00
MediaWikiServices.php Fully extract services framework as a library 2019-01-16 17:31:05 +01:00
MediaWikiVersionFetcher.php
MergeHistory.php
Message.php Message: Don't include Title objects in the serialization (part 2) 2018-12-14 14:20:41 +00:00
MovePage.php Fix exception language in MovePage 2019-01-17 15:56:07 -08:00
MWGrants.php
MWNamespace.php [MCR] Introduce SlotRoleHandler and SlotRoleRegistry 2018-11-30 12:29:05 -08:00
MWTimestamp.php Remove unnecesary else blocks 2018-09-24 14:08:31 +01:00
NoLocalSettings.php
OrderedStreamingForkController.php Minor OrderedStreamingForkController improvements 2018-10-10 22:37:02 +01:00
OutputHandler.php
OutputPage.php Improve OutputPage::wrapWikiMsg documentation 2019-01-06 17:33:50 -08:00
PageProps.php
PathRouter.php
PHPVersionCheck.php PHPVersionCheck: Remove obsolete load.php code and simplify 2018-10-28 14:12:54 -07:00
Pingback.php
Preferences.php Preferences class deprecation, step 2 2018-11-05 10:53:43 -08:00
PrefixSearch.php
ProtectionForm.php Replace deprecated calls to OutputPage::parseInline() 2018-10-29 15:34:43 -04:00
ProxyLookup.php
RawMessage.php
ReadOnlyMode.php
Revision.php Use shorter ?: syntax in Revision class 2019-02-04 18:42:13 +00:00
RevisionList.php
ServiceWiring.php [MCR] Introduce SlotRoleHandler and SlotRoleRegistry 2018-11-30 12:29:05 -08:00
Setup.php Remove deprecated wgEnableParserCache 2019-01-25 21:08:10 -08:00
SiteConfiguration.php Use DB domain in JobQueueGroup and make WikiMap domain ID methods stricter 2018-11-07 04:46:56 +00:00
SiteStats.php Fix caller name in SiteStats::numberingroup/pagesInNs 2018-09-30 15:41:19 +02:00
SiteStatsInit.php
Status.php Add missing @return PHPDoc to __sleep() function 2019-01-24 21:17:47 +01:00
StreamFile.php
StubObject.php
TemplateParser.php TemplateParser: Pass FLAG_MUSTACHELOOKUP to enable parent context access 2018-09-04 12:39:34 -07:00
TemplatesOnThisPageFormatter.php
Title.php Title: Add null to @return type for getSubpage 2019-02-03 18:11:12 +01:00
TitleArray.php
TitleArrayFromResult.php
TrackingCategories.php
WebRequest.php build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-16 15:51:11 +00:00
WebRequestUpload.php
WebResponse.php
WebStart.php
WikiMap.php Use DB domain in JobQueueGroup and make WikiMap domain ID methods stricter 2018-11-07 04:46:56 +00:00
WikiReference.php
Xml.php Document expected escaping level for Xml::submitButton() 2018-09-03 15:17:19 -07:00
XmlJsCode.php ResourceLoader: Add support for packageFiles 2019-02-05 22:05:02 +00:00
XmlSelect.php XmlSelect: Fix PHPDoc param comments for addOption() & formatOptions() 2018-12-22 00:10:43 +00:00