diff --git a/lib/logger/config-serializer.js b/lib/logger/config-serializer.js index 7c67090c52..e49adada4c 100644 --- a/lib/logger/config-serializer.js +++ b/lib/logger/config-serializer.js @@ -33,6 +33,9 @@ function configSerializer(config) { if (val && contentFields.includes(this.key)) { this.update('[content]'); } + if (val && this.key === 'releases') { + this.update(val.map(release => release.version)); + } // istanbul ignore if if (val && arrayFields.includes(this.key)) { this.update('[Array]'); diff --git a/test/logger/__snapshots__/config-serializer.spec.js.snap b/test/logger/__snapshots__/config-serializer.spec.js.snap index 75f1a41fae..de67f5a5ea 100644 --- a/test/logger/__snapshots__/config-serializer.spec.js.snap +++ b/test/logger/__snapshots__/config-serializer.spec.js.snap @@ -8,6 +8,15 @@ Object { } `; +exports[`logger/config-serializer simplifies releases 1`] = ` +Object { + "releases": Array [ + "1.0.0-rc.2", + "1.0.0-rc.3", + ], +} +`; + exports[`logger/config-serializer squashes templates 1`] = ` Object { "nottoken": "b", diff --git a/test/logger/config-serializer.spec.js b/test/logger/config-serializer.spec.js index 8265ab1f87..961af464f0 100644 --- a/test/logger/config-serializer.spec.js +++ b/test/logger/config-serializer.spec.js @@ -22,4 +22,23 @@ describe('logger/config-serializer', () => { }; expect(configSerializer(config)).toMatchSnapshot(); }); + it('simplifies releases', () => { + const config = { + releases: [ + { + version: '1.0.0-rc.2', + gitRef: 'f6fd3d463e4a1c70dd7c2b2e4ea8637ccb05f2c7', + time: '2018-06-18T21:18:58.840Z', + canBeUnpublished: false, + }, + { + version: '1.0.0-rc.3', + gitRef: 'da10c705e55c03dbbeeefa7f30e86225b10a7b82', + time: '2018-06-26T19:12:38.659Z', + canBeUnpublished: true, + }, + ], + }; + expect(configSerializer(config)).toMatchSnapshot(); + }); });