fix: support new version autocomplete (#153)

* fix: support new version autocomplete

* style: fix formatting

Signed-off-by: Chapman Pendery <cpendery@microsoft.com>

---------

Signed-off-by: Chapman Pendery <cpendery@microsoft.com>
Co-authored-by: Chapman Pendery <cpendery@microsoft.com>
This commit is contained in:
Alan.He
2024-02-14 10:24:30 -08:00
committed by GitHub
co-authored by Chapman Pendery
parent 1e550d997b
commit ffae75fbbf
3 changed files with 14 additions and 8 deletions
+10 -7
View File
@@ -9,7 +9,7 @@
"version": "0.0.1-rc.7",
"license": "MIT",
"dependencies": {
"@withfig/autocomplete": "2.648.2",
"@withfig/autocomplete": "2.651.0",
"ajv": "^8.12.0",
"ansi-escapes": "^6.2.0",
"ansi-styles": "^6.2.1",
@@ -42,6 +42,9 @@
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"typescript": "^5.2.2"
},
"engines": {
"node": ">=16.6.0 <21.0.0"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -2089,9 +2092,9 @@
}
},
"node_modules/@withfig/autocomplete": {
"version": "2.648.2",
"resolved": "https://registry.npmjs.org/@withfig/autocomplete/-/autocomplete-2.648.2.tgz",
"integrity": "sha512-Dw6Irj1YoWEq92zCPRLNDMA4voKjna7jr10DuHHvnrFRbt4xOiYVbBZM+mPCkRMTerUOjrSOcPGQM4j3sA/fyA==",
"version": "2.651.0",
"resolved": "https://registry.npmjs.org/@withfig/autocomplete/-/autocomplete-2.651.0.tgz",
"integrity": "sha512-Qw9cRf1rqMyervbtU7SU2XZcIBCJW4OmSP0ykgnzw5tP0FmZZhnyZKl8guzoDVvKfdBDBYwecqnLbBIF0sEruQ==",
"dependencies": {
"@fig/autocomplete-generators": "^2.4.0",
"@fig/autocomplete-helpers": "^1.0.7",
@@ -9521,9 +9524,9 @@
}
},
"@withfig/autocomplete": {
"version": "2.648.2",
"resolved": "https://registry.npmjs.org/@withfig/autocomplete/-/autocomplete-2.648.2.tgz",
"integrity": "sha512-Dw6Irj1YoWEq92zCPRLNDMA4voKjna7jr10DuHHvnrFRbt4xOiYVbBZM+mPCkRMTerUOjrSOcPGQM4j3sA/fyA==",
"version": "2.651.0",
"resolved": "https://registry.npmjs.org/@withfig/autocomplete/-/autocomplete-2.651.0.tgz",
"integrity": "sha512-Qw9cRf1rqMyervbtU7SU2XZcIBCJW4OmSP0ykgnzw5tP0FmZZhnyZKl8guzoDVvKfdBDBYwecqnLbBIF0sEruQ==",
"requires": {
"@fig/autocomplete-generators": "^2.4.0",
"@fig/autocomplete-helpers": "^1.0.7",
+1 -1
View File
@@ -37,7 +37,7 @@
},
"homepage": "https://github.com/microsoft/inshellisense#readme",
"dependencies": {
"@withfig/autocomplete": "2.648.2",
"@withfig/autocomplete": "2.651.0",
"ajv": "^8.12.0",
"ansi-escapes": "^6.2.0",
"ansi-styles": "^6.2.1",
+3
View File
@@ -19,6 +19,9 @@ const specSet: any = {};
let activeSet = specSet;
const specRoutes = s.split("/");
specRoutes.forEach((route, idx) => {
if (typeof activeSet !== "object") {
return;
}
if (idx === specRoutes.length - 1) {
const prefix = versionedSpeclist.includes(s) ? "/index.js" : `.js`;
activeSet[route] = `@withfig/autocomplete/build/${s}${prefix}`;