Skip to content
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

feat: rename validatorId to id #248

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading