Skip to content
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

perf(tooling): Upgrade to TypeScript 4.8 #4207

Merged
merged 12 commits into from
Oct 5, 2022

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Sep 27, 2022

No description provided.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/improvement New feature or request ui Enhancement in /editor-ui or /design-system labels Sep 27, 2022
@ivov ivov marked this pull request as draft September 27, 2022 08:54
@linear
Copy link

linear bot commented Sep 27, 2022

N8N-4777

@netroy netroy self-requested a review September 27, 2022 09:28
@ivov ivov marked this pull request as ready for review September 27, 2022 14:29
@@ -23,9 +23,9 @@ export class PushoverApi implements ICredentialType {
requestOptions: IHttpRequestOptions,
): Promise<IHttpRequestOptions> {
if (requestOptions.method === 'GET') {
Object.assign(requestOptions.qs, { token: credentials.apiKey });
Object.assign(requestOptions.qs ?? {}, { token: credentials.apiKey });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we really need to revisit our usage of Object.assign. it's seems to be used unnecessarily and incorrectly in many places. This should either be

requestOptions.qs = Object.assign(requestOptions.qs ?? {}, { token: credentials.apiKey })

or

requestOptions.qs = requestOptions.qs ?? {}
Object.assign(requestOptions.qs, { token: credentials.apiKey })

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to use a nullish check instead of ?? {}, to remain closer to current behavior. Object.assign(undefined, obj) throws so we know the target is defined in these calls. Dug deeper and it looks like root cause is Object.assign overloads now constraining the target param to be a subset of {}.

Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
merged master back into make sure no newly added code was gonna break after we merge this.
Once CI is green, let's merge.

@ivov ivov merged commit 9089dbe into master Oct 5, 2022
@ivov ivov deleted the n8n-4777-upgrade-to-typescript-4.8 branch October 5, 2022 11:36
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Oct 5, 2022
@janober
Copy link
Member

janober commented Oct 10, 2022

Got released with n8n@0.197.0

@janober janober removed the Upcoming Release Will be part of the upcoming release label Oct 10, 2022
valya pushed a commit to valya/n8n that referenced this pull request Nov 8, 2022
* ⬆️ Upgrade to TypeScript 4.8

* 🔥 Remove unneeded setting

* 📦 Update `package-lock.json`

* ⏪ Restore `skipLibCheck`

* 📦 Re-update `package-lock.json`

* ♻️ Apply feedback

* ♻️ Add check to new WhatsApp node

* 📦 Update `package-lock.json`

* Update package-lock.json

* ran `npm run lintfix`

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/improvement New feature or request ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants