From 719d7f7f86af8259b95ef840ce859f77262e3f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Thu, 11 Jul 2024 17:44:31 +0200 Subject: [PATCH] Upgrade dependencies. Sync with n8n-nodes-starter --- .eslintignore | 4 - .eslintrc.js | 28 +++++ .nvmrc | 2 +- index.js | 0 nodes/NetSuite/NetSuite.node.options.ts | 3 +- nodes/NetSuite/NetSuite.node.ts | 2 +- nodes/NetSuite/NetSuite.node.types.ts | 5 +- package.json | 146 ++++++++++-------------- 8 files changed, 93 insertions(+), 97 deletions(-) delete mode 100644 .eslintignore create mode 100644 .eslintrc.js delete mode 100644 index.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index d28f89b..0000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -.eslintrc.js -dist/ -index.js -gulpfile.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..9f7f6c5 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,28 @@ +/** + * @type {import('@types/eslint').ESLint.ConfigData} + */ +module.exports = { + root: true, + + env: { + browser: true, + es6: true, + node: true, + }, + + parser: '@typescript-eslint/parser', + + parserOptions: { + project: ['./tsconfig.json'], + sourceType: 'module', + extraFileExtensions: ['.json'], + }, + + ignorePatterns: ['.eslintrc.js', '**/*.js', '**/node_modules/**', '**/dist/**'], + + overrides: [ + { + files: ['package.json', 'credentials/**/*.ts', 'nodes/**/*.ts'] + }, + ], +}; diff --git a/.nvmrc b/.nvmrc index b6a7d89..209e3ef 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +20 diff --git a/index.js b/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/nodes/NetSuite/NetSuite.node.options.ts b/nodes/NetSuite/NetSuite.node.options.ts index 22934ff..875620e 100644 --- a/nodes/NetSuite/NetSuite.node.options.ts +++ b/nodes/NetSuite/NetSuite.node.options.ts @@ -348,7 +348,6 @@ export const nodeDescription: INodeTypeDescription = { name: 'simpleEnumFormat', type: 'boolean', required: true, - // eslint-disable-next-line n8n-nodes-base/node-param-default-wrong-for-simplify default: false, displayOptions: { show: { @@ -457,7 +456,7 @@ export const nodeDescription: INodeTypeDescription = { default: 1, typeOptions: { minValue: 1, - }, // eslint-disable-next-line n8n-nodes-base/node-param-description-wrong-for-limit + }, description: 'Use control the maximum number of REST requests sent to NetSuite at the same time. The default is 1.', }, { diff --git a/nodes/NetSuite/NetSuite.node.ts b/nodes/NetSuite/NetSuite.node.ts index 7d71359..b1661fc 100644 --- a/nodes/NetSuite/NetSuite.node.ts +++ b/nodes/NetSuite/NetSuite.node.ts @@ -1,7 +1,7 @@ import { debuglog } from 'util'; -import { IExecuteFunctions } from 'n8n-core'; import { IDataObject, + IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, diff --git a/nodes/NetSuite/NetSuite.node.types.ts b/nodes/NetSuite/NetSuite.node.types.ts index 102e314..6a7b785 100644 --- a/nodes/NetSuite/NetSuite.node.types.ts +++ b/nodes/NetSuite/NetSuite.node.types.ts @@ -1,5 +1,4 @@ -import { IExecuteFunctions } from 'n8n-core'; -import { INodeExecutionData, JsonObject } from 'n8n-workflow'; +import { IExecuteFunctions, INodeExecutionData, JsonObject } from 'n8n-workflow'; export type INetSuiteCredentials = { hostname: string; @@ -68,4 +67,4 @@ export type INetSuitePagedBody = { export type INetSuiteLink = { rel: string; href: string; -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index aff0eab..cd88f51 100644 --- a/package.json +++ b/package.json @@ -1,89 +1,63 @@ { - "name": "n8n-nodes-netsuite", - "version": "0.7.5", - "description": "n8n node for NetSuite using the REST API", - "license": "MIT", - "homepage": "https://github.com/drudge/n8n-nodes-netsuite", - "author": { - "name": "Nicholas Penree", - "email": "nick@penree.com" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/drudge/n8n-nodes-netsuite.git" - }, - "main": "index.js", - "scripts": { - "dev": "npm run watch", - "build": "tsc && gulp", - "lint": "eslint", - "lintfix": "tslint --fix -p tsconfig.json -c tslint.json", - "nodelinter": "nodelinter", - "watch": "tsc --watch", - "test": "jest" - }, - "files": [ - "dist" + "name": "n8n-nodes-netsuite", + "version": "0.7.5", + "description": "n8n node for NetSuite using the REST API", + "license": "MIT", + "homepage": "https://github.com/drudge/n8n-nodes-netsuite", + "engines": { + "node": ">=18.17" + }, + "author": { + "name": "Nicholas Penree", + "email": "nick@penree.com" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/drudge/n8n-nodes-netsuite.git" + }, + "main": "index.js", + "scripts": { + "dev": "tsc --watch", + "build": "tsc && gulp", + "lint": "eslint nodes credentials package.json", + "lintfix": "eslint nodes credentials package.json --fix", + "prepublishOnly": "npm run build && npm run lint" + }, + "files": [ + "dist" + ], + "keywords": [ + "n8n", + "node", + "netsuite", + "rest", + "api", + "suitetalk", + "n8n-node", + "n8n-community-node-package" + ], + "n8n": { + "n8nNodesApiVersion": 1, + "credentials": [ + "dist/credentials/NetSuite.credentials.js" ], - "keywords": [ - "n8n", - "node", - "netsuite", - "rest", - "api", - "suitetalk", - "n8n-node", - "n8n-community-node-package" - ], - "n8n": { - "credentials": [ - "dist/credentials/NetSuite.credentials.js" - ], - "nodes": [ - "dist/nodes/NetSuite/NetSuite.node.js" - ] - }, - "devDependencies": { - "@types/express": "^4.17.6", - "@types/jest": "^26.0.13", - "@types/luxon": "^3.3.0", - "@types/node": "^14.17.27", - "@types/request-promise-native": "~1.0.15", - "@typescript-eslint/eslint-plugin": "^5.29.0", - "@typescript-eslint/eslint-plugin-tslint": "^5.29.0", - "@typescript-eslint/parser": "~5.45", - "eslint": "^8.18.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsdoc": "^39.3.3", - "eslint-plugin-prefer-arrow": "^1.2.3", - "gulp": "^4.0.0", - "jest": "^26.4.2", - "n8n-core": "*", - "n8n-workflow": "*", - "nodelinter": "^0.1.9", - "ts-jest": "^26.3.0", - "typescript": "~4.8.4" - }, - "dependencies": { - "@fye/netsuite-rest-api": "^2.0.0", - "n8n-core": "~0.101.0", - "p-limit": "^3.1.0" - }, - "jest": { - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testURL": "http://localhost/", - "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", - "testPathIgnorePatterns": [ - "/dist/", - "/node_modules/" - ], - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "json" - ] - } + "nodes": [ + "dist/nodes/NetSuite/NetSuite.node.js" + ] + }, + "devDependencies": { + "@types/node": "^18.19.39", + "@typescript-eslint/parser": "^7.16.0", + "eslint": "^8.57.0", + "gulp": "^5.0.0", + "n8n-workflow": "*", + "typescript": "^5.5.3" + }, + "peerDependencies": { + "n8n-workflow": "*" + }, + "dependencies": { + "@fye/netsuite-rest-api": "^2.3.1", + "p-limit": "^3.1.0" + } }