Skip to content

Commit c3efce3

Browse files
DOCSP-23004: Clarifications for MozJS Upgrade (#1167)
* add clarifiction for static vs prototype functions * add sentence * clarity * Update source/release-notes/6.0-compatibility.txt Co-authored-by: Justin Seyster <[email protected]> * further clarity Co-authored-by: Justin Seyster <[email protected]>
1 parent 2e743e2 commit c3efce3

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
MongoDB 6.0 upgrades the internal JavaScript engine used for
22
:ref:`server-side JavaScript <server-side-javascript>`,
33
:group:`$accumulator`, :expression:`$function`, and :query:`$where`
4-
expressions and from MozJS-60 to MozJS-91. Several non-standard array
5-
and string functions that existed in MozJS-60 are removed in MozJS-91.
4+
expressions and from MozJS-60 to MozJS-91. Several deprecated,
5+
non-standard array and string functions that existed in MozJS-60 are
6+
removed in MozJS-91.

source/release-notes/6.0-compatibility.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,29 @@ will receive an error message like the following:
306306

307307
.. _6.0-js-engine-change:
308308

309-
Removed Array and String Functions for Server-Side JavaScript
310-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
309+
Removed Deprecated Array and String Functions for Server-Side JavaScript
310+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
311311

312312
.. include:: /includes/fact-6.0-js-engine-change.rst
313313

314+
For the complete list of removed array and string functions, see the
315+
next sections on this page.
316+
317+
.. note:: Only Static Functions are Removed
318+
319+
Only *static* JavaScript functions are removed. *Prototype function*
320+
equivalents of the removed functions can still be used.
321+
322+
For example:
323+
324+
- ``Array.concat(<array1>, <array2>)`` is a static function and no
325+
longer works in MongoDB 6.0.
326+
- ``<array1>.concat(<array2>)`` is a prototype function and still
327+
works in MongoDB 6.0.
328+
329+
This behavior applies to both removed array and removed string
330+
functions.
331+
314332
Removed Array Functions
315333
```````````````````````
316334

0 commit comments

Comments
 (0)