From be5863effba7640551cb8d7d46ad3d18baa25c0b Mon Sep 17 00:00:00 2001 From: Sean Boult <996134+Hacksore@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:33:13 -0500 Subject: [PATCH] fix: esm package traversal when attempting to load the copilot nodejs will attempt to traverse upwards to find a package.json to determin if it should run in ESM or CJS mode. if it finds one that contains `"type": "module"` it will crash copilot because ESM handles various things different and the copilot impl is CJS. the solution here is to place a package.json file to prevent node from traversing upwards. --- copilot/package.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 copilot/package.json diff --git a/copilot/package.json b/copilot/package.json new file mode 100644 index 00000000..898b9954 --- /dev/null +++ b/copilot/package.json @@ -0,0 +1,7 @@ +{ + "name": "copilot", + "version": "1.0.0", + "description": "Fully featured & enhanced replacement for copilot.vim complete with API for interacting with Github Copilot", + "author": "zbirenbaum", + "license": "MIT" +}