Skip to content

Commit

Permalink
chore: small fixes (#791)
Browse files Browse the repository at this point in the history
## Description
small TS related fixes
  • Loading branch information
asafshen authored Sep 15, 2024
1 parent bc3ba3a commit f57819e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 34 deletions.
61 changes: 32 additions & 29 deletions packages/sdks/nextjs-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,83 +24,86 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/s

### Dependency Updates

* `react-sdk` updated to version `2.0.71`
- `react-sdk` updated to version `2.0.71`

## [0.2.4](https://github.com/descope/descope-js/compare/nextjs-sdk-0.2.3...nextjs-sdk-0.2.4) (2024-09-03)

### Dependency Updates

* `web-js-sdk` updated to version `1.16.4`
* `react-sdk` updated to version `2.0.70`
* `core-js-sdk` updated to version `2.24.4`
* `web-component` updated to version `3.24.1`
- `web-js-sdk` updated to version `1.16.4`
- `react-sdk` updated to version `2.0.70`
- `core-js-sdk` updated to version `2.24.4`
- `web-component` updated to version `3.24.1`

## [0.2.3](https://github.com/descope/descope-js/compare/nextjs-sdk-0.2.2...nextjs-sdk-0.2.3) (2024-09-02)

### Dependency Updates

* `react-sdk` updated to version `2.0.69`
* `web-component` updated to version `3.24.0`
- `react-sdk` updated to version `2.0.69`
- `web-component` updated to version `3.24.0`

### Bug Fixes

* issue 7532 RELEASE ([#788](https://github.com/descope/descope-js/issues/788)) ([635a053](https://github.com/descope/descope-js/commit/635a0532a23e7a5bf8f557a0400ddd1c64c81696))
- issue 7532 RELEASE ([#788](https://github.com/descope/descope-js/issues/788)) ([635a053](https://github.com/descope/descope-js/commit/635a0532a23e7a5bf8f557a0400ddd1c64c81696))

## [0.2.2](https://github.com/descope/descope-js/compare/nextjs-sdk-0.2.1...nextjs-sdk-0.2.2) (2024-08-20)

### Dependency Updates

* `web-js-sdk` updated to version `1.16.3`
* `react-sdk` updated to version `2.0.68`
* `core-js-sdk` updated to version `2.24.3`
* `web-component` updated to version `3.23.2`
- `web-js-sdk` updated to version `1.16.3`
- `react-sdk` updated to version `2.0.68`
- `core-js-sdk` updated to version `2.24.3`
- `web-component` updated to version `3.23.2`

## [0.2.1](https://github.com/descope/descope-js/compare/nextjs-sdk-0.2.0...nextjs-sdk-0.2.1) (2024-08-15)

### Dependency Updates

* `react-sdk` updated to version `2.0.67`
* `web-component` updated to version `3.23.1`
- `react-sdk` updated to version `2.0.67`
- `web-component` updated to version `3.23.1`

## [0.2.0](https://github.com/descope/descope-js/compare/nextjs-sdk-0.1.0...nextjs-sdk-0.2.0) (2024-08-14)

### Dependency Updates

* `web-js-sdk` updated to version `1.16.2`
* `react-sdk` updated to version `2.0.66`
* `core-js-sdk` updated to version `2.24.2`
* `web-component` updated to version `3.23.0`
- `web-js-sdk` updated to version `1.16.2`
- `react-sdk` updated to version `2.0.66`
- `core-js-sdk` updated to version `2.24.2`
- `web-component` updated to version `3.23.0`

### Features

* support multi style and style prop ([#744](https://github.com/descope/descope-js/issues/744)) ([7d153ec](https://github.com/descope/descope-js/commit/7d153ec7a447f038ee716746a85f1193e8a0f357))
- support multi style and style prop ([#744](https://github.com/descope/descope-js/issues/744)) ([7d153ec](https://github.com/descope/descope-js/commit/7d153ec7a447f038ee716746a85f1193e8a0f357))

## [0.1.0](https://github.com/descope/descope-js/compare/nextjs-sdk-0.0.23...nextjs-sdk-0.1.0) (2024-08-09)


### Features

* Added Private Routes to Next JS SDK ([#770](https://github.com/descope/descope-js/issues/770)) ([ccf6976](https://github.com/descope/descope-js/commit/ccf6976bc07f1ae8fb45bfbc9a5454cba788721f))
- Added Private Routes to Next JS SDK ([#770](https://github.com/descope/descope-js/issues/770)) ([ccf6976](https://github.com/descope/descope-js/commit/ccf6976bc07f1ae8fb45bfbc9a5454cba788721f))

## [0.0.23](https://github.com/descope/descope-js/compare/nextjs-sdk-0.0.22...nextjs-sdk-0.0.23) (2024-08-08)

### Dependency Updates

* `react-sdk` updated to version `2.0.65`
* `web-component` updated to version `3.22.2`
- `react-sdk` updated to version `2.0.65`
- `web-component` updated to version `3.22.2`

### Bug Fixes

* polling when there is a fetch error RELEASE ([#776](https://github.com/descope/descope-js/issues/776)) ([0999164](https://github.com/descope/descope-js/commit/099916447bee3c5e3fe83e70bc01890e12485df2))
- polling when there is a fetch error RELEASE ([#776](https://github.com/descope/descope-js/issues/776)) ([0999164](https://github.com/descope/descope-js/commit/099916447bee3c5e3fe83e70bc01890e12485df2))

## [0.0.22](https://github.com/descope/descope-js/compare/nextjs-sdk-0.0.21...nextjs-sdk-0.0.22) (2024-08-07)

### Dependency Updates

* `web-js-sdk` updated to version `1.16.1`
* `react-sdk` updated to version `2.0.64`
* `core-js-sdk` updated to version `2.24.1`
* `web-component` updated to version `3.22.1`
- `web-js-sdk` updated to version `1.16.1`
- `react-sdk` updated to version `2.0.64`
- `core-js-sdk` updated to version `2.24.1`
- `web-component` updated to version `3.22.1`

### Bug Fixes

* Issue6274 RELEASE ([#774](https://github.com/descope/descope-js/issues/774)) ([1c4b646](https://github.com/descope/descope-js/commit/1c4b64687da48d62339ccb78c2e8fde04e46e8b5))
- Issue6274 RELEASE ([#774](https://github.com/descope/descope-js/issues/774)) ([1c4b646](https://github.com/descope/descope-js/commit/1c4b64687da48d62339ccb78c2e8fde04e46e8b5))

## [0.0.21](https://github.com/descope/descope-js/compare/nextjs-sdk-0.0.20...nextjs-sdk-0.0.21) (2024-08-04)

Expand Down
3 changes: 1 addition & 2 deletions packages/sdks/nextjs-sdk/examples/app-router/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { authMiddleware } from '@descope/nextjs-sdk/server';

export default authMiddleware({
projectId: process.env.NEXT_PUBLIC_DESCOPE_PROJECT_ID,
baseUrl: process.env.NEXT_PUBLIC_DESCOPE_BASE_URL,
baseStaticUrl: process.env.NEXT_PUBLIC_DESCOPE_BASE_STATIC_URL
baseUrl: process.env.NEXT_PUBLIC_DESCOPE_BASE_URL
});

export const config = {
Expand Down
2 changes: 1 addition & 1 deletion packages/sdks/nextjs-sdk/src/server/authMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const isPublicRoute = (req: NextRequest, options: MiddlewareOptions) => {
// Ensure publicRoutes and privateRoutes are arrays, defaulting to empty arrays if not defined
const publicRoutes = options.publicRoutes || [];
const privateRoutes = options.privateRoutes || [];

const isDefaultPublicRoute = Object.values(DEFAULT_PUBLIC_ROUTES).includes(
req.nextUrl.pathname
);
Expand Down
2 changes: 2 additions & 0 deletions packages/sdks/react-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ See bellow for an `.env` file template with more information.

### Run Example

Note: Due to an issue with react-sdk tsconfig, you need to remove `"examples"` from the `exclude` field in the `tsconfig.json` file in the root of the project before running the example.

Run the following command in the root of the project to build and run the example:

```bash
Expand Down
4 changes: 2 additions & 2 deletions packages/sdks/react-sdk/examples/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { AuthProvider } from '../../src';
import App from './App';

const container = document.getElementById('root');
const root = createRoot(container);
const root = createRoot(container!);

root.render(
<BrowserRouter>
<AuthProvider
projectId={process.env.DESCOPE_PROJECT_ID}
projectId={process.env.DESCOPE_PROJECT_ID!}
baseUrl={process.env.DESCOPE_BASE_URL}
baseStaticUrl={process.env.DESCOPE_BASE_STATIC_URL}
>
Expand Down

0 comments on commit f57819e

Please sign in to comment.