-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(test): add new koko tests and eslint housekeeping - add new 070-user-group-search-and-share test and docs from the koko test paper - add new groups api and add those to the tdk client - add several es-lint rules to the default config and apply those * fix(artifacts): rebuild artifacts after rebase * fix(test): fix wrong path * feat(test): add new koko tests and some test housekeeping - add new 080-create-space test and docs based on the koko test paper - add client version guard to protect the test from unsupported client versions - rename the api tdk package to endpoints, to not have a api.api route which is needed for ocis - add eslint rule to have linebreaks between class members - stop using k6 response json method - add client endpoints for application - add client endpoints for drive - add client endpoints for role * - add missing client demos to the kitchen sink test - fix static space creation count * feat(test): add new koko tests and some test housekeeping - add new 090-add-remove-user-share test and docs based on the koko test paper - add new share delete client endpoint * add share.delete to the kitchen sink example * feat(test): add new koko tests and some test housekeeping - add koko 030-search-for-filename test and docs - introduce versionSupported helper and use it instead of plain conditions - add tag search - use og jsonpath instead of jsonpath-plus and adjust related helpers - introduce tag client endpoints - introduce systemtags and systemtags_relations endpoints - introduce libregraph org tags endpoints * fix(cleanup endpoints): cleanup all tdk endpoints * fix(linting): cleanup eslint config and apply airbnb best practices * feat(eslint): split up eslint config * enhancement: cleanup tdk client this enhancement cleans up the tdk/client endpoint structure and introduces a naming schema which applies to all compatible clouds. beside the client refactoring it updates all related tests to use that changed api. * enhancement: cleanup utils tdk package cleanup, rename and structure available and used utils * enhancement: add vitest and utils unit tests integrate vitest, make it possible to run tests on monorepo level via turbo and provide unit tests for the utils package * fix: circular platform import mote Platform const out of the client to prevent circular imports * fix: cleanup tdk auth adapter cleanup auth adapters and rename the oidc adapter to kopano * fix: eslint semi rule remove not needed semicolons * fix: requestFactory params and queryJson empty value handling * fix: long chained rebase cleanup previous pr rebase
- Loading branch information
Showing
148 changed files
with
5,576 additions
and
4,384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,16 +12,17 @@ | |
"clean": "turbo run clean --no-daemon --parallel && del-cli .pnpm-store node_modules", | ||
"dev": "ROARR_LOG=true turbo run dev --parallel --concurrency 64 --no-daemon | roarr", | ||
"lint": "eslint package.json && syncpack list-mismatches && turbo run lint --no-daemon", | ||
"lint:fix": "eslint package.json --fix && syncpack fix-mismatches && turbo run lint:fix --no-daemon" | ||
"lint:fix": "eslint package.json --fix && syncpack fix-mismatches && turbo run lint:fix --no-daemon", | ||
"test": "turbo run test --no-daemon" | ||
}, | ||
"devDependencies": { | ||
"@changesets/cli": "^2.26.1", | ||
"@ownclouders/eslint-config": "workspace:*", | ||
"@roarr/cli": "^5.11.0", | ||
"del-cli": "^5.0.0", | ||
"syncpack": "^9.8.4", | ||
"turbo": "^1.8.8", | ||
"typescript": "^5.0.3" | ||
"turbo": "^1.9.1", | ||
"typescript": "^5.0.4" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"root": true, | ||
"extends": ["."], | ||
"parser": "espree", | ||
"env": { | ||
"node": true | ||
} | ||
"extends": ["."] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,36 @@ | ||
const sharedExtends = [ | ||
require.resolve('./src/prettier.js'), | ||
require.resolve('./src/eslint.js'), | ||
require.resolve('./src/import.js'), | ||
require.resolve('./src/turbo.js'), | ||
require.resolve('./src/simple-import-sort.js') | ||
] | ||
|
||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'prettier', | ||
'turbo', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/recommended' | ||
require.resolve('./src/airbnb-base.js'), | ||
...sharedExtends | ||
], | ||
processor: 'disable/disable', | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './tsconfig.json' | ||
}, | ||
plugins: [ '@typescript-eslint', 'eslint-plugin-unicorn', 'disable', 'simple-import-sort', 'json-files', 'no-relative-import-paths', 'relative-imports-when-same-folder'], | ||
rules: { | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
'import/prefer-default-export': 'off', | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'import/first': 'error', | ||
'import/no-duplicates': 'error', | ||
'space-before-blocks': [ 'error', 'always' ], | ||
'import/newline-after-import': [ 'error', { 'count': 1 } ], | ||
'no-multiple-empty-lines': ['error', { 'max': 1, 'maxEOF': 1, 'maxBOF': 0 }], | ||
'import/no-named-as-default': 'error', | ||
'import/no-default-export': 'error', | ||
'import/no-useless-path-segments': 'error', | ||
'import/no-cycle': 'error', | ||
'import/no-self-import': 'error', | ||
'import/no-relative-packages': 'error', | ||
'object-curly-spacing': [ 'error', 'always' ], | ||
'comma-spacing': ['error', { 'before': false, 'after': true }], | ||
'comma-dangle': ['error', 'never'], | ||
'computed-property-spacing': [ 'error', 'always' ], | ||
'no-console': 'off', | ||
'arrow-body-style': ['error', 'always'], | ||
'arrow-parens': ['error', 'always'], | ||
'quotes': ['error', 'single', { 'avoidEscape': true }], | ||
'no-return-assign': 'off', | ||
'function-paren-newline': ['error', 'never'], | ||
'brace-style': 'error', | ||
'class-methods-use-this': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'indent': ['error', 2], | ||
'no-unused-vars': 'off', | ||
'no-underscore-dangle': 'off', | ||
'no-nested-ternary': 'off', | ||
'@typescript-eslint/no-shadow': 'off', | ||
'no-await-in-loop': 'off', | ||
'no-plusplus': 'off', | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/lines-between-class-members': 'off', | ||
'default-case': 'off', | ||
'no-restricted-syntax': 'off', | ||
'@typescript-eslint/no-unused-expressions': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-loop-func': 'off', | ||
'lines-between-class-members': ['error', 'always'], | ||
'no-continue': 'off', | ||
'no-relative-import-paths/no-relative-import-paths': [ | ||
'error', | ||
{ 'allowSameFolder': true, 'rootDir': 'src', 'prefix': '@' } | ||
], | ||
'relative-imports-when-same-folder/no-relative-imports-when-same-folder': 'error' | ||
}, | ||
'settings': { | ||
'import/resolver': { | ||
'typescript': {} | ||
} | ||
}, | ||
ignorePatterns: ['build.mjs', 'turbowatch.ts', 'vitest.config.ts', '*.test.ts'], | ||
overrides: [ | ||
{ | ||
files: [ '**/package.json' ], | ||
plugins: [ 'json-files' ], | ||
parser: 'espree', | ||
rules: { | ||
'json-files/sort-package-json': 'error', | ||
'json-files/require-license': 'error', | ||
'json-files/restrict-ranges': 'error', | ||
'json-files/require-unique-dependency-names': 'error', | ||
'relative-imports-when-same-folder/no-relative-imports-when-same-folder': 'off' | ||
files: ['*.ts'], | ||
extends: [ | ||
require.resolve('./src/airbnb-base.js'), | ||
require.resolve('./src/airbnb-typescript-base.js'), | ||
require.resolve('./src/no-relative-import-paths.js'), | ||
require.resolve('./src/relative-imports-when-same-folder.js'), | ||
...sharedExtends | ||
], | ||
parserOptions: { | ||
project: './tsconfig.json' | ||
} | ||
}, | ||
{ | ||
files: [ '**/*.js' ], | ||
parser: 'espree', | ||
rules: { | ||
'relative-imports-when-same-folder/no-relative-imports-when-same-folder': 'off' | ||
} | ||
files: ['*.json'], | ||
extends: [ | ||
require.resolve('./src/json-files.js') | ||
] | ||
} | ||
] | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['airbnb-base'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['airbnb-typescript/base'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
rules: { | ||
'max-len': ['error', 150], | ||
'arrow-body-style': ['error', 'always'], | ||
'semi': ['error', 'never'], | ||
'arrow-parens': ['error', 'always'], | ||
'brace-style': ['error', '1tbs', { allowSingleLine: false }], | ||
'object-curly-spacing': [ 'error', 'always' ], | ||
'quotes': ['error', 'single', { 'avoidEscape': true }], | ||
'comma-spacing': ['error', { 'before': false, 'after': true }], | ||
'comma-dangle': ['error', 'never'], | ||
'no-console': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
extends: ['plugin:import/recommended'], | ||
rules: { | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off', | ||
'import/prefer-default-export': 'off', | ||
'import/no-duplicates': 'error', | ||
'import/newline-after-import': ['error', { count: 1 }], | ||
'import/no-default-export': 'error', | ||
'import/no-useless-path-segments': 'error', | ||
'import/no-cycle': 'error', | ||
'import/no-self-import': 'error' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
plugins: ['json-files'], | ||
rules: { | ||
'json-files/sort-package-json': 'error', | ||
'json-files/require-license': 'error', | ||
'json-files/restrict-ranges': 'error', | ||
'json-files/require-unique-dependency-names': 'error', | ||
'relative-imports-when-same-folder/no-relative-imports-when-same-folder': 'off', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
plugins: ['no-relative-import-paths'], | ||
rules: { | ||
'no-relative-import-paths/no-relative-import-paths': [ | ||
'error', | ||
{ 'allowSameFolder': true, 'rootDir': 'src', 'prefix': '@' } | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['prettier'], | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/eslint-config/src/relative-imports-when-same-folder.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: ['relative-imports-when-same-folder'], | ||
rules: { | ||
'relative-imports-when-same-folder/no-relative-imports-when-same-folder': 'error' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
plugins: ['simple-import-sort'], | ||
rules: { | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['turbo'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { vi } from 'vitest' | ||
|
||
vi.mock('k6/http', () => { | ||
return { | ||
CookieJar: vi.fn() | ||
} | ||
}) | ||
|
||
vi.mock('k6/encoding', () => { | ||
return {} | ||
}) | ||
|
||
vi.mock('k6', () => { | ||
return {} | ||
}) | ||
|
||
vi.mock('https://jslib.k6.io/url/1.0.0/index.js', () => { | ||
return { | ||
URLSearchParams: URLSearchParams | ||
} | ||
}) | ||
|
||
vi.mock('k6/experimental/timers', () => { | ||
return {} | ||
}) | ||
|
||
vi.mock('https://jslib.k6.io/k6-utils/1.2.0/index.js', () => { | ||
return { | ||
randomString: vi.fn() | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.