refactor: Impose import/order linting rule across nodes packages (no-changelog) (#12314)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-19 18:46:14 +01:00
committed by GitHub
parent 8c635993bd
commit bafac73eb5
1120 changed files with 2677 additions and 2827 deletions

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,5 +1,6 @@
import nock from 'nock';
import type { IHttpRequestMethods } from 'n8n-workflow';
import nock from 'nock';
import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers';
jest.mock('../../../../v2/transport', () => {

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,10 +1,11 @@
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
import nock from 'nock';
import * as transport from '../../../../v2/transport';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
import type { WorkflowTestData } from '@test/nodes/types';
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');

View File

@@ -1,5 +1,6 @@
import nock from 'nock';
import type { IHttpRequestMethods } from 'n8n-workflow';
import nock from 'nock';
import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers';
jest.mock('../../../../v2/transport', () => {

View File

@@ -1,5 +1,6 @@
import nock from 'nock';
import type { IHttpRequestMethods } from 'n8n-workflow';
import nock from 'nock';
import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers';
jest.mock('../../../../v2/transport', () => {

View File

@@ -1,5 +1,6 @@
import nock from 'nock';
import type { IHttpRequestMethods } from 'n8n-workflow';
import nock from 'nock';
import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers';
jest.mock('../../../../v2/transport', () => {

View File

@@ -1,7 +1,8 @@
import { get } from 'lodash';
import { mock } from 'jest-mock-extended';
import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow';
import { get } from 'lodash';
import { constructExecutionMetaData } from 'n8n-core';
import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow';
import {
checkRange,
prepareOutput,

View File

@@ -11,20 +11,17 @@ import type {
} from 'n8n-workflow';
import { NodeApiError, NodeConnectionType } from 'n8n-workflow';
import { generatePairedItemData } from '../../../../utils/utilities';
import { oldVersionNotice } from '@utils/descriptions';
import {
microsoftApiRequest,
microsoftApiRequestAllItems,
microsoftApiRequestAllItemsSkip,
} from './GenericFunctions';
import { workbookFields, workbookOperations } from './WorkbookDescription';
import { worksheetFields, worksheetOperations } from './WorksheetDescription';
import { tableFields, tableOperations } from './TableDescription';
import { oldVersionNotice } from '@utils/descriptions';
import { workbookFields, workbookOperations } from './WorkbookDescription';
import { worksheetFields, worksheetOperations } from './WorksheetDescription';
import { generatePairedItemData } from '../../../../utils/utilities';
const versionDescription: INodeTypeDescription = {
displayName: 'Microsoft Excel',

View File

@@ -5,9 +5,9 @@ import type {
INodeTypeDescription,
} from 'n8n-workflow';
import { listSearch, loadOptions } from './methods';
import { versionDescription } from './actions/versionDescription';
import { router } from './actions/router';
import { versionDescription } from './actions/versionDescription';
import { listSearch, loadOptions } from './methods';
export class MicrosoftExcelV2 implements INodeType {
description: INodeTypeDescription;

View File

@@ -1,7 +1,7 @@
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import type { MicrosoftExcel } from './node.type';
import type { MicrosoftExcel } from './node.type';
import * as table from './table/Table.resource';
import * as workbook from './workbook/Workbook.resource';
import * as worksheet from './worksheet/Worksheet.resource';

View File

@@ -1,7 +1,7 @@
import type { INodeProperties } from 'n8n-workflow';
import * as append from './append.operation';
import * as addTable from './addTable.operation';
import * as append from './append.operation';
import * as convertToRange from './convertToRange.operation';
import * as deleteTable from './deleteTable.operation';
import * as getColumns from './getColumns.operation';

View File

@@ -4,9 +4,11 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -4,11 +4,13 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities';
import type { ExcelResponse } from '../../helpers/interfaces';
import { prepareOutput } from '../../helpers/utils';
import { microsoftApiRequest } from '../../transport';
import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions';
import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -4,9 +4,11 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest } from '../../transport';
import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [workbookRLC, worksheetRLC, tableRLC];

View File

@@ -1,7 +1,9 @@
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest } from '../../transport';
import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [workbookRLC, worksheetRLC, tableRLC];

View File

@@ -4,9 +4,11 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest, microsoftApiRequestAllItemsSkip } from '../../transport';
import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -4,9 +4,11 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest, microsoftApiRequestAllItemsSkip } from '../../transport';
import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -6,9 +6,11 @@ import type {
JsonObject,
} from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequestAllItemsSkip } from '../../transport';
import { tableRLC, workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -4,9 +4,11 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -1,8 +1,10 @@
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [workbookRLC];

View File

@@ -4,9 +4,11 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport';
const properties: INodeProperties[] = [
{
displayName: 'Return All',

View File

@@ -4,11 +4,13 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { processJsonInput, updateDisplayOptions } from '@utils/utilities';
import type { ExcelResponse } from '../../helpers/interfaces';
import { prepareOutput } from '../../helpers/utils';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC, worksheetRLC } from '../common.descriptions';
import { processJsonInput, updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -1,7 +1,9 @@
import type { INodeExecutionData, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -1,7 +1,9 @@
import type { INodeExecutionData, IExecuteFunctions, INodeProperties } from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [workbookRLC, worksheetRLC];

View File

@@ -4,9 +4,11 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { microsoftApiRequest, microsoftApiRequestAllItems } from '../../transport';
import { workbookRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -4,11 +4,13 @@ import type {
INodeExecutionData,
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import type { ExcelResponse } from '../../helpers/interfaces';
import { checkRange, prepareOutput } from '../../helpers/utils';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC, worksheetRLC } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -5,6 +5,9 @@ import type {
INodeProperties,
} from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities';
import type { ExcelResponse, UpdateSummary } from '../../helpers/interfaces';
import {
checkRange,
@@ -14,7 +17,6 @@ import {
} from '../../helpers/utils';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC, worksheetRLC } from '../common.descriptions';
import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -5,6 +5,9 @@ import type {
INodeProperties,
} from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities';
import type { ExcelResponse, UpdateSummary } from '../../helpers/interfaces';
import {
checkRange,
@@ -14,7 +17,6 @@ import {
} from '../../helpers/utils';
import { microsoftApiRequest } from '../../transport';
import { workbookRLC, worksheetRLC } from '../common.descriptions';
import { generatePairedItemData, processJsonInput, updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
workbookRLC,

View File

@@ -1,8 +1,10 @@
import type { IDataObject, IExecuteFunctions, INode, INodeExecutionData } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import type { ExcelResponse, SheetData, UpdateSummary } from './interfaces';
import { generatePairedItemData, wrapData } from '@utils/utilities';
import type { ExcelResponse, SheetData, UpdateSummary } from './interfaces';
type PrepareOutputConfig = {
rawData: boolean;
dataProperty?: string;

View File

@@ -4,6 +4,7 @@ import type {
INodeListSearchItems,
INodeListSearchResult,
} from 'n8n-workflow';
import { microsoftApiRequest } from '../transport';
export async function searchWorkbooks(

View File

@@ -1,4 +1,5 @@
import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
import { microsoftApiRequest } from '../transport';
export async function getWorksheetColumnRow(