8000 Upgrade non-breaking JS dependencies by pluma · Pull Request #14152 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Upgrade non-breaking JS dependencies #14152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f7eab2f
Upgrade non-breaking JS dependencies
pluma May 6, 2021
0c17fec
Downgrade js-yaml
pluma May 11, 2021
ee12551
Bump deps
pluma May 11, 2021
ffa547b
Add note to CHANGELOG
pluma May 11, 2021
b7b79b7
Add content-type license / remove media-typer license
pluma May 11, 2021
ecbf83f
Replace underscore imports with lodash
pluma May 11, 2021
c4bd190
Remove marked, underscore
pluma May 12, 2021
5ec9a57
Add note about underscore
pluma May 12, 2021
eda55b9
Remove underscore/marked licenses
pluma May 12, 2021
ca49a64
Update CHANGELOG
pluma May 22, 2021
73688d6
Add underscore back
pluma Jul 4, 2021
601e3ed
Fix Foxx type internals
pluma Jul 4, 2021
5cfcae5
Bump deps
pluma Jul 6, 2021
0f651e0
npm audit fix
pluma Jul 6, 2021
cc410a2
Keep mime type parameters
pluma Jul 6, 2021
62d27b2
xmldom -> 0.6.0 (BREAKING)
pluma Jul 6, 2021
2f95be1
Revert "Keep mime type parameters"
pluma Jul 6, 2021
4114ad1
Extract used parts of mocha
pluma Jul 5, 2021
19ac18c
Convert to classes
pluma Jul 6, 2021
262c08f
Better module load error messages
pluma Jul 6, 2021
10ee09d
Move mocha.js to mocha/index.js
pluma Jul 6, 2021
a12ff8e
Extract reporters, interfaces, utils
pluma Jul 6, 2021
3ec2e73
Remove mocha dep
pluma Jul 6, 2021
a011a16
Add mocha copyright headers
pluma Jul 7, 2021
35de614
jslint
pluma Jul 7, 2021
26a6bc9
Add ms
pluma Jul 8, 2021
b1e8e67
Restore cause attribute
pluma Jul 8, 2021
d004dae
Fix utils/jslint.sh
pluma Jul 12, 2021
64b4e67
Fix test title
pluma Jul 12, 2021
74ee2c7
Fix missing reporters exports
pluma Jul 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
8000
Diff view
  •  
  •  
  •  
54 changes: 54 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
devel
-----
* Updated JavaScript dependencies, including breaking changes to non-public
modules. We recommend always bundling your own copy of third-party modules,
even ones listed as public.

- 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.3
- http-errors: 1.7.2 -> 1.8.0
- iconv-lite: 0.4.24 -> 0.6.3
- js-yaml: 3.13.1 -> 3.14.1
- lodash: 4.17.13 -> 4.17.21
- marked: 0.6.2 -> removed
- media-typer: 0.3.0 -> removed
- mime-types: 2.1.22 -> 2.1.31
- mocha: 6.1.3 -> removed
- 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
- sinon: 1.17.6 -> 1.17.7
- 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

* Adapt various places related to handling of execution plans non-recursive
in order to avoid stack overflows. This allows us now to execute much larger
queries.
Expand Down Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops.

modules. Note that this removes underscore, which was previously listed as a
public module in ArangoDB 2. We recommend always bundling your own copy of
third-party modules, even ones listed as public.

- 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 -> 3.14.1
- lodash: 4.17.13 -> 4.17.21
- marked: 0.6.2 -> removed
- media-typer: 0.3.0 -> removed
- 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
- 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 -> removed

* Fixed DEVSUP-764 (SEARCH-7): inconsistent BM25 scoring for LEVENSHTEIN_MATCH
function.

Expand Down
10 changes: 5 additions & 5 deletions Documentation/Scripts/exampleHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ function normalize(lang) {
return MAP[lower] || lower;
}

function highlight(lang, code) {
if(!lang) {
function highlight(language, code) {
if(!language) {
return code;
}
// Normalize lang
lang = normalize(lang);
// Normalize language
language = normalize(language);

try {
return hljs.highlight(lang, code).value;
return hljs.highlight(code, {language}).value;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK, we should ask @dothebart

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix: Include those files in our JSLINT script :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

} catch(e) { }

return code;
Expand Down
Loading
0