@sprucelabs/jest-sheets-reporter 2.0.21 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,4 +56,21 @@ You can change the look of a cell by using conditional formatting:
56
56
 
57
57
  Then we set the background and the text color based on the value being exactly `1` or `0`.
58
58
 
59
- <img src="https://raw.githubusercontent.com/sprucelabsai/jest-sheets-reporter/master/docs/images/stylerules.png">
59
+ <img src="https://raw.githubusercontent.com/sprucelabsai/jest-sheets-reporter/master/docs/images/stylerules.png">
60
+
61
+
62
+ ## Getting your account credentials
63
+
64
+ 1. Visit the [Google Console](https://console.developers.google.com/)
65
+ 2. Create a new project, call it Test Integrations
66
+ 3. After creation, go to the project dashboard and in the left meno go "API's & Services" -> "Enabled API's & Services"
67
+ 4. Click "+ Enable API's and Services"
68
+ 5. Find sheets and enable it.
69
+ 6. After save, click "Create Credentials" in the upper right.
70
+ 7. Give it a name, leave everything else blank and save
71
+ 9. On the service account details page, click "KEYS" tab
72
+ 10. Click Add Key -> JSON
73
+ 11. Take the download private key and open it
74
+ 12. client_email -> GOOGLE_SERVICE_EMAIL
75
+ 13. private_key -> GOOGLE_SERVICE_PRIVATE_KEY
76
+ 14. Remember to invite the service email to any spreadsheet you want it to update!
@@ -4,7 +4,8 @@
4
4
  },
5
5
  "writer": {
6
6
  "skipped": [
7
- "tsconfig.json"
7
+ "tsconfig.json",
8
+ ".nvmrc"
8
9
  ]
9
10
  }
10
11
  }
@@ -10,8 +10,8 @@ const sheetsAdapterPath = SheetsReporterUtility_1.SheetsReporterUtility.resolveA
10
10
  const AdapterClass = require(sheetsAdapterPath).default;
11
11
  class AbstractSheetsReporterTest extends test_1.default {
12
12
  }
13
- exports.default = AbstractSheetsReporterTest;
14
13
  AbstractSheetsReporterTest.sheetsAdapter = new AdapterClass({
15
14
  serviceEmail: process.env.GOOGLE_SERVICE_EMAIL_TEST,
16
15
  privateKey: process.env.GOOGLE_SERVICE_PRIVATE_KEY_TEST,
17
16
  });
17
+ exports.default = AbstractSheetsReporterTest;
@@ -21,5 +21,5 @@ class SheetsReporterDummyAdapter extends TestAdapter_1.default {
21
21
  }
22
22
  async deleteWorksheet() { }
23
23
  }
24
- exports.default = SheetsReporterDummyAdapter;
25
24
  SheetsReporterDummyAdapter.cellCache = {};
25
+ exports.default = SheetsReporterDummyAdapter;
@@ -43,7 +43,7 @@ class SheetsReporterGoogleAdapter {
43
43
  resolve();
44
44
  }
45
45
  catch (err) {
46
- const isBadKey = err.reason === 'no start line';
46
+ const isBadKey = err.reason === 'no start line' || err.code === 'ERR_OSSL_UNSUPPORTED';
47
47
  if (isBadKey) {
48
48
  reject(new Error(`Bad private key! Checkout this for next steps:\n\nhttps://theoephraim.github.io/node-google-spreadsheet/#/getting-started/authentication`));
49
49
  return;
@@ -25,5 +25,5 @@ class SheetsReporterTestAdapter extends GoogleAdapter_1.default {
25
25
  return this.uncachedFetchSpreadsheet(sheetId);
26
26
  }
27
27
  }
28
- exports.default = SheetsReporterTestAdapter;
29
28
  SheetsReporterTestAdapter.randomCount = 0;
29
+ exports.default = SheetsReporterTestAdapter;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "@sprucelabs/resolve-path-aliases"
14
14
  ]
15
15
  },
16
- "version": "2.0.21",
16
+ "version": "3.0.1",
17
17
  "main": "./build/SheetsReporter.js",
18
18
  "types": "./build/SheetsReporter.d.ts",
19
19
  "description": "Have your Jest tests update a Google Spreadsheet™®©. 📡",
@@ -61,22 +61,22 @@
61
61
  "retry": "^0.13.1"
62
62
  },
63
63
  "devDependencies": {
64
- "@sprucelabs/resolve-path-aliases": "^1.0.244",
64
+ "@sprucelabs/resolve-path-aliases": "^1.1.123",
65
65
  "@sprucelabs/semantic-release": "^4.0.8",
66
- "@sprucelabs/test": "^7.7.381",
67
- "@types/google-spreadsheet": "^3.3.0",
68
- "@types/node": "^18.11.9",
66
+ "@sprucelabs/test": "^7.7.434",
67
+ "@types/google-spreadsheet": "^3.3.1",
68
+ "@types/node": "^18.15.10",
69
69
  "chokidar-cli": "^3.0.0",
70
- "concurrently": "^7.5.0",
71
- "eslint": "^8.26.0",
72
- "eslint-config-spruce": "^10.11.4",
73
- "jest": "^29.2.2",
70
+ "concurrently": "^7.6.0",
71
+ "eslint": "^8.36.0",
72
+ "eslint-config-spruce": "^10.12.0",
73
+ "jest": "^29.5.0",
74
74
  "jest-reporters": "^0.0.2",
75
- "prettier": "^2.7.1",
75
+ "prettier": "^2.8.7",
76
76
  "ts-node": "^10.9.1",
77
- "tsc-watch": "^5.0.3",
78
- "tsconfig-paths": "^4.1.0",
79
- "typescript": "^4.8.4"
77
+ "tsc-watch": "^6.0.0",
78
+ "tsconfig-paths": "^4.1.2",
79
+ "typescript": "^5.0.2"
80
80
  },
81
81
  "jest": {
82
82
  "testTimeout": 300000,