Upgrade non-breaking JS dependencies #14152
Conversation
|
||
try { | ||
return hljs.highlight(lang, code).value; | ||
return hljs.highlight(code, {language}).value; |
pluma
May 6, 2021
Author
Contributor
I'm not sure why we're bundling highlight.js given the docs live in their own repo, I think?
The API change would be breaking but the old API is still supported with deprecation warnings.
hkernbach
May 7, 2021
Contributor
Not related to your changes @pluma , but this file does contain lots of methods, variables and modules (like fs) which are not even used here.
e.g. methods: logCurlRequestPlain / logCurlRequest / curlRequest
e.g. vars: ArangoshOutput, testFunc, countErrors
e.g. modules: time, fs, examples
pluma
May 11, 2021
Author
Contributor
If I had one wish it's throwing out all our jslint nonsense and just using an external eslint+prettier via npm. We could probably also do this automatically for PRs.
hkernbach
May 11, 2021
Contributor
Yes, I bet our jslint rules aren't the best. Personally I do not care which tool we're going to use. Also adding jslint support for documentation related JS files is out of scope here. But please make sure that this will not be forgotten.
@Simran-B fyi.
pluma
May 22, 2021
Author
Contributor
@Simran-B do you have any insight what this documentation file does and why we bundle highlight.js
? If this code is unused we could remove the dependency.
pluma
May 22, 2021
Author
Contributor
To me it looks like the file is used in generateExamples.py
so apparently it's part of the docs build process? Seems a bit extreme to bundle and distribute JS dependencies that are only ever used once during build and then never again.
We still have a bunch of outdated packages but most of them are likely breaking in ways that would impact users:
|
@joerg84 Remind me that we need to find a way to hide the bundled modules from users in ArangoDB 4 so we can stop worrying about breaking changes as they only affect our internals. We can just wrap the stuff we want users to be able to access and tell them to bundle their own dependencies for the rest. |
|
@hkernbach https://www.arangodb.com/docs/stable/appendix-java-script-modules.html#bundled-npm-modules I think it used to be used in aardvark (to render the README?) but apparently isn't any longer or maybe it's now being used in the frontend instead. Note that our version of marked is on 0.x and the latest is 2.x so upgrading it would be a breaking upgrade. |
The following deps can't be upgraded as the introduce BREAKING changes to their APIs and are publicly listed:
The following internal deps can't be upgraded without significant changes to our internal code:
|
If it is unused + not documented (officially supported): Sure let's remove it. |
@hkernbach I think tests should pass now. I had to restore underscore because some of our own services on the Foxx app store use it. There was also a legit regression caused by a dependency change that I've fixed. |
I've bumped xmldom since it's only used in the export testsuite and that one still works with the new version. |
accepts 1.3.5 -> 1.3.7 ansi_up 4.0.3 -> 5.0.1 chalk 1.1.3 -> 4.1.1 error-stack-parser 2.0.2 -> 2.0.6 highlight.js 9.15.6 -> 10.7.2 http-errors 1.7.2 -> 1.8.0 js-yaml 3.13.1 -> 4.1.0 lodash 4.17.13 -> 4.17.21 mime-types 2.1.22 -> 2.1.30 netmask 1.0.6 -> 2.0.2 qs 6.7.0 -> 6.10.1 range-parser 1.2.0 -> 1.2.1 timezone 1.0.22 -> 1.0.23 type-is 1.6.16 -> 1.6.18 underscore 1.9.1 -> 1.13.1 Closes #14120.
But mostly it wasn't used at all so the useless imports have been removed.
Apparently some of our demo services use this, breaking tests.
This reverts commit 261df1d. This commit breaks shell-foxx-swagger-spec.js
This previously broke a testcase.
This is actually used in the Foxx HTTP API app.
|
@@ -338,6 +366,32 @@ devel | |||
* Fixed ES-881: ensure that LDAP options for async, referrals and restart set | |||
the off value correctly. Otherwise, this can result in an "operations error". | |||
|
|||
* Updated JavaScript dependencies, including breaking changes to non-public |
Scope & Purpose
accepts 1.3.5 -> 1.3.7
ansi_up 4.0.3 -> 5.0.1
chalk 1.1.3 -> 4.1.1
content-type (added) -> 1.0.4
error-stack-parser 2.0.2 -> 2.0.6
highlight.js 9.15.6 -> 10.7.2
http-errors 1.7.2 -> 1.8.0
iconv-lite 0.4.24 -> 0.6.2
js-yaml 3.13.1 ->
4.1.03.14.1lodash 4.17.13 -> 4.17.21
marked -> removed
media-typer -> removed
mime-types 2.1.22 -> 2.1.30
mocha -> removed
ms (added) -> 2.1.3
netmask 1.0.6 -> 2.0.2
qs 6.7.0 -> 6.10.1
range-parser 1.2.0 -> 1.2.1
semver 6.0.0 -> 7.3.5
timezone 1.0.22 -> 1.0.23
type-is 1.6.16 -> 1.6.18
underscore 1.9.1 -> 1.13.1
xmldom 0.1.27 -> 0.6.0
Closes #14120. /cc @joerg84
Backports:
Testing & Verification
Link to Jenkins PR run: TODO
Documentation