@visulima/packem 1.0.0-alpha.35 → 1.0.0-alpha.37
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 +14 -0
- package/dist/cli.mjs +2 -2
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/create-bundler.mjs +53 -53
- package/package.json +2 -2
- package/dist/cli.cjs +0 -8
- package/dist/cli.d.cts +0 -2
- package/dist/config.cjs +0 -1
- package/dist/config.d.cts +0 -27
- package/dist/create-bundler.cjs +0 -93
- package/dist/create-bundler.d.cts +0 -29
- package/dist/rollup/plugins/esbuild/index.cjs +0 -1
- package/dist/rollup/plugins/esbuild/index.d.cts +0 -9
- package/dist/rollup/plugins/sucrase/index.cjs +0 -1
- package/dist/rollup/plugins/sucrase/index.d.cts +0 -8
- package/dist/rollup/plugins/swc/index.cjs +0 -1
- package/dist/rollup/plugins/swc/index.d.cts +0 -7
- package/dist/shared/packem.C44tLE3n.d.cts +0 -1919
- package/dist/shared/packem.CAFlfc60.d.cts +0 -185
- package/dist/shared/packem.CEXB7aOL.cjs +0 -1
- package/dist/shared/packem.D09xRBAa.d.cts +0 -25
- package/dist/shared/packem.DvWhOdt5.d.cts +0 -10
- package/dist/shared/packem.NVRVuzg1.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## @visulima/packem [1.0.0-alpha.37](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.36...@visulima/packem@1.0.0-alpha.37) (2024-06-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* disabled cjs ([8c714e6](https://github.com/visulima/packem/commit/8c714e653669efa07250122b84fe200c103d81a0))
|
|
7
|
+
|
|
8
|
+
## @visulima/packem [1.0.0-alpha.36](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.35...@visulima/packem@1.0.0-alpha.36) (2024-06-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* reduced complexity scope of builder ([958049a](https://github.com/visulima/packem/commit/958049a8d5fb1bc81b59a85f6373ba26b1ba0edc))
|
|
14
|
+
|
|
1
15
|
## @visulima/packem [1.0.0-alpha.35](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.34...@visulima/packem@1.0.0-alpha.35) (2024-06-02)
|
|
2
16
|
|
|
3
17
|
|
package/dist/cli.mjs
CHANGED
|
@@ -7,10 +7,10 @@ import __cjs_mod__ from "node:module";
|
|
|
7
7
|
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
8
8
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
9
9
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
10
|
-
const I="@visulima/packem",
|
|
10
|
+
const I="@visulima/packem",O="1.0.0-alpha.36";var N=Object.defineProperty,c=r((i,e)=>N(i,"name",{value:e,configurable:!0}),"n");const V=c(i=>{i.addCommand({description:"Demonstrate options required",execute:c(async({options:e})=>{let t="build";e.watch?t="watch":e.jit&&(t="jit");const n={};if(e.env)for(const o of e.env)n[o.key]=o.value;await b(e.dir,t,{cjsInterop:e.cjsInterop,configPath:e.config??void 0,debug:e.debug,minify:e.minify,replace:{...n},rollup:{esbuild:{target:e.target},license:{path:e.license},metafile:e.metafile,...e.analyze?{visualizer:{}}:{visualizer:!1}},sourcemap:e.sourcemap,tsconfigPath:e.tsconfig??void 0})},"execute"),name:"build",options:[{defaultValue:".",description:"The directory to build",name:"dir",type:String},{alias:"t",description:"Environments to support. `target` in tsconfig.json is automatically added. Defaults to the current Node.js version.",name:"target"},{description:"Use a custom config file",name:"config",type:String},{description:"Path to the tsconfig.json file",name:"tsconfig",type:String},{description:"Minify the output",name:"minify",type:Boolean},{description:"Generate sourcemaps (experimental)",name:"sourcemap",type:Boolean},{description:"Watch for changes",name:"watch",type:Boolean},{description:"Stub the package for JIT compilation",name:"jit",type:Boolean},{description:"Compile-time environment variables (eg. --env.NODE_ENV=production)",multiple:!0,name:"env",type:c(e=>{const[t,n]=e.split("=");return{key:t,value:n}},"type")},{defaultValue:!1,description:"Generate meta file (experimental)",name:"metafile",type:Boolean},{description:"Path to the license file",name:"license",type:String},{description:"Visualize and analyze the bundle",name:"analyze",type:Boolean},{description:"CJS interop mode, can export default and named export, (experimental).",name:"cjsInterop",type:Boolean}]})},"createBuildCommand");var D=Object.defineProperty,g=r((i,e)=>D(i,"name",{value:e,configurable:!0}),"i");const E=g(i=>{i.addCommand({description:"Initialize packem configuration",execute:g(async({logger:e,options:t})=>{if(j("Welcome to packem setup"),u(s(t.dir,"packem.config.ts")))return e.info("Packem project already initialized, you can use `packem build` to build your project"),a(0);if(w(t.transformer))return C("Operation cancelled"),a(0);if(t.transformer===void 0){const p=s(t.dir,"package.json");if(!u(p))return e.error("No package.json found in the directory"),a(1);const l=B(p),y=[...Object.keys(l.dependencies??{}),...Object.keys(l.devDependencies??{})];if(t.transformer=await x({message:"Pick a transformer",options:[{label:"esbuild",value:"esbuild"},{label:"swc",value:"swc"},{label:"Sucrase",value:"sucrase"}]}),!y.includes(t.transformer)&&await P({message:"Do you want to install "+t.transformer+"?"})){const d=f();d.start("Installing "+t.transformer),await h(t.transformer==="swc"?"@swc/core":t.transformer,{cwd:t.dir,dev:!0,silent:!0}),d.stop("")}}const n=`import { defineConfig } from "@visulima/packem/config";
|
|
11
11
|
import transformer from "@visulima/packem/transformer/${t.transformer}";
|
|
12
12
|
|
|
13
13
|
export default defineConfig({
|
|
14
14
|
transformer
|
|
15
15
|
});
|
|
16
|
-
`,o=f();return o.start("Creating packem.config.ts"),z(s(t.dir,"packem.config.ts"),n),o.stop("Created packem.config.ts"),S("Now you can run `packem build` to build your project"),a(0)},"execute"),name:"init",options:[{defaultValue:".",description:"The directory to initialize",name:"dir",type:String},{description:"Choose a transformer to use for packem",name:"transformer",type:String}]})},"createInitCommand"),m=new k("packem",{packageName:I,packageVersion:
|
|
16
|
+
`,o=f();return o.start("Creating packem.config.ts"),z(s(t.dir,"packem.config.ts"),n),o.stop("Created packem.config.ts"),S("Now you can run `packem build` to build your project"),a(0)},"execute"),name:"init",options:[{defaultValue:".",description:"The directory to initialize",name:"dir",type:String},{description:"Choose a transformer to use for packem",name:"transformer",type:String}]})},"createInitCommand"),m=new k("packem",{packageName:I,packageVersion:O});E(m);V(m);m.run();
|
package/dist/config.d.mts
CHANGED
|
@@ -21,7 +21,7 @@ import './shared/packem.DvWhOdt5.mjs';
|
|
|
21
21
|
import 'sucrase';
|
|
22
22
|
import './shared/packem.C44tLE3n.mjs';
|
|
23
23
|
|
|
24
|
-
declare const defineConfig: (config: BuildConfig
|
|
24
|
+
declare const defineConfig: (config: BuildConfig) => BuildConfig;
|
|
25
25
|
declare const definePreset: (preset: BuildPreset) => BuildPreset;
|
|
26
26
|
|
|
27
27
|
export { BuildConfig, BuildPreset, defineConfig, definePreset };
|
package/dist/config.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import './shared/packem.DvWhOdt5.js';
|
|
|
21
21
|
import 'sucrase';
|
|
22
22
|
import './shared/packem.C44tLE3n.js';
|
|
23
23
|
|
|
24
|
-
declare const defineConfig: (config: BuildConfig
|
|
24
|
+
declare const defineConfig: (config: BuildConfig) => BuildConfig;
|
|
25
25
|
declare const definePreset: (preset: BuildPreset) => BuildPreset;
|
|
26
26
|
|
|
27
27
|
export { BuildConfig, BuildPreset, defineConfig, definePreset };
|
package/dist/config.mjs
CHANGED
|
@@ -6,4 +6,4 @@ import __cjs_mod__ from "node:module";
|
|
|
6
6
|
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
8
8
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
9
|
-
var
|
|
9
|
+
var r=Object.defineProperty;var i=(e,n)=>r(e,"name",{value:n,configurable:!0});var t=Object.defineProperty,f=i((e,n)=>t(e,"name",{value:n,configurable:!0}),"i");const a=f(e=>e,"defineConfig"),d=f(e=>e,"definePreset");export{a as defineConfig,d as definePreset};
|