Closed Derugon closed 5 months ago
Can you also update the package version to 1.8.0?
Thanks. This looks thorough as usual!
I sent you an invite for commit access to this repo a month ago, but it expired. I am sending it again. Also, you may want to link your git email with GitHub to get credited in the contributors page
MediaWiki 1.42 is expected to be released in may or june, so this PR contains (supposedly) all type and JSdoc changes related to it. This release also comes with a JS documentation overall, with a lot of small description, type, and url changes, which makes this PR way bigger (and harder to review, I'm sorry, I recommend looking at changes commit by commit) than it should be.
This PR also contains some other changes from oversights of previous PRs (unrelated to 1.42) and addition of deprecated/removed declarations since 1.39 (current LTS release).
All changes are liste below, breaking changes are annotated with ⚠.
MediaWiki 1.42 update
Added:
mw.tempUserCreated
modulemw.user.getFirstRegistration
mw.util.isInfinity
Modified:
new mw.Api().loadMessagesIfMissing
now accepts a singlestring
message key as argumentdefault
argument ofmw.cookie.get/getCrossSite
is now explicitely typed (in JSdoc) withstring|null
, instead ofany
⚠mw.loader.impl
/implement
/register
/state
are now annotated privatemw.Map
is no longer annotated private (and described as internal)body
argument ofnew mw.Rest().post
is now optionalCompatibility with MediaWiki 1.39 (LTS)
@since
annotations for declarations added or modified with 1.40 and 1.41.@deprecate
annotation:isoDate
/url
tablesorter parsers, up to 1.40.mw.language.commafy
, up to 1.40.jquery.tipsy
ResourceLoader module, up to 1.41.Miscellaneous changes
jquery.cookie
module (which contains$.cookie
,$.removeCookie
)mw.loader.addSource
,mw.templates
, andscript
property of a RL module declarationsmw.libs
andmw.widgets
namespaces instead of records ⚠pluralRuleParser
librarymw.experiments
andmw.Rest.Options.ajax
mw.errorLogger
to its own filemw.log
mw.notify
taking a JS globalNotificationOptions
as argument (not targetting the MediaWiki implementation) ⚠ColorUtil
/mw.Api
/mw.Rest
interfaces andmw.template
namespaceJSdoc update
@typedef
have been added to the original JSdoc in 1.42, either as file-local declarations or global declarations in themw
namespace, so update some interfaces to share similar names (and declaration location) with online types.ApiOptions
/ForeignApiOptions
/ForeignRestOptions
/RestOptions
tomw.Api.Options
/mw.ForeignApi.Options
/mw.ForeignRest.Options
/mw.Rest.Options
and make all properties optional ⚠ApiOptions
/ForeignApiOptions
/RestOptions
were exported, so to prevent breaking things, exports are just deprecated for nowUserInfo
tomw.Api.UserInfo
⚠user.d.ts
, so to prevent breaking things, the export is just deprecated for nowWatchStatus
tomw.Api.WatchedPage
NotificationOptions
tomw.notification.NotificationOptions
ResultInfo
toResponseMetaData
(insearchSuggest.d.ts
)CompiledTemplate
/Compiler
toTemplateRenderer
/TemplateCompiler
(intemplate.d.ts
)render
method.UriOptions
tomw.Uri.UriOptions
and make all properties optionalImageUrlData
toResizeableThumbnailUrl
(inutil.d.ts
)mw.Api.EditTransform
mw.cookie.CookieOptions
ResponseFunction
(insearchSuggest.d.ts
)TitleExistenceStore
(inTitle.d.ts
)URLs update
doc.wikimedia.org
URLs to new formatdoc.wikimedia.org
URLsmw.hook
events is now generated, so also add URLs to their associated sectionSpecial:MyLanguage
in URLs of wikis that use subpages for translationswww.mediawiki.org
{@link some-url …}
syntax consistently in JSdoc[…](some-url)
,<some-url>
, or plainsome-url