Skip to content

Commit

Permalink
fix: fix the type of the builder in function overrides (#247)
Browse files Browse the repository at this point in the history
* fix: fix the type of the builder in function overrides

* chore: update changelog and version
  • Loading branch information
porcellus authored Feb 23, 2024
1 parent 4e0e9fa commit a823bde
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [18.0.2] - 2024-02-23

### Fixes

- Fix the type of the `builder` object the function override callback gets. It is not longer optional.

## [18.0.1] - 2024-02-06

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 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.

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

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

4 changes: 2 additions & 2 deletions lib/ts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export type InputType = {
override?: {
functions?: (
originalImplementation: RecipeInterface,
builder?: OverrideableBuilder<RecipeInterface>
builder: OverrideableBuilder<RecipeInterface>
) => RecipeInterface;
};
};
Expand All @@ -86,7 +86,7 @@ export type NormalisedInputType = {
override: {
functions: (
originalImplementation: RecipeInterface,
builder?: OverrideableBuilder<RecipeInterface>
builder: OverrideableBuilder<RecipeInterface>
) => RecipeInterface;
};
};
Expand Down
6 changes: 2 additions & 4 deletions lib/ts/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,8 @@ export function validateAndNormaliseInputOrThrowError(options: InputType): Norma
onHandleEvent = options.onHandleEvent;
}

let override: {
functions: (originalImplementation: RecipeInterface) => RecipeInterface;
} = {
functions: oI => oI,
let override = {
functions: (oI: RecipeInterface) => oI,
...options.override
};

Expand Down
2 changes: 1 addition & 1 deletion 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.1";
export const package_version = "18.0.2";

export const supported_fdi = ["1.16", "1.17", "1.18"];
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.1",
"version": "18.0.2",
"description": "frontend sdk for website to be used for auth solution.",
"main": "index.js",
"dependencies": {
Expand Down

0 comments on commit a823bde

Please sign in to comment.