@reliverse/dler 1.7.5 → 1.7.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.
|
@@ -37,14 +37,80 @@ export async function ensureDlerConfig(isDev) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
function getCoreIsCLI(isDev) {
|
|
40
|
-
return isDev ? `coreIsCLI: {
|
|
41
|
-
enabled: true,
|
|
42
|
-
scripts: { dler: "dler.ts" },
|
|
43
|
-
},` : `// coreIsCLI: {
|
|
40
|
+
return isDev ? `coreIsCLI: { enabled: true, scripts: { dler: "cli.ts" } },` : `// coreIsCLI: {
|
|
44
41
|
// enabled: false,
|
|
45
42
|
// scripts: { mycli: "mycli.ts" },
|
|
46
43
|
// },`;
|
|
47
44
|
}
|
|
45
|
+
function getValue(isDev, devValue, prodValue) {
|
|
46
|
+
return isDev ? devValue : prodValue;
|
|
47
|
+
}
|
|
48
|
+
function getBumpFilter(isDev) {
|
|
49
|
+
return isDev ? `[
|
|
50
|
+
"package.json",
|
|
51
|
+
".config/rse.ts",
|
|
52
|
+
"src/libs/sdk/sdk-impl/cfg/info.ts",
|
|
53
|
+
]` : `["package.json", ".config/rse.ts"]`;
|
|
54
|
+
}
|
|
55
|
+
function getPublishArtifacts(isDev) {
|
|
56
|
+
return isDev ? `{
|
|
57
|
+
global: ["package.json", "README.md", "LICENSE", "LICENSES"],
|
|
58
|
+
"dist-jsr": [],
|
|
59
|
+
"dist-npm": [],
|
|
60
|
+
"dist-libs": {
|
|
61
|
+
"@reliverse/dler-sdk": {
|
|
62
|
+
jsr: [],
|
|
63
|
+
npm: [],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
}` : `{
|
|
67
|
+
global: ["package.json", "README.md", "LICENSE"],
|
|
68
|
+
"dist-jsr": [],
|
|
69
|
+
"dist-npm": [],
|
|
70
|
+
"dist-libs": {},
|
|
71
|
+
}`;
|
|
72
|
+
}
|
|
73
|
+
function getFilterDepsPatterns(isDev) {
|
|
74
|
+
return isDev ? `{
|
|
75
|
+
global: [
|
|
76
|
+
"bun",
|
|
77
|
+
"@types",
|
|
78
|
+
"biome",
|
|
79
|
+
"eslint",
|
|
80
|
+
"knip",
|
|
81
|
+
"prettier",
|
|
82
|
+
"typescript",
|
|
83
|
+
"@reliverse/rse",
|
|
84
|
+
"@reliverse/dler",
|
|
85
|
+
"!@reliverse/rse-sdk",
|
|
86
|
+
"!@reliverse/dler-sdk",
|
|
87
|
+
],
|
|
88
|
+
"dist-npm": [],
|
|
89
|
+
"dist-jsr": [],
|
|
90
|
+
"dist-libs": {
|
|
91
|
+
"@reliverse/dler-sdk": {
|
|
92
|
+
jsr: ["!bun"],
|
|
93
|
+
npm: [],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
}` : `{
|
|
97
|
+
global: [
|
|
98
|
+
"@types",
|
|
99
|
+
"biome",
|
|
100
|
+
"eslint",
|
|
101
|
+
"knip",
|
|
102
|
+
"prettier",
|
|
103
|
+
"typescript",
|
|
104
|
+
"@reliverse/rse",
|
|
105
|
+
"@reliverse/dler",
|
|
106
|
+
"!@reliverse/rse-sdk",
|
|
107
|
+
"!@reliverse/dler-sdk",
|
|
108
|
+
],
|
|
109
|
+
"dist-npm": [],
|
|
110
|
+
"dist-jsr": [],
|
|
111
|
+
"dist-libs": {},
|
|
112
|
+
}`;
|
|
113
|
+
}
|
|
48
114
|
function generateConfig(isDev, pkgDescription) {
|
|
49
115
|
const importDefineConfigStatement = isDev ? `import { defineConfig } from "../../../../mod.js";` : `import { defineConfig } from "@reliverse/dler";`;
|
|
50
116
|
const verboseValue = getValue(isDev, true, DEFAULT_CONFIG.commonVerbose);
|
|
@@ -61,7 +127,6 @@ function generateConfig(isDev, pkgDescription) {
|
|
|
61
127
|
);
|
|
62
128
|
const coreDescriptionValue = getValue(
|
|
63
129
|
isDev,
|
|
64
|
-
// TODO: remove `description` from dler's `package.json` when ensured that whole dler's codebase can optionally read dler.ts' `coreDescription`
|
|
65
130
|
"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.",
|
|
66
131
|
pkgDescription || DEFAULT_CONFIG.coreDescription
|
|
67
132
|
);
|
|
@@ -75,20 +140,22 @@ function generateConfig(isDev, pkgDescription) {
|
|
|
75
140
|
libDeclarations: true,
|
|
76
141
|
libDescription: "@reliverse/dler without cli",
|
|
77
142
|
libDirName: "sdk",
|
|
78
|
-
libMainFile: "sdk-mod.ts",
|
|
143
|
+
libMainFile: "sdk/sdk-mod.ts",
|
|
79
144
|
libPkgKeepDeps: true,
|
|
80
145
|
libTranspileMinify: true,
|
|
81
146
|
libPubPause: false,
|
|
147
|
+
libPubRegistry: "npm-jsr",
|
|
82
148
|
},
|
|
83
149
|
}` : `{
|
|
84
150
|
// "@acme/cli-libName": {
|
|
85
151
|
// libDeclarations: true,
|
|
86
152
|
// libDescription: "@acme/cli defineConfig",
|
|
87
153
|
// libDirName: "libName",
|
|
88
|
-
// libMainFile: "libName-mod.ts",
|
|
154
|
+
// libMainFile: "libName/libName-mod.ts",
|
|
89
155
|
// libPkgKeepDeps: true,
|
|
90
156
|
// libTranspileMinify: true,
|
|
91
157
|
// libPubPause: false,
|
|
158
|
+
// libPubRegistry: "npm-jsr",
|
|
92
159
|
// },
|
|
93
160
|
}`;
|
|
94
161
|
const configTemplate = `${importDefineConfigStatement}
|
|
@@ -100,18 +167,18 @@ function generateConfig(isDev, pkgDescription) {
|
|
|
100
167
|
export default defineConfig({
|
|
101
168
|
// Bump configuration
|
|
102
169
|
bumpDisable: ${DEFAULT_CONFIG.bumpDisable},
|
|
103
|
-
bumpFilter: ${
|
|
170
|
+
bumpFilter: ${getBumpFilter(isDev)},
|
|
104
171
|
bumpMode: "${DEFAULT_CONFIG.bumpMode}",
|
|
105
172
|
// Common configuration
|
|
106
173
|
commonPubPause: ${pausePublishValue},
|
|
107
174
|
commonPubRegistry: "${registryValue}",
|
|
108
175
|
commonVerbose: ${verboseValue},
|
|
109
176
|
// Core configuration
|
|
177
|
+
coreBuildOutDir: "${DEFAULT_CONFIG.coreBuildOutDir}",
|
|
110
178
|
coreDeclarations: ${DEFAULT_CONFIG.coreDeclarations},
|
|
111
179
|
coreDescription: ${JSON.stringify(coreDescriptionValue)},
|
|
112
180
|
coreEntryFile: "${DEFAULT_CONFIG.coreEntryFile}",
|
|
113
181
|
coreEntrySrcDir: "${DEFAULT_CONFIG.coreEntrySrcDir}",
|
|
114
|
-
coreBuildOutDir: "${DEFAULT_CONFIG.coreBuildOutDir}",
|
|
115
182
|
${coreIsCLI}
|
|
116
183
|
// JSR-only config
|
|
117
184
|
distJsrAllowDirty: ${DEFAULT_CONFIG.distJsrAllowDirty},
|
|
@@ -137,65 +204,45 @@ export default defineConfig({
|
|
|
137
204
|
// @reliverse/relinka logger setup
|
|
138
205
|
logsFileName: "${DEFAULT_CONFIG.logsFileName}",
|
|
139
206
|
logsFreshFile: ${DEFAULT_CONFIG.logsFreshFile},
|
|
207
|
+
// Specifies what resources to send to npm and jsr registries.
|
|
208
|
+
// coreBuildOutDir (e.g. "bin") dir is automatically included.
|
|
209
|
+
// The following is also included if publishArtifacts is {}:
|
|
210
|
+
// - global: ["package.json", "README.md", "LICENSE"]
|
|
211
|
+
// - dist-jsr,dist-libs/jsr: ["jsr.json"]
|
|
212
|
+
publishArtifacts: ${getPublishArtifacts(isDev)},
|
|
140
213
|
// Dependency filtering
|
|
141
214
|
// Global is always applied
|
|
142
|
-
filterDepsPatterns: {
|
|
143
|
-
global: [
|
|
144
|
-
"@types",
|
|
145
|
-
"biome",
|
|
146
|
-
"eslint",
|
|
147
|
-
"knip",
|
|
148
|
-
"prettier",
|
|
149
|
-
"typescript",
|
|
150
|
-
"@reliverse/rse",
|
|
151
|
-
"@reliverse/dler",
|
|
152
|
-
"!@reliverse/rse-sdk",
|
|
153
|
-
"!@reliverse/dler-sdk",
|
|
154
|
-
],
|
|
155
|
-
"dist-npm": [],
|
|
156
|
-
"dist-jsr": [],
|
|
157
|
-
"dist-libs": {
|
|
158
|
-
"@reliverse/dler-sdk": {
|
|
159
|
-
npm: [],
|
|
160
|
-
jsr: [],
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
},
|
|
215
|
+
filterDepsPatterns: ${getFilterDepsPatterns(isDev)},
|
|
164
216
|
// Build setup
|
|
165
|
-
|
|
217
|
+
// transpileAlias: {},
|
|
218
|
+
// transpileClean: true,
|
|
219
|
+
// transpileEntries: [],
|
|
166
220
|
transpileEsbuild: "${DEFAULT_CONFIG.transpileEsbuild}",
|
|
221
|
+
// transpileExternals: [],
|
|
222
|
+
transpileFailOnWarn: ${DEFAULT_CONFIG.transpileFailOnWarn},
|
|
167
223
|
transpileFormat: "${DEFAULT_CONFIG.transpileFormat}",
|
|
168
224
|
transpileMinify: ${DEFAULT_CONFIG.transpileMinify},
|
|
225
|
+
// transpileParallel: false,
|
|
169
226
|
transpilePublicPath: "${DEFAULT_CONFIG.transpilePublicPath}",
|
|
227
|
+
// transpileReplace: {},
|
|
228
|
+
// transpileRollup: {
|
|
229
|
+
// alias: {},
|
|
230
|
+
// commonjs: {},
|
|
231
|
+
// dts: {},
|
|
232
|
+
// esbuild: {},
|
|
233
|
+
// json: {},
|
|
234
|
+
// replace: {},
|
|
235
|
+
// resolve: {},
|
|
236
|
+
// },
|
|
237
|
+
// transpileShowOutLog: false,
|
|
170
238
|
transpileSourcemap: "${DEFAULT_CONFIG.transpileSourcemap}",
|
|
171
239
|
transpileSplitting: ${DEFAULT_CONFIG.transpileSplitting},
|
|
172
240
|
transpileStub: ${DEFAULT_CONFIG.transpileStub},
|
|
241
|
+
// transpileStubOptions: { jiti: {} },
|
|
173
242
|
transpileTarget: "${DEFAULT_CONFIG.transpileTarget}",
|
|
174
243
|
transpileWatch: ${DEFAULT_CONFIG.transpileWatch},
|
|
175
|
-
|
|
176
|
-
transpileEntries: [],
|
|
177
|
-
transpileExternals: [],
|
|
178
|
-
transpileClean: true,
|
|
179
|
-
transpileParallel: false,
|
|
180
|
-
transpileReplace: {},
|
|
181
|
-
transpileRollup: {
|
|
182
|
-
alias: {},
|
|
183
|
-
commonjs: {},
|
|
184
|
-
dts: {},
|
|
185
|
-
esbuild: {},
|
|
186
|
-
json: {},
|
|
187
|
-
replace: {},
|
|
188
|
-
resolve: {},
|
|
189
|
-
},
|
|
190
|
-
transpileShowOutLog: false,
|
|
191
|
-
transpileStubOptions: {
|
|
192
|
-
jiti: {},
|
|
193
|
-
},
|
|
194
|
-
transpileWatchOptions: undefined,
|
|
244
|
+
// transpileWatchOptions: undefined,
|
|
195
245
|
});
|
|
196
246
|
`;
|
|
197
247
|
return configTemplate;
|
|
198
248
|
}
|
|
199
|
-
function getValue(isDev, devValue, prodValue) {
|
|
200
|
-
return isDev ? devValue : prodValue;
|
|
201
|
-
}
|
package/package.json
CHANGED
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"ts-morph": "^26.0.0",
|
|
35
35
|
"untyped": "^2.0.0"
|
|
36
36
|
},
|
|
37
|
-
"description": "
|
|
37
|
+
"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.",
|
|
38
38
|
"homepage": "https://docs.reliverse.org",
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"name": "@reliverse/dler",
|
|
41
41
|
"type": "module",
|
|
42
|
-
"version": "1.7.
|
|
42
|
+
"version": "1.7.6",
|
|
43
43
|
"keywords": [
|
|
44
44
|
"reliverse",
|
|
45
45
|
"cli",
|