Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
oxc-transform
Advanced tools
This is alpha software and may yield incorrect results, feel free to submit a bug report.
import assert from 'assert';
import oxc from 'oxc-transform';
const { code, declaration, errors } = oxc.transform(
'test.ts',
'class A<T> {}',
{
typescript: {
declaration: true, // With isolated declarations in a single step.
},
},
);
assert.equal(code, 'class A {}\n');
assert.equal(declaration, 'declare class A<T> {}\n');
assert(errors.length == 0);
Conforms to TypeScript Compiler's --isolated-declaration
.d.ts
emit.
import assert from 'assert';
import oxc from 'oxc-transform';
const { map, code, errors } = oxc.isolatedDeclaration('test.ts', 'class A {}');
assert.equal(code, 'declare class A {}\n');
assert(errors.length == 0);
See index.d.ts
.
export declare function transform(
filename: string,
sourceText: string,
options?: TransformOptions,
): TransformResult;
export function isolatedDeclaration(
filename: string,
sourceText: string,
options?: IsolatedDeclarationsOptions,
): IsolatedDeclarationsResult;
FAQs
Oxc transform Node API
The npm package oxc-transform receives a total of 17,294 weekly downloads. As such, oxc-transform popularity was classified as popular.
We found that oxc-transform 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.