Skip to content

Commit a1afdf5

Browse files
authored
Merge branch 'main' into test/smoke-tests-built-version
2 parents 114784a + bc2d42e commit a1afdf5

145 files changed

Lines changed: 6067 additions & 3207 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/rules/copyright.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
paths:
3+
- "**/*.ts"
4+
- "**/*.js"
5+
- "**/*.lua"
6+
---
7+
8+
# Copyright headers
9+
10+
New source files get a single current-year header — `Copyright (C) <year> Posit Software, PBC` (e.g. `2026`), not a back-dated `2020-<year>` range. Leave existing files' headers alone unless you're already substantially editing them.
11+
12+
Don't guess the year — read it from the system (`date +%Y`, or the current date stated at session start). Copying a header from an existing file carries a stale year.

‎.claude/rules/filters/lua-development.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@ local md = require("modules/md")
4242
import("./modules/patterns.lua")
4343
```
4444

45+
### In `import()`ed Files, Prefer the `_quarto.modules` Registry Over a Fresh `require()`
46+
47+
Files loaded via `import()` are textually concatenated into one shared Lua chunk for
48+
the packaged distribution build, so every top-level `local` they declare — including
49+
`local x = require("modules/y")` — competes for Lua's hard 200-local-per-function
50+
limit across *all* inlined files combined. Most `modules/*` are already registered
51+
in `_quarto.modules` by `modules/import_all.lua` (a single global table assignment,
52+
so it costs zero additional locals). In an `import()`ed file, reference
53+
`_quarto.modules.<name>.<fn>(...)` directly instead of adding a new top-level
54+
`local <name> = require("modules/<name>")`. This doesn't apply inside files loaded
55+
via `require()` themselves — those get their own independent chunk and aren't
56+
affected. See [llm-docs/lua-filter-bundle-local-limit.md](../../../llm-docs/lua-filter-bundle-local-limit.md)
57+
for the full mechanism and why this keeps recurring.
58+
4559
## Custom Node Patterns
4660

4761
### Walking Custom Nodes

‎.claude/rules/testing/test-anti-patterns.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ A direct `import { quarto } from "src/quarto.ts"` bypasses binary mode (`QUARTO_
3131
Never create `Project.toml`, `.venv/`, or `renv.lock` in test fixture directories.
3232

3333
**Details:** `llm-docs/testing-patterns.md` → "Shared Test Environments"
34+
35+
## Don't: `Deno.chdir()` inside the test body
36+
37+
`Deno.chdir()` mutates process-global cwd, so a test that changes it can leak into other tests in the same process. The harness already changes and restores the working directory: return the directory from `TestContext.cwd`, create fixtures in `setup`, clean up in `teardown` (examples: `tests/unit/dotenv-config.test.ts`, `tests/smoke/use/template.test.ts`). For a temp directory you don't need to run *from*, use `withTempDir` (`tests/utils.ts`). A test that only needs a *relative* input can pass a path relative to the current cwd without changing it.
38+
39+
**Details:** `llm-docs/testing-patterns.md` → "Working-Directory-Sensitive Tests"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
paths:
3+
- "tests/unit/preview-subdir-knitr-cwd.test.ts"
4+
---
5+
6+
# R unit test that changes working directory
7+
8+
This test runs a knitr subprocess with cwd set to a scratch directory
9+
(required to reproduce the bug). R's `.Rprofile` lookup is cwd-exact, so it
10+
won't pick up `tests/renv` activation there — on CI the R subprocess fails
11+
with `there is no package called 'rmarkdown'`. `setup()` writes a
12+
`.Rprofile` into the fixture dir to re-activate renv against the real
13+
`tests/` project.
14+
15+
**Details:** `llm-docs/testing-patterns.md` → "R Tests That Change Working Directory"

‎.github/workflows/update-test-timing.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,18 @@ jobs:
3131
name: timed test file
3232
path: tests/
3333

34+
- name: Generate GitHub App token
35+
id: app-token
36+
uses: actions/create-github-app-token@v2
37+
with:
38+
app-id: ${{ secrets.QUARTO_DEV_BOT_APP_ID }}
39+
private-key: ${{ secrets.QUARTO_DEV_BOT_APP_PRIVATE_KEY }}
40+
3441
- name: Create Pull Request for new tests timing
3542
id: cpr
3643
uses: peter-evans/create-pull-request@v8
3744
with:
38-
token: ${{ secrets.GITHUB_TOKEN }}
45+
token: ${{ steps.app-token.outputs.token }}
3946
add-paths: tests/timing-for-ci.txt
4047
commit-message: |
4148
timing for new tests [auto PR]

‎configuration‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
export DENO=v2.7.14
1414
# TODO figure out where 0.1.41 apple silicon libs are available
1515
export DENO_DOM=v0.1.41-alpha-artifacts
16-
export PANDOC=3.8.3
17-
export DARTSASS=1.87.0
18-
export ESBUILD=0.25.10
19-
export TYPST=0.14.2
16+
export PANDOC=3.10
17+
export DARTSASS=1.101.0
18+
export ESBUILD=0.28.1
19+
export TYPST=0.15.1
2020
export TYPST_GATHER=0.2.3
2121
export VERAPDF=1.28.2
2222

‎dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-fuchsia.qmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ _quarto:
2020
ensureTypstFileRegexMatches:
2121
-
2222
# note css fuchsia #f012be is not the same as css fuchsia #ff00ff
23-
- '\[#set text\(fill: fuchsia\); B\]'
23+
- '\[#set text\(fill: fuchsia\);\s*B\]'
2424
- []
2525
---
2626

‎dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-magenta.qmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _quarto:
1919
typst:
2020
ensureTypstFileRegexMatches:
2121
-
22-
- '\[#set text\(fill: rgb\(255, 0, 255\)\); B\]'
22+
- '\[#set text\(fill: rgb\(255, 0, 255\)\);\s*B\]'
2323
- []
2424
---
2525

‎dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-mediumseagreen.qmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ _quarto:
2020
ensureTypstFileRegexMatches:
2121

2222
-
23-
- '\[#set text\(fill: rgb\(60, 179, 113\)\); B\]'
23+
- '\[#set text\(fill: rgb\(60, 179, 113\)\);\s*B\]'
2424
- []
2525
---
2626

‎dev-docs/feature-format-matrix/qmd-files/css-properties/color/color-rgb-hex.qmd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _quarto:
1919
typst:
2020
ensureTypstFileRegexMatches:
2121
-
22-
- '\[#set text\(fill: rgb\("#000066"\)\); B\]'
22+
- '\[#set text\(fill: rgb\("#000066"\)\);\s*B\]'
2323
- []
2424
---
2525

0 commit comments

Comments
 (0)