Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ updates:
- package-ecosystem: "npm"
directories:
- "/"
# TODO(viewer-compat): Remove this directory when src/viewer/ is deleted (PR #9301).
- "/src/viewer"
schedule:
interval: "daily"
groups:
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/npm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:

outputs:
src: ${{ steps.changes.outputs.src}}
# TODO(viewer-compat): Remove this viewer output with the isolated Viewer (PR #9301).
viewer: ${{ steps.changes.outputs.viewer}}

steps:
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
Expand All @@ -45,10 +43,6 @@ jobs:
- '**.js'
- '**.ts'
- '**.vue'
# TODO(viewer-compat): Remove this filter when src/viewer/ is deleted (PR #9301).
viewer:
- 'src/viewer/package.json'
- 'src/viewer/package-lock.json'

build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -92,35 +86,6 @@ jobs:
npm run build --if-present


# TODO(viewer-compat): Delete this guard when the Viewer supports dialogs 8 (PR #9301).
# Also remove the root package.json scripts.postinstall and the viewer output/filter above.
- name: Require Viewer cleanup when dialogs 8 becomes compatible
if: needs.changes.outputs.viewer != 'false'
run: |
test -f src/viewer/package.json || { echo "::error::Remove this obsolete Viewer check with the isolated Viewer."; exit 1; }
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
cp src/viewer/package.json "$tmp/package.json"
version=$(node -p "require('./package.json').dependencies['@nextcloud/dialogs']")
npm pkg set --prefix "$tmp" "dependencies.@nextcloud/dialogs=$version"
if npm install --prefix "$tmp" --package-lock-only --strict-peer-deps --ignore-scripts --no-audit --no-fund >"$tmp/install.log" 2>&1; then
if node - "$tmp/package-lock.json" <<'NODE'
const p = require(process.argv[2]).packages
const compatible = p['node_modules/@nextcloud/viewer']
&& p['node_modules/@nextcloud/dialogs']?.version?.startsWith('8.')
&& Object.entries(p).every(([path, pkg]) =>
!path.endsWith('/@nextcloud/dialogs') || pkg.version?.startsWith('8.'))
process.exit(compatible ? 0 : 1)
NODE
then
echo "::error title=Viewer cleanup available::See PR #9301 and TODO(viewer-compat): remove src/viewer, package.json scripts.postinstall, viewer CI checks, Dependabot and REUSE entries; restore direct imports and mocks, then run PDF security and E2E tests."
exit 1
fi
elif ! grep -q 'ERESOLVE' "$tmp/install.log"; then
cat "$tmp/install.log"
exit 1
fi

- name: Check build changes
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,17 @@ jobs:
./occ app:enable --force activity
# Exercise the native PDF Viewer path instead of the browser fallback.
git clone --depth 1 -b ${{ matrix.server-versions }} https://github.com/nextcloud/files_pdfviewer apps/files_pdfviewer
# TODO(viewer-compat): Remove this E2E-only fixture once files_pdfviewer
# ships the stylesheet referenced by LoadViewerListener (PR #9301).
# Its real styles come from Vite chunks; the missing entry point
# otherwise causes a browser MIME error on unrelated Nextcloud pages.
test -f apps/files_pdfviewer/css/files_pdfviewer-main.css || touch apps/files_pdfviewer/css/files_pdfviewer-main.css
# Upstream files_pdfviewer requests a CSS entry its Vite build does not emit.
# Actual PDF styles load from Vite chunks. Fail CI if upstream changes
# the registration or ships the missing file, forcing fixture cleanup.
pdfviewer_css=apps/files_pdfviewer/css/files_pdfviewer-main.css
pdfviewer_listener=apps/files_pdfviewer/lib/Listeners/LoadViewerListener.php
if [ -f "$pdfviewer_css" ] || \
! grep -Fq "Util::addStyle(Application::APP_ID, 'files_pdfviewer-main');" "$pdfviewer_listener"; then
echo "::error title=Review files_pdfviewer CSS workaround::Upstream changed its CSS registration or added the missing asset. Verify browser loading and remove/update this temporary fixture."
exit 1
fi
touch "$pdfviewer_css"
./occ app:enable --force files_pdfviewer

- name: Set up LibreSign
Expand Down
3 changes: 0 additions & 3 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ path = [
"psalm.xml",
"funding.json",
".well-known/funding-manifest-urls",
# TODO(viewer-compat): Delete these two exceptions with src/viewer/ (PR #9301).
"src/viewer/package-lock.json",
"src/viewer/package.json",
"src/types/openapi/openapi-administration.ts",
"src/types/openapi/openapi-full.ts",
"src/types/openapi/openapi.ts",
Expand Down
Loading
Loading