From 042321a3f466e3f4c9c76991e8176b6e4c7093c4 Mon Sep 17 00:00:00 2001 From: zernonia Date: Wed, 24 Apr 2024 11:45:39 +0800 Subject: [PATCH 1/7] chore: fix pipeline --- .github/workflows/publish.yaml | 3 +-- .github/workflows/test.yaml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9d347542..cd369438 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -18,7 +18,6 @@ on: # When a labeled '🚀request-deploy' pull request from forked repo, it will be deploy to Cloudflare Pages - labeled # Allows you to run this workflow manually from the Actions tab - # eslint-disable-next-line yml/no-empty-mapping-value workflow_dispatch: permissions: @@ -60,7 +59,7 @@ jobs: - uses: pnpm/action-setup@v2 name: Install pnpm with: - version: 8 + version: 9.0.5 run_install: false - name: Get pnpm store directory diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f1a7f7de..f9eeeb2e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: - uses: pnpm/action-setup@v2 name: Install pnpm with: - version: 8 + version: 9.0.5 run_install: false - name: Get pnpm store directory From 919770c6ca492cd86fc6940bba57e99b471a7c8e Mon Sep 17 00:00:00 2001 From: zernonia Date: Wed, 24 Apr 2024 11:49:13 +0800 Subject: [PATCH 2/7] chore: kick pipeline --- apps/www/src/content/api-examples.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/www/src/content/api-examples.md b/apps/www/src/content/api-examples.md index 6bd8bb5c..b6c6c1f4 100644 --- a/apps/www/src/content/api-examples.md +++ b/apps/www/src/content/api-examples.md @@ -47,3 +47,5 @@ const { site, theme, page, frontmatter } = useData() ## More Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). + +kick From 5f774f83d9ab303ebadf0d73278cffc9d0d56302 Mon Sep 17 00:00:00 2001 From: Sadegh Barati Date: Thu, 25 Apr 2024 18:33:26 +0330 Subject: [PATCH 3/7] fix: replace `lodash.template` with `lodash-es` to prevent vulnerabilities (#515) --- apps/www/package.json | 4 +-- apps/www/scripts/build-registry.ts | 4 +-- packages/cli/package.json | 4 +-- packages/cli/src/commands/init.ts | 2 +- pnpm-lock.yaml | 48 +++++++++--------------------- 5 files changed, 21 insertions(+), 41 deletions(-) diff --git a/apps/www/package.json b/apps/www/package.json index f07d0acb..3e3d32de 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -52,7 +52,7 @@ "@iconify/vue": "^4.1.2", "@oxc-parser/wasm": "^0.1.0", "@shikijs/transformers": "^1.3.0", - "@types/lodash.template": "^4.5.3", + "@types/lodash-es": "^4.17.12", "@types/node": "^20.12.7", "@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue-jsx": "^3.1.0", @@ -60,7 +60,7 @@ "@vue/compiler-dom": "^3.4.24", "@vue/tsconfig": "^0.5.1", "autoprefixer": "^10.4.19", - "lodash.template": "^4.5.0", + "lodash-es": "^4.17.21", "pathe": "^1.1.2", "rimraf": "^5.0.5", "shiki": "^1.3.0", diff --git a/apps/www/scripts/build-registry.ts b/apps/www/scripts/build-registry.ts index 2df7fd3e..36074e1d 100644 --- a/apps/www/scripts/build-registry.ts +++ b/apps/www/scripts/build-registry.ts @@ -1,6 +1,6 @@ import fs from 'node:fs' import path, { basename } from 'node:path' -import template from 'lodash.template' +import { template } from 'lodash-es' import { rimraf } from 'rimraf' import { colorMapping, colors } from '../src/lib/registry/colors' @@ -40,7 +40,7 @@ for (const style of styles) { file => `../src/lib/registry/${style.name}/${file}`, ) - const type = item.type.split(':')[1] + // const type = item.type.split(':')[1] index += ` "${item.name}": { name: "${item.name}", diff --git a/packages/cli/package.json b/packages/cli/package.json index b675da51..4ab4995b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -55,7 +55,7 @@ "diff": "^5.2.0", "fs-extra": "^11.2.0", "https-proxy-agent": "^7.0.4", - "lodash.template": "^4.5.0", + "lodash-es": "^4.17.21", "magic-string": "^0.30.10", "nypm": "^0.3.8", "ofetch": "^1.3.4", @@ -71,7 +71,7 @@ "@types/babel__core": "^7.20.5", "@types/diff": "^5.2.0", "@types/fs-extra": "^11.0.4", - "@types/lodash.template": "^4.5.3", + "@types/lodash-es": "^4.5.3", "@types/node": "^20.11.30", "@types/prompts": "^2.4.9", "@vitest/ui": "^0.34.4", diff --git a/packages/cli/src/commands/init.ts b/packages/cli/src/commands/init.ts index e40aba28..05e24c48 100644 --- a/packages/cli/src/commands/init.ts +++ b/packages/cli/src/commands/init.ts @@ -2,7 +2,7 @@ import { existsSync, promises as fs } from 'node:fs' import process from 'node:process' import path from 'pathe' import { Command } from 'commander' -import template from 'lodash.template' +import { template } from 'lodash-es' import ora from 'ora' import prompts from 'prompts' import { z } from 'zod' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 03418b03..d3861f33 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,9 +147,9 @@ importers: '@shikijs/transformers': specifier: ^1.3.0 version: 1.3.0 - '@types/lodash.template': - specifier: ^4.5.3 - version: 4.5.3 + '@types/lodash-es': + specifier: ^4.17.12 + version: 4.17.12 '@types/node': specifier: ^20.12.7 version: 20.12.7 @@ -171,9 +171,9 @@ importers: autoprefixer: specifier: ^10.4.19 version: 10.4.19(postcss@8.4.38) - lodash.template: - specifier: ^4.5.0 - version: 4.5.0 + lodash-es: + specifier: ^4.17.21 + version: 4.17.21 pathe: specifier: ^1.1.2 version: 1.1.2 @@ -237,9 +237,9 @@ importers: https-proxy-agent: specifier: ^7.0.4 version: 7.0.4 - lodash.template: - specifier: ^4.5.0 - version: 4.5.0 + lodash-es: + specifier: ^4.17.21 + version: 4.17.21 magic-string: specifier: ^0.30.10 version: 0.30.10 @@ -280,9 +280,9 @@ importers: '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 - '@types/lodash.template': + '@types/lodash-es': specifier: ^4.5.3 - version: 4.5.3 + version: 4.17.12 '@types/node': specifier: ^20.11.30 version: 20.12.7 @@ -2052,8 +2052,8 @@ packages: '@types/linkify-it@3.0.5': resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==} - '@types/lodash.template@4.5.3': - resolution: {integrity: sha512-Mo0UYKLu1oXgkV9TVoXZLlXXjyIXlW7ZQRxi/4gQJmzJr63dmicE8gG0OkPjYTKBrBic852q0JzqrtNUWLBIyA==} + '@types/lodash-es@4.17.12': + resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} '@types/lodash@4.17.0': resolution: {integrity: sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==} @@ -4880,9 +4880,6 @@ packages: lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} - lodash._reinterpolate@3.0.0: - resolution: {integrity: sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==} - lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} @@ -4916,12 +4913,6 @@ packages: lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - lodash.template@4.5.0: - resolution: {integrity: sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==} - - lodash.templatesettings@4.2.0: - resolution: {integrity: sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==} - lodash.uniq@4.5.0: resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} @@ -9427,7 +9418,7 @@ snapshots: '@types/linkify-it@3.0.5': {} - '@types/lodash.template@4.5.3': + '@types/lodash-es@4.17.12': dependencies: '@types/lodash': 4.17.0 @@ -12790,8 +12781,6 @@ snapshots: lodash-es@4.17.21: {} - lodash._reinterpolate@3.0.0: {} - lodash.camelcase@4.3.0: {} lodash.defaults@4.2.0: {} @@ -12814,15 +12803,6 @@ snapshots: lodash.startcase@4.4.0: {} - lodash.template@4.5.0: - dependencies: - lodash._reinterpolate: 3.0.0 - lodash.templatesettings: 4.2.0 - - lodash.templatesettings@4.2.0: - dependencies: - lodash._reinterpolate: 3.0.0 - lodash.uniq@4.5.0: {} lodash.upperfirst@4.3.1: {} From 93b98252a42c626d8ceacdb45a3d055100056bd1 Mon Sep 17 00:00:00 2001 From: chachew Date: Thu, 25 Apr 2024 10:03:53 -0500 Subject: [PATCH 4/7] docs: update form.md (#511) Small text change for clarity --- apps/www/src/content/docs/components/form.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/src/content/docs/components/form.md b/apps/www/src/content/docs/components/form.md index 1bb4cf7f..52640f3d 100644 --- a/apps/www/src/content/docs/components/form.md +++ b/apps/www/src/content/docs/components/form.md @@ -249,7 +249,7 @@ function onSubmit(values) { ### Build your form Based on last step we can either use `
` component or `useForm` composable -`useForm` is recommended cause values are typed automatically +`useForm` is recommended because values are typed automatically ```vue:line-numbers {2}