Skip to content

Commit

Permalink
Update Quartz to 9cefcd0 (#99)
Browse files Browse the repository at this point in the history
* feat(markdown): Roam Research flavour (#985)

* feat: Roam Research flavor markdown

* docs: Roam Research transformer

* use markdownPlugins

* fix roam matching

* cleanup: Roam Plugin

---------

Co-authored-by: Matt Vogel <>

* chore(deps): bump pixi.js from 8.3.3 to 8.3.4 (#1394)

Bumps [pixi.js](https://github.com/pixijs/pixijs) from 8.3.3 to 8.3.4.
- [Release notes](https://github.com/pixijs/pixijs/releases)
- [Commits](pixijs/pixijs@v8.3.3...v8.3.4)

---
updated-dependencies:
- dependency-name: pixi.js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/node from 22.5.0 to 22.5.4 (#1403)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.0 to 22.5.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump hast-util-to-html from 9.0.1 to 9.0.2 (#1393)

Bumps [hast-util-to-html](https://github.com/syntax-tree/hast-util-to-html) from 9.0.1 to 9.0.2.
- [Release notes](https://github.com/syntax-tree/hast-util-to-html/releases)
- [Commits](syntax-tree/hast-util-to-html@9.0.1...9.0.2)

---
updated-dependencies:
- dependency-name: hast-util-to-html
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump tsx from 4.18.0 to 4.19.0 (#1391)

Bumps [tsx](https://github.com/privatenumber/tsx) from 4.18.0 to 4.19.0.
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](privatenumber/tsx@v4.18.0...v4.19.0)

---
updated-dependencies:
- dependency-name: tsx
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: fix roam research docs

* chore(deps): bump preact-render-to-string from 6.5.9 to 6.5.10 (#1390)

Bumps [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) from 6.5.9 to 6.5.10.
- [Release notes](https://github.com/preactjs/preact-render-to-string/releases)
- [Changelog](https://github.com/preactjs/preact-render-to-string/blob/main/CHANGELOG.md)
- [Commits](preactjs/preact-render-to-string@v6.5.9...v6.5.10)

---
updated-dependencies:
- dependency-name: preact-render-to-string
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: constrain link icon size (#1409)

* MMW: remove Quartz Docs

Remove Roam Research docs

* fix: account for subtags in numerical tags (closes #1408) (#1410)

* perf: have more than 1ms granularity for rebuild detection

* docs: clarify prod hosting

* Add alexanderweichart.de to showcase.md (#1378)

Added my own website ^^

Co-authored-by: Jacky Zhao <[email protected]>

* perf: eagerly compute explorer nodes to avoid re-render in memoized value

* chore(deps): bump vfile from 6.0.2 to 6.0.3 (#1421)

Bumps [vfile](https://github.com/vfile/vfile) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/vfile/vfile/releases)
- [Changelog](https://github.com/vfile/vfile/blob/main/changelog.md)
- [Commits](vfile/vfile@6.0.2...6.0.3)

---
updated-dependencies:
- dependency-name: vfile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/node from 22.5.4 to 22.5.5 (#1420)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.4 to 22.5.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump preact from 10.23.2 to 10.24.0 (#1419)

Bumps [preact](https://github.com/preactjs/preact) from 10.23.2 to 10.24.0.
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](preactjs/preact@10.23.2...10.24.0)

---
updated-dependencies:
- dependency-name: preact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump typescript from 5.5.4 to 5.6.2 (#1418)

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4 to 5.6.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.5.4...v5.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump preact-render-to-string from 6.5.10 to 6.5.11 (#1417)

Bumps [preact-render-to-string](https://github.com/preactjs/preact-render-to-string) from 6.5.10 to 6.5.11.
- [Release notes](https://github.com/preactjs/preact-render-to-string/releases)
- [Changelog](https://github.com/preactjs/preact-render-to-string/blob/main/CHANGELOG.md)
- [Commits](preactjs/preact-render-to-string@v6.5.10...v6.5.11)

---
updated-dependencies:
- dependency-name: preact-render-to-string
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update cabin url (#1428)

* Revert "perf: eagerly compute explorer nodes to avoid re-render in memoized value"

This reverts commit 16a9caa555a2d63b7ff8af0731fbfd3231d6225c.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Matt Vogel <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacky Zhao <[email protected]>
Co-authored-by: bfahrenfort <[email protected]>
Co-authored-by: Emile Bangma <[email protected]>
Co-authored-by: Alexander Weichart <[email protected]>
Co-authored-by: Gustavo de Paula <[email protected]>
  • Loading branch information
8 people authored Sep 21, 2024
1 parent a2a3a32 commit 10d6eb8
Show file tree
Hide file tree
Showing 8 changed files with 281 additions and 56 deletions.
67 changes: 32 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"github-slugger": "^2.0.0",
"globby": "^14.0.2",
"gray-matter": "^4.0.3",
"hast-util-to-html": "^9.0.1",
"hast-util-to-html": "^9.0.2",
"hast-util-to-jsx-runtime": "^2.3.0",
"hast-util-to-string": "^3.0.0",
"is-absolute-url": "^4.0.1",
Expand All @@ -59,9 +59,9 @@
"mdast-util-to-hast": "^13.2.0",
"mdast-util-to-string": "^4.0.0",
"micromorph": "^0.4.5",
"pixi.js": "^8.3.3",
"preact": "^10.23.2",
"preact-render-to-string": "^6.5.9",
"pixi.js": "^8.3.4",
"preact": "^10.24.0",
"preact-render-to-string": "^6.5.11",
"pretty-bytes": "^6.1.1",
"pretty-time": "^1.1.0",
"reading-time": "^1.5.0",
Expand Down Expand Up @@ -89,7 +89,7 @@
"toml": "^3.0.0",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.2",
"vfile": "^6.0.3",
"workerpool": "^9.1.3",
"ws": "^8.18.0",
"yargs": "^17.7.2"
Expand All @@ -99,14 +99,14 @@
"@types/d3": "^7.4.3",
"@types/hast": "^3.0.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22.5.0",
"@types/node": "^22.5.5",
"@types/pretty-time": "^1.1.5",
"@types/source-map-support": "^0.5.10",
"@types/ws": "^8.5.12",
"@types/yargs": "^17.0.33",
"esbuild": "^0.19.9",
"prettier": "^3.3.3",
"tsx": "^4.18.0",
"typescript": "^5.5.4"
"tsx": "^4.19.0",
"typescript": "^5.6.2"
}
}
22 changes: 12 additions & 10 deletions quartz/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type BuildData = {
type FileEvent = "add" | "change" | "delete"

function newBuildId() {
return new Date().toISOString()
return Math.random().toString(36).substring(2, 8)
}

async function buildQuartz(argv: Argv, mut: Mutex, clientRefresh: () => void) {
Expand Down Expand Up @@ -162,17 +162,19 @@ async function partialRebuildFromEntrypoint(
return
}

const buildStart = new Date().getTime()
buildData.lastBuildMs = buildStart
const buildId = newBuildId()
ctx.buildId = buildId
buildData.lastBuildMs = new Date().getTime()
const release = await mut.acquire()
if (buildData.lastBuildMs > buildStart) {

// if there's another build after us, release and let them do it
if (ctx.buildId !== buildId) {
release()
return
}

const perf = new PerfTimer()
console.log(chalk.yellow("Detected change, rebuilding..."))
ctx.buildId = newBuildId()

// UPDATE DEP GRAPH
const fp = joinSegments(argv.directory, toPosixPath(filepath)) as FilePath
Expand Down Expand Up @@ -357,19 +359,19 @@ async function rebuildFromEntrypoint(
toRemove.add(filePath)
}

const buildStart = new Date().getTime()
buildData.lastBuildMs = buildStart
const buildId = newBuildId()
ctx.buildId = buildId
buildData.lastBuildMs = new Date().getTime()
const release = await mut.acquire()

// there's another build after us, release and let them do it
if (buildData.lastBuildMs > buildStart) {
if (ctx.buildId !== buildId) {
release()
return
}

const perf = new PerfTimer()
console.log(chalk.yellow("Detected change, rebuilding..."))
ctx.buildId = newBuildId()

try {
const filesToRebuild = [...toRebuild].filter((fp) => !toRemove.has(fp))
Expand Down Expand Up @@ -405,10 +407,10 @@ async function rebuildFromEntrypoint(
}
}

release()
clientRefresh()
toRebuild.clear()
toRemove.clear()
release()
}

export default async (argv: Argv, mut: Mutex, clientRefresh: () => void) => {
Expand Down
2 changes: 1 addition & 1 deletion quartz/plugins/emitters/componentResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function addGlobalPageResources(ctx: BuildCtx, componentResources: ComponentReso
} else if (cfg.analytics?.provider === "cabin") {
componentResources.afterDOMLoaded.push(`
const cabinScript = document.createElement("script")
cabinScript.src = "${cfg.analytics.host ?? "https://scripts.cabin.dev"}/cabin.js"
cabinScript.src = "${cfg.analytics.host ?? "https://scripts.withcabin.com"}/hello.js"
cabinScript.defer = true
cabinScript.async = true
document.head.appendChild(cabinScript)
Expand Down
1 change: 1 addition & 0 deletions quartz/plugins/transformers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ export { SyntaxHighlighting } from "./syntax"
export { TableOfContents } from "./toc"
export { TableOfContents2 } from "./toc2"
export { HardLineBreaks } from "./linebreaks"
export { RoamFlavoredMarkdown } from "./roam"
1 change: 1 addition & 0 deletions quartz/plugins/transformers/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options>> = (userOpts)
properties: {
"aria-hidden": "true",
class: "external-icon",
style: "max-width:0.8em;max-height:0.8em",
viewBox: "0 0 512 512",
},
children: [
Expand Down
4 changes: 2 additions & 2 deletions quartz/plugins/transformers/ofm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>>
replacements.push([
tagRegex,
(_value: string, tag: string) => {
// Check if the tag only includes numbers
if (/^\d+$/.test(tag)) {
// Check if the tag only includes numbers and slashes
if (/^[\/\d]+$/.test(tag)) {
return false
}

Expand Down
Loading

0 comments on commit 10d6eb8

Please sign in to comment.