@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.
- package/CHANGELOG.md +37 -0
- package/README.md +116 -107
- package/dist/builder/typedoc/index.cjs +3 -3
- package/dist/builder/typedoc/index.mjs +3 -3
- package/dist/cli/commands/build.d.mts +1 -4
- package/dist/cli/index.mjs +106 -103
- package/dist/config/index.d.cts +2 -8
- package/dist/config/index.d.mts +2 -8
- package/dist/config/index.d.ts +2 -8
- package/dist/config/preset/utils/infer-entries.d.mts +4 -5
- package/dist/config/utils/load-packem-config.d.mts +1 -1
- package/dist/constants.d.cts +5 -19
- package/dist/constants.d.mts +5 -19
- package/dist/constants.d.ts +5 -19
- package/dist/index.cjs +84 -81
- package/dist/index.d.cts +4 -10
- package/dist/index.d.mts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.mjs +85 -82
- package/dist/packem/build.d.cts +2 -5
- package/dist/packem/build.d.mts +2 -5
- package/dist/packem/build.d.ts +2 -5
- package/dist/packem/index.d.cts +5 -8
- package/dist/packem/index.d.mts +5 -8
- package/dist/packem/index.d.ts +5 -8
- package/dist/packem/utils/group-by-keys.d.cts +1 -1
- package/dist/packem/utils/group-by-keys.d.mts +1 -1
- package/dist/packem/utils/group-by-keys.d.ts +1 -1
- package/dist/packem_shared/Mime-BEcV1ESr.mjs +3 -0
- package/dist/packem_shared/Mime-UGY_zUAS.cjs +1 -0
- package/dist/packem_shared/{constants-CR0qfKZx.cjs → constants-DIrGIX0w.cjs} +1 -1
- package/dist/packem_shared/{constants-CwJdgxph.mjs → constants-Eq2rMfX-.mjs} +1 -1
- package/dist/packem_shared/{create-or-update-key-storage-Bm-Xu0uJ.mjs → create-or-update-key-storage-BATQud1F.mjs} +1 -1
- package/dist/packem_shared/create-or-update-key-storage-DKcZnYd5.cjs +3 -0
- package/dist/packem_shared/{url-I6Jx3crl.mjs → url-BJXna-1T.mjs} +1 -1
- package/dist/packem_shared/{url-DFE8cAA0.cjs → url-C84CQz1g.cjs} +1 -1
- package/dist/rollup/plugins/chunk-splitter/parse/types.d.cts +12 -12
- package/dist/rollup/plugins/chunk-splitter/parse/types.d.mts +12 -12
- package/dist/rollup/plugins/chunk-splitter/parse/types.d.ts +12 -12
- package/dist/rollup/plugins/cjs-interop.d.cts +2 -2
- package/dist/rollup/plugins/cjs-interop.d.mts +2 -2
- package/dist/rollup/plugins/cjs-interop.d.ts +2 -2
- package/dist/rollup/plugins/copy.d.cts +6 -8
- package/dist/rollup/plugins/copy.d.mts +6 -8
- package/dist/rollup/plugins/copy.d.ts +6 -8
- package/dist/rollup/plugins/css/loaders/less/index.cjs +1 -1
- package/dist/rollup/plugins/css/loaders/less/index.mjs +1 -1
- package/dist/rollup/plugins/css/loaders/less/types.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/less/types.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/less/types.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/lightningcss.cjs +2 -2
- package/dist/rollup/plugins/css/loaders/lightningcss.mjs +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/apply-styles.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/import-resolve.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/index.d.cts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/index.d.mts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/index.d.ts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.cts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.mts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-styles.d.ts +2 -2
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/parser/parse-stylesheet.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/import/types.d.cts +33 -36
- package/dist/rollup/plugins/css/loaders/postcss/import/types.d.mts +33 -36
- package/dist/rollup/plugins/css/loaders/postcss/import/types.d.ts +33 -36
- package/dist/rollup/plugins/css/loaders/postcss/index.cjs +3 -3
- package/dist/rollup/plugins/css/loaders/postcss/index.mjs +3 -3
- package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/modules/index.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/url/index.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/url/index.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/postcss/url/index.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/sass/index.cjs +6 -6
- package/dist/rollup/plugins/css/loaders/sass/index.mjs +7 -7
- package/dist/rollup/plugins/css/loaders/sass/types.d.cts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/types.d.mts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/types.d.ts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.cts +3 -3
- package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.mts +3 -3
- package/dist/rollup/plugins/css/loaders/sass/utils/get-compile-function.d.ts +3 -3
- package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.cts +2 -2
- package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.mts +2 -2
- package/dist/rollup/plugins/css/loaders/sass/utils/get-sass-implementation.d.ts +2 -2
- package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.cts +1 -1
- package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.mts +1 -1
- package/dist/rollup/plugins/css/loaders/sass/utils/resolve-syntax.d.ts +1 -1
- package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.cts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.mts +4 -4
- package/dist/rollup/plugins/css/loaders/sass/utils/sass-error-factory.d.ts +4 -4
- package/dist/rollup/plugins/css/loaders/types.d.cts +15 -15
- package/dist/rollup/plugins/css/loaders/types.d.mts +15 -15
- package/dist/rollup/plugins/css/loaders/types.d.ts +15 -15
- package/dist/rollup/plugins/css/minifiers/lightningcss.cjs +2 -2
- package/dist/rollup/plugins/css/minifiers/lightningcss.mjs +2 -2
- package/dist/rollup/plugins/css/minifiers/types.d.cts +4 -4
- package/dist/rollup/plugins/css/minifiers/types.d.mts +4 -4
- package/dist/rollup/plugins/css/minifiers/types.d.ts +4 -4
- package/dist/rollup/plugins/css/runtime/inject-css.cjs +1 -1
- package/dist/rollup/plugins/css/runtime/inject-css.d.cts +1 -1
- package/dist/rollup/plugins/css/runtime/inject-css.d.mts +1 -1
- package/dist/rollup/plugins/css/runtime/inject-css.d.ts +1 -1
- package/dist/rollup/plugins/css/runtime/inject-css.mjs +1 -1
- package/dist/rollup/plugins/css/types.d.cts +75 -75
- package/dist/rollup/plugins/css/types.d.mts +75 -75
- package/dist/rollup/plugins/css/types.d.ts +75 -75
- package/dist/rollup/plugins/css/utils/load-module.d.cts +2 -2
- package/dist/rollup/plugins/css/utils/load-module.d.mts +2 -2
- package/dist/rollup/plugins/css/utils/load-module.d.ts +2 -2
- package/dist/rollup/plugins/css/utils/url.d.cts +2 -3
- package/dist/rollup/plugins/css/utils/url.d.mts +2 -3
- package/dist/rollup/plugins/css/utils/url.d.ts +2 -3
- package/dist/rollup/plugins/esbuild/get-render-chunk.d.cts +2 -2
- package/dist/rollup/plugins/esbuild/get-render-chunk.d.mts +2 -2
- package/dist/rollup/plugins/esbuild/get-render-chunk.d.ts +2 -2
- package/dist/rollup/plugins/esbuild/index.cjs +1 -1
- package/dist/rollup/plugins/esbuild/index.mjs +2 -2
- package/dist/rollup/plugins/esbuild/types.d.cts +18 -18
- package/dist/rollup/plugins/esbuild/types.d.mts +18 -18
- package/dist/rollup/plugins/esbuild/types.d.ts +18 -18
- package/dist/rollup/plugins/jsx-remove-attributes.d.cts +2 -2
- package/dist/rollup/plugins/jsx-remove-attributes.d.mts +2 -2
- package/dist/rollup/plugins/jsx-remove-attributes.d.ts +2 -2
- package/dist/rollup/plugins/oxc/oxc-resolve.d.cts +2 -2
- package/dist/rollup/plugins/oxc/oxc-resolve.d.mts +2 -2
- package/dist/rollup/plugins/oxc/oxc-resolve.d.ts +2 -2
- package/dist/rollup/plugins/oxc/oxc-transformer.cjs +1 -1
- package/dist/rollup/plugins/oxc/oxc-transformer.mjs +1 -1
- package/dist/rollup/plugins/oxc/types.d.cts +5 -5
- package/dist/rollup/plugins/oxc/types.d.mts +5 -5
- package/dist/rollup/plugins/oxc/types.d.ts +5 -5
- package/dist/rollup/plugins/plugin-cache.d.cts +4 -5
- package/dist/rollup/plugins/plugin-cache.d.mts +4 -5
- package/dist/rollup/plugins/plugin-cache.d.ts +4 -5
- package/dist/rollup/plugins/resolve-externals-plugin.d.cts +3 -5
- package/dist/rollup/plugins/resolve-externals-plugin.d.mts +3 -5
- package/dist/rollup/plugins/resolve-externals-plugin.d.ts +3 -5
- package/dist/rollup/plugins/sucrase/index.cjs +1 -1
- package/dist/rollup/plugins/sucrase/index.mjs +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.cjs +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.mjs +1 -1
- package/dist/rollup/plugins/swc/types.d.cts +2 -2
- package/dist/rollup/plugins/swc/types.d.mts +2 -2
- package/dist/rollup/plugins/swc/types.d.ts +2 -2
- package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.cts +0 -1
- package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.mts +0 -1
- package/dist/rollup/plugins/typescript/resolve-tsconfig-root-dirs.d.ts +0 -1
- package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.cts +1 -1
- package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.mts +1 -1
- package/dist/rollup/plugins/typescript/resolve-typescript-mjs-cjs.d.ts +1 -1
- package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.cts +2 -2
- package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.mts +2 -2
- package/dist/rollup/plugins/typescript/utils/patch-cjs-default-export.d.ts +2 -2
- package/dist/rollup/plugins/url.d.cts +4 -13
- package/dist/rollup/plugins/url.d.mts +4 -13
- package/dist/rollup/plugins/url.d.ts +4 -13
- package/dist/rollup/utils/chunks/create-split-chunks.d.cts +1 -1
- package/dist/rollup/utils/chunks/create-split-chunks.d.mts +1 -1
- package/dist/rollup/utils/chunks/create-split-chunks.d.ts +1 -1
- package/dist/rollup/utils/get-hash.d.cts +1 -1
- package/dist/rollup/utils/get-hash.d.mts +1 -1
- package/dist/rollup/utils/get-hash.d.ts +1 -1
- package/dist/rollup/utils/svg-encoder.d.cts +4 -0
- package/dist/rollup/utils/svg-encoder.d.mts +2 -0
- package/dist/rollup/utils/svg-encoder.d.ts +4 -0
- package/dist/types.d.cts +213 -215
- package/dist/types.d.mts +213 -215
- package/dist/types.d.ts +213 -215
- package/dist/utils/extract-export-filenames.d.cts +2 -2
- package/dist/utils/extract-export-filenames.d.mts +2 -2
- package/dist/utils/extract-export-filenames.d.ts +2 -2
- package/dist/utils/file-cache.d.cts +2 -1
- package/dist/utils/file-cache.d.mts +2 -1
- package/dist/utils/file-cache.d.ts +2 -1
- package/dist/utils/get-package-side-effect.d.cts +1 -1
- package/dist/utils/get-package-side-effect.d.mts +1 -1
- package/dist/utils/get-package-side-effect.d.ts +1 -1
- package/dist/utils/kill-process.d.cts +4 -5
- package/dist/utils/kill-process.d.mts +4 -5
- package/dist/utils/kill-process.d.ts +4 -5
- package/dist/utils/replace-content-within-marker.d.cts +2 -2
- package/dist/utils/replace-content-within-marker.d.mts +2 -2
- package/dist/utils/replace-content-within-marker.d.ts +2 -2
- package/files.d.ts +40 -0
- package/package.json +28 -28
- package/dist/packem_shared/Mime-DDqfACcK.cjs +0 -1
- package/dist/packem_shared/Mime-DfuxWtpt.mjs +0 -3
- package/dist/packem_shared/create-or-update-key-storage-mzqiq3Nk.cjs +0 -3
- /package/dist/utils/{levenstein.d.cts → find-alternatives.d.cts} +0 -0
- /package/dist/utils/{levenstein.d.mts → find-alternatives.d.mts} +0 -0
- /package/dist/utils/{levenstein.d.ts → find-alternatives.d.ts} +0 -0
- /package/dist/utils/{memoize.d.cts → memoize-by-key.d.cts} +0 -0
- /package/dist/utils/{memoize.d.mts → memoize-by-key.d.mts} +0 -0
- /package/dist/utils/{memoize.d.ts → memoize-by-key.d.ts} +0 -0
package/dist/config/index.d.cts
CHANGED
|
@@ -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;
|
package/dist/config/index.d.mts
CHANGED
|
@@ -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;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -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
|
|
7
|
-
* @param
|
|
8
|
-
* @
|
|
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;
|
package/dist/constants.d.cts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
package/dist/constants.d.mts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
package/dist/constants.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|