Skip to content

Commit 5afe340

Browse files
More changes
Signed-off-by: SebastianKrupinski <[email protected]>
1 parent 67b0b7c commit 5afe340

File tree

164 files changed

+18227
-20011
lines changed

Some content is hidden

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

164 files changed

+18227
-20011
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/js/
33
/node_modules/
44
/vendor/
5-
/.php_cs.cache
65
.vscode
76
.idea
7+
*.cache
88
*.iml
99
*.log
1010
*.log.*

VUE3_UPGRADE_COMPLETE.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Vue 3 Upgrade Complete
2+
3+
## Summary
4+
The integration_jmapc app has been successfully upgraded from Vue 2.7 to Vue 3.4.0.
5+
6+
## Completed Changes
7+
8+
### 1. Dependencies Updated
9+
- **Vue**: 2.7.14 → 3.4.0
10+
- **@nextcloud/vue**: 7.12.2 → 9.0.0-rc.2 (Vue 3 compatible)
11+
- **@vitejs/plugin-vue**: Added 5.0.0 for Vue 3 support
12+
- **TypeScript Config**: Updated Vue target from 2.7 → 3.5
13+
14+
### 2. Build Configuration
15+
- Updated `vite.config.ts` to use Vue 3 plugin instead of Vue 2
16+
- Replaced Nextcloud's vite-config with custom configuration for Vue 3 compatibility
17+
- Build process now successfully generates Vue 3 compatible output
18+
19+
### 3. Component Architecture Migration
20+
- **UserSettings.vue**: Converted from Options API to Composition API with `<script setup lang="ts">`
21+
- **AdminSettings.vue**: Already using Composition API, updated imports
22+
- **Entry Points**: Updated `UserSettings.ts` and `AdminSettings.ts` to use Vue 3's `createApp()` instead of Vue 2's constructor
23+
24+
### 4. Composition API Implementation
25+
- All reactive data converted from `data()` to `ref()` and `reactive()`
26+
- Methods converted to standalone functions
27+
- Lifecycle hooks updated (`mounted()``onMounted()`)
28+
- Computed properties updated to Vue 3 syntax
29+
30+
### 5. Template Syntax Updates
31+
- Replaced all `.sync` modifiers with `v-model`
32+
- Updated form field bindings for Vue 3 compatibility
33+
- Added null safety checks for optional properties
34+
35+
### 6. TypeScript Integration
36+
- Added comprehensive TypeScript interfaces for:
37+
- SystemConfiguration
38+
- Service
39+
- Collection
40+
- Enhanced type safety throughout components
41+
- Fixed null safety issues in templates
42+
43+
### 7. Component Imports
44+
- Updated @nextcloud/vue component imports to use the new structure in version 9.0.0-rc.2
45+
- Changed from direct path imports to named imports from main package
46+
47+
### 8. Temporary Workarounds
48+
- Replaced @nextcloud/dialogs with temporary console logging functions
49+
- This was necessary because @nextcloud/dialogs v4.x is not yet Vue 3 compatible
50+
51+
## Build Status
52+
**Build Successful**: The project now builds successfully with Vue 3
53+
**TypeScript Compilation**: No blocking TypeScript errors
54+
**Component Structure**: All components converted to Vue 3 Composition API
55+
56+
## Runtime Testing Required
57+
While the build is successful, runtime testing is recommended to ensure:
58+
1. Component functionality works correctly
59+
2. Event handling operates as expected
60+
3. Reactive data updates properly
61+
4. Forms submit correctly
62+
5. Service connections function properly
63+
64+
## Future Considerations
65+
1. **@nextcloud/dialogs**: Upgrade to Vue 3 compatible version when available
66+
2. **Dependencies**: Monitor for stable releases of @nextcloud/vue v9.x
67+
3. **Performance**: Consider code splitting for large chunks (current bundle > 1MB)
68+
69+
## Files Modified
70+
- `package.json` - Updated dependencies
71+
- `vite.config.ts` - Custom Vue 3 configuration
72+
- `tsconfig.json` - Vue 3 TypeScript target
73+
- `src/UserSettings.ts` - Vue 3 entry point
74+
- `src/AdminSettings.ts` - Vue 3 entry point
75+
- `src/views/UserSettings.vue` - Full Composition API conversion
76+
- `src/views/AdminSettings.vue` - Updated imports and dialogs
77+
78+
The Vue 2 to Vue 3 upgrade is now complete and ready for testing!

appinfo/info.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,20 @@
2626
<database>sqlite</database>
2727
<database>mysql</database>
2828
<command>php</command>
29-
<command>ps</command>
30-
<command>kill</command>
3129
<lib>curl</lib>
3230
<nextcloud min-version="26" max-version="32"/>
3331
</dependencies>
32+
<repair-steps>
33+
<post-migration>
34+
<step>OCA\JMAPC\Migration\DefaultServiceTemplates</step>
35+
</post-migration>
36+
</repair-steps>
3437
<commands>
3538
<command>OCA\JMAPC\Commands\Connect</command>
3639
<command>OCA\JMAPC\Commands\Disconnect</command>
3740
<command>OCA\JMAPC\Commands\Harmonize</command>
41+
<command>OCA\JMAPC\Commands\Show</command>
42+
<command>OCA\JMAPC\Commands\Test</command>
3843
</commands>
3944
<settings>
4045
<admin>OCA\JMAPC\Settings\AdminSettings</admin>
@@ -44,10 +49,12 @@
4449
</settings>
4550
<sabre>
4651
<address-book-plugins>
47-
<plugin>OCA\JMAPC\Providers\DAV\Contacts\Provider</plugin>
52+
<plugin>OCA\JMAPC\Providers\DAV\Contacts\Cached\Provider</plugin>
53+
<plugin>OCA\JMAPC\Providers\DAV\Contacts\Live\Provider</plugin>
4854
</address-book-plugins>
4955
<calendar-plugins>
50-
<plugin>OCA\JMAPC\Providers\DAV\Calendar\Provider</plugin>
56+
<plugin>OCA\JMAPC\Providers\DAV\Calendar\Cached\Provider</plugin>
57+
<plugin>OCA\JMAPC\Providers\DAV\Calendar\Live\Provider</plugin>
5158
</calendar-plugins>
5259
</sabre>
5360
</info>

babel.config.js

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

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
"psalm:update-baseline": "psalm.phar --threads=1 --update-baseline",
4949
"psalm:update-baseline:force": "psalm.phar --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
5050
"psalm:clear": "psalm.phar --clear-cache && psalm --clear-global-cache",
51-
"psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
51+
"psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
52+
"test:unit": "phpunit -c tests/unit/php.unit.xml --fail-on-warning",
53+
"test:integration": "phpunit -c tests/integration/php.integration.xml --fail-on-warning"
5254
}
5355
}

css/AdminSettings-Ckff3myA.chunk.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/JmapIcon-CNTeZXhe.chunk.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/UserSettings-BBtHrUjf.chunk.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* extracted by css-entry-points-plugin */
2+
@import './AdminSettings-Ckff3myA.chunk.css';
3+
@import './JmapIcon-CNTeZXhe.chunk.css';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* extracted by css-entry-points-plugin */
2+
@import './UserSettings-BBtHrUjf.chunk.css';
3+
@import './JmapIcon-CNTeZXhe.chunk.css';

0 commit comments

Comments
 (0)