
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@qualified/codemirror-workspace
Advanced tools
Provides intelligence to CodeMirror editors.
Workspace is an abstraction to allow CodeMirror editors to use Language Servers.
import { Workspace } from "@qualified/codemirror-workspace";
const workspace = new Workspace({
// Project root. Required.
rootUri: "file:///workspace/",
// Provide language associaton (language id and server ids) for URI. Required.
getLanguageAssociation: (uri: string) => {
// javascript, javascriptreact, typescript, typescriptreact
if (/\.(?:[jt]sx?)$/.test(uri)) {
const languageId = /\.tsx?$/.test(uri) ? "typescript" : "javascript";
return {
languageId: languageId + (uri.endsWith("x") ? "react" : ""),
languageServerIds: ["typescript-language-server"],
};
}
const styles = uri.match(/\.(css|less|s[ac]ss)$/);
if (styles !== null) {
return {
languageId: styles[1],
languageServerIds: ["css-language-server"],
};
}
if (uri.endsWith(".html")) {
return {
languageId: "html",
languageServerIds: ["html-language-server"],
};
}
if (uri.endsWith(".json")) {
return {
languageId: "json",
languageServerIds: ["json-worker"],
};
}
// Return null to let the workspace ignore this file.
return null;
},
// Provide the server's connection string. Required.
// The returned string can be a URI of WebSocket proxy or
// a location of Worker script to start Language Server.
getConnectionString: async (langserverId: string) => {
switch (langserverId) {
case "typescript-language-server":
// Use some API to start remote Language Server and return a string.
const res = await fetch("/start", { method: "POST" });
return res.json().uri;
case "css-language-server":
// Return an endpoint of already running proxy.
return "ws://localhost:9991";
case "html-language-server":
return "ws://localhost:9992";
case "json-worker":
// Return a location of a script to start Language Server in Web Worker.
return "js/json-worker.js";
default:
return "";
}
},
// Optional function to return HTML string from Markdown.
renderMarkdown: (markdown: string): string => markdown,
});
// Open text document in workspace to enable code intelligence.
// `cm` is CodeMirror.Editor instance with contents of the file.
workspace.openTextDocument("example.js", cm);
FAQs
Provides intelligence to CodeMirror editors
The npm package @qualified/codemirror-workspace receives a total of 16 weekly downloads. As such, @qualified/codemirror-workspace popularity was classified as not popular.
We found that @qualified/codemirror-workspace demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.