@reliverse/dler 1.7.67 → 1.7.68

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/README.md CHANGED
@@ -1,31 +1,26 @@
1
- # 🧬 dler (prev. relidler) build/publish/improve ts/js libs/cli/apps
1
+ # 🧬 dler unified package manager with sweet powers
2
2
 
3
3
  [sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/pb8ukbwpsj) — [github](https://github.com/reliverse/dler) — [npm](https://npmjs.com/@reliverse/dler)
4
4
 
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.
5
+ > @reliverse/dler (prev. relidler; `/ˈdiː.lər/`, dealer) is a unified package manager for typescript/javascript projects.
6
+ >
7
+ > dler is your package manager's best friend. dler extends bun, pnpm, yarn, and npm core functionalities by going far beyond.
6
8
  >
7
9
  > 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.
8
10
 
9
11
  ## features
10
12
 
11
- ### 🚀 core power
12
-
13
+ - **built-in bun environment** when dler is installed as a standalone application
13
14
  - **`unjs/unbuild` drop-in** with different powerful capabilities like publishing
14
15
  - **automated publishing** to npm/jsr registries with intelligent workflow management
15
16
  - **reliable builds** with comprehensive typescript/javascript support and error handling
16
17
  - **smart versioning** with automatic version bumps and semantic release integration
17
18
  - **zero configuration** eliminates `package.json` maintenance headaches forever
18
-
19
- ### ⚡ developer experience
20
-
21
19
  - **performance optimized** for speed with modern build pipelines and caching
22
- - **16 built-in commands** — comprehensive [dler commands](#dler-commands) for every workflow
20
+ - **17 built-in commands** — comprehensive [dler commands](#dler-commands) for every workflow
23
21
  - **path resolution magic** converts typescript aliases to relative imports automatically
24
22
  - **highly configurable** via dedicated configuration files with sensible defaults
25
23
  - **dual interface** — cli for everyday use, sdk for advanced programmatic control
26
-
27
- ### 🔧 advanced capabilities
28
-
29
24
  - **clean distribution builds** automatically removes internal logs and debug code
30
25
  - **monorepo ready** with experimental `libs` feature for multi-library projects
31
26
  - **magic spells** — extensible plugin system for custom build transformations
@@ -98,6 +93,7 @@ bun i -g update --latest
98
93
 
99
94
  - **when installed globally**: use `dler` anywhere.
100
95
  - **when installed as dev dep**: use with package manager name prefix, e.g. `bun dler`, inside your project directory.
96
+ - **when installed as standalone**: ...
101
97
 
102
98
  ### 2. prepare your project
103
99
 
@@ -150,7 +146,7 @@ dler [build|pub|--help] # if installed globally
150
146
 
151
147
  ## dler commands
152
148
 
153
- dler ships with a flexible command system (prev. plugins) and **16 built-in commands** (from [reliverse addons](https://reliverse.org/addons) collection).
149
+ dler ships with a flexible command system (prev. plugins) and **17 built-in commands** (from [reliverse addons](https://reliverse.org/addons) collection).
154
150
 
155
151
  feel free to create your own commands. commands can be implemented as built-in directly in `src/app/<command>/impl/*` and then imported from `src/app/<command>/cmd.ts`; or implemented in your own library and then imported from `src/app/<command>/cmd.ts`.
156
152
 
@@ -929,6 +925,10 @@ bun dler update
929
925
  }
930
926
  ```
931
927
 
928
+ **coming soon:**
929
+
930
+ - 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`).
931
+
932
932
  ## related
933
933
 
934
934
  special thanks to the project that inspired `@reliverse/dler`:
@@ -47,5 +47,17 @@ declare const _default: import("@reliverse/rempts").Command<{
47
47
  description: string;
48
48
  default: false;
49
49
  };
50
+ linker: {
51
+ type: "string";
52
+ description: string;
53
+ allowed: string[];
54
+ default: string;
55
+ };
56
+ "no-install": {
57
+ type: "boolean";
58
+ description: string;
59
+ default: false;
60
+ alias: string;
61
+ };
50
62
  }>;
51
63
  export default _default;
@@ -6,6 +6,7 @@ import { $ } from "bun";
6
6
  import pMap from "p-map";
7
7
  import { readPackageJSON } from "pkg-types";
8
8
  import semver from "semver";
9
+ import { getConfigBunfig } from "../../libs/sdk/sdk-impl/config/load.js";
9
10
  import { latestVersion } from "../../libs/sdk/sdk-impl/utils/pm/pm-meta.js";
10
11
  function isNpmAlias(versionSpec) {
11
12
  return versionSpec.startsWith("npm:");
@@ -104,6 +105,18 @@ export default defineCommand({
104
105
  type: "boolean",
105
106
  description: "Run `bun check` after updating (exclusive for bun environment at the moment)",
106
107
  default: false
108
+ },
109
+ linker: {
110
+ type: "string",
111
+ description: "Linker strategy (pro tip: use 'isolated' in a monorepo project, 'hoisted' (default) in a project where you have only one package.json). When this option is explicitly set, it takes precedence over bunfig.toml install.linker setting.",
112
+ allowed: ["isolated", "hoisted"],
113
+ default: "hoisted"
114
+ },
115
+ "no-install": {
116
+ type: "boolean",
117
+ description: "Skip the install step after updating dependencies",
118
+ default: false,
119
+ alias: "no-i"
107
120
  }
108
121
  }),
109
122
  async run({ args }) {
@@ -113,7 +126,19 @@ export default defineCommand({
113
126
  relinka("error", "No package.json found in current directory");
114
127
  return process.exit(1);
115
128
  }
116
- relinka("info", "Reading package.json...");
129
+ let effectiveLinker = args.linker;
130
+ if (typeof Bun !== "undefined") {
131
+ const bunfigConfig = await getConfigBunfig();
132
+ if (bunfigConfig?.install?.linker) {
133
+ const bunfigLinker = bunfigConfig.install.linker;
134
+ if ((bunfigLinker === "isolated" || bunfigLinker === "hoisted") && args.linker === "hoisted") {
135
+ effectiveLinker = bunfigLinker;
136
+ }
137
+ }
138
+ }
139
+ if (args.linker !== "hoisted") {
140
+ effectiveLinker = args.linker;
141
+ }
117
142
  const packageJson = await readPackageJSON();
118
143
  const dependencies = packageJson.dependencies || {};
119
144
  const devDependencies = packageJson.devDependencies || {};
@@ -222,7 +247,6 @@ export default defineCommand({
222
247
  );
223
248
  return;
224
249
  }
225
- relinka("info", `Checking ${semverDeps.length} dependencies for updates...`);
226
250
  const results = await pMap(
227
251
  semverDeps,
228
252
  async (dep) => {
@@ -273,11 +297,15 @@ export default defineCommand({
273
297
  relinka("warn", ` ${error.package} (${error.location}): ${error.error}`);
274
298
  }
275
299
  }
300
+ if (toUpdate.length === 0) {
301
+ relinka("success", `All ${upToDate.length} deps are already up to date`);
302
+ return;
303
+ }
276
304
  if (upToDate.length > 0) {
277
305
  relinka("success", `${upToDate.length} dependencies are up to date`);
278
306
  }
279
307
  if (toUpdate.length === 0) {
280
- relinka("info", "All dependencies are up to date");
308
+ relinka("success", `All ${upToDate.length} deps are already up to date`);
281
309
  return;
282
310
  }
283
311
  relinka("info", `${toUpdate.length} dependencies can be updated:`);
@@ -291,7 +319,6 @@ export default defineCommand({
291
319
  relinka("info", "Dry run mode - no changes were made");
292
320
  return;
293
321
  }
294
- relinka("info", "Updating package.json...");
295
322
  const updatedPackageJson = { ...packageJson };
296
323
  for (const update of toUpdate) {
297
324
  const dep = update.package;
@@ -341,8 +368,8 @@ export default defineCommand({
341
368
  "utf8"
342
369
  );
343
370
  relinka("success", `Updated ${toUpdate.length} dependencies in package.json`);
344
- if (typeof Bun !== "undefined") {
345
- await $`bun install`;
371
+ if (typeof Bun !== "undefined" && !args["no-install"]) {
372
+ await $`bun install --linker ${effectiveLinker}`;
346
373
  if (packageJson.scripts?.check && args["with-check-script"]) {
347
374
  await $`bun check`;
348
375
  }
@@ -10,15 +10,14 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
10
10
  projectDomain?: string | undefined;
11
11
  projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
12
12
  projectDeployService?: "none" | "vercel" | "netlify" | "railway" | "deno" | undefined;
13
- projectPackageManager?: "npm" | "bun" | "pnpm" | "yarn" | undefined;
13
+ projectPackageManager?: "pnpm" | "bun" | "npm" | "yarn" | undefined;
14
14
  projectState?: "creating" | "created" | undefined;
15
- projectCategory?: "browser" | "cli" | "unknown" | "website" | "vscode" | "library" | "mobile" | undefined;
15
+ projectCategory?: "cli" | "unknown" | "website" | "vscode" | "browser" | "library" | "mobile" | undefined;
16
16
  projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
17
- projectFramework?: "rempts" | "npm-jsr" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "vue" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | undefined;
17
+ projectFramework?: "rempts" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "vue" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | "npm-jsr" | undefined;
18
18
  projectTemplate?: "unknown" | "blefnk/relivator-nextjs-template" | "blefnk/relivator-docker-template" | "blefnk/next-react-ts-src-minimal" | "blefnk/all-in-one-nextjs-template" | "blefnk/create-t3-app" | "blefnk/create-next-app" | "blefnk/astro-starlight-template" | "blefnk/versator-nextjs-template" | "blefnk/relivator-lynxjs-template" | "blefnk/relivator-react-native-template" | "reliverse/template-browser-extension" | "microsoft/vscode-extension-samples" | "microsoft/vscode-extension-template" | "rsetarter-template" | "blefnk/deno-cli-tutorial" | undefined;
19
19
  projectTemplateDate?: string | undefined;
20
20
  features?: {
21
- commands?: string[] | undefined;
22
21
  i18n?: boolean | undefined;
23
22
  analytics?: boolean | undefined;
24
23
  themeMode?: "light" | "dark" | "dark-light" | undefined;
@@ -28,6 +27,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
28
27
  testing?: boolean | undefined;
29
28
  docker?: boolean | undefined;
30
29
  ci?: boolean | undefined;
30
+ commands?: string[] | undefined;
31
31
  webview?: string[] | undefined;
32
32
  language?: string[] | undefined;
33
33
  themes?: string[] | undefined;
@@ -37,15 +37,15 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
37
37
  analytics?: "unknown" | "vercel" | undefined;
38
38
  authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
39
39
  api?: "unknown" | "hono" | "trpc" | "graphql" | "rest" | undefined;
40
- testing?: "bun" | "unknown" | "vitest" | "jest" | "playwright" | "cypress" | undefined;
40
+ testing?: "unknown" | "bun" | "vitest" | "jest" | "playwright" | "cypress" | undefined;
41
41
  stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
42
42
  formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
43
43
  styling?: "unknown" | "tailwind" | "styled-components" | "css-modules" | "sass" | undefined;
44
44
  uiComponents?: "unknown" | "shadcn-ui" | "chakra-ui" | "material-ui" | undefined;
45
45
  databaseLibrary?: "unknown" | "drizzle" | "prisma" | "supabase" | undefined;
46
46
  databaseProvider?: "unknown" | "pg" | "mysql" | "sqlite" | "mongodb" | undefined;
47
- linting?: "eslint" | "unknown" | undefined;
48
- formatting?: "biome" | "unknown" | undefined;
47
+ linting?: "unknown" | "eslint" | undefined;
48
+ formatting?: "unknown" | "biome" | undefined;
49
49
  payment?: "unknown" | "stripe" | undefined;
50
50
  monitoring?: "unknown" | "sentry" | undefined;
51
51
  logging?: "unknown" | "axiom" | undefined;
@@ -96,7 +96,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
96
96
  importSymbol?: string | undefined;
97
97
  } | undefined;
98
98
  monorepo?: {
99
- type?: "none" | "bun" | "turborepo" | "nx" | "pnpm" | undefined;
99
+ type?: "none" | "turborepo" | "nx" | "pnpm" | "bun" | undefined;
100
100
  packages?: string[] | undefined;
101
101
  sharedPackages?: string[] | undefined;
102
102
  } | undefined;
@@ -113,7 +113,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
113
113
  repoBranch?: string | undefined;
114
114
  repoPrivacy?: "unknown" | "public" | "private" | undefined;
115
115
  projectArchitecture?: "unknown" | "fullstack" | "separated" | undefined;
116
- projectRuntime?: "node" | "bun" | "deno" | undefined;
116
+ projectRuntime?: "bun" | "deno" | "node" | undefined;
117
117
  skipPromptsUseAutoBehavior?: boolean | undefined;
118
118
  deployBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
119
119
  depsBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
@@ -1,5 +1,5 @@
1
1
  import { endPrompt, startPrompt } from "@reliverse/rempts";
2
- const version = "1.7.67";
2
+ const version = "1.7.68";
3
3
  export async function showStartPrompt(isDev) {
4
4
  await startPrompt({
5
5
  titleColor: "inverse",
@@ -5,3 +5,11 @@ import type { DlerConfig } from "./types.js";
5
5
  * Uses jiti for seamless TypeScript and ESM support.
6
6
  */
7
7
  export declare function getConfigDler(): Promise<DlerConfig>;
8
+ /**
9
+ * Searches for and loads bunfig.toml configuration files.
10
+ * Checks both local (project root) and global locations.
11
+ * Merges configurations with local overriding global.
12
+ *
13
+ * @returns The merged bunfig configuration or null if no config found
14
+ */
15
+ export declare function getConfigBunfig(): Promise<Record<string, any> | null>;
@@ -31,3 +31,57 @@ export async function getConfigDler() {
31
31
  relinka("log", `Config file not found at ${configPath}. Using default configuration.`);
32
32
  return defineConfigDler();
33
33
  }
34
+ export async function getConfigBunfig() {
35
+ const cwd = process.cwd();
36
+ const homeDir = process.env.HOME || process.env.USERPROFILE || "";
37
+ const xdgConfigHome = process.env.XDG_CONFIG_HOME;
38
+ const localPaths = [resolve(cwd, "bunfig.toml"), resolve(cwd, ".bunfig.toml")];
39
+ const globalPaths = [
40
+ ...homeDir ? [resolve(homeDir, ".bunfig.toml")] : [],
41
+ ...xdgConfigHome ? [resolve(xdgConfigHome, ".bunfig.toml")] : []
42
+ ];
43
+ let globalConfig = {};
44
+ let localConfig = {};
45
+ for (const configPath of globalPaths) {
46
+ if (await fs.pathExists(configPath)) {
47
+ try {
48
+ const configContent = await fs.readFile(configPath, "utf-8");
49
+ let config;
50
+ if (typeof Bun !== "undefined") {
51
+ config = Bun.TOML.parse(configContent);
52
+ } else {
53
+ throw new Error(
54
+ "TOML parsing requires Bun runtime. Please run with Bun to load bunfig.toml files."
55
+ );
56
+ }
57
+ globalConfig = { ...globalConfig, ...config };
58
+ } catch (error) {
59
+ relinka("error", `Error loading global bunfig from ${configPath}:`, error);
60
+ }
61
+ }
62
+ }
63
+ for (const configPath of localPaths) {
64
+ if (await fs.pathExists(configPath)) {
65
+ try {
66
+ const configContent = await fs.readFile(configPath, "utf-8");
67
+ let config;
68
+ if (typeof Bun !== "undefined") {
69
+ config = Bun.TOML.parse(configContent);
70
+ } else {
71
+ throw new Error(
72
+ "TOML parsing requires Bun runtime. Please run with Bun to load bunfig.toml files."
73
+ );
74
+ }
75
+ localConfig = { ...localConfig, ...config };
76
+ break;
77
+ } catch (error) {
78
+ relinka("error", `Error loading local bunfig from ${configPath}:`, error);
79
+ }
80
+ }
81
+ }
82
+ const mergedConfig = { ...globalConfig, ...localConfig };
83
+ if (Object.keys(mergedConfig).length === 0) {
84
+ return null;
85
+ }
86
+ return mergedConfig;
87
+ }
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "cssnano": "^7.1.0",
23
23
  "defu": "^6.1.4",
24
24
  "destr": "^2.0.5",
25
- "esbuild": "^0.25.6",
25
+ "esbuild": "^0.25.8",
26
26
  "execa": "^9.6.0",
27
27
  "file-type": "^21.0.0",
28
28
  "fix-dts-default-cjs-exports": "^1.0.1",
@@ -58,7 +58,7 @@
58
58
  "license": "MIT",
59
59
  "name": "@reliverse/dler",
60
60
  "type": "module",
61
- "version": "1.7.67",
61
+ "version": "1.7.68",
62
62
  "keywords": [
63
63
  "reliverse",
64
64
  "cli",