@xylabs/ts-scripts-yarn3 3.0.37 → 3.0.39

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.
@@ -38,11 +38,13 @@ var import_publint = require("../publint");
38
38
  var import_rollup = require("./rollup");
39
39
  var import_tsc = require("./tsc");
40
40
  var import_tsup2 = require("./tsup2");
41
- const packageCompile = async (params) => {
41
+ const packageCompile = async (params = { compile: {
42
+ publint: false
43
+ } }) => {
42
44
  const pkg = process.env.INIT_CWD;
43
45
  console.log(import_chalk.default.green(`Compiling ${pkg}`));
44
46
  const config = await (0, import_lib.loadConfig)(params);
45
- const publint = config.compile?.publint ?? true;
47
+ const publint = false;
46
48
  const modes = config.compile?.modes ?? ["tsup"];
47
49
  let modeIndex = 0;
48
50
  let result = 0;
@@ -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 { packageCompileTsup2 } from './tsup2'\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 let result: number = 0\n while (modeIndex < modes.length) {\n const mode = modes[modeIndex]\n switch (mode) {\n case 'rollup': {\n result += await packageCompileRollup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n case 'tsc': {\n result += await packageCompileTsc(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n case 'tsup': {\n result += await packageCompileTsup2(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n }\n modeIndex++\n }\n return result + (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,mBAAoC;AAU7B,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,MAAI,SAAiB;AACrB,SAAO,YAAY,MAAM,QAAQ;AAC/B,UAAM,OAAO,MAAM,SAAS;AAC5B,YAAQ,MAAM;AAAA,MACZ,KAAK,UAAU;AACb,kBAAU,UAAM;AAAA,cACd,aAAAC,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,MACA,KAAK,OAAO;AACV,kBAAU,UAAM;AAAA,cACd,aAAAA,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,kBAAU,UAAM;AAAA,cACd,aAAAA,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,IACF;AACA;AAAA,EACF;AACA,SAAO,UAAU,UAAU,UAAM,+BAAe,MAAM,IAAI;AAC5D;","names":["chalk","merge"]}
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 { packageCompileTsup2 } from './tsup2'\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 = {compile: {\n publint: false\n}}): 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 = false //config.compile?.publint ?? false\n\n const modes = config.compile?.modes ?? ['tsup']\n let modeIndex = 0\n let result: number = 0\n while (modeIndex < modes.length) {\n const mode = modes[modeIndex]\n switch (mode) {\n case 'rollup': {\n result += await packageCompileRollup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n case 'tsc': {\n result += await packageCompileTsc(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n case 'tsup': {\n result += await packageCompileTsup2(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n }\n modeIndex++\n }\n return result + (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,mBAAoC;AAU7B,MAAM,iBAAiB,OAAO,SAA+B,EAAC,SAAS;AAAA,EAC5E,SAAS;AACX,EAAC,MAAuB;AACtB,QAAM,MAAM,QAAQ,IAAI;AACxB,UAAQ,IAAI,aAAAA,QAAM,MAAM,aAAa,GAAG,EAAE,CAAC;AAC3C,QAAM,SAAS,UAAM,uBAAW,MAAM;AACtC,QAAM,UAAU;AAEhB,QAAM,QAAQ,OAAO,SAAS,SAAS,CAAC,MAAM;AAC9C,MAAI,YAAY;AAChB,MAAI,SAAiB;AACrB,SAAO,YAAY,MAAM,QAAQ;AAC/B,UAAM,OAAO,MAAM,SAAS;AAC5B,YAAQ,MAAM;AAAA,MACZ,KAAK,UAAU;AACb,kBAAU,UAAM;AAAA,cACd,aAAAC,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,MACA,KAAK,OAAO;AACV,kBAAU,UAAM;AAAA,cACd,aAAAA,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,kBAAU,UAAM;AAAA,cACd,aAAAA,SAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,IACF;AACA;AAAA,EACF;AACA,SAAO,UAAU,UAAU,UAAM,+BAAe,MAAM,IAAI;AAC5D;","names":["chalk","merge"]}
@@ -5,11 +5,13 @@ import { packagePublint } from "../publint";
5
5
  import { packageCompileRollup } from "./rollup";
6
6
  import { packageCompileTsc } from "./tsc";
7
7
  import { packageCompileTsup2 } from "./tsup2";
8
- const packageCompile = async (params) => {
8
+ const packageCompile = async (params = { compile: {
9
+ publint: false
10
+ } }) => {
9
11
  const pkg = process.env.INIT_CWD;
10
12
  console.log(chalk.green(`Compiling ${pkg}`));
11
13
  const config = await loadConfig(params);
12
- const publint = config.compile?.publint ?? true;
14
+ const publint = false;
13
15
  const modes = config.compile?.modes ?? ["tsup"];
14
16
  let modeIndex = 0;
15
17
  let result = 0;
@@ -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 { packageCompileTsup2 } from './tsup2'\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 let result: number = 0\n while (modeIndex < modes.length) {\n const mode = modes[modeIndex]\n switch (mode) {\n case 'rollup': {\n result += await packageCompileRollup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n case 'tsc': {\n result += await packageCompileTsc(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n case 'tsup': {\n result += await packageCompileTsup2(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n }\n modeIndex++\n }\n return result + (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,2BAA2B;AAU7B,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,MAAI,SAAiB;AACrB,SAAO,YAAY,MAAM,QAAQ;AAC/B,UAAM,OAAO,MAAM,SAAS;AAC5B,YAAQ,MAAM;AAAA,MACZ,KAAK,UAAU;AACb,kBAAU,MAAM;AAAA,UACd,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,MACA,KAAK,OAAO;AACV,kBAAU,MAAM;AAAA,UACd,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,kBAAU,MAAM;AAAA,UACd,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,IACF;AACA;AAAA,EACF;AACA,SAAO,UAAU,UAAU,MAAM,eAAe,MAAM,IAAI;AAC5D;","names":[]}
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 { packageCompileTsup2 } from './tsup2'\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 = {compile: {\n publint: false\n}}): 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 = false //config.compile?.publint ?? false\n\n const modes = config.compile?.modes ?? ['tsup']\n let modeIndex = 0\n let result: number = 0\n while (modeIndex < modes.length) {\n const mode = modes[modeIndex]\n switch (mode) {\n case 'rollup': {\n result += await packageCompileRollup(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n case 'tsc': {\n result += await packageCompileTsc(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n case 'tsup': {\n result += await packageCompileTsup2(\n merge({}, params, {\n compile: {\n publint: false,\n },\n }),\n )\n break\n }\n }\n modeIndex++\n }\n return result + (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,2BAA2B;AAU7B,MAAM,iBAAiB,OAAO,SAA+B,EAAC,SAAS;AAAA,EAC5E,SAAS;AACX,EAAC,MAAuB;AACtB,QAAM,MAAM,QAAQ,IAAI;AACxB,UAAQ,IAAI,MAAM,MAAM,aAAa,GAAG,EAAE,CAAC;AAC3C,QAAM,SAAS,MAAM,WAAW,MAAM;AACtC,QAAM,UAAU;AAEhB,QAAM,QAAQ,OAAO,SAAS,SAAS,CAAC,MAAM;AAC9C,MAAI,YAAY;AAChB,MAAI,SAAiB;AACrB,SAAO,YAAY,MAAM,QAAQ;AAC/B,UAAM,OAAO,MAAM,SAAS;AAC5B,YAAQ,MAAM;AAAA,MACZ,KAAK,UAAU;AACb,kBAAU,MAAM;AAAA,UACd,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,MACA,KAAK,OAAO;AACV,kBAAU,MAAM;AAAA,UACd,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,MACA,KAAK,QAAQ;AACX,kBAAU,MAAM;AAAA,UACd,MAAM,CAAC,GAAG,QAAQ;AAAA,YAChB,SAAS;AAAA,cACP,SAAS;AAAA,YACX;AAAA,UACF,CAAC;AAAA,QACH;AACA;AAAA,MACF;AAAA,IACF;AACA;AAAA,EACF;AACA,SAAO,UAAU,UAAU,MAAM,eAAe,MAAM,IAAI;AAC5D;","names":[]}
@@ -22,20 +22,22 @@ __export(copyTypeFiles_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(copyTypeFiles_exports);
24
24
  var import_promises = require("fs/promises");
25
- const getDistTypeFiles = async () => {
26
- return (await (0, import_promises.readdir)("dist", { recursive: true })).filter((file) => file.endsWith("d.ts")).map((file) => `dist/${file}`);
25
+ const getDistTypeFiles = async (compilerOptions) => {
26
+ const outDir = compilerOptions.outDir ?? "dist";
27
+ return (await (0, import_promises.readdir)(outDir, { recursive: true })).filter((file) => file.endsWith("d.ts")).map((file) => `${outDir}/${file}`);
27
28
  };
28
- const getDistTypeMapFiles = async () => {
29
- return (await (0, import_promises.readdir)("dist", { recursive: true })).filter((file) => file.endsWith("d.ts.map")).map((file) => `dist/${file}`);
29
+ const getDistTypeMapFiles = async (compilerOptions) => {
30
+ const outDir = compilerOptions.outDir ?? "dist";
31
+ return (await (0, import_promises.readdir)(outDir, { recursive: true })).filter((file) => file.endsWith("d.ts.map")).map((file) => `${outDir}/${file}`);
30
32
  };
31
- const copyTypeFiles = async () => {
32
- const distTypeFiles = await getDistTypeFiles();
33
+ const copyTypeFiles = async (compilerOptions) => {
34
+ const distTypeFiles = await getDistTypeFiles(compilerOptions);
33
35
  await Promise.all(
34
36
  distTypeFiles.map(async (file) => {
35
37
  await (0, import_promises.copyFile)(file, file.replace("d.ts", "d.mts"));
36
38
  })
37
39
  );
38
- const distTypeMapFiles = await getDistTypeMapFiles();
40
+ const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions);
39
41
  await Promise.all(
40
42
  distTypeMapFiles.map(async (file) => {
41
43
  await (0, import_promises.copyFile)(file, file.replace("d.ts.map", "d.mts.map"));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/copyTypeFiles.ts"],"sourcesContent":["import { copyFile, readdir } from 'fs/promises'\n\nconst getDistTypeFiles = async () => {\n return (await readdir('dist', { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `dist/${file}`)\n}\n\nconst getDistTypeMapFiles = async () => {\n return (await readdir('dist', { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `dist/${file}`)\n}\n\nexport const copyTypeFiles = async () => {\n //hybrid packages want two copies of the types\n const distTypeFiles = await getDistTypeFiles()\n await Promise.all(\n distTypeFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts', 'd.mts'))\n }),\n )\n\n const distTypeMapFiles = await getDistTypeMapFiles()\n await Promise.all(\n distTypeMapFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))\n }),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkC;AAElC,MAAM,mBAAmB,YAAY;AACnC,UAAQ,UAAM,yBAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,QAAQ,IAAI,EAAE;AAC1H;AAEA,MAAM,sBAAsB,YAAY;AACtC,UAAQ,UAAM,yBAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,QAAQ,IAAI,EAAE;AAC9H;AAEO,MAAM,gBAAgB,YAAY;AAEvC,QAAM,gBAAgB,MAAM,iBAAiB;AAC7C,QAAM,QAAQ;AAAA,IACZ,cAAc,IAAI,OAAO,SAAS;AAChC,gBAAM,0BAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,IACpD,CAAC;AAAA,EACH;AAEA,QAAM,mBAAmB,MAAM,oBAAoB;AACnD,QAAM,QAAQ;AAAA,IACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,gBAAM,0BAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,IAC5D,CAAC;AAAA,EACH;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/copyTypeFiles.ts"],"sourcesContent":["import { copyFile, readdir } from 'fs/promises'\nimport { TsConfigCompilerOptions } from 'tsc-prog'\n\nconst getDistTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `${outDir}/${file}`)\n}\n\nconst getDistTypeMapFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `${outDir}/${file}`)\n}\n\nexport const copyTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n //hybrid packages want two copies of the types\n const distTypeFiles = await getDistTypeFiles(compilerOptions)\n await Promise.all(\n distTypeFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts', 'd.mts'))\n }),\n )\n\n const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)\n await Promise.all(\n distTypeMapFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))\n }),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAkC;AAGlC,MAAM,mBAAmB,OAAO,oBAA6C;AAC3E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,UAAM,yBAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AAC/H;AAEA,MAAM,sBAAsB,OAAO,oBAA6C;AAC9E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,UAAM,yBAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AACnI;AAEO,MAAM,gBAAgB,OAAO,oBAA6C;AAE/E,QAAM,gBAAgB,MAAM,iBAAiB,eAAe;AAC5D,QAAM,QAAQ;AAAA,IACZ,cAAc,IAAI,OAAO,SAAS;AAChC,gBAAM,0BAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,IACpD,CAAC;AAAA,EACH;AAEA,QAAM,mBAAmB,MAAM,oBAAoB,eAAe;AAClE,QAAM,QAAQ;AAAA,IACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,gBAAM,0BAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,IAC5D,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -1,18 +1,20 @@
1
1
  import { copyFile, readdir } from "fs/promises";
2
- const getDistTypeFiles = async () => {
3
- return (await readdir("dist", { recursive: true })).filter((file) => file.endsWith("d.ts")).map((file) => `dist/${file}`);
2
+ const getDistTypeFiles = async (compilerOptions) => {
3
+ const outDir = compilerOptions.outDir ?? "dist";
4
+ return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith("d.ts")).map((file) => `${outDir}/${file}`);
4
5
  };
5
- const getDistTypeMapFiles = async () => {
6
- return (await readdir("dist", { recursive: true })).filter((file) => file.endsWith("d.ts.map")).map((file) => `dist/${file}`);
6
+ const getDistTypeMapFiles = async (compilerOptions) => {
7
+ const outDir = compilerOptions.outDir ?? "dist";
8
+ return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith("d.ts.map")).map((file) => `${outDir}/${file}`);
7
9
  };
8
- const copyTypeFiles = async () => {
9
- const distTypeFiles = await getDistTypeFiles();
10
+ const copyTypeFiles = async (compilerOptions) => {
11
+ const distTypeFiles = await getDistTypeFiles(compilerOptions);
10
12
  await Promise.all(
11
13
  distTypeFiles.map(async (file) => {
12
14
  await copyFile(file, file.replace("d.ts", "d.mts"));
13
15
  })
14
16
  );
15
- const distTypeMapFiles = await getDistTypeMapFiles();
17
+ const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions);
16
18
  await Promise.all(
17
19
  distTypeMapFiles.map(async (file) => {
18
20
  await copyFile(file, file.replace("d.ts.map", "d.mts.map"));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/copyTypeFiles.ts"],"sourcesContent":["import { copyFile, readdir } from 'fs/promises'\n\nconst getDistTypeFiles = async () => {\n return (await readdir('dist', { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `dist/${file}`)\n}\n\nconst getDistTypeMapFiles = async () => {\n return (await readdir('dist', { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `dist/${file}`)\n}\n\nexport const copyTypeFiles = async () => {\n //hybrid packages want two copies of the types\n const distTypeFiles = await getDistTypeFiles()\n await Promise.all(\n distTypeFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts', 'd.mts'))\n }),\n )\n\n const distTypeMapFiles = await getDistTypeMapFiles()\n await Promise.all(\n distTypeMapFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))\n }),\n )\n}\n"],"mappings":"AAAA,SAAS,UAAU,eAAe;AAElC,MAAM,mBAAmB,YAAY;AACnC,UAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,QAAQ,IAAI,EAAE;AAC1H;AAEA,MAAM,sBAAsB,YAAY;AACtC,UAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,QAAQ,IAAI,EAAE;AAC9H;AAEO,MAAM,gBAAgB,YAAY;AAEvC,QAAM,gBAAgB,MAAM,iBAAiB;AAC7C,QAAM,QAAQ;AAAA,IACZ,cAAc,IAAI,OAAO,SAAS;AAChC,YAAM,SAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,IACpD,CAAC;AAAA,EACH;AAEA,QAAM,mBAAmB,MAAM,oBAAoB;AACnD,QAAM,QAAQ;AAAA,IACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,YAAM,SAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,IAC5D,CAAC;AAAA,EACH;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/copyTypeFiles.ts"],"sourcesContent":["import { copyFile, readdir } from 'fs/promises'\nimport { TsConfigCompilerOptions } from 'tsc-prog'\n\nconst getDistTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `${outDir}/${file}`)\n}\n\nconst getDistTypeMapFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n const outDir = compilerOptions.outDir ?? 'dist'\n return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `${outDir}/${file}`)\n}\n\nexport const copyTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {\n //hybrid packages want two copies of the types\n const distTypeFiles = await getDistTypeFiles(compilerOptions)\n await Promise.all(\n distTypeFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts', 'd.mts'))\n }),\n )\n\n const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)\n await Promise.all(\n distTypeMapFiles.map(async (file) => {\n await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))\n }),\n )\n}\n"],"mappings":"AAAA,SAAS,UAAU,eAAe;AAGlC,MAAM,mBAAmB,OAAO,oBAA6C;AAC3E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AAC/H;AAEA,MAAM,sBAAsB,OAAO,oBAA6C;AAC9E,QAAM,SAAS,gBAAgB,UAAU;AACzC,UAAQ,MAAM,QAAQ,QAAQ,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,EAAE;AACnI;AAEO,MAAM,gBAAgB,OAAO,oBAA6C;AAE/E,QAAM,gBAAgB,MAAM,iBAAiB,eAAe;AAC5D,QAAM,QAAQ;AAAA,IACZ,cAAc,IAAI,OAAO,SAAS;AAChC,YAAM,SAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,IACpD,CAAC;AAAA,EACH;AAEA,QAAM,mBAAmB,MAAM,oBAAoB,eAAe;AAClE,QAAM,QAAQ;AAAA,IACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,YAAM,SAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,IAC5D,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -26,29 +26,32 @@ var import_tsc_prog = require("tsc-prog");
26
26
  var import_typescript = require("typescript");
27
27
  var import_copyTypeFiles = require("./copyTypeFiles");
28
28
  var import_getCompilerOptions = require("./getCompilerOptions");
29
- const packageCompileTscTypes = async (params, compilerOptions, generateMts = true) => {
29
+ const packageCompileTscTypes = async (params, compilerOptionsParam, generateMts = true) => {
30
30
  const pkg = process.env.INIT_CWD;
31
31
  if (params?.verbose) {
32
32
  console.log(`Compiling types with TSC [${pkg}]`);
33
33
  }
34
- const result = (0, import_tsc_prog.createProgramFromConfig)({
35
- basePath: pkg ?? (0, import_process.cwd)(),
36
- compilerOptions: (0, import_getCompilerOptions.getCompilerOptions)({
34
+ const compilerOptions = {
35
+ ...(0, import_getCompilerOptions.getCompilerOptions)({
37
36
  declaration: true,
38
37
  declarationMap: true,
39
38
  emitDeclarationOnly: true,
40
39
  esModuleInterop: true,
41
40
  outDir: "dist",
42
41
  skipLibCheck: true,
43
- sourceMap: true,
44
- ...compilerOptions ?? {}
42
+ sourceMap: true
45
43
  }),
44
+ ...compilerOptionsParam ?? {}
45
+ };
46
+ const result = (0, import_tsc_prog.createProgramFromConfig)({
47
+ basePath: pkg ?? (0, import_process.cwd)(),
48
+ compilerOptions,
46
49
  exclude: ["dist", "docs", "**/*.spec.*", "src/**/spec/**/*"],
47
50
  include: ["src"]
48
51
  }).emit();
49
52
  const diagResults = result.diagnostics.map((value) => value.category === import_typescript.DiagnosticCategory.Error).length;
50
53
  if (generateMts) {
51
- await (0, import_copyTypeFiles.copyTypeFiles)();
54
+ await (0, import_copyTypeFiles.copyTypeFiles)(compilerOptions);
52
55
  }
53
56
  return diagResults;
54
57
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport { CompilerOptions, DiagnosticCategory } from 'typescript'\n\nimport { CompileParams } from './CompileParams'\nimport { copyTypeFiles } from './copyTypeFiles'\nimport { getCompilerOptions } from './getCompilerOptions'\n\nexport const packageCompileTscTypes = async (params?: CompileParams, compilerOptions?: CompilerOptions, generateMts = true): Promise<number> => {\n const pkg = process.env.INIT_CWD\n\n if (params?.verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n const result = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions: getCompilerOptions({\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n esModuleInterop: true,\n outDir: 'dist',\n skipLibCheck: true,\n sourceMap: true,\n ...(compilerOptions ?? {}),\n }) as TsConfigCompilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', 'src/**/spec/**/*'],\n include: ['src'],\n }).emit()\n\n const diagResults = result.diagnostics.map((value) => value.category === DiagnosticCategory.Error).length\n if (generateMts) {\n await copyTypeFiles()\n }\n return diagResults\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AACpB,sBAAiE;AACjE,wBAAoD;AAGpD,2BAA8B;AAC9B,gCAAmC;AAE5B,MAAM,yBAAyB,OAAO,QAAwB,iBAAmC,cAAc,SAA0B;AAC9I,QAAM,MAAM,QAAQ,IAAI;AAExB,MAAI,QAAQ,SAAS;AACnB,YAAQ,IAAI,6BAA6B,GAAG,GAAG;AAAA,EACjD;AAEA,QAAM,aAAS,yCAAwB;AAAA,IACrC,UAAU,WAAO,oBAAI;AAAA,IACrB,qBAAiB,8CAAmB;AAAA,MAClC,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,MACX,GAAI,mBAAmB,CAAC;AAAA,IAC1B,CAAC;AAAA,IACD,SAAS,CAAC,QAAQ,QAAQ,eAAe,kBAAkB;AAAA,IAC3D,SAAS,CAAC,KAAK;AAAA,EACjB,CAAC,EAAE,KAAK;AAER,QAAM,cAAc,OAAO,YAAY,IAAI,CAAC,UAAU,MAAM,aAAa,qCAAmB,KAAK,EAAE;AACnG,MAAI,aAAa;AACf,cAAM,oCAAc;AAAA,EACtB;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport { CompilerOptions, DiagnosticCategory } from 'typescript'\n\nimport { CompileParams } from './CompileParams'\nimport { copyTypeFiles } from './copyTypeFiles'\nimport { getCompilerOptions } from './getCompilerOptions'\n\nexport const packageCompileTscTypes = async (params?: CompileParams, compilerOptionsParam?: CompilerOptions, generateMts = true): Promise<number> => {\n const pkg = process.env.INIT_CWD\n\n if (params?.verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n const compilerOptions = {...getCompilerOptions({\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n esModuleInterop: true,\n outDir: 'dist',\n skipLibCheck: true,\n sourceMap: true,\n }),\n ...(compilerOptionsParam ?? {}),} as TsConfigCompilerOptions\n\n const result = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', 'src/**/spec/**/*'],\n include: ['src'],\n }).emit()\n\n const diagResults = result.diagnostics.map((value) => value.category === DiagnosticCategory.Error).length\n if (generateMts) {\n await copyTypeFiles(compilerOptions)\n }\n return diagResults\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AACpB,sBAAiE;AACjE,wBAAoD;AAGpD,2BAA8B;AAC9B,gCAAmC;AAE5B,MAAM,yBAAyB,OAAO,QAAwB,sBAAwC,cAAc,SAA0B;AACnJ,QAAM,MAAM,QAAQ,IAAI;AAExB,MAAI,QAAQ,SAAS;AACnB,YAAQ,IAAI,6BAA6B,GAAG,GAAG;AAAA,EACjD;AAEA,QAAM,kBAAkB;AAAA,IAAC,OAAG,8CAAmB;AAAA,MAC7C,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,IACb,CAAC;AAAA,IACD,GAAI,wBAAwB,CAAC;AAAA,EAAG;AAEhC,QAAM,aAAS,yCAAwB;AAAA,IACrC,UAAU,WAAO,oBAAI;AAAA,IACrB;AAAA,IACA,SAAS,CAAC,QAAQ,QAAQ,eAAe,kBAAkB;AAAA,IAC3D,SAAS,CAAC,KAAK;AAAA,EACjB,CAAC,EAAE,KAAK;AAER,QAAM,cAAc,OAAO,YAAY,IAAI,CAAC,UAAU,MAAM,aAAa,qCAAmB,KAAK,EAAE;AACnG,MAAI,aAAa;AACf,cAAM,oCAAc,eAAe;AAAA,EACrC;AACA,SAAO;AACT;","names":[]}
@@ -3,29 +3,32 @@ import { createProgramFromConfig } from "tsc-prog";
3
3
  import { DiagnosticCategory } from "typescript";
4
4
  import { copyTypeFiles } from "./copyTypeFiles";
5
5
  import { getCompilerOptions } from "./getCompilerOptions";
6
- const packageCompileTscTypes = async (params, compilerOptions, generateMts = true) => {
6
+ const packageCompileTscTypes = async (params, compilerOptionsParam, generateMts = true) => {
7
7
  const pkg = process.env.INIT_CWD;
8
8
  if (params?.verbose) {
9
9
  console.log(`Compiling types with TSC [${pkg}]`);
10
10
  }
11
- const result = createProgramFromConfig({
12
- basePath: pkg ?? cwd(),
13
- compilerOptions: getCompilerOptions({
11
+ const compilerOptions = {
12
+ ...getCompilerOptions({
14
13
  declaration: true,
15
14
  declarationMap: true,
16
15
  emitDeclarationOnly: true,
17
16
  esModuleInterop: true,
18
17
  outDir: "dist",
19
18
  skipLibCheck: true,
20
- sourceMap: true,
21
- ...compilerOptions ?? {}
19
+ sourceMap: true
22
20
  }),
21
+ ...compilerOptionsParam ?? {}
22
+ };
23
+ const result = createProgramFromConfig({
24
+ basePath: pkg ?? cwd(),
25
+ compilerOptions,
23
26
  exclude: ["dist", "docs", "**/*.spec.*", "src/**/spec/**/*"],
24
27
  include: ["src"]
25
28
  }).emit();
26
29
  const diagResults = result.diagnostics.map((value) => value.category === DiagnosticCategory.Error).length;
27
30
  if (generateMts) {
28
- await copyTypeFiles();
31
+ await copyTypeFiles(compilerOptions);
29
32
  }
30
33
  return diagResults;
31
34
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport { CompilerOptions, DiagnosticCategory } from 'typescript'\n\nimport { CompileParams } from './CompileParams'\nimport { copyTypeFiles } from './copyTypeFiles'\nimport { getCompilerOptions } from './getCompilerOptions'\n\nexport const packageCompileTscTypes = async (params?: CompileParams, compilerOptions?: CompilerOptions, generateMts = true): Promise<number> => {\n const pkg = process.env.INIT_CWD\n\n if (params?.verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n const result = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions: getCompilerOptions({\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n esModuleInterop: true,\n outDir: 'dist',\n skipLibCheck: true,\n sourceMap: true,\n ...(compilerOptions ?? {}),\n }) as TsConfigCompilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', 'src/**/spec/**/*'],\n include: ['src'],\n }).emit()\n\n const diagResults = result.diagnostics.map((value) => value.category === DiagnosticCategory.Error).length\n if (generateMts) {\n await copyTypeFiles()\n }\n return diagResults\n}\n"],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,+BAAwD;AACjE,SAA0B,0BAA0B;AAGpD,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AAE5B,MAAM,yBAAyB,OAAO,QAAwB,iBAAmC,cAAc,SAA0B;AAC9I,QAAM,MAAM,QAAQ,IAAI;AAExB,MAAI,QAAQ,SAAS;AACnB,YAAQ,IAAI,6BAA6B,GAAG,GAAG;AAAA,EACjD;AAEA,QAAM,SAAS,wBAAwB;AAAA,IACrC,UAAU,OAAO,IAAI;AAAA,IACrB,iBAAiB,mBAAmB;AAAA,MAClC,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,MACX,GAAI,mBAAmB,CAAC;AAAA,IAC1B,CAAC;AAAA,IACD,SAAS,CAAC,QAAQ,QAAQ,eAAe,kBAAkB;AAAA,IAC3D,SAAS,CAAC,KAAK;AAAA,EACjB,CAAC,EAAE,KAAK;AAER,QAAM,cAAc,OAAO,YAAY,IAAI,CAAC,UAAU,MAAM,aAAa,mBAAmB,KAAK,EAAE;AACnG,MAAI,aAAa;AACf,UAAM,cAAc;AAAA,EACtB;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport { CompilerOptions, DiagnosticCategory } from 'typescript'\n\nimport { CompileParams } from './CompileParams'\nimport { copyTypeFiles } from './copyTypeFiles'\nimport { getCompilerOptions } from './getCompilerOptions'\n\nexport const packageCompileTscTypes = async (params?: CompileParams, compilerOptionsParam?: CompilerOptions, generateMts = true): Promise<number> => {\n const pkg = process.env.INIT_CWD\n\n if (params?.verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n const compilerOptions = {...getCompilerOptions({\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n esModuleInterop: true,\n outDir: 'dist',\n skipLibCheck: true,\n sourceMap: true,\n }),\n ...(compilerOptionsParam ?? {}),} as TsConfigCompilerOptions\n\n const result = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', 'src/**/spec/**/*'],\n include: ['src'],\n }).emit()\n\n const diagResults = result.diagnostics.map((value) => value.category === DiagnosticCategory.Error).length\n if (generateMts) {\n await copyTypeFiles(compilerOptions)\n }\n return diagResults\n}\n"],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,+BAAwD;AACjE,SAA0B,0BAA0B;AAGpD,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AAE5B,MAAM,yBAAyB,OAAO,QAAwB,sBAAwC,cAAc,SAA0B;AACnJ,QAAM,MAAM,QAAQ,IAAI;AAExB,MAAI,QAAQ,SAAS;AACnB,YAAQ,IAAI,6BAA6B,GAAG,GAAG;AAAA,EACjD;AAEA,QAAM,kBAAkB;AAAA,IAAC,GAAG,mBAAmB;AAAA,MAC7C,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,WAAW;AAAA,IACb,CAAC;AAAA,IACD,GAAI,wBAAwB,CAAC;AAAA,EAAG;AAEhC,QAAM,SAAS,wBAAwB;AAAA,IACrC,UAAU,OAAO,IAAI;AAAA,IACrB;AAAA,IACA,SAAS,CAAC,QAAQ,QAAQ,eAAe,kBAAkB;AAAA,IAC3D,SAAS,CAAC,KAAK;AAAA,EACjB,CAAC,EAAE,KAAK;AAER,QAAM,cAAc,OAAO,YAAY,IAAI,CAAC,UAAU,MAAM,aAAa,mBAAmB,KAAK,EAAE;AACnG,MAAI,aAAa;AACf,UAAM,cAAc,eAAe;AAAA,EACrC;AACA,SAAO;AACT;","names":[]}
@@ -23,7 +23,6 @@ __export(tsup2_exports, {
23
23
  module.exports = __toCommonJS(tsup2_exports);
24
24
  var import_tsup = require("tsup");
25
25
  var import_lib = require("../../../lib");
26
- var import_publint = require("../publint");
27
26
  var import_tscNoEmit = require("./tscNoEmit");
28
27
  var import_tscTypes = require("./tscTypes");
29
28
  const compileFolder = async (options, _verbose) => {
@@ -56,7 +55,7 @@ const packageCompileTsup2 = async (params) => {
56
55
  if (verbose) {
57
56
  console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`);
58
57
  }
59
- return (0, import_tscNoEmit.packageCompileTscNoEmit)({ verbose }) || await compileFolder({ ...compile?.tsup?.options ?? {}, outDir: "dist/node", platform: "node" }, verbose) || await compileFolder({ ...compile?.tsup?.options ?? {}, outExtension: () => ({ js: ".js" }), outDir: "dist/browser", platform: "browser" }, verbose) || await (0, import_tscTypes.packageCompileTscTypes)({ verbose }, { outDir: "dist/browser" }) || await (0, import_tscTypes.packageCompileTscTypes)({ verbose }, { outDir: "dist/node" }, false) || (publint ? await (0, import_publint.packagePublint)() : 0);
58
+ return (0, import_tscNoEmit.packageCompileTscNoEmit)({ verbose }) || await compileFolder({ ...compile?.tsup?.options ?? {}, outDir: "dist/node", platform: "node" }, verbose) || await compileFolder({ ...compile?.tsup?.options ?? {}, outExtension: () => ({ js: ".js" }), outDir: "dist/browser", platform: "browser" }, verbose) || await (0, import_tscTypes.packageCompileTscTypes)({ verbose }, { outDir: "dist/browser" }) || await (0, import_tscTypes.packageCompileTscTypes)({ verbose }, { outDir: "dist/node" });
60
59
  };
61
60
  // Annotate the CommonJS export names for ESM import in node:
62
61
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/tsup2.ts"],"sourcesContent":["import { build, defineConfig, Options } from 'tsup'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { packageCompileTscNoEmit } from './tscNoEmit'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsup2Params = Partial<\n CompileParams & {\n compile?: {\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileFolder = async (options?: Options, _verbose?: boolean) => {\n const optionsResult = defineConfig({\n bundle: false,\n cjsInterop: true,\n clean: true,\n dts: false,\n entry: ['src'],\n format: ['cjs', 'esm'],\n outDir: 'dist',\n silent: true,\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 0\n}\n\nexport const packageCompileTsup2 = async (params?: PackageCompileTsup2Params) => {\n const { verbose, compile } = await loadConfig(params)\n const publint = compile?.publint ?? true\n if (verbose) {\n console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`)\n }\n\n return (\n packageCompileTscNoEmit({ verbose }) ||\n (await compileFolder({ ...(compile?.tsup?.options ?? {}), outDir: 'dist/node', platform: 'node' }, verbose)) ||\n (await compileFolder({ ...(compile?.tsup?.options ?? {}), outExtension: () => ({js: '.js'}), outDir: 'dist/browser', platform: 'browser' }, verbose)) ||\n (await packageCompileTscTypes({ verbose}, { outDir: 'dist/browser' })) ||\n (await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' }, false)) ||\n (publint ? await packagePublint() : 0)\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6C;AAE7C,iBAA2B;AAC3B,qBAA+B;AAE/B,uBAAwC;AACxC,sBAAuC;AAYvC,MAAM,gBAAgB,OAAO,SAAmB,aAAuB;AACrE,QAAM,oBAAgB,0BAAa;AAAA,IACjC,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO,CAAC,KAAK;AAAA,IACb,QAAQ,CAAC,OAAO,KAAK;AAAA,IACrB,QAAQ;AAAA,IACR,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;AACT;AAEO,MAAM,sBAAsB,OAAO,WAAuC;AAC/E,QAAM,EAAE,SAAS,QAAQ,IAAI,UAAM,uBAAW,MAAM;AACpD,QAAM,UAAU,SAAS,WAAW;AACpC,MAAI,SAAS;AACX,YAAQ,IAAI,+BAA+B,SAAS,KAAK,GAAG;AAAA,EAC9D;AAEA,aACE,0CAAwB,EAAE,QAAQ,CAAC,KAClC,MAAM,cAAc,EAAE,GAAI,SAAS,MAAM,WAAW,CAAC,GAAI,QAAQ,aAAa,UAAU,OAAO,GAAG,OAAO,KACzG,MAAM,cAAc,EAAE,GAAI,SAAS,MAAM,WAAW,CAAC,GAAI,cAAc,OAAO,EAAC,IAAI,MAAK,IAAI,QAAQ,gBAAgB,UAAU,UAAU,GAAG,OAAO,KAClJ,UAAM,wCAAuB,EAAE,QAAO,GAAG,EAAE,QAAQ,eAAe,CAAC,KACnE,UAAM,wCAAuB,EAAE,QAAQ,GAAG,EAAE,QAAQ,YAAY,GAAG,KAAK,MACxE,UAAU,UAAM,+BAAe,IAAI;AAExC;","names":["options"]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/tsup2.ts"],"sourcesContent":["import { build, defineConfig, Options } from 'tsup'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { packageCompileTscNoEmit } from './tscNoEmit'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsup2Params = Partial<\n CompileParams & {\n compile?: {\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileFolder = async (options?: Options, _verbose?: boolean) => {\n const optionsResult = defineConfig({\n bundle: false,\n cjsInterop: true,\n clean: true,\n dts: false,\n entry: ['src'],\n format: ['cjs', 'esm'],\n outDir: 'dist',\n silent: true,\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 0\n}\n\nexport const packageCompileTsup2 = async (params?: PackageCompileTsup2Params) => {\n const { verbose, compile } = await loadConfig(params)\n const publint = compile?.publint ?? true\n if (verbose) {\n console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`)\n }\n\n return (\n packageCompileTscNoEmit({ verbose }) ||\n (await compileFolder({ ...(compile?.tsup?.options ?? {}), outDir: 'dist/node', platform: 'node' }, verbose)) ||\n (await compileFolder({ ...(compile?.tsup?.options ?? {}), outExtension: () => ({js: '.js'}), outDir: 'dist/browser', platform: 'browser' }, verbose)) ||\n (await packageCompileTscTypes({ verbose}, { outDir: 'dist/browser' })) ||\n (await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' }))\n // || (publint ? await packagePublint() : 0)\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6C;AAE7C,iBAA2B;AAG3B,uBAAwC;AACxC,sBAAuC;AAYvC,MAAM,gBAAgB,OAAO,SAAmB,aAAuB;AACrE,QAAM,oBAAgB,0BAAa;AAAA,IACjC,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO,CAAC,KAAK;AAAA,IACb,QAAQ,CAAC,OAAO,KAAK;AAAA,IACrB,QAAQ;AAAA,IACR,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;AACT;AAEO,MAAM,sBAAsB,OAAO,WAAuC;AAC/E,QAAM,EAAE,SAAS,QAAQ,IAAI,UAAM,uBAAW,MAAM;AACpD,QAAM,UAAU,SAAS,WAAW;AACpC,MAAI,SAAS;AACX,YAAQ,IAAI,+BAA+B,SAAS,KAAK,GAAG;AAAA,EAC9D;AAEA,aACE,0CAAwB,EAAE,QAAQ,CAAC,KAClC,MAAM,cAAc,EAAE,GAAI,SAAS,MAAM,WAAW,CAAC,GAAI,QAAQ,aAAa,UAAU,OAAO,GAAG,OAAO,KACzG,MAAM,cAAc,EAAE,GAAI,SAAS,MAAM,WAAW,CAAC,GAAI,cAAc,OAAO,EAAC,IAAI,MAAK,IAAI,QAAQ,gBAAgB,UAAU,UAAU,GAAG,OAAO,KAClJ,UAAM,wCAAuB,EAAE,QAAO,GAAG,EAAE,QAAQ,eAAe,CAAC,KACnE,UAAM,wCAAuB,EAAE,QAAQ,GAAG,EAAE,QAAQ,YAAY,CAAC;AAGtE;","names":["options"]}
@@ -1,6 +1,5 @@
1
1
  import { build, defineConfig } from "tsup";
2
2
  import { loadConfig } from "../../../lib";
3
- import { packagePublint } from "../publint";
4
3
  import { packageCompileTscNoEmit } from "./tscNoEmit";
5
4
  import { packageCompileTscTypes } from "./tscTypes";
6
5
  const compileFolder = async (options, _verbose) => {
@@ -33,7 +32,7 @@ const packageCompileTsup2 = async (params) => {
33
32
  if (verbose) {
34
33
  console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`);
35
34
  }
36
- return packageCompileTscNoEmit({ verbose }) || await compileFolder({ ...compile?.tsup?.options ?? {}, outDir: "dist/node", platform: "node" }, verbose) || await compileFolder({ ...compile?.tsup?.options ?? {}, outExtension: () => ({ js: ".js" }), outDir: "dist/browser", platform: "browser" }, verbose) || await packageCompileTscTypes({ verbose }, { outDir: "dist/browser" }) || await packageCompileTscTypes({ verbose }, { outDir: "dist/node" }, false) || (publint ? await packagePublint() : 0);
35
+ return packageCompileTscNoEmit({ verbose }) || await compileFolder({ ...compile?.tsup?.options ?? {}, outDir: "dist/node", platform: "node" }, verbose) || await compileFolder({ ...compile?.tsup?.options ?? {}, outExtension: () => ({ js: ".js" }), outDir: "dist/browser", platform: "browser" }, verbose) || await packageCompileTscTypes({ verbose }, { outDir: "dist/browser" }) || await packageCompileTscTypes({ verbose }, { outDir: "dist/node" });
37
36
  };
38
37
  export {
39
38
  packageCompileTsup2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/actions/package/compile/tsup2.ts"],"sourcesContent":["import { build, defineConfig, Options } from 'tsup'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { packageCompileTscNoEmit } from './tscNoEmit'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsup2Params = Partial<\n CompileParams & {\n compile?: {\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileFolder = async (options?: Options, _verbose?: boolean) => {\n const optionsResult = defineConfig({\n bundle: false,\n cjsInterop: true,\n clean: true,\n dts: false,\n entry: ['src'],\n format: ['cjs', 'esm'],\n outDir: 'dist',\n silent: true,\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 0\n}\n\nexport const packageCompileTsup2 = async (params?: PackageCompileTsup2Params) => {\n const { verbose, compile } = await loadConfig(params)\n const publint = compile?.publint ?? true\n if (verbose) {\n console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`)\n }\n\n return (\n packageCompileTscNoEmit({ verbose }) ||\n (await compileFolder({ ...(compile?.tsup?.options ?? {}), outDir: 'dist/node', platform: 'node' }, verbose)) ||\n (await compileFolder({ ...(compile?.tsup?.options ?? {}), outExtension: () => ({js: '.js'}), outDir: 'dist/browser', platform: 'browser' }, verbose)) ||\n (await packageCompileTscTypes({ verbose}, { outDir: 'dist/browser' })) ||\n (await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' }, false)) ||\n (publint ? await packagePublint() : 0)\n )\n}\n"],"mappings":"AAAA,SAAS,OAAO,oBAA6B;AAE7C,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAE/B,SAAS,+BAA+B;AACxC,SAAS,8BAA8B;AAYvC,MAAM,gBAAgB,OAAO,SAAmB,aAAuB;AACrE,QAAM,gBAAgB,aAAa;AAAA,IACjC,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO,CAAC,KAAK;AAAA,IACb,QAAQ,CAAC,OAAO,KAAK;AAAA,IACrB,QAAQ;AAAA,IACR,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;AACT;AAEO,MAAM,sBAAsB,OAAO,WAAuC;AAC/E,QAAM,EAAE,SAAS,QAAQ,IAAI,MAAM,WAAW,MAAM;AACpD,QAAM,UAAU,SAAS,WAAW;AACpC,MAAI,SAAS;AACX,YAAQ,IAAI,+BAA+B,SAAS,KAAK,GAAG;AAAA,EAC9D;AAEA,SACE,wBAAwB,EAAE,QAAQ,CAAC,KAClC,MAAM,cAAc,EAAE,GAAI,SAAS,MAAM,WAAW,CAAC,GAAI,QAAQ,aAAa,UAAU,OAAO,GAAG,OAAO,KACzG,MAAM,cAAc,EAAE,GAAI,SAAS,MAAM,WAAW,CAAC,GAAI,cAAc,OAAO,EAAC,IAAI,MAAK,IAAI,QAAQ,gBAAgB,UAAU,UAAU,GAAG,OAAO,KAClJ,MAAM,uBAAuB,EAAE,QAAO,GAAG,EAAE,QAAQ,eAAe,CAAC,KACnE,MAAM,uBAAuB,EAAE,QAAQ,GAAG,EAAE,QAAQ,YAAY,GAAG,KAAK,MACxE,UAAU,MAAM,eAAe,IAAI;AAExC;","names":["options"]}
1
+ {"version":3,"sources":["../../../../src/actions/package/compile/tsup2.ts"],"sourcesContent":["import { build, defineConfig, Options } from 'tsup'\n\nimport { loadConfig } from '../../../lib'\nimport { packagePublint } from '../publint'\nimport { CompileParams } from './CompileParams'\nimport { packageCompileTscNoEmit } from './tscNoEmit'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsup2Params = Partial<\n CompileParams & {\n compile?: {\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileFolder = async (options?: Options, _verbose?: boolean) => {\n const optionsResult = defineConfig({\n bundle: false,\n cjsInterop: true,\n clean: true,\n dts: false,\n entry: ['src'],\n format: ['cjs', 'esm'],\n outDir: 'dist',\n silent: true,\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 0\n}\n\nexport const packageCompileTsup2 = async (params?: PackageCompileTsup2Params) => {\n const { verbose, compile } = await loadConfig(params)\n const publint = compile?.publint ?? true\n if (verbose) {\n console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`)\n }\n\n return (\n packageCompileTscNoEmit({ verbose }) ||\n (await compileFolder({ ...(compile?.tsup?.options ?? {}), outDir: 'dist/node', platform: 'node' }, verbose)) ||\n (await compileFolder({ ...(compile?.tsup?.options ?? {}), outExtension: () => ({js: '.js'}), outDir: 'dist/browser', platform: 'browser' }, verbose)) ||\n (await packageCompileTscTypes({ verbose}, { outDir: 'dist/browser' })) ||\n (await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' }))\n // || (publint ? await packagePublint() : 0)\n )\n}\n"],"mappings":"AAAA,SAAS,OAAO,oBAA6B;AAE7C,SAAS,kBAAkB;AAG3B,SAAS,+BAA+B;AACxC,SAAS,8BAA8B;AAYvC,MAAM,gBAAgB,OAAO,SAAmB,aAAuB;AACrE,QAAM,gBAAgB,aAAa;AAAA,IACjC,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO,CAAC,KAAK;AAAA,IACb,QAAQ,CAAC,OAAO,KAAK;AAAA,IACrB,QAAQ;AAAA,IACR,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;AACT;AAEO,MAAM,sBAAsB,OAAO,WAAuC;AAC/E,QAAM,EAAE,SAAS,QAAQ,IAAI,MAAM,WAAW,MAAM;AACpD,QAAM,UAAU,SAAS,WAAW;AACpC,MAAI,SAAS;AACX,YAAQ,IAAI,+BAA+B,SAAS,KAAK,GAAG;AAAA,EAC9D;AAEA,SACE,wBAAwB,EAAE,QAAQ,CAAC,KAClC,MAAM,cAAc,EAAE,GAAI,SAAS,MAAM,WAAW,CAAC,GAAI,QAAQ,aAAa,UAAU,OAAO,GAAG,OAAO,KACzG,MAAM,cAAc,EAAE,GAAI,SAAS,MAAM,WAAW,CAAC,GAAI,cAAc,OAAO,EAAC,IAAI,MAAK,IAAI,QAAQ,gBAAgB,UAAU,UAAU,GAAG,OAAO,KAClJ,MAAM,uBAAuB,EAAE,QAAO,GAAG,EAAE,QAAQ,eAAe,CAAC,KACnE,MAAM,uBAAuB,EAAE,QAAQ,GAAG,EAAE,QAAQ,YAAY,CAAC;AAGtE;","names":["options"]}
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.37",
69
+ "@xylabs/tsconfig": "~3.0.39",
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.37",
114
- "@xylabs/tsconfig": "^3.0.37",
113
+ "@xylabs/eslint-config": "^3.0.39",
114
+ "@xylabs/tsconfig": "^3.0.39",
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.37"
171
+ "version": "3.0.39"
172
172
  }
@@ -17,11 +17,13 @@ export type PackageCompileParams = CompileParams & {
17
17
  }
18
18
  }
19
19
 
20
- export const packageCompile = async (params?: PackageCompileParams): Promise<number> => {
20
+ export const packageCompile = async (params: PackageCompileParams = {compile: {
21
+ publint: false
22
+ }}): Promise<number> => {
21
23
  const pkg = process.env.INIT_CWD
22
24
  console.log(chalk.green(`Compiling ${pkg}`))
23
25
  const config = await loadConfig(params)
24
- const publint = config.compile?.publint ?? true
26
+ const publint = false //config.compile?.publint ?? false
25
27
 
26
28
  const modes = config.compile?.modes ?? ['tsup']
27
29
  let modeIndex = 0
@@ -1,23 +1,26 @@
1
1
  import { copyFile, readdir } from 'fs/promises'
2
+ import { TsConfigCompilerOptions } from 'tsc-prog'
2
3
 
3
- const getDistTypeFiles = async () => {
4
- return (await readdir('dist', { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `dist/${file}`)
4
+ const getDistTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {
5
+ const outDir = compilerOptions.outDir ?? 'dist'
6
+ return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `${outDir}/${file}`)
5
7
  }
6
8
 
7
- const getDistTypeMapFiles = async () => {
8
- return (await readdir('dist', { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `dist/${file}`)
9
+ const getDistTypeMapFiles = async (compilerOptions: TsConfigCompilerOptions) => {
10
+ const outDir = compilerOptions.outDir ?? 'dist'
11
+ return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `${outDir}/${file}`)
9
12
  }
10
13
 
11
- export const copyTypeFiles = async () => {
14
+ export const copyTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {
12
15
  //hybrid packages want two copies of the types
13
- const distTypeFiles = await getDistTypeFiles()
16
+ const distTypeFiles = await getDistTypeFiles(compilerOptions)
14
17
  await Promise.all(
15
18
  distTypeFiles.map(async (file) => {
16
19
  await copyFile(file, file.replace('d.ts', 'd.mts'))
17
20
  }),
18
21
  )
19
22
 
20
- const distTypeMapFiles = await getDistTypeMapFiles()
23
+ const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)
21
24
  await Promise.all(
22
25
  distTypeMapFiles.map(async (file) => {
23
26
  await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))
@@ -6,32 +6,34 @@ import { CompileParams } from './CompileParams'
6
6
  import { copyTypeFiles } from './copyTypeFiles'
7
7
  import { getCompilerOptions } from './getCompilerOptions'
8
8
 
9
- export const packageCompileTscTypes = async (params?: CompileParams, compilerOptions?: CompilerOptions, generateMts = true): Promise<number> => {
9
+ export const packageCompileTscTypes = async (params?: CompileParams, compilerOptionsParam?: CompilerOptions, generateMts = true): Promise<number> => {
10
10
  const pkg = process.env.INIT_CWD
11
11
 
12
12
  if (params?.verbose) {
13
13
  console.log(`Compiling types with TSC [${pkg}]`)
14
14
  }
15
15
 
16
+ const compilerOptions = {...getCompilerOptions({
17
+ declaration: true,
18
+ declarationMap: true,
19
+ emitDeclarationOnly: true,
20
+ esModuleInterop: true,
21
+ outDir: 'dist',
22
+ skipLibCheck: true,
23
+ sourceMap: true,
24
+ }),
25
+ ...(compilerOptionsParam ?? {}),} as TsConfigCompilerOptions
26
+
16
27
  const result = createProgramFromConfig({
17
28
  basePath: pkg ?? cwd(),
18
- compilerOptions: getCompilerOptions({
19
- declaration: true,
20
- declarationMap: true,
21
- emitDeclarationOnly: true,
22
- esModuleInterop: true,
23
- outDir: 'dist',
24
- skipLibCheck: true,
25
- sourceMap: true,
26
- ...(compilerOptions ?? {}),
27
- }) as TsConfigCompilerOptions,
29
+ compilerOptions,
28
30
  exclude: ['dist', 'docs', '**/*.spec.*', 'src/**/spec/**/*'],
29
31
  include: ['src'],
30
32
  }).emit()
31
33
 
32
34
  const diagResults = result.diagnostics.map((value) => value.category === DiagnosticCategory.Error).length
33
35
  if (generateMts) {
34
- await copyTypeFiles()
36
+ await copyTypeFiles(compilerOptions)
35
37
  }
36
38
  return diagResults
37
39
  }
@@ -58,7 +58,7 @@ export const packageCompileTsup2 = async (params?: PackageCompileTsup2Params) =>
58
58
  (await compileFolder({ ...(compile?.tsup?.options ?? {}), outDir: 'dist/node', platform: 'node' }, verbose)) ||
59
59
  (await compileFolder({ ...(compile?.tsup?.options ?? {}), outExtension: () => ({js: '.js'}), outDir: 'dist/browser', platform: 'browser' }, verbose)) ||
60
60
  (await packageCompileTscTypes({ verbose}, { outDir: 'dist/browser' })) ||
61
- (await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' }, false)) ||
62
- (publint ? await packagePublint() : 0)
61
+ (await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' }))
62
+ // || (publint ? await packagePublint() : 0)
63
63
  )
64
64
  }