Skip to content

Commit 3117964

Browse files
authored
chore(deps): remove cryo (#5179)
1 parent 213dc1b commit 3117964

File tree

5 files changed

+9
-16
lines changed

5 files changed

+9
-16
lines changed

core/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"cli-truncate": "^2.1.0",
5454
"cpy": "^8.1.2",
5555
"cross-spawn": "^7.0.3",
56-
"cryo": "0.0.6",
5756
"crypto-random-string": "^3.3.1",
5857
"date-fns": "^2.29.3",
5958
"dedent": "^0.7.0",
@@ -247,8 +246,8 @@
247246
"md5": "^2.3.0",
248247
"mocha": "^10.2.0",
249248
"nock": "^12.0.3",
250-
"nodemon": "^2.0.15",
251249
"node-fetch": "^2.7.0",
250+
"nodemon": "^2.0.15",
252251
"nyc": "^15.1.0",
253252
"p-event": "^4.2.0",
254253
"peggy": "^3.0.2",

core/src/plugins/kubernetes/run-results.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export const k8sGetRunResult: RunActionHandler<"getResult", any> = async (params
6565
}
6666

6767
export function getRunResultKey(ctx: PluginContext, action: Action) {
68-
const key = `${ctx.projectName}--${action.type}.${action.name}--${action.versionString()}`
68+
// change the result format version if the result format changes breaking backwards-compatibility e.g. serialization format
69+
const resultFormatVersion = 1
70+
const key = `${ctx.projectName}--${action.type}.${action.name}--${action.versionString()}--${resultFormatVersion}`
6971
const hash = hasha(key, { algorithm: "sha1" })
7072
return `run-result--${hash.slice(0, 32)}`
7173
}

core/src/plugins/kubernetes/test-results.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export const k8sGetTestResult: TestActionHandler<"getResult", any> = async (para
5757
}
5858

5959
export function getTestResultKey(ctx: PluginContext, action: StoreTestResultParams["action"]) {
60-
const key = `${ctx.projectName}--${action.name}--${action.versionString()}`
60+
// change the result format version if the result format changes breaking backwards-compatibility e.g. serialization format
61+
const resultFormatVersion = 1
62+
const key = `${ctx.projectName}--${action.name}--${action.versionString()}--${resultFormatVersion}`
6163
const hash = hasha(key, { algorithm: "sha1" })
6264
return `test-result--${hash.slice(0, 32)}`
6365
}

core/src/util/serialization.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
import { mapValues } from "lodash"
10-
import Cryo from "cryo"
1110
import { writeFile } from "fs-extra"
1211
import { DumpOptions, dump } from "js-yaml"
1312
import highlight from "cli-highlight"
@@ -50,11 +49,11 @@ export async function dumpYamlMulti(yamlPath: string, objects: object[]) {
5049
}
5150

5251
export function serializeObject(o: any): string {
53-
return Buffer.from(Cryo.stringify(o)).toString("base64")
52+
return Buffer.from(JSON.stringify(o)).toString("base64")
5453
}
5554

5655
export function deserializeObject(s: string) {
57-
return Cryo.parse(Buffer.from(s, "base64"))
56+
return JSON.parse(Buffer.from(s, "base64").toString())
5857
}
5958

6059
export function serializeValues(o: { [key: string]: any }): { [key: string]: string } {

package-lock.json

-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)