@qualcomm-ui/mdx-vite 2.6.2 → 2.6.4
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 -7
- package/dist/cli.js.map +2 -2
- package/dist/docs-plugin/__tests__/markdown-indexer.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/remark-slug.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/remix-flat-routes.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/remix.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/utils.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/utils.spec.d.ts +2 -0
- package/dist/docs-plugin/__tests__/utils.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/vite-generouted.spec.d.ts.map +1 -0
- 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/docs-plugin/shiki/utils.d.ts.map +1 -1
- package/dist/index.js +25 -11
- package/dist/index.js.map +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +14 -14
- package/dist/docs-plugin/tests/markdown-indexer.spec.d.ts.map +0 -1
- package/dist/docs-plugin/tests/remark-slug.spec.d.ts.map +0 -1
- package/dist/docs-plugin/tests/remix-flat-routes.spec.d.ts.map +0 -1
- package/dist/docs-plugin/tests/remix.spec.d.ts.map +0 -1
- package/dist/docs-plugin/tests/utils.d.ts.map +0 -1
- package/dist/docs-plugin/tests/vite-generouted.spec.d.ts.map +0 -1
- /package/dist/docs-plugin/{tests → __tests__}/markdown-indexer.spec.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/remark-slug.spec.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/remix-flat-routes.spec.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/remix.spec.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/utils.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/vite-generouted.spec.d.ts +0 -0
package/dist/cli.js
CHANGED
|
@@ -3983,7 +3983,9 @@ var MarkdownFileReader = class {
|
|
|
3983
3983
|
console.debug(`- ${issue.path.join(".")}`);
|
|
3984
3984
|
});
|
|
3985
3985
|
}
|
|
3986
|
-
|
|
3986
|
+
const existingCache = this.mdxCache[filepath];
|
|
3987
|
+
const shouldFetchGitMetadata = !this.enabled || !existingCache;
|
|
3988
|
+
if (shouldFetchGitMetadata) {
|
|
3987
3989
|
const gitMetadata = getGitMetadata(filepath, this.pageTimestampMetadata);
|
|
3988
3990
|
if (!frontmatter.updatedOn && gitMetadata.updatedOn) {
|
|
3989
3991
|
frontmatter.updatedOn = gitMetadata.updatedOn;
|
|
@@ -3991,6 +3993,13 @@ var MarkdownFileReader = class {
|
|
|
3991
3993
|
if (!frontmatter.updatedBy && gitMetadata.updatedBy) {
|
|
3992
3994
|
frontmatter.updatedBy = gitMetadata.updatedBy;
|
|
3993
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
|
+
}
|
|
3994
4003
|
}
|
|
3995
4004
|
return { cached, fileContents, frontmatter };
|
|
3996
4005
|
}
|
|
@@ -5089,12 +5098,14 @@ var SearchIndexer = class {
|
|
|
5089
5098
|
if (docPropSections.length) {
|
|
5090
5099
|
this._pageDocProps[defaultSection.pathname] = docProps;
|
|
5091
5100
|
}
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5101
|
+
if (!cached) {
|
|
5102
|
+
this.fileCache.updateCache(filePath, fileContents, {
|
|
5103
|
+
frontmatter,
|
|
5104
|
+
page: indexedPage,
|
|
5105
|
+
pageDocProps: docProps,
|
|
5106
|
+
pageDocPropSections: docPropSections
|
|
5107
|
+
});
|
|
5108
|
+
}
|
|
5098
5109
|
if (frontmatter.hideFromSearch) {
|
|
5099
5110
|
return { metadata, pageSections: [defaultSection] };
|
|
5100
5111
|
}
|