Skip to content

Commit 875f5a3

Browse files
author
Federico Builes
authored
Merge pull request #28 from smorimoto/fix-job-type
Fix possible exceptions by matching the type of Snapshot job to the spec
2 parents 274f900 + 5918e1d commit 875f5a3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

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

src/snapshot.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('Snapshot', () => {
3232
version: '0.0.1'
3333
},
3434
context,
35-
{ id: 42, correlator: 'test' },
35+
{ id: '42', correlator: 'test' },
3636
new Date('2022-06-04T05:07:06.457Z')
3737
)
3838
snapshot.addManifest(manifest)
@@ -44,7 +44,7 @@ describe('Snapshot', () => {
4444
},
4545
version: 0,
4646
job: {
47-
id: 42,
47+
id: '42',
4848
correlator: 'test'
4949
},
5050
ref: 'foo/bar/baz',

src/snapshot.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Core functionality for creating a snapshot of a project's dependencies.
1616
*/
1717
export type Job = {
1818
correlator: string
19-
id: string | number
19+
id: string
2020
html_url?: string // eslint-disable-line camelcase
2121
}
2222

0 commit comments

Comments
 (0)