| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: add markdown processor abstraction (#16848) Co-authored-by: Armand Philippot <git@armand.philippot.eu> | 4 个月前 | |
chore: add more lint rules (#15553) * chore: add more lint rules * suppress pattern | 7 个月前 | |
[ci] format | 3 年前 | |
refactor(assets): remove globalThis.astroAsset image tracking (#18177) * refactor(assets): remove globalThis.astroAsset image tracking * refactor(assets): trim comments * refactor(assets): use fileExtension from internal-helpers * refactor(assets): address review feedback * chore: bump markdoc changeset to minor * refactor(assets): reduce diff against main * refactor(assets): restore StaticImageRegistry * test: fix incremental prerenderer metadata test and lint * refactor(assets): decouple static image mode from the render scope and drop generateImages * refactor(assets): report getStaticPaths images from getStaticPaths * refactor(cloudflare): mention images in the missing AsyncLocalStorage warning * refactor(assets): derive static image mode from collection and drop the ambient store - Remove setStaticImageConfig(); the static image layout rides on the astro:assets imageConfig and getImage() only resolves build-time URLs while a render collects them - Collect getStaticPaths() images through StaticPaths.getAllWithMetadata() instead of an ambient store, and add a staticImages option to opt out - Load the image service only through prerenderer.getImageService(), dropping the createRequire fallback - Clear the route cache when the default prerenderer is set up, so a repeated build in the same process recomputes getStaticPaths() and collects its images - Cloudflare: always install AsyncLocalStorage and drop the static image config plumbing - Re-export recordStaticImage() as deprecated for older adapter bundles * refactor: inline single-use static paths and dedupe helpers * feat(prerender): deprecate bare prerenderer returns and warn when a wrapper drops image metadata * chore: drop dropped-metadata warning and simplify changesets * chore: remove DefaultAstroPrerenderer type * chore: split Cloudflare changesets * Delete .changeset/neat-geese-keep.md * Apply suggestion from @Princesseuh * Update quiet-images-travel.md * fix(assets): generate images resolved outside of a render during the build * feat(assets): support separate build and runtime image services Replaces the getImageService() prerenderer hook. image.service accepts { build, runtime }; prerendered pages use the build service for every hook and to generate images, while on-demand pages and /_image use the runtime one. The Cloudflare adapter now sets image.service itself instead of providing the build service through its prerenderer. * fix(assets): load the build image service with Vite when the prerender bundle can't run in Node * test(assets): cover separate build and runtime image services and add changesets * Apply suggestion from @Princesseuh * fix(assets): import package build image services directly in Node instead of through runnerImport * feat(assets): use the build image service in dev * fix(cloudflare): handle configs without an image service in config:setup * fix(assets): bundle the build image service into its own chunk for the default prerenderer * chore: combine cloudflare changesets * chore: reword cloudflare changeset * Apply suggestion from @Princesseuh * chore: drop undocumented APIs from changeset * Apply suggestion from @Princesseuh * fix(assets): import package build image services directly so their dependencies resolve from the package * fix(assets): build the build image service in its own Vite environment Load the build image service the same way for every adapter: a build-only `astroImageService` Vite environment bundles it for Node, using the project's plugins and aliases while leaving dependencies like sharp external. It's only built when there are images to generate. This replaces the prerender chunk and the package-first lookup, which broke for wrapping prerenderers and resolved packages with the `require` condition before importing them as ESM. Also: - Keep `image.service.config` when an integration sets `{ build, runtime }` - Make the prerenderer changeset example type-check - Clean up stale comments, duplicate tests and the unused `internals.referencedImages` default * Apply suggestion from @Princesseuh * fix(assets): run the build image service in the image service environment The `astroImageService` environment wasn't treated as a server environment, so `virtual:image-service` resolved to the noop service and prerendered images were copied untransformed. Packages are now kept external in that environment (even linked ones), so their dependencies such as `sharp` resolve from the package; a virtual entry re-exports the service since an entry can't be external. Also resolve `image.service` as written: either one service or `{ build, runtime }`, read through `getImageServiceConfig()`. This removes `normalizeImageServiceInput` and the renormalising after `updateConfig()`; an integration setting the other shape replaces the service instead of being merged into it. The Cloudflare adapter writes `{ build, runtime }` directly and no longer needs `useIntegrationImageService`. * fix(cloudflare): handle a config without an image service in setImageConfig * refactor: trim verbose comments Shortened multi-line comments to one-line "why" explanations, removed comments that restated code or names, and fixed a stale comment in Cloudflare's index.ts. Public API docs in types/ trimmed but preserved. 29 files, +40/-155 lines * refactor: remove redundant comment on addStaticImages * refactor: remove useless one-line comments * Apply suggestion from @Princesseuh * refactor: remove verbose comments that restate code - Remove comments describing what variables are assigned (Rolldown path, finalOriginalPath) - Remove 3-line URL formatting comment that just describes what the code does - Remove design note on createImageAsset that doesn't explain the function * refactor: remove confusing TargetImageConfig type Use ReturnType<typeof getImageConfigFor> instead of exporting a helper type with an opaque name. * refactor: remove getImageConfigFor wrapper It was just `{ ...image, service: getImageServiceConfig(...) }`. Callers now do this inline. The type ImageConfigWithSingleService is kept for annotations. * refactor: use ImageServiceConfig and ImageServiceTargets directly Instead of defining local type aliases for the union and the extracted single service, just import and use the public types directly. Makes it clearer what the types are. * refactor: remove ImageConfigWithSingleService type alias Just inline it where needed using ReturnType<typeof getImageServiceConfig>. The type alias wasn't adding much value - it was just hiding a straightforward Omit + intersection type. * refactor: reuse the image service ImageConfig type * Apply suggestion from @ArmandPhilippot Co-authored-by: Armand Philippot <git@armand.philippot.eu> * docs: address review feedback on image service and prerenderer docs * docs: trim prerenderer changeset * docs: remove integration notes from image.service JSDoc --------- Co-authored-by: Armand Philippot <git@armand.philippot.eu> | 3 天前 | |
feat!: stabilize experimental.headingIdCompat (#14494) Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> | 11 个月前 | |
chore: upgrade to Biome v2 (#13984) | 1 年前 | |
Replace esbuild with Vite and Rolldown APIs (#18263) | 9 天前 | |
feat(markdoc): Support markdown-it's typographer option (#11450) * Support markdoc-it's typographer option in markdoc * Update .changeset/forty-scissors-jog.md [skip ci] * Update .changeset/forty-scissors-jog.md [skip ci] * Fix typo in changeset --------- Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> | 2 年前 | |
[ci] format | 2 年前 | |
Fix `this` context in Markdoc custom `transform` functions (#17460) * fix(markdoc): use reference equality instead of string matching for transform render check\n\nThe `transformRespectsRender` function used string-based source inspection to\ndecide whether to preserve or delete a transform function when a custom `render`\ncomponent is specified. This incorrectly deleted user-written transforms (e.g.,\nthose using `this.render`) because they didn't contain the specific Astro\ninternal pattern `config.nodes?.X?.render`.\n\nReplaced with `isBuiltinMarkdocTransform` which uses reference equality against\n`Markdoc.nodes` and `Markdoc.tags` built-in transforms. Only built-in Markdoc\ntransforms are removed; user-written and Astro's own transforms are preserved.\n\nFixes #17458" * Add changeset for markdoc transform fix * Fix lint: replace Function type with explicit function signature --------- Co-authored-by: Matthew Phillips <matthew@matthewphillips.info> | 2 个月前 | |
[ci] format | 2 年前 | |
Spelling (#15601) * spelling: ; otherwise, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: "..." Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a new Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a special Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: accessed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: adapter Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: all bugs Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: also need to Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: an Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: and Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: astro Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: attributes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: audited Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: available Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: baked Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: best-effort Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: build, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: caches Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: can Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case. Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cause Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: centauri Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: chevron Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cloudflare Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: committed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: components Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: condition to Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: config Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: consistently Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: convoluted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: could not Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: desperately Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: devtoolbar Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: ensure Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: entrypoint Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: equals Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: example -- use rfc6761 domain Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: exist Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: external Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: failure Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: fall back Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: flexible Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: frontmatter Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: has no Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: highlighting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: image Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: implicitly Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: import, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: impractical Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: include Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: incorrect Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: infrastructure Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: initialization Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: issue Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: its Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: javascript Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: labelable Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: loaded Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: long and short Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: lorem Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: lowercase Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: maintenance Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: malformed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: markdown Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: middleware Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: mistaken Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: necessary Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: neither-nor Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: occurred Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: occurrences Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: of Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: open graph Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: optimized Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: otherwise, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: out-of-date Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: overridden Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: packages Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: parsed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: past, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: performance Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: plugin Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: pre-text Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: preexisting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: prerendered Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: project Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: punctuation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: re-export Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: redirects Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: registries Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: rehype Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: replacements Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: resolved Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: safeguard Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: serverless Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: set up Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: significantly Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: solely Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: some Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: stylesheet Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: surname Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: that is Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: that Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: the github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: to be Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: to take effect Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: transitions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: typescript Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: unnecessary Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: uppercase Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: use case Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: user's requested...to Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: whether or not Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: with Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: work around Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: workaround Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: your Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Armand Philippot <59021693+ArmandPhilippot@users.noreply.github.com> | 7 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 个月前 | ||
| 7 个月前 | ||
| 3 年前 | ||
| 3 天前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 9 天前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 个月前 | ||
| 2 年前 | ||
| 7 个月前 |