ci: Update most of the dev tooling (no-changelog) (#6780)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-07-28 13:55:16 +02:00 committed by GitHub
parent d2bbdaa58a
commit 7461085408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 3275 additions and 3280 deletions

View file

@ -37,54 +37,48 @@
}, },
"devDependencies": { "devDependencies": {
"@n8n_io/eslint-config": "workspace:*", "@n8n_io/eslint-config": "workspace:*",
"@ngneat/falso": "^6.1.0", "@ngneat/falso": "^6.4.0",
"@types/jest": "^29.5.0", "@types/jest": "^29.5.3",
"@types/supertest": "^2.0.12", "@types/supertest": "^2.0.12",
"@vitest/coverage-c8": "^0.28.5", "@vitest/coverage-v8": "^0.33.0",
"c8": "^7.12.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cypress": "^12.8.1", "cypress": "^12.17.2",
"cypress-real-events": "^1.7.6", "cypress-real-events": "^1.9.1",
"jest": "^29.5.0", "jest": "^29.6.2",
"jest-environment-jsdom": "^29.5.0", "jest-environment-jsdom": "^29.6.2",
"jest-expect-message": "^1.1.3", "jest-expect-message": "^1.1.3",
"jest-mock": "^29.5.0", "jest-mock": "^29.6.2",
"jest-mock-extended": "^3.0.4", "jest-mock-extended": "^3.0.4",
"nock": "^13.2.9", "nock": "^13.3.2",
"nodemon": "^3.0.1",
"p-limit": "^3.1.0", "p-limit": "^3.1.0",
"prettier": "^2.8.3", "prettier": "*",
"rimraf": "^3.0.2", "rimraf": "^5.0.1",
"run-script-os": "^1.0.7", "run-script-os": "^1.0.7",
"start-server-and-test": "^1.14.0", "start-server-and-test": "^2.0.0",
"supertest": "^6.3.3", "supertest": "^6.3.3",
"ts-jest": "^29.1.0", "ts-jest": "^29.1.1",
"tsc-watch": "^6.0.0", "tsc-watch": "^6.0.4",
"turbo": "1.8.8", "turbo": "1.10.12",
"typescript": "*", "typescript": "*",
"vite": "^4.0.4", "vite": "^4.4.7",
"vitest": "^0.28.5", "vitest": "^0.33.0",
"vue-tsc": "^1.0.24" "vue-tsc": "^1.8.8"
}, },
"pnpm": { "pnpm": {
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"sqlite3", "sqlite3"
"vue-demi"
], ],
"overrides": { "overrides": {
"@types/node": "^18.16.16", "@types/node": "^18.16.16",
"browserslist": "^4.21.4",
"chokidar": "3.5.2", "chokidar": "3.5.2",
"decode-uri-component": "0.2.2",
"ejs": "^3.1.8",
"fork-ts-checker-webpack-plugin": "^6.0.4",
"http-cache-semantics": "4.1.1",
"jsonwebtoken": "9.0.0", "jsonwebtoken": "9.0.0",
"prettier": "^2.8.3", "prettier": "^3.0.0",
"semver": "^7.5.4", "semver": "^7.5.4",
"tough-cookie": "^4.1.3", "tough-cookie": "^4.1.3",
"tslib": "^2.5.0", "tslib": "^2.6.1",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.1.3", "typescript": "^5.1.6",
"xml2js": "^0.5.0", "xml2js": "^0.5.0",
"cpy@8>globby": "^11.1.0", "cpy@8>globby": "^11.1.0",
"qqjs>globby": "^11.1.0" "qqjs>globby": "^11.1.0"

View file

@ -39,7 +39,11 @@ export interface ClientOAuth2Options {
} }
class ResponseError extends Error { class ResponseError extends Error {
constructor(readonly status: number, readonly body: object, readonly code = 'ESTATUS') { constructor(
readonly status: number,
readonly body: object,
readonly code = 'ESTATUS',
) {
super(`HTTP status ${status}`); super(`HTTP status ${status}`);
} }
} }

View file

@ -24,7 +24,10 @@ export class ClientOAuth2Token {
private expires: Date; private expires: Date;
constructor(readonly client: ClientOAuth2, readonly data: ClientOAuth2TokenData) { constructor(
readonly client: ClientOAuth2,
readonly data: ClientOAuth2TokenData,
) {
this.tokenType = data.token_type?.toLowerCase() ?? 'bearer'; this.tokenType = data.token_type?.toLowerCase() ?? 'bearer';
this.accessToken = data.access_token; this.accessToken = data.access_token;
this.refreshToken = data.refresh_token; this.refreshToken = data.refresh_token;

View file

@ -22,7 +22,11 @@ export function expects<Keys extends keyof ClientOAuth2Options>(
} }
export class AuthError extends Error { export class AuthError extends Error {
constructor(message: string, readonly body: any, readonly code = 'EAUTH') { constructor(
message: string,
readonly body: any,
readonly code = 'EAUTH',
) {
super(message); super(message);
} }
} }

View file

@ -253,9 +253,9 @@ const config = (module.exports = {
], ],
/** /**
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-duplicate-imports.md * https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.md
*/ */
'@typescript-eslint/no-duplicate-imports': 'error', 'import/no-duplicates': 'error',
/** /**
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-invalid-void-type.md * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-invalid-void-type.md
@ -451,7 +451,7 @@ const config = (module.exports = {
}, },
}, },
{ {
files: ['test/**/*.ts'], files: ['test/**/*.ts', 'src/__tests__/*.ts'],
rules: { rules: {
'n8n-local-rules/no-skipped-tests': 'n8n-local-rules/no-skipped-tests':
process.env.NODE_ENV === 'development' ? 'warn' : 'error', process.env.NODE_ENV === 'development' ? 'warn' : 'error',
@ -460,7 +460,7 @@ const config = (module.exports = {
'@typescript-eslint/await-thenable': 'off', '@typescript-eslint/await-thenable': 'off',
'@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/naming-convention': 'off', '@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-duplicate-imports': 'off', 'import/no-duplicates': 'off',
'@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-loop-func': 'off', '@typescript-eslint/no-loop-func': 'off',
'@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/no-non-null-assertion': 'off',

View file

@ -3,22 +3,22 @@
"private": true, "private": true,
"version": "0.0.1", "version": "0.0.1",
"devDependencies": { "devDependencies": {
"@types/eslint": "~8.37", "@types/eslint": "^8.44.1",
"@typescript-eslint/eslint-plugin": "~5.59", "@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "~5.59", "@typescript-eslint/parser": "^6.2.0",
"@vue/eslint-config-typescript": "^11.0.3", "@vue/eslint-config-typescript": "^11.0.3",
"eslint": "~8.39", "eslint": "^8.45.0",
"eslint-config-airbnb-typescript": "~17.0", "eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "~8.8", "eslint-config-prettier": "^8.9.0",
"eslint-import-resolver-typescript": "~3.5", "eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-diff": "~2.0", "eslint-plugin-diff": "^2.0.1",
"eslint-plugin-import": "~2.27", "eslint-plugin-import": "^2.28.0",
"eslint-plugin-n8n-local-rules": "~1.0", "eslint-plugin-n8n-local-rules": "^1.0.0",
"eslint-plugin-prettier": "~4.2", "eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-unicorn": "~46.0", "eslint-plugin-unicorn": "^48.0.1",
"eslint-plugin-unused-imports": "~2.0", "eslint-plugin-unused-imports": "^3.0.0",
"eslint-plugin-vue": "^9.12.0", "eslint-plugin-vue": "^9.15.1",
"vue-eslint-parser": "^9.3.0" "vue-eslint-parser": "^9.3.1"
}, },
"scripts": { "scripts": {
"clean": "rimraf .turbo", "clean": "rimraf .turbo",

View file

@ -93,13 +93,10 @@
"@types/ws": "^8.5.4", "@types/ws": "^8.5.4",
"@types/yamljs": "^0.2.31", "@types/yamljs": "^0.2.31",
"chokidar": "^3.5.2", "chokidar": "^3.5.2",
"concurrently": "^5.1.0", "concurrently": "^8.2.0",
"mock-jwks": "^1.0.9",
"nodemon": "^2.0.2",
"run-script-os": "^1.0.7",
"ts-essentials": "^7.0.3", "ts-essentials": "^7.0.3",
"tsc-alias": "^1.8.2", "tsc-alias": "^1.8.7",
"tsconfig-paths": "^4.1.2" "tsconfig-paths": "^4.2.0"
}, },
"dependencies": { "dependencies": {
"@n8n/client-oauth2": "workspace:*", "@n8n/client-oauth2": "workspace:*",

View file

@ -1,42 +0,0 @@
const { mergeConfig } = require('vite');
const { resolve } = require('path');
module.exports = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
addons: [
'@storybook/addon-styling',
'@storybook/addon-links',
'@storybook/addon-essentials',
// Disabled until this is actually used rather otherwise its a blank tab
// '@storybook/addon-interactions',
'@storybook/addon-a11y',
'storybook-dark-mode',
],
staticDirs: ['../public'],
framework: {
name: '@storybook/vue3-vite',
options: {},
},
disableTelemetry: true,
async viteFinal(config, { configType }) {
// return the customized config
return mergeConfig(config, {
// customize the Vite config here
resolve: {
alias: [
{
find: /^@n8n-design-system\//,
replacement: `${resolve(__dirname, '..')}/src/`,
},
{
find: /^n8n-design-system$/,
replacement: `${resolve(__dirname, '..')}/src/main.ts`,
},
],
},
});
},
docs: {
autodocs: true,
},
};

View file

@ -0,0 +1,25 @@
import type { StorybookConfig } from '@storybook/vue3-vite';
const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
addons: [
'@storybook/addon-styling',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-a11y',
'storybook-dark-mode',
],
staticDirs: ['../public'],
framework: {
name: '@storybook/vue3-vite',
options: {},
},
core: {
disableTelemetry: true,
},
docs: {
autodocs: true,
},
};
export default config;

View file

@ -41,18 +41,18 @@
"@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/vue-fontawesome": "^3.0.3", "@fortawesome/vue-fontawesome": "^3.0.3",
"@storybook/addon-a11y": "^7.0.21", "@storybook/addon-a11y": "^7.1.1",
"@storybook/addon-actions": "^7.0.21", "@storybook/addon-actions": "^7.1.1",
"@storybook/addon-docs": "^7.0.21", "@storybook/addon-docs": "^7.1.1",
"@storybook/addon-essentials": "^7.0.21", "@storybook/addon-essentials": "^7.1.1",
"@storybook/addon-links": "^7.0.21", "@storybook/addon-links": "^7.1.1",
"@storybook/addon-postcss": "3.0.0-alpha.1", "@storybook/addon-postcss": "3.0.0-alpha.1",
"@storybook/addon-styling": "^1.3.0", "@storybook/addon-styling": "^1.3.4",
"@storybook/vue3": "^7.0.21", "@storybook/vue3": "^7.1.1",
"@storybook/vue3-vite": "^7.0.21", "@storybook/vue3-vite": "^7.1.1",
"@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^5.17.0",
"@testing-library/user-event": "^14.4.3", "@testing-library/user-event": "^14.4.3",
"@testing-library/vue": "^6.6.1", "@testing-library/vue": "^7.0.0",
"@types/markdown-it": "^12.2.3", "@types/markdown-it": "^12.2.3",
"@types/markdown-it-emoji": "^2.0.2", "@types/markdown-it-emoji": "^2.0.2",
"@types/markdown-it-link-attributes": "^3.0.1", "@types/markdown-it-link-attributes": "^3.0.1",
@ -62,11 +62,11 @@
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"core-js": "^3.31.0", "core-js": "^3.31.0",
"jsdom": "21.1.0", "jsdom": "21.1.0",
"sass": "^1.63.4", "sass": "^1.64.1",
"sass-loader": "^13.3.2", "sass-loader": "^13.3.2",
"storybook": "^7.0.21", "storybook": "^7.1.1",
"storybook-addon-themes": "^6.1.0", "storybook-addon-themes": "^6.1.0",
"storybook-dark-mode": "^3.0.0" "storybook-dark-mode": "^3.0.1"
}, },
"dependencies": { "dependencies": {
"element-plus": "^2.3.6", "element-plus": "^2.3.6",

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`N8NActionBox > should render correctly 1`] = ` exports[`N8NActionBox > should render correctly 1`] = `
"<div class=\\"n8n-action-box container\\" data-test-id=\\"action-box\\"> "<div class=\\"n8n-action-box container\\" data-test-id=\\"action-box\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nActionDropdown > should render custom styling correctly 1`] = ` exports[`components > N8nActionDropdown > should render custom styling correctly 1`] = `
"<div class=\\"action-dropdown-container actionDropdownContainer\\"> "<div class=\\"action-dropdown-container actionDropdownContainer\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nBadge > props > should render default theme correctly 1`] = `"<span class=\\"n8n-badge default\\"><n8n-text-stub bold=\\"true\\" size=\\"large\\" compact=\\"true\\" tag=\\"span\\"></n8n-text-stub></span>"`; exports[`components > N8nBadge > props > should render default theme correctly 1`] = `"<span class=\\"n8n-badge default\\"><n8n-text-stub bold=\\"true\\" size=\\"large\\" compact=\\"true\\" tag=\\"span\\"></n8n-text-stub></span>"`;

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nButton > props > icon > should render icon button 1`] = `"<button class=\\"button button primary medium withIcon\\" aria-live=\\"polite\\"><span class=\\"icon\\"><n8n-icon-stub icon=\\"plus-circle\\" size=\\"medium\\" spin=\\"false\\"></n8n-icon-stub></span><span>Button</span></button>"`; exports[`components > N8nButton > props > icon > should render icon button 1`] = `"<button class=\\"button button primary medium withIcon\\" aria-live=\\"polite\\"><span class=\\"icon\\"><n8n-icon-stub icon=\\"plus-circle\\" size=\\"medium\\" spin=\\"false\\"></n8n-icon-stub></span><span>Button</span></button>"`;

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nCallout > should render additional slots correctly 1`] = ` exports[`components > N8nCallout > should render additional slots correctly 1`] = `
"<div class=\\"n8n-callout callout custom round\\" role=\\"alert\\"> "<div class=\\"n8n-callout callout custom round\\" role=\\"alert\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nCard > should render correctly 1`] = ` exports[`components > N8nCard > should render correctly 1`] = `
"<div class=\\"card\\"> "<div class=\\"card\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nCheckbox > should render with both child and label 1`] = ` exports[`components > N8nCheckbox > should render with both child and label 1`] = `
<div> <div>

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nColorPicker > should render with input 1`] = ` exports[`components > N8nColorPicker > should render with input 1`] = `
<div> <div>

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nDatatable > should render correctly 1`] = ` exports[`components > N8nDatatable > should render correctly 1`] = `
"<div class=\\"datatable datatableWrapper\\"> "<div class=\\"datatable datatableWrapper\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`N8nInfoTip > should render correctly as note 1`] = `"<div class=\\"n8n-info-tip info note bold\\"><span class=\\"iconText\\"><span class=\\"n8n-text compact size-medium regular n8n-icon n8n-icon\\"><!----></span><span>Need help doing something?<a href=\\"/docs\\" target=\\"_blank\\">Open docs</a></span></span></div>"`; exports[`N8nInfoTip > should render correctly as note 1`] = `"<div class=\\"n8n-info-tip info note bold\\"><span class=\\"iconText\\"><span class=\\"n8n-text compact size-medium regular n8n-icon n8n-icon\\"><!----></span><span>Need help doing something?<a href=\\"/docs\\" target=\\"_blank\\">Open docs</a></span></span></div>"`;

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`N8nInput > should render correctly 1`] = ` exports[`N8nInput > should render correctly 1`] = `
"<div class=\\"el-input el-input--large n8n-input\\"> "<div class=\\"el-input el-input--large n8n-input\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nNotice > props > content > should render HTML 1`] = ` exports[`components > N8nNotice > props > content > should render HTML 1`] = `
"<div id=\\"notice\\" class=\\"notice notice warning\\" role=\\"alert\\"> "<div id=\\"notice\\" class=\\"notice notice warning\\" role=\\"alert\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nRecycleScroller > should render correctly 1`] = ` exports[`components > N8nRecycleScroller > should render correctly 1`] = `
"<div class=\\"recycle-scroller-wrapper\\"> "<div class=\\"recycle-scroller-wrapper\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nSelect > should render correctly 1`] = ` exports[`components > N8nSelect > should render correctly 1`] = `
"<div class=\\"n8n-select container\\"> "<div class=\\"n8n-select container\\">

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`components > N8nTree > should render each tree with node class 1`] = ` exports[`components > N8nTree > should render each tree with node class 1`] = `
"<div class=\\"n8n-tree\\"> "<div class=\\"n8n-tree\\">

View file

@ -41,7 +41,7 @@ export default mergeConfig(
environment: 'jsdom', environment: 'jsdom',
setupFiles: ['./src/__tests__/setup.ts'], setupFiles: ['./src/__tests__/setup.ts'],
coverage: { coverage: {
provider: 'c8', provider: 'v8',
reporter: coverageReporters, reporter: coverageReporters,
all: true, all: true,
}, },

View file

@ -16,13 +16,13 @@ module.exports = {
'import/no-extraneous-dependencies': 'off', 'import/no-extraneous-dependencies': 'off',
'import/order': 'off', 'import/order': 'off',
'import/no-cycle': 'warn', 'import/no-cycle': 'warn',
'import/no-duplicates': 'off',
indent: 'off', indent: 'off',
'@typescript-eslint/ban-types': 'off', '@typescript-eslint/ban-types': 'off',
'@typescript-eslint/dot-notation': 'off', '@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/lines-between-class-members': 'off', '@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/member-delimiter-style': 'off', '@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/naming-convention': 'off', '@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-duplicate-imports': 'off',
'@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-for-in-array': 'off', '@typescript-eslint/no-for-in-array': 'off',
'@typescript-eslint/no-loop-func': 'off', '@typescript-eslint/no-loop-func': 'off',
@ -46,5 +46,9 @@ module.exports = {
'@typescript-eslint/restrict-template-expressions': 'off', '@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/unbound-method': 'off', '@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }], '@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
}, },
}; };

View file

@ -64,8 +64,8 @@
"n8n-design-system": "workspace:*", "n8n-design-system": "workspace:*",
"n8n-workflow": "workspace:*", "n8n-workflow": "workspace:*",
"normalize-wheel": "^1.0.1", "normalize-wheel": "^1.0.1",
"pinia": "^2.0.22", "pinia": "^2.1.6",
"prettier": "^2.8.3", "prettier": "*",
"stream-browserify": "^3.0.0", "stream-browserify": "^3.0.0",
"timeago.js": "^4.0.2", "timeago.js": "^4.0.2",
"uuid": "^8.3.2", "uuid": "^8.3.2",
@ -79,12 +79,9 @@
"xss": "^1.0.14" "xss": "^1.0.14"
}, },
"devDependencies": { "devDependencies": {
"@faker-js/faker": "^7.6.0", "@faker-js/faker": "^8.0.2",
"@pinia/testing": "^0.0.14", "@pinia/testing": "^0.1.3",
"@sentry/vite-plugin": "^0.4.0", "@sentry/vite-plugin": "^2.5.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/user-event": "^14.4.3",
"@testing-library/vue": "^6.6.1",
"@types/dateformat": "^3.0.0", "@types/dateformat": "^3.0.0",
"@types/file-saver": "^2.0.1", "@types/file-saver": "^2.0.1",
"@types/humanize-duration": "^3.27.1", "@types/humanize-duration": "^3.27.1",
@ -92,7 +89,6 @@
"@types/lodash-es": "^4.17.6", "@types/lodash-es": "^4.17.6",
"@types/luxon": "^3.2.0", "@types/luxon": "^3.2.0",
"@types/uuid": "^8.3.2", "@types/uuid": "^8.3.2",
"@vitejs/plugin-vue": "^4.2.3",
"miragejs": "^0.1.47" "miragejs": "^0.1.47"
} }
} }

View file

@ -1548,9 +1548,7 @@ export type UTMCampaign =
| 'upgrade-custom-data-filter' | 'upgrade-custom-data-filter'
| 'upgrade-canvas-nav' | 'upgrade-canvas-nav'
| 'upgrade-workflow-sharing' | 'upgrade-workflow-sharing'
| 'upgrade-canvas-nav'
| 'upgrade-credentials-sharing' | 'upgrade-credentials-sharing'
| 'upgrade-workflow-sharing'
| 'upgrade-api' | 'upgrade-api'
| 'upgrade-audit-logs' | 'upgrade-audit-logs'
| 'upgrade-ldap' | 'upgrade-ldap'

View file

@ -57,21 +57,24 @@ const filter = reactive(getDefaultFilter());
// Automatically set up v-models based on filter properties // Automatically set up v-models based on filter properties
const vModel = reactive( const vModel = reactive(
getObjectKeys(filter).reduce((acc, key) => { getObjectKeys(filter).reduce(
acc[key] = computed({ (acc, key) => {
get() { acc[key] = computed({
return filter[key]; get() {
}, return filter[key];
set(value) { },
// TODO: find out what exactly is typechecker complaining about set(value) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // TODO: find out what exactly is typechecker complaining about
// @ts-ignore // eslint-disable-next-line @typescript-eslint/ban-ts-comment
filter[key] = value; // @ts-ignore
emit('filterChanged', filter); filter[key] = value;
}, emit('filterChanged', filter);
}); },
return acc; });
}, {} as Record<keyof ExecutionFilterType, ReturnType<typeof computed>>), return acc;
},
{} as Record<keyof ExecutionFilterType, ReturnType<typeof computed>>,
),
); );
const statuses = computed(() => [ const statuses = computed(() => [

View file

@ -842,7 +842,9 @@ $--mode-selector-width: 92px;
.selectIcon { .selectIcon {
cursor: pointer; cursor: pointer;
font-size: 14px; font-size: 14px;
transition: transform 0.3s, -webkit-transform 0.3s; transition:
transform 0.3s,
-webkit-transform 0.3s;
-webkit-transform: rotateZ(0); -webkit-transform: rotateZ(0);
transform: rotateZ(0); transform: rotateZ(0);

View file

@ -361,7 +361,7 @@ export default defineComponent({
filterText: string, filterText: string,
useShort = false, useShort = false,
): IVariableSelectorOption[] | null { ): IVariableSelectorOption[] | null {
const outputData = pinData.map((data) => ({ json: data } as INodeExecutionData))[0]; const outputData = pinData.map((data) => ({ json: data }) as INodeExecutionData)[0];
return this.getNodeOutput(nodeName, outputData, filterText, useShort); return this.getNodeOutput(nodeName, outputData, filterText, useShort);
}, },

View file

@ -22,8 +22,8 @@ const defaultFilterState: ExecutionFilterType = {
const workflowDataFactory = (): IWorkflowShortResponse => ({ const workflowDataFactory = (): IWorkflowShortResponse => ({
createdAt: faker.date.past().toDateString(), createdAt: faker.date.past().toDateString(),
updatedAt: faker.date.past().toDateString(), updatedAt: faker.date.past().toDateString(),
id: faker.datatype.uuid(), id: faker.string.uuid(),
name: faker.datatype.string(), name: faker.string.sample(),
active: faker.datatype.boolean(), active: faker.datatype.boolean(),
tags: [], tags: [],
}); });
@ -68,7 +68,7 @@ describe('ExecutionFilter', () => {
() => () =>
({ ({
track, track,
} as unknown as Telemetry), }) as unknown as Telemetry,
); );
const { getByTestId } = renderComponent({ const { getByTestId } = renderComponent({
@ -92,7 +92,7 @@ describe('ExecutionFilter', () => {
['production', 'default', false, undefined], ['production', 'default', false, undefined],
['production', 'default', true, workflowsData], ['production', 'default', true, workflowsData],
])( ])(
'renders in %s environment on %s deployment with advancedExecutionFilters %s and workflows %s', 'renders in %s environment on %s deployment with advancedExecutionFilters %s',
async (environment, deployment, advancedExecutionFilters, workflows) => { async (environment, deployment, advancedExecutionFilters, workflows) => {
const { html, getByTestId, queryByTestId, queryAllByTestId } = renderComponent({ const { html, getByTestId, queryByTestId, queryAllByTestId } = renderComponent({
props: { workflows }, props: { workflows },

View file

@ -21,7 +21,7 @@ const generateUndefinedNullOrString = () => {
case 1: case 1:
return null; return null;
case 2: case 2:
return faker.datatype.uuid(); return faker.string.uuid();
case 3: case 3:
return ''; return '';
default: default:
@ -32,23 +32,23 @@ const generateUndefinedNullOrString = () => {
const workflowDataFactory = (): IWorkflowDb => ({ const workflowDataFactory = (): IWorkflowDb => ({
createdAt: faker.date.past().toDateString(), createdAt: faker.date.past().toDateString(),
updatedAt: faker.date.past().toDateString(), updatedAt: faker.date.past().toDateString(),
id: faker.datatype.uuid(), id: faker.string.uuid(),
name: faker.datatype.string(), name: faker.string.sample(),
active: faker.datatype.boolean(), active: faker.datatype.boolean(),
tags: [], tags: [],
nodes: [], nodes: [],
connections: {}, connections: {},
versionId: faker.datatype.number().toString(), versionId: faker.number.int().toString(),
}); });
const executionDataFactory = (): IExecutionsSummary => ({ const executionDataFactory = (): IExecutionsSummary => ({
id: faker.datatype.uuid(), id: faker.string.uuid(),
finished: faker.datatype.boolean(), finished: faker.datatype.boolean(),
mode: faker.helpers.arrayElement(['manual', 'trigger']), mode: faker.helpers.arrayElement(['manual', 'trigger']),
startedAt: faker.date.past(), startedAt: faker.date.past(),
stoppedAt: faker.date.past(), stoppedAt: faker.date.past(),
workflowId: faker.datatype.number().toString(), workflowId: faker.number.int().toString(),
workflowName: faker.datatype.string(), workflowName: faker.string.sample(),
status: faker.helpers.arrayElement(['failed', 'success']), status: faker.helpers.arrayElement(['failed', 'success']),
nodeExecutionStatus: {}, nodeExecutionStatus: {},
retryOf: generateUndefinedNullOrString(), retryOf: generateUndefinedNullOrString(),

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`RunDataJson.vue > renders json values properly 1`] = ` exports[`RunDataJson.vue > renders json values properly 1`] = `
<div> <div>

View file

@ -1,4 +1,4 @@
// Vitest Snapshot v1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`RunDataJsonSchema.vue > renders schema for data 1`] = ` exports[`RunDataJsonSchema.vue > renders schema for data 1`] = `
<div> <div>

View file

@ -4,7 +4,7 @@ import { StateField, StateEffect } from '@codemirror/state';
import { tags } from '@lezer/highlight'; import { tags } from '@lezer/highlight';
import { syntaxHighlighting, HighlightStyle } from '@codemirror/language'; import { syntaxHighlighting, HighlightStyle } from '@codemirror/language';
import type { ColoringStateEffect, Plaintext, Resolvable, Resolved } from '@/types/expressions'; import type { ColoringStateEffect, Plaintext, Resolvable } from '@/types/expressions';
const cssClasses = { const cssClasses = {
validResolvable: 'cm-valid-resolvable', validResolvable: 'cm-valid-resolvable',
@ -80,7 +80,7 @@ const coloringStateField = StateField.define<DecorationSet>({
}, },
}); });
function addColor(view: EditorView, segments: Array<Resolvable | Resolved>) { function addColor(view: EditorView, segments: Resolvable[]) {
const effects: Array<StateEffect<unknown>> = segments.map(({ from, to, kind, error }) => const effects: Array<StateEffect<unknown>> = segments.map(({ from, to, kind, error }) =>
coloringStateEffects.addColorEffect.of({ from, to, kind, error }), coloringStateEffects.addColorEffect.of({ from, to, kind, error }),
); );

View file

@ -158,7 +158,10 @@ export class N8nConnector extends AbstractConnector {
getEndpointOffset: Function | null; getEndpointOffset: Function | null;
private internalSegments: FlowchartSegment[] = []; private internalSegments: FlowchartSegment[] = [];
constructor(public connection: Connection, params: N8nConnectorOptions) { constructor(
public connection: Connection,
params: N8nConnectorOptions,
) {
super(connection, params); super(connection, params);
params = params || {}; params = params || {};
this.minorAnchor = 0; // seems to be angle at which connector leaves endpoint this.minorAnchor = 0; // seems to be angle at which connector leaves endpoint

View file

@ -70,7 +70,7 @@ export const useSourceControlStore = defineStore('sourceControl', () => {
}; };
const makePreferencesAction = const makePreferencesAction =
(action: typeof vcApi.savePreferences | typeof vcApi.updatePreferences) => (action: typeof vcApi.savePreferences) =>
async (preferences: Partial<SourceControlPreferences>) => { async (preferences: Partial<SourceControlPreferences>) => {
const data = await action(rootStore.getRestApiContext, preferences); const data = await action(rootStore.getRestApiContext, preferences);
setPreferences(data); setPreferences(data);

View file

@ -224,12 +224,13 @@ const WorkflowsView = defineComponent({
if (this.settingsStore.areTagsEnabled && filters.tags.length > 0) { if (this.settingsStore.areTagsEnabled && filters.tags.length > 0) {
matches = matches =
matches && matches &&
filters.tags.every((tag) => filters.tags.every(
(resource.tags as ITag[])?.find((resourceTag) => (tag) =>
typeof resourceTag === 'object' (resource.tags as ITag[])?.find((resourceTag) =>
? `${resourceTag.id}` === `${tag}` typeof resourceTag === 'object'
: `${resourceTag}` === `${tag}`, ? `${resourceTag.id}` === `${tag}`
), : `${resourceTag}` === `${tag}`,
),
); );
} }

View file

@ -122,7 +122,7 @@ export default mergeConfig(
environment: 'jsdom', environment: 'jsdom',
setupFiles: ['./src/__tests__/setup.ts'], setupFiles: ['./src/__tests__/setup.ts'],
coverage: { coverage: {
provider: 'c8', provider: 'v8',
reporter: coverageReporters, reporter: coverageReporters,
all: true, all: true,
}, },

View file

@ -48,10 +48,7 @@
], ],
"devDependencies": { "devDependencies": {
"@oclif/dev-cli": "^1.22.2", "@oclif/dev-cli": "^1.22.2",
"@types/express": "^4.17.6", "@types/inquirer": "^6.5.0"
"@types/inquirer": "^6.5.0",
"@types/tmp": "^0.2.0",
"@types/vorpal": "^1.11.0"
}, },
"dependencies": { "dependencies": {
"@oclif/command": "^1.5.18", "@oclif/command": "^1.5.18",
@ -61,9 +58,7 @@
"inquirer": "^7.0.1", "inquirer": "^7.0.1",
"n8n-core": "workspace:*", "n8n-core": "workspace:*",
"n8n-workflow": "workspace:*", "n8n-workflow": "workspace:*",
"oauth-1.0a": "^2.2.6",
"replace-in-file": "^6.0.0", "replace-in-file": "^6.0.0",
"request": "^2.88.2", "tmp-promise": "^3.0.3"
"tmp-promise": "^3.0.2"
} }
} }

File diff suppressed because it is too large Load diff