@xylabs/ts-scripts-yarn3 3.1.1 → 3.1.3
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/inputs.js +1 -1
- package/dist/actions/package/compile/inputs.js.map +1 -1
- package/dist/actions/package/compile/inputs.mjs +1 -1
- package/dist/actions/package/compile/inputs.mjs.map +1 -1
- package/dist/actions/package/compile/tscTypes.js +2 -2
- package/dist/actions/package/compile/tscTypes.js.map +1 -1
- package/dist/actions/package/compile/tscTypes.mjs +2 -2
- package/dist/actions/package/compile/tscTypes.mjs.map +1 -1
- package/package.json +4 -6
- package/src/actions/package/compile/inputs.ts +1 -1
- package/src/actions/package/compile/tscTypes.ts +3 -2
|
@@ -55,7 +55,7 @@ const getAllInputs = async (depth = 100) => {
|
|
|
55
55
|
return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat();
|
|
56
56
|
};
|
|
57
57
|
const getAllInputs2 = (folder) => {
|
|
58
|
-
return import_glob.glob.sync(`${folder}/**/*.*`, {
|
|
58
|
+
return import_glob.glob.sync(`${folder}/**/*.*`, { ignore: ["**/*.spec.*", "**/*.stories.*", "**/spec/**/*"], posix: true });
|
|
59
59
|
};
|
|
60
60
|
// Annotate the CommonJS export names for ESM import in node:
|
|
61
61
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/inputs.ts"],"sourcesContent":["import { readdir } from 'fs/promises'\nimport { glob } from 'glob'\n\nexport const getInputs = async (subDir?: string) => {\n return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))\n .filter(\n (file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.includes('.spec.') && !file.includes('.stories.'),\n )\n .map((file) => (subDir ? `${subDir}/${file}` : file))\n}\n\nexport const getInputDirs = async (depth: number = 0) => {\n if (depth === 0) {\n return []\n }\n return [\n '.',\n ...(await readdir('src', { recursive: true, withFileTypes: true }))\n .filter((file) => file.isDirectory())\n .map((file) => {\n const pathParts = file.path?.split('/') ?? []\n pathParts.shift()\n if (pathParts.length) {\n const root = pathParts.join('/')\n return `${root}/${file.name}`\n } else {\n return file.name\n }\n }),\n ]\n}\n\nexport const getAllInputs = async (depth = 100) => {\n const dirs = await getInputDirs(depth)\n return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()\n}\n\nexport const getAllInputs2 = (folder: string) => {\n /* tsup wants posix paths */\n return glob.sync(`${folder}/**/*.*`, {
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/inputs.ts"],"sourcesContent":["import { readdir } from 'fs/promises'\nimport { glob } from 'glob'\n\nexport const getInputs = async (subDir?: string) => {\n return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))\n .filter(\n (file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.includes('.spec.') && !file.includes('.stories.'),\n )\n .map((file) => (subDir ? `${subDir}/${file}` : file))\n}\n\nexport const getInputDirs = async (depth: number = 0) => {\n if (depth === 0) {\n return []\n }\n return [\n '.',\n ...(await readdir('src', { recursive: true, withFileTypes: true }))\n .filter((file) => file.isDirectory())\n .map((file) => {\n const pathParts = file.path?.split('/') ?? []\n pathParts.shift()\n if (pathParts.length) {\n const root = pathParts.join('/')\n return `${root}/${file.name}`\n } else {\n return file.name\n }\n }),\n ]\n}\n\nexport const getAllInputs = async (depth = 100) => {\n const dirs = await getInputDirs(depth)\n return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()\n}\n\nexport const getAllInputs2 = (folder: string) => {\n /* tsup wants posix paths */\n return glob.sync(`${folder}/**/*.*`, { ignore: ['**/*.spec.*', '**/*.stories.*', '**/spec/**/*'], posix: true })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAwB;AACxB,kBAAqB;AAEd,MAAM,YAAY,OAAO,WAAoB;AAClD,UAAQ,UAAM,yBAAQ,SAAS,OAAO,MAAM,KAAK,OAAO,EAAE,WAAW,MAAM,CAAC,GACzE;AAAA,IACC,CAAC,UAAU,KAAK,SAAS,KAAK,KAAK,KAAK,SAAS,MAAM,MAAM,CAAC,KAAK,SAAS,MAAM,KAAK,CAAC,KAAK,SAAS,QAAQ,KAAK,CAAC,KAAK,SAAS,WAAW;AAAA,EAC/I,EACC,IAAI,CAAC,SAAU,SAAS,GAAG,MAAM,IAAI,IAAI,KAAK,IAAK;AACxD;AAEO,MAAM,eAAe,OAAO,QAAgB,MAAM;AACvD,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AACA,SAAO;AAAA,IACL;AAAA,IACA,IAAI,UAAM,yBAAQ,OAAO,EAAE,WAAW,MAAM,eAAe,KAAK,CAAC,GAC9D,OAAO,CAAC,SAAS,KAAK,YAAY,CAAC,EACnC,IAAI,CAAC,SAAS;AAnBrB;AAoBQ,YAAM,cAAY,UAAK,SAAL,mBAAW,MAAM,SAAQ,CAAC;AAC5C,gBAAU,MAAM;AAChB,UAAI,UAAU,QAAQ;AACpB,cAAM,OAAO,UAAU,KAAK,GAAG;AAC/B,eAAO,GAAG,IAAI,IAAI,KAAK,IAAI;AAAA,MAC7B,OAAO;AACL,eAAO,KAAK;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACL;AACF;AAEO,MAAM,eAAe,OAAO,QAAQ,QAAQ;AACjD,QAAM,OAAO,MAAM,aAAa,KAAK;AACrC,UAAQ,MAAM,QAAQ,IAAI,KAAK,IAAI,OAAO,QAAQ,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,KAAK;AACjF;AAEO,MAAM,gBAAgB,CAAC,WAAmB;AAE/C,SAAO,iBAAK,KAAK,GAAG,MAAM,WAAW,EAAE,QAAQ,CAAC,eAAe,kBAAkB,cAAc,GAAG,OAAO,KAAK,CAAC;AACjH;","names":[]}
|
|
@@ -29,7 +29,7 @@ const getAllInputs = async (depth = 100) => {
|
|
|
29
29
|
return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat();
|
|
30
30
|
};
|
|
31
31
|
const getAllInputs2 = (folder) => {
|
|
32
|
-
return glob.sync(`${folder}/**/*.*`, {
|
|
32
|
+
return glob.sync(`${folder}/**/*.*`, { ignore: ["**/*.spec.*", "**/*.stories.*", "**/spec/**/*"], posix: true });
|
|
33
33
|
};
|
|
34
34
|
export {
|
|
35
35
|
getAllInputs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/inputs.ts"],"sourcesContent":["import { readdir } from 'fs/promises'\nimport { glob } from 'glob'\n\nexport const getInputs = async (subDir?: string) => {\n return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))\n .filter(\n (file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.includes('.spec.') && !file.includes('.stories.'),\n )\n .map((file) => (subDir ? `${subDir}/${file}` : file))\n}\n\nexport const getInputDirs = async (depth: number = 0) => {\n if (depth === 0) {\n return []\n }\n return [\n '.',\n ...(await readdir('src', { recursive: true, withFileTypes: true }))\n .filter((file) => file.isDirectory())\n .map((file) => {\n const pathParts = file.path?.split('/') ?? []\n pathParts.shift()\n if (pathParts.length) {\n const root = pathParts.join('/')\n return `${root}/${file.name}`\n } else {\n return file.name\n }\n }),\n ]\n}\n\nexport const getAllInputs = async (depth = 100) => {\n const dirs = await getInputDirs(depth)\n return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()\n}\n\nexport const getAllInputs2 = (folder: string) => {\n /* tsup wants posix paths */\n return glob.sync(`${folder}/**/*.*`, {
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/inputs.ts"],"sourcesContent":["import { readdir } from 'fs/promises'\nimport { glob } from 'glob'\n\nexport const getInputs = async (subDir?: string) => {\n return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))\n .filter(\n (file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.includes('.spec.') && !file.includes('.stories.'),\n )\n .map((file) => (subDir ? `${subDir}/${file}` : file))\n}\n\nexport const getInputDirs = async (depth: number = 0) => {\n if (depth === 0) {\n return []\n }\n return [\n '.',\n ...(await readdir('src', { recursive: true, withFileTypes: true }))\n .filter((file) => file.isDirectory())\n .map((file) => {\n const pathParts = file.path?.split('/') ?? []\n pathParts.shift()\n if (pathParts.length) {\n const root = pathParts.join('/')\n return `${root}/${file.name}`\n } else {\n return file.name\n }\n }),\n ]\n}\n\nexport const getAllInputs = async (depth = 100) => {\n const dirs = await getInputDirs(depth)\n return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()\n}\n\nexport const getAllInputs2 = (folder: string) => {\n /* tsup wants posix paths */\n return glob.sync(`${folder}/**/*.*`, { ignore: ['**/*.spec.*', '**/*.stories.*', '**/spec/**/*'], posix: true })\n}\n"],"mappings":"AAAA,SAAS,eAAe;AACxB,SAAS,YAAY;AAEd,MAAM,YAAY,OAAO,WAAoB;AAClD,UAAQ,MAAM,QAAQ,SAAS,OAAO,MAAM,KAAK,OAAO,EAAE,WAAW,MAAM,CAAC,GACzE;AAAA,IACC,CAAC,UAAU,KAAK,SAAS,KAAK,KAAK,KAAK,SAAS,MAAM,MAAM,CAAC,KAAK,SAAS,MAAM,KAAK,CAAC,KAAK,SAAS,QAAQ,KAAK,CAAC,KAAK,SAAS,WAAW;AAAA,EAC/I,EACC,IAAI,CAAC,SAAU,SAAS,GAAG,MAAM,IAAI,IAAI,KAAK,IAAK;AACxD;AAEO,MAAM,eAAe,OAAO,QAAgB,MAAM;AACvD,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AACA,SAAO;AAAA,IACL;AAAA,IACA,IAAI,MAAM,QAAQ,OAAO,EAAE,WAAW,MAAM,eAAe,KAAK,CAAC,GAC9D,OAAO,CAAC,SAAS,KAAK,YAAY,CAAC,EACnC,IAAI,CAAC,SAAS;AAnBrB;AAoBQ,YAAM,cAAY,UAAK,SAAL,mBAAW,MAAM,SAAQ,CAAC;AAC5C,gBAAU,MAAM;AAChB,UAAI,UAAU,QAAQ;AACpB,cAAM,OAAO,UAAU,KAAK,GAAG;AAC/B,eAAO,GAAG,IAAI,IAAI,KAAK,IAAI;AAAA,MAC7B,OAAO;AACL,eAAO,KAAK;AAAA,MACd;AAAA,IACF,CAAC;AAAA,EACL;AACF;AAEO,MAAM,eAAe,OAAO,QAAQ,QAAQ;AACjD,QAAM,OAAO,MAAM,aAAa,KAAK;AACrC,UAAQ,MAAM,QAAQ,IAAI,KAAK,IAAI,OAAO,QAAQ,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,KAAK;AACjF;AAEO,MAAM,gBAAgB,CAAC,WAAmB;AAE/C,SAAO,KAAK,KAAK,GAAG,MAAM,WAAW,EAAE,QAAQ,CAAC,eAAe,kBAAkB,cAAc,GAAG,OAAO,KAAK,CAAC;AACjH;","names":[]}
|
|
@@ -38,7 +38,7 @@ var import_typescript = require("typescript");
|
|
|
38
38
|
var import_buildEntries = require("./buildEntries");
|
|
39
39
|
var import_copyTypeFiles = require("./copyTypeFiles");
|
|
40
40
|
var import_getCompilerOptions = require("./getCompilerOptions");
|
|
41
|
-
const packageCompileTscTypes = async (folder = "src", {
|
|
41
|
+
const packageCompileTscTypes = async (folder = "src", { verbose } = {}, compilerOptionsParam, generateMts = true) => {
|
|
42
42
|
const pkg = process.env.INIT_CWD ?? (0, import_process.cwd)();
|
|
43
43
|
if (verbose) {
|
|
44
44
|
console.log(`Compiling types with TSC [${pkg}]`);
|
|
@@ -55,7 +55,7 @@ const packageCompileTscTypes = async (folder = "src", { compile, verbose } = {},
|
|
|
55
55
|
}),
|
|
56
56
|
...compilerOptionsParam ?? {}
|
|
57
57
|
};
|
|
58
|
-
const files = (0, import_buildEntries.buildEntries)(folder,
|
|
58
|
+
const files = (0, import_buildEntries.buildEntries)(folder, "all");
|
|
59
59
|
const result = (0, import_tsc_prog.createProgramFromConfig)({
|
|
60
60
|
basePath: pkg ?? (0, import_process.cwd)(),
|
|
61
61
|
compilerOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport { CompilerOptions, DiagnosticCategory } from 'typescript'\n\nimport { buildEntries } from './buildEntries'\nimport { CompileParams } from './CompileParams'\nimport { copyTypeFiles } from './copyTypeFiles'\nimport { getCompilerOptions } from './getCompilerOptions'\n\nexport const packageCompileTscTypes = async (\n folder: string = 'src',\n {
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport { CompilerOptions, DiagnosticCategory } from 'typescript'\n\nimport { buildEntries } from './buildEntries'\nimport { CompileParams } from './CompileParams'\nimport { copyTypeFiles } from './copyTypeFiles'\nimport { getCompilerOptions } from './getCompilerOptions'\n\nexport const packageCompileTscTypes = async (\n folder: string = 'src',\n { verbose }: CompileParams = {},\n compilerOptionsParam?: CompilerOptions,\n generateMts = true,\n): Promise<number> => {\n const pkg = process.env.INIT_CWD ?? cwd()\n\n if (verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n const compilerOptions = {\n ...getCompilerOptions({\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n outDir: 'dist',\n skipDefaultLibCheck: true,\n skipLibCheck: true,\n sourceMap: true,\n }),\n ...(compilerOptionsParam ?? {}),\n } as TsConfigCompilerOptions\n\n //calling all here since the types do not get rolled up\n const files = buildEntries(folder, 'all')\n\n const result = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', '**/*.stories.*', 'src/**/spec/**/*'],\n files,\n }).emit()\n\n const diagResults = result.diagnostics.length\n result.diagnostics.forEach((diag) => {\n switch (diag.category) {\n case DiagnosticCategory.Error:\n console.error(chalk.red(diag.messageText))\n console.error(chalk.grey(pkg))\n console.error(chalk.blue(diag.file?.fileName))\n break\n case DiagnosticCategory.Warning:\n console.error(chalk.yellow(diag.messageText))\n console.error(chalk.grey(pkg))\n console.error(chalk.blue(diag.file?.fileName))\n break\n case DiagnosticCategory.Suggestion:\n console.error(chalk.white(diag.messageText))\n console.error(chalk.grey(pkg))\n console.error(chalk.blue(diag.file?.fileName))\n break\n }\n })\n if (generateMts) {\n await copyTypeFiles(compilerOptions)\n }\n return diagResults\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,qBAAoB;AACpB,sBAAiE;AACjE,wBAAoD;AAEpD,0BAA6B;AAE7B,2BAA8B;AAC9B,gCAAmC;AAE5B,MAAM,yBAAyB,OACpC,SAAiB,OACjB,EAAE,QAAQ,IAAmB,CAAC,GAC9B,sBACA,cAAc,SACM;AACpB,QAAM,MAAM,QAAQ,IAAI,gBAAY,oBAAI;AAExC,MAAI,SAAS;AACX,YAAQ,IAAI,6BAA6B,GAAG,GAAG;AAAA,EACjD;AAEA,QAAM,kBAAkB;AAAA,IACtB,OAAG,8CAAmB;AAAA,MACpB,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,QAAQ;AAAA,MACR,qBAAqB;AAAA,MACrB,cAAc;AAAA,MACd,WAAW;AAAA,IACb,CAAC;AAAA,IACD,GAAI,wBAAwB,CAAC;AAAA,EAC/B;AAGA,QAAM,YAAQ,kCAAa,QAAQ,KAAK;AAExC,QAAM,aAAS,yCAAwB;AAAA,IACrC,UAAU,WAAO,oBAAI;AAAA,IACrB;AAAA,IACA,SAAS,CAAC,QAAQ,QAAQ,eAAe,kBAAkB,kBAAkB;AAAA,IAC7E;AAAA,EACF,CAAC,EAAE,KAAK;AAER,QAAM,cAAc,OAAO,YAAY;AACvC,SAAO,YAAY,QAAQ,CAAC,SAAS;AA9CvC;AA+CI,YAAQ,KAAK,UAAU;AAAA,MACrB,KAAK,qCAAmB;AACtB,gBAAQ,MAAM,aAAAA,QAAM,IAAI,KAAK,WAAW,CAAC;AACzC,gBAAQ,MAAM,aAAAA,QAAM,KAAK,GAAG,CAAC;AAC7B,gBAAQ,MAAM,aAAAA,QAAM,MAAK,UAAK,SAAL,mBAAW,QAAQ,CAAC;AAC7C;AAAA,MACF,KAAK,qCAAmB;AACtB,gBAAQ,MAAM,aAAAA,QAAM,OAAO,KAAK,WAAW,CAAC;AAC5C,gBAAQ,MAAM,aAAAA,QAAM,KAAK,GAAG,CAAC;AAC7B,gBAAQ,MAAM,aAAAA,QAAM,MAAK,UAAK,SAAL,mBAAW,QAAQ,CAAC;AAC7C;AAAA,MACF,KAAK,qCAAmB;AACtB,gBAAQ,MAAM,aAAAA,QAAM,MAAM,KAAK,WAAW,CAAC;AAC3C,gBAAQ,MAAM,aAAAA,QAAM,KAAK,GAAG,CAAC;AAC7B,gBAAQ,MAAM,aAAAA,QAAM,MAAK,UAAK,SAAL,mBAAW,QAAQ,CAAC;AAC7C;AAAA,IACJ;AAAA,EACF,CAAC;AACD,MAAI,aAAa;AACf,cAAM,oCAAc,eAAe;AAAA,EACrC;AACA,SAAO;AACT;","names":["chalk"]}
|
|
@@ -5,7 +5,7 @@ import { DiagnosticCategory } from "typescript";
|
|
|
5
5
|
import { buildEntries } from "./buildEntries";
|
|
6
6
|
import { copyTypeFiles } from "./copyTypeFiles";
|
|
7
7
|
import { getCompilerOptions } from "./getCompilerOptions";
|
|
8
|
-
const packageCompileTscTypes = async (folder = "src", {
|
|
8
|
+
const packageCompileTscTypes = async (folder = "src", { verbose } = {}, compilerOptionsParam, generateMts = true) => {
|
|
9
9
|
const pkg = process.env.INIT_CWD ?? cwd();
|
|
10
10
|
if (verbose) {
|
|
11
11
|
console.log(`Compiling types with TSC [${pkg}]`);
|
|
@@ -22,7 +22,7 @@ const packageCompileTscTypes = async (folder = "src", { compile, verbose } = {},
|
|
|
22
22
|
}),
|
|
23
23
|
...compilerOptionsParam ?? {}
|
|
24
24
|
};
|
|
25
|
-
const files = buildEntries(folder,
|
|
25
|
+
const files = buildEntries(folder, "all");
|
|
26
26
|
const result = createProgramFromConfig({
|
|
27
27
|
basePath: pkg ?? cwd(),
|
|
28
28
|
compilerOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport { CompilerOptions, DiagnosticCategory } from 'typescript'\n\nimport { buildEntries } from './buildEntries'\nimport { CompileParams } from './CompileParams'\nimport { copyTypeFiles } from './copyTypeFiles'\nimport { getCompilerOptions } from './getCompilerOptions'\n\nexport const packageCompileTscTypes = async (\n folder: string = 'src',\n {
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/package/compile/tscTypes.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cwd } from 'process'\nimport { createProgramFromConfig, TsConfigCompilerOptions } from 'tsc-prog'\nimport { CompilerOptions, DiagnosticCategory } from 'typescript'\n\nimport { buildEntries } from './buildEntries'\nimport { CompileParams } from './CompileParams'\nimport { copyTypeFiles } from './copyTypeFiles'\nimport { getCompilerOptions } from './getCompilerOptions'\n\nexport const packageCompileTscTypes = async (\n folder: string = 'src',\n { verbose }: CompileParams = {},\n compilerOptionsParam?: CompilerOptions,\n generateMts = true,\n): Promise<number> => {\n const pkg = process.env.INIT_CWD ?? cwd()\n\n if (verbose) {\n console.log(`Compiling types with TSC [${pkg}]`)\n }\n\n const compilerOptions = {\n ...getCompilerOptions({\n declaration: true,\n declarationMap: true,\n emitDeclarationOnly: true,\n outDir: 'dist',\n skipDefaultLibCheck: true,\n skipLibCheck: true,\n sourceMap: true,\n }),\n ...(compilerOptionsParam ?? {}),\n } as TsConfigCompilerOptions\n\n //calling all here since the types do not get rolled up\n const files = buildEntries(folder, 'all')\n\n const result = createProgramFromConfig({\n basePath: pkg ?? cwd(),\n compilerOptions,\n exclude: ['dist', 'docs', '**/*.spec.*', '**/*.stories.*', 'src/**/spec/**/*'],\n files,\n }).emit()\n\n const diagResults = result.diagnostics.length\n result.diagnostics.forEach((diag) => {\n switch (diag.category) {\n case DiagnosticCategory.Error:\n console.error(chalk.red(diag.messageText))\n console.error(chalk.grey(pkg))\n console.error(chalk.blue(diag.file?.fileName))\n break\n case DiagnosticCategory.Warning:\n console.error(chalk.yellow(diag.messageText))\n console.error(chalk.grey(pkg))\n console.error(chalk.blue(diag.file?.fileName))\n break\n case DiagnosticCategory.Suggestion:\n console.error(chalk.white(diag.messageText))\n console.error(chalk.grey(pkg))\n console.error(chalk.blue(diag.file?.fileName))\n break\n }\n })\n if (generateMts) {\n await copyTypeFiles(compilerOptions)\n }\n return diagResults\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,WAAW;AACpB,SAAS,+BAAwD;AACjE,SAA0B,0BAA0B;AAEpD,SAAS,oBAAoB;AAE7B,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AAE5B,MAAM,yBAAyB,OACpC,SAAiB,OACjB,EAAE,QAAQ,IAAmB,CAAC,GAC9B,sBACA,cAAc,SACM;AACpB,QAAM,MAAM,QAAQ,IAAI,YAAY,IAAI;AAExC,MAAI,SAAS;AACX,YAAQ,IAAI,6BAA6B,GAAG,GAAG;AAAA,EACjD;AAEA,QAAM,kBAAkB;AAAA,IACtB,GAAG,mBAAmB;AAAA,MACpB,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,MACrB,QAAQ;AAAA,MACR,qBAAqB;AAAA,MACrB,cAAc;AAAA,MACd,WAAW;AAAA,IACb,CAAC;AAAA,IACD,GAAI,wBAAwB,CAAC;AAAA,EAC/B;AAGA,QAAM,QAAQ,aAAa,QAAQ,KAAK;AAExC,QAAM,SAAS,wBAAwB;AAAA,IACrC,UAAU,OAAO,IAAI;AAAA,IACrB;AAAA,IACA,SAAS,CAAC,QAAQ,QAAQ,eAAe,kBAAkB,kBAAkB;AAAA,IAC7E;AAAA,EACF,CAAC,EAAE,KAAK;AAER,QAAM,cAAc,OAAO,YAAY;AACvC,SAAO,YAAY,QAAQ,CAAC,SAAS;AA9CvC;AA+CI,YAAQ,KAAK,UAAU;AAAA,MACrB,KAAK,mBAAmB;AACtB,gBAAQ,MAAM,MAAM,IAAI,KAAK,WAAW,CAAC;AACzC,gBAAQ,MAAM,MAAM,KAAK,GAAG,CAAC;AAC7B,gBAAQ,MAAM,MAAM,MAAK,UAAK,SAAL,mBAAW,QAAQ,CAAC;AAC7C;AAAA,MACF,KAAK,mBAAmB;AACtB,gBAAQ,MAAM,MAAM,OAAO,KAAK,WAAW,CAAC;AAC5C,gBAAQ,MAAM,MAAM,KAAK,GAAG,CAAC;AAC7B,gBAAQ,MAAM,MAAM,MAAK,UAAK,SAAL,mBAAW,QAAQ,CAAC;AAC7C;AAAA,MACF,KAAK,mBAAmB;AACtB,gBAAQ,MAAM,MAAM,MAAM,KAAK,WAAW,CAAC;AAC3C,gBAAQ,MAAM,MAAM,KAAK,GAAG,CAAC;AAC7B,gBAAQ,MAAM,MAAM,MAAK,UAAK,SAAL,mBAAW,QAAQ,CAAC;AAC7C;AAAA,IACJ;AAAA,EACF,CAAC;AACD,MAAI,aAAa;AACf,UAAM,cAAc,eAAe;AAAA,EACrC;AACA,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -57,8 +57,6 @@
|
|
|
57
57
|
"url": "https://github.com/xylabs/config/issues"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@babel/core": "^7.23.0",
|
|
61
|
-
"@babel/preset-env": "^7.22.20",
|
|
62
60
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
63
61
|
"@rollup/plugin-json": "^6.0.0",
|
|
64
62
|
"@rollup/plugin-typescript": "^11.1.4",
|
|
@@ -66,7 +64,7 @@
|
|
|
66
64
|
"@types/yargs": "^17.0.26",
|
|
67
65
|
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
|
68
66
|
"@typescript-eslint/parser": "^6.7.3",
|
|
69
|
-
"@xylabs/tsconfig": "~3.1.
|
|
67
|
+
"@xylabs/tsconfig": "~3.1.3",
|
|
70
68
|
"chalk": "^4.1.2",
|
|
71
69
|
"cosmiconfig": "^8.3.6",
|
|
72
70
|
"cpy": "^8.1.2",
|
|
@@ -111,8 +109,8 @@
|
|
|
111
109
|
"@types/license-checker": "^25.0.4",
|
|
112
110
|
"@types/lodash": "^4.14.199",
|
|
113
111
|
"@types/parse-git-config": "^3.0.2",
|
|
114
|
-
"@xylabs/eslint-config": "^3.1.
|
|
115
|
-
"@xylabs/tsconfig": "^3.1.
|
|
112
|
+
"@xylabs/eslint-config": "^3.1.3",
|
|
113
|
+
"@xylabs/tsconfig": "^3.1.3",
|
|
116
114
|
"publint": "^0.2.3",
|
|
117
115
|
"typescript": "^5.2.2"
|
|
118
116
|
},
|
|
@@ -171,5 +169,5 @@
|
|
|
171
169
|
"package-clean": "echo Not cleaning..."
|
|
172
170
|
},
|
|
173
171
|
"sideEffects": false,
|
|
174
|
-
"version": "3.1.
|
|
172
|
+
"version": "3.1.3"
|
|
175
173
|
}
|
|
@@ -37,5 +37,5 @@ export const getAllInputs = async (depth = 100) => {
|
|
|
37
37
|
|
|
38
38
|
export const getAllInputs2 = (folder: string) => {
|
|
39
39
|
/* tsup wants posix paths */
|
|
40
|
-
return glob.sync(`${folder}/**/*.*`, {
|
|
40
|
+
return glob.sync(`${folder}/**/*.*`, { ignore: ['**/*.spec.*', '**/*.stories.*', '**/spec/**/*'], posix: true })
|
|
41
41
|
}
|
|
@@ -10,7 +10,7 @@ import { getCompilerOptions } from './getCompilerOptions'
|
|
|
10
10
|
|
|
11
11
|
export const packageCompileTscTypes = async (
|
|
12
12
|
folder: string = 'src',
|
|
13
|
-
{
|
|
13
|
+
{ verbose }: CompileParams = {},
|
|
14
14
|
compilerOptionsParam?: CompilerOptions,
|
|
15
15
|
generateMts = true,
|
|
16
16
|
): Promise<number> => {
|
|
@@ -33,7 +33,8 @@ export const packageCompileTscTypes = async (
|
|
|
33
33
|
...(compilerOptionsParam ?? {}),
|
|
34
34
|
} as TsConfigCompilerOptions
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
//calling all here since the types do not get rolled up
|
|
37
|
+
const files = buildEntries(folder, 'all')
|
|
37
38
|
|
|
38
39
|
const result = createProgramFromConfig({
|
|
39
40
|
basePath: pkg ?? cwd(),
|