@visulima/packem 1.0.0-alpha.32 → 1.0.0-alpha.34
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 +16 -0
- package/README.md +1 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/create-bundler.cjs +48 -48
- package/dist/create-bundler.d.cts +1 -1
- package/dist/create-bundler.d.mts +1 -1
- package/dist/create-bundler.d.ts +1 -1
- package/dist/create-bundler.mjs +47 -47
- package/dist/rollup/plugins/esbuild/index.cjs +1 -1
- package/dist/rollup/plugins/esbuild/index.mjs +1 -1
- package/dist/rollup/plugins/sucrase/index.cjs +1 -1
- package/dist/rollup/plugins/sucrase/index.mjs +1 -1
- package/dist/rollup/plugins/swc/index.cjs +1 -1
- package/dist/rollup/plugins/swc/index.mjs +1 -1
- package/dist/shared/{packem.Dy_OANKe.d.mts → packem.C3jV3VSZ.d.mts} +9 -1
- package/dist/shared/{packem.mQ9P5mkv.d.cts → packem.CAFlfc60.d.cts} +9 -1
- package/dist/shared/{packem.D8hh_gRz.d.ts → packem.DyKwVld7.d.ts} +9 -1
- package/dist/shared/packem.HRXF255z.mjs +9 -0
- package/dist/shared/packem.NVRVuzg1.cjs +1 -0
- package/package.json +12 -45
- package/dist/shared/packem.CKW9adaV.cjs +0 -1
- package/dist/shared/packem.CxExFSHU.mjs +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## @visulima/packem [1.0.0-alpha.34](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.33...@visulima/packem@1.0.0-alpha.34) (2024-06-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* optimized package.json auto resolver ([89bda92](https://github.com/visulima/packem/commit/89bda9259044a02ec629283a6152a8381ec2d4d1))
|
|
7
|
+
* optimized package.json auto resolver ([1348ada](https://github.com/visulima/packem/commit/1348ada13f778db685ddfcede9a11caca3af1a0c))
|
|
8
|
+
* optimized package.json auto resolver ([87be4ea](https://github.com/visulima/packem/commit/87be4ea19acc2dbd9c90b4b783df372aeb6cee23))
|
|
9
|
+
|
|
10
|
+
## @visulima/packem [1.0.0-alpha.33](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.32...@visulima/packem@1.0.0-alpha.33) (2024-06-01)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* working on a better auto preset, changed package to esm ([1697cd2](https://github.com/visulima/packem/commit/1697cd23ae35155795c4d727a7ac3004b1eec450))
|
|
16
|
+
|
|
1
17
|
## @visulima/packem [1.0.0-alpha.32](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.31...@visulima/packem@1.0.0-alpha.32) (2024-05-31)
|
|
2
18
|
|
|
3
19
|
|
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@ Links:
|
|
|
62
62
|
- [bunchee](https://github.com/huozhi/bunchee) - Zero config bundler for ECMAScript and TypeScript packages
|
|
63
63
|
- [unbuild](https://github.com/unjs/unbuild) - 📦 An unified javascript build system
|
|
64
64
|
- [pkgroll](https://github.com/privatenumber/pkgroll) - 📦 Zero-config package bundler for Node.js + TypeScript
|
|
65
|
+
- [siroc](https://github.com/danielroe/siroc) - Zero-config build tooling for Node
|
|
65
66
|
- [tsup](https://github.com/egoist/tsup) - The simplest and fastest way to bundle your TypeScript libraries
|
|
66
67
|
|
|
67
68
|
## Supported Node.js Versions
|
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var v=Object.defineProperty;var r=(n,e)=>v(n,"name",{value:e,configurable:!0});const k=require("@visulima/cerebro"),b=require("./create-bundler.cjs"),s=require("node:process"),h=require("@antfu/install-pkg"),i=require("@clack/prompts"),c=require("@visulima/fs"),j=require("@visulima/package/package-json"),l=require("@visulima/path"),w=r(n=>n&&typeof n=="object"&&"default"in n?n.default:n,"_interopDefaultCompat"),x=w(k),C="@visulima/packem",P="1.0.0-alpha.
|
|
2
|
+
"use strict";var v=Object.defineProperty;var r=(n,e)=>v(n,"name",{value:e,configurable:!0});const k=require("@visulima/cerebro"),b=require("./create-bundler.cjs"),s=require("node:process"),h=require("@antfu/install-pkg"),i=require("@clack/prompts"),c=require("@visulima/fs"),j=require("@visulima/package/package-json"),l=require("@visulima/path"),w=r(n=>n&&typeof n=="object"&&"default"in n?n.default:n,"_interopDefaultCompat"),x=w(k),C="@visulima/packem",P="1.0.0-alpha.33";var S=Object.defineProperty,p=r((n,e)=>S(n,"name",{value:e,configurable:!0}),"n");const q=p(n=>{n.addCommand({description:"Demonstrate options required",execute:p(async({options:e})=>{let t="build";e.watch?t="watch":e.jit&&(t="jit");const a={};if(e.env)for(const o of e.env)a[o.key]=o.value;await b(e.dir,t,{cjsInterop:e.cjsInterop,configPath:e.config??void 0,debug:e.debug,minify:e.minify,replace:{...a},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:p(e=>{const[t,a]=e.split("=");return{key:t,value:a}},"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 z=Object.defineProperty,g=r((n,e)=>z(n,"name",{value:e,configurable:!0}),"i");const B=g(n=>{n.addCommand({description:"Initialize packem configuration",execute:g(async({logger:e,options:t})=>{if(i.intro("Welcome to packem setup"),c.isAccessibleSync(l.join(t.dir,"packem.config.ts")))return e.info("Packem project already initialized, you can use `packem build` to build your project"),s.exit(0);if(i.isCancel(t.transformer))return i.cancel("Operation cancelled"),s.exit(0);if(t.transformer===void 0){const u=l.join(t.dir,"package.json");if(!c.isAccessibleSync(u))return e.error("No package.json found in the directory"),s.exit(1);const d=j.parsePackageJson(u),y=[...Object.keys(d.dependencies??{}),...Object.keys(d.devDependencies??{})];if(t.transformer=await i.select({message:"Pick a transformer",options:[{label:"esbuild",value:"esbuild"},{label:"swc",value:"swc"},{label:"Sucrase",value:"sucrase"}]}),!y.includes(t.transformer)&&await i.confirm({message:"Do you want to install "+t.transformer+"?"})){const f=i.spinner();f.start("Installing "+t.transformer),await h.installPackage(t.transformer==="swc"?"@swc/core":t.transformer,{cwd:t.dir,dev:!0,silent:!0}),f.stop("")}}const a=`import { defineConfig } from "@visulima/packem/config";
|
|
3
3
|
import transformer from "@visulima/packem/transformer/${t.transformer}";
|
|
4
4
|
|
|
5
5
|
export default defineConfig({
|
package/dist/cli.mjs
CHANGED
|
@@ -7,7 +7,7 @@ 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",N="1.0.0-alpha.
|
|
10
|
+
const I="@visulima/packem",N="1.0.0-alpha.33";var O=Object.defineProperty,c=r((i,e)=>O(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({
|
package/dist/config.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BuildConfig, a as BuildPreset } from './shared/packem.
|
|
2
|
-
export { b as BuildHooks } from './shared/packem.
|
|
1
|
+
import { B as BuildConfig, a as BuildPreset } from './shared/packem.CAFlfc60.cjs';
|
|
2
|
+
export { b as BuildHooks } from './shared/packem.CAFlfc60.cjs';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BuildConfig, a as BuildPreset } from './shared/packem.
|
|
2
|
-
export { b as BuildHooks } from './shared/packem.
|
|
1
|
+
import { B as BuildConfig, a as BuildPreset } from './shared/packem.C3jV3VSZ.mjs';
|
|
2
|
+
export { b as BuildHooks } from './shared/packem.C3jV3VSZ.mjs';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BuildConfig, a as BuildPreset } from './shared/packem.
|
|
2
|
-
export { b as BuildHooks } from './shared/packem.
|
|
1
|
+
import { B as BuildConfig, a as BuildPreset } from './shared/packem.DyKwVld7.js';
|
|
2
|
+
export { b as BuildHooks } from './shared/packem.DyKwVld7.js';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|