diff --git a/.pnp.cjs b/.pnp.cjs index cacc7fd842..c942fb425b 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -6244,30 +6244,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["eslint-import-resolver-custom-alias", [\ - ["npm:1.3.2", {\ - "packageLocation": "./.yarn/cache/eslint-import-resolver-custom-alias-npm-1.3.2-65cce717f8-4ef8278ec3.zip/node_modules/eslint-import-resolver-custom-alias/",\ - "packageDependencies": [\ - ["eslint-import-resolver-custom-alias", "npm:1.3.2"]\ - ],\ - "linkType": "SOFT"\ - }],\ - ["virtual:453456e4e11df4d43ec4cdf3dd188a0cbf844792afe2c0f9eedbc81f1436f760ea40001ed276e87e2235bc8923699e32413e9c7b8fb8c7daa7dde1131e5bc716#npm:1.3.2", {\ - "packageLocation": "./.yarn/__virtual__/eslint-import-resolver-custom-alias-virtual-15c496e6b3/0/cache/eslint-import-resolver-custom-alias-npm-1.3.2-65cce717f8-4ef8278ec3.zip/node_modules/eslint-import-resolver-custom-alias/",\ - "packageDependencies": [\ - ["eslint-import-resolver-custom-alias", "virtual:453456e4e11df4d43ec4cdf3dd188a0cbf844792afe2c0f9eedbc81f1436f760ea40001ed276e87e2235bc8923699e32413e9c7b8fb8c7daa7dde1131e5bc716#npm:1.3.2"],\ - ["@types/eslint-plugin-import", null],\ - ["eslint-plugin-import", null],\ - ["glob-parent", "npm:6.0.2"],\ - ["resolve", "patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d"]\ - ],\ - "packagePeers": [\ - "@types/eslint-plugin-import",\ - "eslint-plugin-import"\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["eslint-import-resolver-node", [\ ["npm:0.3.9", {\ "packageLocation": "./.yarn/cache/eslint-import-resolver-node-npm-0.3.9-2a426afc4b-0ea8a24a72.zip/node_modules/eslint-import-resolver-node/",\ @@ -6301,7 +6277,6 @@ const RAW_RUNTIME_STATE = ["debug", "virtual:2a426afc4b2eef43db12a540d29c2b5476640459bfcd5c24f86bb401cf8cce97e63bd81794d206a5643057e7f662643afd5ce3dfc4d4bfd8e706006c6309c5fa#npm:3.2.7"],\ ["eslint", "virtual:f3f18773c1f2811e8d448670abfc3fed18cdffc11b444f7cbc3548ae5868e74f3c4ee449327c1fc9c24ce0732ee02505411a07539789bec8257188d17bbada1f#npm:9.11.0"],\ ["eslint-import-resolver-alias", "virtual:453456e4e11df4d43ec4cdf3dd188a0cbf844792afe2c0f9eedbc81f1436f760ea40001ed276e87e2235bc8923699e32413e9c7b8fb8c7daa7dde1131e5bc716#npm:1.1.2"],\ - ["eslint-import-resolver-custom-alias", "virtual:453456e4e11df4d43ec4cdf3dd188a0cbf844792afe2c0f9eedbc81f1436f760ea40001ed276e87e2235bc8923699e32413e9c7b8fb8c7daa7dde1131e5bc716#npm:1.3.2"],\ ["eslint-import-resolver-node", "npm:0.3.9"],\ ["eslint-import-resolver-typescript", null],\ ["eslint-import-resolver-webpack", null]\ diff --git a/.reuse/dep5 b/.reuse/dep5 deleted file mode 100644 index 7372c73449..0000000000 --- a/.reuse/dep5 +++ /dev/null @@ -1,53 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: Gardener dashboard -Upstream-Contact: The Gardener project -Source: https://github.com/gardener/dashboard - -# -------------------------------------------------- -# source code - -Files: - */.gitignore - */.helmignore - */.browserslistrc - */.editorconfig - */.eslintignore - */.env - *.ico - *.json - *.png - *.sketch - *.svg - *.gif - *.tpl - *.snap - .github/ - .yarn/ - charts/*/Chart.yaml - charts/*/values.yaml - charts/*/templates/*.yaml - charts/*/templates/*/*.yaml - frontend/index.html - CODEOWNERS - VERSION - .editorconfig - .gitignore - .dockerignore - .yarnrc.yml - .pnp.cjs - .pnp.loader.mjs - yarn.lock -Copyright: 2017-2021 SAP SE or an SAP affiliate company and Gardener contributors -License: Apache-2.0 - -# -------------------------------------------------- -# documentation - -Files: - *.md - docs/usage/shoot.yaml -Copyright: 2017-2021 SAP SE or an SAP affiliate company and Gardener contributors -License: CC-BY-4.0 - -# -------------------------------------------------- -# source dependencies diff --git a/.yarn/cache/eslint-import-resolver-custom-alias-npm-1.3.2-65cce717f8-4ef8278ec3.zip b/.yarn/cache/eslint-import-resolver-custom-alias-npm-1.3.2-65cce717f8-4ef8278ec3.zip deleted file mode 100644 index be72e87734..0000000000 Binary files a/.yarn/cache/eslint-import-resolver-custom-alias-npm-1.3.2-65cce717f8-4ef8278ec3.zip and /dev/null differ diff --git a/.yarnrc.yml b/.yarnrc.yml index 502cc148db..ccaa5a01d6 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -45,7 +45,6 @@ packageExtensions: "eslint-module-utils@*": dependencies: eslint-import-resolver-alias: "*" - eslint-import-resolver-custom-alias: "*" plugins: - checksum: ba78c78f5d189f252d4d5e21e924611e496f41dddae35690823bc28dfeccb8f2cb5caf992163503fadf9eece9a70164dd0676ad51aa0692d293d4d123d3f1c34 diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 0000000000..7b0895fcc1 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,47 @@ +version = 1 +SPDX-PackageName = "Gardener dashboard" +SPDX-PackageSupplier = "The Gardener project " +SPDX-PackageDownloadLocation = "https://github.com/gardener/dashboard" + +[[annotations]] +path = [ + "**/.gitignore", + "**/.helmignore", + "**/.browserslistrc", + "**/.editorconfig", + "**/.env", + "**.ico", + "**.json", + "**.png", + "**.sketch", + "**.svg", + "**.gif", + "**.tpl", + "**.snap", + ".github/**", + ".yarn/**", + "charts/**/Chart.yaml", + "charts/**/values.yaml", + "charts/**/templates/**.yaml", + "charts/**/templates/**/**.yaml", + "frontend/index.html", + "CODEOWNERS", + "VERSION", + ".editorconfig", + ".gitignore", + ".dockerignore", + ".yarnrc.yml", + ".pnp.cjs", + ".pnp.loader.mjs", + "yarn.lock", + "REUSE.toml", +] +precedence = "aggregate" +SPDX-FileCopyrightText = "2017-2024 SAP SE or an SAP affiliate company and Gardener contributors" +SPDX-License-Identifier = "Apache-2.0" + +[[annotations]] +path = ["**.md", "docs/usage/shoot.yaml"] +precedence = "aggregate" +SPDX-FileCopyrightText = "2017-2024 SAP SE or an SAP affiliate company and Gardener contributors" +SPDX-License-Identifier = "CC-BY-4.0" diff --git a/frontend/__tests__/components/GMachineType.spec.js b/frontend/__tests__/components/GMachineType.spec.js index ed5d8dd38c..0151450ff8 100644 --- a/frontend/__tests__/components/GMachineType.spec.js +++ b/frontend/__tests__/components/GMachineType.spec.js @@ -14,7 +14,7 @@ import { notify as notifyPlugin, } from '@/plugins' -import { map } from '@/lodash' +import map from 'lodash/map' const { createVuetifyPlugin } = global.fixtures.helper diff --git a/frontend/__tests__/composables/useShootAccessRestrictions.spec.js b/frontend/__tests__/composables/useShootAccessRestrictions.spec.js index dd178b8811..aa46bd430d 100644 --- a/frontend/__tests__/composables/useShootAccessRestrictions.spec.js +++ b/frontend/__tests__/composables/useShootAccessRestrictions.spec.js @@ -12,7 +12,7 @@ import { shallowRef } from 'vue' import { useShootAccessRestrictions } from '@/composables/useShootAccessRestrictions' -import { find } from '@/lodash' +import find from 'lodash/find' describe('composables', () => { describe('useShootAccessRestrictions', () => { diff --git a/frontend/__tests__/composables/useShootContext.spec.js b/frontend/__tests__/composables/useShootContext.spec.js index 9b6057e92c..3b59c874db 100644 --- a/frontend/__tests__/composables/useShootContext.spec.js +++ b/frontend/__tests__/composables/useShootContext.spec.js @@ -19,7 +19,8 @@ import { useAuthzStore } from '@/store/authz' import { createShootContextComposable } from '@/composables/useShootContext' -import { cloneDeep } from '@/lodash' +import cloneDeep from 'lodash/cloneDeep' + describe('composables', () => { let shootContextStore diff --git a/frontend/__tests__/composables/useShootEditor.spec.js b/frontend/__tests__/composables/useShootEditor.spec.js index d3c1742f6c..7b4902e2bf 100644 --- a/frontend/__tests__/composables/useShootEditor.spec.js +++ b/frontend/__tests__/composables/useShootEditor.spec.js @@ -14,7 +14,7 @@ import { import { EditorCompletions } from '@/composables/useShootEditor/helper' -import { repeat } from '@/lodash' +import repeat from 'lodash/repeat' const shootCompletions = { spec: { diff --git a/frontend/__tests__/composables/useShootItem.spec.js b/frontend/__tests__/composables/useShootItem.spec.js index d1d8c52b3f..3684ec896e 100644 --- a/frontend/__tests__/composables/useShootItem.spec.js +++ b/frontend/__tests__/composables/useShootItem.spec.js @@ -22,11 +22,9 @@ import { useSeedStore } from '@/store/seed' import { createShootItemComposable } from '@/composables/useShootItem' -import { - set, - cloneDeep, - unset, -} from '@/lodash' +import set from 'lodash/set' +import cloneDeep from 'lodash/cloneDeep' +import unset from 'lodash/unset' describe('composables', () => { describe('useProvideShootItem', () => { diff --git a/frontend/__tests__/composables/useShootStatusCredentialRotation.spec.js b/frontend/__tests__/composables/useShootStatusCredentialRotation.spec.js index 4fb4c7e41f..78617c8b03 100644 --- a/frontend/__tests__/composables/useShootStatusCredentialRotation.spec.js +++ b/frontend/__tests__/composables/useShootStatusCredentialRotation.spec.js @@ -13,11 +13,9 @@ import { useShootStatusCredentialRotation, } from '@/composables/useShootStatusCredentialRotation' -import { - set, - unset, - find, -} from '@/lodash' +import set from 'lodash/set' +import unset from 'lodash/unset' +import find from 'lodash/find' describe('composables', () => { describe('useShootStatusCredentialRotation', () => { @@ -58,8 +56,8 @@ describe('composables', () => { }) it('should return completed phase', () => { - set(shootItem.value, 'status.credentials.rotation.certificateAuthorities.phase', 'Completed') - set(shootItem.value, 'status.credentials.rotation.etcdEncryptionKey.phase', 'Completed') + set(shootItem.value, ['status', 'credentials', 'rotation', 'certificateAuthorities', 'phase'], 'Completed') + set(shootItem.value, ['status', 'credentials', 'rotation', 'etcdEncryptionKey', 'phase'], 'Completed') expect(reactiveShootItem.shootCredentialsRotationAggregatedPhase).toEqual({ type: 'Completed', caption: 'Completed', @@ -67,8 +65,8 @@ describe('composables', () => { }) it('should return prepared phase', () => { - set(shootItem.value, 'status.credentials.rotation.etcdEncryptionKey.phase', 'Prepared') - set(shootItem.value, 'status.credentials.rotation.serviceAccountKey.phase', 'Prepared') + set(shootItem.value, ['status', 'credentials', 'rotation', 'etcdEncryptionKey', 'phase'], 'Prepared') + set(shootItem.value, ['status', 'credentials', 'rotation', 'serviceAccountKey', 'phase'], 'Prepared') expect(reactiveShootItem.shootCredentialsRotationAggregatedPhase).toEqual({ type: 'Prepared', caption: 'Prepared', @@ -77,7 +75,7 @@ describe('composables', () => { it('should return incomplete prepared phase', () => { // treat unrotated credentials as unprepared - unset(shootItem.value, 'status.credentials.rotation.etcdEncryptionKey') + unset(shootItem.value, ['status', 'credentials', 'rotation', 'etcdEncryptionKey']) expect(reactiveShootItem.shootCredentialsRotationAggregatedPhase).toEqual({ type: 'Prepared', diff --git a/frontend/__tests__/lib.spec.js b/frontend/__tests__/lib.spec.js index 98a8d00f81..4280a47fe5 100644 --- a/frontend/__tests__/lib.spec.js +++ b/frontend/__tests__/lib.spec.js @@ -11,7 +11,7 @@ import { PositionEnum, } from '@/lib/g-symbol-tree' -import { cloneDeep } from '@/lodash' +import cloneDeep from 'lodash/cloneDeep' describe('lib', () => { describe('g-symbol-tree', () => { diff --git a/frontend/__tests__/stores/cloudProfile.spec.js b/frontend/__tests__/stores/cloudProfile.spec.js index 5a65d26193..0d4485c842 100644 --- a/frontend/__tests__/stores/cloudProfile.spec.js +++ b/frontend/__tests__/stores/cloudProfile.spec.js @@ -14,7 +14,7 @@ import { useConfigStore } from '@/store/config' import { useCloudProfileStore } from '@/store/cloudProfile' import { firstItemMatchingVersionClassification } from '@/store/cloudProfile/helper' -import { find } from '@/lodash' +import find from 'lodash/find' describe('stores', () => { describe('cloudProfile', () => { diff --git a/frontend/__tests__/stores/shoot.spec.js b/frontend/__tests__/stores/shoot.spec.js index b3afc88178..3cbe332fc7 100644 --- a/frontend/__tests__/stores/shoot.spec.js +++ b/frontend/__tests__/stores/shoot.spec.js @@ -18,11 +18,9 @@ import { parseSearch } from '@/store/shoot/helper' import { useApi } from '@/composables/useApi' -import { - cloneDeep, - map, - find, -} from '@/lodash' +import cloneDeep from 'lodash/cloneDeep' +import map from 'lodash/map' +import find from 'lodash/find' const globalSetImmediate = global.setImmediate diff --git a/frontend/__tests__/utils/index.spec.js b/frontend/__tests__/utils/index.spec.js index 23252716fd..20dcadfa63 100644 --- a/frontend/__tests__/utils/index.spec.js +++ b/frontend/__tests__/utils/index.spec.js @@ -21,10 +21,8 @@ import { convertToGibibyte, } from '@/utils' -import { - pick, - find, -} from '@/lodash' +import pick from 'lodash/pick' +import find from 'lodash/find' describe('utils', () => { describe('authorization', () => { diff --git a/frontend/eslint.config.cjs b/frontend/eslint.config.cjs index dbdf7948e3..a71e14bb9a 100644 --- a/frontend/eslint.config.cjs +++ b/frontend/eslint.config.cjs @@ -18,10 +18,17 @@ const securityConfig = pluginSecurity.configs.recommended const lodashConfig = { plugins: { - lodash: pluginLodash, + lodash: { + meta: { + name: 'eslint-plugin-lodash', + version: '11.0.0', + }, + rules: pluginLodash.rules, + }, }, rules: { 'lodash/path-style': ['error', 'array'], + 'lodash/import-scope': ['error', 'method'], }, } @@ -92,7 +99,7 @@ const importConfig = { position: 'before', }, { - pattern: '@/lodash', + pattern: 'lodash/**', group: 'index', position: 'after', }, @@ -106,6 +113,7 @@ const importConfig = { group: 'internal', }, ], + pathGroupsExcludedImportTypes: ['builtin'], 'newlines-between': 'always', }], }, diff --git a/frontend/src/App.vue b/frontend/src/App.vue index a2994b84ef..fbd1af74f8 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -33,7 +33,7 @@ import { useProjectStore } from '@/store/project' import { useCustomColors } from '@/composables/useCustomColors' -import { get } from '@/lodash' +import get from 'lodash/get' const theme = useTheme() const route = useRoute() diff --git a/frontend/src/components/ControlPlaneHighAvailability/GControlPlaneHighAvailabilityTag.vue b/frontend/src/components/ControlPlaneHighAvailability/GControlPlaneHighAvailabilityTag.vue index 26d4923bfb..0f8bc528e2 100644 --- a/frontend/src/components/ControlPlaneHighAvailability/GControlPlaneHighAvailabilityTag.vue +++ b/frontend/src/components/ControlPlaneHighAvailability/GControlPlaneHighAvailabilityTag.vue @@ -64,7 +64,7 @@ import { useCloudProfileStore } from '@/store/cloudProfile' import { useShootItem } from '@/composables/useShootItem' -import { some } from '@/lodash' +import some from 'lodash/some' export default { inject: [ diff --git a/frontend/src/components/GAnsiText.vue b/frontend/src/components/GAnsiText.vue index 4bfd3b635d..58fe342fb9 100644 --- a/frontend/src/components/GAnsiText.vue +++ b/frontend/src/components/GAnsiText.vue @@ -16,7 +16,7 @@ SPDX-License-Identifier: Apache-2.0