Repository navigation
chore: upgrade deps #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: upgrade deps #608
Changes from all commits
599ef70
ec8ebbd
5598600
4a99667
602f12e
bf2d1a4
ab281fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { bench, describe } from 'vitest' | ||
| import { test } from 'vitest' | ||
| import { createMarkdownParser } from 'comark' | ||
| import { renderMarkdown } from 'comark/render' | ||
| import { renderAnsiFromDocument } from '@comark/ansi' | ||
|
|
@@ -19,59 +19,59 @@ await renderHtmlFromDocument(mediumDocument) | |
| await renderAnsiFromDocument(mediumDocument, ansiOptions) | ||
| await renderMarkdown(mediumDocument) | ||
|
|
||
| describe('render html', () => { | ||
| bench('small document', async () => { | ||
| await renderHtmlFromDocument(smallDocument) | ||
| }) | ||
|
|
||
| bench('medium document', async () => { | ||
| await renderHtmlFromDocument(mediumDocument) | ||
| }) | ||
|
|
||
| bench('large document', async () => { | ||
| await renderHtmlFromDocument(largeDocument) | ||
| }) | ||
|
|
||
| bench('component-heavy document', async () => { | ||
| await renderHtmlFromDocument(componentDocument) | ||
| }) | ||
| test('render html', async ({ bench }) => { | ||
| await bench.compare( | ||
| bench('small document', async () => { | ||
| await renderHtmlFromDocument(smallDocument) | ||
| }), | ||
| bench('medium document', async () => { | ||
| await renderHtmlFromDocument(mediumDocument) | ||
| }), | ||
| bench('large document', async () => { | ||
| await renderHtmlFromDocument(largeDocument) | ||
| }), | ||
| bench('component-heavy document', async () => { | ||
| await renderHtmlFromDocument(componentDocument) | ||
| }) | ||
| ) | ||
| }) | ||
|
|
||
| describe('render ansi', () => { | ||
| bench('medium document', async () => { | ||
| await renderAnsiFromDocument(mediumDocument, ansiOptions) | ||
| }) | ||
|
|
||
| bench('large document', async () => { | ||
| await renderAnsiFromDocument(largeDocument, ansiOptions) | ||
| }) | ||
| test('render ansi', async ({ bench }) => { | ||
| await bench.compare( | ||
| bench('medium document', async () => { | ||
| await renderAnsiFromDocument(mediumDocument, ansiOptions) | ||
| }), | ||
| bench('large document', async () => { | ||
| await renderAnsiFromDocument(largeDocument, ansiOptions) | ||
| }) | ||
| ) | ||
| }) | ||
|
|
||
| describe('render markdown', () => { | ||
| bench('medium document', async () => { | ||
| await renderMarkdown(mediumDocument) | ||
| }) | ||
|
|
||
| bench('large document', async () => { | ||
| await renderMarkdown(largeDocument) | ||
| }) | ||
|
|
||
| bench('component-heavy document', async () => { | ||
| await renderMarkdown(componentDocument) | ||
| }) | ||
| test('render markdown', async ({ bench }) => { | ||
| await bench.compare( | ||
| bench('medium document', async () => { | ||
| await renderMarkdown(mediumDocument) | ||
| }), | ||
| bench('large document', async () => { | ||
| await renderMarkdown(largeDocument) | ||
| }), | ||
| bench('component-heavy document', async () => { | ||
| await renderMarkdown(componentDocument) | ||
| }) | ||
| ) | ||
| }) | ||
|
|
||
| describe('parse and render', () => { | ||
| bench('medium document to html', async () => { | ||
| await renderHtmlFromDocument(await parse(mediumMarkdown)) | ||
| }) | ||
|
|
||
| bench('large document to html', async () => { | ||
| await renderHtmlFromDocument(await parse(largeMarkdown)) | ||
| }) | ||
|
|
||
| // Roundtrip used by editors and CMS integrations. | ||
| bench('component-heavy document to markdown', async () => { | ||
| await renderMarkdown(await parse(componentHeavyMarkdown)) | ||
| }) | ||
| test('parse and render', async ({ bench }) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Document that The old
|
||
| await bench.compare( | ||
| bench('medium document to html', async () => { | ||
| await renderHtmlFromDocument(await parse(mediumMarkdown)) | ||
| }), | ||
| bench('large document to html', async () => { | ||
| await renderHtmlFromDocument(await parse(largeMarkdown)) | ||
| }), | ||
| // Roundtrip used by editors and CMS integrations. | ||
| bench('component-heavy document to markdown', async () => { | ||
| await renderMarkdown(await parse(componentHeavyMarkdown)) | ||
| }) | ||
| ) | ||
| }) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update job does not check the artifact against the PR head.
updatecommits the snapshot built from the commit thatbuildchecked out. It never compares that commit with the current PR head. It reads the current blob SHA oftest/bundle.test.tsand writes over it. That SHA check only catches a change between the read and the write. A commit that editstest/bundle.test.tsafter the build is replaced by the older artifact. A later commit to any file can also leave the committed snapshot stale. The head-SHA check inreportcovers only the PR comment and does not gateupdate.Choose one fix:
AGENTS.mdsentence on line 318 so it states thatupdatedoes not check the artifact against the head SHA.update.buildmust output the commit it checked out.updatemust compare that commit with the current PR head frompulls.getand stop beforecreateOrUpdateFileContentswhen they differ.