This should hopefully fix any possible issues where the NPM package
may be released after the documentation is deployed, which could cause
a cause miss by jsDelivr and cause the documentation to cache without
pulling in the Select2 dependency.
It hasn't happened yet, but I'm concerned it could happen and I don't
want to put in the effort to make a more sophisticated way of
handling this issue.
This should hopefully fix the issue we were seeing where the docs
would not render properly immediately after a release because CDNjs
has a delay in updating versions. jsdelivr does not have this delay,
so we shouldn't have any many rendering issues.
* Uncomment the deploy_github job for GPR
* Automatically add private scope to package for GPM
This is requires in order to deploy to GitHub package manager since
all packages must be scoped to the organization that they are being
deployed to. Because of how publishing scoped packages works with
NPM, there is no easier way to rename a package that is being pushed
to both a scoped and unscoped registry.
* Don't run NPM deploy if it's not a release
There was a change last week that now allows jobs to be filtered
entirely, so this now works like we had originally hoped.
* Tag branch pushes with commit
This is needed because you cannot overwrite a version on NPM, so the
previous plan of just using the prelease version would only work for
a single commit.
* Fixed invalid version identifier
This fixes an error which is called out in jQuery Migrate but
probably never happens in real life. This is because we call
`jQuery.fn.offset` without checking if the element is in the
document. Based on testing done here and within the MediaWiki
team, I'm pretty sure jQuery never actually implemented explicit
checks and this jQuery Migrate warning is just to cover the case
where a browser might start returning inconsistnet results. And
we could at least reproduce the inconsistency, so that's something.
We now default the offset to 0/0 if the parent element happens to
not be in the document. This appears to be what jQuery used to do
in the past, and generally appears to be what people expect in
these cases.
This fixes#5584.