You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 00f1a4d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -351,7 +351,7 @@ Docs, specs, and examples are not cleanup work for later. They are part of the f
351
351
352
352
- Keep README files, package docs, examples, and generated references consistent with the shipped behavior.
353
353
- If a change affects public API, behavior, configuration, or generated outputs, update the relevant docs and examples in the same PR.
354
-
- Significant breaking changes must add a migration guide under `docs/content/migrate/` (`/migrate` on the docs site). Explain what breaks and how to update existing code or configuration. Usage and reference pages describe the current behavior and link to the guide. Move existing upgrade instructions there rather than deleting them.
354
+
- Add migration guides only when explicitly requested. Keep replacement guidance in code deprecation annotations. Usage and reference pages describe the current API.
355
355
- Use the `humanizer` skill when writing or editing documentation.
356
356
357
357
Prefer concrete explanations over marketing language. Show the real API. Keep examples runnable.
@@ -382,9 +382,9 @@ were Zig. Every sentence of it is bloat in a place with a low budget for it.
382
382
binding crate's own doc comments, a commit message. `html_span_attrs` in
383
383
`lumis_nif`explains the call-frequency split at length, correctly — that is a
384
384
contributor's file.
385
-
- **Cross-runtime pointers are not this.** "The counterpart of `Language::guess`
386
-
in Rust and `guessLanguage()` in JavaScript" helps someone moving between the
387
-
packages Lumis publishes, and stays.
385
+
- **Keep API references specific to their runtime.** Describe the function
386
+
directly; omit comparisons to equivalent functions in other runtimes.
387
+
Cross-runtime API mappings belong in contributor documentation.
388
388
389
389
This applies to every published surface: package docs, READMEs, `usage-rules.md`,
390
390
and `docs/content/`. It came out of an ANSI helper module whose moduledoc opened
Copy file name to clipboardExpand all lines: docs/content/usage/javascript.mdx
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,8 +181,7 @@ Useful when rendering user-provided content or pasted snippets.
181
181
## Metadata APIs
182
182
183
183
Language helpers live in `@lumis-sh/lumis/languages`, and theme helpers live in
184
-
`@lumis-sh/lumis/themes`. Old root imports still work but are deprecated; see the
185
-
[module migration guide](/migrate/api-modules).
184
+
`@lumis-sh/lumis/themes`.
186
185
187
186
Useful for dropdowns, config validation, and docs tooling:
188
187
@@ -195,7 +194,7 @@ Useful for dropdowns, config validation, and docs tooling:
195
194
## Runtime notes
196
195
197
196
- every runtime loads the same per-language parser WASM; what differs is the engine that runs it
198
-
- on Node, `@lumis-sh/lumis` runs those parsers and the highlighting walk under Wasmtime in the same Rust code as the Lumis CLI and Elixir bindings; built-in formatters normally render there too, while custom formatters assemble events in JavaScript and an async call that may need a JavaScript resolver stays on the main thread
197
+
- on Node, `@lumis-sh/lumis` runs those parsers and the highlighting walk under Wasmtime; built-in formatters normally render there too, while custom formatters assemble events in JavaScript and an async call that may need a JavaScript resolver stays on the main thread
199
198
- browsers, and any platform with no prebuilt addon, run them under the host's own WebAssembly through `web-tree-sitter`, and walk and format in JavaScript
200
199
- the addon is prebuilt for macOS arm64 and x64, Linux arm64 and x64 against both glibc and musl, and Windows arm64 and x64; npm installs the one matching the host, so Alpine and other musl images get the same runtime as a glibc host
201
200
-`runtimeKind()` returns `'native'` or `'wasm'` if you need to confirm which one an install resolved
0 commit comments