0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
Commit graph

282 commits

Author SHA1 Message Date
Houston (Bot)
f7d6254f8f
[ci] release (#10603)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-02 15:46:43 +08:00
Bjorn Lu
2cf116f80c
Remove deprecated APIs from @astrojs/markdown-remark (#10629)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-04-01 22:53:54 +08:00
James Garbutt
374efcdff9
Lazy loaded shiki languages during syntax highlighting (#10618) 2024-04-01 22:52:50 +08:00
Houston (Bot)
bb7707e171
[ci] release (#10556)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-26 17:24:02 -04:00
Kyle Nguyen
c585528f44
fix: use Shiki's isSpecialLang to allow ansi codeblocks (#10540)
* fix: use `isSpecialLang` instead of hardcode

Hardcoding this value makes it impossible to use Shiki's `ansi` feature

* Add changeset
2024-03-25 15:44:08 -04:00
Houston (Bot)
fdceed5889
[ci] release (#10503)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-20 20:46:06 +05:30
Bjorn Lu
19e42c3681
Pass meta to shiki transformers (#10494) 2024-03-20 19:15:07 +08:00
Emanuele Stoppa
dfd146f591
Revert "[ci] format" (#10417)
* Revert "[ci] format"

This reverts commit 1863727215.

* pin dependency

* update lock
2024-03-13 09:55:24 +00:00
Houston (Bot)
1863727215 [ci] format 2024-03-13 05:53:52 +00:00
Houston (Bot)
0e074fb390
[ci] release (#10365)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-11 10:25:30 +00:00
Bjorn Lu
d9336668e5 [ci] format 2024-03-08 13:04:14 +00:00
StandardGage
c081adf998
Allow Code Component to have custom props and extra class styles (#9960)
* Create simple react element if element has no children

* Fix for when element has text

* add changeset

* Add additionalProps to Code component and ShikiHighlighter.highlight()

* Add changeset

* Create simple react element if element has no children

* Fix for when element has text

* add changeset

* Add additionalProps to Code component and ShikiHighlighter.highlight()

* Add changeset

* reverted accidental changes

* remove unnecessary parts

* Add HTMLAttributes type to additionalProps

* Update .changeset/calm-bags-deliver.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

* extend HTMLAtts instead

* add suggestions

* feat: address reviews

* chore: remove empty line

* feat: move attributes to options

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-03-08 13:02:53 +00:00
Erika
c7edb22b4b [ci] format 2024-03-08 10:58:49 +00:00
Remco Haszing
a31bbd7ff8
fix(markdown): don’t generate mdast html nodes (#10104)
* fix(markdown): don’t generate mdast html nodes

`html` nodes from mdast are converted to `raw` hast nodes. These nodes
are then not processed by proper rehype plugins. Typically if a remark
plugin generates `html` nodes, this indicates it should have actually
been a rehype plugin.

This changes the remark plugins that generate `html` nodes into rehype
nodes. These were `remarkPrism` and `remarkShiki`.

Closes #9909

* Apply suggestions from code review

* refactor(mdx): move user defined rehype plugins after syntax highlighting

* fix(mdx): fix issue in mdx rehype plugin ordering

* docs: explain why html/raw nodes are avoided in changeset

This also includes some hints on what users could do to upgrade of they
rely on these nodes.

* Fix MDX rehype plugin ordering

* refactor(remark): restore remarkPrism and remarkShiki

They aren’t used anymore, but removing would be a breaking change.

* chore: mark deprecated

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/thirty-beds-smoke.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08 10:53:39 +00:00
Bjorn Lu
5a9528741f
Move to shiki and stabilize dual themes support (#10130)
* Update to shiki

* Stabilize shikiConfig.experimentalThemes

* Add changeset

* Fix merge issues
2024-03-08 10:53:19 +00:00
Emanuele Stoppa
2dd00a0024
chore: import sort source code, exception for the astro package (#10242)
* chore: import sort source code, exception for the `astro` package

* fix import sorting bug

* Update packages/integrations/lit/server.js

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-02-27 11:15:27 +00:00
Emanuele Stoppa
062623438b
chore: use biome to sort imports - only test files (#10180)
* chore: use biome to sort imports

* do the sorting

* Update package.json

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-02-21 14:08:19 +00:00
Emanuele Stoppa
ddf0f924b5
chore: move nodetest.js to test.js (#10142)
* chore: move `nodetest.js` to `test.js`

* chore: move `nodetest.js` to `test.js`

* remove script
2024-02-16 16:20:49 +00:00
ktym4a
5ff288f61b
chore: Change strictEqual to equal (#10140) 2024-02-16 11:41:16 +00:00
Marawan Mohamed
dac759798c
Fix and update shikiji core (#10063)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-02-12 21:26:25 +08:00
Shoaib Khan
2dbb6a3e08
chore: Migrate All packages/markdown/remark/tests to node:test (#10083)
* chore: Migrate All packages/markdown/remark/tests to node:test

* Some minor fixes
2024-02-12 12:25:29 +00:00
Bjorn Lu
436841e97e
Use eslint-plugin-regexp (#9993) 2024-02-07 20:43:19 +08:00
Houston (Bot)
3a50cbf6ed
[ci] release (#9843)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-30 15:41:06 +00:00
ktym4a
44c957f893
Fix a bug that Japanese files were not displayed correctly. (#9866)
* Fix: Fix a bug that Japanese files were not displayed correctly.

* chore: generate change description

* Update .changeset/cool-colts-watch.md

* add test case for non-UTF-8 file name

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-01-29 16:42:44 +00:00
Houston (Bot)
2b5f1d6be8
[ci] release (#9728)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-22 15:11:07 -05:00
Degreat
2f81cffa9d
normalize class property (#9723)
* normalize class property

* Add changeset

* properly type return value

* normalize styles, rename function

* properly describe change

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-22 20:00:00 +00:00
Bjorn Lu
d0742bcfda [ci] format 2024-01-20 11:00:50 +00:00
Bjorn Lu
a505190933
Make @astrojs/markdown-remark browser-safe (#9738) 2024-01-20 18:59:40 +08:00
Bjorn Lu
53c69dcc82
Fix @astrojs/markdown-remark bundling for non-node runtimes (#9736) 2024-01-19 22:38:33 +08:00
Houston (Bot)
2292d0b580
[ci] release (#9709)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-18 10:30:19 +00:00
Oliver Speir
bc2edd4339 [ci] format 2024-01-17 13:14:53 +00:00
Oliver Speir
165cfc154b
Allow remark plugins to affect getImage call for .md files (#9566)
* pass hProperties to getImage for optimized imgs

* fix to allow multiple images to have hProps added

* update test to reflect new expected result

* add comment back in

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>

* add srcset

* works on multiple images

* fix tests, fix images.ts type and remove console logs

* add warning back to images.ts again lol

* update changeset to be user oriented

* Update calm-socks-shake.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* pass alt through getImage

* added fixture and test

* update lockfile

* fix lockfile again (had installed an extra package during testing and had sharp33 installed)

* update test to reflect passing alt through getImage

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:13:31 +00:00
Degreat
e9a72d9a91
Bump shikiji, use transformers API, expose transformers API (#9643)
* Bump shikiji, use transformers API, expose transformers API

* update astro config schema

* include shikiji-core

* Use default import

* address css-variables theme

* Remove shikiji markdoc

* Improve schema transformers handling

* Fix tests

* Update changeset

* bump shikiji version

* Update .changeset/six-scissors-worry.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update wording

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:13:05 +00:00
Houston (Bot)
f47b85ce6f
[ci] release (#9365)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-11 11:57:19 +00:00
Arsh
270c6cc27f
chore: markdown-remark peerDependencies (#9349) 2023-12-07 23:04:48 +08:00
Houston (Bot)
5f13e7e0dc
[ci] release (#9307)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-12-05 09:39:16 -04:00
Houston (Bot)
415fec54f8
[ci] release (beta) (#9114)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-27 12:59:31 -05:00
Bjorn Lu
153a5abb90
Remove deprecated features from Astro 3.0 (#9168) 2023-11-28 00:44:20 +08:00
Bjorn Lu
c7953645ee
Remove deprecated markdown-remark APIs (#9182) 2023-11-28 00:32:39 +08:00
Bjorn Lu
addb57c8e8
Fix RemarkRehype types (#9147) 2023-11-22 11:17:29 +08:00
Bjorn Lu
abf601233f
Update all dependencies (#9138)
Co-authored-by: delucis <delucis@users.noreply.github.com>
2023-11-21 12:09:19 +08:00
Houston (Bot)
e63aac94ca
[ci] release (#9078)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-14 23:20:35 +08:00
bluwy
0aee43fc16 [ci] format 2023-11-14 15:01:58 +00:00
Bjorn Lu
4537ecf0d0
Refactor shikiji syntax highlighting code (#9083) 2023-11-14 23:00:17 +08:00
Houston (Bot)
83c8870684
[ci] release (#9021)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-09 12:49:35 -05:00
horo
c5010aad34
Light/dark theming for shikiji's codeblocks (#8903)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-11-08 22:42:05 +08:00
Bjorn Lu
c8976440ff
Prevent bumping peer deps (#8893) 2023-10-26 18:07:02 +08:00
Houston (Bot)
6bb69305c9
[ci] release (#8796)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-12 09:43:24 -05:00
Bjorn Lu
c4270e4768
Use shikiji (#8502)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-10-12 00:07:06 +08:00
Houston (Bot)
584d6f0680
[ci] release (#8738)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-05 11:10:06 +01:00