Repository: godaddy/kubernetes-external-secrets (js)

Issue:
2.2.0 Failing with TypeError: Cannot destructure property `versionStage` of 'undefined' or 'null'.
@furikake @Flydiverny 2.2.0 poller is failing for ExternalSecrets WITHOUT the new `versionStage` property with error:
`TypeError: Cannot destructure property `versionStage` of 'undefined' or 'null'.`

I will open a PR if I fix it locally.

Pull request description:
Add empty keyOptions for dataFrom case.
Resolves #220.

Patch:
diff --git a/lib/backends/kv-backend.js b/lib/backends/kv-backend.js
index e7820ca..7762e1d 100644
--- a/lib/backends/kv-backend.js
+++ b/lib/backends/kv-backend.js
@@ -60,7 +60,7 @@ class KVBackend extends AbstractBackend {
    */
   _fetchDataFromValues ({ dataFrom, specOptions }) {
     return Promise.all(dataFrom.map(async key => {
-      const value = await this._get({ key, specOptions })
+      const value = await this._get({ key, specOptions, keyOptions: {} })
 
       try {
         return JSON.parse(value)
diff --git a/package-lock.json b/package-lock.json
index b76e85c..7802361 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6805,7 +6805,7 @@
     },
     "sprintf-js": {
       "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
       "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
     },
     "sshpk": {


Test patch:
diff --git a/lib/backends/kv-backend.test.js b/lib/backends/kv-backend.test.js
index 9f4b0eb..a0c5ee2 100644
--- a/lib/backends/kv-backend.test.js
+++ b/lib/backends/kv-backend.test.js
@@ -192,6 +192,7 @@ describe('kv-backend', () => {
 
       expect(kvBackend._get.getCall(0).args[0]).to.deep.equal({
         key: 'fakePropertyKey1',
+        keyOptions: {},
         specOptions: { passMeAlong: true }
       })
       expect(dataFromValues).deep.equals([undefined])
@@ -208,10 +209,12 @@ describe('kv-backend', () => {
 
       expect(kvBackend._get.getCall(0).args[0]).to.deep.equal({
         key: 'fakePropertyKey1',
+        keyOptions: {},
         specOptions: { roleArn: 'secretDescriptiorRole' }
       })
       expect(kvBackend._get.getCall(1).args[0]).to.deep.equal({
         key: 'fakePropertyKey2',
+        keyOptions: {},
         specOptions: { roleArn: 'secretDescriptiorRole' }
       })
       expect(dataFromValues).deep.equals([{ fakePropertyName1: 'fakePropertyValue1' }, { fakePropertyName2: 'fakePropertyValue2' }])