@qualcomm-ui/mdx-vite 2.6.1 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +18 -8
- package/dist/cli.js.map +2 -2
- package/dist/docs-plugin/internal/search-indexer.d.ts.map +1 -1
- package/dist/docs-plugin/internal/services/markdown/markdown-file-reader.d.ts.map +1 -1
- package/dist/index.js +18 -8
- package/dist/index.js.map +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +15 -15
package/dist/cli.js
CHANGED
|
@@ -3898,7 +3898,6 @@ function getGitMetadata(filePath, mode) {
|
|
|
3898
3898
|
const result = execSync(
|
|
3899
3899
|
`git log -1 --format=${format} -- "${relativePath}"`,
|
|
3900
3900
|
{
|
|
3901
|
-
cwd: repoRoot,
|
|
3902
3901
|
encoding: "utf-8",
|
|
3903
3902
|
stdio: ["pipe", "pipe", "pipe"]
|
|
3904
3903
|
}
|
|
@@ -3984,7 +3983,9 @@ var MarkdownFileReader = class {
|
|
|
3984
3983
|
console.debug(`- ${issue.path.join(".")}`);
|
|
3985
3984
|
});
|
|
3986
3985
|
}
|
|
3987
|
-
|
|
3986
|
+
const existingCache = this.mdxCache[filepath];
|
|
3987
|
+
const shouldFetchGitMetadata = !this.enabled || !existingCache;
|
|
3988
|
+
if (shouldFetchGitMetadata) {
|
|
3988
3989
|
const gitMetadata = getGitMetadata(filepath, this.pageTimestampMetadata);
|
|
3989
3990
|
if (!frontmatter.updatedOn && gitMetadata.updatedOn) {
|
|
3990
3991
|
frontmatter.updatedOn = gitMetadata.updatedOn;
|
|
@@ -3992,6 +3993,13 @@ var MarkdownFileReader = class {
|
|
|
3992
3993
|
if (!frontmatter.updatedBy && gitMetadata.updatedBy) {
|
|
3993
3994
|
frontmatter.updatedBy = gitMetadata.updatedBy;
|
|
3994
3995
|
}
|
|
3996
|
+
} else if (!cached && existingCache) {
|
|
3997
|
+
if (!frontmatter.updatedOn && existingCache.frontmatter.updatedOn) {
|
|
3998
|
+
frontmatter.updatedOn = existingCache.frontmatter.updatedOn;
|
|
3999
|
+
}
|
|
4000
|
+
if (!frontmatter.updatedBy && existingCache.frontmatter.updatedBy) {
|
|
4001
|
+
frontmatter.updatedBy = existingCache.frontmatter.updatedBy;
|
|
4002
|
+
}
|
|
3995
4003
|
}
|
|
3996
4004
|
return { cached, fileContents, frontmatter };
|
|
3997
4005
|
}
|
|
@@ -5090,12 +5098,14 @@ var SearchIndexer = class {
|
|
|
5090
5098
|
if (docPropSections.length) {
|
|
5091
5099
|
this._pageDocProps[defaultSection.pathname] = docProps;
|
|
5092
5100
|
}
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5101
|
+
if (!cached) {
|
|
5102
|
+
this.fileCache.updateCache(filePath, fileContents, {
|
|
5103
|
+
frontmatter,
|
|
5104
|
+
page: indexedPage,
|
|
5105
|
+
pageDocProps: docProps,
|
|
5106
|
+
pageDocPropSections: docPropSections
|
|
5107
|
+
});
|
|
5108
|
+
}
|
|
5099
5109
|
if (frontmatter.hideFromSearch) {
|
|
5100
5110
|
return { metadata, pageSections: [defaultSection] };
|
|
5101
5111
|
}
|