writr 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -0
  2. package/package.json +14 -10
package/README.md CHANGED
@@ -68,6 +68,7 @@ plugins and working with the processor directly.
68
68
  - [Methods that Emit Errors](#methods-that-emit-errors)
69
69
  - [Error Event Examples](#error-event-examples)
70
70
  - [Event Emitter Methods](#event-emitter-methods)
71
+ - [Benchmarks](#benchmarks)
71
72
  - [ESM and Node Version Support](#esm-and-node-version-support)
72
73
  - [Code of Conduct and Contributing](#code-of-conduct-and-contributing)
73
74
  - [License](#license)
@@ -727,6 +728,17 @@ Since Writr extends Hookified, you have access to standard event emitter methods
727
728
 
728
729
  For more information about event handling capabilities, see the [Hookified documentation](https://github.com/jaredwray/hookified).
729
730
 
731
+ # Benchmarks
732
+
733
+ The benchmark shows rendering performance via Sync and Async methods with caching enabled and disabled.
734
+
735
+ | name | summary | ops/sec | time/op | margin | samples |
736
+ |---------------------------|:---------:|----------:|----------:|:--------:|----------:|
737
+ | render (Sync) (cached) | 🥇 | 34K | 30µs | ±0.08% | 33K |
738
+ | render (Async) (cached) | -1.5% | 33K | 31µs | ±0.08% | 33K |
739
+ | render (Sync) | -93% | 2K | 474µs | ±0.96% | 10K |
740
+ | render (Async) | -93% | 2K | 481µs | ±0.96% | 10K |
741
+
730
742
  # ESM and Node Version Support
731
743
 
732
744
  This package is ESM only and tested on the current lts version and its previous. Please don't open issues for questions regarding CommonJS / ESM or previous Nodejs versions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "writr",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Markdown Rendering Simplified",
5
5
  "type": "module",
6
6
  "main": "./dist/writr.js",
@@ -49,19 +49,19 @@
49
49
  "markdown-to-react"
50
50
  ],
51
51
  "dependencies": {
52
- "cacheable": "^2.2.0",
53
- "hashery": "^1.2.0",
54
- "hookified": "^1.13.0",
52
+ "cacheable": "^2.3.1",
53
+ "hashery": "^1.3.0",
54
+ "hookified": "^1.14.0",
55
55
  "html-react-parser": "^5.2.10",
56
56
  "js-yaml": "^4.1.1",
57
- "react": "^19.2.0",
57
+ "react": "^19.2.3",
58
58
  "rehype-highlight": "^7.0.2",
59
59
  "rehype-katex": "^7.0.1",
60
60
  "rehype-slug": "^6.0.0",
61
61
  "rehype-stringify": "^10.0.1",
62
62
  "remark-emoji": "^5.0.2",
63
63
  "remark-gfm": "^4.0.1",
64
- "remark-github-blockquote-alert": "^2.0.0",
64
+ "remark-github-blockquote-alert": "^2.0.1",
65
65
  "remark-math": "^6.0.0",
66
66
  "remark-mdx": "^3.1.1",
67
67
  "remark-parse": "^11.0.0",
@@ -70,16 +70,19 @@
70
70
  "unified": "^11.0.5"
71
71
  },
72
72
  "devDependencies": {
73
- "@biomejs/biome": "^2.3.7",
73
+ "@biomejs/biome": "^2.3.10",
74
+ "@monstermann/tinybench-pretty-printer": "^0.3.0",
74
75
  "@types/js-yaml": "^4.0.9",
75
- "@types/node": "^24.10.1",
76
+ "@types/node": "^25.0.3",
76
77
  "@types/react": "^19.2.7",
77
- "@vitest/coverage-v8": "^4.0.14",
78
+ "@vitest/coverage-v8": "^4.0.16",
78
79
  "docula": "^0.31.1",
79
80
  "rimraf": "^6.1.2",
81
+ "tinybench": "^6.0.0",
80
82
  "tsup": "^8.5.1",
83
+ "tsx": "^4.21.0",
81
84
  "typescript": "^5.9.3",
82
- "vitest": "^4.0.14"
85
+ "vitest": "^4.0.16"
83
86
  },
84
87
  "files": [
85
88
  "dist",
@@ -90,6 +93,7 @@
90
93
  "clean": "rimraf ./dist ./coverage ./node_modules ./pnpm-lock.yaml ./site/README.md ./site/dist",
91
94
  "build": "rimraf ./dist && tsup src/writr.ts --format esm --dts --clean",
92
95
  "lint": "biome check --write --error-on-warnings",
96
+ "benchmark": "tsx benchmark/benchmark.ts",
93
97
  "test": "pnpm lint && vitest run --coverage",
94
98
  "test:ci": "biome check --error-on-warnings && vitest run --coverage",
95
99
  "website:build": "rimraf ./site/README.md ./site/dist && npx docula build -s ./site -o ./site/dist",