Socket
Socket
Sign inDemoInstall

arangojs

Package Overview
Dependencies
Maintainers
5
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arangojs - npm Package Versions

13
14

8.5.0

Diff

Changelog

Source

[8.5.0] - 2023-10-09

Added

  • Implemented hot backup API (DE-576)

  • Implemented logging API (DE-144, DE-145, DE-146, DE-147)

  • Implemented async jobs management (DE-339)

  • Added db.shutdown to initiate a clean shutdown of the server

  • Added db.time method to retrieve the server's system time

pluma4345
published 8.4.1 •

Changelog

Source

[8.4.1] - 2023-09-15

Fixed

  • Fixed default return type of AQL queries being undefined instead of any (#797)
pluma4345
published 8.4.0 •

Changelog

Source

[8.4.0] - 2023-07-10

Changed

  • Fetching additional cursor results now uses POST instead of PUT (DE-605)

    The PUT route was deprecated and the POST route is supported in all actively maintained versions of ArangoDB.

  • User management methods now use database-relative URLs (DE-606)

    Previously these methods would make requests without a database prefix, implicitly using the _system database.

  • aql template strings now take a generic type argument

    This allows explictly setting the item type of the ArrayCursor returned by db.query when using aql template strings. Note that like when setting the type on db.query directly, arangojs can make no guarantees that the type matches the actual data returned by the query.

    const numbers = await db.query(aql<{ index: number; squared: number }>`
      FOR i IN 1..1000
      RETURN {
        index: i,
        squared: i * i
      }
    `);
    const first = await numbers.next(); // { index: number; squared: number; }
    console.log(first.index, first.squared); // 1 1
    

Fixed

  • Fixed listUsers behavior (#782)

  • Fixed graph.create not correctly handling isDisjoint option

Added

  • Added missing attributes to QueryInfo and MultiExplainResult.stats types (DE-607)

  • Added cluster rebalancing methods to Database (DE-583)

  • Added db.withTransaction helper method for streaming transactions (#786)

    This method allows using streaming transactions without having to manually begin and commit or abort the transaction.

    const vertices = db.collection("vertices");
    const edges = db.collection("edges");
    const info = await db.withTransaction([vertices, edges], async (step) => {
      const start = await step(() => vertices.document("a"));
      const end = await step(() => vertices.document("b"));
      return await step(() => edges.save({ _from: start._id, _to: end._id }));
    });
    
pluma4345
published 8.3.0 •

Changelog

Source

[8.3.0] - 2023-05-11

Fixed

  • Fixed updateUser and replaceUser behavior (#783)

Added

  • Added renewAuthToken method to Database (#784)

    This method allows refreshing the authentication token passed to the useBearerAuth method or used by the login method. Note that ArangoDB will currently only return a new token if the token is going to expire in the next 150 seconds.

  • Added returnOld and mergeObjects to CollectionInsertOptions type

    These options are only available when using overwriteMode.

  • Added caching options to InvertedIndex and ArangoSearchView types

    These options were added in ArangoDB 3.10.2.

  • Added support for ArangoSearchView type storedValues shorthand notation

    Instead of using an object, attributes can also be defined as arrays of strings and arrays of arrays of strings. This was added in ArangoDB 3.10.3.

  • Added peakMemoryUsage and executionTime to SingleExplainResult.stats type

    These attributes were added in ArangoDB 3.10.4.

  • Added geo_s2 Analyzer types

    This Analyzer was added in ArangoDB 3.10.5.

  • Added refillIndexCaches option to document operation options types

    This option was added in ArangoDB 3.11.

  • Added optimizeTopK to ArangoSearchView and InvertedIndex types

    This option was added in ArangoDB 3.11.

  • Added support for allowRetry option in db.query

    This feature was added in ArangoDB 3.11.

  • Added x-arango-driver header

    The arangojs driver now correctly identifies itself to ArangoDB, allowing the ArangoGraph Insights Platform to take advantage of the driver's support for cloud-optimized behaviors.

pluma4345
published 8.2.1 •

Changelog

Source

[8.2.1] - 2023-04-05

Fixed

  • Fixed a bug in search parameter handling in the browser version

    Previously the browser version would incorrectly handle search parameters, which could result in invalid request URLs in many cases.

pluma4345
published 8.2.0 •

Changelog

Source

[8.2.0] - 2023-03-29

Changed

  • Index names are now automatically NFC-normalized (DE-506)

    This change affects all index names using unicode characters. The change has no effect when using non-unicode (ASCII) names.

    Any names used when creating/ensuring indexes or passed to any methods that expect an IndexSelector will automatically be NFC normalized.

  • Internal querystring handling logic now uses URLSearchParams instead of node querystring module

    This change should be backwards compatible but may produce different results when relying on undefined behavior in custom (e.g. Foxx) routes.

pluma4345
published 8.1.0 •

Changelog

Source

[8.1.0] - 2022-12-19

Added

  • Added support for new ArangoDB 3.9.5 cache field in ArangoSearch types
pluma4345
published 8.0.0 •

Changelog

Source

[8.0.0] - 2022-10-25

This is a major release and breaks backwards compatibility.

See the migration guide for detailed instructions for upgrading your code to arangojs v8.

Removed

  • Removed Node.js 10 and Node.js 12 support

    With Node.js 10 and 12 having reached their end of life, arangojs will no longer support these versions of Node.js going forward.

  • Removed Internet Explorer and older browser support

    As of version 8 arangojs uses the Browserlist defaults list to generate the pre-built browser bundle, which excludes older browsers and specifically all versions of Internet Explorer.

    You may still be able to use arangojs in some of the excluded browsers when bundling arangojs yourself but this may require polyfills and additional transformations.

  • Removed Dict type from connection module

    The Dict<T> type was identical to Record<string, T> and has been replaced with this built-in type across arangojs.

  • Removed workaround for ArangoDB pre-3.2.8 Foxx HTTP API responses

    When fetching or modifying the configuration or dependencies of a Foxx service using ArangoDB 3.2.7 and earlier, arangojs would perform additional operations to convert the server response to a compatible format. All affected versions of ArangoDB have reached End of Life since December 2018.

  • Removed deprecated db.useDatabase method

    The method was previously deprecated and can be replaced with db.database, which returns a new Database object instead of modifying the existing one.

  • Removed deprecated MMFiles methods and types

    The MMFiles storage engine was removed in ArangoDB 3.7.

  • Removed deprecated minReplicationFactor option from collection and database related types

    This option was renamed to writeConcern in ArangoDB 3.6.

  • Removed deprecated overwrite option from CollectionInsertOptions type

    This option was deprecated in ArangoDB 3.7 and should be replaced with the overwriteMode option.

  • Removed internal request.host attribute

    This attribute has been replaced with request.hostUrl.

  • Removed internal response.arangojsHostId attribute

    This attribute has been replaced with response.arangojsHostUrl.

  • Removed CollectionStatus and CollectionType enum re-exports

    Previously these would be re-exported by the arangojs module for backwards compatibility. If you still need to access these enums, you can import them from the collection sub-module instead. Note that the ViewType enum has been removed completely.

Changed

  • Changed default URL to http://127.0.0.1:8529 to match ArangoDB default

    Previously arangojs would use localhost which on some systems resolves to the IPv6 address ::1 instead, resulting in confusing connection errors.

  • Changed TypeScript compilation target to ES2020

    Since all evergreen browsers including Firefox ESR and all active Node.js LTS releases fully support ES2020, the compilation target for the browser bundle and Node.js has been moved from ES2016 and ES2018 respectively to ES2020.

  • Updated TypeScript to version 4.8

    This may result in type signatures that are incompatible with TypeScript 3 being added in future releases (including patch releases).

  • Changed default behavior of internal db.request method

    Previously this method would always return the full response object if no transform callback was provided. The method now defaults to a transform callback that extracts the response body instead. The previous behavior can still be forced by passing false instead of a callback function.

    This change has no effect on other methods like route.request.

  • Replaced node core module polyfills with native APIs in browser build

    As part of upgrading to webpack 5, arangojs now no longer requires node core modules to be polyfilled to work in the browser. This also drastically reduces the file size of the pre-built browser bundle arangojs/web.

  • db.query now supports a generic return type (#764)

    This allows explictly setting the item type of the ArrayCursor returned by the query without using a type assertion on the promise result. Note that arangojs can make no guarantees that the type matches the actual data returned by the query.

    const numbers = await db.query<{ index: number; squared: number }>(aql`
      FOR i IN 1..1000
      RETURN {
        index: i,
        squared: i * i
      }
    `);
    const first = await numbers.next(); // { index: number; squared: number; }
    console.log(first.index, first.squared); // 1 1
    
  • Moved aql.literal and aql.join into aql module

    Previously these were available as methods on the aql function. Now they need to be imported from the aql module.

  • Changed return values of db.getUserAccessLevel and db.getUserDatabases to match documented return types

  • Retry requests resulting in status 503 ArangoError (#710)

    Unless retries are explicitly disabled by setting config.maxRetries to false, requests will now also be retried if the server responded with a 503 ArangoError, which ArangoDB uses to indicate the server is running in maintenance mode. Previously this would always result in an error.

  • Extended CursorExtras type in TypeScript

    The types of the attributes plan, profile, and stats are now defined more explicitly.

  • Changed behavior of collection.removeAll for non-string arrays

    Previously collection.removeAll would always convert its argument into an array of document IDs and fail with an error if passed any documents had an ID not matching the collection name. Now the selector argument is passed as-is, bypassing this validation but allowing ignoreRevs to be respected by the server.

  • Extracted type ArangoSearchViewLinkOptions from ArangoSearchViewLink

    Note that ArangoSearchViewLink now represents the type of the value returned by the server, marking several properties as required.

  • Extracted type CreateArangoSearchView from ArangoSearchViewPropertiesOptions

    Note that ArangoSearchViewPropertiesOptions now includes only those options that can be updated/replaced whereas CreateArangoSearchView also includes options that can only be set during creation of a view.

  • Renamed type GraphCreateOptions to CreateGraphOptions

  • Renamed type PrimarySortCompression to Compression

  • Replaced type AnalyzerInfo and all its constituent types

    Previously each type of Analyzer was represented by an AnalyzerInfo type and (where relevant) an AnalyzerProperties type, which were used for both creating and fetching Analyzers. The new types more closely follow the pattern already used for index types, providing pairs of CreateAnalyzerOptions and AnalyzerDescription types.

  • Removed enum ViewType, type ArangoSearchView and changed View class to be non-generic

    The View class now behaves analogous to the Analyzer class. The various types related to different view types have been restructured to more closely follow the pattern used for indexes and analyzers.

Deprecated

  • Deprecated EnsureFulltextIndexOptions and FulltextIndex types

    Fulltext indexes have been deprecated in ArangoDB 3.10 and should be replaced with ArangoSearch.

  • Deprecated BytesAccumConsolidationPolicy type

    The bytes_accum consolidation policy for views was deprecated in ArangoDB 3.7 and should be replaced with the tier consolidation policy. The type is also no longer supported in ArangoSearchViewPropertiesOptions.

Added

  • Added toJSON method to system errors

    ArangoJS already adds the request object to system errors encountered while attempting to make network requests. This change makes it easier to serialize these error objects to JSON the same way ArangoError and HttpError objects can already be serialized.

  • Added allowDirtyRead option to db.beginTransaction, trx.commit, trx.abort, collection.edges, collection.inEdges, collection.outEdges

    The option is only respected by read-only requests.

  • Added support for ifMatch and ifNoneMatch options (#707)

  • Added overwrite option to db.acquireHostList (#711)

    Setting this option to true will replace the current host list, removing any hosts no longer present in the cluster.

  • Added new ArangoDB 3.10 legacyPolygons option to EnsureGeoIndexOptions and GeoIndex types

    Geo indexes created in ArangoDB pre-3.10 will implicitly default this option to true. ArangoDB 3.10 and later will default to false and use the new parsing rules for geo indexes.

  • Added support for new ArangoDB 3.10 cacheEnabled and storedValues options in persistent indexes

  • Added support for new ArangoDB 3.10 computed values in collections

  • Added support for new ArangoDB 3.10 InvertedIndex type

  • Added support for new ArangoDB 3.10 offset Analyzer feature

  • Added support for new ArangoDB 3.10 minhash, classification and nearest_neighbors Analyzer types

  • Added missing replicationFactor and writeConcern options to CollectionPropertiesOptions type

  • Added missing commitIntervalMsec option to ArangoSearchViewProperties type

  • Added missing deduplicate option to EnsurePersistentIndexOptions type (#771)

  • Added missing unique option to EnsureZkdIndexOptions type

  • Added missing deduplicate and estimates fields to PersistentIndex type

  • Added new ArangoDB 3.10 db.queryRules method

  • Added support for Analyzer in aql templates

    Analyzer objects can now be passed into aql templates like View and ArangoCollection objects.

  • Added retryOnConflict option to Config

    If set to any number, this value will be used as the default value for all requests unless explicitly overridden when using db.query or route.request.

pluma4345
published 8.0.0-rc.1 •

pluma
published 7.8.0 •

Changelog

Source

[7.8.0] - 2022-05-19

Added

  • Added retryOnConflict option to db.query and route.request

    This option allows specifying the number of times the request will be retried if it results in a write-write conflict.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc