-
Notifications
You must be signed in to change notification settings - Fork 13
chore: Improve code quality #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
protoss70
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good :)
Left some comments
| "n8n-workflow": "1.82.0" | ||
| }, | ||
| "dependencies": { | ||
| "axios": "^1.13.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not allowed to have dependencies
| this.helpers.httpRequestWithAuthentication.call(this, authenticationMethod, options), | ||
| ); | ||
| } catch (error) { | ||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to change the error handling below. We should use typeof as they requested
| "lint": "eslint nodes credentials package.json", | ||
| "lintfix": "eslint nodes credentials package.json --fix", | ||
| "prepublishOnly": "pnpm build && pnpm lint -c .eslintrc.prepublish.js nodes credentials package.json", | ||
| "prepublishOnly": "npm build && npm lint -c .eslintrc.prepublish.js nodes credentials package.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry forgot to mention in the ticket description, we need to remove prepublishOnly as well
| - name: Commit version update | ||
| run: | | ||
| git add package.json pnpm-lock.yaml | ||
| git add package.json npm-lock.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be package-lock.json
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| run: npm install --frozen-lockfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm doesn't have --frozen-lockfile command I think we can change it for npm ci
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| run: npm install --frozen-lockfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again no --frozen-lockfile I think it should be npm ci
|
|
||
| - name: Format check | ||
| run: pnpm exec prettier --check nodes credentials | ||
| run: npx prettier --check nodes credentials |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think we should add this command into the package.json like
"format:check": "prettier --check nodes credentials"
| 2. Version extraction (`X.Y.Z`) from the release tag. | ||
| 3. Build and test processes. | ||
| 4. Update `package.json` and `pnpm-lock.yaml` to version `X.Y.Z`. | ||
| 4. Update `package.json` and `npm-lock.yaml` to version `X.Y.Z`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, package-lock.json
|
Also I think it might be worth renaming the PR title to fix. I think there are a lot of fixes. What do you think? |
drobnikj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @protoss70 notes, otherwise fine.
Closes issue
httpRequestWithAuthenticationexec()function and when triggered the functionality is called fromn8n-coreso we would have to mock this logic somehow, and the tests would have ended up being just mock values from mock functions passed around, which is not worth it in my opinionMost of the changes in the PR are caused by the change of npm for pnpm. They have different files for dependencies so the old
pnpm-lock.yamlwas deleted the newpackage-lock.jsonfile