Skip to content

Commit 7ef47fd

Browse files
committed
Swap to lucide-vue-next, drop warning suppression
1 parent 242b140 commit 7ef47fd

File tree

9 files changed

+17
-33
lines changed

9 files changed

+17
-33
lines changed

client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@
8686
"linkify-html": "^4.1.1",
8787
"linkifyjs": "^4.1.1",
8888
"lodash.isequal": "^4.5.0",
89-
"lucide-vue": "^0.344.0",
89+
"lucide-vue": "^0.517.0",
90+
"lucide-vue-next": "^0.540.0",
9091
"markdown-it": "^13.0.2",
9192
"markdown-it-regexp": "^0.4.0",
9293
"mitt": "^3.0.1",

client/src/components/History/Content/ContentItem.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createTestingPinia } from "@pinia/testing";
22
import { mount } from "@vue/test-utils";
3-
import { getLocalVue, suppressLucideVue2Deprecation } from "tests/jest/helpers";
3+
import { getLocalVue } from "tests/jest/helpers";
44

55
import { HttpResponse, useServerMock } from "@/api/client/__mocks__";
66
import { updateContentFields } from "@/components/History/model/queries";
@@ -33,8 +33,6 @@ describe("ContentItem", () => {
3333
let wrapper;
3434

3535
beforeEach(() => {
36-
suppressLucideVue2Deprecation();
37-
3836
server.use(
3937
http.get("/api/datasets/{dataset_id}", ({ response }) => {
4038
// We need to use untyped here because this endpoint is not

client/src/components/History/Content/ContentOptions.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { faStop } from "@fortawesome/free-solid-svg-icons";
33
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
44
import axios from "axios";
55
import { BButton, BDropdown } from "bootstrap-vue";
6-
//@ts-ignore deprecated package without types (vue 2, remove this comment on vue 3 migration)
7-
import { ScanEye } from "lucide-vue";
6+
import { ScanEye } from "lucide-vue-next";
87
import { computed, type Ref, ref } from "vue";
98
109
import { getAppRoot } from "@/onload/loadConfig";

client/src/components/History/Content/GenericElement.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createTestingPinia } from "@pinia/testing";
22
import { mount } from "@vue/test-utils";
3-
import { getLocalVue, suppressLucideVue2Deprecation } from "tests/jest/helpers";
3+
import { getLocalVue } from "tests/jest/helpers";
44

55
import GenericElement from "./GenericElement";
66

@@ -12,7 +12,6 @@ describe("GenericElement", () => {
1212
let wrapper;
1313

1414
beforeEach(() => {
15-
suppressLucideVue2Deprecation();
1615

1716
wrapper = mount(GenericElement, {
1817
props: {

client/src/components/History/HistoryView.test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getFakeRegisteredUser } from "@tests/test-data";
22
import { mount } from "@vue/test-utils";
33
import flushPromises from "flush-promises";
44
import { createPinia } from "pinia";
5-
import { getLocalVue, suppressLucideVue2Deprecation } from "tests/jest/helpers";
5+
import { getLocalVue } from "tests/jest/helpers";
66
import { setupMockConfig } from "tests/jest/mockConfig";
77
import VueRouter from "vue-router";
88

@@ -117,10 +117,6 @@ async function createWrapper(globalConfig, currentUserId, history) {
117117
}
118118

119119
describe("History center panel View", () => {
120-
beforeEach(() => {
121-
suppressLucideVue2Deprecation();
122-
});
123-
124120
function expectCorrectLayout(wrapper) {
125121
// HistoryFilters should exist in HistoryView
126122
expect(wrapper.find("[data-description='filter text input']").exists()).toBe(true);

client/src/components/Workflow/Editor/NodeInspector.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import { faCog, faTimes } from "@fortawesome/free-solid-svg-icons";
33
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
44
import { BButton, BButtonGroup, BDropdown, BDropdownForm, BDropdownItemButton, BFormCheckbox } from "bootstrap-vue";
5-
//@ts-ignore deprecated package without types (vue 2, remove this comment on vue 3 migration)
6-
import { ArrowLeftFromLine, ArrowRightToLine } from "lucide-vue";
5+
import { ArrowLeftFromLine, ArrowRightToLine } from "lucide-vue-next";
76
import { computed } from "vue";
87
98
import { useWorkflowNodeInspectorStore } from "@/stores/workflowNodeInspectorStore";

client/src/components/Workflow/Editor/Tools/ToolBar.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ import {
1616
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
1717
import { useMagicKeys, whenever } from "@vueuse/core";
1818
import { BFormInput } from "bootstrap-vue";
19-
//@ts-ignore deprecated package without types (vue 2, remove this comment on vue 3 migration)
20-
import { BoxSelect, Workflow } from "lucide-vue";
19+
import { BoxSelect, Workflow } from "lucide-vue-next";
2120
import { storeToRefs } from "pinia";
2221
import { computed, toRefs, watch } from "vue";
2322

client/tests/jest/helpers.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -378,15 +378,3 @@ export function suppressErrorForCustomIcons() {
378378
}
379379
});
380380
}
381-
382-
export function suppressLucideVue2Deprecation() {
383-
const originalWarn = console.warn;
384-
// Only mock if not already mocked to prevent recursion
385-
if (!console.warn._isMockFunction) {
386-
jest.spyOn(console, "warn").mockImplementation((msg) => {
387-
if (!msg || typeof msg !== "string" || msg.indexOf("[Lucide Vue] This package will be deprecated") < 0) {
388-
originalWarn.call(console, msg);
389-
}
390-
});
391-
}
392-
}

client/yarn.lock

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8988,10 +8988,15 @@ lru-cache@^6.0.0:
89888988
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a"
89898989
integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==
89908990

8991-
lucide-vue@^0.344.0:
8992-
version "0.344.0"
8993-
resolved "https://registry.yarnpkg.com/lucide-vue/-/lucide-vue-0.344.0.tgz#e1c281e352b814aac31db56d0bd99b0205e40e56"
8994-
integrity sha512-pful6clOPphjOjuVaD/D1Lf7VW8dI58TxKvN+veOQZ2EK3jJr5Jv5a32wG1sDOvW/rw5w+nZ7qha6INvWtZDdQ==
8991+
lucide-vue-next@^0.540.0:
8992+
version "0.540.0"
8993+
resolved "https://registry.yarnpkg.com/lucide-vue-next/-/lucide-vue-next-0.540.0.tgz#c432f94651cf724b52ba0dd39d5e7a3891ed93b0"
8994+
integrity sha512-H7qhKVNKLyoFMo05pWcGSWBiLPiI3zJmWV65SuXWHlrIGIcvDer10xAyWcRJ0KLzIH5k5+yi7AGw/Xi1VF8Pbw==
8995+
8996+
lucide-vue@^0.517.0:
8997+
version "0.517.0"
8998+
resolved "https://registry.yarnpkg.com/lucide-vue/-/lucide-vue-0.517.0.tgz#b8fd325f0f9d6c1d627897be842b4234d25754f0"
8999+
integrity sha512-ctSLCEslH5DchFq+/jku2cjQoBago2Q8EkK5i32hZaFVPV/6iUe1NjycwmIQLdprvEhnvNQxJbmEHUO5v41myw==
89959000

89969001
magic-string@^0.30.17:
89979002
version "0.30.17"

0 commit comments

Comments
 (0)