@visulima/packem 1.19.0 → 1.19.2

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 (199) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +116 -107
  3. package/dist/builder/typedoc/index.cjs +3 -3
  4. package/dist/builder/typedoc/index.mjs +3 -3
  5. package/dist/cli/commands/build.d.mts +1 -4
  6. package/dist/cli/index.mjs +106 -103
  7. package/dist/config/index.d.cts +2 -8
  8. package/dist/config/index.d.mts +2 -8
  9. package/dist/config/index.d.ts +2 -8
  10. package/dist/config/preset/utils/infer-entries.d.mts +4 -5
  11. package/dist/config/utils/load-packem-config.d.mts +1 -1
  12. package/dist/constants.d.cts +5 -19
  13. package/dist/constants.d.mts +5 -19
  14. package/dist/constants.d.ts +5 -19
  15. package/dist/index.cjs +84 -81
  16. package/dist/index.d.cts +4 -10
  17. package/dist/index.d.mts +4 -10
  18. package/dist/index.d.ts +4 -10
  19. package/dist/index.mjs +85 -82
  20. package/dist/packem/build.d.cts +2 -5
  21. package/dist/packem/build.d.mts +2 -5
  22. package/dist/packem/build.d.ts +2 -5
  23. package/dist/packem/index.d.cts +5 -8
  24. package/dist/packem/index.d.mts +5 -8
  25. package/dist/packem/index.d.ts +5 -8
  26. package/dist/packem/utils/group-by-keys.d.cts +1 -1
  27. package/dist/packem/utils/group-by-keys.d.mts +1 -1
  28. package/dist/packem/utils/group-by-keys.d.ts +1 -1
  29. package/dist/packem_shared/Mime-BEcV1ESr.mjs +3 -0
  30. package/dist/packem_shared/Mime-UGY_zUAS.cjs +1 -0
  31. package/dist/packem_shared/{constants-CR0qfKZx.cjs → constants-DIrGIX0w.cjs} +1 -1
  32. package/dist/packem_shared/{constants-CwJdgxph.mjs → constants-Eq2rMfX-.mjs} +1 -1
  33. package/dist/packem_shared/{create-or-update-key-storage-Bm-Xu0uJ.mjs → create-or-update-key-storage-BATQud1F.mjs} +1 -1
  34. package/dist/packem_shared/create-or-update-key-storage-DKcZnYd5.cjs +3 -0
  35. package/dist/packem_shared/{url-I6Jx3crl.mjs → url-BJXna-1T.mjs} +1 -1
  36. package/dist/packem_shared/{url-DFE8cAA0.cjs → url-C84CQz1g.cjs} +1 -1
  37. package/dist/rollup/plugins/chunk-splitter/parse/types.d.cts +12 -12
  38. package/dist/rollup/plugins/chunk-splitter/parse/types.d.mts +12 -12
  39. package/dist/rollup/plugins/chunk-splitter/parse/types.d.ts +12 -12
  40. package/dist/rollup/plugins/cjs-interop.d.cts +2 -2
  41. package/dist/rollup/plugins/cjs-interop.d.mts +2 -2
  42. package/dist/rollup/plugins/cjs-interop.d.ts +2 -2
  43. package/dist/rollup/plugins/copy.d.cts +6 -8
  44. package/dist/rollup/plugins/copy.d.mts +6 -8
  45. package/dist/rollup/plugins/copy.d.ts +6 -8
  46. package/dist/rollup/plugins/css/loaders/less/index.cjs +1 -1
  47. package/dist/rollup/plugins/css/loaders/less/index.mjs +1 -1
  48. package/dist/rollup/plugins/css/loaders/less/types.d.cts +1 -1
  49. package/dist/rollup/plugins/css/loaders/less/types.d.mts +1 -1
  50. package/dist/rollup/plugins/css/loaders/less/types.d.ts +1 -1
  51. package/dist/rollup/plugins/css/loaders/lightningcss.cjs +2 -2
  52. package/dist/rollup/plugins/css/loaders/lightningcss.mjs +2 -2
  53. package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.cts +1 -1
  54. package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.mts +1 -1
  55. package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.ts +1 -1
  56. package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.cts +1 -1
  57. package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.mts +1 -1
  58. package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.ts +1 -1
  59. package/dist/rollup/plugins/css/loaders/postcss/import/index.d.cts +2 -2
  60. package/dist/rollup/plugins/css/loaders/postcss/import/index.d.mts +2 -2
  61. package/dist/rollup/plugins/css/loaders/postcss/import/index.d.ts +2 -2
  62. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.cts +2 -2
  63. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.mts +2 -2
  64. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.ts +2 -2
  65. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.cts +1 -1
  66. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.mts +1 -1
  67. package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.ts +1 -1
  68. package/dist/rollup/plugins/css/loaders/postcss/import/types.d.cts +33 -36
  69. package/dist/rollup/plugins/css/loaders/postcss/import/types.d.mts +33 -36
  70. package/dist/rollup/plugins/css/loaders/postcss/import/types.d.ts +33 -36
  71. package/dist/rollup/plugins/css/loaders/postcss/index.cjs +3 -3
  72. package/dist/rollup/plugins/css/loaders/postcss/index.mjs +3 -3
  73. package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.cts +1 -1
  74. package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.mts +1 -1
  75. package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.ts +1 -1
  76. package/dist/rollup/plugins/css/loaders/postcss/url/index.d.cts +1 -1
  77. package/dist/rollup/plugins/css/loaders/postcss/url/index.d.mts +1 -1
  78. package/dist/rollup/plugins/css/loaders/postcss/url/index.d.ts +1 -1
  79. package/dist/rollup/plugins/css/loaders/sass/index.cjs +6 -6
  80. package/dist/rollup/plugins/css/loaders/sass/index.mjs +7 -7
  81. package/dist/rollup/plugins/css/loaders/sass/types.d.cts +4 -4
  82. package/dist/rollup/plugins/css/loaders/sass/types.d.mts +4 -4
  83. package/dist/rollup/plugins/css/loaders/sass/types.d.ts +4 -4
  84. package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.cts +3 -3
  85. package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.mts +3 -3
  86. package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.ts +3 -3
  87. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.cts +2 -2
  88. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.mts +2 -2
  89. package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.ts +2 -2
  90. package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.cts +1 -1
  91. package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.mts +1 -1
  92. package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.ts +1 -1
  93. package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.cts +4 -4
  94. package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.mts +4 -4
  95. package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.ts +4 -4
  96. package/dist/rollup/plugins/css/loaders/types.d.cts +15 -15
  97. package/dist/rollup/plugins/css/loaders/types.d.mts +15 -15
  98. package/dist/rollup/plugins/css/loaders/types.d.ts +15 -15
  99. package/dist/rollup/plugins/css/minifiers/lightningcss.cjs +2 -2
  100. package/dist/rollup/plugins/css/minifiers/lightningcss.mjs +2 -2
  101. package/dist/rollup/plugins/css/minifiers/types.d.cts +4 -4
  102. package/dist/rollup/plugins/css/minifiers/types.d.mts +4 -4
  103. package/dist/rollup/plugins/css/minifiers/types.d.ts +4 -4
  104. package/dist/rollup/plugins/css/runtime/inject-css.cjs +1 -1
  105. package/dist/rollup/plugins/css/runtime/inject-css.d.cts +1 -1
  106. package/dist/rollup/plugins/css/runtime/inject-css.d.mts +1 -1
  107. package/dist/rollup/plugins/css/runtime/inject-css.d.ts +1 -1
  108. package/dist/rollup/plugins/css/runtime/inject-css.mjs +1 -1
  109. package/dist/rollup/plugins/css/types.d.cts +75 -75
  110. package/dist/rollup/plugins/css/types.d.mts +75 -75
  111. package/dist/rollup/plugins/css/types.d.ts +75 -75
  112. package/dist/rollup/plugins/css/utils/load-module.d.cts +2 -2
  113. package/dist/rollup/plugins/css/utils/load-module.d.mts +2 -2
  114. package/dist/rollup/plugins/css/utils/load-module.d.ts +2 -2
  115. package/dist/rollup/plugins/css/utils/url.d.cts +2 -3
  116. package/dist/rollup/plugins/css/utils/url.d.mts +2 -3
  117. package/dist/rollup/plugins/css/utils/url.d.ts +2 -3
  118. package/dist/rollup/plugins/esbuild/get-render-chunk.d.cts +2 -2
  119. package/dist/rollup/plugins/esbuild/get-render-chunk.d.mts +2 -2
  120. package/dist/rollup/plugins/esbuild/get-render-chunk.d.ts +2 -2
  121. package/dist/rollup/plugins/esbuild/index.cjs +1 -1
  122. package/dist/rollup/plugins/esbuild/index.mjs +2 -2
  123. package/dist/rollup/plugins/esbuild/types.d.cts +18 -18
  124. package/dist/rollup/plugins/esbuild/types.d.mts +18 -18
  125. package/dist/rollup/plugins/esbuild/types.d.ts +18 -18
  126. package/dist/rollup/plugins/jsx-remove-attributes.d.cts +2 -2
  127. package/dist/rollup/plugins/jsx-remove-attributes.d.mts +2 -2
  128. package/dist/rollup/plugins/jsx-remove-attributes.d.ts +2 -2
  129. package/dist/rollup/plugins/oxc/oxc-resolve.d.cts +2 -2
  130. package/dist/rollup/plugins/oxc/oxc-resolve.d.mts +2 -2
  131. package/dist/rollup/plugins/oxc/oxc-resolve.d.ts +2 -2
  132. package/dist/rollup/plugins/oxc/oxc-transformer.cjs +1 -1
  133. package/dist/rollup/plugins/oxc/oxc-transformer.mjs +1 -1
  134. package/dist/rollup/plugins/oxc/types.d.cts +5 -5
  135. package/dist/rollup/plugins/oxc/types.d.mts +5 -5
  136. package/dist/rollup/plugins/oxc/types.d.ts +5 -5
  137. package/dist/rollup/plugins/plugin-cache.d.cts +4 -5
  138. package/dist/rollup/plugins/plugin-cache.d.mts +4 -5
  139. package/dist/rollup/plugins/plugin-cache.d.ts +4 -5
  140. package/dist/rollup/plugins/resolve-externals-plugin.d.cts +3 -5
  141. package/dist/rollup/plugins/resolve-externals-plugin.d.mts +3 -5
  142. package/dist/rollup/plugins/resolve-externals-plugin.d.ts +3 -5
  143. package/dist/rollup/plugins/sucrase/index.cjs +1 -1
  144. package/dist/rollup/plugins/sucrase/index.mjs +1 -1
  145. package/dist/rollup/plugins/swc/swc-plugin.cjs +1 -1
  146. package/dist/rollup/plugins/swc/swc-plugin.mjs +1 -1
  147. package/dist/rollup/plugins/swc/types.d.cts +2 -2
  148. package/dist/rollup/plugins/swc/types.d.mts +2 -2
  149. package/dist/rollup/plugins/swc/types.d.ts +2 -2
  150. package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.cts +0 -1
  151. package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.mts +0 -1
  152. package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.ts +0 -1
  153. package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.cts +1 -1
  154. package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.mts +1 -1
  155. package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.ts +1 -1
  156. package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.cts +2 -2
  157. package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.mts +2 -2
  158. package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.ts +2 -2
  159. package/dist/rollup/plugins/url.d.cts +4 -13
  160. package/dist/rollup/plugins/url.d.mts +4 -13
  161. package/dist/rollup/plugins/url.d.ts +4 -13
  162. package/dist/rollup/utils/chunks/create-split-chunks.d.cts +1 -1
  163. package/dist/rollup/utils/chunks/create-split-chunks.d.mts +1 -1
  164. package/dist/rollup/utils/chunks/create-split-chunks.d.ts +1 -1
  165. package/dist/rollup/utils/get-hash.d.cts +1 -1
  166. package/dist/rollup/utils/get-hash.d.mts +1 -1
  167. package/dist/rollup/utils/get-hash.d.ts +1 -1
  168. package/dist/rollup/utils/svg-encoder.d.cts +4 -0
  169. package/dist/rollup/utils/svg-encoder.d.mts +2 -0
  170. package/dist/rollup/utils/svg-encoder.d.ts +4 -0
  171. package/dist/types.d.cts +213 -215
  172. package/dist/types.d.mts +213 -215
  173. package/dist/types.d.ts +213 -215
  174. package/dist/utils/extract-export-filenames.d.cts +2 -2
  175. package/dist/utils/extract-export-filenames.d.mts +2 -2
  176. package/dist/utils/extract-export-filenames.d.ts +2 -2
  177. package/dist/utils/file-cache.d.cts +2 -1
  178. package/dist/utils/file-cache.d.mts +2 -1
  179. package/dist/utils/file-cache.d.ts +2 -1
  180. package/dist/utils/get-package-side-effect.d.cts +1 -1
  181. package/dist/utils/get-package-side-effect.d.mts +1 -1
  182. package/dist/utils/get-package-side-effect.d.ts +1 -1
  183. package/dist/utils/kill-process.d.cts +4 -5
  184. package/dist/utils/kill-process.d.mts +4 -5
  185. package/dist/utils/kill-process.d.ts +4 -5
  186. package/dist/utils/replace-content-within-marker.d.cts +2 -2
  187. package/dist/utils/replace-content-within-marker.d.mts +2 -2
  188. package/dist/utils/replace-content-within-marker.d.ts +2 -2
  189. package/files.d.ts +40 -0
  190. package/package.json +28 -28
  191. package/dist/packem_shared/Mime-DDqfACcK.cjs +0 -1
  192. package/dist/packem_shared/Mime-DfuxWtpt.mjs +0 -3
  193. package/dist/packem_shared/create-or-update-key-storage-mzqiq3Nk.cjs +0 -3
  194. /package/dist/utils/{levenstein.d.cts → find-alternatives.d.cts} +0 -0
  195. /package/dist/utils/{levenstein.d.mts → find-alternatives.d.mts} +0 -0
  196. /package/dist/utils/{levenstein.d.ts → find-alternatives.d.ts} +0 -0
  197. /package/dist/utils/{memoize.d.cts → memoize-by-key.d.cts} +0 -0
  198. /package/dist/utils/{memoize.d.mts → memoize-by-key.d.mts} +0 -0
  199. /package/dist/utils/{memoize.d.ts → memoize-by-key.d.ts} +0 -0
@@ -3,10 +3,8 @@ export type { BuildConfig, BuildConfigFunction, BuildHooks, BuildPreset } from "
3
3
  /**
4
4
  * Defines a build configuration for Packem.
5
5
  * Supports both static configuration objects and dynamic configuration functions.
6
- *
7
- * @param config - Static build configuration object or function returning configuration
6
+ * @param config Static build configuration object or function returning configuration
8
7
  * @returns The provided configuration
9
- *
10
8
  * @example
11
9
  * ```typescript
12
10
  * // Static configuration
@@ -21,17 +19,14 @@ export type { BuildConfig, BuildConfigFunction, BuildHooks, BuildPreset } from "
21
19
  * outDir: env === 'production' ? './dist' : './dev'
22
20
  * }));
23
21
  * ```
24
- *
25
22
  * @public
26
23
  */
27
24
  export declare const defineConfig: (config: BuildConfig | BuildConfigFunction) => BuildConfig | BuildConfigFunction;
28
25
  /**
29
26
  * Defines a build preset for Packem.
30
27
  * Build presets provide reusable configuration templates that can be shared across projects.
31
- *
32
- * @param preset - Build preset configuration
28
+ * @param preset Build preset configuration
33
29
  * @returns The provided preset configuration
34
- *
35
30
  * @example
36
31
  * ```typescript
37
32
  * export default definePreset({
@@ -47,7 +42,6 @@ export declare const defineConfig: (config: BuildConfig | BuildConfigFunction) =
47
42
  * }
48
43
  * });
49
44
  * ```
50
- *
51
45
  * @public
52
46
  */
53
47
  export declare const definePreset: (preset: BuildPreset) => BuildPreset;
@@ -3,10 +3,8 @@ export type { BuildConfig, BuildConfigFunction, BuildHooks, BuildPreset } from "
3
3
  /**
4
4
  * Defines a build configuration for Packem.
5
5
  * Supports both static configuration objects and dynamic configuration functions.
6
- *
7
- * @param config - Static build configuration object or function returning configuration
6
+ * @param config Static build configuration object or function returning configuration
8
7
  * @returns The provided configuration
9
- *
10
8
  * @example
11
9
  * ```typescript
12
10
  * // Static configuration
@@ -21,17 +19,14 @@ export type { BuildConfig, BuildConfigFunction, BuildHooks, BuildPreset } from "
21
19
  * outDir: env === 'production' ? './dist' : './dev'
22
20
  * }));
23
21
  * ```
24
- *
25
22
  * @public
26
23
  */
27
24
  export declare const defineConfig: (config: BuildConfig | BuildConfigFunction) => BuildConfig | BuildConfigFunction;
28
25
  /**
29
26
  * Defines a build preset for Packem.
30
27
  * Build presets provide reusable configuration templates that can be shared across projects.
31
- *
32
- * @param preset - Build preset configuration
28
+ * @param preset Build preset configuration
33
29
  * @returns The provided preset configuration
34
- *
35
30
  * @example
36
31
  * ```typescript
37
32
  * export default definePreset({
@@ -47,7 +42,6 @@ export declare const defineConfig: (config: BuildConfig | BuildConfigFunction) =
47
42
  * }
48
43
  * });
49
44
  * ```
50
- *
51
45
  * @public
52
46
  */
53
47
  export declare const definePreset: (preset: BuildPreset) => BuildPreset;
@@ -3,10 +3,8 @@ export type { BuildConfig, BuildConfigFunction, BuildHooks, BuildPreset } from "
3
3
  /**
4
4
  * Defines a build configuration for Packem.
5
5
  * Supports both static configuration objects and dynamic configuration functions.
6
- *
7
- * @param config - Static build configuration object or function returning configuration
6
+ * @param config Static build configuration object or function returning configuration
8
7
  * @returns The provided configuration
9
- *
10
8
  * @example
11
9
  * ```typescript
12
10
  * // Static configuration
@@ -21,17 +19,14 @@ export type { BuildConfig, BuildConfigFunction, BuildHooks, BuildPreset } from "
21
19
  * outDir: env === 'production' ? './dist' : './dev'
22
20
  * }));
23
21
  * ```
24
- *
25
22
  * @public
26
23
  */
27
24
  export declare const defineConfig: (config: BuildConfig | BuildConfigFunction) => BuildConfig | BuildConfigFunction;
28
25
  /**
29
26
  * Defines a build preset for Packem.
30
27
  * Build presets provide reusable configuration templates that can be shared across projects.
31
- *
32
- * @param preset - Build preset configuration
28
+ * @param preset Build preset configuration
33
29
  * @returns The provided preset configuration
34
- *
35
30
  * @example
36
31
  * ```typescript
37
32
  * export default definePreset({
@@ -47,7 +42,6 @@ export declare const defineConfig: (config: BuildConfig | BuildConfigFunction) =
47
42
  * }
48
43
  * });
49
44
  * ```
50
- *
51
45
  * @public
52
46
  */
53
47
  export declare const definePreset: (preset: BuildPreset) => BuildPreset;
@@ -2,11 +2,10 @@ import type { PackageJson } from "@visulima/package";
2
2
  import type { BuildContext, InferEntriesResult } from "../../../types.d.mts";
3
3
  /**
4
4
  * Infer entries from package files.
5
- *
6
- * @param {PackageJson} packageJson
7
- * @param {string[]} sourceFiles A list of source files to use for inferring entries.
8
- * @param {BuildContext} context
9
- * @returns {InferEntriesResult}
5
+ * @param packageJson
6
+ * @param sourceFiles A list of source files to use for inferring entries.
7
+ * @param context
8
+ * @returns
10
9
  */
11
10
  declare const inferEntries: (packageJson: PackageJson, sourceFiles: string[], context: BuildContext) => InferEntriesResult;
12
11
  export default inferEntries;
@@ -1,5 +1,5 @@
1
- import type { BuildConfig, Environment, Mode } from "../../types.d.mts";
2
1
  import type { Jiti } from "jiti";
2
+ import type { BuildConfig, Environment, Mode } from "../../types.d.mts";
3
3
  declare const loadPackemConfig: (jiti: Jiti, rootDirectory: string, environment: Environment, mode: Mode, configPath?: string) => Promise<{
4
4
  config: BuildConfig;
5
5
  path: string;
@@ -2,11 +2,9 @@ import type { Loader } from "esbuild";
2
2
  /**
3
3
  * Default file extensions that Packem will process.
4
4
  * Includes JavaScript (ES modules and CommonJS), TypeScript, and their respective JSX/TSX variants.
5
- *
6
5
  * @remarks
7
6
  * These extensions are used to determine which files should be processed by the bundler.
8
7
  * The order of extensions matters for resolution priority.
9
- *
10
8
  * @example
11
9
  * ```ts
12
10
  * // Will match files like:
@@ -19,11 +17,9 @@ export declare const DEFAULT_EXTENSIONS: string[];
19
17
  /**
20
18
  * Default esbuild loaders configuration for different file extensions.
21
19
  * Maps file extensions to their corresponding esbuild loader type.
22
- *
23
20
  * @remarks
24
21
  * - 'file' loader is used for static assets that should be emitted as-is
25
22
  * - 'js', 'jsx', 'ts', 'tsx' loaders are used for their respective file types
26
- *
27
23
  * @example
28
24
  * ```ts
29
25
  * // Usage:
@@ -34,21 +30,18 @@ export declare const DEFAULT_LOADERS: Record<string, Loader>;
34
30
  /**
35
31
  * Constant representing the production environment.
36
32
  * Used for environment-specific optimizations and configurations.
37
- *
38
33
  * @constant
39
34
  */
40
- export declare const PRODUCTION_ENV = "production";
35
+ export declare const PRODUCTION_ENV: string;
41
36
  /**
42
37
  * Constant representing the development environment.
43
38
  * Used for environment-specific features like source maps and debug information.
44
- *
45
39
  * @constant
46
40
  */
47
- export declare const DEVELOPMENT_ENV = "development";
41
+ export declare const DEVELOPMENT_ENV: string;
48
42
  /**
49
43
  * Set of runtime export conventions for special handling.
50
44
  * These conventions determine how exports are processed for different runtime targets.
51
- *
52
45
  * @remarks
53
46
  * Currently supports:
54
47
  * - react-server: For React Server Components
@@ -58,7 +51,6 @@ export declare const DEVELOPMENT_ENV = "development";
58
51
  export declare const RUNTIME_EXPORT_CONVENTIONS: Set<string>;
59
52
  /**
60
53
  * Combined set of all special export conventions including runtime and environment-specific ones.
61
- *
62
54
  * @remarks
63
55
  * Includes both runtime conventions and environment types (production/development).
64
56
  * Used for determining special processing rules during bundling.
@@ -66,7 +58,6 @@ export declare const RUNTIME_EXPORT_CONVENTIONS: Set<string>;
66
58
  export declare const SPECIAL_EXPORT_CONVENTIONS: Set<string>;
67
59
  /**
68
60
  * Regular expression to exclude node_modules from certain processing steps.
69
- *
70
61
  * @remarks
71
62
  * Used to skip processing of node_modules files when not necessary,
72
63
  * improving build performance.
@@ -74,38 +65,33 @@ export declare const SPECIAL_EXPORT_CONVENTIONS: Set<string>;
74
65
  export declare const EXCLUDE_REGEXP: RegExp;
75
66
  /**
76
67
  * Regular expression to match file extensions, including TypeScript declaration files.
77
- *
78
68
  * @remarks
79
69
  * Used for file extension detection and manipulation.
80
70
  * Matches:
81
71
  * - TypeScript declaration files (.d.ts, .d.mts, .d.cts)
82
72
  * - Any file extension starting with a dot
83
73
  */
84
- export declare const ENDING_RE: RegExp;
74
+ export declare const ENDING_REGEX: RegExp;
85
75
  /**
86
76
  * Directory name for storing chunk files generated by Packem.
87
- *
88
77
  * @remarks
89
78
  * This directory contains dynamically generated chunk files for code splitting.
90
79
  */
91
- export declare const CHUNKS_PACKEM_FOLDER = "packem_chunks";
80
+ export declare const CHUNKS_PACKEM_FOLDER: string;
92
81
  /**
93
82
  * Directory name for storing shared resources.
94
- *
95
83
  * @remarks
96
84
  * This directory contains shared resources that are used across multiple chunks
97
85
  * or entry points.
98
86
  */
99
- export declare const SHARED_PACKEM_FOLDER = "packem_shared";
87
+ export declare const SHARED_PACKEM_FOLDER: string;
100
88
  /**
101
89
  * Regular expression to match file extensions that can be transformed.
102
- *
103
90
  * @remarks
104
91
  * Matches JavaScript and TypeScript files, including their module variants:
105
92
  * - .js, .mjs, .cjs
106
93
  * - .ts, .mts, .cts
107
94
  * - .jsx, .tsx (and their module variants)
108
- *
109
95
  * @example
110
96
  * ```ts
111
97
  * const canTransform = ALLOWED_TRANSFORM_EXTENSIONS_REGEX.test("file.ts"); // true
@@ -2,11 +2,9 @@ import type { Loader } from "esbuild";
2
2
  /**
3
3
  * Default file extensions that Packem will process.
4
4
  * Includes JavaScript (ES modules and CommonJS), TypeScript, and their respective JSX/TSX variants.
5
- *
6
5
  * @remarks
7
6
  * These extensions are used to determine which files should be processed by the bundler.
8
7
  * The order of extensions matters for resolution priority.
9
- *
10
8
  * @example
11
9
  * ```ts
12
10
  * // Will match files like:
@@ -19,11 +17,9 @@ export declare const DEFAULT_EXTENSIONS: string[];
19
17
  /**
20
18
  * Default esbuild loaders configuration for different file extensions.
21
19
  * Maps file extensions to their corresponding esbuild loader type.
22
- *
23
20
  * @remarks
24
21
  * - 'file' loader is used for static assets that should be emitted as-is
25
22
  * - 'js', 'jsx', 'ts', 'tsx' loaders are used for their respective file types
26
- *
27
23
  * @example
28
24
  * ```ts
29
25
  * // Usage:
@@ -34,21 +30,18 @@ export declare const DEFAULT_LOADERS: Record<string, Loader>;
34
30
  /**
35
31
  * Constant representing the production environment.
36
32
  * Used for environment-specific optimizations and configurations.
37
- *
38
33
  * @constant
39
34
  */
40
- export declare const PRODUCTION_ENV = "production";
35
+ export declare const PRODUCTION_ENV: string;
41
36
  /**
42
37
  * Constant representing the development environment.
43
38
  * Used for environment-specific features like source maps and debug information.
44
- *
45
39
  * @constant
46
40
  */
47
- export declare const DEVELOPMENT_ENV = "development";
41
+ export declare const DEVELOPMENT_ENV: string;
48
42
  /**
49
43
  * Set of runtime export conventions for special handling.
50
44
  * These conventions determine how exports are processed for different runtime targets.
51
- *
52
45
  * @remarks
53
46
  * Currently supports:
54
47
  * - react-server: For React Server Components
@@ -58,7 +51,6 @@ export declare const DEVELOPMENT_ENV = "development";
58
51
  export declare const RUNTIME_EXPORT_CONVENTIONS: Set<string>;
59
52
  /**
60
53
  * Combined set of all special export conventions including runtime and environment-specific ones.
61
- *
62
54
  * @remarks
63
55
  * Includes both runtime conventions and environment types (production/development).
64
56
  * Used for determining special processing rules during bundling.
@@ -66,7 +58,6 @@ export declare const RUNTIME_EXPORT_CONVENTIONS: Set<string>;
66
58
  export declare const SPECIAL_EXPORT_CONVENTIONS: Set<string>;
67
59
  /**
68
60
  * Regular expression to exclude node_modules from certain processing steps.
69
- *
70
61
  * @remarks
71
62
  * Used to skip processing of node_modules files when not necessary,
72
63
  * improving build performance.
@@ -74,38 +65,33 @@ export declare const SPECIAL_EXPORT_CONVENTIONS: Set<string>;
74
65
  export declare const EXCLUDE_REGEXP: RegExp;
75
66
  /**
76
67
  * Regular expression to match file extensions, including TypeScript declaration files.
77
- *
78
68
  * @remarks
79
69
  * Used for file extension detection and manipulation.
80
70
  * Matches:
81
71
  * - TypeScript declaration files (.d.ts, .d.mts, .d.cts)
82
72
  * - Any file extension starting with a dot
83
73
  */
84
- export declare const ENDING_RE: RegExp;
74
+ export declare const ENDING_REGEX: RegExp;
85
75
  /**
86
76
  * Directory name for storing chunk files generated by Packem.
87
- *
88
77
  * @remarks
89
78
  * This directory contains dynamically generated chunk files for code splitting.
90
79
  */
91
- export declare const CHUNKS_PACKEM_FOLDER = "packem_chunks";
80
+ export declare const CHUNKS_PACKEM_FOLDER: string;
92
81
  /**
93
82
  * Directory name for storing shared resources.
94
- *
95
83
  * @remarks
96
84
  * This directory contains shared resources that are used across multiple chunks
97
85
  * or entry points.
98
86
  */
99
- export declare const SHARED_PACKEM_FOLDER = "packem_shared";
87
+ export declare const SHARED_PACKEM_FOLDER: string;
100
88
  /**
101
89
  * Regular expression to match file extensions that can be transformed.
102
- *
103
90
  * @remarks
104
91
  * Matches JavaScript and TypeScript files, including their module variants:
105
92
  * - .js, .mjs, .cjs
106
93
  * - .ts, .mts, .cts
107
94
  * - .jsx, .tsx (and their module variants)
108
- *
109
95
  * @example
110
96
  * ```ts
111
97
  * const canTransform = ALLOWED_TRANSFORM_EXTENSIONS_REGEX.test("file.ts"); // true
@@ -2,11 +2,9 @@ import type { Loader } from "esbuild";
2
2
  /**
3
3
  * Default file extensions that Packem will process.
4
4
  * Includes JavaScript (ES modules and CommonJS), TypeScript, and their respective JSX/TSX variants.
5
- *
6
5
  * @remarks
7
6
  * These extensions are used to determine which files should be processed by the bundler.
8
7
  * The order of extensions matters for resolution priority.
9
- *
10
8
  * @example
11
9
  * ```ts
12
10
  * // Will match files like:
@@ -19,11 +17,9 @@ export declare const DEFAULT_EXTENSIONS: string[];
19
17
  /**
20
18
  * Default esbuild loaders configuration for different file extensions.
21
19
  * Maps file extensions to their corresponding esbuild loader type.
22
- *
23
20
  * @remarks
24
21
  * - 'file' loader is used for static assets that should be emitted as-is
25
22
  * - 'js', 'jsx', 'ts', 'tsx' loaders are used for their respective file types
26
- *
27
23
  * @example
28
24
  * ```ts
29
25
  * // Usage:
@@ -34,21 +30,18 @@ export declare const DEFAULT_LOADERS: Record<string, Loader>;
34
30
  /**
35
31
  * Constant representing the production environment.
36
32
  * Used for environment-specific optimizations and configurations.
37
- *
38
33
  * @constant
39
34
  */
40
- export declare const PRODUCTION_ENV = "production";
35
+ export declare const PRODUCTION_ENV: string;
41
36
  /**
42
37
  * Constant representing the development environment.
43
38
  * Used for environment-specific features like source maps and debug information.
44
- *
45
39
  * @constant
46
40
  */
47
- export declare const DEVELOPMENT_ENV = "development";
41
+ export declare const DEVELOPMENT_ENV: string;
48
42
  /**
49
43
  * Set of runtime export conventions for special handling.
50
44
  * These conventions determine how exports are processed for different runtime targets.
51
- *
52
45
  * @remarks
53
46
  * Currently supports:
54
47
  * - react-server: For React Server Components
@@ -58,7 +51,6 @@ export declare const DEVELOPMENT_ENV = "development";
58
51
  export declare const RUNTIME_EXPORT_CONVENTIONS: Set<string>;
59
52
  /**
60
53
  * Combined set of all special export conventions including runtime and environment-specific ones.
61
- *
62
54
  * @remarks
63
55
  * Includes both runtime conventions and environment types (production/development).
64
56
  * Used for determining special processing rules during bundling.
@@ -66,7 +58,6 @@ export declare const RUNTIME_EXPORT_CONVENTIONS: Set<string>;
66
58
  export declare const SPECIAL_EXPORT_CONVENTIONS: Set<string>;
67
59
  /**
68
60
  * Regular expression to exclude node_modules from certain processing steps.
69
- *
70
61
  * @remarks
71
62
  * Used to skip processing of node_modules files when not necessary,
72
63
  * improving build performance.
@@ -74,38 +65,33 @@ export declare const SPECIAL_EXPORT_CONVENTIONS: Set<string>;
74
65
  export declare const EXCLUDE_REGEXP: RegExp;
75
66
  /**
76
67
  * Regular expression to match file extensions, including TypeScript declaration files.
77
- *
78
68
  * @remarks
79
69
  * Used for file extension detection and manipulation.
80
70
  * Matches:
81
71
  * - TypeScript declaration files (.d.ts, .d.mts, .d.cts)
82
72
  * - Any file extension starting with a dot
83
73
  */
84
- export declare const ENDING_RE: RegExp;
74
+ export declare const ENDING_REGEX: RegExp;
85
75
  /**
86
76
  * Directory name for storing chunk files generated by Packem.
87
- *
88
77
  * @remarks
89
78
  * This directory contains dynamically generated chunk files for code splitting.
90
79
  */
91
- export declare const CHUNKS_PACKEM_FOLDER = "packem_chunks";
80
+ export declare const CHUNKS_PACKEM_FOLDER: string;
92
81
  /**
93
82
  * Directory name for storing shared resources.
94
- *
95
83
  * @remarks
96
84
  * This directory contains shared resources that are used across multiple chunks
97
85
  * or entry points.
98
86
  */
99
- export declare const SHARED_PACKEM_FOLDER = "packem_shared";
87
+ export declare const SHARED_PACKEM_FOLDER: string;
100
88
  /**
101
89
  * Regular expression to match file extensions that can be transformed.
102
- *
103
90
  * @remarks
104
91
  * Matches JavaScript and TypeScript files, including their module variants:
105
92
  * - .js, .mjs, .cjs
106
93
  * - .ts, .mts, .cts
107
94
  * - .jsx, .tsx (and their module variants)
108
- *
109
95
  * @example
110
96
  * ```ts
111
97
  * const canTransform = ALLOWED_TRANSFORM_EXTENSIONS_REGEX.test("file.ts"); // true