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

fix(core): Add a WebCrypto Polyfill for older versions of Node.js 18 #9894

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

netroy
Copy link
Member

@netroy netroy commented Jul 1, 2024

Summary

Some older versions of node.js are missing global.crypto even when require('node:crypto').webrypto is available.
This PR shims the missing global object until we drop support for node.js 18 next year.

Related Linear tickets, Github issues, and Community forum posts

https://community.n8n.io/t/all-workflows-deactivated/49352
#9873
#9884

Review / Merge checklist

  • PR title and summary are descriptive
  • PR Labeled with release/backport

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Jul 1, 2024
packages/cli/bin/n8n Outdated Show resolved Hide resolved
@netroy netroy requested a review from ivov July 1, 2024 08:16
ivov
ivov previously approved these changes Jul 1, 2024
Copy link
Contributor

github-actions bot commented Jul 1, 2024

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Jul 1, 2024

3 flaky tests on run #5723 ↗︎

0 398 0 0 Flakiness 3

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Project: n8n Commit: 8e760fc6ce
Status: Passed Duration: 05:09 💡
Started: Jul 1, 2024 10:08 AM Ended: Jul 1, 2024 10:13 AM
Flakiness  5-ndv.cy.ts • 2 flaky tests

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Screenshots Video
NDV > Stop listening for trigger event from NDV Screenshots Video
Flakiness  24-ndv-paired-item.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > resolves expression with default item when input node is not parent, while still pairing items Test Replay Screenshots Video

Review all test suite changes for PR #9894 ↗︎

Copy link
Contributor

github-actions bot commented Jul 1, 2024

✅ All Cypress E2E specs passed

@netroy netroy merged commit 59c8bf1 into master Jul 1, 2024
27 checks passed
@netroy netroy deleted the fix-webcrypto branch July 1, 2024 10:19
@netroy netroy added the release/backport Changes that need to be backported to older releases. label Jul 1, 2024
This was referenced Jul 1, 2024
@janober
Copy link
Member

janober commented Jul 1, 2024

Got released with n8n@1.47.2

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 release/backport Changes that need to be backported to older releases. Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants