Skip to content

Conversation

@ni00
Copy link
Contributor

@ni00 ni00 commented Dec 20, 2025

PR Checklist

If you have any questions, you can refer to the Contributing Guide.

What is the current behavior?

  • Windows Compatibility: On Windows, the development script fails because the environment variable assignment syntax used in package.json (e.g., NODE_OPTIONS=...) is not compatible across operating systems. It relies on setting variables inline before running vue-cli-service, which works on macOS/Linux but fails on Windows.
  • Dependencies: The .eslintrc.js configuration references vue-eslint-parser, but it is missing from devDependencies.
  • Scripts: The db:diagram command and typeorm-uml integration may be unstable or broken.

What is the new behavior?

  • Cross-Platform Scripts: The dev and build scripts now use cross-env to set NODE_OPTIONS and other environment variables. This ensures the development workflow is consistent across Windows, macOS, and Linux without local script modifications.
  • Dependency Fix: Added vue-eslint-parser to devDependencies to ensure proper linting support as required by the ESLint config.
  • Script Repair: Fixed the db:diagram command and applied necessary patches to typeorm-uml to ensure database diagrams can be generated correctly.

Does this PR introduce a breaking change?

  • Yes
  • No

Specific Instructions

  1. Install dependencies: yarn install
  2. Run the dev command: yarn dev (or npm run dev)
  3. Verify that the application starts correctly on Windows, Linux and MacOS.
  4. Test the diagram generation script: yarn db:diagram

Other information

This PR improves the overall cross-platform developer experience and ensures that all project scripts and linting configurations function correctly regardless of the developer's operating system.

cross-env

@ysfscream ysfscream assigned ysfscream and ni00 and unassigned ysfscream Dec 23, 2025
@ysfscream ysfscream added chore Changes in build tools or dependent packages web MQTTX Web desktop MQTTX Desktop Windows CI/CD labels Dec 23, 2025
@ysfscream ysfscream moved this to In Progress in MQTTX Dec 23, 2025
@ysfscream ysfscream added this to the v1.13.0 milestone Dec 23, 2025
@ni00
Copy link
Contributor Author

ni00 commented Dec 27, 2025

I further optimized the database-related script commands and fixed the runtime error of typeorm-uml on Windows.

@ni00
Copy link
Contributor Author

ni00 commented Dec 27, 2025

The .eslintrc.js configuration requires vue-eslint-parser, but it was missing from the development dependencies. This commit adds it to ensure proper linting.

@ni00 ni00 changed the title chore: use cross-env chore: improve cross-platform compatibility and fix script dependencies Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Changes in build tools or dependent packages CI/CD desktop MQTTX Desktop web MQTTX Web Windows

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants