Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oxc-transform

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oxc-transform - npm Package Compare versions

Comparing version 0.25.0 to 0.26.0

24

index.d.ts

@@ -21,6 +21,11 @@ /* auto-generated by NAPI-RS */

/** TypeScript Isolated Declarations for Standalone DTS Emit */
export declare function isolatedDeclaration(filename: string, sourceText: string): IsolatedDeclarationsResult
export declare function isolatedDeclaration(filename: string, sourceText: string, options: IsolatedDeclarationsOptions): IsolatedDeclarationsResult
export interface IsolatedDeclarationsOptions {
sourcemap: boolean
}
export interface IsolatedDeclarationsResult {
sourceText: string
code: string
map?: SourceMap
errors: Array<string>

@@ -179,3 +184,3 @@ }

*/
sourceText: string
code: string
/**

@@ -186,3 +191,3 @@ * The source map for the transformed code.

*/
sourceMap?: SourceMap
map?: SourceMap
/**

@@ -231,3 +236,14 @@ * The `.d.ts` declaration file for the transformed code. Declarations are

declaration?: boolean
/**
* Rewrite or remove TypeScript import/export declaration extensions.
*
* - When set to `rewrite`, it will change `.ts`, `.mts`, `.cts` extensions to `.js`, `.mjs`, `.cjs` respectively.
* - When set to `remove`, it will remove `.ts`/`.mts`/`.cts`/`.tsx` extension entirely.
* - When set to `true`, it's equivalent to `rewrite`.
* - When set to `false` or omitted, no changes will be made to the extensions.
*
* @default false
*/
rewriteImportExtensions?: 'rewrite' | 'remove' | boolean
}

18

package.json
{
"name": "oxc-transform",
"version": "0.25.0",
"version": "0.26.0",
"description": "Oxc transform Node API",

@@ -26,11 +26,11 @@ "keywords": [

"optionalDependencies": {
"@oxc-transform/binding-win32-x64-msvc": "0.25.0",
"@oxc-transform/binding-win32-arm64-msvc": "0.25.0",
"@oxc-transform/binding-linux-x64-gnu": "0.25.0",
"@oxc-transform/binding-linux-arm64-gnu": "0.25.0",
"@oxc-transform/binding-linux-x64-musl": "0.25.0",
"@oxc-transform/binding-linux-arm64-musl": "0.25.0",
"@oxc-transform/binding-darwin-x64": "0.25.0",
"@oxc-transform/binding-darwin-arm64": "0.25.0"
"@oxc-transform/binding-win32-x64-msvc": "0.26.0",
"@oxc-transform/binding-win32-arm64-msvc": "0.26.0",
"@oxc-transform/binding-linux-x64-gnu": "0.26.0",
"@oxc-transform/binding-linux-arm64-gnu": "0.26.0",
"@oxc-transform/binding-linux-x64-musl": "0.26.0",
"@oxc-transform/binding-linux-arm64-musl": "0.26.0",
"@oxc-transform/binding-darwin-x64": "0.26.0",
"@oxc-transform/binding-darwin-arm64": "0.26.0"
}
}

@@ -15,5 +15,11 @@ # Oxc Transform

const { sourceText, errors } = oxc.isolatedDeclaration("test.ts", "class A {}");
const { sourceMap, sourceText, errors } = oxc.isolatedDeclaration("test.ts", "class A {}", { sourcemap: true });
assert.equal(sourceText, "declare class A {}\n");
assert.deepEqual(ret.sourceMap, {
mappings: "AAAA,cAAM,EAAE,CAAE",
names: [],
sources: ["test.ts"],
sourcesContent: ["class A {}"],
});
assert(errors.length == 0);

@@ -25,4 +31,8 @@ ```

```typescript
export function isolatedDeclaration(filename: string, sourceText: string): IsolatedDeclarationsResult
export function isolatedDeclaration(filename: string, sourceText: string, options: IsolatedDeclarationsOptions): IsolatedDeclarationsResult
export interface IsolatedDeclarationsOptions {
sourcemap: boolean
}
export interface IsolatedDeclarationsResult {

@@ -29,0 +39,0 @@ sourceText: string

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