Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@uiw/codemirror-extensions-langs
Advanced tools
Load languages Extensions for CodeMirror6.
npm install @uiw/codemirror-extensions-langs --save
import { loadLanguage, langNames, langs } from '@uiw/codemirror-extensions-langs';
loadLanguage('tsx');
langs.tsx();
console.log('langNames:', langNames); // => "jsx" | "typescript" | "javascript" | "tsx"
import CodeMirror from '@uiw/react-codemirror';
import { langs } from '@uiw/codemirror-extensions-langs';
function App() {
return <CodeMirror value="console.log('hello world!');" height="200px" extensions={[langs.tsx()]} />;
}
export default App;
import CodeMirror from '@uiw/react-codemirror';
import { loadLanguage } from '@uiw/codemirror-extensions-langs';
function App() {
return <CodeMirror value="console.log('hello world!');" height="200px" extensions={[loadLanguage('tsx')]} />;
}
export default App;
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { loadLanguage, langs } from '@uiw/codemirror-extensions-langs';
const state = EditorState.create({
doc: 'my source code',
extensions: [langs.jsx()],
});
const view = new EditorView({
parent: document.querySelector('#editor'),
state,
});
import CodeMirror from '@uiw/react-codemirror';
import { StreamLanguage } from '@codemirror/language';
import { go } from '@codemirror/legacy-modes/mode/go';
const goLang = `package main
import "fmt"
func main() {
fmt.Println("Hello, 世界")
}`;
export default function App() {
return <CodeMirror value={goLang} height="200px" extensions={[StreamLanguage.define(go)]} />;
}
@codemirror/legacy-modes/mode/cpp
@codemirror/lang-cpp
@codemirror/legacy-modes/mode/html
@codemirror/lang-html
@codemirror/legacy-modes/mode/java
@codemirror/lang-java
@codemirror/legacy-modes/mode/javascript
@codemirror/lang-javascript
@codemirror/legacy-modes/mode/json
@codemirror/lang-json
@codemirror/legacy-modes/mode/lezer
@codemirror/lang-lezer
@codemirror/legacy-modes/mode/markdown
@codemirror/lang-markdown
@codemirror/legacy-modes/mode/php
@codemirror/lang-php
@codemirror/legacy-modes/mode/python
@codemirror/lang-python
@codemirror/legacy-modes/mode/rust
@codemirror/lang-rust
@codemirror/legacy-modes/mode/sql
@codemirror/lang-sql
@codemirror/legacy-modes/mode/xml
@codemirror/lang-xml
As always, thanks to our amazing contributors!
Made with github-action-contributors.
Licensed under the MIT License.
FAQs
Load languages Extensions for CodeMirror6.
We found that @uiw/codemirror-extensions-langs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.