@visulima/packem 1.0.0-alpha.46 → 1.0.0-alpha.47
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 +6 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/package.json +17 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## @visulima/packem [1.0.0-alpha.47](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.46...@visulima/packem@1.0.0-alpha.47) (2024-07-09)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated dep of packem ([5cb9cd5](https://github.com/visulima/packem/commit/5cb9cd52a1dc3619caa1cf58dba0aa86604ed1f4))
|
|
6
|
+
|
|
1
7
|
## @visulima/packem [1.0.0-alpha.46](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.45...@visulima/packem@1.0.0-alpha.46) (2024-06-26)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var y=Object.defineProperty;var s=(t,n)=>y(t,"name",{value:n,configurable:!0});const v=require("@visulima/cerebro"),k=require("@visulima/pail/reporter"),b=require("./create-bundler.cjs"),h=require("@antfu/install-pkg"),i=require("@clack/prompts"),c=require("@visulima/fs"),j=require("@visulima/package/package-json"),l=require("@visulima/path"),w=s(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),C=w(v),S="@visulima/packem",P="1.0.0-alpha.
|
|
2
|
+
"use strict";var y=Object.defineProperty;var s=(t,n)=>y(t,"name",{value:n,configurable:!0});const v=require("@visulima/cerebro"),k=require("@visulima/pail/reporter"),b=require("./create-bundler.cjs"),h=require("@antfu/install-pkg"),i=require("@clack/prompts"),c=require("@visulima/fs"),j=require("@visulima/package/package-json"),l=require("@visulima/path"),w=s(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),C=w(v),S="@visulima/packem",P="1.0.0-alpha.46";var x=Object.defineProperty,p=s((t,n)=>x(t,"name",{value:n,configurable:!0}),"n");const q=p(t=>{t.addCommand({description:"Demonstrate options required",execute:p(async({logger:n,options:e})=>{let o="build";e.watch?o="watch":e.jit&&(o="jit");const a={};if(e.env)for(const r of e.env)a[r.key]=r.value;await b(e.dir,o,n,{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},{conflicts:"jit",description:"Watch for changes",name:"watch",type:Boolean},{conflicts:"watch",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(n=>{const[e,o]=n.split("=");return{key:e,value:o}},"type")},{defaultValue:!1,description:"Generate meta file (experimental)",name:"metafile",type:Boolean},{description:"Path to the license file",name:"license",type:String},{conflicts:"watch",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,f=s((t,n)=>z(t,"name",{value:n,configurable:!0}),"t");const B=f(t=>{t.addCommand({description:"Initialize packem configuration",execute:f(async({logger:n,options:e})=>{if(i.intro("Welcome to packem setup"),c.isAccessibleSync(l.join(e.dir,"packem.config.ts"))){n.info("Packem project already initialized, you can use `packem build` to build your project");return}if(i.isCancel(e.transformer)){i.cancel("Operation cancelled");return}if(e.transformer===void 0){const r=l.join(e.dir,"package.json");if(!c.isAccessibleSync(r))throw new Error("No package.json found in the directory");const u=j.parsePackageJson(r),g=[...Object.keys(u.dependencies??{}),...Object.keys(u.devDependencies??{})];if(e.transformer=await i.select({message:"Pick a transformer",options:[{label:"esbuild",value:"esbuild"},{label:"swc",value:"swc"},{label:"Sucrase",value:"sucrase"}]}),!g.includes(e.transformer)&&await i.confirm({message:"Do you want to install "+e.transformer+"?"})){const d=i.spinner();d.start("Installing "+e.transformer),await h.installPackage(e.transformer==="swc"?"@swc/core":e.transformer,{cwd:e.dir,dev:!0,silent:!0}),d.stop("")}}const o=`import { defineConfig } from "@visulima/packem/config";
|
|
3
3
|
import transformer from "@visulima/packem/transformer/${e.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.46";var O=Object.defineProperty,s=r((i,t)=>O(i,"name",{value:t,configurable:!0}),"n");const V=s(i=>{i.addCommand({description:"Demonstrate options required",execute:s(async({logger:t,options:e})=>{let o="build";e.watch?o="watch":e.jit&&(o="jit");const n={};if(e.env)for(const a of e.env)n[a.key]=a.value;await h(e.dir,o,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},{conflicts:"jit",description:"Watch for changes",name:"watch",type:Boolean},{conflicts:"watch",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:s(t=>{const[e,o]=t.split("=");return{key:e,value:o}},"type")},{defaultValue:!1,description:"Generate meta file (experimental)",name:"metafile",type:Boolean},{description:"Path to the license file",name:"license",type:String},{conflicts:"watch",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,u=r((i,t)=>D(i,"name",{value:t,configurable:!0}),"t");const E=u(i=>{i.addCommand({description:"Initialize packem configuration",execute:u(async({logger:t,options:e})=>{if(w("Welcome to packem setup"),f(c(e.dir,"packem.config.ts"))){t.info("Packem project already initialized, you can use `packem build` to build your project");return}if(j(e.transformer)){C("Operation cancelled");return}if(e.transformer===void 0){const a=c(e.dir,"package.json");if(!f(a))throw new Error("No package.json found in the directory");const p=B(a),g=[...Object.keys(p.dependencies??{}),...Object.keys(p.devDependencies??{})];if(e.transformer=await S({message:"Pick a transformer",options:[{label:"esbuild",value:"esbuild"},{label:"swc",value:"swc"},{label:"Sucrase",value:"sucrase"}]}),!g.includes(e.transformer)&&await x({message:"Do you want to install "+e.transformer+"?"})){const l=d();l.start("Installing "+e.transformer),await b(e.transformer==="swc"?"@swc/core":e.transformer,{cwd:e.dir,dev:!0,silent:!0}),l.stop("")}}const o=`import { defineConfig } from "@visulima/packem/config";
|
|
11
11
|
import transformer from "@visulima/packem/transformer/${e.transformer}";
|
|
12
12
|
|
|
13
13
|
export default defineConfig({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/packem",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.47",
|
|
4
4
|
"description": "A fast and modern bundler for Node.js and TypeScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -123,15 +123,15 @@
|
|
|
123
123
|
"@rollup/plugin-replace": "^5.0.7",
|
|
124
124
|
"@rollup/plugin-wasm": "^6.2.2",
|
|
125
125
|
"@rollup/pluginutils": "^5.1.0",
|
|
126
|
-
"@visulima/cerebro": "^1.1.
|
|
126
|
+
"@visulima/cerebro": "^1.1.6",
|
|
127
127
|
"@visulima/colorize": "^1.4.3",
|
|
128
|
-
"@visulima/
|
|
128
|
+
"@visulima/find-cache-dir": "^1.0.3",
|
|
129
|
+
"@visulima/fs": "^2.1.10",
|
|
129
130
|
"@visulima/humanizer": "^1.0.5",
|
|
130
|
-
"@visulima/package": "^3.0.
|
|
131
|
-
"@visulima/
|
|
132
|
-
"@visulima/pail": "^1.4.3",
|
|
131
|
+
"@visulima/package": "^3.0.4",
|
|
132
|
+
"@visulima/pail": "^1.4.4",
|
|
133
133
|
"@visulima/path": "^1.0.2",
|
|
134
|
-
"@visulima/tsconfig": "^1.0.
|
|
134
|
+
"@visulima/tsconfig": "^1.0.4",
|
|
135
135
|
"defu": "6.1.4",
|
|
136
136
|
"es-module-lexer": "^1.5.4",
|
|
137
137
|
"fastest-levenshtein": "^1.0.16",
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"hookable": "^5.5.3",
|
|
141
141
|
"magic-string": "^0.30.10",
|
|
142
142
|
"mlly": "^1.7.1",
|
|
143
|
-
"rollup": "^4.18.
|
|
143
|
+
"rollup": "^4.18.1",
|
|
144
144
|
"rollup-plugin-dts": "^6.1.1",
|
|
145
|
-
"rollup-plugin-license": "^3.5.
|
|
145
|
+
"rollup-plugin-license": "^3.5.2",
|
|
146
146
|
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
147
147
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
148
148
|
"semver": "^7.6.2"
|
|
@@ -155,28 +155,27 @@
|
|
|
155
155
|
"@babel/core": "^7.24.7",
|
|
156
156
|
"@rushstack/eslint-plugin-security": "^0.8.1",
|
|
157
157
|
"@secretlint/secretlint-rule-preset-recommend": "^8.2.4",
|
|
158
|
-
"@swc/core": "^1.6.
|
|
158
|
+
"@swc/core": "^1.6.13",
|
|
159
159
|
"@swc/types": "0.1.9",
|
|
160
160
|
"@total-typescript/ts-reset": "^0.5.1",
|
|
161
161
|
"@types/estree": "^1.0.5",
|
|
162
162
|
"@types/glob": "^8.1.0",
|
|
163
163
|
"@types/glob-parent": "^5.1.3",
|
|
164
|
-
"@types/micromatch": "^4.0.7",
|
|
165
164
|
"@types/node": "18.19.39",
|
|
166
165
|
"@types/react": "^18.3.3",
|
|
167
166
|
"@types/react-dom": "^18.3.0",
|
|
168
167
|
"@types/semver": "^7.5.8",
|
|
169
|
-
"@vitest/coverage-v8": "^
|
|
170
|
-
"@vitest/ui": "^
|
|
168
|
+
"@vitest/coverage-v8": "^2.0.1",
|
|
169
|
+
"@vitest/ui": "^2.0.1",
|
|
171
170
|
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
172
171
|
"cross-env": "^7.0.3",
|
|
173
|
-
"esbuild": "^0.
|
|
174
|
-
"eslint": "
|
|
172
|
+
"esbuild": "^0.23.0",
|
|
173
|
+
"eslint": "8.57.0",
|
|
175
174
|
"eslint-plugin-deprecation": "^3.0.0",
|
|
176
175
|
"eslint-plugin-etc": "^2.0.3",
|
|
177
176
|
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
|
|
178
177
|
"eslint-plugin-mdx": "^3.1.5",
|
|
179
|
-
"eslint-plugin-vitest": "
|
|
178
|
+
"eslint-plugin-vitest": "0.4.1",
|
|
180
179
|
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
181
180
|
"estree-walker": "^3.0.3",
|
|
182
181
|
"execa": "^9.3.0",
|
|
@@ -191,8 +190,8 @@
|
|
|
191
190
|
"sucrase": "^3.35.0",
|
|
192
191
|
"tempy": "^3.1.0",
|
|
193
192
|
"ts-essentials": "^10.0.1",
|
|
194
|
-
"typescript": "^5.5.
|
|
195
|
-
"vitest": "^
|
|
193
|
+
"typescript": "^5.5.3",
|
|
194
|
+
"vitest": "^2.0.1"
|
|
196
195
|
},
|
|
197
196
|
"peerDependencies": {
|
|
198
197
|
"@swc/core": "^1.5.7",
|