Skip to content

Commit 940a08b

Browse files
committed
implement dler update & dler build binary
1 parent 00f3395 commit 940a08b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1476
-297
lines changed

.config/rse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfigRse({
1010
projectAuthor: "reliverse",
1111
projectDescription:
1212
"dler (prev. relidler) is a flexible, unified, and fully automated bundler for TypeScript and JavaScript projects, as well as an NPM and JSR publishing tool.",
13-
version: "1.7.64",
13+
version: "1.7.67",
1414
projectLicense: "MIT",
1515
projectState: "creating",
1616
projectRepository: "https://github.com/reliverse/dler",

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DLER_DEV_MODE="true"

README.md

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
[sponsor](https://github.com/sponsors/blefnk)[discord](https://discord.gg/pb8ukbwpsj)[github](https://github.com/reliverse/dler)[npm](https://npmjs.com/@reliverse/dler)
44

5-
> @reliverse/dler (`/ˈdiː.lər/`, dealer) is a flexible, unified, and fully automated bundler for typescript/javascript projects that doubles as an npm/jsr publishing tool. beyond bundling, dler serves as a comprehensive codemod toolkit for modern typescript/javascript development.
5+
> @reliverse/dler (`/ˈdiː.lər/`, dealer) is your package manager's best friend. dler extends bun, pnpm, yarn, and npm core functionality and goes far beyond.
6+
>
7+
> at its core, dler is a flexible, unified, and fully automated bundler for typescript/javascript projects that doubles as an npm/jsr publishing tool. beyond bundling, dler serves as a comprehensive codemod toolkit for modern typescript/javascript development.
68
79
## features
810

@@ -166,9 +168,47 @@ since dler is fully modular, build command is separated for its own build-in plu
166168
bun dler build ...
167169
```
168170

169-
### 2. `pub`
171+
#### 1.1. `build binary` - Standalone Executable Builder
172+
173+
creates standalone executables for different platforms using bun's `--compile` feature.
174+
175+
```bash
176+
# build for default targets (linux x64, windows x64, macos arm64)
177+
bun dler build binary
178+
179+
# build for all supported platforms
180+
bun dler build binary --targets=all
181+
182+
# build for specific platforms
183+
bun dler build binary --targets=bun-linux-x64,bun-windows-x64
184+
185+
# build with optimization
186+
bun dler build binary --bytecode --minify --sourcemap
187+
188+
# windows-specific options
189+
bun dler build binary --windows-icon=icon.ico --windows-hide-console
190+
191+
# debugging options
192+
bun dler build binary --no-compile --external=c12,terminal-kit,problematic-package
170193

171-
pub command is separated for its own build-in plugin as well.
194+
# list all available targets
195+
bun dler build binary --targets=list
196+
```
197+
198+
**supported platforms:**
199+
200+
- linux: x64, x64-baseline, x64-modern, arm64 (with glibc/musl variants)
201+
- windows: x64, x64-baseline, x64-modern (with .exe extension)
202+
- macos: x64, arm64
203+
204+
**output files:**
205+
206+
- executables: `mycli-linux`, `mycli-windows.exe`, `mycli-darwin-arm64`
207+
- bundled scripts: `mycli-linux.js`, `mycli-windows.js`, `mycli-darwin-arm64.js`
208+
209+
**typical file sizes:** 60-120mb per executable (includes bun runtime and dependencies)
210+
211+
### 2. `pub`
172212

173213
it already calls build command by itself, so you don't need to run `dler build` separately.
174214

@@ -864,6 +904,35 @@ bun add @reliverse/dler-sdk
864904

865905
**usage example**: [@reliverse/rse](https://github.com/reliverse/rse-website-builder) leverages this sdk to extend its functionality.
866906

907+
### 17. `update`
908+
909+
updates your project's dependencies to the latest version.
910+
911+
updates not only `dependencies`/`devDependencies`/`peerDependencies`/`optionalDependencies`, but also [monorepo catalogs](https://bun.sh/docs/install/catalogs).
912+
913+
```bash
914+
bun dler update
915+
```
916+
917+
**params:**
918+
919+
- `--with-check-script` (boolean) — runs `bun check` after updating (exclusive for bun environment at the moment)
920+
921+
**example package.json:**
922+
923+
```json
924+
{
925+
"scripts": {
926+
"latest": "bun dler update --with-check-script",
927+
"check": "tsc --noEmit && eslint --cache --fix . && biome check --fix --unsafe . && knip"
928+
}
929+
}
930+
```
931+
932+
**coming soon:**
933+
934+
- recursive lookup for deps in multiple package.json files (e.g. monorepo; or case when you have `C:/foo/bar1/package.json` and `C:/foo/bar2/package.json` and using `dler update` in `C:/foo`).
935+
867936
## related
868937

869938
special thanks to the project that inspired `@reliverse/dler`:

biome.jsonc renamed to biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.1.1/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
33
"vcs": {
44
"enabled": false,
55
"clientKind": "git",
@@ -10,6 +10,7 @@
1010
"**",
1111
"!**/node_modules/",
1212
"!**/bun.lock",
13+
"!**/dist/",
1314
"!**/dist-jsr/",
1415
"!**/dist-npm/",
1516
"!**/dist-libs/"

bun.lock

Lines changed: 139 additions & 116 deletions
Large diffs are not rendered by default.

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import tseslint from "typescript-eslint";
1010

1111
/** @type {import("typescript-eslint").Config} */
1212
const config = tseslint.config(
13-
{ ignores: ["**/{node_modules,dist-jsr,dist-npm,dist-libs}/"] },
13+
{ ignores: ["**/{node_modules,dist-jsr,dist-npm,dist-libs}/", "**/.config/"] },
1414
eslint.configs.recommended,
1515
tseslint.configs.recommended,
1616
tseslint.configs.stylistic,

package.json

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
22
"name": "@reliverse/dler",
33
"author": "reliverse",
4-
"version": "1.7.64",
4+
"version": "1.7.67",
55
"type": "module",
66
"license": "MIT",
77
"description": "@reliverse/dler is a flexible, unified, and fully automated bundler for typescript and javascript projects, as well as an npm and jsr publishing tool. dler is not only a bundler, it also tries to serve as the most powerful codemod toolkit for js/ts.",
88
"scripts": {
9-
"rse:cli": "bun rse cli",
109
"dler": "bun src/cli.ts",
11-
"dev": "bun src/cli.ts --dev",
12-
"pub": "bun src/cli.ts pub --dev",
13-
"remdn": "bun src/cli.ts remdn --mode dirs-scan-compare",
14-
"agg:cfg": "bun src/cli.ts agg --dev --input src/libs/cfg --out src/libs/cfg/cfg-mod.ts",
15-
"agg:sdk": "bun src/cli.ts agg --dev --input src/libs/sdk --out src/libs/sdk/sdk-mod.ts",
10+
"pub": "bun dler pub",
11+
"rse:cli": "bun rse cli",
12+
"latest": "bun dler update",
13+
"build:binary": "bun dler build binary",
14+
"remdn": "bun dler remdn --mode dirs-scan-compare",
15+
"agg:cfg": "bun dler agg --input src/libs/cfg --out src/libs/cfg/cfg-mod.ts",
16+
"agg:sdk": "bun dler agg --input src/libs/sdk --out src/libs/sdk/sdk-mod.ts",
1617
"magic:example": "bun example/magic/e-ms-inject.ts",
17-
"magic": "bun src/cli.ts magic",
18+
"magic": "bun dler magic",
1819
"tests": "bun test ./.tests",
19-
"cmds": "bun src/cli.ts rempts",
20-
"cmd": "bun src/cli.ts rempts --init",
21-
"latest": "bun update --latest && bun check",
20+
"cmds": "bun dler rempts",
21+
"cmd": "bun dler rempts --init",
2222
"check": "tsc --noEmit && eslint --cache --fix . && biome check --fix --unsafe . && knip",
23-
"libs:pack": "bun src/cli.ts pack dist-libs --output example/app/libs/mock",
24-
"libs:unpack": "bun src/cli.ts pack example/app/libs/mock/mock-mod.ts --output dist-libs --unpack",
23+
"libs:pack": "bun dler pack dist-libs --output example/app/libs/mock",
24+
"libs:unpack": "bun dler pack example/app/libs/mock/mock-mod.ts --output dist-libs --unpack",
2525
"libs:example": "bun example/mod.ts libs",
26-
"stack:pack": "bun src/cli.ts pack pack-input --output pack-output/better-t-stack",
27-
"stack:unpack": "bun src/cli.ts pack pack-output/better-t-stack/better-t-stack-mod.ts --output unpacked-output/better-t-stack --unpack"
26+
"stack:pack": "bun dler pack pack-input --output pack-output/better-t-stack",
27+
"stack:unpack": "bun dler pack pack-output/better-t-stack/better-t-stack-mod.ts --output unpacked-output/better-t-stack --unpack"
2828
},
2929
"dependencies": {
3030
"@reliverse/bleump": "^1.1.4",
@@ -56,6 +56,7 @@
5656
"hookable": "^5.5.3",
5757
"jiti": "^2.4.2",
5858
"jsonrepair": "^3.13.0",
59+
"ky": "^1.8.2",
5960
"lookpath": "^1.2.3",
6061
"magic-string": "^0.30.17",
6162
"mlly": "^1.7.4",
@@ -67,6 +68,8 @@
6768
"postcss-nested": "^7.0.2",
6869
"pretty-bytes": "^7.0.0",
6970
"pretty-ms": "^9.2.0",
71+
"registry-auth-token": "^5.1.0",
72+
"registry-url": "^7.2.0",
7073
"rollup": "^4.45.1",
7174
"rollup-plugin-dts": "^6.2.1",
7275
"scule": "^1.3.0",
@@ -78,7 +81,7 @@
7881
"untyped": "^2.0.0"
7982
},
8083
"devDependencies": {
81-
"@biomejs/biome": "2.1.1",
84+
"@biomejs/biome": "^2.1.2",
8285
"@eslint/js": "^9.31.0",
8386
"@reliverse/rse": "^1.7.9",
8487
"@stylistic/eslint-plugin": "^5.2.0",
@@ -88,8 +91,8 @@
8891
"@types/semver": "^7.7.0",
8992
"@types/shebang-command": "^1.2.2",
9093
"@volar/typescript": "^2.4.19",
91-
"@vue/language-core": "^3.0.1",
92-
"@vue/language-core2.0": "npm:@vue/language-core@3.0.1",
94+
"@vue/language-core": "^3.0.2",
95+
"@vue/language-core2.0": "npm:@vue/language-core@2.0.29",
9396
"eslint": "^9.31.0",
9497
"eslint-plugin-no-relative-import-paths": "^1.6.1",
9598
"eslint-plugin-perfectionist": "^4.15.0",
@@ -99,8 +102,8 @@
99102
"typescript-eslint": "^8.37.0",
100103
"vue": "^3.5.17",
101104
"vue-sfc-transformer": "^0.1.16",
102-
"vue-tsc": "^3.0.1",
103-
"vue-tsc1": "npm:vue-tsc@^3.0.1",
104-
"vue-tsc2.0": "npm:vue-tsc@3.0.1"
105+
"vue-tsc": "^3.0.2",
106+
"vue-tsc1": "npm:vue-tsc@1.8.27",
107+
"vue-tsc2.0": "npm:vue-tsc@2.0.29"
105108
}
106109
}

src/app/agg/cmd.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ import { useAggregator } from "./impl";
55

66
export default defineCommand({
77
args: defineArgs({
8-
dev: {
9-
description: "Run in development mode",
10-
type: "boolean",
11-
},
128
imports: {
139
description: "If true, produce import lines instead of export lines",
1410
type: "boolean",

0 commit comments

Comments
 (0)