Socket
Socket
Sign inDemoInstall

shiki-twoslash

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shiki-twoslash - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

30

CHANGELOG.md
# shiki-twoslash
## 2.1.1
### Patch Changes
- 61a6af5: Adds support for an annotation system. This is still work in progress, but the goal is to allow you to provide a way to write meta-commentary on a code-sample from the outside of the code block by having an arrow and some comments.
For example
````
```js twoslash
function compact(arr) {
// @annotate: left 56 - No editor warnings in JavaScript files<br/><br/>This crashes at runtime.
if (orr.length > 10) return arr
return arr
}
```
````
Would create a codeblocck with:
```js
function compact(arr) {
if (orr.length > 10) return arr
return arr
}
```
And a little SVG arrow and the text "No editor warnings in JavaScript files<br/><br/>This crashes at runtime." next to it.
I'll be tweaking the syntax over time, but for now the syntax is `// @annotate: [left/right] [arrow degree rotatation] [text degree rotatation] - Text to show`
## 2.0.3

@@ -4,0 +34,0 @@

2

package.json
{
"name": "shiki-twoslash",
"version": "2.1.0",
"version": "2.1.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/shikijs/twoslash",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc