createIndex no longer tolerates [key1, key2]

I’m using 3.6.2 of the node driver

I’m not sure if this is a bug, or a documentation problem, ensureIndex used to allow [key1, key2] and would parse it internally to { key1: 1, key2: 1 }. This is no longer the case with createIndex - while createIndex("key1") and createIndex([["key1",1],["key2", 1]]) still work.

The reason I suspect this is a bug/documentation problem is the implementation of parseIndexOptions still seems to support the [key1, key2] syntax - but isn’t being invoked by the CreateIndexesCommand because this clause fails: if (!Array.isArray(indexes) || Array.isArray(indexes[0])) {

I’ve looked ahead at future versions (hard because of the switch to typescript) and this doesn’t appear to be fixed. Nor can I find any documentation on this “breaking” change in behaviour.

Is this intended?