mirror of https://gitee.com/bigwinds/arangodb
46 lines
1.7 KiB
Plaintext
46 lines
1.7 KiB
Plaintext
!CHAPTER Incompatible changes in ArangoDB 2.8
|
|
|
|
It is recommended to check the following list of incompatible changes **before**
|
|
upgrading to ArangoDB 2.8, and adjust any client programs if necessary.
|
|
|
|
|
|
!SECTION Miscellaneous changes
|
|
|
|
!SUBSECTION Module resolution
|
|
|
|
The behaviour of the JavaScript module resolution used by the `require` function has
|
|
been modified to improve compatibility with modules written for Node.js.
|
|
|
|
Specifically
|
|
|
|
* absolute paths (e.g. `/some/absolute/path`) are now always interpreted as absolute
|
|
file system paths, relative to the file system root
|
|
|
|
* global names (e.g. `global/name`) are now first intepreted as references to modules
|
|
residing in a relevant `node_modules` folder, a built-in module or a matching
|
|
document in the internal `_modules` collection, and only resolved to local file paths
|
|
if no other match is found
|
|
|
|
Previously the two formats were treated interchangeably and would be resolved to local
|
|
file paths first, leading to problems when local files used the same names as other
|
|
modules (e.g. a local file `chai.js` would cause problems when trying to load the
|
|
`chai` module installed in `node_modules`).
|
|
|
|
For more information see the [blog announcement of this change](https://www.arangodb.com/blog/).
|
|
|
|
!SUBSECTION Module `org/arangodb/request`
|
|
|
|
The module now always returns response bodies, even for error responses. In versions
|
|
prior to 2.8 the module would silently drop response bodies if the response header
|
|
indicated an error.
|
|
|
|
The old behaviour of not returning bodies for error responses can be restored by
|
|
explicitly setting the option `returnBodyOnError` to `false`:
|
|
|
|
```js
|
|
let response = request({
|
|
//...
|
|
returnBodyOnError: false
|
|
});
|
|
```
|