Skip to content

Commit 2e33042

Browse files
committed
Use npm 7
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent 522946c commit 2e33042

17 files changed

Lines changed: 25062 additions & 5380 deletions

.eslintrc.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
module.exports = {
22
extends: [
33
'@nextcloud',
4-
]
4+
],
5+
rules: {
6+
// Allow shallow import of @vue/test-utils in order to be able to use it in
7+
// the src folder
8+
'node/no-unpublished-import': ['error', {
9+
allowModules: ['@vue/test-utils', '@testing-library/vue'],
10+
}],
11+
},
512
}

.github/workflows/cypress.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@ env:
1010

1111
jobs:
1212
cypress:
13-
name: cypress ${{ matrix.node-version }}
13+
name: cypress
1414
runs-on: ubuntu-latest
1515

1616
strategy:
1717
fail-fast: false
18-
matrix:
19-
node-version: [12.x]
20-
# containers: [1, 2, 3]
2118

2219
steps:
2320
- name: Checkout server
@@ -38,6 +35,8 @@ jobs:
3835
php-version: ${{ env.PHP_VERSION }}
3936
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu
4037
coverage: none
38+
ini-values:
39+
apc.enable_cli=on
4140

4241
- name: Set up Nextcloud
4342
env:

.github/workflows/lint.yml

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
php-versions: ['7.3', '7.4']
16+
php-versions: ['7.2', '7.3', '7.4']
1717

1818
name: php${{ matrix.php-versions }}
1919
steps:
@@ -52,46 +52,44 @@ jobs:
5252
- name: Run coding standards check
5353
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
5454

55-
# node:
56-
# runs-on: ubuntu-latest
57-
#
58-
# strategy:
59-
# matrix:
60-
# node-version: [12.x]
61-
#
62-
# name: eslint node${{ matrix.node-version }}
63-
# steps:
64-
# - uses: actions/checkout@v2
65-
#
66-
# - name: Set up node ${{ matrix.node-version }}
67-
# uses: actions/setup-node@v1
68-
# with:
69-
# node-version: ${{ matrix.node-version }}
70-
#
71-
# - name: Install dependencies
72-
# run: npm ci
73-
#
74-
# - name: Lint
75-
# run: npm run lint
76-
#
77-
# stylelint:
78-
# runs-on: ubuntu-latest
79-
#
80-
# strategy:
81-
# matrix:
82-
# node-version: [12.x]
83-
#
84-
# name: stylelint node${{ matrix.node-version }}
85-
# steps:
86-
# - uses: actions/checkout@v2
87-
#
88-
# - name: Set up node ${{ matrix.node-version }}
89-
# uses: actions/setup-node@v1
90-
# with:
91-
# node-version: ${{ matrix.node-version }}
92-
#
93-
# - name: Install dependencies
94-
# run: npm ci
95-
#
96-
# - name: Lint
97-
# run: npm run stylelint
55+
node:
56+
runs-on: ubuntu-latest
57+
58+
name: eslint node
59+
steps:
60+
- uses: actions/checkout@v2
61+
62+
- name: Set up node
63+
uses: actions/setup-node@v2
64+
with:
65+
node-version: 14
66+
67+
- name: Set up npm7
68+
run: npm i -g npm@7
69+
70+
- name: Install dependencies
71+
run: npm ci
72+
73+
- name: Lint
74+
run: npm run lint
75+
76+
stylelint:
77+
runs-on: ubuntu-latest
78+
79+
name: stylelint node
80+
steps:
81+
- uses: actions/checkout@v2
82+
83+
- name: Set up node
84+
uses: actions/setup-node@v2
85+
with:
86+
node-version: 14
87+
88+
- name: Set up npm7
89+
run: npm i -g npm@7
90+
91+
- name: Install dependencies
92+
run: npm ci
93+
94+
- name: Lint
95+
run: npm run stylelint

.github/workflows/node.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313

14-
strategy:
15-
matrix:
16-
node-version: [12]
17-
18-
name: node${{ matrix.node-version }}
14+
name: node
1915
steps:
2016
- uses: actions/checkout@v2
2117

22-
- name: Set up node ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
18+
- name: Set up node
19+
uses: actions/setup-node@v2
2420
with:
25-
node-version: ${{ matrix.node-version }}
21+
node-version: 14
22+
23+
- name: Set up npm7
24+
run: npm i -g npm@7
2625

2726
- name: Install dependencies & build
2827
run: |

.github/workflows/npm-test.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@ jobs:
1111
jest:
1212
runs-on: ubuntu-latest
1313

14-
strategy:
15-
matrix:
16-
node-version: [12]
17-
18-
name: node${{ matrix.node-version }}
14+
name: node
1915
steps:
2016
- uses: actions/checkout@v2
2117

22-
- name: Set up node ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
18+
- name: Set up node
19+
uses: actions/setup-node@v2
2420
with:
25-
node-version: ${{ matrix.node-version }}
21+
node-version: 14
22+
23+
- name: Set up npm7
24+
run: npm i -g npm@7
2625

2726
- name: Install dependencies
2827
run: npm ci

__mocks__/@nextcloud/axios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const axios = jest.createMockFromModule('@nextcloud/axios')
22

33
const wsData = require('./activity_ws.json')
44

5-
axios.get = async function(url) {
5+
axios.get = function(url) {
66
return new Promise((resolve, reject) => {
77
if (url === 'http://localhostundefined/ocs/v2.php/apps/activity/api/v2/activity/filter') {
88
resolve({ data: wsData })

css/style.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
margin-left: 5px;
1212
text-overflow: ellipsis;
1313
}
14+
1415
.activitymessage {
1516
margin-left: 25px;
1617
color: var(--color-text-maxcontrast);
1718
text-overflow: ellipsis;
1819
}
20+
1921
.activity-previews {
2022
margin-left: 24px;
2123
}
@@ -120,6 +122,7 @@
120122
margin-right: 6px;
121123
width: 16px;
122124
}
125+
123126
#app-navigation li span.no-icon {
124127
padding-left: 25px;
125128
}
@@ -173,6 +176,7 @@
173176
background-size: contain;
174177
opacity: .5;
175178
}
179+
176180
.activity-icon img {
177181
max-width: 16px;
178182
max-height: 16px;

cypress.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"baseUrl": "https://localhost:8081/index.php/",
2+
"baseUrl": "http://localhost:8081/index.php/",
33
"projectId": "hx9gqy",
44
"viewportWidth": 1280,
55
"viewportHeight": 720
6-
}
6+
}

cypress/support/commands.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
*
2121
*/
2222

23-
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command'
2423
import axios from '@nextcloud/axios'
2524

26-
addMatchImageSnapshotCommand()
27-
2825
const url = Cypress.config('baseUrl').replace(/\/index.php\/?$/g, '')
2926
Cypress.env('baseUrl', url)
3027

js/activity-sidebar.js

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

0 commit comments

Comments
 (0)