@visulima/packem 2.0.0-alpha.70 → 2.0.0-alpha.72

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 CHANGED
@@ -1,3 +1,27 @@
1
+ ## @visulima/packem [2.0.0-alpha.72](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.71...@visulima/packem@2.0.0-alpha.72) (2026-04-24)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.59
7
+ * **@visulima/packem-share:** upgraded to 1.0.0-alpha.40
8
+ * **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.39
9
+ * **@visulima/rollup-plugin-dts:** upgraded to 1.0.0-alpha.20
10
+
11
+ ## @visulima/packem [2.0.0-alpha.71](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.70...@visulima/packem@2.0.0-alpha.71) (2026-04-24)
12
+
13
+ ### Bug Fixes
14
+
15
+ * **rollup-plugin-dts:** sibling .d.ts fallback for string-form exports ([2a26b69](https://github.com/visulima/packem/commit/2a26b69b322375061cdcd55a14c72301085606ef))
16
+
17
+
18
+ ### Dependencies
19
+
20
+ * **@visulima/packem-rollup:** upgraded to 1.0.0-alpha.58
21
+ * **@visulima/packem-share:** upgraded to 1.0.0-alpha.39
22
+ * **@visulima/rollup-plugin-css:** upgraded to 1.0.0-alpha.38
23
+ * **@visulima/rollup-plugin-dts:** upgraded to 1.0.0-alpha.19
24
+
1
25
  ## @visulima/packem [2.0.0-alpha.70](https://github.com/visulima/packem/compare/@visulima/packem@2.0.0-alpha.69...@visulima/packem@2.0.0-alpha.70) (2026-04-24)
2
26
 
3
27
  ### Bug Fixes
@@ -1,5 +1,5 @@
1
1
  import { BuildContext } from '@visulima/packem-share/types';
2
- import { I as InternalBuildOptions } from "../../packem_shared/types.d-CRug-s8c.js";
2
+ import { I as InternalBuildOptions } from "../../packem_shared/types.d-2tvt70BP.js";
3
3
  import '@arethetypeswrong/core';
4
4
  import '@visulima/packem-rollup';
5
5
  import '@visulima/packem-rollup/oxc';
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  var Q=Object.defineProperty;var w=(s,t)=>Q(s,"name",{value:t,configurable:!0});import{createCerebro as Z}from"@visulima/cerebro";import ee from"@visulima/cerebro/logger/pail";import{SimpleReporter as te}from"@visulima/pail/reporter/simple";import C,{cwd as V,exit as se}from"node:process";import{installPackage as x}from"@antfu/install-pkg";import{confirm as v,select as h,multiselect as U,spinner as B,cancel as ae,intro as ie,log as T,outro as ne}from"@clack/prompts";import{isAccessible as re,readFile as oe,writeFile as ce,isAccessibleSync as L,writeJsonSync as le,writeFileSync as de}from"@visulima/fs";import{parsePackageJson as G}from"@visulima/package/package-json";import{join as $,resolve as N}from"@visulima/path";import pe from"magic-string";import{exec as ue}from"tinyexec";import{PRODUCTION_ENV as R,DEVELOPMENT_ENV as me}from"@visulima/packem-share/constants";import{createJiti as fe}from"jiti";import{c as ge,$ as ye,S as be}from"../packem_shared/index-CBiZaA3V.js";import{existsSync as A}from"node:fs";import{parseEnv as F}from"node:util";import{readFile as ve,writeFile as we}from"node:fs/promises";import{createInterface as he}from"node:readline/promises";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
3
3
  const require = __cjs_mod__.createRequire(import.meta.url);
4
- var ke="@visulima/packem",z="2.0.0-alpha.69";const q={version:z};var Se=Object.defineProperty,$e=w((s,t)=>Se(s,"name",{value:t,configurable:!0}),"t");const W=$e(async(s,t="")=>{let a=t;if(!a){const e=["packem.config.js","packem.config.mjs","packem.config.cjs","packem.config.ts","packem.config.cts","packem.config.mts"];for(const n of e)if(await re($(s,n))){a=`./${n}`;break}}if(!/\.(?:js|mjs|cjs|ts|cts|mts)$/.test(a))throw new Error("Invalid packem config file extension. Only .js, .mjs, .cjs, .ts, .cts and .mts extensions are allowed.");return a},"findPackemFile"),_={less:["less"],lightningcss:["lightningcss"],"node-sass":["node-sass"],postcss:["postcss","postcss-load-config","postcss-modules-extract-imports","postcss-modules-local-by-default","postcss-modules-scope","postcss-modules-values","postcss-value-parser","@csstools/css-parser-algorithms","@csstools/css-tokenizer","@csstools/postcss-slow-plugins","icss-utils","@visulima/css-style-inject"],sass:["sass"],"sass-embedded":["sass-embedded"],stylus:["stylus"],tailwindcss:["@tailwindcss/node","@tailwindcss/oxide","tailwindcss"]};var je=Object.defineProperty,b=w((s,t)=>je(s,"name",{value:t,configurable:!0}),"r$1");const Ce=["typedoc","typedoc-plugin-markdown","typedoc-plugin-rename-defaults"],Pe=["@babel/core","@babel/preset-react"],xe=["react","react-dom"],De=["@babel/core","babel-preset-solid"],Me=["solid-js"],Oe=["@babel/core","@babel/preset-react","babel-plugin-transform-hook-names"],Ee=["preact"],Ie=["unplugin-vue"],Ne=["vue"],Le=["rollup-plugin-svelte"],Be=["svelte"],D=b((s,t,a)=>s.includes(`preset: '${t}'`)||s.includes(`preset: "${t}"`)||s.includes(`preset: '${t}',`)||s.includes(`preset: "${t}",`)||s.includes(a)||s.includes(`@visulima/packem/config/preset/${t}`),"checkPresetExists"),M=b((s,t)=>{const{logger:a,magic:e,packemConfig:n}=s,r=n.match(/defineConfig\s*\(\s*\{/);if(r&&r.index!==void 0){const o=r.index+r[0].length;if(n.includes("preset:")){const i=n.match(/preset:\s*['"]([^'"]+)['"]/);if(i)e.replace(i[0],`preset: '${t}'`);else throw a.warn(`A preset already exists in the config. Please manually set it to '${t}'.`),new Error("Preset exists but is not a string")}else e.appendLeft(o,`
4
+ var ke="@visulima/packem",z="2.0.0-alpha.71";const q={version:z};var Se=Object.defineProperty,$e=w((s,t)=>Se(s,"name",{value:t,configurable:!0}),"t");const W=$e(async(s,t="")=>{let a=t;if(!a){const e=["packem.config.js","packem.config.mjs","packem.config.cjs","packem.config.ts","packem.config.cts","packem.config.mts"];for(const n of e)if(await re($(s,n))){a=`./${n}`;break}}if(!/\.(?:js|mjs|cjs|ts|cts|mts)$/.test(a))throw new Error("Invalid packem config file extension. Only .js, .mjs, .cjs, .ts, .cts and .mts extensions are allowed.");return a},"findPackemFile"),_={less:["less"],lightningcss:["lightningcss"],"node-sass":["node-sass"],postcss:["postcss","postcss-load-config","postcss-modules-extract-imports","postcss-modules-local-by-default","postcss-modules-scope","postcss-modules-values","postcss-value-parser","@csstools/css-parser-algorithms","@csstools/css-tokenizer","@csstools/postcss-slow-plugins","icss-utils","@visulima/css-style-inject"],sass:["sass"],"sass-embedded":["sass-embedded"],stylus:["stylus"],tailwindcss:["@tailwindcss/node","@tailwindcss/oxide","tailwindcss"]};var je=Object.defineProperty,b=w((s,t)=>je(s,"name",{value:t,configurable:!0}),"r$1");const Ce=["typedoc","typedoc-plugin-markdown","typedoc-plugin-rename-defaults"],Pe=["@babel/core","@babel/preset-react"],xe=["react","react-dom"],De=["@babel/core","babel-preset-solid"],Me=["solid-js"],Oe=["@babel/core","@babel/preset-react","babel-plugin-transform-hook-names"],Ee=["preact"],Ie=["unplugin-vue"],Ne=["vue"],Le=["rollup-plugin-svelte"],Be=["svelte"],D=b((s,t,a)=>s.includes(`preset: '${t}'`)||s.includes(`preset: "${t}"`)||s.includes(`preset: '${t}',`)||s.includes(`preset: "${t}",`)||s.includes(a)||s.includes(`@visulima/packem/config/preset/${t}`),"checkPresetExists"),M=b((s,t)=>{const{logger:a,magic:e,packemConfig:n}=s,r=n.match(/defineConfig\s*\(\s*\{/);if(r&&r.index!==void 0){const o=r.index+r[0].length;if(n.includes("preset:")){const i=n.match(/preset:\s*['"]([^'"]+)['"]/);if(i)e.replace(i[0],`preset: '${t}'`);else throw a.warn(`A preset already exists in the config. Please manually set it to '${t}'.`),new Error("Preset exists but is not a string")}else e.appendLeft(o,`
5
5
  preset: '${t}',`)}else if(n.includes("transformer:"))e.replace("transformer:",`preset: '${t}',
6
6
  transformer:`);else{const o=n.indexOf("{");o!==-1&&e.appendLeft(o+1,`
7
7
  preset: '${t}',`)}},"insertPreset"),Ve=b(async s=>{try{return((await ue("git",["status","--porcelain"],{nodeOptions:{cwd:s,stdio:["pipe","pipe","pipe"]}})).stdout?.trim().length??0)>0}catch{return!1}},"checkGitDirty"),H=b(async s=>{const t=$(s,"package.json"),a=await G(t,{resolveCatalogs:!0});return!!(a.devDependencies?.typescript??a.dependencies?.typescript)},"checkTypeScriptInstalled"),Ae=b(async s=>{const t=await H(s),a=[...xe],e=[...Pe];return t?e.push("@types/react","@types/react-dom"):await v({initialValue:!1,message:"Do you want to use TypeScript?"})&&e.push("typescript","@types/react","@types/react-dom"),{devPackages:e,packages:a}},"getReactTypeDependencies"),O=b(async(s,t,a)=>{const{rootDirectory:e,spinner:n}=s;n.start("Installing packages"),await x(a,{cwd:e,dev:!1,silent:!0}),await x(t,{cwd:e,dev:!0,silent:!0}),n.stop("Installed packages")},"installPackages"),Te=b(async s=>{const{logger:t,magic:a,packemConfig:e,packemConfigFormat:n,rootDirectory:r,spinner:o,transformerReplaceKey:i,transformerSearchKey:l}=s;if(e.includes("typedoc: typedocBuilder")||e.includes("@visulima/packem/builder/typedoc")){t.warn("Typedoc has already been added to the packem config.");return}n==="cjs"?a.prepend(`const typedocBuilder = require("@visulima/packem/builder/typedoc");
@@ -1,4 +1,4 @@
1
- import { B as BuildConfig, c as BuildConfigFunction, d as BuildPreset } from "../packem_shared/types.d-CRug-s8c.js";
1
+ import { B as BuildConfig, a as BuildConfigFunction, b as BuildPreset } from "../packem_shared/types.d-2tvt70BP.js";
2
2
  export { type BuildHooks } from '@visulima/packem-share/types';
3
3
  import '@arethetypeswrong/core';
4
4
  import '@visulima/packem-rollup';
@@ -1,5 +1,5 @@
1
1
  import { BabelPluginConfig } from '@visulima/packem-rollup/babel';
2
- import { B as BuildConfig } from "../../packem_shared/types.d-CRug-s8c.js";
2
+ import { B as BuildConfig } from "../../packem_shared/types.d-2tvt70BP.js";
3
3
  import '@arethetypeswrong/core';
4
4
  import '@visulima/packem-rollup';
5
5
  import '@visulima/packem-rollup/oxc';
@@ -1,5 +1,5 @@
1
1
  import { BabelPluginConfig } from '@visulima/packem-rollup/babel';
2
- import { B as BuildConfig } from "../../packem_shared/types.d-CRug-s8c.js";
2
+ import { B as BuildConfig } from "../../packem_shared/types.d-2tvt70BP.js";
3
3
  import '@arethetypeswrong/core';
4
4
  import '@visulima/packem-rollup';
5
5
  import '@visulima/packem-rollup/oxc';
@@ -1,5 +1,5 @@
1
1
  import { BabelPluginConfig } from '@visulima/packem-rollup/babel';
2
- import { B as BuildConfig } from "../../packem_shared/types.d-CRug-s8c.js";
2
+ import { B as BuildConfig } from "../../packem_shared/types.d-2tvt70BP.js";
3
3
  import '@arethetypeswrong/core';
4
4
  import '@visulima/packem-rollup';
5
5
  import '@visulima/packem-rollup/oxc';
@@ -1,4 +1,4 @@
1
- import { B as BuildConfig } from "../../packem_shared/types.d-CRug-s8c.js";
1
+ import { B as BuildConfig } from "../../packem_shared/types.d-2tvt70BP.js";
2
2
  import '@arethetypeswrong/core';
3
3
  import '@visulima/packem-rollup';
4
4
  import '@visulima/packem-rollup/oxc';
@@ -1,4 +1,4 @@
1
- import { B as BuildConfig } from "../../packem_shared/types.d-CRug-s8c.js";
1
+ import { B as BuildConfig } from "../../packem_shared/types.d-2tvt70BP.js";
2
2
  import '@arethetypeswrong/core';
3
3
  import '@visulima/packem-rollup';
4
4
  import '@visulima/packem-rollup/oxc';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ConstructorOptions } from '@visulima/pail';
2
- import { B as BuildConfig } from "./packem_shared/types.d-CRug-s8c.js";
3
- export { type a as BuildEntry, type b as BuildOptions, type R as RollupBuildOptions } from "./packem_shared/types.d-CRug-s8c.js";
2
+ import { B as BuildConfig } from "./packem_shared/types.d-2tvt70BP.js";
3
+ export { type c as BuildEntry, type d as BuildOptions, type R as RollupBuildOptions } from "./packem_shared/types.d-2tvt70BP.js";
4
4
  export { type TransformerFn, type TransformerName } from '@visulima/packem-rollup';
5
5
  import { Environment, Mode } from '@visulima/packem-share/types';
6
6
  export { type BuildContext, type BuildContextBuildAssetAndChunk, type BuildContextBuildEntry, type BuildHooks, type Environment, type Mode, type Runtime } from '@visulima/packem-share/types';
@@ -2,7 +2,7 @@ import { CheckPackageOptions } from '@arethetypeswrong/core';
2
2
  import { PackemRollupOptions, TransformerFn, TransformerName } from '@visulima/packem-rollup';
3
3
  import { InternalOXCTransformPluginConfig } from '@visulima/packem-rollup/oxc';
4
4
  import { NativeModulesOptions } from '@visulima/packem-rollup/plugin/native-modules';
5
- import { Environment, Runtime, BuildContext, Format, BuildHooks, Mode } from '@visulima/packem-share/types';
5
+ import { BuildContext, Environment, Runtime, Format, BuildHooks, Mode } from '@visulima/packem-share/types';
6
6
  import { FileCache } from '@visulima/packem-share/utils';
7
7
  import { StyleOptions } from '@visulima/rollup-plugin-css';
8
8
  import { JitiOptions } from 'jiti';
@@ -437,4 +437,4 @@ type ValidationOptions = {
437
437
  typesVersions?: boolean;
438
438
  };
439
439
  };
440
- export { BuildConfig as B, InternalBuildOptions as I, RollupBuildOptions as R, BuildEntry as a, BuildOptions as b, BuildConfigFunction as c, BuildPreset as d };
440
+ export { BuildConfig as B, InternalBuildOptions as I, RollupBuildOptions as R, BuildConfigFunction as a, BuildPreset as b, BuildEntry as c, BuildOptions as d };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/packem",
3
- "version": "2.0.0-alpha.70",
3
+ "version": "2.0.0-alpha.72",
4
4
  "description": "A fast and modern bundler for Node.js and TypeScript.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -179,12 +179,12 @@
179
179
  "@visulima/fs": "5.0.0-alpha.12",
180
180
  "@visulima/humanizer": "3.0.0-alpha.11",
181
181
  "@visulima/package": "5.0.0-alpha.11",
182
- "@visulima/packem-rollup": "1.0.0-alpha.57",
183
- "@visulima/packem-share": "1.0.0-alpha.38",
182
+ "@visulima/packem-rollup": "1.0.0-alpha.59",
183
+ "@visulima/packem-share": "1.0.0-alpha.40",
184
184
  "@visulima/pail": "4.0.0-alpha.11",
185
185
  "@visulima/path": "3.0.0-alpha.10",
186
- "@visulima/rollup-plugin-css": "1.0.0-alpha.37",
187
- "@visulima/rollup-plugin-dts": "1.0.0-alpha.18",
186
+ "@visulima/rollup-plugin-css": "1.0.0-alpha.39",
187
+ "@visulima/rollup-plugin-dts": "1.0.0-alpha.20",
188
188
  "@visulima/tabular": "4.0.0-alpha.11",
189
189
  "@visulima/tsconfig": "3.0.0-alpha.11",
190
190
  "browserslist": "4.28.2",