pnpm update (#1902)

Using a simple `pnpm update` didn't fix any of the issues in #1900 but
it fixes some vulnerabilities shown with `pnpm audit`. I didn't try to
force-update `semver` to fix the security vulnerability there.

---------

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
qwerty287 2023-07-02 12:47:36 +02:00 committed by GitHub
parent 9dc839b946
commit 0e25d6d35a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 913 additions and 933 deletions

View file

@ -17,36 +17,36 @@
"test": "echo 'No tests configured' && exit 0" "test": "echo 'No tests configured' && exit 0"
}, },
"dependencies": { "dependencies": {
"@intlify/unplugin-vue-i18n": "^0.10.0", "@intlify/unplugin-vue-i18n": "^0.10.1",
"@kyvg/vue3-notification": "^2.9.0", "@kyvg/vue3-notification": "^2.9.1",
"@vueuse/core": "^9.13.0", "@vueuse/core": "^9.13.0",
"ansi_up": "^5.2.0", "ansi_up": "^5.2.1",
"dayjs": "^1.11.7", "dayjs": "^1.11.9",
"floating-vue": "^2.0.0-beta.20", "floating-vue": "^2.0.0-beta.24",
"fuse.js": "^6.6.2", "fuse.js": "^6.6.2",
"humanize-duration": "^3.28.0", "humanize-duration": "^3.28.0",
"javascript-time-ago": "^2.5.9", "javascript-time-ago": "^2.5.9",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-emoji": "^1.11.0", "node-emoji": "^1.11.0",
"pinia": "^2.0.33", "pinia": "^2.1.4",
"prismjs": "^1.29.0", "prismjs": "^1.29.0",
"vue": "^3.2.47", "vue": "^3.3.4",
"vue-i18n": "^9.2.2", "vue-i18n": "^9.2.2",
"vue-router": "^4.1.6" "vue-router": "^4.2.2"
}, },
"devDependencies": { "devDependencies": {
"@iconify/json": "^2.2.43", "@iconify/json": "^2.2.85",
"@types/humanize-duration": "^3.27.1", "@types/humanize-duration": "^3.27.1",
"@types/javascript-time-ago": "^2.0.3", "@types/javascript-time-ago": "^2.0.3",
"@types/lodash": "^4.14.192", "@types/lodash": "^4.14.195",
"@types/node": "^18.15.11", "@types/node": "^18.16.19",
"@types/node-emoji": "^1.8.2", "@types/node-emoji": "^1.8.2",
"@types/prismjs": "^1.26.0", "@types/prismjs": "^1.26.0",
"@typescript-eslint/eslint-plugin": "^5.57.0", "@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.57.0", "@typescript-eslint/parser": "^5.60.1",
"@vitejs/plugin-vue": "^4.1.0", "@vitejs/plugin-vue": "^4.2.3",
"@vue/compiler-sfc": "^3.2.47", "@vue/compiler-sfc": "^3.3.4",
"eslint": "^8.37.0", "eslint": "^8.44.0",
"eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0", "eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",
@ -54,18 +54,18 @@
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1", "eslint-plugin-promise": "^6.1.1",
"eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vue": "^9.10.0", "eslint-plugin-vue": "^9.15.1",
"eslint-plugin-vue-scoped-css": "^2.4.0", "eslint-plugin-vue-scoped-css": "^2.5.0",
"prettier": "^2.8.7", "prettier": "^2.8.8",
"typescript": "5.0.3", "typescript": "5.0.3",
"unplugin-icons": "^0.16.1", "unplugin-icons": "^0.16.3",
"unplugin-vue-components": "^0.24.1", "unplugin-vue-components": "^0.24.1",
"vite": "^4.2.1", "vite": "^4.3.9",
"vite-plugin-prismjs": "^0.0.8", "vite-plugin-prismjs": "^0.0.8",
"vite-plugin-windicss": "^1.8.10", "vite-plugin-windicss": "^1.9.0",
"vite-svg-loader": "^4.0.0", "vite-svg-loader": "^4.0.0",
"vue-eslint-parser": "^9.1.1", "vue-eslint-parser": "^9.3.1",
"vue-tsc": "^1.2.0", "vue-tsc": "^1.8.3",
"windicss": "^3.5.6" "windicss": "^3.5.6"
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -6,11 +6,14 @@
@click="$emit('close')" @click="$emit('close')"
/> />
<!-- overlay end --> <!-- overlay end -->
<transition class="print:hidden fixed flex top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"> <div
<div v-if="open" class="m-auto flex flex-col shadow-all z-1000 max-w-3/5 max-h-3/5 h-auto"> v-if="open"
class="print:hidden fixed flex max-w-1/3 <md:max-w-4/5 max-h-3/5 top-1/2 left-1/2 transform z-1000 -translate-x-1/2 -translate-y-1/2"
>
<div class="m-auto flex flex-col shadow-all h-auto">
<slot /> <slot />
</div> </div>
</transition> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View file

@ -1,4 +1,4 @@
import { inject as vueInject, provide as vueProvide, Ref } from 'vue'; import { inject as vueInject, InjectionKey, provide as vueProvide, Ref } from 'vue';
import { Repo } from '~/lib/api/types'; import { Repo } from '~/lib/api/types';
@ -15,5 +15,5 @@ export function inject<T extends keyof InjectKeys>(key: T): InjectKeys[T] {
} }
export function provide<T extends keyof InjectKeys>(key: T, value: InjectKeys[T]): void { export function provide<T extends keyof InjectKeys>(key: T, value: InjectKeys[T]): void {
return vueProvide(key, value); return vueProvide(key, value as T extends InjectionKey<infer V> ? V : InjectKeys[T]);
} }

View file

@ -77,7 +77,7 @@ const props = defineProps<{
}>(); }>();
const _repoId = toRef(props, 'repoId'); const _repoId = toRef(props, 'repoId');
const repoId = computed(() => parseInt(_repoId.value, 10)); const repositoryId = computed(() => parseInt(_repoId.value, 10));
const repoStore = useRepoStore(); const repoStore = useRepoStore();
const pipelineStore = usePipelineStore(); const pipelineStore = usePipelineStore();
const apiClient = useApiClient(); const apiClient = useApiClient();
@ -89,9 +89,9 @@ const i18n = useI18n();
const config = useConfig(); const config = useConfig();
const { forge } = useConfig(); const { forge } = useConfig();
const repo = repoStore.getRepo(repoId); const repo = repoStore.getRepo(repositoryId);
const repoPermissions = ref<RepoPermissions>(); const repoPermissions = ref<RepoPermissions>();
const pipelines = pipelineStore.getRepoPipelines(repoId); const pipelines = pipelineStore.getRepoPipelines(repositoryId);
provide('repo', repo); provide('repo', repo);
provide('repo-permissions', repoPermissions); provide('repo-permissions', repoPermissions);
provide('pipelines', pipelines); provide('pipelines', pipelines);
@ -99,7 +99,7 @@ provide('pipelines', pipelines);
const showManualPipelinePopup = ref(false); const showManualPipelinePopup = ref(false);
async function loadRepo() { async function loadRepo() {
repoPermissions.value = await apiClient.getRepoPermissions(repoId.value); repoPermissions.value = await apiClient.getRepoPermissions(repositoryId.value);
if (!repoPermissions.value.pull) { if (!repoPermissions.value.pull) {
notifications.notify({ type: 'error', title: i18n.t('repo.not_allowed') }); notifications.notify({ type: 'error', title: i18n.t('repo.not_allowed') });
// no access and not authenticated, redirect to login // no access and not authenticated, redirect to login
@ -111,15 +111,15 @@ async function loadRepo() {
return; return;
} }
await repoStore.loadRepo(repoId.value); await repoStore.loadRepo(repositoryId.value);
await pipelineStore.loadRepoPipelines(repoId.value); await pipelineStore.loadRepoPipelines(repositoryId.value);
} }
onMounted(() => { onMounted(() => {
loadRepo(); loadRepo();
}); });
watch([repoId], () => { watch([repositoryId], () => {
loadRepo(); loadRepo();
}); });

View file

@ -110,14 +110,14 @@ const i18n = useI18n();
const pipelineStore = usePipelineStore(); const pipelineStore = usePipelineStore();
const pipelineId = toRef(props, 'pipelineId'); const pipelineId = toRef(props, 'pipelineId');
const _repoId = toRef(props, 'repoId'); const _repoId = toRef(props, 'repoId');
const repoId = computed(() => parseInt(_repoId.value, 10)); const repositoryId = computed(() => parseInt(_repoId.value, 10));
const repo = inject<Ref<Repo>>('repo'); const repo = inject<Ref<Repo>>('repo');
const repoPermissions = inject<Ref<RepoPermissions>>('repo-permissions'); const repoPermissions = inject<Ref<RepoPermissions>>('repo-permissions');
if (!repo || !repoPermissions) { if (!repo || !repoPermissions) {
throw new Error('Unexpected: "repo" & "repoPermissions" should be provided at this place'); throw new Error('Unexpected: "repo" & "repoPermissions" should be provided at this place');
} }
const pipeline = pipelineStore.getPipeline(repoId, pipelineId); const pipeline = pipelineStore.getPipeline(repositoryId, pipelineId);
const { since, duration, created } = usePipeline(pipeline); const { since, duration, created } = usePipeline(pipeline);
provide('pipeline', pipeline); provide('pipeline', pipeline);
@ -171,7 +171,7 @@ const { doSubmit: restartPipeline, isLoading: isRestartingPipeline } = useAsyncA
}); });
onMounted(loadPipeline); onMounted(loadPipeline);
watch([repoId, pipelineId], loadPipeline); watch([repositoryId, pipelineId], loadPipeline);
onBeforeUnmount(() => { onBeforeUnmount(() => {
favicon.updateStatus('default'); favicon.updateStatus('default');
}); });