amplify-cli
amplify-cli copied to clipboard
feat: implement .autoUlid for testing purposes
Description of changes
Add $util.autoUlid()
function for Velocity template testing purposes.
Issue #, if available
Description of how you validated changes
Check the response has a Ulid format. Currently 26 characters from the spec
Checklist
- [x] PR description included
- [x]
yarn test
passes - [x] Tests are changed or added
- [ ] Relevant documentation is changed or added (and PR referenced)
- [ ] New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Hey @ebisbe - thanks for the contribution! Since this pull request is introducing a new dependency, we need to discuss with the team. I will keep you posted with updates.
Hi @danielleadams,
I can add it as a PeerDependency, that should work right? Also I wanted to add the new
$util.autoKsuid() : String
Returns a 128-bit randomly generated KSUID (K-Sortable Unique Identifier) base62 encoded as a String with a length of 27.
Maybe you can discuss both cases as it would add a newer dependency as well.
@ebisbe running our test suite on this and the I can approve. Thanks for your patience here! (This might need to be rebased because we changed some packages names, but lets see if it works)
UPDATE: can confirm it needs a rebase.
@danielleadams I just saw your EDIT by chance ( edits don't trigger email notifications ). Do I need to do something for the rebase?
@ebisbe the PR needs to be rebased on dev
.
@danielleadams done
Thanks @ebisbe - running our test suite on it and then this will be ready to merge.
@ebisbe Following up, it looks like there are a few merge conflicts that need to be resolved. We'd love to get this merged in. Would you mind tagging one of us once you have those resolved and we'll work to get this merged?
@sdstolworthy Merge conflict resolved.