diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 7f53819fbd2..25c1075a7ec 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -95,7 +95,6 @@ "jquery-migrate": "^4.0.2", "json5": "^2.2.2", "lit-html": "^3.3.3", - "lodash": "^4.18.1", "luxon": "^3.7.2", "mdx-embed": "^1.1.2", "mime": "^4.1.0", @@ -144,7 +143,6 @@ "@types/hotwired__turbo": "^8.0.10", "@types/jquery": "^4.0.1", "@types/jquery-migrate": "^3.3.3", - "@types/lodash": "^4.17.24", "@types/mousetrap": "^1.6.3", "@types/node": "^25.9.1", "@types/pako": "^2.0.4", @@ -7024,13 +7022,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/lodash": { - "version": "4.17.24", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.24.tgz", - "integrity": "sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/mousetrap": { "version": "1.6.15", "resolved": "https://registry.npmjs.org/@types/mousetrap/-/mousetrap-1.6.15.tgz", diff --git a/frontend/package.json b/frontend/package.json index db301968acd..8c67af92571 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -22,7 +22,6 @@ "@types/hotwired__turbo": "^8.0.10", "@types/jquery": "^4.0.1", "@types/jquery-migrate": "^3.3.3", - "@types/lodash": "^4.17.24", "@types/mousetrap": "^1.6.3", "@types/node": "^25.9.1", "@types/pako": "^2.0.4", @@ -141,7 +140,6 @@ "jquery-migrate": "^4.0.2", "json5": "^2.2.2", "lit-html": "^3.3.3", - "lodash": "^4.18.1", "luxon": "^3.7.2", "mdx-embed": "^1.1.2", "mime": "^4.1.0", diff --git a/frontend/src/app/core/setup/init-vendors.ts b/frontend/src/app/core/setup/init-vendors.ts index e22dbf32f04..e6e7d3446fa 100644 --- a/frontend/src/app/core/setup/init-vendors.ts +++ b/frontend/src/app/core/setup/init-vendors.ts @@ -30,9 +30,6 @@ // // dependencies required by classic (Rails) and Angular application. -// Lodash -import lodash from 'lodash'; - import moment from 'moment'; import './init-moment-locales'; @@ -42,12 +39,5 @@ import '@openproject/primer-view-components/app/assets/javascripts/primer_view_c import URI from 'urijs'; import 'urijs/src/URITemplate'; -declare global { - interface Window { - _:typeof lodash; - } -} - -window._ = lodash; window.moment = moment; window.URI = URI; diff --git a/frontend/src/test-setup.ts b/frontend/src/test-setup.ts index 1f790269d7e..6722f6db937 100644 --- a/frontend/src/test-setup.ts +++ b/frontend/src/test-setup.ts @@ -1,5 +1,4 @@ import { I18n } from 'i18n-js'; -import lodash from 'lodash'; import '@testing-library/jest-dom/vitest'; import { afterEach, vi } from 'vitest'; import { registerDialogStreamAction } from 'core-turbo/dialog-stream-action'; @@ -15,11 +14,6 @@ afterEach(() => { window.I18n = new I18n(); -// Production code expects `_` to be available globally (set in init-vendors.ts). -// Mirror that here so production modules pulled in by spec compilation can run. -// eslint-disable-next-line @typescript-eslint/no-explicit-any -(window as any)._ = lodash; - // jsdom does not implement CSS.escape; production helpers (e.g. getMetaElement) // call it unconditionally. if (typeof CSS === 'undefined' || typeof CSS.escape !== 'function') { diff --git a/frontend/src/typings/shims.d.ts b/frontend/src/typings/shims.d.ts index f4f9959e862..be31ebb7027 100644 --- a/frontend/src/typings/shims.d.ts +++ b/frontend/src/typings/shims.d.ts @@ -14,7 +14,6 @@ import { Injector } from '@angular/core'; import { OpenProject } from 'core-app/core/setup/globals/openproject'; -import * as TLodash from 'lodash'; import { Screenfull } from 'screenfull'; import { ErrorReporterBase } from 'core-app/core/errors/error-reporter-base'; import { I18n } from 'i18n-js'; @@ -24,7 +23,6 @@ declare module 'dom-autoscroller'; declare module 'core-vendor/enjoyhint'; declare global { - const _:typeof TLodash; const I18n:I18n; }