Skip to content

Conversation

panz3r
Copy link
Member

@panz3r panz3r commented Apr 28, 2025

Motivation:

This PR undertakes a significant modernization effort across the project to:

  • Improve developer experience with faster tooling (Vite, Vitest) and a unified package management setup (pnpm workspaces).
  • Enhance maintainability by standardizing tooling and removing legacy configurations (Babel).
  • Ensure the project and its examples stay current with the latest ecosystem standards (React 19).
  • Streamline CI/CD processes with updated workflows and automated releases/dependency updates.
  • Provide a cleaner and more efficient foundation for future development.

Description of Changes:

This PR includes the following major changes:

  • Tooling Migration & Setup:

    • Migrated the project to use pnpm workspaces (715760c, cf337e2, e83ac8c).
    • Replaced the build/dev tooling tsdx with Vite (31cc75b, 1ed750d).
    • Migrated the testing framework from Jest to Vitest (1314b1f).
    • Upgraded the Dev Containers setup (df40adb).
  • CI/CD & Automation:

    • Added Dependabot configuration for automated dependency updates (ffa82ff).
    • Replaced previous CI workflows with a consolidated "Build & Test" GitHub Actions workflow, updated for the new tooling (066b0fc, 32006c0).
    • Added a release configuration and workflow for automated package releases (84bcc2a).
  • Example Updates:

    • Updated all examples (base, refresh-token, reqres) to use Vite (4856be2, 7a831aa, 9ea03e3).
    • Updated examples to utilize React 19 features (14816b4, 4856be2).
    • Cleaned up unused files in examples (14816b4).
    • Enhanced TypeScript configuration in the reqres example (9ea03e3).
    • Fixed a build issue in the reqres example (ebac7c8).
  • Documentation & Cleanup:

    • Updated links and author information across documentation and templates (cf446f5).
    • Removed the cover image (3e0bd59).
    • Removed now-unused Babel and specific TypeScript configuration files (1ed750d).

How to Test:

  1. CI Checks: Verify that the "Build & Test" GitHub Actions workflow passes successfully on this PR. This includes linting, type checking, running Vitest tests, and potentially building the library/examples.
  2. Local Setup (using pnpm):
    • Ensure you have pnpm installed (npm install -g pnpm).
    • Check out this branch.
    • Run pnpm install from the root directory.
    • Run tests locally: pnpm -r test.
    • Attempt to build the core library: pnpm -r build.
  3. Examples:
    • Navigate into each example directory (e.g., cd examples/base).
    • Run pnpm install (if needed, workspaces might handle this at the root).
    • Run pnpm dev (or the start command) to ensure the example runs correctly with Vite.
    • Run pnpm build to ensure the example builds successfully.
  4. Dev Container: Test opening the project in the updated Dev Container environment.

Checklist:

  • My code follows the project's style guidelines.
  • I have updated tests or added new tests to reflect the changes (migration from Jest to Vitest).
  • I have updated the necessary documentation (READMEs, CONTRIBUTING guides might need updates regarding pnpm, Vite, Vitest).
  • All new and existing tests passed (via Vitest).
  • CI workflows are updated and passing.
  • Examples have been updated and verified to work with the new tooling.
  • I have performed a self-review of my own code.

Notes for Reviewers:

  • This is a large refactoring PR migrating core tooling to pnpm workspaces, Vite, and Vitest.
  • Jest has been completely replaced by Vitest.
  • Examples now use Vite and React 19.
  • Build, test, and release processes are updated via GitHub Actions.
  • Reviewers should ensure local setup instructions are updated or added if necessary to reflect the move to pnpm.

panz3r added 18 commits April 23, 2025 19:56
- update project structure and dependencies
- migrate to pnpm
- enhance .gitignore
…p unused files

- remove `native` example
- upgrade other examples setup
- 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
- 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
- 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
…ate 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
…Script 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
…ite 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
- configure Dependabot for Dev Containers
- configure Dependabot for GitHub Actions
- configure Dependabot for npm
- 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
- add "packageManager" field to define pnpm version used for the project
…ing and building

- ensure installation of dependencies is correctly defined in the workflow
- remove optional parameter from `onRefresh` method in `ReqResAuthClient`
@panz3r panz3r added the enhancement New feature or request label Apr 28, 2025
@panz3r panz3r self-assigned this Apr 28, 2025
@panz3r panz3r merged commit ac06376 into main Apr 28, 2025
7 checks passed
@panz3r panz3r deleted the upgrade-project branch April 28, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant