Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vuepress/core

Package Overview
Dependencies
Maintainers
7
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuepress/core - npm Package Compare versions

Comparing version 2.0.0-beta.41 to 2.0.0-beta.42

7

lib/app/resolveThemeInfo.js

@@ -10,3 +10,2 @@ "use strict";

const resolveThemeInfo = (app, theme) => {
var _a, _b, _c;
// resolve current theme info

@@ -16,3 +15,3 @@ const themeObject = (0, resolvePluginObject_1.resolvePluginObject)(app, theme);

layouts: (0, resolveThemeLayouts_1.resolveThemeLayouts)(themeObject.layouts),
plugins: [...((_a = themeObject.plugins) !== null && _a !== void 0 ? _a : []), themeObject],
plugins: [...(themeObject.plugins ?? []), themeObject],
templateBuild: themeObject.templateBuild,

@@ -30,6 +29,6 @@ templateDev: themeObject.templateDev,

plugins: [...parentThemeInfo.plugins, ...themeInfo.plugins],
templateBuild: (_b = themeObject.templateBuild) !== null && _b !== void 0 ? _b : parentThemeInfo.templateBuild,
templateDev: (_c = themeObject.templateDev) !== null && _c !== void 0 ? _c : parentThemeInfo.templateDev,
templateBuild: themeObject.templateBuild ?? parentThemeInfo.templateBuild,
templateDev: themeObject.templateDev ?? parentThemeInfo.templateDev,
};
};
exports.resolveThemeInfo = resolveThemeInfo;

@@ -9,3 +9,2 @@ "use strict";

const setupAppThemeAndPlugins = (app, config) => {
var _a, _b, _c, _d;
// recursively resolve theme info

@@ -16,5 +15,5 @@ const themeInfo = (0, resolveThemeInfo_1.resolveThemeInfo)(app, app.options.theme);

app.options.templateDev =
(_b = (_a = config.templateDev) !== null && _a !== void 0 ? _a : themeInfo.templateDev) !== null && _b !== void 0 ? _b : app.options.templateDev;
config.templateDev ?? themeInfo.templateDev ?? app.options.templateDev;
app.options.templateBuild =
(_d = (_c = config.templateBuild) !== null && _c !== void 0 ? _c : themeInfo.templateBuild) !== null && _d !== void 0 ? _d : app.options.templateBuild;
config.templateBuild ?? themeInfo.templateBuild ?? app.options.templateBuild;
[...themeInfo.plugins, ...app.options.plugins]

@@ -21,0 +20,0 @@ .flat()

@@ -15,3 +15,2 @@ "use strict";

const resolvePageDate = ({ frontmatter, filePathRelative, }) => {
var _a, _b;
// `frontmatter.date` could be parsed as UTC Date directly

@@ -35,3 +34,3 @@ if (frontmatter.date instanceof Date) {

if (matches) {
return (0, shared_1.formatDateString)(`${matches[1]}-${matches[2]}-${(_a = matches[3]) !== null && _a !== void 0 ? _a : '01'}`, DEFAULT_DATE);
return (0, shared_1.formatDateString)(`${matches[1]}-${matches[2]}-${matches[3] ?? '01'}`, DEFAULT_DATE);
}

@@ -43,3 +42,3 @@ }

if (matches) {
return (0, shared_1.formatDateString)(`${matches[1]}-${matches[2]}-${(_b = matches[3]) !== null && _b !== void 0 ? _b : '01'}`, DEFAULT_DATE);
return (0, shared_1.formatDateString)(`${matches[1]}-${matches[2]}-${matches[3] ?? '01'}`, DEFAULT_DATE);
}

@@ -46,0 +45,0 @@ }

@@ -10,3 +10,2 @@ "use strict";

const resolvePageFileContent = async ({ filePath, options, }) => {
var _a;
if (filePath) {

@@ -23,4 +22,4 @@ try {

// load raw content from options
return (_a = options.content) !== null && _a !== void 0 ? _a : '';
return options.content ?? '';
};
exports.resolvePageFileContent = resolvePageFileContent;

@@ -9,8 +9,7 @@ "use strict";

const resolvePageLang = ({ app, frontmatter, pathLocale, }) => {
var _a, _b;
if ((0, shared_1.isString)(frontmatter.lang) && frontmatter.lang) {
return frontmatter.lang;
}
return (_b = (_a = app.siteData.locales[pathLocale]) === null || _a === void 0 ? void 0 : _a.lang) !== null && _b !== void 0 ? _b : app.siteData.lang;
return app.siteData.locales[pathLocale]?.lang ?? app.siteData.lang;
};
exports.resolvePageLang = resolvePageLang;

@@ -10,3 +10,2 @@ "use strict";

const resolvePagePermalink = ({ frontmatter, slug, date, pathInferred, pathLocale, }) => {
var _a;
// use permalink in frontmatter directly

@@ -30,5 +29,5 @@ if ((0, shared_1.isString)(frontmatter.permalink)) {

.replace(/:slug/, slug)
.replace(/:raw/, (_a = pathInferred === null || pathInferred === void 0 ? void 0 : pathInferred.replace(/^\//, '')) !== null && _a !== void 0 ? _a : ''));
.replace(/:raw/, pathInferred?.replace(/^\//, '') ?? ''));
return (0, shared_1.ensureLeadingSlash)(link);
};
exports.resolvePagePermalink = resolvePagePermalink;

@@ -7,3 +7,3 @@ "use strict";

*/
const resolvePageRouteMeta = ({ frontmatter, }) => { var _a; return (_a = frontmatter.routeMeta) !== null && _a !== void 0 ? _a : {}; };
const resolvePageRouteMeta = ({ frontmatter, }) => frontmatter.routeMeta ?? {};
exports.resolvePageRouteMeta = resolvePageRouteMeta;

@@ -16,2 +16,3 @@ "use strict";

extendsPage: (0, createHookQueue_1.createHookQueue)('extendsPage'),
extendsBundlerOptions: (0, createHookQueue_1.createHookQueue)('extendsBundlerOptions'),
// client files hooks

@@ -18,0 +19,0 @@ clientAppEnhanceFiles: (0, createHookQueue_1.createHookQueue)('clientAppEnhanceFiles'),

@@ -62,3 +62,3 @@ import type { MarkdownLink } from '@vuepress/markdown';

*
* @see https://next.router.vuejs.org/api/#meta
* @see https://router.vuejs.org/api/#meta
*/

@@ -65,0 +65,0 @@ routeMeta: Record<string, unknown>;

@@ -29,2 +29,3 @@ import type { Markdown, MarkdownOptions } from '@vuepress/markdown';

extendsPage: ExtendsHook<Page>;
extendsBundlerOptions: ExtendsHook<any>;
clientAppEnhanceFiles: ClientFilesHook;

@@ -31,0 +32,0 @@ clientAppRootComponentFiles: ClientFilesHook;

{
"name": "@vuepress/core",
"version": "2.0.0-beta.41",
"version": "2.0.0-beta.42",
"description": "Core package of VuePress",

@@ -25,6 +25,6 @@ "keywords": [

"dependencies": {
"@vuepress/client": "2.0.0-beta.41",
"@vuepress/markdown": "2.0.0-beta.41",
"@vuepress/shared": "2.0.0-beta.41",
"@vuepress/utils": "2.0.0-beta.41",
"@vuepress/client": "2.0.0-beta.42",
"@vuepress/markdown": "2.0.0-beta.42",
"@vuepress/shared": "2.0.0-beta.42",
"@vuepress/utils": "2.0.0-beta.42",
"gray-matter": "^4.0.3",

@@ -34,5 +34,2 @@ "toml": "^3.0.0",

},
"peerDependencies": {
"vue": "^3.2.33"
},
"publishConfig": {

@@ -39,0 +36,0 @@ "access": "public"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc