@xylabs/ts-scripts-yarn3 3.0.15 → 3.0.17
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/dist/actions/package/compile/compile.js +2 -1
- package/dist/actions/package/compile/compile.js.map +1 -1
- package/dist/actions/package/compile/compile.mjs +2 -1
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/tscTypes.js +1 -1
- package/dist/actions/package/compile/tscTypes.js.map +1 -1
- package/dist/actions/package/compile/tscTypes.mjs +1 -1
- package/dist/actions/package/compile/tscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/tsup.js +3 -2
- package/dist/actions/package/compile/tsup.js.map +1 -1
- package/dist/actions/package/compile/tsup.mjs +3 -2
- package/dist/actions/package/compile/tsup.mjs.map +1 -1
- package/package.json +4 -4
- package/src/actions/package/compile/compile.ts +2 -1
- package/src/actions/package/compile/tscTypes.ts +1 -1
- package/src/actions/package/compile/tsup.ts +3 -2
|
@@ -42,6 +42,7 @@ const packageCompile = async (params) => {
|
|
|
42
42
|
const pkg = process.env.INIT_CWD;
|
|
43
43
|
console.log(import_chalk.default.green(`Compiling ${pkg}`));
|
|
44
44
|
const config = await (0, import_lib.loadConfig)(params);
|
|
45
|
+
const publint = config.compile?.publint ?? true;
|
|
45
46
|
const modes = config.compile?.modes ?? ["tsup"];
|
|
46
47
|
let modeIndex = 0;
|
|
47
48
|
while (modeIndex < modes.length) {
|
|
@@ -89,7 +90,7 @@ const packageCompile = async (params) => {
|
|
|
89
90
|
}
|
|
90
91
|
modeIndex++;
|
|
91
92
|
}
|
|
92
|
-
return
|
|
93
|
+
return publint ? await (0, import_publint.packagePublint)(params) : 0;
|
|
93
94
|
};
|
|
94
95
|
// Annotate the CommonJS export names for ESM import in node:
|
|
95
96
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/compile.ts"],"sourcesContent":["import chalk from 'chalk'\n// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { packageCompileRollup } from './rollup'\nimport { packageCompileTsc } from './tsc'\nimport { packageCompileTsup } from './tsup'\n\nexport type PackageCompileMode = 'tsup' | 'tsc' | 'rollup'\n\nexport type PackageCompileParams = CompileParams & {\n compile?: {\n modes?: PackageCompileMode[]\n }\n}\n\nexport const packageCompile = async (params?: PackageCompileParams): Promise<number> => {\n const pkg = process.env.INIT_CWD\n console.log(chalk.green(`Compiling ${pkg}`))\n const config = await loadConfig(params)\n\n const modes = config.compile?.modes ?? ['tsup']\n let modeIndex = 0\n while (modeIndex < modes.length) {\n const mode = modes[modeIndex]\n switch (mode) {\n case 'rollup': {\n const result = packageCompileRollup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n case 'tsc': {\n const result = packageCompileTsc(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n case 'tsup': {\n const result = packageCompileTsup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n }\n modeIndex++\n }\n return
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/compile.ts"],"sourcesContent":["import chalk from 'chalk'\n// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { packageCompileRollup } from './rollup'\nimport { packageCompileTsc } from './tsc'\nimport { packageCompileTsup } from './tsup'\n\nexport type PackageCompileMode = 'tsup' | 'tsc' | 'rollup'\n\nexport type PackageCompileParams = CompileParams & {\n compile?: {\n modes?: PackageCompileMode[]\n }\n}\n\nexport const packageCompile = async (params?: PackageCompileParams): Promise<number> => {\n const pkg = process.env.INIT_CWD\n console.log(chalk.green(`Compiling ${pkg}`))\n const config = await loadConfig(params)\n const publint = config.compile?.publint ?? true\n\n const modes = config.compile?.modes ?? ['tsup']\n let modeIndex = 0\n while (modeIndex < modes.length) {\n const mode = modes[modeIndex]\n switch (mode) {\n case 'rollup': {\n const result = packageCompileRollup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n case 'tsc': {\n const result = packageCompileTsc(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n case 'tsup': {\n const result = packageCompileTsup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n }\n modeIndex++\n }\n return publint ? await packagePublint(params) : 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,mBAAkB;AAElB,iBAA2B;AAC3B,qBAA+B;AAE/B,oBAAqC;AACrC,iBAAkC;AAClC,kBAAmC;AAU5B,MAAM,iBAAiB,OAAO,WAAmD;AACtF,QAAM,MAAM,QAAQ,IAAI;AACxB,UAAQ,IAAI,aAAAA,QAAM,MAAM,aAAa,GAAG,EAAE,CAAC;AAC3C,QAAM,SAAS,UAAM,uBAAW,MAAM;AACtC,QAAM,UAAU,OAAO,SAAS,WAAW;AAE3C,QAAM,QAAQ,OAAO,SAAS,SAAS,CAAC,MAAM;AAC9C,MAAI,YAAY;AAChB,SAAO,YAAY,MAAM,QAAQ;AAC/B,UAAM,OAAO,MAAM,SAAS;AAC5B,YAAQ,MAAM;AAAA,MACZ,KAAK,UAAU;AACb,cAAM,aAAS;AAAA,cACb,aAAAC,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA,YAAI,QAAQ;AACV,iBAAO;AAAA,QACT;AACA;AAAA,MACF;AAAA,MACA,KAAK,OAAO;AACV,cAAM,aAAS;AAAA,cACb,aAAAA,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA,YAAI,QAAQ;AACV,iBAAO;AAAA,QACT;AACA;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,cAAM,aAAS;AAAA,cACb,aAAAA,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA,YAAI,QAAQ;AACV,iBAAO;AAAA,QACT;AACA;AAAA,MACF;AAAA,IACF;AACA;AAAA,EACF;AACA,SAAO,UAAU,UAAM,+BAAe,MAAM,IAAI;AAClD;","names":["chalk","merge"]}
|
|
@@ -9,6 +9,7 @@ const packageCompile = async (params) => {
|
|
|
9
9
|
const pkg = process.env.INIT_CWD;
|
|
10
10
|
console.log(chalk.green(`Compiling ${pkg}`));
|
|
11
11
|
const config = await loadConfig(params);
|
|
12
|
+
const publint = config.compile?.publint ?? true;
|
|
12
13
|
const modes = config.compile?.modes ?? ["tsup"];
|
|
13
14
|
let modeIndex = 0;
|
|
14
15
|
while (modeIndex < modes.length) {
|
|
@@ -56,7 +57,7 @@ const packageCompile = async (params) => {
|
|
|
56
57
|
}
|
|
57
58
|
modeIndex++;
|
|
58
59
|
}
|
|
59
|
-
return
|
|
60
|
+
return publint ? await packagePublint(params) : 0;
|
|
60
61
|
};
|
|
61
62
|
export {
|
|
62
63
|
packageCompile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/compile.ts"],"sourcesContent":["import chalk from 'chalk'\n// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { packageCompileRollup } from './rollup'\nimport { packageCompileTsc } from './tsc'\nimport { packageCompileTsup } from './tsup'\n\nexport type PackageCompileMode = 'tsup' | 'tsc' | 'rollup'\n\nexport type PackageCompileParams = CompileParams & {\n compile?: {\n modes?: PackageCompileMode[]\n }\n}\n\nexport const packageCompile = async (params?: PackageCompileParams): Promise<number> => {\n const pkg = process.env.INIT_CWD\n console.log(chalk.green(`Compiling ${pkg}`))\n const config = await loadConfig(params)\n\n const modes = config.compile?.modes ?? ['tsup']\n let modeIndex = 0\n while (modeIndex < modes.length) {\n const mode = modes[modeIndex]\n switch (mode) {\n case 'rollup': {\n const result = packageCompileRollup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n case 'tsc': {\n const result = packageCompileTsc(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n case 'tsup': {\n const result = packageCompileTsup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n }\n modeIndex++\n }\n return
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/compile.ts"],"sourcesContent":["import chalk from 'chalk'\n// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { packageCompileRollup } from './rollup'\nimport { packageCompileTsc } from './tsc'\nimport { packageCompileTsup } from './tsup'\n\nexport type PackageCompileMode = 'tsup' | 'tsc' | 'rollup'\n\nexport type PackageCompileParams = CompileParams & {\n compile?: {\n modes?: PackageCompileMode[]\n }\n}\n\nexport const packageCompile = async (params?: PackageCompileParams): Promise<number> => {\n const pkg = process.env.INIT_CWD\n console.log(chalk.green(`Compiling ${pkg}`))\n const config = await loadConfig(params)\n const publint = config.compile?.publint ?? true\n\n const modes = config.compile?.modes ?? ['tsup']\n let modeIndex = 0\n while (modeIndex < modes.length) {\n const mode = modes[modeIndex]\n switch (mode) {\n case 'rollup': {\n const result = packageCompileRollup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n case 'tsc': {\n const result = packageCompileTsc(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n case 'tsup': {\n const result = packageCompileTsup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n if (result) {\n return result\n }\n break\n }\n }\n modeIndex++\n }\n return publint ? await packagePublint(params) : 0\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAElB,OAAO,WAAW;AAElB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAE/B,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AAU5B,MAAM,iBAAiB,OAAO,WAAmD;AACtF,QAAM,MAAM,QAAQ,IAAI;AACxB,UAAQ,IAAI,MAAM,MAAM,aAAa,GAAG,EAAE,CAAC;AAC3C,QAAM,SAAS,MAAM,WAAW,MAAM;AACtC,QAAM,UAAU,OAAO,SAAS,WAAW;AAE3C,QAAM,QAAQ,OAAO,SAAS,SAAS,CAAC,MAAM;AAC9C,MAAI,YAAY;AAChB,SAAO,YAAY,MAAM,QAAQ;AAC/B,UAAM,OAAO,MAAM,SAAS;AAC5B,YAAQ,MAAM;AAAA,MACZ,KAAK,UAAU;AACb,cAAM,SAAS;AAAA,UACb,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA,YAAI,QAAQ;AACV,iBAAO;AAAA,QACT;AACA;AAAA,MACF;AAAA,MACA,KAAK,OAAO;AACV,cAAM,SAAS;AAAA,UACb,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA,YAAI,QAAQ;AACV,iBAAO;AAAA,QACT;AACA;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,cAAM,SAAS;AAAA,UACb,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA,YAAI,QAAQ;AACV,iBAAO;AAAA,QACT;AACA;AAAA,MACF;AAAA,IACF;AACA;AAAA,EACF;AACA,SAAO,UAAU,MAAM,eAAe,MAAM,IAAI;AAClD;","names":[]}
|
|
@@ -37,7 +37,7 @@ const packageCompileTscTypes = async (params) => {
|
|
|
37
37
|
skipLibCheck: true,
|
|
38
38
|
sourceMap: true
|
|
39
39
|
},
|
|
40
|
-
exclude: ["dist", "docs"],
|
|
40
|
+
exclude: ["dist", "docs", "*.spec.*", "src/**/spec/**/*"],
|
|
41
41
|
include: ["src"]
|
|
42
42
|
};
|
|
43
43
|
const config = await (0, import_lib.loadConfig)(params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import { cwd } from 'process'\nimport { build, BuildOptions } from 'tsc-prog'\n\nimport { loadConfig } from '../../../lib'\nimport { CompileParams } from './CompileParams'\n\nexport const packageCompileTscTypes = async (params?: CompileParams): Promise<number> => {\n const pkg = process.env.INIT_CWD\n const buildOptions: BuildOptions = {\n basePath: pkg ?? cwd(),\n compilerOptions: {\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n esModuleInterop: true,\n outDir: 'dist',\n skipLibCheck: true,\n sourceMap: true,\n },\n exclude: ['dist', 'docs'],\n include: ['src'],\n }\n\n const config = await loadConfig(params)\n if (config.verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n build(buildOptions)\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AACpB,sBAAoC;AAEpC,iBAA2B;AAGpB,MAAM,yBAAyB,OAAO,WAA4C;AACvF,QAAM,MAAM,QAAQ,IAAI;AACxB,QAAM,eAA6B;AAAA,IACjC,UAAU,WAAO,oBAAI;AAAA,IACrB,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,IACb;AAAA,IACA,SAAS,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import { cwd } from 'process'\nimport { build, BuildOptions } from 'tsc-prog'\n\nimport { loadConfig } from '../../../lib'\nimport { CompileParams } from './CompileParams'\n\nexport const packageCompileTscTypes = async (params?: CompileParams): Promise<number> => {\n const pkg = process.env.INIT_CWD\n const buildOptions: BuildOptions = {\n basePath: pkg ?? cwd(),\n compilerOptions: {\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n esModuleInterop: true,\n outDir: 'dist',\n skipLibCheck: true,\n sourceMap: true,\n },\n exclude: ['dist', 'docs', '*.spec.*', 'src/**/spec/**/*'],\n include: ['src'],\n }\n\n const config = await loadConfig(params)\n if (config.verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n build(buildOptions)\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AACpB,sBAAoC;AAEpC,iBAA2B;AAGpB,MAAM,yBAAyB,OAAO,WAA4C;AACvF,QAAM,MAAM,QAAQ,IAAI;AACxB,QAAM,eAA6B;AAAA,IACjC,UAAU,WAAO,oBAAI;AAAA,IACrB,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,IACb;AAAA,IACA,SAAS,CAAC,QAAQ,QAAQ,YAAY,kBAAkB;AAAA,IACxD,SAAS,CAAC,KAAK;AAAA,EACjB;AAEA,QAAM,SAAS,UAAM,uBAAW,MAAM;AACtC,MAAI,OAAO,SAAS;AAClB,YAAQ,IAAI,6BAA6B,GAAG,GAAG;AAAA,EACjD;AAEA,6BAAM,YAAY;AAClB,SAAO;AACT;","names":[]}
|
|
@@ -14,7 +14,7 @@ const packageCompileTscTypes = async (params) => {
|
|
|
14
14
|
skipLibCheck: true,
|
|
15
15
|
sourceMap: true
|
|
16
16
|
},
|
|
17
|
-
exclude: ["dist", "docs"],
|
|
17
|
+
exclude: ["dist", "docs", "*.spec.*", "src/**/spec/**/*"],
|
|
18
18
|
include: ["src"]
|
|
19
19
|
};
|
|
20
20
|
const config = await loadConfig(params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import { cwd } from 'process'\nimport { build, BuildOptions } from 'tsc-prog'\n\nimport { loadConfig } from '../../../lib'\nimport { CompileParams } from './CompileParams'\n\nexport const packageCompileTscTypes = async (params?: CompileParams): Promise<number> => {\n const pkg = process.env.INIT_CWD\n const buildOptions: BuildOptions = {\n basePath: pkg ?? cwd(),\n compilerOptions: {\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n esModuleInterop: true,\n outDir: 'dist',\n skipLibCheck: true,\n sourceMap: true,\n },\n exclude: ['dist', 'docs'],\n include: ['src'],\n }\n\n const config = await loadConfig(params)\n if (config.verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n build(buildOptions)\n return 0\n}\n"],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,aAA2B;AAEpC,SAAS,kBAAkB;AAGpB,MAAM,yBAAyB,OAAO,WAA4C;AACvF,QAAM,MAAM,QAAQ,IAAI;AACxB,QAAM,eAA6B;AAAA,IACjC,UAAU,OAAO,IAAI;AAAA,IACrB,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,IACb;AAAA,IACA,SAAS,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import { cwd } from 'process'\nimport { build, BuildOptions } from 'tsc-prog'\n\nimport { loadConfig } from '../../../lib'\nimport { CompileParams } from './CompileParams'\n\nexport const packageCompileTscTypes = async (params?: CompileParams): Promise<number> => {\n const pkg = process.env.INIT_CWD\n const buildOptions: BuildOptions = {\n basePath: pkg ?? cwd(),\n compilerOptions: {\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n esModuleInterop: true,\n outDir: 'dist',\n skipLibCheck: true,\n sourceMap: true,\n },\n exclude: ['dist', 'docs', '*.spec.*', 'src/**/spec/**/*'],\n include: ['src'],\n }\n\n const config = await loadConfig(params)\n if (config.verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n build(buildOptions)\n return 0\n}\n"],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,aAA2B;AAEpC,SAAS,kBAAkB;AAGpB,MAAM,yBAAyB,OAAO,WAA4C;AACvF,QAAM,MAAM,QAAQ,IAAI;AACxB,QAAM,eAA6B;AAAA,IACjC,UAAU,OAAO,IAAI;AAAA,IACrB,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,IACb;AAAA,IACA,SAAS,CAAC,QAAQ,QAAQ,YAAY,kBAAkB;AAAA,IACxD,SAAS,CAAC,KAAK;AAAA,EACjB;AAEA,QAAM,SAAS,MAAM,WAAW,MAAM;AACtC,MAAI,OAAO,SAAS;AAClB,YAAQ,IAAI,6BAA6B,GAAG,GAAG;AAAA,EACjD;AAEA,QAAM,YAAY;AAClB,SAAO;AACT;","names":[]}
|
|
@@ -57,6 +57,7 @@ const compileSubDir = async (subDir, options, verbose) => {
|
|
|
57
57
|
};
|
|
58
58
|
const packageCompileTsup = async (params) => {
|
|
59
59
|
const config = await (0, import_lib.loadConfig)(params);
|
|
60
|
+
const publint = config.compile?.publint ?? true;
|
|
60
61
|
if (config.verbose) {
|
|
61
62
|
console.log("Compiling with TSUP");
|
|
62
63
|
}
|
|
@@ -67,10 +68,10 @@ const packageCompileTsup = async (params) => {
|
|
|
67
68
|
return await compileSubDir(inputDir, config.compile?.tsup?.options, config.verbose);
|
|
68
69
|
})
|
|
69
70
|
)).reduce((prev, result2) => prev + result2, 0);
|
|
70
|
-
return result + (
|
|
71
|
+
return result + (publint ? await (0, import_publint.packagePublint)() : 0);
|
|
71
72
|
} else {
|
|
72
73
|
const result = await compileSubDir(void 0, config.compile?.tsup?.options, config.verbose);
|
|
73
|
-
return result + (
|
|
74
|
+
return result + (publint ? await (0, import_publint.packagePublint)() : 0);
|
|
74
75
|
}
|
|
75
76
|
};
|
|
76
77
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/tsup.ts"],"sourcesContent":["import { build, defineConfig, Options } from 'tsup'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { getInputDirs, getInputs } from './inputs'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsupParams = Partial<\n CompileParams & {\n compile?: {\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileSubDir = async (subDir?: string, options?: Options, verbose?: boolean) => {\n const dir = subDir === '.' ? undefined : subDir\n const input = await getInputs(dir)\n const optionsResult = defineConfig({\n bundle: true,\n cjsInterop: true,\n clean: true,\n dts: {\n entry: ['src/index.ts'],\n only: false,\n resolve: false,\n },\n entry: subDir ? input.map((file) => `./src/${file}`) : ['./src/index.ts'],\n format: ['cjs', 'esm'],\n outDir: 'dist',\n sourcemap: true,\n splitting: false,\n tsconfig: 'tsconfig.json',\n ...options,\n })\n const optionsList = (\n await Promise.all(\n (Array.isArray(optionsResult) ? optionsResult : [optionsResult])\n .map<Promise<Options[]>>(async (options) => {\n const result = typeof options === 'function' ? await options({}) : [options]\n return Array.isArray(result) ? result : [result]\n })\n .flat(),\n )\n ).flat()\n await Promise.all(optionsList.map((options) => build(options)))\n\n return await packageCompileTscTypes({ verbose })\n}\n\nexport const packageCompileTsup = async (params?: PackageCompileTsupParams) => {\n const config = await loadConfig(params)\n if (config.verbose) {\n console.log('Compiling with TSUP')\n }\n const inputDirs = await getInputDirs(config.compile?.depth)\n\n if (inputDirs.length) {\n const result = (\n await Promise.all(\n inputDirs.map(async (inputDir) => {\n return await compileSubDir(inputDir, config.compile?.tsup?.options, config.verbose)\n }),\n )\n ).reduce((prev, result) => prev + result, 0)\n return result + (
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/tsup.ts"],"sourcesContent":["import { build, defineConfig, Options } from 'tsup'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { getInputDirs, getInputs } from './inputs'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsupParams = Partial<\n CompileParams & {\n compile?: {\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileSubDir = async (subDir?: string, options?: Options, verbose?: boolean) => {\n const dir = subDir === '.' ? undefined : subDir\n const input = await getInputs(dir)\n const optionsResult = defineConfig({\n bundle: true,\n cjsInterop: true,\n clean: true,\n dts: {\n entry: ['src/index.ts'],\n only: false,\n resolve: false,\n },\n entry: subDir ? input.map((file) => `./src/${file}`) : ['./src/index.ts'],\n format: ['cjs', 'esm'],\n outDir: 'dist',\n sourcemap: true,\n splitting: false,\n tsconfig: 'tsconfig.json',\n ...options,\n })\n const optionsList = (\n await Promise.all(\n (Array.isArray(optionsResult) ? optionsResult : [optionsResult])\n .map<Promise<Options[]>>(async (options) => {\n const result = typeof options === 'function' ? await options({}) : [options]\n return Array.isArray(result) ? result : [result]\n })\n .flat(),\n )\n ).flat()\n await Promise.all(optionsList.map((options) => build(options)))\n\n return await packageCompileTscTypes({ verbose })\n}\n\nexport const packageCompileTsup = async (params?: PackageCompileTsupParams) => {\n const config = await loadConfig(params)\n const publint = config.compile?.publint ?? true\n if (config.verbose) {\n console.log('Compiling with TSUP')\n }\n const inputDirs = await getInputDirs(config.compile?.depth)\n\n if (inputDirs.length) {\n const result = (\n await Promise.all(\n inputDirs.map(async (inputDir) => {\n return await compileSubDir(inputDir, config.compile?.tsup?.options, config.verbose)\n }),\n )\n ).reduce((prev, result) => prev + result, 0)\n return result + (publint ? await packagePublint() : 0)\n } else {\n const result = await compileSubDir(undefined, config.compile?.tsup?.options, config.verbose)\n return result + (publint ? await packagePublint() : 0)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6C;AAE7C,iBAA2B;AAC3B,qBAA+B;AAE/B,oBAAwC;AACxC,sBAAuC;AAYvC,MAAM,gBAAgB,OAAO,QAAiB,SAAmB,YAAsB;AACrF,QAAM,MAAM,WAAW,MAAM,SAAY;AACzC,QAAM,QAAQ,UAAM,yBAAU,GAAG;AACjC,QAAM,oBAAgB,0BAAa;AAAA,IACjC,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,KAAK;AAAA,MACH,OAAO,CAAC,cAAc;AAAA,MACtB,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,OAAO,SAAS,MAAM,IAAI,CAAC,SAAS,SAAS,IAAI,EAAE,IAAI,CAAC,gBAAgB;AAAA,IACxE,QAAQ,CAAC,OAAO,KAAK;AAAA,IACrB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,WAAW;AAAA,IACX,UAAU;AAAA,IACV,GAAG;AAAA,EACL,CAAC;AACD,QAAM,eACJ,MAAM,QAAQ;AAAA,KACX,MAAM,QAAQ,aAAa,IAAI,gBAAgB,CAAC,aAAa,GAC3D,IAAwB,OAAOA,aAAY;AAC1C,YAAM,SAAS,OAAOA,aAAY,aAAa,MAAMA,SAAQ,CAAC,CAAC,IAAI,CAACA,QAAO;AAC3E,aAAO,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC,MAAM;AAAA,IACjD,CAAC,EACA,KAAK;AAAA,EACV,GACA,KAAK;AACP,QAAM,QAAQ,IAAI,YAAY,IAAI,CAACA,iBAAY,mBAAMA,QAAO,CAAC,CAAC;AAE9D,SAAO,UAAM,wCAAuB,EAAE,QAAQ,CAAC;AACjD;AAEO,MAAM,qBAAqB,OAAO,WAAsC;AAC7E,QAAM,SAAS,UAAM,uBAAW,MAAM;AACtC,QAAM,UAAU,OAAO,SAAS,WAAW;AAC3C,MAAI,OAAO,SAAS;AAClB,YAAQ,IAAI,qBAAqB;AAAA,EACnC;AACA,QAAM,YAAY,UAAM,4BAAa,OAAO,SAAS,KAAK;AAE1D,MAAI,UAAU,QAAQ;AACpB,UAAM,UACJ,MAAM,QAAQ;AAAA,MACZ,UAAU,IAAI,OAAO,aAAa;AAChC,eAAO,MAAM,cAAc,UAAU,OAAO,SAAS,MAAM,SAAS,OAAO,OAAO;AAAA,MACpF,CAAC;AAAA,IACH,GACA,OAAO,CAAC,MAAMC,YAAW,OAAOA,SAAQ,CAAC;AAC3C,WAAO,UAAU,UAAU,UAAM,+BAAe,IAAI;AAAA,EACtD,OAAO;AACL,UAAM,SAAS,MAAM,cAAc,QAAW,OAAO,SAAS,MAAM,SAAS,OAAO,OAAO;AAC3F,WAAO,UAAU,UAAU,UAAM,+BAAe,IAAI;AAAA,EACtD;AACF;","names":["options","result"]}
|
|
@@ -34,6 +34,7 @@ const compileSubDir = async (subDir, options, verbose) => {
|
|
|
34
34
|
};
|
|
35
35
|
const packageCompileTsup = async (params) => {
|
|
36
36
|
const config = await loadConfig(params);
|
|
37
|
+
const publint = config.compile?.publint ?? true;
|
|
37
38
|
if (config.verbose) {
|
|
38
39
|
console.log("Compiling with TSUP");
|
|
39
40
|
}
|
|
@@ -44,10 +45,10 @@ const packageCompileTsup = async (params) => {
|
|
|
44
45
|
return await compileSubDir(inputDir, config.compile?.tsup?.options, config.verbose);
|
|
45
46
|
})
|
|
46
47
|
)).reduce((prev, result2) => prev + result2, 0);
|
|
47
|
-
return result + (
|
|
48
|
+
return result + (publint ? await packagePublint() : 0);
|
|
48
49
|
} else {
|
|
49
50
|
const result = await compileSubDir(void 0, config.compile?.tsup?.options, config.verbose);
|
|
50
|
-
return result + (
|
|
51
|
+
return result + (publint ? await packagePublint() : 0);
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
54
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/tsup.ts"],"sourcesContent":["import { build, defineConfig, Options } from 'tsup'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { getInputDirs, getInputs } from './inputs'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsupParams = Partial<\n CompileParams & {\n compile?: {\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileSubDir = async (subDir?: string, options?: Options, verbose?: boolean) => {\n const dir = subDir === '.' ? undefined : subDir\n const input = await getInputs(dir)\n const optionsResult = defineConfig({\n bundle: true,\n cjsInterop: true,\n clean: true,\n dts: {\n entry: ['src/index.ts'],\n only: false,\n resolve: false,\n },\n entry: subDir ? input.map((file) => `./src/${file}`) : ['./src/index.ts'],\n format: ['cjs', 'esm'],\n outDir: 'dist',\n sourcemap: true,\n splitting: false,\n tsconfig: 'tsconfig.json',\n ...options,\n })\n const optionsList = (\n await Promise.all(\n (Array.isArray(optionsResult) ? optionsResult : [optionsResult])\n .map<Promise<Options[]>>(async (options) => {\n const result = typeof options === 'function' ? await options({}) : [options]\n return Array.isArray(result) ? result : [result]\n })\n .flat(),\n )\n ).flat()\n await Promise.all(optionsList.map((options) => build(options)))\n\n return await packageCompileTscTypes({ verbose })\n}\n\nexport const packageCompileTsup = async (params?: PackageCompileTsupParams) => {\n const config = await loadConfig(params)\n if (config.verbose) {\n console.log('Compiling with TSUP')\n }\n const inputDirs = await getInputDirs(config.compile?.depth)\n\n if (inputDirs.length) {\n const result = (\n await Promise.all(\n inputDirs.map(async (inputDir) => {\n return await compileSubDir(inputDir, config.compile?.tsup?.options, config.verbose)\n }),\n )\n ).reduce((prev, result) => prev + result, 0)\n return result + (
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/tsup.ts"],"sourcesContent":["import { build, defineConfig, Options } from 'tsup'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { getInputDirs, getInputs } from './inputs'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsupParams = Partial<\n CompileParams & {\n compile?: {\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileSubDir = async (subDir?: string, options?: Options, verbose?: boolean) => {\n const dir = subDir === '.' ? undefined : subDir\n const input = await getInputs(dir)\n const optionsResult = defineConfig({\n bundle: true,\n cjsInterop: true,\n clean: true,\n dts: {\n entry: ['src/index.ts'],\n only: false,\n resolve: false,\n },\n entry: subDir ? input.map((file) => `./src/${file}`) : ['./src/index.ts'],\n format: ['cjs', 'esm'],\n outDir: 'dist',\n sourcemap: true,\n splitting: false,\n tsconfig: 'tsconfig.json',\n ...options,\n })\n const optionsList = (\n await Promise.all(\n (Array.isArray(optionsResult) ? optionsResult : [optionsResult])\n .map<Promise<Options[]>>(async (options) => {\n const result = typeof options === 'function' ? await options({}) : [options]\n return Array.isArray(result) ? result : [result]\n })\n .flat(),\n )\n ).flat()\n await Promise.all(optionsList.map((options) => build(options)))\n\n return await packageCompileTscTypes({ verbose })\n}\n\nexport const packageCompileTsup = async (params?: PackageCompileTsupParams) => {\n const config = await loadConfig(params)\n const publint = config.compile?.publint ?? true\n if (config.verbose) {\n console.log('Compiling with TSUP')\n }\n const inputDirs = await getInputDirs(config.compile?.depth)\n\n if (inputDirs.length) {\n const result = (\n await Promise.all(\n inputDirs.map(async (inputDir) => {\n return await compileSubDir(inputDir, config.compile?.tsup?.options, config.verbose)\n }),\n )\n ).reduce((prev, result) => prev + result, 0)\n return result + (publint ? await packagePublint() : 0)\n } else {\n const result = await compileSubDir(undefined, config.compile?.tsup?.options, config.verbose)\n return result + (publint ? await packagePublint() : 0)\n }\n}\n"],"mappings":"AAAA,SAAS,OAAO,oBAA6B;AAE7C,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAE/B,SAAS,cAAc,iBAAiB;AACxC,SAAS,8BAA8B;AAYvC,MAAM,gBAAgB,OAAO,QAAiB,SAAmB,YAAsB;AACrF,QAAM,MAAM,WAAW,MAAM,SAAY;AACzC,QAAM,QAAQ,MAAM,UAAU,GAAG;AACjC,QAAM,gBAAgB,aAAa;AAAA,IACjC,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,KAAK;AAAA,MACH,OAAO,CAAC,cAAc;AAAA,MACtB,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,OAAO,SAAS,MAAM,IAAI,CAAC,SAAS,SAAS,IAAI,EAAE,IAAI,CAAC,gBAAgB;AAAA,IACxE,QAAQ,CAAC,OAAO,KAAK;AAAA,IACrB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,WAAW;AAAA,IACX,UAAU;AAAA,IACV,GAAG;AAAA,EACL,CAAC;AACD,QAAM,eACJ,MAAM,QAAQ;AAAA,KACX,MAAM,QAAQ,aAAa,IAAI,gBAAgB,CAAC,aAAa,GAC3D,IAAwB,OAAOA,aAAY;AAC1C,YAAM,SAAS,OAAOA,aAAY,aAAa,MAAMA,SAAQ,CAAC,CAAC,IAAI,CAACA,QAAO;AAC3E,aAAO,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC,MAAM;AAAA,IACjD,CAAC,EACA,KAAK;AAAA,EACV,GACA,KAAK;AACP,QAAM,QAAQ,IAAI,YAAY,IAAI,CAACA,aAAY,MAAMA,QAAO,CAAC,CAAC;AAE9D,SAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC;AACjD;AAEO,MAAM,qBAAqB,OAAO,WAAsC;AAC7E,QAAM,SAAS,MAAM,WAAW,MAAM;AACtC,QAAM,UAAU,OAAO,SAAS,WAAW;AAC3C,MAAI,OAAO,SAAS;AAClB,YAAQ,IAAI,qBAAqB;AAAA,EACnC;AACA,QAAM,YAAY,MAAM,aAAa,OAAO,SAAS,KAAK;AAE1D,MAAI,UAAU,QAAQ;AACpB,UAAM,UACJ,MAAM,QAAQ;AAAA,MACZ,UAAU,IAAI,OAAO,aAAa;AAChC,eAAO,MAAM,cAAc,UAAU,OAAO,SAAS,MAAM,SAAS,OAAO,OAAO;AAAA,MACpF,CAAC;AAAA,IACH,GACA,OAAO,CAAC,MAAMC,YAAW,OAAOA,SAAQ,CAAC;AAC3C,WAAO,UAAU,UAAU,MAAM,eAAe,IAAI;AAAA,EACtD,OAAO;AACL,UAAM,SAAS,MAAM,cAAc,QAAW,OAAO,SAAS,MAAM,SAAS,OAAO,OAAO;AAC3F,WAAO,UAAU,UAAU,MAAM,eAAe,IAAI;AAAA,EACtD;AACF;","names":["options","result"]}
|
package/package.json
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@types/yargs": "^17.0.24",
|
|
67
67
|
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
68
68
|
"@typescript-eslint/parser": "^6.7.0",
|
|
69
|
-
"@xylabs/tsconfig": "~3.0.
|
|
69
|
+
"@xylabs/tsconfig": "~3.0.17",
|
|
70
70
|
"chalk": "^4.1.2",
|
|
71
71
|
"cosmiconfig": "^8.3.6",
|
|
72
72
|
"cpy": "^8.1.2",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
"@types/license-checker": "^25.0.4",
|
|
111
111
|
"@types/lodash": "^4.14.198",
|
|
112
112
|
"@types/parse-git-config": "^3.0.1",
|
|
113
|
-
"@xylabs/eslint-config": "^3.0.
|
|
114
|
-
"@xylabs/tsconfig": "^3.0.
|
|
113
|
+
"@xylabs/eslint-config": "^3.0.17",
|
|
114
|
+
"@xylabs/tsconfig": "^3.0.17",
|
|
115
115
|
"publint": "^0.2.2",
|
|
116
116
|
"typescript": "^5.2.2"
|
|
117
117
|
},
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"package-clean": "echo Not cleaning..."
|
|
169
169
|
},
|
|
170
170
|
"sideEffects": false,
|
|
171
|
-
"version": "3.0.
|
|
171
|
+
"version": "3.0.17"
|
|
172
172
|
}
|
|
@@ -21,6 +21,7 @@ export const packageCompile = async (params?: PackageCompileParams): Promise<num
|
|
|
21
21
|
const pkg = process.env.INIT_CWD
|
|
22
22
|
console.log(chalk.green(`Compiling ${pkg}`))
|
|
23
23
|
const config = await loadConfig(params)
|
|
24
|
+
const publint = config.compile?.publint ?? true
|
|
24
25
|
|
|
25
26
|
const modes = config.compile?.modes ?? ['tsup']
|
|
26
27
|
let modeIndex = 0
|
|
@@ -69,5 +70,5 @@ export const packageCompile = async (params?: PackageCompileParams): Promise<num
|
|
|
69
70
|
}
|
|
70
71
|
modeIndex++
|
|
71
72
|
}
|
|
72
|
-
return
|
|
73
|
+
return publint ? await packagePublint(params) : 0
|
|
73
74
|
}
|
|
@@ -53,6 +53,7 @@ const compileSubDir = async (subDir?: string, options?: Options, verbose?: boole
|
|
|
53
53
|
|
|
54
54
|
export const packageCompileTsup = async (params?: PackageCompileTsupParams) => {
|
|
55
55
|
const config = await loadConfig(params)
|
|
56
|
+
const publint = config.compile?.publint ?? true
|
|
56
57
|
if (config.verbose) {
|
|
57
58
|
console.log('Compiling with TSUP')
|
|
58
59
|
}
|
|
@@ -66,9 +67,9 @@ export const packageCompileTsup = async (params?: PackageCompileTsupParams) => {
|
|
|
66
67
|
}),
|
|
67
68
|
)
|
|
68
69
|
).reduce((prev, result) => prev + result, 0)
|
|
69
|
-
return result + (
|
|
70
|
+
return result + (publint ? await packagePublint() : 0)
|
|
70
71
|
} else {
|
|
71
72
|
const result = await compileSubDir(undefined, config.compile?.tsup?.options, config.verbose)
|
|
72
|
-
return result + (
|
|
73
|
+
return result + (publint ? await packagePublint() : 0)
|
|
73
74
|
}
|
|
74
75
|
}
|