-
Notifications
You must be signed in to change notification settings - Fork 4
7.0.0 #841
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
base: master
Are you sure you want to change the base?
7.0.0 #841
Conversation
user provides key value, value is saved to txt file in assets
stage directly dispatches the update variable action to avoid circular deps with using updateVariableByUUID
…ields in IssueAnchor
…stage subject changes
…rror boundary; bump version
This major refactor addresses critical security vulnerabilities and modernizes the build toolchain: Security: - Upgrade Electron 9.4.4 → 34.5.8 - Enable context isolation with nodeIntegration: false - Add preload scripts (appPreload.js, summaryPreload.js) with secure IPC bridge - Migrate 30+ renderer files from direct Node.js imports to IPC-based electronBridge - Disable preview mode pending network-canvas submodule modernization Build System: - Migrate from Webpack to electron-vite - Migrate from Jest to Vitest (154/200 tests passing) - Migrate from npm to pnpm - Update Node.js requirement to 22.x LTS Key Changes: - Create src/utils/electronBridge.js for renderer-safe Electron API access - Create src/utils/logger.js to replace electron-log in renderer - Create public/components/ipcHandlers.js for main process IPC handlers - Update all SCSS imports to remove webpack-specific ~ prefix - Replace process.env with import.meta.env for Vite compatibility - Fix protocol.handle() API for Electron 34 (returns void, not boolean) Removed: - Webpack configuration (config/webpack.*.js) - Jest configuration (config/jest/) - Legacy build scripts (scripts/build.js, scripts/start.js, etc.) - package-lock.json (replaced by pnpm-lock.yaml) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create electron-builder.config.js with modern configuration - External config file for cleaner package.json - macOS, Windows, and Linux build targets - Proper asar and file inclusion patterns - File associations for .netcanvas files - Update electron.vite.config.js - Fix JSX transformation with explicit Babel configuration - Output preload scripts to dist/preload/ - Proper React plugin include patterns - Update afterSignHook.js for modern notarization - Environment variable-based credentials (APPLE_API_KEY_*) - No hardcoded paths or credentials - Update package.json build scripts - Clean scripts using external config file - Remove legacy inline build configuration - Update preload paths in window creation files - createAppWindow.js: ../../preload/app.js - openPrintableSummaryWindow.js: ../../preload/summary.js - Remove public/package.json (conflicting legacy file) - Add *.tgz to .gitignore Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Suppress Sass deprecation warnings in electron.vite.config.js - Add runtime dependencies (electron-log, fs-extra, archiver, decompress) - Update network-canvas submodule reference - Enhance preview window management for electron-vite - Add shared electronAPI abstraction layer - Update previewDriver for IPC-based communication Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements version 7.0.0 of the application, focusing on modernizing the Electron integration by migrating from deprecated APIs to a secure context isolation architecture. The changes introduce a bridge layer for Electron API access, update the test framework from Jest to Vitest, and add new geospatial and anonymization features.
Changes:
- Migrated from direct Electron API usage to a secure bridge layer (
electronBridge.js) supporting context isolation - Replaced Jest with Vitest for testing infrastructure
- Added new interface types: Geospatial and Anonymisation with supporting components
- Updated protocol schema version from 7 to 8
Reviewed changes
Copilot reviewed 281 out of 289 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.js | New Vitest configuration replacing Jest setup |
| src/utils/electronBridge.js | New abstraction layer providing safe Electron API access via preload script |
| src/utils/logger.js | New console-based logger replacing electron-log for renderer process |
| src/utils/validateProtocol.js | Updated to use new logger and external protocol-validation package |
| src/utils/scrollTo.js | Refactored to use native scrollTo API instead of anime.js |
| src/utils/protocols/*.js | Updated to use electronAPI bridge and async/await patterns |
| src/components/sections/Geospatial* | New components for geospatial interface functionality |
| src/components/sections/Anonymisation* | New components for data anonymisation features |
| src/config/index.js | Updated schema version to 8 and added geojson support |
| Multiple SCSS files | Updated import paths removing tilde prefix for modern bundlers |
Comments suppressed due to low confidence (3)
src/utils/netcanvasFile/lib.js:1
isFileshould be called as a method with parentheses:stat.isFile(). The current code checks for the existence of the property rather than calling the method.
src/utils/netcanvasFile/lib.js:1isFileshould be called as a method with parentheses:stat.isFile(). The current code checks for the existence of the property rather than calling the method.
src/components/sections/MapOptions.js:1- Corrected spelling of 'retreiving' to 'retrieving'.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Rename .js test files to .jsx for proper JSX parsing in Vite - Convert jest.mock() to vi.mock() across test files - Replace jest.fn() with vi.fn() in PromptFields tests - Add process-level error handler for framesync cleanup errors (framer-motion 5.x schedules timers that fire after jsdom teardown) - Fix redux-form mocking in CodeView tests - Update obsolete snapshots - Remove tests for deleted components (VariablePicker, VariableSpotlight) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Vite requires explicit .jsx extension for files containing JSX syntax. This change renames ~280 source files from .js to .jsx to ensure proper parsing by the Vite bundler. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update script src from /src/index.js to /src/index.jsx after the .js to .jsx file rename. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move the require('electron-devtools-installer') inside the function
after the environment check. This prevents the production build from
failing when the devDependency is not available.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Define 'module' as an object shim in Vite config to prevent "module is not defined" errors from redux-form's hot reloading check. The previous fix only defined module.hot, but redux-form checks module itself before accessing .hot. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove Vite define replacement for 'module' (was breaking React bundling) - Add runtime module shim in index.html instead - The shim only sets window.module if undefined, avoiding conflicts The previous approach of using Vite's define option did text replacement on ALL occurrences of 'module', breaking CommonJS patterns in bundled libraries like React. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add network-canvas/dist/**/* to electron-builder files config so the preview window can load the built network-canvas renderer in production. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This pull request modernizes the development environment and build pipeline, updates documentation, and removes legacy dependencies. The main improvements include upgrading Node.js and package managers, updating GitHub Actions workflows, cleaning up submodules, and enhancing build and code quality tooling. Documentation has been thoroughly revised to reflect these changes and provide clearer guidance for developers.
Development Environment Modernization
npmtopnpm(v9.x) for package management, and added a.node-versionfile for version consistency. (README.md,.node-version, [1] [2].npmrcconfiguration for Electron and stricter dependency handling.pnpm. (README.md,CLAUDE.md, [1] [2]Build and CI Pipeline Updates
ubuntu-latest. (.github/workflows/main.yml,.github/workflows/dist.yml, [1] [2] [3] [4] [5] [6]build-resources/scripts/afterSignHook.js, build-resources/scripts/afterSignHook.jsL1-R84)Repository and Dependency Cleanup
protocol-validationsubmodule and its references, reflecting its deprecation. (.gitmodules,.eslintignore, [1] [2]Tooling and Configuration Improvements
babel.config.js, babel.config.jsL3-R25)config/env.jsfile.Documentation Enhancements
CLAUDE.mdfile to help developers (and AI assistants) understand the project structure, workflows, and best practices.README.mdto match the new setup, commands, and architecture, and to note the temporary disabling of preview functionality. [1] [2]Let me know if you have questions about any of these updates or need help getting your environment set up!