Skip to content

Commit 546499e

Browse files
authored
Merge pull request #870 from nextcloud-libraries/chore/vite
chore: simplify build process by use vite
2 parents 4932396 + 4de034d commit 546499e

File tree

9 files changed

+3612
-771
lines changed

9 files changed

+3612
-771
lines changed

cypress/e2e/sessions.cy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Login and logout', function() {
1616
cy.url().should('include', '/apps/files')
1717

1818
cy.window().then(window => {
19-
expect(window?.OC?.currentUser).to.eq(user.userId)
19+
expect((window as any).OC?.currentUser).to.eq(user.userId)
2020
})
2121
})
2222

@@ -27,7 +27,7 @@ describe('Login and logout', function() {
2727
cy.url().should('include', '/apps/files')
2828

2929
cy.window().then(window => {
30-
expect(window?.OC?.currentUser).to.eq('test1')
30+
expect((window as any).OC?.currentUser).to.eq('test1')
3131
})
3232

3333
cy.logout()
@@ -44,7 +44,7 @@ describe('Login and logout', function() {
4444
cy.url().should('include', '/apps/files')
4545

4646
cy.window().then(window => {
47-
expect(window?.OC?.currentUser).to.eq(user.userId)
47+
expect((window as any).OC?.currentUser).to.eq(user.userId)
4848
})
4949
})
5050
})

cypress/tsconfig.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
{
2-
"extends": "../tsconfig.json",
3-
"include": ["./**/*.ts"],
2+
"extends": "@vue/tsconfig/tsconfig.json",
3+
"include": ["../lib/**/*.ts", "./**/*.ts"],
4+
"compilerOptions": {
5+
"types": ["cypress", "node"],
6+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
7+
"allowSyntheticDefaultImports": true,
8+
"moduleResolution": "node",
9+
// ES2015 is the latest version supported by cypress (besides CommonJS)
10+
"target": "ES2015",
11+
"module": "ES2015",
12+
"declaration": true,
13+
"strict": true,
14+
"noImplicitAny": false,
15+
"outDir": "./dist",
16+
// https://github.com/vuejs/tsconfig/issues/6
17+
"ignoreDeprecations": "5.0"
18+
},
419
}

lib/commands/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function listUsers(details = false): Cypress.Chainable<Record<string, str
8585
} else {
8686
const list = Array.from(xmlDoc.querySelectorAll('users > *')).map(v => {
8787
// We only handle simple text properties for the moment
88-
const properties = [...v.childNodes].filter(c => c.childNodes.length <= 1)
88+
const properties = Array.from(v.childNodes).filter(c => c.childNodes.length <= 1)
8989

9090
return Object.fromEntries(properties.map(p => [p.nodeName, p.textContent || '']))
9191
})

0 commit comments

Comments
 (0)