Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance/pnpm vite jsx (Enhancements to the Project Infrastructure) #1272

Merged
merged 29 commits into from
Mar 12, 2024

Conversation

use-the-fork
Copy link
Contributor

I have made several significant updates to the project's foundation, aimed at improving efficiency and standardization. Here's a breakdown of the changes:

  1. Switch from Yarn to PNPM: This change brings multiple advantages:

    • Efficient Package Management: With PNPM, node_modules are symlinked and shared, leading to the reuse of 2,860 packages.
      image
    • Elimination of Turbo: Turbo is removed as a dependency because PNPM inherently supports parallel execution.
  2. Committing a Lock File: A lock file has been committed to ensure consistent package versions across different setups.

  3. Introduction of kill-port in Root package.json: This utility ensures that ports are terminated before running the dev and start scripts, preventing port conflicts.

  4. Standardization of File Extensions in UI Folder: Renamed .js files to .jsx to adhere to standard practices, enhancing code readability and maintainability.

  5. Replacement of Craco with Vite: This upgrade introduces several improvements:

    • Enhanced Hot Module Replacement (HMR): Vite provides faster HMR, making development more efficient.
    • Improved Packaging: Vite offers better packaging strategies, enhancing overall performance.
  6. Adding @/ Alias for UI Directory: This alias simplifies referencing within the UI directory, improving code readability and organization.

- Removed Yarn dependency and replaced with PNPM
- Changed Frontend to render via vite
…ug/rework-redis-connection

# Conflicts:
#	packages/components/package.json
#	packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx
#	packages/ui/src/views/apikey/index.jsx
#	packages/ui/src/views/assistants/AssistantDialog.jsx
#	packages/ui/src/views/chatflows/index.jsx
#	packages/ui/src/views/credentials/index.jsx
@HenryHengZJ
Copy link
Contributor

wow, these are all the stuff I wanted to upgrade but have not time yet, will definitely take a good look!

@HenryHengZJ
Copy link
Contributor

sorry for the conflict, just merged in a PR, probably you have to update all the import path for the ui again

- seperated out package locks per package
…aintenance/pnpm-vite-jsx

# Conflicts:
#	packages/ui/src/views/canvas/index.jsx
#	packages/ui/src/views/chatflows/APICodeDialog.jsx
#	packages/ui/src/views/chatmessage/ChatMessage.jsx
@use-the-fork
Copy link
Contributor Author

@HenryHengZJ Take a look now. Both workflows should run now. Sorry lots of places needed updating to get this all to run.

…e-fork/Flowise into maintenance/vite-pnpm-tsup

# Conflicts:
#	packages/ui/pnpm-lock.yaml
#	packages/ui/vite.config.js
…aintenance/vite-pnpm-tsup

# Conflicts:
#	packages/ui/src/layout/MainLayout/Header/ProfileSection/index.jsx
#	packages/ui/src/ui-component/button/FlowListMenu.jsx
#	packages/ui/src/views/chatflows/index.jsx
@use-the-fork
Copy link
Contributor Author

@HenryHengZJ I brought the branch up to date. Everything is looking good on my end only thing I changed was adding TSC-watch for server dev mode. It's much easier.

Copy link
Contributor

@ocflowiseai ocflowiseai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you for the contribution!

@0xi4o 0xi4o merged commit 63d9c94 into FlowiseAI:main Mar 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants