[Snyk] Upgrade @vuepress/shared-utils from 1.5.0 to 1.9.10 #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.
![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to upgrade @vuepress/shared-utils from 1.5.0 to 1.9.10.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 22 versions ahead of your current version.
The recommended version was released on 9 months ago.
Release notes
Package name: @vuepress/shared-utils
Bug Fixes
v1.9.9
v1.9.8
v1.9.7
v1.9.6
v1.9.5
v1.9.4
v1.9.3
TS Support for VuePress Plugin and Theme.
Motivation
We've announced VuePress 1.9 that takes full TypeScript Support for Config File, while VuePress 1.9.2 ships with TS Support for VuePress Plugin and Theme:
Quick Start
In order to make the plugin developer not dependent on VuePress for development, we provide a completely independent type package
@ vuepress/types
:@ vuepress/types
exports four functions:defineConfig
defineConfig4CustomTheme
defineTheme
definePlugin
Note that using
@ vuepress/types
is equivalent to usingvuepress/config
.Plugin Type
If you already have some VuePress plugins written in JS, you can leverage your IDE's intellisense with jsdoc type hints:
Alternatively, you can use the defineConfig helper which should provide intellisense without the need for jsdoc annotations:
export default definePlugin({
// ...
});
Plugin Options Type
Type of plugin options also supports passing in through generic type:
interface Options {
name: string;
}
export default definePlugin<Options>((options, ctx) => {
return {
ready() {
return ctx.base + options.name;
}
};
});
Theme Type
Similar to plugin, the only difference is the type you use, and the define function:
+import { defineTheme } from "@ vuepress/types";
-export default definePlugin({
+export default defineTheme({
// ...
});
Theme Config Type
Type of theme config also supports passing in through generic type:
interface ThemeConfig {
lang: string;
}
export default defineTheme<ThemeConfig>((themeConfig, ctx) => {
return {
ready() {
return ctx.base + themeConfig.lang;
}
};
});
Notes
It is worth noting that, unlike the site configuration, i.e.
.vuepress/config.js
, if you use TypeScript to write theme or plugin, you still need to compile it into JavaScript before publishing it to NPM.v1.9.1
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: