n8n/packages/@n8n/node-cli/package.json
alex 190a62e888 build: Align typescript-eslint in node-cli with its import-x peer
`eslint-plugin-import-x` declares `@typescript-eslint/utils` as an OPTIONAL peer.
pnpm resolves an optional peer to the newest matching version, and it re-resolves
it whenever the lockfile has to change. `@n8n/node-cli` pinned its own
`typescript-eslint` at `^8.35.0`, and the lockfile held a matching, months-old
8.35.0 pin for that peer.

Any install that re-resolves the lockfile moves the peer to the newest version
and leaves `typescript-eslint` behind. `src/configs/eslint.ts:22` then passes an
import-x flat config built on one version of `@typescript-eslint/utils` into
`tseslint.config()` built on another:

    src/configs/eslint.ts(22,5): error TS2322: Type 'PluginFlatConfig' is not
    assignable to type 'InfiniteDepthConfigWithExtends'.

Adding one unrelated dependency anywhere in the workspace is enough to trigger it.
The error names neither the dependency that was added nor the cause.

Widening node-cli's range to `^8.68.0` makes both sides resolve together, and
keeps them together on later installs — both track the newest 8.x.

Verified on this tree, pnpm 11.25.0:
- Before: adding `stylelint` to one unrelated package moved the peer 8.35.0 to
  8.68.0 while `typescript-eslint` stayed at 8.35.0.
- After: the same edit leaves both at 8.69.0.
- `turbo build lint --filter=@n8n/node-cli` — 24/24 tasks, exit 0.

Only the node-cli importer moves. No other package's resolutions change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 11:40:07 +03:00

83 lines
2.4 KiB
JSON

{
"name": "@n8n/node-cli",
"version": "0.46.0",
"description": "Official CLI for developing community nodes for n8n",
"bin": {
"n8n-node": "bin/n8n-node.mjs"
},
"exports": {
"./eslint": {
"types": "./dist/configs/eslint.d.js",
"default": "./dist/configs/eslint.js"
}
},
"files": [
"bin",
"dist"
],
"scripts": {
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"copy-templates": "node scripts/copy-templates.mjs",
"dev": "tsc-watch -p tsconfig.build.json -w --onCompilationComplete \"pnpm copy-templates\"",
"format": "biome format --write src",
"format:check": "biome ci src",
"lint": "eslint src --quiet",
"lintfix": "eslint src --fix",
"build": "tsc -p tsconfig.build.json && pnpm copy-templates",
"build:unchecked": "tsc -p tsconfig.build.json --noCheck && pnpm copy-templates",
"publish:dry": "pnpm run build && pnpm pub --dry-run",
"test": "vitest run",
"test:unit": "vitest run",
"test:dev": "vitest --silent=false",
"start": "./bin/n8n-node.mjs"
},
"repository": {
"type": "git",
"url": "git+https://github.com/n8n-io/n8n.git"
},
"oclif": {
"bin": "n8n-node",
"commands": {
"strategy": "explicit",
"target": "./dist/index.js",
"identifier": "commands"
},
"topicSeparator": " "
},
"dependencies": {
"@clack/prompts": "^0.11.0",
"@eslint/js": "^9.29.0",
"@n8n/eslint-plugin-community-nodes": "workspace:*",
"@n8n/ai-node-sdk": "workspace:*",
"@oclif/core": "^4.5.2",
"change-case": "catalog:",
"eslint": "catalog:",
"eslint-import-resolver-typescript": "^4.4.3",
"eslint-plugin-import-x": "^4.15.2",
"eslint-plugin-n8n-nodes-base": "catalog:",
"fast-glob": "catalog:",
"handlebars": "4.7.9",
"picocolors": "catalog:",
"prettier": "catalog:",
"prompts": "^2.4.2",
"rimraf": "catalog:",
"ts-morph": "catalog:",
"typescript-eslint": "^8.68.0"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@n8n/vitest-config": "workspace:*",
"@oclif/test": "^4.1.13",
"@typescript/native": "catalog:typescript-tooling",
"typescript": "catalog:typescript-tooling",
"vite": "catalog:",
"vitest": "catalog:",
"vitest-mock-extended": "catalog:"
},
"peerDependencies": {
"eslint": ">= 9"
},
"license": "LicenseRef-n8n-sustainable-use"
}