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

refactor: Remove prettierPath config option (no-changelog) #6952

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Aug 17, 2023

On Prettier 3, VSCode Prettier extension v10.1.0 fails to load the Prettier config file.

Stack trace
["INFO" - 10:24:08] Extension Name: esbenp.prettier-vscode.
["INFO" - 10:24:08] Extension Version: 10.1.0.
["ERROR" - 10:24:08] Error resolving prettier configuration for /Users/ivov/Development/n8n
["ERROR" - 10:24:08] Invalid host defined options
TypeError: Invalid host defined options
    at Object.<anonymous> (/Users/ivov/Development/n8n/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/index.cjs:600:23)
    at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1271)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1243:10)
    at Module.load (node:internal/modules/cjs/loader:1058:32)
    at Module._load (node:internal/modules/cjs/loader:893:12)
    at Function.f._load (node:electron/js2c/asar_bundle:2:13330)
    at Function.l._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:28070)
    at Function.p._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:25404)
    at Function.u._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:91:22191)
    at Module.apply (node:internal/modules/cjs/loader:1082:19)
    at Module.require (/Users/ivov/.vscode/extensions/github.copilot-1.103.338/node_modules/diagnostic-channel/dist/src/patchRequire.js:16:46)
    at g (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:647)
    at t.loadNodeModule (/Users/ivov/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:2829)
    at t.PrettierMainThreadInstance.import (/Users/ivov/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:17760)
    at t.ModuleResolver.getPrettierInstance (/Users/ivov/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:5728)
    at t.default.handleActiveTextEditorChanged (/Users/ivov/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:10771)
    at t.default.handleActiveTextEditorChangedSync (/Users/ivov/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:10373)
    at t.default.registerDisposables (/Users/ivov/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:13531)
    at /Users/ivov/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:82528

Removing prettier.prettierPath allows the config file to be found again. But from what I can tell, this option was not deprecated. So on review, please validate that this works on your own setup as well.

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Aug 17, 2023
@github-actions
Copy link
Contributor

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

@cypress
Copy link

cypress bot commented Aug 17, 2023

Passing run #1905 ↗︎

0 226 0 0 Flakiness 0

Details:

🌳 remove-prettierpath-config-option 🖥️ browsers:node18.12.0-chrome107 🤖 ivov ...
Project: n8n Commit: b4251e9b8d
Status: Passed Duration: 07:52 💡
Started: Aug 17, 2023 11:32 AM Ended: Aug 17, 2023 11:39 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (832d087) 25.05% compared to head (b4251e9) 25.05%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6952   +/-   ##
=======================================
  Coverage   25.05%   25.05%           
=======================================
  Files        3149     3149           
  Lines      191918   191918           
  Branches    21111    21110    -1     
=======================================
  Hits        48090    48090           
  Misses     142847   142847           
  Partials      981      981           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

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

@netroy netroy force-pushed the remove-prettierpath-config-option branch from 194290d to b4251e9 Compare August 17, 2023 11:25
@github-actions
Copy link
Contributor

✅ All Cypress E2E specs passed

@netroy netroy merged commit ad15d3e into master Aug 17, 2023
49 checks passed
@netroy netroy deleted the remove-prettierpath-config-option branch August 17, 2023 11:40
@ivov
Copy link
Contributor Author

ivov commented Aug 18, 2023

Related: prettier/prettier-vscode#3114

@janober
Copy link
Member

janober commented Aug 30, 2023

Got released with n8n@1.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants