+
{activeEditor.provider}
)}
diff --git a/packages/dashboard-frontend/src/components/EditorSelector/Gallery/__tests__/index.spec.tsx b/packages/dashboard-frontend/src/components/EditorSelector/Gallery/__tests__/index.spec.tsx
index 5b811f839..dc05b044c 100644
--- a/packages/dashboard-frontend/src/components/EditorSelector/Gallery/__tests__/index.spec.tsx
+++ b/packages/dashboard-frontend/src/components/EditorSelector/Gallery/__tests__/index.spec.tsx
@@ -130,6 +130,34 @@ describe('EditorGallery', () => {
expect(sortedEditors[1].version).toEqual('1.0.0');
});
+ test('1.0.0(Deprecated) <=> latest', () => {
+ const editorA = editors[0];
+ editorA.tags = ['Deprecated'];
+ editorA.version = '1.0.0';
+ editorA.id = `${editorA.publisher}/${editorA.name}/${editorA.version}`;
+
+ const editorB = editors[1]; // latest
+
+ const sortedEditors = sortEditors([editorA, editorB]);
+
+ expect(sortedEditors[0].version).toEqual('latest');
+ expect(sortedEditors[1].version).toEqual('1.0.0'); // Deprecated
+ });
+
+ test('1.0.0 <=> latest(Deprecated)', () => {
+ const editorA = editors[0];
+ editorA.version = '1.0.0';
+ editorA.id = `${editorA.publisher}/${editorA.name}/${editorA.version}`;
+
+ const editorB = editors[1]; // latest
+ editorB.tags = ['Deprecated'];
+
+ const sortedEditors = sortEditors([editorA, editorB]);
+
+ expect(sortedEditors[0].version).toEqual('1.0.0');
+ expect(sortedEditors[1].version).toEqual('latest'); // Deprecated
+ });
+
test('insiders <=> 1.0.0', () => {
const editorA = editors[0]; // insiders
const editorB = editors[1];
@@ -141,6 +169,34 @@ describe('EditorGallery', () => {
expect(sortedEditors[0].version).toEqual('insiders');
expect(sortedEditors[1].version).toEqual('1.0.0');
});
+
+ test('insiders(Deprecated) <=> 1.0.0', () => {
+ const editorA = editors[0]; // insiders
+ editorA.id = `${editorA.publisher}/${editorA.name}/${editorA.version}`;
+ editorA.tags = ['Deprecated'];
+
+ const editorB = editors[1];
+ editorB.version = '1.0.0';
+
+ const sortedEditors = sortEditors([editorA, editorB]);
+
+ expect(sortedEditors[0].version).toEqual('insiders');
+ expect(sortedEditors[1].version).toEqual('1.0.0');
+ });
+
+ test('insiders <=> 1.0.0(Deprecated)', () => {
+ const editorA = editors[0]; // insiders
+ editorA.id = `${editorA.publisher}/${editorA.name}/${editorA.version}`;
+
+ const editorB = editors[1];
+ editorB.version = '1.0.0';
+ editorB.tags = ['Deprecated'];
+
+ const sortedEditors = sortEditors([editorA, editorB]);
+
+ expect(sortedEditors[0].version).toEqual('insiders');
+ expect(sortedEditors[1].version).toEqual('1.0.0'); // Deprecated
+ });
});
describe('select editor', () => {
diff --git a/packages/dashboard-frontend/src/components/EditorSelector/Gallery/index.tsx b/packages/dashboard-frontend/src/components/EditorSelector/Gallery/index.tsx
index ae2c0bcb5..1969d5357 100644
--- a/packages/dashboard-frontend/src/components/EditorSelector/Gallery/index.tsx
+++ b/packages/dashboard-frontend/src/components/EditorSelector/Gallery/index.tsx
@@ -135,11 +135,12 @@ export class EditorGallery extends React.PureComponent
{
}
const VERSION_PRIORITY: ReadonlyArray = ['insiders', 'next', 'latest'];
+const DEPRECATED_TAG = 'Deprecated';
export function sortEditors(editors: che.Plugin[]) {
const sorted = editors.sort((a, b) => {
if (a.name === b.name) {
- const aPriority = VERSION_PRIORITY.indexOf(a.version);
- const bPriority = VERSION_PRIORITY.indexOf(b.version);
+ const aPriority = a.tags?.includes(DEPRECATED_TAG) ? -1 : VERSION_PRIORITY.indexOf(a.version);
+ const bPriority = b.tags?.includes(DEPRECATED_TAG) ? -1 : VERSION_PRIORITY.indexOf(b.version);
if (aPriority !== -1 && bPriority !== -1) {
return aPriority - bPriority;
diff --git a/scripts/yarn/old_version/.deps/EXCLUDED/prod.md b/scripts/yarn/old_version/.deps/EXCLUDED/prod.md
index 40ff38df9..419536d28 100644
--- a/scripts/yarn/old_version/.deps/EXCLUDED/prod.md
+++ b/scripts/yarn/old_version/.deps/EXCLUDED/prod.md
@@ -11,6 +11,7 @@ This file lists dependencies that do not need CQs or auto-detection does not wor
| `blueimp-md5@2.19.0` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/blueimp-md5/2.19.0) |
| `codemirror@5.65.16` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/codemirror/5.65.16) |
| `cookie-signature@1.2.1` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/cookie-signature/1.2.1) |
+| `ecc-jsbn@0.1.2` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/ecc-jsbn/0.1.2) |
| `fast-uri@2.4.0` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/fast-uri/2.4.0) |
| `fastify@4.28.1` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/fastify/4.28.1) |
| `jsep@1.3.9` | [clearlydefined](https://clearlydefined.io/definitions/npm/npmjs/-/jsep/1.3.9) |