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
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ module.exports = {
extends: ['@nextcloud'],
rules: {
'no-tabs': 'warn',
}
// TODO: make sure we fix this as this is bad vue coding style.
// Use proper sync modifier
'vue/no-mutating-props': 'warn',
},
}
44 changes: 44 additions & 0 deletions .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint

on:
pull_request:
push:
branches:
- master
- stable*

jobs:
lint:
runs-on: ubuntu-latest

name: eslint

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Read package.json node and npm engines version
uses: skjnldsv/[email protected]
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
22 changes: 0 additions & 22 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,3 @@ jobs:
composer run cs:check -- --format=checkstyle | cs2pr
composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
shell: bash

node:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

name: eslint node${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
91 changes: 91 additions & 0 deletions .github/workflows/node-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Node

on:
pull_request:
push:
branches:
- master
- stable*

jobs:
versions:
runs-on: ubuntu-latest
outputs:
nodeVersion: ${{ steps.versions.outputs.nodeVersion }}
npmVersion: ${{ steps.versions.outputs.npmVersion }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Read package.json node and npm engines version
uses: skjnldsv/[email protected]
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'

test:
runs-on: ubuntu-latest
needs: versions

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
with:
node-version: ${{ needs.versions.outputs.nodeVersion }}

- name: Set up npm ${{ needs.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}"

- name: Install dependencies
run: npm ci

- name: Test
run: npm run test

jsunit:
runs-on: ubuntu-latest
needs: versions

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
with:
node-version: ${{ needs.versions.outputs.nodeVersion }}

# This test requires npm6 for some reason
# TODO: fix this and/or move away from jsunit
- name: Set up npm 6
run: npm i -g npm@^6

- name: Test
run: ./autotest-js.sh

handlebars:
runs-on: ubuntu-latest
needs: versions

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
with:
node-version: ${{ needs.versions.outputs.nodeVersion }}

- name: Set up npm ${{ needs.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}"

- name: Install dependencies
run: npm ci

- name: Run compile
run: ./build/compile-handlebars-templates.sh
93 changes: 33 additions & 60 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Node

on:
Expand All @@ -9,71 +14,39 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

name: node
steps:
- uses: actions/checkout@v2
- name: Use node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies & build
run: |
make clean
npm ci
npm run build --if-present
- name: Check webpack build changes
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && git status && exit 1 )"
env:
CI: true
- name: Checkout
uses: actions/checkout@v2

test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm ci
- name: Test
run: npm run test

jsunit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Test
run: ./autotest-js.sh
- name: Read package.json node and npm engines version
uses: skjnldsv/[email protected]
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'

handlebars:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use node ${{ matrix.node-version }}
uses: actions/setup-node@v1
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies & build
run: |
npm ci
- name: Run compile
run: ./build/compile-handlebars-templates.sh
npm run build --if-present

- name: Check webpack build changes
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || exit 1"

- name: Show changes on failure
if: failure()
run: |
git status
git --no-pager diff
6 changes: 3 additions & 3 deletions apps/accessibility/js/accessibility.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/accessibility/js/accessibility.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/accessibility/js/accessibilityoca.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/accessibility/js/accessibilityoca.js.map

Large diffs are not rendered by default.

28 changes: 16 additions & 12 deletions apps/accessibility/src/Accessibility.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,27 @@
</template>

<script>
import ItemPreview from './components/ItemPreview'
import axios from '@nextcloud/axios'
import { generateUrl, generateOcsUrl } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
import axios from '@nextcloud/axios'
import ItemPreview from './components/ItemPreview'

const availableConfig = loadState('accessibility', 'available-config')
const userConfig = loadState('accessibility', 'user-config')

export default {
name: 'Accessibility',
components: { ItemPreview },
props: {
availableConfig: {
type: Object,
required: true,
},
userConfig: {
type: Object,
required: true,
},
components: {
ItemPreview,
},

data() {
return {
availableConfig,
userConfig,
}
},

computed: {
themes() {
return this.availableConfig.themes
Expand Down
11 changes: 1 addition & 10 deletions apps/accessibility/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,12 @@
*/

import Vue from 'vue'
import { loadState } from '@nextcloud/initial-state'
import App from './Accessibility.vue'

// bind to window
Vue.prototype.OC = OC
Vue.prototype.t = t

const availableConfig = loadState('accessibility', 'available-config')
const userConfig = loadState('accessibility', 'user-config')

const View = Vue.extend(App)
const accessibility = new View({
propsData: {
availableConfig,
userConfig,
},
})
const accessibility = new View()
accessibility.$mount('#accessibility')
40 changes: 20 additions & 20 deletions apps/comments/js/comments-app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/comments/js/comments-app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/comments/js/comments-tab.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading