@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { FilterPattern } from "@rollup/pluginutils";
|
|
2
2
|
import type { JsxOptions, TransformOptions } from "oxc-transform";
|
|
3
|
-
export type InternalOXCTransformPluginConfig = {
|
|
3
|
+
export type InternalOXCTransformPluginConfig = TransformOptions & {
|
|
4
4
|
exclude?: FilterPattern;
|
|
5
5
|
include?: FilterPattern;
|
|
6
|
-
}
|
|
7
|
-
export type OXCTransformPluginConfig = {
|
|
6
|
+
};
|
|
7
|
+
export type OXCTransformPluginConfig = Omit<TransformOptions, "cwd" | "sourcemap" | "target" | "typescript"> & {
|
|
8
8
|
exclude?: FilterPattern;
|
|
9
9
|
include?: FilterPattern;
|
|
10
10
|
/** Configure how TSX and JSX are transformed. */
|
|
11
|
-
jsx?:
|
|
12
|
-
}
|
|
11
|
+
jsx?: Omit<JsxOptions, "refresh"> | "preserve";
|
|
12
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { FilterPattern } from "@rollup/pluginutils";
|
|
2
2
|
import type { JsxOptions, TransformOptions } from "oxc-transform";
|
|
3
|
-
export type InternalOXCTransformPluginConfig = {
|
|
3
|
+
export type InternalOXCTransformPluginConfig = TransformOptions & {
|
|
4
4
|
exclude?: FilterPattern;
|
|
5
5
|
include?: FilterPattern;
|
|
6
|
-
}
|
|
7
|
-
export type OXCTransformPluginConfig = {
|
|
6
|
+
};
|
|
7
|
+
export type OXCTransformPluginConfig = Omit<TransformOptions, "cwd" | "sourcemap" | "target" | "typescript"> & {
|
|
8
8
|
exclude?: FilterPattern;
|
|
9
9
|
include?: FilterPattern;
|
|
10
10
|
/** Configure how TSX and JSX are transformed. */
|
|
11
|
-
jsx?:
|
|
12
|
-
}
|
|
11
|
+
jsx?: Omit<JsxOptions, "refresh"> | "preserve";
|
|
12
|
+
};
|
|
@@ -2,11 +2,10 @@ import type { Plugin } from "rollup";
|
|
|
2
2
|
import type FileCache from "../../utils/file-cache.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* Wrap a Rollup plugin to add caching to various hooks.
|
|
5
|
-
*
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @
|
|
9
|
-
* @returns {Plugin}
|
|
5
|
+
* @param plugin
|
|
6
|
+
* @param cache
|
|
7
|
+
* @param subDirectory
|
|
8
|
+
* @returns
|
|
10
9
|
*/
|
|
11
10
|
declare const cachingPlugin: (plugin: Plugin, cache: FileCache, subDirectory?: string) => Plugin;
|
|
12
11
|
|
|
@@ -2,11 +2,10 @@ import type { Plugin } from "rollup";
|
|
|
2
2
|
import type FileCache from "../../utils/file-cache.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* Wrap a Rollup plugin to add caching to various hooks.
|
|
5
|
-
*
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @
|
|
9
|
-
* @returns {Plugin}
|
|
5
|
+
* @param plugin
|
|
6
|
+
* @param cache
|
|
7
|
+
* @param subDirectory
|
|
8
|
+
* @returns
|
|
10
9
|
*/
|
|
11
10
|
declare const cachingPlugin: (plugin: Plugin, cache: FileCache, subDirectory?: string) => Plugin;
|
|
12
11
|
export default cachingPlugin;
|
|
@@ -2,11 +2,10 @@ import type { Plugin } from "rollup";
|
|
|
2
2
|
import type FileCache from "../../utils/file-cache.d.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Wrap a Rollup plugin to add caching to various hooks.
|
|
5
|
-
*
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @
|
|
9
|
-
* @returns {Plugin}
|
|
5
|
+
* @param plugin
|
|
6
|
+
* @param cache
|
|
7
|
+
* @param subDirectory
|
|
8
|
+
* @returns
|
|
10
9
|
*/
|
|
11
10
|
declare const cachingPlugin: (plugin: Plugin, cache: FileCache, subDirectory?: string) => Plugin;
|
|
12
11
|
|
|
@@ -3,7 +3,7 @@ import type { Pail } from "@visulima/pail";
|
|
|
3
3
|
import type { TsConfigResult } from "@visulima/tsconfig";
|
|
4
4
|
import type { Plugin } from "rollup";
|
|
5
5
|
import type { InternalBuildOptions } from '../../types.d.cts';
|
|
6
|
-
type MaybeFalsy<T> = T |
|
|
6
|
+
type MaybeFalsy<T> = T | false | null | undefined;
|
|
7
7
|
export type ResolveExternalsPluginOptions = {
|
|
8
8
|
/**
|
|
9
9
|
* Mark node built-in modules like `path`, `fs`... as external.
|
|
@@ -16,7 +16,6 @@ export type ResolveExternalsPluginOptions = {
|
|
|
16
16
|
* ignore will simply leave all builtins imports as written in your code.
|
|
17
17
|
*
|
|
18
18
|
* Note that scheme handling is always applied, regardless of the builtins options being enabled or not.
|
|
19
|
-
*
|
|
20
19
|
* @default true
|
|
21
20
|
*/
|
|
22
21
|
builtins?: boolean;
|
|
@@ -25,10 +24,9 @@ export type ResolveExternalsPluginOptions = {
|
|
|
25
24
|
* - `'add'` turns `'path'` to `'node:path'`
|
|
26
25
|
* - `'strip'` turns `'node:path'` to `'path'`
|
|
27
26
|
* - `'ignore'` leaves Node builtin names as-is
|
|
28
|
-
*
|
|
29
27
|
* @default "add"
|
|
30
28
|
*/
|
|
31
|
-
builtinsPrefix?: "add" | "
|
|
29
|
+
builtinsPrefix?: "add" | "ignore" | "strip";
|
|
32
30
|
/**
|
|
33
31
|
* Mark dependencies as external.
|
|
34
32
|
*
|
|
@@ -46,7 +44,7 @@ export type ResolveExternalsPluginOptions = {
|
|
|
46
44
|
*
|
|
47
45
|
* Defaults to `[]` (force exclude nothing).
|
|
48
46
|
*/
|
|
49
|
-
exclude?: MaybeFalsy<
|
|
47
|
+
exclude?: MaybeFalsy<RegExp | string>[];
|
|
50
48
|
/**
|
|
51
49
|
* Mark optionalDependencies as external.
|
|
52
50
|
*
|
|
@@ -3,7 +3,7 @@ import type { Pail } from "@visulima/pail";
|
|
|
3
3
|
import type { TsConfigResult } from "@visulima/tsconfig";
|
|
4
4
|
import type { Plugin } from "rollup";
|
|
5
5
|
import type { InternalBuildOptions } from '../../types.d.mts';
|
|
6
|
-
type MaybeFalsy<T> = T |
|
|
6
|
+
type MaybeFalsy<T> = T | false | null | undefined;
|
|
7
7
|
export type ResolveExternalsPluginOptions = {
|
|
8
8
|
/**
|
|
9
9
|
* Mark node built-in modules like `path`, `fs`... as external.
|
|
@@ -16,7 +16,6 @@ export type ResolveExternalsPluginOptions = {
|
|
|
16
16
|
* ignore will simply leave all builtins imports as written in your code.
|
|
17
17
|
*
|
|
18
18
|
* Note that scheme handling is always applied, regardless of the builtins options being enabled or not.
|
|
19
|
-
*
|
|
20
19
|
* @default true
|
|
21
20
|
*/
|
|
22
21
|
builtins?: boolean;
|
|
@@ -25,10 +24,9 @@ export type ResolveExternalsPluginOptions = {
|
|
|
25
24
|
* - `'add'` turns `'path'` to `'node:path'`
|
|
26
25
|
* - `'strip'` turns `'node:path'` to `'path'`
|
|
27
26
|
* - `'ignore'` leaves Node builtin names as-is
|
|
28
|
-
*
|
|
29
27
|
* @default "add"
|
|
30
28
|
*/
|
|
31
|
-
builtinsPrefix?: "add" | "
|
|
29
|
+
builtinsPrefix?: "add" | "ignore" | "strip";
|
|
32
30
|
/**
|
|
33
31
|
* Mark dependencies as external.
|
|
34
32
|
*
|
|
@@ -46,7 +44,7 @@ export type ResolveExternalsPluginOptions = {
|
|
|
46
44
|
*
|
|
47
45
|
* Defaults to `[]` (force exclude nothing).
|
|
48
46
|
*/
|
|
49
|
-
exclude?: MaybeFalsy<
|
|
47
|
+
exclude?: MaybeFalsy<RegExp | string>[];
|
|
50
48
|
/**
|
|
51
49
|
* Mark optionalDependencies as external.
|
|
52
50
|
*
|
|
@@ -3,7 +3,7 @@ import type { Pail } from "@visulima/pail";
|
|
|
3
3
|
import type { TsConfigResult } from "@visulima/tsconfig";
|
|
4
4
|
import type { Plugin } from "rollup";
|
|
5
5
|
import type { InternalBuildOptions } from '../../types.d.ts';
|
|
6
|
-
type MaybeFalsy<T> = T |
|
|
6
|
+
type MaybeFalsy<T> = T | false | null | undefined;
|
|
7
7
|
export type ResolveExternalsPluginOptions = {
|
|
8
8
|
/**
|
|
9
9
|
* Mark node built-in modules like `path`, `fs`... as external.
|
|
@@ -16,7 +16,6 @@ export type ResolveExternalsPluginOptions = {
|
|
|
16
16
|
* ignore will simply leave all builtins imports as written in your code.
|
|
17
17
|
*
|
|
18
18
|
* Note that scheme handling is always applied, regardless of the builtins options being enabled or not.
|
|
19
|
-
*
|
|
20
19
|
* @default true
|
|
21
20
|
*/
|
|
22
21
|
builtins?: boolean;
|
|
@@ -25,10 +24,9 @@ export type ResolveExternalsPluginOptions = {
|
|
|
25
24
|
* - `'add'` turns `'path'` to `'node:path'`
|
|
26
25
|
* - `'strip'` turns `'node:path'` to `'path'`
|
|
27
26
|
* - `'ignore'` leaves Node builtin names as-is
|
|
28
|
-
*
|
|
29
27
|
* @default "add"
|
|
30
28
|
*/
|
|
31
|
-
builtinsPrefix?: "add" | "
|
|
29
|
+
builtinsPrefix?: "add" | "ignore" | "strip";
|
|
32
30
|
/**
|
|
33
31
|
* Mark dependencies as external.
|
|
34
32
|
*
|
|
@@ -46,7 +44,7 @@ export type ResolveExternalsPluginOptions = {
|
|
|
46
44
|
*
|
|
47
45
|
* Defaults to `[]` (force exclude nothing).
|
|
48
46
|
*/
|
|
49
|
-
exclude?: MaybeFalsy<
|
|
47
|
+
exclude?: MaybeFalsy<RegExp | string>[];
|
|
50
48
|
/**
|
|
51
49
|
* Mark optionalDependencies as external.
|
|
52
50
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var a=(e,r)=>l(e,"name",{value:r,configurable:!0});const p=require("@rollup/pluginutils"),m=require("sucrase"),f=require("../../../packem_shared/constants-DIrGIX0w.cjs");var d=Object.defineProperty,b=a((e,r)=>d(e,"name",{value:r,configurable:!0}),"n");const c=b(({exclude:e,include:r,...n})=>{const t=p.createFilter(r,e??f.b);return{name:"packem:sucrase",async transform(u,s){if(!t(s))return;const{code:i,sourceMap:o}=m.transform(u,{...n,filePath:s,sourceMapOptions:{compiledFilename:s}});return{code:i,map:o}}}},"sucrasePlugin");c.NAME="sucrase";module.exports=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(e,r)=>i(e,"name",{value:r,configurable:!0});import{createFilter as m}from"@rollup/pluginutils";import{transform as
|
|
1
|
+
var i=Object.defineProperty;var t=(e,r)=>i(e,"name",{value:r,configurable:!0});import{createFilter as m}from"@rollup/pluginutils";import{transform as f}from"sucrase";import{b as p}from"../../../packem_shared/constants-Eq2rMfX-.mjs";var l=Object.defineProperty,d=t((e,r)=>l(e,"name",{value:r,configurable:!0}),"n");const E=d(({exclude:e,include:r,...c})=>{const n=m(r,e??p);return{name:"packem:sucrase",async transform(o,a){if(!n(a))return;const{code:s,sourceMap:u}=f(o,{...c,filePath:a,sourceMapOptions:{compiledFilename:a}});return{code:s,map:u}}}},"sucrasePlugin");E.NAME="sucrase";export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var t=(e,r)=>l(e,"name",{value:r,configurable:!0});const f=require("@rollup/pluginutils"),m=require("@swc/core"),p=require("../../../packem_shared/constants-DIrGIX0w.cjs");var d=Object.defineProperty,w=t((e,r)=>d(e,"name",{value:r,configurable:!0}),"e");const n=w(({exclude:e,include:r,...a})=>{const s=f.createFilter(r,e??p.b);return{name:"packem:swc",async transform(i,c){if(!s(c))return;const{code:u,map:o}=await m.transform(i,{...a,configFile:!1,filename:c,swcrc:!1});return{code:u,map:o}}}},"swcPlugin");n.NAME="swc";module.exports=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var m=Object.defineProperty;var t=(e,r)=>m(e,"name",{value:r,configurable:!0});import{createFilter as i}from"@rollup/pluginutils";import{transform as l}from"@swc/core";import{b as u}from"../../../packem_shared/constants-Eq2rMfX-.mjs";var p=Object.defineProperty,d=t((e,r)=>p(e,"name",{value:r,configurable:!0}),"e");const w=d(({exclude:e,include:r,...c})=>{const n=i(r,e??u);return{name:"packem:swc",async transform(o,a){if(!n(a))return;const{code:s,map:f}=await l(o,{...c,configFile:!1,filename:a,swcrc:!1});return{code:s,map:f}}}},"swcPlugin");w.NAME="swc";export{w as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FilterPattern } from "@rollup/pluginutils";
|
|
2
2
|
import type { Options } from "@swc/types";
|
|
3
|
-
export type SwcPluginConfig = {
|
|
3
|
+
export type SwcPluginConfig = Exclude<Options, "configFile" | "exclude" | "filename" | "sourceMaps" | "swcrc"> & {
|
|
4
4
|
exclude?: FilterPattern;
|
|
5
5
|
include?: FilterPattern;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FilterPattern } from "@rollup/pluginutils";
|
|
2
2
|
import type { Options } from "@swc/types";
|
|
3
|
-
export type SwcPluginConfig = {
|
|
3
|
+
export type SwcPluginConfig = Exclude<Options, "configFile" | "exclude" | "filename" | "sourceMaps" | "swcrc"> & {
|
|
4
4
|
exclude?: FilterPattern;
|
|
5
5
|
include?: FilterPattern;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FilterPattern } from "@rollup/pluginutils";
|
|
2
2
|
import type { Options } from "@swc/types";
|
|
3
|
-
export type SwcPluginConfig = {
|
|
3
|
+
export type SwcPluginConfig = Exclude<Options, "configFile" | "exclude" | "filename" | "sourceMaps" | "swcrc"> & {
|
|
4
4
|
exclude?: FilterPattern;
|
|
5
5
|
include?: FilterPattern;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SourceMap } from "rollup";
|
|
2
|
-
declare const patchCjsDefaultExport: (source: string) =>
|
|
2
|
+
declare const patchCjsDefaultExport: (source: string) => {
|
|
3
3
|
code: string;
|
|
4
4
|
map: SourceMap;
|
|
5
|
-
};
|
|
5
|
+
} | undefined;
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export = patchCjsDefaultExport;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SourceMap } from "rollup";
|
|
2
|
-
declare const patchCjsDefaultExport: (source: string) =>
|
|
2
|
+
declare const patchCjsDefaultExport: (source: string) => {
|
|
3
3
|
code: string;
|
|
4
4
|
map: SourceMap;
|
|
5
|
-
};
|
|
5
|
+
} | undefined;
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export = patchCjsDefaultExport;
|
|
@@ -3,15 +3,12 @@ import type { Plugin } from "rollup";
|
|
|
3
3
|
export interface UrlOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The destination dir to copy assets, usually used to rebase the assets according to HTML files.
|
|
6
|
-
*
|
|
7
6
|
* @type {string}
|
|
8
7
|
*/
|
|
9
8
|
destDir?: string;
|
|
10
9
|
/**
|
|
11
10
|
* If false, will prevent files being emitted by this plugin. This is useful for when you are using Rollup to emit both a client-side and server-side bundle.
|
|
12
|
-
*
|
|
13
11
|
* @type {boolean}
|
|
14
|
-
*
|
|
15
12
|
* @default true
|
|
16
13
|
*/
|
|
17
14
|
emitFiles: boolean;
|
|
@@ -20,17 +17,15 @@ export interface UrlOptions {
|
|
|
20
17
|
* should _ignore_.
|
|
21
18
|
*
|
|
22
19
|
* By default, no files are ignored.
|
|
23
|
-
*
|
|
24
20
|
* @type {FilterPattern}
|
|
25
21
|
*/
|
|
26
22
|
exclude?: FilterPattern;
|
|
27
23
|
/**
|
|
28
24
|
* If emitFiles is true, this option can be used to rename the emitted files. It accepts the following string replacements:
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
25
|
+
* [hash] - The hash value of the file's contents
|
|
26
|
+
* [name] - The name of the imported file (without its file extension)
|
|
27
|
+
* [extname] - The extension of the imported file (including the leading .)
|
|
28
|
+
* [dirname] - The parent directory name of the imported file (including trailing /)
|
|
34
29
|
* @type {string}
|
|
35
30
|
* @default [hash][extname]
|
|
36
31
|
*/
|
|
@@ -39,7 +34,6 @@ export interface UrlOptions {
|
|
|
39
34
|
* A picomatch pattern, or array of patterns, which specifies the files in the build the plugin
|
|
40
35
|
* should operate on.
|
|
41
36
|
* By default, the png,jpg,jpeg,gif,svg,webp files are targeted.
|
|
42
|
-
*
|
|
43
37
|
* @type {FilterPattern}
|
|
44
38
|
*/
|
|
45
39
|
include?: FilterPattern;
|
|
@@ -47,15 +41,12 @@ export interface UrlOptions {
|
|
|
47
41
|
* The file size limit for inline files.
|
|
48
42
|
* If a file exceeds this limit, it will be copied to the destination folder and the hashed filename will be provided instead.
|
|
49
43
|
* If limit is set to 0 all files will be copied.
|
|
50
|
-
*
|
|
51
44
|
* @type {number}
|
|
52
|
-
*
|
|
53
45
|
* @default 14336 (14kb)
|
|
54
46
|
*/
|
|
55
47
|
limit: number;
|
|
56
48
|
/**
|
|
57
49
|
* A string which will be added in front of filenames when they are not inlined but are copied.
|
|
58
|
-
*
|
|
59
50
|
* @type {string}
|
|
60
51
|
*/
|
|
61
52
|
publicPath?: string;
|
|
@@ -3,15 +3,12 @@ import type { Plugin } from "rollup";
|
|
|
3
3
|
export interface UrlOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The destination dir to copy assets, usually used to rebase the assets according to HTML files.
|
|
6
|
-
*
|
|
7
6
|
* @type {string}
|
|
8
7
|
*/
|
|
9
8
|
destDir?: string;
|
|
10
9
|
/**
|
|
11
10
|
* If false, will prevent files being emitted by this plugin. This is useful for when you are using Rollup to emit both a client-side and server-side bundle.
|
|
12
|
-
*
|
|
13
11
|
* @type {boolean}
|
|
14
|
-
*
|
|
15
12
|
* @default true
|
|
16
13
|
*/
|
|
17
14
|
emitFiles: boolean;
|
|
@@ -20,17 +17,15 @@ export interface UrlOptions {
|
|
|
20
17
|
* should _ignore_.
|
|
21
18
|
*
|
|
22
19
|
* By default, no files are ignored.
|
|
23
|
-
*
|
|
24
20
|
* @type {FilterPattern}
|
|
25
21
|
*/
|
|
26
22
|
exclude?: FilterPattern;
|
|
27
23
|
/**
|
|
28
24
|
* If emitFiles is true, this option can be used to rename the emitted files. It accepts the following string replacements:
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
25
|
+
* [hash] - The hash value of the file's contents
|
|
26
|
+
* [name] - The name of the imported file (without its file extension)
|
|
27
|
+
* [extname] - The extension of the imported file (including the leading .)
|
|
28
|
+
* [dirname] - The parent directory name of the imported file (including trailing /)
|
|
34
29
|
* @type {string}
|
|
35
30
|
* @default [hash][extname]
|
|
36
31
|
*/
|
|
@@ -39,7 +34,6 @@ export interface UrlOptions {
|
|
|
39
34
|
* A picomatch pattern, or array of patterns, which specifies the files in the build the plugin
|
|
40
35
|
* should operate on.
|
|
41
36
|
* By default, the png,jpg,jpeg,gif,svg,webp files are targeted.
|
|
42
|
-
*
|
|
43
37
|
* @type {FilterPattern}
|
|
44
38
|
*/
|
|
45
39
|
include?: FilterPattern;
|
|
@@ -47,15 +41,12 @@ export interface UrlOptions {
|
|
|
47
41
|
* The file size limit for inline files.
|
|
48
42
|
* If a file exceeds this limit, it will be copied to the destination folder and the hashed filename will be provided instead.
|
|
49
43
|
* If limit is set to 0 all files will be copied.
|
|
50
|
-
*
|
|
51
44
|
* @type {number}
|
|
52
|
-
*
|
|
53
45
|
* @default 14336 (14kb)
|
|
54
46
|
*/
|
|
55
47
|
limit: number;
|
|
56
48
|
/**
|
|
57
49
|
* A string which will be added in front of filenames when they are not inlined but are copied.
|
|
58
|
-
*
|
|
59
50
|
* @type {string}
|
|
60
51
|
*/
|
|
61
52
|
publicPath?: string;
|
|
@@ -3,15 +3,12 @@ import type { Plugin } from "rollup";
|
|
|
3
3
|
export interface UrlOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The destination dir to copy assets, usually used to rebase the assets according to HTML files.
|
|
6
|
-
*
|
|
7
6
|
* @type {string}
|
|
8
7
|
*/
|
|
9
8
|
destDir?: string;
|
|
10
9
|
/**
|
|
11
10
|
* If false, will prevent files being emitted by this plugin. This is useful for when you are using Rollup to emit both a client-side and server-side bundle.
|
|
12
|
-
*
|
|
13
11
|
* @type {boolean}
|
|
14
|
-
*
|
|
15
12
|
* @default true
|
|
16
13
|
*/
|
|
17
14
|
emitFiles: boolean;
|
|
@@ -20,17 +17,15 @@ export interface UrlOptions {
|
|
|
20
17
|
* should _ignore_.
|
|
21
18
|
*
|
|
22
19
|
* By default, no files are ignored.
|
|
23
|
-
*
|
|
24
20
|
* @type {FilterPattern}
|
|
25
21
|
*/
|
|
26
22
|
exclude?: FilterPattern;
|
|
27
23
|
/**
|
|
28
24
|
* If emitFiles is true, this option can be used to rename the emitted files. It accepts the following string replacements:
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
25
|
+
* [hash] - The hash value of the file's contents
|
|
26
|
+
* [name] - The name of the imported file (without its file extension)
|
|
27
|
+
* [extname] - The extension of the imported file (including the leading .)
|
|
28
|
+
* [dirname] - The parent directory name of the imported file (including trailing /)
|
|
34
29
|
* @type {string}
|
|
35
30
|
* @default [hash][extname]
|
|
36
31
|
*/
|
|
@@ -39,7 +34,6 @@ export interface UrlOptions {
|
|
|
39
34
|
* A picomatch pattern, or array of patterns, which specifies the files in the build the plugin
|
|
40
35
|
* should operate on.
|
|
41
36
|
* By default, the png,jpg,jpeg,gif,svg,webp files are targeted.
|
|
42
|
-
*
|
|
43
37
|
* @type {FilterPattern}
|
|
44
38
|
*/
|
|
45
39
|
include?: FilterPattern;
|
|
@@ -47,15 +41,12 @@ export interface UrlOptions {
|
|
|
47
41
|
* The file size limit for inline files.
|
|
48
42
|
* If a file exceeds this limit, it will be copied to the destination folder and the hashed filename will be provided instead.
|
|
49
43
|
* If limit is set to 0 all files will be copied.
|
|
50
|
-
*
|
|
51
44
|
* @type {number}
|
|
52
|
-
*
|
|
53
45
|
* @default 14336 (14kb)
|
|
54
46
|
*/
|
|
55
47
|
limit: number;
|
|
56
48
|
/**
|
|
57
49
|
* A string which will be added in front of filenames when they are not inlined but are copied.
|
|
58
|
-
*
|
|
59
50
|
* @type {string}
|
|
60
51
|
*/
|
|
61
52
|
publicPath?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GetManualChunk } from "rollup";
|
|
2
2
|
import type { BuildContextBuildAssetAndChunk, BuildContextBuildEntry } from "../../../types.d.cts";
|
|
3
|
-
declare const createSplitChunks: (dependencyGraphMap: Map<string, Set<[string, string]>>, entryFiles: (
|
|
3
|
+
declare const createSplitChunks: (dependencyGraphMap: Map<string, Set<[string, string]>>, entryFiles: (BuildContextBuildAssetAndChunk | BuildContextBuildEntry)[]) => GetManualChunk;
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export = createSplitChunks;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GetManualChunk } from "rollup";
|
|
2
2
|
import type { BuildContextBuildAssetAndChunk, BuildContextBuildEntry } from "../../../types.d.mts";
|
|
3
|
-
declare const createSplitChunks: (dependencyGraphMap: Map<string, Set<[string, string]>>, entryFiles: (
|
|
3
|
+
declare const createSplitChunks: (dependencyGraphMap: Map<string, Set<[string, string]>>, entryFiles: (BuildContextBuildAssetAndChunk | BuildContextBuildEntry)[]) => GetManualChunk;
|
|
4
4
|
export default createSplitChunks;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GetManualChunk } from "rollup";
|
|
2
2
|
import type { BuildContextBuildAssetAndChunk, BuildContextBuildEntry } from "../../../types.d.ts";
|
|
3
|
-
declare const createSplitChunks: (dependencyGraphMap: Map<string, Set<[string, string]>>, entryFiles: (
|
|
3
|
+
declare const createSplitChunks: (dependencyGraphMap: Map<string, Set<[string, string]>>, entryFiles: (BuildContextBuildAssetAndChunk | BuildContextBuildEntry)[]) => GetManualChunk;
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export = createSplitChunks;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getHash: (data:
|
|
1
|
+
declare const getHash: (data: NodeJS.ArrayBufferView | string) => string;
|
|
2
2
|
export default getHash;
|