feat: replace npm with pnpm (#41)

Co-authored-by: Anthony Hivert <anthony.hivert@numberly.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-07-04 19:44:50 +02:00 committed by GitHub
commit 74b954cc9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 4308 additions and 10797 deletions

View file

@ -11,28 +11,27 @@ To make your custom node available to the community, you must create it as an np
You need the following installed on your development machine: You need the following installed on your development machine:
* [git](https://git-scm.com/downloads) * [git](https://git-scm.com/downloads)
* Node.js and npm. Minimum version Node 16. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL [here](https://github.com/nvm-sh/nvm). For Windows users, refer to Microsoft's guide to [Install NodeJS on Windows](https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows). * Node.js and pnpm. Minimum version Node 18. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL [here](https://github.com/nvm-sh/nvm). For Windows users, refer to Microsoft's guide to [Install NodeJS on Windows](https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows).
* Install n8n with: * Install n8n with:
``` ```
npm install n8n -g pnpm install n8n -g
``` ```
* Recommended: follow n8n's guide to [set up your development environment](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/). * Recommended: follow n8n's guide to [set up your development environment](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/).
## Using this starter ## Using this starter
These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the [documentation](https://docs.n8n.io/integrations/creating-nodes/). These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the [documentation](https://docs.n8n.io/integrations/creating-nodes/).
1. [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template repository. 1. [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template repository.
2. Clone your new repo: 2. Clone your new repo:
``` ```
git clone https://github.com/<your organization>/<your-repo-name>.git git clone https://github.com/<your organization>/<your-repo-name>.git
``` ```
3. Run `npm i` to install dependencies. 3. Run `pnpm i` to install dependencies.
4. Open the project in your editor. 4. Open the project in your editor.
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes. 5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
6. Update the `package.json` to match your details. 6. Update the `package.json` to match your details.
7. Run `npm run lint` to check for errors or `npm run lintfix` to automatically fix errors when possible. 7. Run `pnpm lint` to check for errors or `pnpm lintfix` to automatically fix errors when possible.
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance. 8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started. 9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
10. Update the LICENSE file to use your details. 10. Update the LICENSE file to use your details.

View file

@ -15,6 +15,9 @@ export class HttpBinApi implements ICredentialType {
name: 'token', name: 'token',
type: 'string', type: 'string',
default: '', default: '',
typeOptions: {
password: true,
}
}, },
{ {
displayName: 'Domain', displayName: 'Domain',

10782
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -15,14 +15,20 @@
"type": "git", "type": "git",
"url": "https://github.com/<...>/n8n-nodes-<...>.git" "url": "https://github.com/<...>/n8n-nodes-<...>.git"
}, },
"engines": {
"node": ">=18.10",
"pnpm": ">=9.1"
},
"packageManager": "pnpm@9.1.4",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"build": "tsc && gulp build:icons", "build": "tsc && gulp build:icons",
"dev": "tsc --watch", "dev": "tsc --watch",
"format": "prettier nodes credentials --write", "format": "prettier nodes credentials --write",
"lint": "eslint nodes credentials package.json", "lint": "eslint nodes credentials package.json",
"lintfix": "eslint nodes credentials package.json --fix", "lintfix": "eslint nodes credentials package.json --fix",
"prepublishOnly": "npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json" "prepublishOnly": "pnpm build && pnpm lint -c .eslintrc.prepublish.js nodes credentials package.json"
}, },
"files": [ "files": [
"dist" "dist"
@ -39,12 +45,13 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/parser": "~5.45", "@typescript-eslint/parser": "^7.15.0",
"eslint-plugin-n8n-nodes-base": "^1.11.0", "eslint": "^8.56.0",
"eslint-plugin-n8n-nodes-base": "^1.16.1",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"n8n-workflow": "*", "n8n-workflow": "*",
"prettier": "^2.7.1", "prettier": "^3.3.2",
"typescript": "~4.8.4" "typescript": "^5.5.3"
}, },
"peerDependencies": { "peerDependencies": {
"n8n-workflow": "*" "n8n-workflow": "*"

4284
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff