Skip to content

Commit b97c32c

Browse files
committed
feat: switched to vite to remove all legacy webpack-dev-server deps
1 parent 9be596e commit b97c32c

26 files changed

Lines changed: 2022 additions & 9335 deletions

.github/dependabot.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
commit-message:
8+
prefix: 'chore(deps):'
9+
open-pull-requests-limit: 10
10+
groups:
11+
npm-version-updates:
12+
patterns:
13+
- '*'
14+
applies-to: 'version-updates'
15+
npm-security-updates:
16+
patterns:
17+
- '*'
18+
applies-to: 'security-updates'
19+
20+
- package-ecosystem: 'github-actions'
21+
directory: '/'
22+
schedule:
23+
interval: 'weekly'
24+
commit-message:
25+
prefix: 'chore(deps):'
26+
open-pull-requests-limit: 10
27+
groups:
28+
actions-version-updates:
29+
patterns:
30+
- '*'
31+
applies-to: 'version-updates'
32+
actions-security-updates:
33+
patterns:
34+
- '*'
35+
applies-to: 'security-updates'
36+
37+
- package-ecosystem: 'docker'
38+
directory: '/'
39+
schedule:
40+
interval: 'weekly'
41+
commit-message:
42+
prefix: 'chore(deps):'
43+
open-pull-requests-limit: 10
44+
groups:
45+
actions-version-updates:
46+
patterns:
47+
- '*'
48+
applies-to: 'version-updates'
49+
actions-security-updates:
50+
patterns:
51+
- '*'
52+
applies-to: 'security-updates'

.github/workflows/issues.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
id: checkUserMember
2626
if: github.actor != 'dependabot[bot]'
2727
with:
28-
username: ${{ github.actor }}
29-
GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
28+
username: ${{ github.actor }}
29+
GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
3030
- name: add pr
3131
uses: actions/add-to-project@v1.0.1
3232
if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' && !contains(steps.checkUserMember.outputs.teams, 'engineers')}}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release @zitadel/react package
22
on:
33
push:
44
branches:
5-
- "main"
5+
- 'main'
66

77
jobs:
88
release:

devbox.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.7/.schema/devbox.schema.json",
3+
"packages": ["yarn@latest"],
4+
"shell": {
5+
"init_hook": ["echo 'Welcome to devbox!' > /dev/null"],
6+
"scripts": {
7+
"test": ["echo \"Error: no test specified\" && exit 1"]
8+
}
9+
}
10+
}

devbox.lock

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"lockfile_version": "1",
3+
"packages": {
4+
"yarn@latest": {
5+
"last_modified": "2025-07-28T17:09:23Z",
6+
"resolved": "github:NixOS/nixpkgs/648f70160c03151bc2121d179291337ad6bc564b#yarn",
7+
"source": "devbox-search",
8+
"version": "1.22.22",
9+
"systems": {
10+
"aarch64-darwin": {
11+
"outputs": [
12+
{
13+
"name": "out",
14+
"path": "/nix/store/2hb4yl033wym7imkbzydgxfyfn5r8024-yarn-1.22.22",
15+
"default": true
16+
}
17+
],
18+
"store_path": "/nix/store/2hb4yl033wym7imkbzydgxfyfn5r8024-yarn-1.22.22"
19+
},
20+
"aarch64-linux": {
21+
"outputs": [
22+
{
23+
"name": "out",
24+
"path": "/nix/store/7ibx5w03lkpfrab4isvndqxnx4g3w0h6-yarn-1.22.22",
25+
"default": true
26+
}
27+
],
28+
"store_path": "/nix/store/7ibx5w03lkpfrab4isvndqxnx4g3w0h6-yarn-1.22.22"
29+
},
30+
"x86_64-darwin": {
31+
"outputs": [
32+
{
33+
"name": "out",
34+
"path": "/nix/store/0khfcbpw9vhq2lz9nf6mgnsz2fw365x7-yarn-1.22.22",
35+
"default": true
36+
}
37+
],
38+
"store_path": "/nix/store/0khfcbpw9vhq2lz9nf6mgnsz2fw365x7-yarn-1.22.22"
39+
},
40+
"x86_64-linux": {
41+
"outputs": [
42+
{
43+
"name": "out",
44+
"path": "/nix/store/99i6m5dmg2q0g44b0gpmwz92g00wk7ma-yarn-1.22.22",
45+
"default": true
46+
}
47+
],
48+
"store_path": "/nix/store/99i6m5dmg2q0g44b0gpmwz92g00wk7ma-yarn-1.22.22"
49+
}
50+
}
51+
}
52+
}
53+
}

eslint.config.mjs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import js from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import react from 'eslint-plugin-react';
6+
import prettier from 'eslint-config-prettier';
7+
8+
export default [
9+
{
10+
ignores: ['dist/**', 'build/**', 'node_modules/**'],
11+
},
12+
js.configs.recommended,
13+
...tseslint.configs.recommended,
14+
{
15+
files: ['**/*.{js,jsx,ts,tsx}'],
16+
languageOptions: {
17+
ecmaVersion: 'latest',
18+
sourceType: 'module',
19+
parserOptions: {
20+
ecmaFeatures: {
21+
jsx: true,
22+
},
23+
},
24+
},
25+
settings: {
26+
react: {
27+
version: 'detect',
28+
},
29+
},
30+
plugins: {
31+
react,
32+
'react-hooks': reactHooks,
33+
'react-refresh': reactRefresh,
34+
},
35+
rules: {
36+
...react.configs.recommended.rules,
37+
...reactHooks.configs.recommended.rules,
38+
'react-refresh/only-export-components': [
39+
'warn',
40+
{ allowConstantExport: true },
41+
],
42+
'react/react-in-jsx-scope': 'off',
43+
},
44+
},
45+
prettier,
46+
];

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/src/logo.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>ZITADEL React</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/index.tsx"></script>
12+
</body>
13+
</html>

lib/.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"$schema": "https://json.schemastore.org/semantic-release.json",
33
"branches": ["main"]
4-
}
4+
}

lib/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { createZitadelAuth, ZitadelConfig, ZitadelAuth } from "./zitadelAuth";
1+
export { createZitadelAuth, ZitadelConfig, ZitadelAuth } from './zitadelAuth';

lib/src/zitadelAuth.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
UserManagerSettings,
33
UserManager,
44
WebStorageStateStore,
5-
} from "oidc-client-ts";
5+
} from 'oidc-client-ts';
66

77
export type ZitadelConfig = Partial<UserManagerSettings> & {
88
project_resource_id?: string;
@@ -19,21 +19,21 @@ export function createZitadelAuth(zitadelConfig: ZitadelConfig): ZitadelAuth {
1919
authority: `${zitadelConfig.authority}`,
2020
client_id: `${zitadelConfig.client_id}`,
2121
redirect_uri: `${
22-
zitadelConfig.redirect_uri ?? "http://localhost:3000/callback"
22+
zitadelConfig.redirect_uri ?? 'http://localhost:3000/callback'
2323
}`,
24-
response_type: zitadelConfig.response_type ?? "code",
24+
response_type: zitadelConfig.response_type ?? 'code',
2525
scope:
2626
zitadelConfig.scope ??
2727
`openid profile email ${
2828
zitadelConfig.project_resource_id
2929
? `urn:zitadel:iam:org:project:id:${zitadelConfig.project_resource_id}:aud urn:zitadel:iam:org:projects:roles`
30-
: ""
30+
: ''
3131
}`,
32-
prompt: zitadelConfig.prompt ?? "",
32+
prompt: zitadelConfig.prompt ?? '',
3333
post_logout_redirect_uri: `${
34-
zitadelConfig.post_logout_redirect_uri ?? "http://localhost:3000/"
34+
zitadelConfig.post_logout_redirect_uri ?? 'http://localhost:3000/'
3535
}`,
36-
response_mode: zitadelConfig.response_mode ?? "query",
36+
response_mode: zitadelConfig.response_mode ?? 'query',
3737
disablePKCE: zitadelConfig.disablePKCE,
3838
extraQueryParams: zitadelConfig.extraQueryParams,
3939
};

0 commit comments

Comments
 (0)