浏览代码

fix: tree-sitter is optional (#2076)

Baptiste Augrain 7 月之前
父节点
当前提交
1125a02e16
共有 1 个文件被更改,包括 161 次插入0 次删除
  1. 161 0
      patches/optional-tree-sitter.patch

+ 161 - 0
patches/optional-tree-sitter.patch

@@ -0,0 +1,161 @@
+diff --git a/build/package-lock.json b/build/package-lock.json
+index 1e373f2..3ea31d0 100644
+--- a/build/package-lock.json
++++ b/build/package-lock.json
+@@ -53,3 +53,2 @@
+         "through2": "^4.0.2",
+-        "tree-sitter": "^0.20.5",
+         "vscode-universal-bundler": "^0.1.3",
+@@ -59,2 +58,3 @@
+       "optionalDependencies": {
++        "tree-sitter": "^0.20.5",
+         "tree-sitter-typescript": "^0.20.5",
+@@ -1381,3 +1381,3 @@
+       "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+-      "devOptional": true,
++      "optional": true,
+       "dependencies": {
+@@ -1433,3 +1433,2 @@
+       "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+-      "devOptional": true,
+       "funding": [
+@@ -1448,2 +1447,3 @@
+       ],
++      "optional": true,
+       "dependencies": {
+@@ -1622,3 +1622,3 @@
+       "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
+-      "devOptional": true
++      "optional": true
+     },
+@@ -1830,3 +1830,3 @@
+       "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+-      "devOptional": true,
++      "optional": true,
+       "engines": {
+@@ -1896,3 +1896,3 @@
+       "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==",
+-      "devOptional": true,
++      "optional": true,
+       "engines": {
+@@ -2150,3 +2150,3 @@
+       "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
+-      "devOptional": true,
++      "optional": true,
+       "engines": {
+@@ -2281,3 +2281,3 @@
+       "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
+-      "devOptional": true
++      "optional": true
+     },
+@@ -2363,3 +2363,3 @@
+       "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
+-      "devOptional": true
++      "optional": true
+     },
+@@ -2676,3 +2676,2 @@
+       "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+-      "devOptional": true,
+       "funding": [
+@@ -2690,3 +2689,4 @@
+         }
+-      ]
++      ],
++      "optional": true
+     },
+@@ -2713,3 +2713,3 @@
+       "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+-      "devOptional": true
++      "optional": true
+     },
+@@ -3165,3 +3165,3 @@
+       "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
+-      "devOptional": true
++      "optional": true
+     },
+@@ -3183,3 +3183,3 @@
+       "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==",
+-      "devOptional": true
++      "optional": true
+     },
+@@ -3189,3 +3189,3 @@
+       "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==",
+-      "devOptional": true
++      "optional": true
+     },
+@@ -3195,3 +3195,3 @@
+       "integrity": "sha512-qWO5l3SCqbwQavymOmtTVuCWZE23++S+rxyoHjXqUmPyzRcaoI4lA2gO55/drddGnedAyjA7sk76SfQ5lfUMnw==",
+-      "devOptional": true,
++      "optional": true,
+       "dependencies": {
+@@ -3207,3 +3207,3 @@
+       "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+-      "devOptional": true,
++      "optional": true,
+       "dependencies": {
+@@ -3475,3 +3475,3 @@
+       "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==",
+-      "devOptional": true,
++      "optional": true,
+       "dependencies": {
+@@ -3559,3 +3559,3 @@
+       "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+-      "devOptional": true,
++      "optional": true,
+       "dependencies": {
+@@ -3772,3 +3772,2 @@
+       "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
+-      "devOptional": true,
+       "funding": [
+@@ -3786,3 +3785,4 @@
+         }
+-      ]
++      ],
++      "optional": true
+     },
+@@ -3792,3 +3792,2 @@
+       "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
+-      "devOptional": true,
+       "funding": [
+@@ -3807,2 +3806,3 @@
+       ],
++      "optional": true,
+       "dependencies": {
+@@ -3901,3 +3901,3 @@
+       "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo= sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
+-      "devOptional": true,
++      "optional": true,
+       "engines": {
+@@ -3934,3 +3934,3 @@
+       "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
+-      "devOptional": true,
++      "optional": true,
+       "dependencies": {
+@@ -3946,3 +3946,3 @@
+       "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
+-      "devOptional": true,
++      "optional": true,
+       "dependencies": {
+@@ -4029,4 +4029,4 @@
+       "integrity": "sha512-GxJodajVpfgb3UREzzIbtA1hyRnTxVbWVXrbC6sk4xTMH5ERMBJk9HJNq4c8jOJeUaIOmLcwg+t6mez/PDvGqg==",
+-      "devOptional": true,
+       "hasInstallScript": true,
++      "optional": true,
+       "dependencies": {
+@@ -4066,3 +4066,3 @@
+       "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
+-      "devOptional": true,
++      "optional": true,
+       "dependencies": {
+diff --git a/build/package.json b/build/package.json
+index aa94a21..9644be4 100644
+--- a/build/package.json
++++ b/build/package.json
+@@ -47,3 +47,2 @@
+     "through2": "^4.0.2",
+-    "tree-sitter": "^0.20.5",
+     "vscode-universal-bundler": "^0.1.3",
+@@ -59,2 +58,3 @@
+   "optionalDependencies": {
++    "tree-sitter": "^0.20.5",
+     "tree-sitter-typescript": "^0.20.5",