@reliverse/dler 1.3.5 → 1.4.0

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.
Files changed (74) hide show
  1. package/bin/app/agg/cmd.d.ts +34 -0
  2. package/bin/app/agg/cmd.js +44 -3
  3. package/bin/app/agg/impl.d.ts +2 -1
  4. package/bin/app/agg/impl.js +94 -33
  5. package/bin/app/cmds.d.ts +34 -0
  6. package/bin/app/deps/cmd.js +1 -1
  7. package/bin/app/deps/impl/filesystem.js +1 -1
  8. package/bin/app/deps/impl/formatter.js +0 -1
  9. package/bin/app/inject/expect/impl.js +2 -2
  10. package/bin/app/merge/cmd.d.ts +44 -0
  11. package/bin/app/merge/{cmd.txt → cmd.js} +79 -141
  12. package/bin/app/migrate/cmd.d.ts +0 -0
  13. package/bin/app/migrate/cmd.js +0 -0
  14. package/bin/app/relifso/cmd.js +1 -1
  15. package/bin/app/relifso/init/cmd.js +1 -1
  16. package/bin/app/relifso/init/impl/mod.js +2 -2
  17. package/bin/app/relifso/init/impl/templates/t-license.js +0 -4
  18. package/bin/app/relifso/init/impl/templates/t-readme.js +0 -18
  19. package/bin/app/rempts/init/cmd/cmd.js +2 -4
  20. package/bin/app/rempts/init/cmds/cmd.js +2 -2
  21. package/bin/app/rempts/migrate/cmd.js +1 -1
  22. package/bin/app/rempts/migrate/impl/commander.js +0 -1
  23. package/bin/app/split/cmd.d.ts +21 -3
  24. package/bin/app/split/cmd.js +41 -0
  25. package/bin/app/split/impl.d.ts +0 -7
  26. package/bin/app/split/impl.js +2 -23
  27. package/bin/impl.js +8 -4
  28. package/bin/info.js +1 -1
  29. package/bin/init.js +2 -11
  30. package/bin/libs/sdk/sdk-impl/build/build-library.js +38 -22
  31. package/bin/libs/sdk/sdk-impl/build/build-regular.js +40 -25
  32. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/auto.js +1 -1
  33. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.js +1 -2
  34. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/copy/copy.js +1 -1
  35. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist.js +1 -1
  36. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/build.js +1 -1
  37. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/config.js +1 -1
  38. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/cjs.js +0 -1
  39. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/esbuild.js +1 -1
  40. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/shebang.js +1 -1
  41. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/stub.js +7 -1
  42. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/watch.js +1 -1
  43. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/untyped/index.js +1 -1
  44. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/utils.d.ts +0 -1
  45. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/utils.js +3 -5
  46. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/validate.js +1 -1
  47. package/bin/libs/sdk/sdk-impl/library-flow.d.ts +2 -2
  48. package/bin/libs/sdk/sdk-impl/library-flow.js +8 -6
  49. package/bin/libs/sdk/sdk-impl/pub/pub-regular.js +1 -1
  50. package/bin/libs/sdk/sdk-impl/spell/spell-executors.js +1 -1
  51. package/bin/libs/sdk/sdk-impl/spell/spell-filesystem.js +2 -2
  52. package/bin/libs/sdk/sdk-impl/utils/tools/tools-agg.js +2 -2
  53. package/bin/libs/sdk/sdk-impl/utils/utils-build.js +2 -2
  54. package/bin/libs/sdk/sdk-impl/utils/utils-bump.d.ts +8 -2
  55. package/bin/libs/sdk/sdk-impl/utils/utils-bump.js +21 -209
  56. package/bin/libs/sdk/sdk-impl/utils/utils-clean.d.ts +6 -0
  57. package/bin/libs/sdk/sdk-impl/utils/utils-clean.js +34 -2
  58. package/bin/libs/sdk/sdk-impl/utils/utils-consts.js +1 -1
  59. package/bin/libs/sdk/sdk-impl/utils/utils-deps.js +1 -1
  60. package/bin/libs/sdk/sdk-impl/utils/utils-fs.js +2 -2
  61. package/bin/libs/sdk/sdk-impl/utils/utils-jsr-json.js +2 -2
  62. package/bin/libs/sdk/sdk-impl/utils/utils-misc.d.ts +7 -0
  63. package/bin/libs/sdk/sdk-impl/utils/utils-misc.js +7 -0
  64. package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-libs.js +2 -2
  65. package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-reg.js +2 -2
  66. package/bin/libs/sdk/sdk-impl/utils/utils-tsconfig.js +2 -2
  67. package/bin/libs/sdk/sdk-mod.d.ts +2 -3
  68. package/bin/libs/sdk/sdk-mod.js +1 -7
  69. package/bin/libs/sdk/sdk-types.d.ts +1 -1
  70. package/bin/load.js +1 -1
  71. package/bin/types.d.ts +1 -1
  72. package/package.json +14 -16
  73. package/bin/libs/sdk/sdk-impl/utils/utils-paths.d.ts +0 -55
  74. package/bin/libs/sdk/sdk-impl/utils/utils-paths.js +0 -667
@@ -1,40 +1,9 @@
1
+ import { bumpHandler as bleumpHandler } from "@reliverse/bleump";
2
+ import path from "@reliverse/pathkit";
3
+ import fs from "@reliverse/relifso";
1
4
  import { relinka } from "@reliverse/relinka";
2
- import fs from "fs-extra";
3
- import pMap from "p-map";
4
- import path from "pathe";
5
- import { readPackageJSON } from "pkg-types";
6
- import semver from "semver";
7
- import { glob } from "tinyglobby";
8
- import { CONCURRENCY_DEFAULT, PROJECT_ROOT } from "./utils-consts.js";
9
- import { readFileSafe, writeFileSafe } from "./utils-fs.js";
10
- const IGNORE_PATTERNS = [
11
- "**/node_modules/**",
12
- "**/.git/**",
13
- "**/dist/**",
14
- "**/build/**",
15
- "**/.next/**",
16
- "**/coverage/**",
17
- "**/.cache/**",
18
- "**/tmp/**",
19
- "**/.temp/**",
20
- "**/package-lock.json",
21
- "**/pnpm-lock.yaml",
22
- "**/yarn.lock",
23
- "**/bun.lock"
24
- ];
25
- const createJsonVersionRegex = (oldVer) => new RegExp(`"version"\\s*:\\s*"${oldVer}"`, "g");
26
- const TS_VERSION_REGEXES = [
27
- (oldVer) => new RegExp(`(export\\s+const\\s+version\\s*=\\s*["'])${oldVer}(["'])`, "g"),
28
- (oldVer) => new RegExp(`(const\\s+version\\s*=\\s*["'])${oldVer}(["'])`, "g"),
29
- (oldVer) => new RegExp(`(version\\s*:\\s*["'])${oldVer}(["'])`, "g"),
30
- (oldVer) => new RegExp(`(VERSION\\s*=\\s*["'])${oldVer}(["'])`, "g"),
31
- (oldVer) => new RegExp(
32
- `(export\\s+const\\s+cliVersion\\s*=\\s*["'])${oldVer}(["'])`,
33
- "g"
34
- ),
35
- (oldVer) => new RegExp(`(const\\s+cliVersion\\s*=\\s*["'])${oldVer}(["'])`, "g")
36
- ];
37
- export async function bumpHandler(bumpMode, bumpDisable, commonPubPause, bumpFilter) {
5
+ import { PROJECT_ROOT } from "./utils-consts.js";
6
+ export async function bumpHandler(bumpMode, bumpDisable, commonPubPause, bumpFilter, customVersion, mainFile = "package.json") {
38
7
  if (bumpDisable || commonPubPause) {
39
8
  relinka(
40
9
  "log",
@@ -42,28 +11,21 @@ export async function bumpHandler(bumpMode, bumpDisable, commonPubPause, bumpFil
42
11
  );
43
12
  return;
44
13
  }
45
- const pkgPath = path.resolve("package.json");
46
- if (!await fs.pathExists(pkgPath)) {
47
- throw new Error("package.json not found");
48
- }
49
- const pkgJson = await readPackageJSON();
50
- if (!pkgJson.version) {
51
- throw new Error("No version field found in package.json");
52
- }
53
- const oldVersion = pkgJson.version;
54
- if (!semver.valid(oldVersion)) {
55
- throw new Error(`Invalid existing version in package.json: ${oldVersion}`);
56
- }
57
- relinka(
58
- "log",
59
- `Auto-incrementing version from ${oldVersion} using "${bumpMode}"`
60
- );
61
- const incremented = autoIncrementVersion(oldVersion, bumpMode);
62
- if (oldVersion !== incremented) {
63
- await bumpVersions(oldVersion, incremented, bumpFilter);
14
+ try {
15
+ await bleumpHandler(
16
+ bumpMode,
17
+ bumpDisable,
18
+ bumpFilter,
19
+ {
20
+ dryRun: false,
21
+ mainFile: path.resolve(mainFile)
22
+ },
23
+ customVersion
24
+ );
64
25
  await setBumpDisabled(true, commonPubPause);
65
- } else {
66
- relinka("log", `Version is already at ${oldVersion}, no bump needed.`);
26
+ } catch (error) {
27
+ relinka("error", "Failed to bump versions:", error);
28
+ throw error;
67
29
  }
68
30
  }
69
31
  export async function setBumpDisabled(value, commonPubPause) {
@@ -80,160 +42,10 @@ export async function setBumpDisabled(value, commonPubPause) {
80
42
  );
81
43
  return;
82
44
  }
83
- let content = await readFileSafe(dlerCfgPath, "", "bumpDisable update");
45
+ let content = await fs.readFile(dlerCfgPath, "utf-8");
84
46
  content = content.replace(
85
47
  /bumpDisable\s*:\s*(true|false)/,
86
48
  `bumpDisable: ${value}`
87
49
  );
88
- await writeFileSafe(dlerCfgPath, content, "bumpDisable update");
89
- }
90
- function autoIncrementVersion(oldVersion, bumpMode) {
91
- if (!semver.valid(oldVersion)) {
92
- throw new Error(`Can't auto-increment invalid version: ${oldVersion}`);
93
- }
94
- const releaseTypeMap = {
95
- autoMajor: "major",
96
- autoMinor: "minor",
97
- autoPatch: "patch"
98
- };
99
- const newVer = semver.inc(oldVersion, releaseTypeMap[bumpMode]);
100
- if (!newVer) {
101
- throw new Error(`semver.inc failed for ${oldVersion} and mode ${bumpMode}`);
102
- }
103
- return newVer;
104
- }
105
- async function bumpVersions(oldVersion, newVersion, bumpFilter) {
106
- relinka(
107
- "verbose",
108
- `Starting bumpVersions from ${oldVersion} to ${newVersion}`
109
- );
110
- try {
111
- const filePatterns = [];
112
- if (bumpFilter.length > 0) {
113
- for (const filter of bumpFilter) {
114
- if (filter.includes("/") || filter.includes("\\")) {
115
- filePatterns.push(`**/${filter}`);
116
- continue;
117
- }
118
- if (filter.includes(".")) {
119
- filePatterns.push(`**/${filter}`);
120
- continue;
121
- }
122
- filePatterns.push(`**/${filter}.*`);
123
- }
124
- relinka(
125
- "verbose",
126
- `Generated patterns from filters: ${filePatterns.join(", ")}`
127
- );
128
- } else {
129
- filePatterns.push("**/package.json");
130
- relinka(
131
- "verbose",
132
- "No filters provided, falling back to only process package.json"
133
- );
134
- }
135
- const ignorePatterns = [
136
- "**/node_modules/**",
137
- "**/.git/**",
138
- ...IGNORE_PATTERNS
139
- ];
140
- try {
141
- const gitignorePath = path.join(PROJECT_ROOT, ".gitignore");
142
- if (await fs.pathExists(gitignorePath)) {
143
- const gitignoreContent = await fs.readFile(gitignorePath, "utf8");
144
- const gitignorePatterns = gitignoreContent.split("\n").map((line) => line.trim()).filter((line) => line && !line.startsWith("#")).map((pattern) => {
145
- if (pattern.startsWith("/")) {
146
- return pattern.substring(1);
147
- }
148
- if (pattern.endsWith("/")) {
149
- return `**/${pattern}**`;
150
- }
151
- return `**/${pattern}`;
152
- });
153
- if (gitignorePatterns.length > 0) {
154
- relinka(
155
- "verbose",
156
- `Bump will not process ${gitignorePatterns.length} patterns listed in .gitignore`
157
- );
158
- ignorePatterns.push(...gitignorePatterns);
159
- }
160
- }
161
- } catch (err) {
162
- relinka("verbose", `Could not process .gitignore: ${err}`);
163
- }
164
- const matchedFiles = await glob(filePatterns, {
165
- absolute: true,
166
- cwd: PROJECT_ROOT,
167
- dot: false,
168
- // Skip hidden files
169
- ignore: ignorePatterns
170
- });
171
- relinka(
172
- "verbose",
173
- `Found ${matchedFiles.length} files to check for version bumping`
174
- );
175
- let modifiedCount = 0;
176
- await pMap(
177
- matchedFiles,
178
- async (file) => {
179
- try {
180
- if (!await fs.pathExists(file)) {
181
- relinka("verbose", `File does not exist (skipped): ${file}`);
182
- return;
183
- }
184
- const content = await readFileSafe(file, "", "bumpVersions");
185
- const modified = await updateVersionInContent(
186
- file,
187
- content,
188
- oldVersion,
189
- newVersion
190
- );
191
- if (modified) {
192
- modifiedCount++;
193
- relinka("verbose", `Updated version in: ${file}`);
194
- }
195
- } catch (err) {
196
- relinka("error", `Error processing file ${file}: ${err}`);
197
- }
198
- },
199
- { concurrency: CONCURRENCY_DEFAULT }
200
- );
201
- if (modifiedCount > 0) {
202
- relinka(
203
- "success",
204
- `Updated version from ${oldVersion} to ${newVersion} in ${modifiedCount} file(s)`
205
- );
206
- } else {
207
- relinka("warn", "No files were updated with the new version");
208
- }
209
- } catch (error) {
210
- relinka("error", "Failed to bump versions:", error);
211
- throw error;
212
- }
213
- relinka("verbose", "Exiting bumpVersions");
214
- }
215
- async function updateVersionInContent(filePath, content, oldVersion, newVersion) {
216
- let updatedContent = content;
217
- let changed = false;
218
- if (/\.(json|jsonc|json5)$/.test(filePath)) {
219
- if (content.includes(`"version": "${oldVersion}"`)) {
220
- updatedContent = content.replace(
221
- createJsonVersionRegex(oldVersion),
222
- `"version": "${newVersion}"`
223
- );
224
- changed = true;
225
- }
226
- } else if (filePath.endsWith(".ts")) {
227
- for (const regexFactory of TS_VERSION_REGEXES) {
228
- const regex = regexFactory(oldVersion);
229
- if (regex.test(updatedContent)) {
230
- updatedContent = updatedContent.replace(regex, `$1${newVersion}$2`);
231
- changed = true;
232
- }
233
- }
234
- }
235
- if (changed) {
236
- await writeFileSafe(filePath, updatedContent, "version update");
237
- }
238
- return changed;
50
+ await fs.writeFile(dlerCfgPath, content, "utf-8");
239
51
  }
@@ -3,3 +3,9 @@ import type { LibConfig } from "../../sdk-types.js";
3
3
  * Recursively removes any existing distribution folders.
4
4
  */
5
5
  export declare function removeDistFolders(distNpmDirName: string, distJsrDirName: string, libsDirDist: string, libsList: Record<string, LibConfig>): Promise<boolean>;
6
+ /**
7
+ * Removes calls from TypeScript/JavaScript files
8
+ * @param targetDir Directory to process recursively
9
+ * @returns Promise<boolean> True if successful
10
+ */
11
+ export declare function removeLogInternalCalls(targetDir: string): Promise<boolean>;
@@ -1,7 +1,7 @@
1
+ import path from "@reliverse/pathkit";
2
+ import fs from "@reliverse/relifso";
1
3
  import { relinka } from "@reliverse/relinka";
2
- import fs from "fs-extra";
3
4
  import pMap from "p-map";
4
- import path from "pathe";
5
5
  import { CONCURRENCY_DEFAULT, PROJECT_ROOT } from "./utils-consts.js";
6
6
  export async function removeDistFolders(distNpmDirName, distJsrDirName, libsDirDist, libsList) {
7
7
  const foldersToRemove = [];
@@ -33,3 +33,35 @@ export async function removeDistFolders(distNpmDirName, distJsrDirName, libsDirD
33
33
  }
34
34
  return true;
35
35
  }
36
+ export async function removeLogInternalCalls(targetDir) {
37
+ const files = await fs.readdir(targetDir, { recursive: true });
38
+ const tsJsFiles = files.filter(
39
+ (file) => file.endsWith(".ts") || file.endsWith(".js") || file.endsWith(".tsx") || file.endsWith(".jsx")
40
+ );
41
+ await pMap(
42
+ tsJsFiles,
43
+ async (file) => {
44
+ const filePath = path.join(targetDir, file);
45
+ const content = await fs.readFile(filePath, "utf-8");
46
+ let newContent = content.replace(
47
+ /logInternal\s*\(\s*(?:`[^`]*`|'[^']*'|"[^"]*"|(?:[^;]*?,\s*)*[^;]*?)\s*\)\s*;?/g,
48
+ ""
49
+ );
50
+ newContent = newContent.replace(
51
+ /relinka\s*\(\s*["']internal["']\s*,\s*(?:`[^`]*`|'[^']*'|"[^"]*"|(?:[^;]*?,\s*)*[^;]*?)\s*\)\s*;?/g,
52
+ ""
53
+ );
54
+ newContent = newContent.replace(/\n\s*\n\s*\n/g, "\n\n").replace(/^\s*\n/gm, "").replace(/\n\s*$/g, "\n");
55
+ if (newContent !== content) {
56
+ await fs.writeFile(filePath, newContent);
57
+ relinka("verbose", `Processed: ${filePath}`);
58
+ }
59
+ },
60
+ { concurrency: CONCURRENCY_DEFAULT }
61
+ );
62
+ relinka(
63
+ "success",
64
+ "Successfully removed logInternal and relinka internal calls from files"
65
+ );
66
+ return true;
67
+ }
@@ -1,4 +1,4 @@
1
- import path from "pathe";
1
+ import path from "@reliverse/pathkit";
2
2
  export const PROJECT_ROOT = path.resolve(process.cwd());
3
3
  export const CONCURRENCY_DEFAULT = 1;
4
4
  export const tsconfigJson = "tsconfig.json";
@@ -2,7 +2,7 @@ import { relinka } from "@reliverse/relinka";
2
2
  import { readPackageJSON } from "pkg-types";
3
3
  import { glob } from "tinyglobby";
4
4
  import { readFileSafe } from "./utils-fs.js";
5
- import { extractPackageName } from "./utils-paths.js";
5
+ import { extractPackageName } from "./utils-misc.js";
6
6
  export async function filterDeps(deps, clearUnused, outDirBin, isJsr, rmDepsMode, rmDepsPatterns) {
7
7
  relinka("verbose", `Filtering dependencies (clearUnused=${clearUnused})`);
8
8
  if (!deps) return {};
@@ -1,7 +1,7 @@
1
+ import path from "@reliverse/pathkit";
2
+ import fs from "@reliverse/relifso";
1
3
  import { relinka } from "@reliverse/relinka";
2
- import fs from "fs-extra";
3
4
  import pMap from "p-map";
4
- import path from "pathe";
5
5
  import { glob } from "tinyglobby";
6
6
  import { CONCURRENCY_DEFAULT, SHOW_VERBOSE } from "./utils-consts.js";
7
7
  import { determineDistName } from "./utils-determine.js";
@@ -1,7 +1,7 @@
1
+ import path from "@reliverse/pathkit";
2
+ import fs from "@reliverse/relifso";
1
3
  import { relinka } from "@reliverse/relinka";
2
- import fs from "fs-extra";
3
4
  import pMap from "p-map";
4
- import path from "pathe";
5
5
  import { readPackageJSON } from "pkg-types";
6
6
  import { glob } from "tinyglobby";
7
7
  import { cliDomainDocs, CONCURRENCY_DEFAULT } from "./utils-consts.js";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Extracts the package name (or scoped package name) from a potential bare import path.
3
+ * Returns null if the path is relative, absolute, or empty.
4
+ * @param importPath - The import path string.
5
+ * @returns The package name (e.g., "react", "@scope/pkg") or null.
6
+ */
7
+ export declare function extractPackageName(importPath: string | undefined): null | string;
@@ -0,0 +1,7 @@
1
+ export function extractPackageName(importPath) {
2
+ if (!importPath || importPath.startsWith(".") || importPath.startsWith("/")) {
3
+ return null;
4
+ }
5
+ const match = /^(@[^/]+\/[^/]+|[^/]+)/.exec(importPath);
6
+ return match ? match[0] : null;
7
+ }
@@ -1,6 +1,6 @@
1
+ import path from "@reliverse/pathkit";
2
+ import fs from "@reliverse/relifso";
1
3
  import { relinka } from "@reliverse/relinka";
2
- import fs from "fs-extra";
3
- import path from "pathe";
4
4
  import {
5
5
  definePackageJSON,
6
6
  readPackageJSON
@@ -1,6 +1,6 @@
1
+ import path from "@reliverse/pathkit";
2
+ import fs from "@reliverse/relifso";
1
3
  import { relinka } from "@reliverse/relinka";
2
- import fs from "fs-extra";
3
- import path from "pathe";
4
4
  import {
5
5
  definePackageJSON,
6
6
  readPackageJSON
@@ -1,6 +1,6 @@
1
+ import path from "@reliverse/pathkit";
2
+ import fs from "@reliverse/relifso";
1
3
  import { relinka } from "@reliverse/relinka";
2
- import fs from "fs-extra";
3
- import path from "pathe";
4
4
  import { defineTSConfig } from "pkg-types";
5
5
  import { tsconfigJson } from "./utils-consts.js";
6
6
  export async function createTSConfig(outDirRoot, allowImportingTsExtensions) {
@@ -23,7 +23,7 @@ export type { BaseBuildEntry, BuildContext, BuildEntry, BuildHooks, BuildOptions
23
23
  export { defineBuildConfig, definePreset, } from "./sdk-impl/build/bundlers/unified/types.js";
24
24
  export { typesBuild } from "./sdk-impl/build/bundlers/unified/untyped/index.js";
25
25
  export type { UntypedBuildEntry, UntypedHooks, UntypedOutput, UntypedOutputs, } from "./sdk-impl/build/bundlers/unified/untyped/types.js";
26
- export { arrayIncludes, dumpObject, ensuredir, extractExportFilenames, getpkg, inferPkgExternals, listRecursively, removeExtension, resolvePreset, rmdir, symlink, warn, withTrailingSlash, } from "./sdk-impl/build/bundlers/unified/utils.js";
26
+ export { arrayIncludes, dumpObject, extractExportFilenames, getpkg, inferPkgExternals, listRecursively, removeExtension, resolvePreset, rmdir, symlink, warn, withTrailingSlash, } from "./sdk-impl/build/bundlers/unified/utils.js";
27
27
  export { validateDependencies, validatePackage, } from "./sdk-impl/build/bundlers/unified/validate.js";
28
28
  export { processLibraryFlow, libraries_buildPublish, } from "./sdk-impl/library-flow.js";
29
29
  export { library_publishLibrary } from "./sdk-impl/pub/pub-library.js";
@@ -47,8 +47,7 @@ export { handleDlerError } from "./sdk-impl/utils/utils-error.js";
47
47
  export { copyRootFile, getDirectorySize, outDirBinFilesCount, deleteSpecificFiles, readFileSafe, writeFileSafe, } from "./sdk-impl/utils/utils-fs.js";
48
48
  export { finalizeBuild } from "./sdk-impl/utils/utils-info.js";
49
49
  export { createJsrJSON, renameTsxFiles, } from "./sdk-impl/utils/utils-jsr-json.js";
50
- export type { FileResult, ConvertImportPathsOptions, ConvertImportExtensionsOptions, } from "./sdk-impl/utils/utils-paths.js";
51
- export { extractPackageName, convertImportPaths, convertImportExtensionsJsToTs, normalizeQuotes, } from "./sdk-impl/utils/utils-paths.js";
50
+ export { extractPackageName } from "./sdk-impl/utils/utils-misc.js";
52
51
  export type { PerfTimer } from "./sdk-impl/utils/utils-perf.js";
53
52
  export { createPerfTimer, getElapsedPerfTime, pausePerfTimer, resumePerfTimer, } from "./sdk-impl/utils/utils-perf.js";
54
53
  export { library_createPackageJSON } from "./sdk-impl/utils/utils-pkg-json-libs.js";
@@ -37,7 +37,6 @@ export { typesBuild } from "./sdk-impl/build/bundlers/unified/untyped/index.js";
37
37
  export {
38
38
  arrayIncludes,
39
39
  dumpObject,
40
- ensuredir,
41
40
  extractExportFilenames,
42
41
  getpkg,
43
42
  inferPkgExternals,
@@ -130,12 +129,7 @@ export {
130
129
  createJsrJSON,
131
130
  renameTsxFiles
132
131
  } from "./sdk-impl/utils/utils-jsr-json.js";
133
- export {
134
- extractPackageName,
135
- convertImportPaths,
136
- convertImportExtensionsJsToTs,
137
- normalizeQuotes
138
- } from "./sdk-impl/utils/utils-paths.js";
132
+ export { extractPackageName } from "./sdk-impl/utils/utils-misc.js";
139
133
  export {
140
134
  createPerfTimer,
141
135
  getElapsedPerfTime,
@@ -424,7 +424,7 @@ export type LibConfig = {
424
424
  * - `true`: Includes all dependencies from the main package.json.
425
425
  * - `false` or `undefined`: Automatically determines dependencies based on imports.
426
426
  *
427
- * @example ["pathe", "fs-extra"] - Only include these specific dependencies.
427
+ * @example ["@reliverse/pathkit", "@reliverse/relifso"] - Only will include these specific dependencies.
428
428
  * @example true - Include all `dependencies` from the main package.json.
429
429
  */
430
430
  libPkgKeepDeps: boolean | string[];
package/bin/load.js CHANGED
@@ -1,5 +1,5 @@
1
+ import fs from "@reliverse/relifso";
1
2
  import { relinka } from "@reliverse/relinka";
2
- import fs from "fs-extra";
3
3
  import { resolve } from "node:path";
4
4
  import { defineConfig } from "./mod.js";
5
5
  const CONFIG_FILENAME = ".config/dler.ts";
package/bin/types.d.ts CHANGED
@@ -424,7 +424,7 @@ export type LibConfig = {
424
424
  * - `true`: Includes all dependencies from the main package.json.
425
425
  * - `false` or `undefined`: Automatically determines dependencies based on imports.
426
426
  *
427
- * @example ["pathe", "fs-extra"] - Only include these specific dependencies.
427
+ * @example ["@reliverse/pathkit", "@reliverse/relifso"] - Only will include these specific dependencies.
428
428
  * @example true - Include all `dependencies` from the main package.json.
429
429
  */
430
430
  libPkgKeepDeps: boolean | string[];
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "dependencies": {
3
+ "@reliverse/pathkit": "^1.1.4",
4
+ "@reliverse/reglob": "^1.0.0",
3
5
  "@reliverse/relico": "^1.1.2",
4
- "@reliverse/relifso": "^1.1.3",
5
- "@reliverse/relinka": "^1.4.5",
6
+ "@reliverse/relifso": "^1.2.10",
7
+ "@reliverse/relinka": "^1.4.6",
6
8
  "@reliverse/rempts": "^1.7.12",
7
9
  "@rollup/plugin-alias": "^5.1.1",
8
10
  "@rollup/plugin-commonjs": "^28.0.3",
@@ -10,13 +12,12 @@
10
12
  "@rollup/plugin-node-resolve": "^16.0.1",
11
13
  "@rollup/plugin-replace": "^6.0.2",
12
14
  "@rollup/pluginutils": "^5.1.4",
13
- "bun": "^1.2.13",
15
+ "bun": "^1.2.14",
14
16
  "chalk": "^5.4.1",
15
17
  "defu": "^6.1.4",
16
18
  "esbuild": "^0.25.4",
17
19
  "execa": "^9.5.3",
18
20
  "fix-dts-default-cjs-exports": "^1.0.1",
19
- "fs-extra": "^11.3.0",
20
21
  "glob": "^11.0.2",
21
22
  "hookable": "^5.5.3",
22
23
  "jiti": "^2.4.2",
@@ -25,24 +26,22 @@
25
26
  "mlly": "^1.7.4",
26
27
  "p-all": "^5.0.0",
27
28
  "p-map": "^7.0.3",
28
- "pathe": "^2.0.3",
29
29
  "pkg-types": "^2.1.0",
30
30
  "pretty-bytes": "^7.0.0",
31
31
  "pretty-ms": "^9.2.0",
32
- "rollup": "^4.40.2",
32
+ "rollup": "^4.41.0",
33
33
  "rollup-plugin-dts": "^6.2.1",
34
34
  "scule": "^1.3.0",
35
- "semver": "^7.7.2",
36
35
  "tinyglobby": "^0.2.13",
37
- "ts-morph": "^25.0.1",
36
+ "ts-morph": "^26.0.0",
38
37
  "untyped": "^2.0.0"
39
38
  },
40
- "description": "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.",
39
+ "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.",
41
40
  "homepage": "https://docs.reliverse.org",
42
41
  "license": "MIT",
43
42
  "name": "@reliverse/dler",
44
43
  "type": "module",
45
- "version": "1.3.5",
44
+ "version": "1.4.0",
46
45
  "keywords": [
47
46
  "reliverse",
48
47
  "cli",
@@ -64,16 +63,15 @@
64
63
  "devDependencies": {
65
64
  "@biomejs/biome": "^1.9.4",
66
65
  "@eslint/js": "^9.27.0",
66
+ "@reliverse/bleump": "^1.0.1",
67
67
  "@stylistic/eslint-plugin": "^4.2.0",
68
68
  "@total-typescript/ts-reset": "^0.6.1",
69
- "@types/bun": "^1.2.13",
70
- "@types/fs-extra": "^11.0.4",
71
- "@types/node": "^22.15.18",
72
- "@types/semver": "^7.7.0",
69
+ "@types/bun": "^1.2.14",
70
+ "@types/node": "^22.15.21",
73
71
  "eslint": "^9.27.0",
74
72
  "eslint-plugin-no-relative-import-paths": "^1.6.1",
75
73
  "eslint-plugin-perfectionist": "^4.13.0",
76
- "knip": "^5.56.0",
74
+ "knip": "^5.57.2",
77
75
  "typescript": "^5.8.3",
78
76
  "typescript-eslint": "^8.32.1"
79
77
  },
@@ -91,4 +89,4 @@
91
89
  "publishConfig": {
92
90
  "access": "public"
93
91
  }
94
- }
92
+ }
@@ -1,55 +0,0 @@
1
- import type { LibConfig } from "../../sdk-types.js";
2
- /** Represents the type classification of an import path. */
3
- type ImportType = "absolute" | "alias" | "bare" | "dynamic" | "module" | "relative";
4
- /** Represents the result of processing a single file. */
5
- export type FileResult = {
6
- filePath: string;
7
- message: string;
8
- success: boolean;
9
- };
10
- /** Options for the `convertImportPaths` function. */
11
- export type ConvertImportPathsOptions = {
12
- baseDir: string;
13
- fromType: ImportType;
14
- toType: ImportType;
15
- libsList: Record<string, LibConfig>;
16
- aliasPrefix?: string;
17
- currentLibName?: string;
18
- distJsrDryRun?: boolean;
19
- fileExtensions?: string[];
20
- generateSourceMap?: boolean;
21
- strip?: string[];
22
- urlMap?: Record<string, string>;
23
- };
24
- /** Options for the `convertImportExtensionsJsToTs` function. */
25
- export type ConvertImportExtensionsOptions = {
26
- dirPath: string;
27
- distJsrDryRun?: boolean;
28
- fileExtensions?: string[];
29
- generateSourceMap?: boolean;
30
- };
31
- /**
32
- * Extracts the package name (or scoped package name) from a potential bare import path.
33
- * Returns null if the path is relative, absolute, or empty.
34
- * @param importPath - The import path string.
35
- * @returns The package name (e.g., "react", "@scope/pkg") or null.
36
- */
37
- export declare function extractPackageName(importPath: string | undefined): null | string;
38
- /**
39
- * Recursively searches for files in a directory and converts import path formats
40
- * (e.g., relative to alias, absolute to module) based on specified types.
41
- *
42
- * @param options - Configuration defining the directory, conversion types, libraries, etc.
43
- * @returns A promise resolving to an array of FileResult objects, one for each processed file.
44
- */
45
- export declare function convertImportPaths(options: ConvertImportPathsOptions): Promise<FileResult[]>;
46
- /**
47
- * Recursively searches for files in a directory and changes import paths
48
- * ending in `.js` to end in `.ts`.
49
- *
50
- * @param options - Configuration defining the directory and processing options.
51
- * @returns A promise resolving to an array of FileResult objects, one for each processed file.
52
- */
53
- export declare function convertImportExtensionsJsToTs(options: ConvertImportExtensionsOptions): Promise<FileResult[]>;
54
- export declare function normalizeQuotes(str: string): string;
55
- export {};