ts-swc-transform 2.6.20 → 2.6.22
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.
- package/dist/cjs/constants.d.cts +3 -0
- package/dist/cjs/createMatcher.d.cts +2 -0
- package/dist/cjs/index.d.cts +8 -0
- package/dist/cjs/lib/import-meta-resolve.d.cts +1 -0
- package/dist/cjs/lib/parseSpecifiers.d.cts +5 -0
- package/dist/cjs/lib/patchCJS.d.cts +5 -0
- package/dist/cjs/lib/patchESM.d.cts +4 -0
- package/dist/cjs/lib/prepareSWCOptions.d.cts +7 -0
- package/dist/cjs/lib/rewriteExtensions.d.cts +9 -0
- package/dist/cjs/lib/transformFile.d.cts +3 -0
- package/dist/cjs/lib/urlFileUrl.d.cts +3 -0
- package/dist/cjs/resolveFileSync.d.cts +2 -0
- package/dist/cjs/toPath.d.cts +2 -0
- package/dist/cjs/transformDirectory.d.cts +2 -0
- package/dist/cjs/transformSync.d.cts +3 -0
- package/dist/cjs/transformTypes.d.cts +2 -0
- package/dist/cjs/types.d.cts +16 -0
- package/dist/cjs/workers/transformDirectory.d.cts +2 -0
- package/dist/cjs/workers/transformSync.d.cts +3 -0
- package/dist/cjs/workers/transformTypes.d.cts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as constants from './constants.js';
|
|
2
|
+
export { default as createMatcher } from './createMatcher.js';
|
|
3
|
+
export { default as resolveFileSync } from './resolveFileSync.js';
|
|
4
|
+
export { default as toPath } from './toPath.js';
|
|
5
|
+
export { default as transformDirectory } from './transformDirectory.js';
|
|
6
|
+
export { default as transformSync } from './transformSync.js';
|
|
7
|
+
export { default as transformTypes } from './transformTypes.js';
|
|
8
|
+
export type * from './types.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function importMetaResolve(specifier: string, url: URL): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const interop = "/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }";
|
|
2
|
+
import type { Output } from '@swc/core';
|
|
3
|
+
import type { Entry } from 'fs-iterator';
|
|
4
|
+
import type { ConfigOptions } from '../types.js';
|
|
5
|
+
export default function patchCJS(entry: Entry, output: Output, options: ConfigOptions): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const extensions: {
|
|
2
|
+
'.ts': string;
|
|
3
|
+
'.tsx': string;
|
|
4
|
+
'.mts': string;
|
|
5
|
+
'.cts': string;
|
|
6
|
+
};
|
|
7
|
+
export declare function replaceExtension(ext: string): string;
|
|
8
|
+
export declare function rewriteExtensions(content: string): string;
|
|
9
|
+
export declare function rewriteExtensionsCJS(content: string): string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Entry } from 'fs-iterator';
|
|
2
|
+
import type { ConfigOptions, TargetType, TransformFileCallback } from '../types.js';
|
|
3
|
+
export default function transformFile(entry: Entry, dest: string, type: TargetType, options: ConfigOptions, callback: TransformFileCallback): undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { ConfigOptions, TargetType, TransformDirectoryCallback } from './types.js';
|
|
2
|
+
export default function transformDirectory(src: string, dest: string, type: TargetType, options?: ConfigOptions | TransformDirectoryCallback, callback?: TransformDirectoryCallback): undefined | Promise<string[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TSConfig } from 'read-tsconfig-sync';
|
|
2
|
+
export interface Context {
|
|
3
|
+
parentURL?: string;
|
|
4
|
+
parentPath?: string;
|
|
5
|
+
}
|
|
6
|
+
export type { TSConfig, TSConfigSchema } from 'read-tsconfig-sync';
|
|
7
|
+
export interface ConfigOptions {
|
|
8
|
+
tsconfig?: TSConfig;
|
|
9
|
+
cwd?: string;
|
|
10
|
+
sourceMaps?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type TransformDirectoryCallback = (err?: Error, filePaths?: string[]) => void;
|
|
13
|
+
export type TransformFileCallback = (err?: Error, destFilePath?: string) => void;
|
|
14
|
+
export type TransformTypesCallback = (err?: Error, filePaths?: string[]) => void;
|
|
15
|
+
export type Matcher = (filePath: string) => boolean;
|
|
16
|
+
export type TargetType = 'cjs' | 'esm';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-swc-transform",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.22",
|
|
4
4
|
"description": "Typescript transformers for swc. Supports Node >= 0.8",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"matcher",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"version": "tsds version"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@swc/core": "
|
|
45
|
+
"@swc/core": "1.15.0",
|
|
46
46
|
"core-js-pure": "*",
|
|
47
47
|
"exit": "*",
|
|
48
48
|
"fs-iterator": "*",
|