@reliverse/dler 1.6.4 → 1.6.6
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 +1 -0
- package/bin/init/info.js +1 -1
- package/bin/init/init.js +1 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-deps.js +19 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -510,6 +510,7 @@ bun add @reliverse/dler-sdk
|
|
|
510
510
|
- [ ] allow plugins to extend dler's `defineconfig`
|
|
511
511
|
- [ ] support configuration via `.config/rse.{ts,jsonc}`
|
|
512
512
|
- [ ] make config file optional with sensible defaults
|
|
513
|
+
- [ ] use [@reliverse/remdn](https://github.com/reliverse/remdn) to generate npm/jsr readme
|
|
513
514
|
|
|
514
515
|
## related
|
|
515
516
|
|
package/bin/init/info.js
CHANGED
package/bin/init/init.js
CHANGED
|
@@ -34,16 +34,30 @@ export async function filterDeps(deps, clearUnused, outDirBin, isJsr, config, li
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
const shouldExcludeByPattern = (depName) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const depNameLower = depName.toLowerCase();
|
|
38
|
+
for (const pattern of patterns) {
|
|
39
|
+
if (pattern.startsWith("!")) {
|
|
40
|
+
const negPattern = pattern.slice(1).toLowerCase();
|
|
41
|
+
if (depNameLower.includes(negPattern)) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
for (const pattern of patterns) {
|
|
47
|
+
if (!pattern.startsWith("!")) {
|
|
48
|
+
if (depNameLower.includes(pattern.toLowerCase())) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
40
54
|
};
|
|
41
55
|
const originalPkg = await readPackageJSON();
|
|
42
|
-
const shouldExcludeDep = (depName,
|
|
56
|
+
const shouldExcludeDep = (depName, isDevDep) => {
|
|
43
57
|
if (isJsr && config.coreIsCLI.enabled) {
|
|
44
58
|
return shouldExcludeByPattern(depName);
|
|
45
59
|
}
|
|
46
|
-
return
|
|
60
|
+
return isDevDep || shouldExcludeByPattern(depName);
|
|
47
61
|
};
|
|
48
62
|
const devDeps = deps === originalPkg.devDependencies;
|
|
49
63
|
if (!clearUnused) {
|