Skip to content

Commit

Permalink
feat: rename validatorId to id (#248)
Browse files Browse the repository at this point in the history
* feat: rename validatorId to id

* chore: update version number

* feat: add 1.19 to supported_fdi
  • Loading branch information
porcellus authored Mar 13, 2024
1 parent abca802 commit b371289
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 19 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [19.0.0] - 2024-03-14

### Breaking changes

- Rename `validatorId` in claim validation errors to `id` to match the backend SDKs

### Changes

- Added `1.19` to the list of supported FDIs

## [18.0.2] - 2024-02-23

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion bundle/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontendDriverInterfaceSupported.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_comment": "contains a list of frontend-backend interface versions that this package supports",
"versions": [
"1.16", "1.17", "1.18"
"1.16", "1.17", "1.18", "1.19"
]
}
2 changes: 1 addition & 1 deletion lib/build/recipeImplementation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/types.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/version.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/build/version.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/ts/recipeImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export default function RecipeImplementation(recipeImplInput: {
const validationRes = await validator.validate(accessTokenPayload, input.userContext);
if (!validationRes.isValid) {
errors.push({
validatorId: validator.id,
id: validator.id,
reason: validationRes.reason
});
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export type RecipeInterface = {

export type ClaimValidationResult = { isValid: true } | { isValid: false; reason?: any };
export type ClaimValidationError = {
validatorId: string;
id: string;
reason?: any;
};

Expand Down
4 changes: 2 additions & 2 deletions lib/ts/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
export const package_version = "18.0.2";
export const package_version = "19.0.0";

export const supported_fdi = ["1.16", "1.17", "1.18"];
export const supported_fdi = ["1.16", "1.17", "1.18", "1.19"];
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supertokens-website",
"version": "18.0.2",
"version": "19.0.0",
"description": "frontend sdk for website to be used for auth solution.",
"main": "index.js",
"dependencies": {
Expand Down
10 changes: 5 additions & 5 deletions test/sessionClaims.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe("AuthHttpRequest claim handling", function () {

assert.deepEqual(await AuthHttpRequest.validateClaims(), [
{
validatorId: failingValidator.id,
id: failingValidator.id,
reason: {
message: "testReason"
}
Expand All @@ -116,7 +116,7 @@ describe("AuthHttpRequest claim handling", function () {
SessionClaimValidatorStore.addClaimValidatorFromOtherRecipe(passingValidator);
assert.deepEqual(await AuthHttpRequest.validateClaims(() => [failingValidator]), [
{
validatorId: failingValidator.id,
id: failingValidator.id,
reason: {
message: "testReason"
}
Expand Down Expand Up @@ -144,19 +144,19 @@ describe("AuthHttpRequest claim handling", function () {
]),
[
{
validatorId: failingValidator.id,
id: failingValidator.id,
reason: {
message: "testReason"
}
},
{
validatorId: "test-validator-fail2",
id: "test-validator-fail2",
reason: {
message: "testReason"
}
},
{
validatorId: "test-validator-fail3",
id: "test-validator-fail3",
reason: {
message: "testReason"
}
Expand Down

0 comments on commit b371289

Please sign in to comment.