Skip to content

downcase OCI identifiers and validate input of getRef()#293

Merged
joshspicer merged 7 commits into
mainfrom
joshspicer/validate-oci-identifiers
Nov 28, 2022
Merged

downcase OCI identifiers and validate input of getRef()#293
joshspicer merged 7 commits into
mainfrom
joshspicer/validate-oci-identifiers

Conversation

@joshspicer

@joshspicer joshspicer commented Nov 21, 2022

Copy link
Copy Markdown
Member

Downcases the identifier input string (context: oras-project/oras#679)

Additionally, be more strict about what the Feature/Template OCI identifiers that we parse. getRef() now returned undefined if the parsed components don't match the regular expressions provided in the OCI distribution spec.

Adds new tests to assert this behavior.

NOTE: This isn't perfect yet, but an improvement. Left two TODOs inline.

relevant:

@joshspicer joshspicer marked this pull request as ready for review November 22, 2022 22:04
@joshspicer joshspicer requested a review from a team as a code owner November 22, 2022 22:04
Comment thread src/spec-configuration/containerCollectionsOCI.ts Outdated
@joshspicer joshspicer changed the title validate input of getRef() downcase OCI identifiers and validate input of getRef() Nov 23, 2022

@chrmarti chrmarti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants