Skip to content

Commit ac06376

Browse files
authored
feat: modernize project tooling, dependencies, and examples (#7)
* chore: upgrade Dev Containers setup * chore: migrate to pnpm workspace setup - update project structure and dependencies - migrate to pnpm - enhance .gitignore * chore: migrate core project tooling to standard libraries * chore(examples): update examples to use React 19 features and clean up unused files - remove `native` example - upgrade other examples setup * chore: migrate testing framework from Jest to Vitest - replace Jest configuration with Vitest configuration - update test files to use Vitest's API - remove Jest-related dependencies and add Vitest dependencies - ensure compatibility with React 19 features * chore(lib): remove Babel and TypeScript configuration files - delete babel.config.js and tsconfig.base.json - update package.json to remove Babel dependencies - adjust lib package.json and tsconfig.json for new build process * chore(examples): update `base` example to use Vite and React 19 features - rename index.html title to "Base Example" - update script source in index.html to point to main.tsx - modify package.json scripts for Vite usage - enhance TypeScript configuration for better compatibility - add tsconfig.node.json for Node-specific settings - create vite.config.ts for Vite configuration - refactor App.tsx and auth.ts to align with new imports and structure - introduce main.tsx as the entry point for the application * chore(examples): refactor `refresh-token` example to use Vite and update dependencies - rename index.html title to "Refresh Token Example" - update script source in index.html to point to main.tsx - modify package.json scripts for Vite usage - enhance TypeScript configuration for better compatibility - add tsconfig.node.json for Node-specific settings - create vite.config.ts for Vite configuration - refactor API client and interceptors for improved structure - update auth client to use new package imports - streamline imports in App.tsx and other files * chore(examples): update `reqres` example to use Vite and enhance TypeScript configuration - rename index.html title to "ReqRes Example" - update script source in index.html to point to main.tsx - modify package.json scripts for Vite usage - enhance TypeScript configuration for better compatibility - add tsconfig.node.json for Node-specific settings - create vite.config.ts for Vite configuration - refactor API client to use new package imports - add headers to API client for improved request handling - introduce main.tsx as the entry point for the application * chore: update `pnpm-lock.yaml` and `pnpm-workspace.yaml` to include Vite and ViteJS plugin - add '@vitejs/plugin-react' version 4.4.1 to dependencies - add 'vite' version 6.3.3 to dependencies - update examples to ensure compatibility with new dependencies * docs: update links and author information in documentation and templates * docs: remove cover image * chore: add Dependabot configuration for automated dependency updates - configure Dependabot for Dev Containers - configure Dependabot for GitHub Actions - configure Dependabot for npm * chore: replace existing CI workflows with a new "Build & Test" workflow - add a new GitHub Actions workflow for building and testing the project - remove outdated workflows for CodeQL analysis, coverage, main CI, and size calculation - configure matrix strategy for testing across multiple Node.js versions * chore: update `package.json` to specify pnpm version - add "packageManager" field to define pnpm version used for the project * chore: update "Build & Test" GitHub Actions workflow for package testing and building - ensure installation of dependencies is correctly defined in the workflow * chore: add release configuration and workflow for automated package releases * refactor(examples): fix `reqres` example build - remove optional parameter from `onRefresh` method in `ReqResAuthClient` * docs: update CI badge in README to reflect new "Build & Test" workflow * docs(lib): update CI badge in README to reflect new "Build & Test" workflow
1 parent d52963b commit ac06376

File tree

142 files changed

+3940
-35651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+3940
-35651
lines changed

.devcontainer/devcontainer.json

Lines changed: 48 additions & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -1,192 +1,50 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
33
{
4-
"name": "Node.js & Typescript",
5-
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:16-bullseye",
6-
// Set *default* container specific settings.json values on container create.
7-
"settings": {
8-
"color-highlight.markRuler": false,
9-
"color-highlight.markerType": "underline",
10-
"diffEditor.ignoreTrimWhitespace": false,
11-
"editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace",
12-
"editor.fontLigatures": true,
13-
"editor.formatOnType": false,
14-
"editor.minimap.enabled": false,
15-
"editor.multiCursorModifier": "alt",
16-
"editor.rulers": [
17-
110,
18-
130
19-
],
20-
"editor.suggestSelection": "first",
21-
"editor.tabSize": 2,
22-
"git.autofetch": true,
23-
"git.confirmSync": false,
24-
"gitlens.codeLens.scopes": [
25-
"document"
26-
],
27-
"update.showReleaseNotes": false,
28-
"update.mode": "none",
29-
"terminal.explorerKind": "external",
30-
"extensions.autoCheckUpdates": false,
31-
"extensions.autoUpdate": false,
32-
"markdown.extension.toc.githubCompatibility": true,
33-
"markdown.extension.toc.levels": "1..3",
34-
"prettier.singleQuote": true,
35-
"prettier.trailingComma": "es5",
36-
"telemetry.enableTelemetry": false,
37-
"window.openFilesInNewWindow": "on",
38-
"window.openFoldersInNewWindow": "on",
39-
"window.zoomLevel": 0,
40-
"workbench.activityBar.visible": false,
41-
"workbench.fontAliasing": "antialiased",
42-
"workbench.iconTheme": "vscode-icons",
43-
"workbench.colorCustomizations": {
44-
// "titleBar.activeBackground": "#353535",
45-
// "activityBar.background": "#353535",
46-
// "statusBar.background": "#353535",
47-
// "statusBar.noFolderBackground": "#353535",
48-
// "statusBar.debuggingBackground": "#263238"
49-
// JS THEME
50-
"editor.background": "#212121",
51-
"editor.foreground": "#ffffff",
52-
"activityBar.background": "#121212",
53-
"activityBar.foreground": "#F3DC1C",
54-
"activityBar.dropBackground": "#121212",
55-
"activityBarBadge.background": "#F3DC1C",
56-
"activityBarBadge.foreground": "#121212",
57-
"sideBar.background": "#121212",
58-
"sideBar.foreground": "#b3b3b3",
59-
"sideBar.border": "#212121",
60-
"sideBarTitle.foreground": "#FFF",
61-
"sideBarSectionHeader.foreground": "#FFF",
62-
"sideBarSectionHeader.background": "#121212",
63-
"list.activeSelectionBackground": "#535353",
64-
"list.activeSelectionForeground": "#fff",
65-
"list.dropBackground": "#212121",
66-
"list.hoverBackground": "#212121",
67-
"list.hoverForeground": "#fff",
68-
"list.focusBackground": "#212121",
69-
"list.focusForeground": "#fff",
70-
"list.inactiveSelectionBackground": "#212121",
71-
"list.inactiveFocusBackground": "#121212",
72-
"list.inactiveSelectionForeground": "#fff",
73-
"list.highlightForeground": "#fff",
74-
"statusBar.background": "#212121",
75-
"statusBar.foreground": "#ffffff",
76-
"statusBar.border": "#F3DC1C",
77-
"statusBar.noFolderBackground": "#121212",
78-
"statusBar.noFolderBorder": "#121212",
79-
"statusBar.noFolderForeground": "#b3b3b3",
80-
"statusBar.debuggingBackground": "#F3DC1C",
81-
"statusBar.debuggingForeground": "#121212",
82-
"statusBarItem.activeBackground": "#535353",
83-
"statusBarItem.hoverBackground": "#F3DC1C",
84-
"notificationCenter.border": "#121212",
85-
"notificationCenterHeader.foreground": "#b3b3b3",
86-
"notificationCenterHeader.background": "#121212",
87-
"editorGroup.emptyBackground": "#212121",
88-
"editorGroup.border": "#F3DC1C",
89-
"editorGroup.dropBackground": "#212121",
90-
"tab.activeBackground": "#212121",
91-
"button.background": "#535353",
92-
"button.foreground": "#fff",
93-
"titleBar.activeBackground": "#212121",
94-
"titleBar.border": "#F3DC1C",
95-
"titleBar.inactiveBackground": "#535353",
96-
"textLink.foreground": "#F3DC1C",
97-
"textLink.activeForeground": "#A6960A"
98-
// JS THEME - END
99-
},
100-
// Suggested settings for Web development (see https://github.com/shawn-sandy/codestudio)
101-
"files.associations": {
102-
"*.tag": "html",
103-
"*.cshtml": "html",
104-
"*.html": "html",
105-
"*.njk": "html",
106-
"*.mustache": "html",
107-
"*.html.md": "html"
108-
},
109-
"files.exclude": {
110-
"*.sublime-*": true,
111-
"**/__pycache__": true,
112-
"**/.DS_Store": true,
113-
"**/.git": true,
114-
"**/.pytest_cache": true,
115-
"**/.vscode": true,
116-
"**/node_modules": true,
117-
"node_modules": true,
118-
"venv": true
119-
},
120-
"search.exclude": {
121-
"**/node_modules": true,
122-
"**/bower_components": true,
123-
"**/env": true,
124-
"**/venv": true
125-
},
126-
"files.watcherExclude": {
127-
"**/.git/objects/**": true,
128-
"**/.git/subtree-cache/**": true,
129-
"**/node_modules/**": true,
130-
"**/env/**": true,
131-
"**/venv/**": true,
132-
"env-*": true
133-
},
134-
// "files.autoSave": "onFocusChange",
135-
"files.trimTrailingWhitespace": true,
136-
"editor.cursorBlinking": "phase",
137-
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
138-
// "editor.formatOnSave": true,
139-
"breadcrumbs.enabled": true,
140-
"editor.minimap.renderCharacters": false,
141-
"editor.minimap.maxColumn": 200,
142-
"editor.minimap.showSlider": "always",
143-
// END Suggested settings for Web development
144-
"[html]": {
145-
"editor.defaultFormatter": "vscode.html-language-features"
146-
},
147-
"[json]": {
148-
"editor.defaultFormatter": "vscode.json-language-features"
149-
},
150-
"[jsonc]": {
151-
"editor.defaultFormatter": "vscode.json-language-features"
152-
},
153-
"[markdown]": {
154-
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
155-
},
156-
"[typescript]": {
157-
"editor.defaultFormatter": "esbenp.prettier-vscode",
158-
},
159-
"[typescriptreact]": {
160-
"editor.defaultFormatter": "esbenp.prettier-vscode"
161-
},
162-
"extensions.ignoreRecommendations": true,
163-
"workbench.enableExperiments": false,
164-
"workbench.settings.enableNaturalLanguageSearch": false
165-
},
166-
// Add the IDs of extensions you want installed when the container is created.
167-
"extensions": [
168-
"dbaeumer.vscode-eslint",
169-
"editorconfig.editorconfig",
170-
"esbenp.prettier-vscode",
171-
"naumovs.color-highlight",
172-
"vscode-icons-team.vscode-icons",
173-
"yzhang.markdown-all-in-one"
174-
],
175-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
176-
// "forwardPorts": [3000],
177-
// Use 'portsAttributes' to set default properties for specific forwarded ports. More info: https://code.visualstudio.com/docs/remote/devcontainerjson-reference.
178-
// "portsAttributes": {
179-
// "3000": {
180-
// "label": "Hello Remote World",
181-
// "onAutoForward": "notify"
182-
// }
183-
// },
184-
// Use 'otherPortsAttributes' to configure any ports that aren't configured using 'portsAttributes'.
185-
// "otherPortsAttributes": {
186-
// "onAutoForward": "silent"
187-
// },
188-
// Use 'postCreateCommand' to run commands after the container is created.
189-
"postCreateCommand": "yarn install",
190-
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
191-
"remoteUser": "node"
4+
"name": "React Auth",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
"features": {
10+
"ghcr.io/devcontainers/features/common-utils:2": {
11+
"configureZshAsDefaultShell": true,
12+
"username": "node"
13+
},
14+
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
15+
"plugins": "git npm",
16+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions",
17+
"username": "node"
18+
},
19+
"ghcr.io/devcontainers/features/git:1": {},
20+
"ghcr.io/devcontainers/features/node:1": {},
21+
"ghcr.io/joshuanianji/devcontainer-features/mount-pnpm-store:1": {}
22+
},
23+
24+
// Volumes to mount
25+
"mounts": [
26+
"source=${devcontainerId}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume"
27+
],
28+
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
// "forwardPorts": [],
31+
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
"postCreateCommand": "sudo chown node node_modules; pnpm install",
34+
35+
// Configure tool-specific properties.
36+
"customizations": {
37+
"vscode": {
38+
"extensions": [
39+
"dbaeumer.vscode-eslint",
40+
"esbenp.prettier-vscode",
41+
"editorconfig.editorconfig",
42+
"GitHub.vscode-github-actions",
43+
"yzhang.markdown-all-in-one",
44+
]
45+
}
46+
},
47+
48+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
49+
// "remoteUser": "root"
19250
}

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ body:
7575
id: terms
7676
attributes:
7777
label: Code of Conduct
78-
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Forward-Software/react-auth/blob/main/CODE_OF_CONDUCT.md)
78+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/forwardsoftware/react-auth/blob/main/CODE_OF_CONDUCT.md)
7979
options:
8080
- label: I agree to follow this project's Code of Conduct
8181
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: General Questions and Inquiries
4-
url: https://github.com/Forward-Software/react-auth/discussions
4+
url: https://github.com/forwardsoftware/react-auth/discussions
55
about: Please ask general integration/design/architecture questions using GitHub Discussion.

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: monthly
13+
reviewers:
14+
- "panz3r"
15+
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: monthly
20+
reviewers:
21+
- "panz3r"
22+
23+
- package-ecosystem: "npm"
24+
directories:
25+
- "/"
26+
- "/lib"
27+
- "/examples/*"
28+
schedule:
29+
interval: weekly
30+
day: tuesday
31+
reviewers:
32+
- "panz3r"

.github/workflows/build-test.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches-ignore: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
name: Test
14+
15+
strategy:
16+
matrix:
17+
node_version: [lts/-1, lts/*, latest]
18+
fail-fast: false
19+
20+
runs-on: "ubuntu-latest"
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
28+
29+
- name: Setup NodeJS
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node_version }}
33+
cache: pnpm
34+
35+
- name: Install dependencies
36+
run: pnpm i --frozen-lockfile
37+
38+
- name: Test package
39+
run: pnpm --filter "@forward-software/react-auth" test
40+
41+
build:
42+
name: Build
43+
44+
runs-on: "ubuntu-latest"
45+
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v4
49+
50+
- name: Setup pnpm
51+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
52+
53+
- name: Setup NodeJS
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: "lts/*"
57+
cache: pnpm
58+
59+
- name: Install dependencies
60+
run: pnpm i --frozen-lockfile
61+
62+
- name: Build package
63+
run: pnpm --filter "@forward-software/react-auth" build

.github/workflows/codeql.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)