oxc-transform 0.15.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +21 -8
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -1,17 +1,30 @@
1
- # The JavaScript Oxidation Compiler
1
+ # Oxc Transform
2
2
 
3
- See index.d.ts for `parseSync` and `parseAsync` API.
3
+ ## [Isolated Declarations for Standalone DTS Emit](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-beta/#isolated-declarations)
4
4
 
5
- ## ESM
5
+ Based on Oxc and conforms to TypeScript Compiler's `--isolated-declaration` `.d.ts` emit.
6
+
7
+ This is still in alpha and may yield incorrect results, feel free to [submit a bug report](https://github.com/oxc-project/oxc/issues/new?assignees=&labels=C-bug&projects=&template=bug_report.md&title=isolated-declarations:).
8
+
9
+ ### Usage
6
10
 
7
11
  ```javascript
8
- import oxc from './index.js';
9
12
  import assert from 'assert';
13
+ import oxc from 'oxc-transform';
14
+
15
+ const { sourceText, errors } = oxc.isolatedDeclaration("test.ts", "class A {}");
16
+
17
+ assert.equal(sourceText, "declare class A {}\n");
18
+ assert(errors.length == 0);
19
+ ```
20
+
21
+ ### API
10
22
 
11
- test(oxc.isolatedDeclaration("test.ts", "class A {}"), "declare class A {}\n");
23
+ ```typescript
24
+ export function isolatedDeclaration(filename: string, sourceText: string): IsolatedDeclarationsResult
12
25
 
13
- function test(ret, expected) {
14
- assert.equal(ret.sourceText, expected);
15
- assert(ret.errors.length == 0);
26
+ export interface IsolatedDeclarationsResult {
27
+ sourceText: string
28
+ errors: Array<string>
16
29
  }
17
30
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxc-transform",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Oxc transform Node API",
5
5
  "keywords": [
6
6
  "transform"
@@ -23,13 +23,13 @@
23
23
  "index.js"
24
24
  ],
25
25
  "optionalDependencies": {
26
- "@oxc-transform/binding-win32-x64-msvc": "0.15.0",
27
- "@oxc-transform/binding-win32-arm64-msvc": "0.15.0",
28
- "@oxc-transform/binding-linux-x64-gnu": "0.15.0",
29
- "@oxc-transform/binding-linux-arm64-gnu": "0.15.0",
30
- "@oxc-transform/binding-linux-x64-musl": "0.15.0",
31
- "@oxc-transform/binding-linux-arm64-musl": "0.15.0",
32
- "@oxc-transform/binding-darwin-x64": "0.15.0",
33
- "@oxc-transform/binding-darwin-arm64": "0.15.0"
26
+ "@oxc-transform/binding-win32-x64-msvc": "0.15.1",
27
+ "@oxc-transform/binding-win32-arm64-msvc": "0.15.1",
28
+ "@oxc-transform/binding-linux-x64-gnu": "0.15.1",
29
+ "@oxc-transform/binding-linux-arm64-gnu": "0.15.1",
30
+ "@oxc-transform/binding-linux-x64-musl": "0.15.1",
31
+ "@oxc-transform/binding-linux-arm64-musl": "0.15.1",
32
+ "@oxc-transform/binding-darwin-x64": "0.15.1",
33
+ "@oxc-transform/binding-darwin-arm64": "0.15.1"
34
34
  }
35
35
  }