Comparing version 0.14.7 to 1.0.0-beta.0
132
package.json
{ | ||
"name": "shiki", | ||
"version": "0.14.7", | ||
"description": "shiki", | ||
"author": "Pine Wu <octref@gmail.com>", | ||
"homepage": "https://github.com/octref/shiki/tree/main/packages/shiki", | ||
"type": "module", | ||
"version": "1.0.0-beta.0", | ||
"description": "A beautiful Syntax Highlighter.", | ||
"author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"module": "dist/index.esm.js", | ||
"types": "dist/index.d.ts", | ||
"unpkg": "dist/index.unpkg.iife.js", | ||
"jsdelivr": "dist/index.jsdelivr.iife.js", | ||
"homepage": "https://github.com/shikijs/shiki#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/shikijs/shiki.git", | ||
"directory": "packages/shiki" | ||
}, | ||
"bugs": "https://github.com/shikijs/shiki/issues", | ||
"keywords": [ | ||
"shiki", | ||
"syntax-highlighter", | ||
"highlighter" | ||
"shiki" | ||
], | ||
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.mts", | ||
"default": "./dist/index.mjs" | ||
}, | ||
"./core": { | ||
"types": "./dist/core.d.mts", | ||
"unwasm": "./dist/core-unwasm.mjs", | ||
"default": "./dist/core.mjs" | ||
}, | ||
"./wasm": { | ||
"unwasm": "./dist/onig.wasm", | ||
"types": "./dist/wasm.d.mts", | ||
"default": "./dist/wasm.mjs" | ||
}, | ||
"./langs": { | ||
"types": "./dist/langs.d.mts", | ||
"default": "./dist/langs.mjs" | ||
}, | ||
"./themes": { | ||
"types": "./dist/themes.d.mts", | ||
"default": "./dist/themes.mjs" | ||
}, | ||
"./theme-css-variables": { | ||
"types": "./dist/theme-css-variables.d.mts", | ||
"default": "./dist/theme-css-variables.mjs" | ||
}, | ||
"./bundle/full": { | ||
"types": "./dist/bundle-full.d.mts", | ||
"default": "./dist/bundle-full.mjs" | ||
}, | ||
"./bundle/web": { | ||
"types": "./dist/bundle-web.d.mts", | ||
"default": "./dist/bundle-web.mjs" | ||
}, | ||
"./onig.wasm": "./dist/onig.wasm", | ||
"./dist/*": "./dist/*", | ||
"./*": "./dist/*" | ||
}, | ||
"main": "./dist/index.mjs", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.mts", | ||
"typesVersions": { | ||
"*": { | ||
"core": [ | ||
"./dist/core.d.mts" | ||
], | ||
"wasm": [ | ||
"./dist/wasm.d.mts" | ||
], | ||
"langs": [ | ||
"./dist/langs.d.mts" | ||
], | ||
"themes": [ | ||
"./dist/themes.d.mts" | ||
], | ||
"bundle/full": [ | ||
"./dist/bundle-full.d.mts" | ||
], | ||
"bundle/web": [ | ||
"./dist/bundle-web.d.mts" | ||
], | ||
"theme-css-variables": [ | ||
"./dist/theme-css-variables.d.mts" | ||
], | ||
"*": [ | ||
"./dist/*", | ||
"./*" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"dist", | ||
"languages", | ||
"themes", | ||
"samples" | ||
"dist" | ||
], | ||
"scripts": { | ||
"prepublishOnly": "npm run build", | ||
"build": "rollup -c", | ||
"watch": "rollup -c -w" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/octref/shiki.git" | ||
}, | ||
"dependencies": { | ||
"ansi-sequence-parser": "^1.1.0", | ||
"jsonc-parser": "^3.2.0", | ||
"vscode-oniguruma": "^1.7.0", | ||
"vscode-textmate": "^8.0.0" | ||
"@shikijs/core": "1.0.0-beta.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.11.17" | ||
"tm-grammars": "^1.0.19", | ||
"tm-themes": "^1.1.1", | ||
"vscode-oniguruma": "^1.7.0" | ||
}, | ||
"browser": { | ||
"fs": false, | ||
"path": false | ||
}, | ||
"gitHead": "dff40b62c619ba8064a5ceea215dbd98434c082a" | ||
} | ||
"scripts": { | ||
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=4096 rollup -c", | ||
"dev": "rollup -cw", | ||
"test": "vitest", | ||
"test:cf": "wrangler dev test/cf.ts --port 60001" | ||
} | ||
} |
@@ -1,62 +0,15 @@ | ||
<p> | ||
<h2 align="center">Shiki</h2> | ||
</p> | ||
<p align="center"> | ||
Shiki is a beautiful Syntax Highlighter. <a href="http://shiki.matsu.io">Demo</a>. | ||
</p> | ||
<img src="https://raw.githubusercontent.com/shikijs/shiki/main/docs/public/logo.svg" width="150" alt="Shiki Logo" /> | ||
## Usage | ||
# Shiki 式 | ||
```sh | ||
npm i shiki | ||
``` | ||
[![NPM version](https://img.shields.io/npm/v/shiki?color=32A9C3&labelColor=1B3C4A&label=npm)](https://www.npmjs.com/package/shiki) | ||
[![NPM downloads](https://img.shields.io/npm/dm/shiki?color=32A9C3&labelColor=1B3C4A&label=downloads)](https://www.npmjs.com/package/shiki) | ||
[![Codecov](https://img.shields.io/codecov/c/github/shikijs/shiki?token=B85J0E2I7I&style=flat&labelColor=1B3C4A&color=32A9C3&precision=1)](https://app.codecov.io/gh/shikijs/shiki) | ||
```js | ||
const shiki = require('shiki') | ||
A beautiful syntax highlighter based on TextMate grammars, accurate and powerful. | ||
shiki | ||
.getHighlighter({ | ||
theme: 'nord' | ||
}) | ||
.then(highlighter => { | ||
console.log(highlighter.codeToHtml(`console.log('shiki');`, { lang: 'js' })) | ||
}) | ||
[📚 **Documentation**](https://shiki.style) | ||
// <pre class="shiki" style="background-color: #2e3440"><code> | ||
// <!-- Highlighted Code --> | ||
// </code></pre> | ||
``` | ||
```html | ||
<script src="https://unpkg.com/shiki"></script> | ||
<script> | ||
shiki | ||
.getHighlighter({ | ||
theme: 'nord' | ||
}) | ||
.then(highlighter => { | ||
const code = highlighter.codeToHtml(`console.log('shiki');`, { lang: 'js' }) | ||
document.getElementById('output').innerHTML = code | ||
}) | ||
</script> | ||
``` | ||
Clone [shikijs/shiki-starter](https://github.com/shikijs/shiki-starter) to play with Shiki, or try it out on [Repl.it](https://repl.it/@octref/shiki-starter). | ||
Learn more from the GitHub repo: [shikijs/shiki](https://github.com/shikijs/shiki). | ||
## Credits | ||
- Shiki uses [vscode-oniguruma](https://github.com/microsoft/vscode-oniguruma) | ||
- A lot of code is based on [vscode-textmate](https://github.com/Microsoft/vscode-textmate) | ||
## Sponsorship | ||
If you find Shiki useful, please consider sponsoring my Open Source development. Thank you 🙏 | ||
https://github.com/sponsors/octref | ||
## License | ||
MIT © [Pine Wu](https://github.com/octref) | ||
[MIT](./LICENSE) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
1
1
1
Yes
7463726
3
454
60544
16
75
+ Added@shikijs/core@1.0.0-beta.0
+ Added@shikijs/core@1.0.0-beta.0(transitive)
- Removedansi-sequence-parser@^1.1.0
- Removedjsonc-parser@^3.2.0
- Removedvscode-oniguruma@^1.7.0
- Removedvscode-textmate@^8.0.0
- Removedansi-sequence-parser@1.1.1(transitive)
- Removedjsonc-parser@3.3.1(transitive)
- Removedvscode-oniguruma@1.7.0(transitive)
- Removedvscode-textmate@8.0.0(transitive)