@xylabs/ts-scripts-yarn3 3.0.36 → 3.0.38
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/copyTypeFiles.js +9 -7
- package/dist/actions/package/compile/copyTypeFiles.js.map +1 -1
- package/dist/actions/package/compile/copyTypeFiles.mjs +9 -7
- package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
- package/dist/actions/package/compile/tscTypes.js +10 -7
- package/dist/actions/package/compile/tscTypes.js.map +1 -1
- package/dist/actions/package/compile/tscTypes.mjs +10 -7
- package/dist/actions/package/compile/tscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/tsup2.js +1 -1
- package/dist/actions/package/compile/tsup2.js.map +1 -1
- package/dist/actions/package/compile/tsup2.mjs +1 -1
- package/dist/actions/package/compile/tsup2.mjs.map +1 -1
- package/package.json +4 -4
- package/src/actions/package/compile/copyTypeFiles.ts +10 -7
- package/src/actions/package/compile/tscTypes.ts +14 -12
- package/src/actions/package/compile/tsup2.ts +4 -4
|
@@ -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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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,
|
|
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
|
|
35
|
-
|
|
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,
|
|
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,
|
|
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
|
|
12
|
-
|
|
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,
|
|
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":[]}
|
|
@@ -56,7 +56,7 @@ const packageCompileTsup2 = async (params) => {
|
|
|
56
56
|
if (verbose) {
|
|
57
57
|
console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`);
|
|
58
58
|
}
|
|
59
|
-
return (0, import_tscNoEmit.packageCompileTscNoEmit)({ verbose }) || await compileFolder(compile?.tsup?.options, verbose) || await compileFolder({ ...compile?.tsup?.options ?? {},
|
|
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" }) || (publint ? await (0, import_publint.packagePublint)() : 0);
|
|
60
60
|
};
|
|
61
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
62
62
|
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, verbose)) ||\n (await compileFolder({ ...(compile?.tsup?.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;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,CAAC,MACjE,UAAU,UAAM,+BAAe,IAAI;AAExC;","names":["options"]}
|
|
@@ -33,7 +33,7 @@ const packageCompileTsup2 = async (params) => {
|
|
|
33
33
|
if (verbose) {
|
|
34
34
|
console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`);
|
|
35
35
|
}
|
|
36
|
-
return packageCompileTscNoEmit({ verbose }) || await compileFolder(compile?.tsup?.options, verbose) || await compileFolder({ ...compile?.tsup?.options ?? {},
|
|
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" }) || (publint ? await packagePublint() : 0);
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
39
39
|
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, verbose)) ||\n (await compileFolder({ ...(compile?.tsup?.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;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,CAAC,MACjE,UAAU,MAAM,eAAe,IAAI;AAExC;","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.
|
|
69
|
+
"@xylabs/tsconfig": "~3.0.38",
|
|
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.38",
|
|
114
|
+
"@xylabs/tsconfig": "^3.0.38",
|
|
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.38"
|
|
172
172
|
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
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
|
}
|
|
@@ -55,10 +55,10 @@ export const packageCompileTsup2 = async (params?: PackageCompileTsup2Params) =>
|
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
packageCompileTscNoEmit({ verbose }) ||
|
|
58
|
-
(await compileFolder(compile?.tsup?.options, verbose)) ||
|
|
59
|
-
(await compileFolder({ ...(compile?.tsup?.options ?? {}),
|
|
60
|
-
(await packageCompileTscTypes({ verbose })) ||
|
|
61
|
-
(await packageCompileTscTypes({ verbose }, { outDir: 'dist/
|
|
58
|
+
(await compileFolder({ ...(compile?.tsup?.options ?? {}), outDir: 'dist/node', platform: 'node' }, verbose)) ||
|
|
59
|
+
(await compileFolder({ ...(compile?.tsup?.options ?? {}), outExtension: () => ({js: '.js'}), outDir: 'dist/browser', platform: 'browser' }, verbose)) ||
|
|
60
|
+
(await packageCompileTscTypes({ verbose}, { outDir: 'dist/browser' })) ||
|
|
61
|
+
(await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' })) ||
|
|
62
62
|
(publint ? await packagePublint() : 0)
|
|
63
63
|
)
|
|
64
64
|
}
|