Skip to content

Commit 8f7c998

Browse files
authored
Frontend Upgrades (#165)
* feat(build): migrate frontend pipeline to vite and pnpm - replace webpack entrypoints with @nextcloud/vite-config and Vue 3 bootstrap - switch lockfile and package manager metadata to pnpm with updated dependencies - move source styles to styles/ and ignore generated /css and /js artifacts * chore(tooling): replace legacy lint and format configs - add oxlint and biome configuration files and update VS Code recommendations - remove old eslint, prettier, stylelint, babel, and phpactor config files - keep workspace support files aligned with the new formatting baseline * fix(files-ui): restore dialogs and action compatibility - load SVG icons as raw markup and harden SvgHelper decoding paths - update file action compatibility wrappers for modern Nextcloud action signatures - switch feedback and settings flows to current Nextcloud auth, router, and dialog APIs * chore(ci): align workflows with pnpm and biome - run frontend CI checks with pnpm, oxlint, and biome format validation - switch release workflow node setup to pnpm-based dependency management - keep php-cs-fixer in check mode instead of auto-committing fixes * chore(deploy): update build automation for pnpm assets - migrate Makefile install, build, and lint targets from npm scripts to pnpm - update packaging excludes for new config files and styles source directory - refresh staging deploy script to bootstrap pnpm and rebuild generated css/js assets * chore(deploy): makefile cleanup * fix(ci): setup pnpm before node cache in lint workflow - install pnpm before actions/setup-node cache=pnpm to avoid missing executable errors - rename php lint job to backend-lint for clearer check naming * chore(ci): cleanup * fix(ci): align pnpm action version with packageManager - use pnpm/action-setup version 10.28.2 to match packageManager field - prevent setup failure from mixed pnpm version declarations in workflows * feat(frontend): strengthen TypeScript safety and tooling - remove oxlint and standardize lint/format workflows on Biome with check/fix script pairs - add vue-tsc type checking and integrate @nextcloud/typings for NC33-oriented global type coverage - migrate frontend source modules from JavaScript to TypeScript and update Vite entrypoints/config - update Makefile and CI lint pipeline to run pnpm + biome + typecheck consistently * feat(ci): stage deployment
1 parent 9fc4db7 commit 8f7c998

47 files changed

Lines changed: 6043 additions & 18286 deletions

Some content is hidden

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

.eslintrc.js

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

.github/workflows/lint.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ on:
1010
- reopened
1111

1212
jobs:
13-
php-cs-fixer:
13+
backend-lint:
14+
name: Backend Lint
1415
runs-on: ubuntu-latest
1516

1617
strategy:
@@ -30,12 +31,36 @@ jobs:
3031
run: composer require --dev friendsofphp/php-cs-fixer
3132

3233
- name: Run php-cs-fixer
33-
run: vendor/bin/php-cs-fixer fix
34+
run: vendor/bin/php-cs-fixer fix --dry-run --diff
3435

35-
- name: Commit changes
36-
uses: stefanzweifel/git-auto-commit-action@v5
36+
frontend-lint:
37+
name: Frontend Lint
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
44+
- name: Setup pnpm
45+
uses: pnpm/action-setup@v4
3746
with:
38-
commit_message: "chore: fix code style"
39-
commit_options: "--no-verify"
40-
commit_user_name: "GitHub Actions"
41-
commit_user_email: "github-actions[bot]@users.noreply.github.com"
47+
version: 10.28.2
48+
run_install: false
49+
50+
- name: Setup Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: "24"
54+
cache: "pnpm"
55+
56+
- name: Install dependencies
57+
run: pnpm install --frozen-lockfile
58+
59+
- name: Run Biome lint
60+
run: pnpm run lint
61+
62+
- name: Run Biome format check
63+
run: pnpm run format
64+
65+
- name: Run TypeScript type check
66+
run: pnpm run typecheck

.github/workflows/release.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,17 @@ jobs:
3737
with:
3838
path: ${{ env.APP_NAME }}
3939

40-
- name: Read package.json node and npm engines version
41-
uses: skjnldsv/read-package-engines-version-actions@v1.2
42-
id: versions
40+
- name: Set up node
41+
uses: actions/setup-node@v4
4342
with:
44-
path: ./${{ env.APP_NAME }}/
45-
fallbackNode: "^14"
46-
fallbackNpm: "^7"
43+
node-version: "24"
44+
cache: "pnpm"
45+
cache-dependency-path: ./${{ env.APP_NAME }}/pnpm-lock.yaml
4746

48-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
49-
uses: actions/setup-node@v3
47+
- name: Set up pnpm
48+
uses: pnpm/action-setup@v4
5049
with:
51-
node-version: ${{ steps.versions.outputs.nodeVersion }}
52-
53-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
54-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
50+
version: 10.28.2
5551

5652
- name: Run build
5753
run: |

.github/workflows/staging.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16+
- name: Copy staging deploy script
17+
uses: appleboy/scp-action@master
18+
with:
19+
host: ${{ vars.STAGING_SERVER_HOST }}
20+
username: ${{ vars.STAGING_SERVER_USER }}
21+
key: ${{ secrets.STAGING_SSH_PRIVATE_KEY }}
22+
proxy_host: ${{ vars.STAGING_PROXY_HOST }}
23+
proxy_username: ${{ vars.STAGING_PROXY_USER }}
24+
proxy_key: ${{ secrets.STAGING_PROXY_SSH_PRIVATE_KEY }}
25+
source: "scripts/stage/deploy.sh"
26+
target: "/tmp"
27+
strip_components: 1
28+
1629
- name: Deploy
1730
uses: appleboy/ssh-action@master
1831
with:
@@ -22,4 +35,11 @@ jobs:
2235
proxy_host: ${{ vars.STAGING_PROXY_HOST }}
2336
proxy_username: ${{ vars.STAGING_PROXY_USER }}
2437
proxy_key: ${{ secrets.STAGING_PROXY_SSH_PRIVATE_KEY }}
25-
script: bash deploy
38+
script: |
39+
set -e
40+
SCRIPT_PATH="/tmp/deploy.sh"
41+
if [ ! -f "$SCRIPT_PATH" ]; then
42+
SCRIPT_PATH="/tmp/scripts/stage/deploy.sh"
43+
fi
44+
chmod +x "$SCRIPT_PATH"
45+
bash "$SCRIPT_PATH"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
.env
33
/build
44
/dev-environment
5-
js/nextcloud-swarm-plugin*.*
5+
/css
6+
/js
67
/.php-cs-fixer.cache
78

89
# Package Manages

.phpactor.json

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

.prettierignore

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

.prettierrc.json

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

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"junstyle.php-cs-fixer",
99
"xdebug.php-debug",
1010
"bmewburn.vscode-intelephense-client",
11-
"esbenp.prettier-vscode"
11+
"biomejs.biome"
1212
],
1313
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
1414
"unwantedRecommendations": []

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"editor.formatOnSave": true
2+
"editor.formatOnSave": true,
3+
"search.exclude": {
4+
"**/dev-environment": true,
5+
"**/vendor": true
6+
}
37
}

0 commit comments

Comments
 (0)