Skip to content

Commit

Permalink
[Hexpm] Fix badges for pre-release only versions (#10112)
Browse files Browse the repository at this point in the history
* test: make existing test fail

* fix: allow null values for latest_stable_version
  • Loading branch information
sheerlox authored Apr 24, 2024
1 parent d6dde3f commit edae807
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion services/hexpm/hexpm.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const hexSchema = Joi.object({
meta: Joi.object({
licenses: Joi.array().required(),
}).required(),
latest_stable_version: Joi.string(),
latest_stable_version: Joi.string().allow(null),
latest_version: Joi.string().required(),
}).required()

Expand Down
1 change: 1 addition & 0 deletions services/hexpm/hexpm.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ t.create('version (no stable version)')
.get('/api/packages/prima_opentelemetry_ex')
.reply(200, {
downloads: { all: 100 },
latest_stable_version: null,
latest_version: '1.0.0-rc.3',
meta: { licenses: ['MIT'] },
}),
Expand Down

0 comments on commit edae807

Please sign in to comment.