-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Release 0.8.4 - TypeScript refactor #57
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* chore: rename test script to test-ci + update Travis to run ci script * chore: add back old simpler test script * chore: fix invalid Travis script npm command
* feat: add publicKey param to PackageInitParams type `publicKey` and `mode` is typed to be mutually exclusive (for now, foresee removing mode entirely in the future). * feat: add comment on new PackageInitParams shape in init function * feat: use publicKey if given in PackageInitParams If not given, then the app will fallback to its previous implementation and use the static public keys. * feat: add `homeno` possible field type in FieldType type That's a lot of typing type.
* feat: add new errors.ts file containing MissingSecretKeyError * feat: add util/webhooks.ts for helper methods used by Webhooks class * feat: rewrite webhooks.ts functions as Webhooks class and use in init * test(Webhooks): update tests to use new class based instantiation * test: extract out commonly used functions across tests * feat: add WebhookAuthenticateError class * test: add tests for 100% coverage of Webhooks class * refactor: move webhook signature malform check into util
* feat: add util/crypto.ts for helper methods used by new Crypto class * feat: rewrite crypto.ts functions as Crypto class and use in init * feat: update thrown error name in JSDoc of Webhook.authenticate * test(Crypto): update tests to use new class based instantiation * refactor(Crypto): change constructor to optional `publicSigningKey` Instead of `publicKey`, `publicSigningKey` makes it more obvious of what the use of the key is for. Making constructor optional also allows users of the library to encrypt and decrypt without having to provide a public signing key if they do not want to and still be able to decrypt content without verified fields. Note that the default package initialisation still instantiates the library with a fallback key. * refactor: allow optional constructor params * test(Crypto): add tests for 100% coverage * refactor: update import order * test: remove misleading comment
* fix(errors): remove typo in error messages * refactor: move separate verification functions into utils file * refactor: move verification publicKey retrieval into publicKey util * feat: rewrite verification.ts functions as Verification class * refactor: use Verification class in package init * test: add verification/utils tests * test: rewrite verification tests to use new Verification class * feat: add check for malformed auth payload * test: add tests for new package initialisation (#39) * test: add tests for package initialisation * test: fix weird expected keys * test: add better comments for publicKey test
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: update webhook's generateSignature undefined checks * chore: update FormField type link in README
Our GitHub repo name should be identical to the package name. This commit should be accompanied by a repo rename.
…meter is used (#51) * chore: Update JSDoc and print warning message if deprecated mode parameter is used to initialize FormSG SDK * Update src/index.ts Co-authored-by: Yuan Ruo <yuanruo@data.gov.sg> * update README.md file Co-authored-by: Yuan Ruo <yuanruo@data.gov.sg>
* feat!: split out publicKey param to distinct signing+verification keys * feat: remove deprecated tag from old JSDoc this prevents the entire formsg sdk module from being marked as deprecated * ref!: continue using mode init parameter * test(verification): fix test init parameters * test(init): add test cases for parameter instantiation * docs: revert README update about publicKey init params This partly reverts commit bccad0a. * fix: remove export default * feat: add documentation on what the various keys are used for
liangyuanruo
changed the title
Release 0.8.4 - TypeScript refactor, build optimisation
build: Release 0.8.4 - TypeScript refactor, build optimisation
Feb 23, 2021
liangyuanruo
changed the title
build: Release 0.8.4 - TypeScript refactor, build optimisation
build: Release 0.8.4 - TypeScript refactor
Feb 23, 2021
karrui
approved these changes
Feb 23, 2021
There was a problem hiding this comment.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improvements