@visulima/packem 1.0.0-alpha.41 → 1.0.0-alpha.43
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/LICENSE.md +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/config.d.cts +4 -3
- package/dist/config.d.mts +4 -3
- package/dist/config.d.ts +4 -3
- package/dist/create-bundler.cjs +26 -27
- package/dist/create-bundler.d.cts +3 -2
- package/dist/create-bundler.d.mts +3 -2
- package/dist/create-bundler.d.ts +3 -2
- package/dist/create-bundler.mjs +24 -25
- package/dist/rollup/plugins/esbuild/index.cjs +1 -1
- package/dist/rollup/plugins/esbuild/index.mjs +2 -2
- package/dist/rollup/plugins/swc/index.d.cts +1 -1
- package/dist/rollup/plugins/swc/index.d.mts +1 -1
- package/dist/rollup/plugins/swc/index.d.ts +1 -1
- package/dist/shared/{packem.DtAA_1Hu.d.ts → packem.BE4l_UAh.d.ts} +3 -2
- package/dist/shared/{packem.BBXO6_87.d.mts → packem.BZC4-kKe.d.mts} +3 -2
- package/dist/shared/{packem.ClcPYkxx.d.cts → packem.C0uNLYl_.d.cts} +3 -2
- package/dist/shared/{packem.aYVbzCkK.d.mts → packem.sjPZM5Ke.d.cts} +1 -1
- package/dist/shared/{packem.aYVbzCkK.d.ts → packem.sjPZM5Ke.d.mts} +1 -1
- package/dist/shared/{packem.aYVbzCkK.d.cts → packem.sjPZM5Ke.d.ts} +1 -1
- package/package.json +27 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## @visulima/packem [1.0.0-alpha.43](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.42...@visulima/packem@1.0.0-alpha.43) (2024-06-20)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated the packages and fixed breaking changes ([019d53a](https://github.com/visulima/packem/commit/019d53a9b2e0a26e232af92474622fa5a1052218))
|
|
6
|
+
|
|
7
|
+
## @visulima/packem [1.0.0-alpha.42](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.41...@visulima/packem@1.0.0-alpha.42) (2024-06-14)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* updated [@visulima](https://github.com/visulima) packages inside packem ([2225974](https://github.com/visulima/packem/commit/2225974a1f186c54669971269c8dafe331d03a8c))
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* added conventional-changelog-conventionalcommits as dev dep ([9e462a2](https://github.com/visulima/packem/commit/9e462a24766313e49ed25ecde8eb64ddc978b60b))
|
|
16
|
+
|
|
1
17
|
## @visulima/packem [1.0.0-alpha.41](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.40...@visulima/packem@1.0.0-alpha.41) (2024-06-05)
|
|
2
18
|
|
|
3
19
|
|
package/LICENSE.md
CHANGED
|
@@ -261,7 +261,7 @@ Repository: git+https://github.com/swc-project/swc.git
|
|
|
261
261
|
## ts-essentials
|
|
262
262
|
License: MIT
|
|
263
263
|
By: Krzysztof Kaczor
|
|
264
|
-
Repository: git@github.com:
|
|
264
|
+
Repository: git@github.com:ts-essentials/ts-essentials.git
|
|
265
265
|
|
|
266
266
|
> The MIT License
|
|
267
267
|
>
|
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.42";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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var v=Object.defineProperty;var r=(i,e)=>v(i,"name",{value:e,configurable:!0});import k from"@visulima/cerebro";import b from"./create-bundler.mjs";import{exit as a}from"node:process";import{installPackage as h}from"@antfu/install-pkg";import{intro as j,isCancel as w,cancel as C,select as
|
|
2
|
+
var v=Object.defineProperty;var r=(i,e)=>v(i,"name",{value:e,configurable:!0});import k from"@visulima/cerebro";import b from"./create-bundler.mjs";import{exit as a}from"node:process";import{installPackage as h}from"@antfu/install-pkg";import{intro as j,isCancel as w,cancel as C,select as S,confirm as x,spinner as f,outro as P}from"@clack/prompts";import{isAccessibleSync as u,writeFileSync as z}from"@visulima/fs";import{parsePackageJson as B}from"@visulima/package/package-json";import{join as s}from"@visulima/path";
|
|
3
3
|
// -- pack CommonJS Shims --
|
|
4
4
|
import __cjs_url__ from "node:url";
|
|
5
5
|
import __cjs_path__ from "node:path";
|
|
@@ -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",N="1.0.0-alpha.
|
|
10
|
+
const I="@visulima/packem",N="1.0.0-alpha.42";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 S({message:"Pick a transformer",options:[{label:"esbuild",value:"esbuild"},{label:"swc",value:"swc"},{label:"Sucrase",value:"sucrase"}]}),!y.includes(t.transformer)&&await x({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"),
|
|
16
|
+
`,o=f();return o.start("Creating packem.config.ts"),z(s(t.dir,"packem.config.ts"),n),o.stop("Created packem.config.ts"),P("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:N});E(m);V(m);m.run();
|
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.C0uNLYl_.cjs';
|
|
2
|
+
export { b as BuildHooks } from './shared/packem.C0uNLYl_.cjs';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -7,6 +7,7 @@ import '@rollup/plugin-node-resolve';
|
|
|
7
7
|
import '@rollup/plugin-replace';
|
|
8
8
|
import '@rollup/plugin-wasm';
|
|
9
9
|
import '@rollup/pluginutils';
|
|
10
|
+
import '@visulima/tsconfig';
|
|
10
11
|
import '@visulima/package';
|
|
11
12
|
import '@visulima/pail';
|
|
12
13
|
import 'hookable';
|
|
@@ -19,7 +20,7 @@ import './shared/packem.D09xRBAa.cjs';
|
|
|
19
20
|
import 'esbuild';
|
|
20
21
|
import './shared/packem.DvWhOdt5.cjs';
|
|
21
22
|
import 'sucrase';
|
|
22
|
-
import './shared/packem.
|
|
23
|
+
import './shared/packem.sjPZM5Ke.cjs';
|
|
23
24
|
|
|
24
25
|
declare const defineConfig: (config: BuildConfig) => BuildConfig;
|
|
25
26
|
declare const definePreset: (preset: BuildPreset) => BuildPreset;
|
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.BZC4-kKe.mjs';
|
|
2
|
+
export { b as BuildHooks } from './shared/packem.BZC4-kKe.mjs';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -7,6 +7,7 @@ import '@rollup/plugin-node-resolve';
|
|
|
7
7
|
import '@rollup/plugin-replace';
|
|
8
8
|
import '@rollup/plugin-wasm';
|
|
9
9
|
import '@rollup/pluginutils';
|
|
10
|
+
import '@visulima/tsconfig';
|
|
10
11
|
import '@visulima/package';
|
|
11
12
|
import '@visulima/pail';
|
|
12
13
|
import 'hookable';
|
|
@@ -19,7 +20,7 @@ import './shared/packem.D09xRBAa.mjs';
|
|
|
19
20
|
import 'esbuild';
|
|
20
21
|
import './shared/packem.DvWhOdt5.mjs';
|
|
21
22
|
import 'sucrase';
|
|
22
|
-
import './shared/packem.
|
|
23
|
+
import './shared/packem.sjPZM5Ke.mjs';
|
|
23
24
|
|
|
24
25
|
declare const defineConfig: (config: BuildConfig) => BuildConfig;
|
|
25
26
|
declare const definePreset: (preset: BuildPreset) => BuildPreset;
|
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.BE4l_UAh.js';
|
|
2
|
+
export { b as BuildHooks } from './shared/packem.BE4l_UAh.js';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -7,6 +7,7 @@ import '@rollup/plugin-node-resolve';
|
|
|
7
7
|
import '@rollup/plugin-replace';
|
|
8
8
|
import '@rollup/plugin-wasm';
|
|
9
9
|
import '@rollup/pluginutils';
|
|
10
|
+
import '@visulima/tsconfig';
|
|
10
11
|
import '@visulima/package';
|
|
11
12
|
import '@visulima/pail';
|
|
12
13
|
import 'hookable';
|
|
@@ -19,7 +20,7 @@ import './shared/packem.D09xRBAa.js';
|
|
|
19
20
|
import 'esbuild';
|
|
20
21
|
import './shared/packem.DvWhOdt5.js';
|
|
21
22
|
import 'sucrase';
|
|
22
|
-
import './shared/packem.
|
|
23
|
+
import './shared/packem.sjPZM5Ke.js';
|
|
23
24
|
|
|
24
25
|
declare const defineConfig: (config: BuildConfig) => BuildConfig;
|
|
25
26
|
declare const definePreset: (preset: BuildPreset) => BuildPreset;
|