unplugin-isolated-decl 0.6.7 → 0.7.0
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/api.cjs +1 -1
- package/dist/api.js +1 -1
- package/dist/core/options.d.cts +3 -0
- package/dist/core/options.d.ts +3 -0
- package/dist/core/transformer.d.cts +9 -0
- package/dist/core/transformer.d.ts +9 -0
- package/dist/core/utils.d.cts +2 -0
- package/dist/core/utils.d.ts +2 -0
- package/dist/esbuild.cjs +3 -3
- package/dist/esbuild.d.cts +17 -0
- package/dist/esbuild.d.ts +17 -0
- package/dist/esbuild.js +2 -2
- package/dist/farm.cjs +9 -0
- package/dist/farm.d.cts +21 -0
- package/dist/farm.d.ts +21 -0
- package/dist/farm.js +8 -0
- package/dist/index.cjs +3 -4
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +3 -3
- package/dist/rolldown.cjs +3 -3
- package/dist/rolldown.d.cts +18 -0
- package/dist/rolldown.d.ts +18 -0
- package/dist/rolldown.js +2 -2
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.d.cts +18 -0
- package/dist/rollup.d.ts +18 -0
- package/dist/rollup.js +2 -2
- package/dist/{src_index-jESannmB.js → src-B4aBGZxL.js} +132 -110
- package/dist/{src_index-tVPRzUWA.cjs → src-C3bhcfQ9.cjs} +130 -113
- package/dist/{transformer-9aaNC01N.cjs → transformer-C4rLQvdl.cjs} +16 -24
- package/dist/{transformer-GSFmnEOV.js → transformer-DDte86lZ.js} +16 -24
- package/dist/vite.cjs +3 -3
- package/dist/vite.d.cts +18 -0
- package/dist/vite.d.ts +18 -0
- package/dist/vite.js +2 -2
- package/package.json +21 -16
package/dist/api.cjs
CHANGED
package/dist/api.js
CHANGED
package/dist/core/options.d.cts
CHANGED
package/dist/core/options.d.ts
CHANGED
|
@@ -3,6 +3,15 @@ export interface TransformResult {
|
|
|
3
3
|
code: string;
|
|
4
4
|
errors: Array<string>;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Transform isolated declarations with `oxc-transform`.
|
|
8
|
+
*/
|
|
6
9
|
export declare function oxcTransform(id: string, code: string): Promise<TransformResult>;
|
|
10
|
+
/**
|
|
11
|
+
* Transform isolated declarations with `@swc/core`.
|
|
12
|
+
*/
|
|
7
13
|
export declare function swcTransform(id: string, code: string): Promise<TransformResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Transform isolated declarations with `typescript`.
|
|
16
|
+
*/
|
|
8
17
|
export declare function tsTransform(id: string, code: string, transformOptions?: TranspileOptions): Promise<TransformResult>;
|
|
@@ -3,6 +3,15 @@ export interface TransformResult {
|
|
|
3
3
|
code: string;
|
|
4
4
|
errors: Array<string>;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Transform isolated declarations with `oxc-transform`.
|
|
8
|
+
*/
|
|
6
9
|
export declare function oxcTransform(id: string, code: string): Promise<TransformResult>;
|
|
10
|
+
/**
|
|
11
|
+
* Transform isolated declarations with `@swc/core`.
|
|
12
|
+
*/
|
|
7
13
|
export declare function swcTransform(id: string, code: string): Promise<TransformResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Transform isolated declarations with `typescript`.
|
|
16
|
+
*/
|
|
8
17
|
export declare function tsTransform(id: string, code: string, transformOptions?: TranspileOptions): Promise<TransformResult>;
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
require('./transformer-
|
|
2
|
+
const require_src = require('./src-C3bhcfQ9.cjs');
|
|
3
|
+
require('./transformer-C4rLQvdl.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/esbuild.ts
|
|
6
|
-
var esbuild_default =
|
|
6
|
+
var esbuild_default = require_src.IsolatedDecl.esbuild;
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
module.exports = esbuild_default;
|
package/dist/esbuild.d.cts
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for esbuild plugin.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
1
6
|
import { IsolatedDecl } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Esbuild plugin
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { build } from 'esbuild'
|
|
13
|
+
*
|
|
14
|
+
* build({
|
|
15
|
+
* plugins: [require('unplugin-isolated-decl/esbuild')()],
|
|
16
|
+
* })
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
2
19
|
declare const _default: typeof IsolatedDecl.esbuild;
|
|
3
20
|
export = _default;
|
package/dist/esbuild.d.ts
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for esbuild plugin.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
1
6
|
import { IsolatedDecl } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Esbuild plugin
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { build } from 'esbuild'
|
|
13
|
+
*
|
|
14
|
+
* build({
|
|
15
|
+
* plugins: [require('unplugin-isolated-decl/esbuild')()],
|
|
16
|
+
* })
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
2
19
|
declare const _default: typeof IsolatedDecl.esbuild;
|
|
3
20
|
export default _default;
|
package/dist/esbuild.js
CHANGED
package/dist/farm.cjs
ADDED
package/dist/farm.d.cts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for Farm plugin.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { IsolatedDecl } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Farm plugin
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // farm.config.js
|
|
13
|
+
* import IsolatedDecl from 'unplugin-isolated-decl/farm'
|
|
14
|
+
*
|
|
15
|
+
* export default {
|
|
16
|
+
* plugins: [IsolatedDecl()],
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare const _default: typeof IsolatedDecl.farm;
|
|
21
|
+
export = _default;
|
package/dist/farm.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for Farm plugin.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { IsolatedDecl } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Farm plugin
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // farm.config.js
|
|
13
|
+
* import IsolatedDecl from 'unplugin-isolated-decl/farm'
|
|
14
|
+
*
|
|
15
|
+
* export default {
|
|
16
|
+
* plugins: [IsolatedDecl()],
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare const _default: typeof IsolatedDecl.farm;
|
|
21
|
+
export default _default;
|
package/dist/farm.js
ADDED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
require('./transformer-
|
|
2
|
+
const require_src = require('./src-C3bhcfQ9.cjs');
|
|
3
|
+
require('./transformer-C4rLQvdl.cjs');
|
|
4
4
|
|
|
5
|
-
exports.IsolatedDecl =
|
|
6
|
-
exports.lowestCommonAncestor = require_src_index.lowestCommonAncestor
|
|
5
|
+
exports.IsolatedDecl = require_src.IsolatedDecl
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for main unplugin.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
1
5
|
import { type UnpluginInstance } from 'unplugin';
|
|
2
6
|
import { type Options } from "./core/options.js";
|
|
3
7
|
export type { Options };
|
|
8
|
+
/**
|
|
9
|
+
* The main unplugin instance.
|
|
10
|
+
*/
|
|
4
11
|
export declare const IsolatedDecl: UnpluginInstance<Options | undefined, false>;
|
|
5
|
-
export declare function lowestCommonAncestor(...filepaths: string[]): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for main unplugin.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
1
5
|
import { type UnpluginInstance } from 'unplugin';
|
|
2
6
|
import { type Options } from "./core/options.js";
|
|
3
7
|
export type { Options };
|
|
8
|
+
/**
|
|
9
|
+
* The main unplugin instance.
|
|
10
|
+
*/
|
|
4
11
|
export declare const IsolatedDecl: UnpluginInstance<Options | undefined, false>;
|
|
5
|
-
export declare function lowestCommonAncestor(...filepaths: string[]): string;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./transformer-
|
|
2
|
-
import { IsolatedDecl
|
|
1
|
+
import "./transformer-DDte86lZ.js";
|
|
2
|
+
import { IsolatedDecl } from "./src-B4aBGZxL.js";
|
|
3
3
|
|
|
4
|
-
export { IsolatedDecl
|
|
4
|
+
export { IsolatedDecl };
|
package/dist/rolldown.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
require('./transformer-
|
|
2
|
+
const require_src = require('./src-C3bhcfQ9.cjs');
|
|
3
|
+
require('./transformer-C4rLQvdl.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/rolldown.ts
|
|
6
|
-
var rolldown_default =
|
|
6
|
+
var rolldown_default = require_src.IsolatedDecl.rolldown;
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
module.exports = rolldown_default;
|
package/dist/rolldown.d.cts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for Rolldown plugin.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
1
6
|
import { IsolatedDecl } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Rolldown plugin
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // rolldown.config.js
|
|
13
|
+
* import IsolatedDecl from 'unplugin-isolated-decl/rolldown'
|
|
14
|
+
*
|
|
15
|
+
* export default {
|
|
16
|
+
* plugins: [IsolatedDecl()],
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
2
20
|
declare const _default: typeof IsolatedDecl.rolldown;
|
|
3
21
|
export = _default;
|
package/dist/rolldown.d.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for Rolldown plugin.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
1
6
|
import { IsolatedDecl } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Rolldown plugin
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // rolldown.config.js
|
|
13
|
+
* import IsolatedDecl from 'unplugin-isolated-decl/rolldown'
|
|
14
|
+
*
|
|
15
|
+
* export default {
|
|
16
|
+
* plugins: [IsolatedDecl()],
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
2
20
|
declare const _default: typeof IsolatedDecl.rolldown;
|
|
3
21
|
export default _default;
|
package/dist/rolldown.js
CHANGED
package/dist/rollup.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
3
|
-
require('./transformer-
|
|
2
|
+
const require_src = require('./src-C3bhcfQ9.cjs');
|
|
3
|
+
require('./transformer-C4rLQvdl.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/rollup.ts
|
|
6
|
-
var rollup_default =
|
|
6
|
+
var rollup_default = require_src.IsolatedDecl.rollup;
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
module.exports = rollup_default;
|
package/dist/rollup.d.cts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for Rollup plugin.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
1
6
|
import { IsolatedDecl } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Rollup plugin
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // rollup.config.js
|
|
13
|
+
* import IsolatedDecl from 'unplugin-isolated-decl/rollup'
|
|
14
|
+
*
|
|
15
|
+
* export default {
|
|
16
|
+
* plugins: [IsolatedDecl()],
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
2
20
|
declare const _default: typeof IsolatedDecl.rollup;
|
|
3
21
|
export = _default;
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for Rollup plugin.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
1
6
|
import { IsolatedDecl } from "./index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Rollup plugin
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // rollup.config.js
|
|
13
|
+
* import IsolatedDecl from 'unplugin-isolated-decl/rollup'
|
|
14
|
+
*
|
|
15
|
+
* export default {
|
|
16
|
+
* plugins: [IsolatedDecl()],
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
2
20
|
declare const _default: typeof IsolatedDecl.rollup;
|
|
3
21
|
export default _default;
|
package/dist/rollup.js
CHANGED