Skip to content

Commit d3d6189

Browse files
authored
Merge branch 'master' into feat/package-node-npm-engines-update
2 parents 308646e + 2b24910 commit d3d6189

159 files changed

Lines changed: 7877 additions & 10723 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,41 @@
1+
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
13
version: 2
24
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: weekly
7-
day: saturday
8-
time: "03:00"
9-
timezone: Europe/Paris
10-
open-pull-requests-limit: 10
11-
ignore:
12-
- dependency-name: d3
13-
versions:
14-
- ">= 4.a"
15-
- "< 5"
16-
- dependency-name: d3
17-
versions:
18-
- ">= 5.a"
19-
- "< 6"
5+
- package-ecosystem: composer
6+
directories:
7+
- "/"
8+
- "/vendor-bin/*"
9+
schedule:
10+
interval: weekly
11+
day: saturday
12+
time: '03:00'
13+
timezone: Europe/Paris
14+
open-pull-requests-limit: 10
15+
labels:
16+
- 3. to review
17+
- dependencies
18+
19+
- package-ecosystem: npm
20+
directory: '/'
21+
schedule:
22+
interval: weekly
23+
day: saturday
24+
time: '04:00'
25+
timezone: Europe/Paris
26+
open-pull-requests-limit: 10
27+
labels:
28+
- 3. to review
29+
- dependencies
30+
31+
- package-ecosystem: github-actions
32+
directory: '/'
33+
schedule:
34+
interval: weekly
35+
day: saturday
36+
time: '03:00'
37+
timezone: Europe/Paris
38+
open-pull-requests-limit: 10
39+
labels:
40+
- 3. to review
41+
- dependencies

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v6
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v4
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
5858
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
59+
uses: github/codeql-action/autobuild@v4
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,4 +69,4 @@ jobs:
6969
# ./location_of_script_within_repo/buildscript.sh
7070

7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
72+
uses: github/codeql-action/analyze@v4

.github/workflows/lint-info-xml.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint info.xml
710

@@ -21,7 +24,9 @@ jobs:
2124
name: info.xml lint
2225
steps:
2326
- name: Checkout
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2
28+
with:
29+
persist-credentials: false
2530

2631
- name: Download schema
2732
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd

.github/workflows/lint-php-cs.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php-cs
710

@@ -22,24 +25,28 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2
29+
with:
30+
persist-credentials: false
2631

2732
- name: Get php version
2833
id: versions
29-
uses: icewind1991/nextcloud-version-matrix@7d433286e92318f51ed0537b6c77374759e12f46 # v1.3.0
34+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2.3.1.3.2
3035

31-
- name: Set up php${{ steps.versions.outputs.php-available }}
32-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
36+
- name: Set up php${{ steps.versions.outputs.php-min }}
37+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
3338
with:
34-
php-version: ${{ steps.versions.outputs.php-available }}
39+
php-version: ${{ steps.versions.outputs.php-min }}
3540
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3641
coverage: none
3742
ini-file: development
3843
env:
3944
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4045

4146
- name: Install dependencies
42-
run: composer i
47+
run: |
48+
composer remove nextcloud/ocp --dev --no-scripts
49+
composer i
4350
4451
- name: Lint
4552
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

.github/workflows/lint-php.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php
710

@@ -21,10 +24,13 @@ jobs:
2124
php-versions: ${{ steps.versions.outputs.php-versions }}
2225
steps:
2326
- name: Checkout app
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2
28+
with:
29+
persist-credentials: false
30+
2531
- name: Get version matrix
2632
id: versions
27-
uses: icewind1991/nextcloud-version-matrix@111919cfc7b388b7c02cac3c5d53627137adb89f # v1.0.0
33+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.0.0
2834

2935
php-lint:
3036
runs-on: ubuntu-latest
@@ -37,10 +43,12 @@ jobs:
3743

3844
steps:
3945
- name: Checkout
40-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
46+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2
47+
with:
48+
persist-credentials: false
4149

4250
- name: Set up php ${{ matrix.php-versions }}
43-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
51+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
4452
with:
4553
php-version: ${{ matrix.php-versions }}
4654
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite

.github/workflows/node-test.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Node tests
10+
11+
on:
12+
pull_request:
13+
push:
14+
branches:
15+
- main
16+
- master
17+
- stable*
18+
19+
permissions:
20+
contents: read
21+
22+
concurrency:
23+
group: node-tests-${{ github.head_ref || github.run_id }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
changes:
28+
runs-on: ubuntu-latest-low
29+
permissions:
30+
contents: read
31+
pull-requests: read
32+
33+
outputs:
34+
src: ${{ steps.changes.outputs.src}}
35+
36+
steps:
37+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
38+
id: changes
39+
continue-on-error: true
40+
with:
41+
filters: |
42+
src:
43+
- '.github/workflows/**'
44+
- '__tests__/**'
45+
- '__mocks__/**'
46+
- 'src/**'
47+
- 'appinfo/info.xml'
48+
- 'package.json'
49+
- 'package-lock.json'
50+
- 'tsconfig.json'
51+
- '**.js'
52+
- '**.ts'
53+
- '**.vue'
54+
55+
test:
56+
runs-on: ubuntu-latest
57+
58+
needs: changes
59+
if: needs.changes.outputs.src != 'false'
60+
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2
64+
with:
65+
persist-credentials: false
66+
67+
- name: Read package.json node and npm engines version
68+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
69+
id: versions
70+
with:
71+
fallbackNode: '^24'
72+
fallbackNpm: '^11.3'
73+
74+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
75+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
76+
with:
77+
node-version: ${{ steps.versions.outputs.nodeVersion }}
78+
79+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
80+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
81+
82+
- name: Install dependencies & build
83+
env:
84+
CYPRESS_INSTALL_BINARY: 0
85+
run: |
86+
npm ci
87+
npm run build --if-present
88+
89+
- name: Test
90+
run: npm run test --if-present
91+
92+
- name: Test and process coverage
93+
run: npm run test:coverage --if-present
94+
95+
- name: Collect coverage
96+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
97+
with:
98+
files: ./coverage/lcov.info
99+
100+
summary:
101+
permissions:
102+
contents: none
103+
runs-on: ubuntu-latest-low
104+
needs: [changes, test]
105+
106+
if: always()
107+
108+
name: test-summary
109+
110+
steps:
111+
- name: Summary status
112+
run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi
113+
114+
legacy:
115+
permissions:
116+
contents: none
117+
runs-on: ubuntu-latest-low
118+
needs: [summary]
119+
120+
if: always()
121+
name: Front-end unit tests
122+
steps:
123+
- name: Summary status
124+
run: if ${{ needs.summary.result != 'success' }}; then exit 1; fi

.github/workflows/node.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@ jobs:
2626

2727
outputs:
2828
src: ${{ steps.changes.outputs.src}}
29+
deps: ${{ steps.changes.outputs.deps}}
2930

3031
steps:
3132
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
3233
id: changes
3334
continue-on-error: true
3435
with:
3536
filters: |
37+
deps:
38+
- 'package.json'
39+
- 'package-lock.json'
3640
src:
3741
- '.github/workflows/**'
3842
- 'src/**'
@@ -53,25 +57,32 @@ jobs:
5357
name: NPM build
5458
steps:
5559
- name: Checkout
56-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2
5761
with:
5862
persist-credentials: false
5963

6064
- name: Read package.json node and npm engines version
6165
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
6266
id: versions
6367
with:
64-
fallbackNode: '^20'
65-
fallbackNpm: '^10'
68+
fallbackNode: '^24'
69+
fallbackNpm: '^11.3'
6670

6771
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
68-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
72+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
6973
with:
7074
node-version: ${{ steps.versions.outputs.nodeVersion }}
7175

7276
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
7377
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
7478

79+
- name: Validate package-lock.json # See https://github.com/npm/cli/issues/4460
80+
if: needs.changes.outputs.deps != 'false'
81+
run: |
82+
npm i -g npm-package-lock-add-resolved@1.1.4
83+
npm-package-lock-add-resolved
84+
git --no-pager diff --exit-code
85+
7586
- name: Install dependencies & build
7687
env:
7788
CYPRESS_INSTALL_BINARY: 0
@@ -80,7 +91,7 @@ jobs:
8091
npm ci
8192
npm run build --if-present
8293
83-
- name: Check webpack build changes
94+
- name: Check build changes
8495
run: |
8596
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
8697

0 commit comments

Comments
 (0)