susee 1.5.7 → 1.6.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/index.d.cts CHANGED
@@ -1,51 +1,4 @@
1
- import ts6 from "@suseejs/ts6";
2
- import type { DepsFile, SuseePlugin, SuseePluginFunction, ValidExts } from "@suseejs/type";
3
- type ValidExts = ".js" | ".cjs" | ".mjs" | ".ts" | ".cts" | ".mts" | ".tsx" | ".jsx" | ".json";
4
- interface DepsFile {
5
- file: string;
6
- content: string;
7
- bytes: number;
8
- moduleType: "cjs" | "esm" | "json";
9
- fileExt: ValidExts;
10
- is_jsx: boolean;
11
- is_entry: boolean;
12
- }
13
- type DepsFiles = DepsFile[];
14
- type PostProcessPlugin = {
15
- type: "post-process";
16
- async: true;
17
- func: (code: string, file?: string) => Promise<string>;
18
- name?: string;
19
- } | {
20
- type: "post-process";
21
- async: false;
22
- func: (code: string, file?: string) => string;
23
- name?: string;
24
- };
25
- type PreProcessPlugin = {
26
- type: "pre-process";
27
- async: true;
28
- func: (code: string, file?: string) => Promise<string>;
29
- name?: string;
30
- } | {
31
- type: "pre-process";
32
- async: false;
33
- func: (code: string, file?: string) => string;
34
- name?: string;
35
- };
36
- type DependencyPlugin = {
37
- type: "dependency";
38
- async: true;
39
- func: (depsFiles: DepsFiles, compilerOptions: ts6.CompilerOptions) => Promise<DepsFiles>;
40
- name?: string;
41
- } | {
42
- type: "dependency";
43
- async: false;
44
- func: (DepsFiles: DepsFiles, compilerOptions: ts6.CompilerOptions) => DepsFiles;
45
- name?: string;
46
- };
47
- type SuseePluginFunction = (...args: any[]) => DependencyPlugin | PostProcessPlugin | PreProcessPlugin;
48
- type SuseePlugin = DependencyPlugin | PostProcessPlugin | PreProcessPlugin;
1
+ import type { SuseePlugin, SuseePluginFunction } from "@suseejs/type";
49
2
  declare function bundle(entry: string): unknown;
50
3
  type OutputFormat = ("commonjs" | "esm")[];
51
4
  interface EntryPoint {
@@ -90,6 +43,10 @@ interface EntryPoint {
90
43
  * default - []
91
44
  */
92
45
  plugins?: (SuseePlugin | SuseePluginFunction)[];
46
+ /**
47
+ * Susee fails the build when duplicate top-level declarations are found across bundled files.
48
+ * Resolve those conflicts in source files before building.
49
+ */
93
50
  /**
94
51
  * When generating a dependency graph, Susee checks whether referenced npm modules are installed.
95
52
  * If a module is not installed in your project, Susee emits a warning message.
package/dist/index.d.mts CHANGED
@@ -1,51 +1,4 @@
1
- import ts6 from "@suseejs/ts6";
2
- import type { DepsFile, SuseePlugin, SuseePluginFunction, ValidExts } from "@suseejs/type";
3
- type ValidExts = ".js" | ".cjs" | ".mjs" | ".ts" | ".cts" | ".mts" | ".tsx" | ".jsx" | ".json";
4
- interface DepsFile {
5
- file: string;
6
- content: string;
7
- bytes: number;
8
- moduleType: "cjs" | "esm" | "json";
9
- fileExt: ValidExts;
10
- is_jsx: boolean;
11
- is_entry: boolean;
12
- }
13
- type DepsFiles = DepsFile[];
14
- type PostProcessPlugin = {
15
- type: "post-process";
16
- async: true;
17
- func: (code: string, file?: string) => Promise<string>;
18
- name?: string;
19
- } | {
20
- type: "post-process";
21
- async: false;
22
- func: (code: string, file?: string) => string;
23
- name?: string;
24
- };
25
- type PreProcessPlugin = {
26
- type: "pre-process";
27
- async: true;
28
- func: (code: string, file?: string) => Promise<string>;
29
- name?: string;
30
- } | {
31
- type: "pre-process";
32
- async: false;
33
- func: (code: string, file?: string) => string;
34
- name?: string;
35
- };
36
- type DependencyPlugin = {
37
- type: "dependency";
38
- async: true;
39
- func: (depsFiles: DepsFiles, compilerOptions: ts6.CompilerOptions) => Promise<DepsFiles>;
40
- name?: string;
41
- } | {
42
- type: "dependency";
43
- async: false;
44
- func: (DepsFiles: DepsFiles, compilerOptions: ts6.CompilerOptions) => DepsFiles;
45
- name?: string;
46
- };
47
- type SuseePluginFunction = (...args: any[]) => DependencyPlugin | PostProcessPlugin | PreProcessPlugin;
48
- type SuseePlugin = DependencyPlugin | PostProcessPlugin | PreProcessPlugin;
1
+ import type { SuseePlugin, SuseePluginFunction } from "@suseejs/type";
49
2
  declare function bundle(entry: string): unknown;
50
3
  type OutputFormat = ("commonjs" | "esm")[];
51
4
  interface EntryPoint {
@@ -90,6 +43,10 @@ interface EntryPoint {
90
43
  * default - []
91
44
  */
92
45
  plugins?: (SuseePlugin | SuseePluginFunction)[];
46
+ /**
47
+ * Susee fails the build when duplicate top-level declarations are found across bundled files.
48
+ * Resolve those conflicts in source files before building.
49
+ */
93
50
  /**
94
51
  * When generating a dependency graph, Susee checks whether referenced npm modules are installed.
95
52
  * If a module is not installed in your project, Susee emits a warning message.