@xylabs/ts-scripts-yarn3 3.0.70 → 3.0.72
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.
|
@@ -27,21 +27,11 @@ var import_publint = require("../publint");
|
|
|
27
27
|
var import_inputs = require("./inputs");
|
|
28
28
|
var import_tscNoEmit = require("./tscNoEmit");
|
|
29
29
|
var import_tscTypes = require("./tscTypes");
|
|
30
|
-
const stringOrArray = (value) => {
|
|
31
|
-
if (value === void 0) {
|
|
32
|
-
return void 0;
|
|
33
|
-
}
|
|
34
|
-
if (Array.isArray(value)) {
|
|
35
|
-
return value;
|
|
36
|
-
} else {
|
|
37
|
-
return [value];
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
30
|
const compileFolder = async (folder, options, _verbose) => {
|
|
41
31
|
const outDir = (options == null ? void 0 : options.outDir) ?? "dist";
|
|
42
32
|
const entry = (0, import_inputs.getAllInputs2)(folder).filter((entry2) => !entry2.includes(".spec.") && !entry2.includes(".story."));
|
|
43
33
|
const optionsResult = (0, import_tsup.defineConfig)({
|
|
44
|
-
bundle:
|
|
34
|
+
bundle: true,
|
|
45
35
|
cjsInterop: true,
|
|
46
36
|
clean: true,
|
|
47
37
|
dts: false,
|
|
@@ -88,7 +78,7 @@ const packageCompileTsup2 = async (params) => {
|
|
|
88
78
|
folder,
|
|
89
79
|
{
|
|
90
80
|
...((_a = compile == null ? void 0 : compile.tsup) == null ? void 0 : _a.options) ?? {},
|
|
91
|
-
bundle:
|
|
81
|
+
bundle: false,
|
|
92
82
|
format: ["esm", "cjs"],
|
|
93
83
|
outDir: "dist/browser",
|
|
94
84
|
outExtension: ({ format }) => format === "esm" ? { js: ".js" } : { js: ".cjs" },
|
|
@@ -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 { getAllInputs2 } from './inputs'\nimport { packageCompileTscNoEmit } from './tscNoEmit'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsup2Params = Partial<\n CompileParams & {\n compile?: {\n browser?: Record<string, Options | boolean>\n node?: Record<string, Options | boolean>\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst
|
|
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 { getAllInputs2 } from './inputs'\nimport { packageCompileTscNoEmit } from './tscNoEmit'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsup2Params = Partial<\n CompileParams & {\n compile?: {\n browser?: Record<string, Options | boolean>\n node?: Record<string, Options | boolean>\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileFolder = async (folder: string, options?: Options, _verbose?: boolean) => {\n const outDir = options?.outDir ?? 'dist'\n const entry = getAllInputs2(folder).filter((entry) => !entry.includes('.spec.') && !entry.includes('.story.'))\n const optionsResult = defineConfig({\n bundle: true,\n cjsInterop: true,\n clean: true,\n dts: false,\n entry,\n format: ['cjs', 'esm'],\n loader: { '.gif': 'copy', '.jpg': 'copy', '.json': 'copy', '.png': 'copy', '.svg': 'copy', '.webp': 'copy' },\n outDir,\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 const compileForNode = compile?.node ?? { src: {} }\n const compileForBrowser = compile?.browser ?? { src: {} }\n\n return (\n packageCompileTscNoEmit({ verbose }) ||\n (\n await Promise.all(\n Object.entries(compileForNode).map(async ([folder, options]) => {\n return folder\n ? await compileFolder(\n folder,\n { ...(compile?.tsup?.options ?? {}), outDir: 'dist/node', platform: 'node', ...(typeof options === 'object' ? options : {}) },\n verbose,\n )\n : 0\n }),\n )\n ).reduce((prev, value) => prev + value, 0) ||\n (\n await Promise.all(\n Object.entries(compileForBrowser).map(async ([folder, options]) => {\n return folder\n ? await compileFolder(\n folder,\n {\n ...(compile?.tsup?.options ?? {}),\n bundle: false,\n format: ['esm', 'cjs'],\n outDir: 'dist/browser',\n outExtension: ({ format }) => (format === 'esm' ? { js: '.js' } : { js: '.cjs' }),\n platform: 'browser',\n ...(typeof options === 'object' ? options : {}),\n },\n verbose,\n )\n : 0\n }),\n )\n ).reduce((prev, value) => prev + value, 0) ||\n (compileForNode ? await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' }) : 0) ||\n (compileForBrowser ? await packageCompileTscTypes({ verbose }, { outDir: 'dist/browser' }) : 0) ||\n (publint ? await packagePublint() : 0)\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6C;AAE7C,iBAA2B;AAC3B,qBAA+B;AAE/B,oBAA8B;AAC9B,uBAAwC;AACxC,sBAAuC;AAcvC,MAAM,gBAAgB,OAAO,QAAgB,SAAmB,aAAuB;AACrF,QAAM,UAAS,mCAAS,WAAU;AAClC,QAAM,YAAQ,6BAAc,MAAM,EAAE,OAAO,CAACA,WAAU,CAACA,OAAM,SAAS,QAAQ,KAAK,CAACA,OAAM,SAAS,SAAS,CAAC;AAC7G,QAAM,oBAAgB,0BAAa;AAAA,IACjC,QAAQ;AAAA,IACR,Y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AAT,mBAAe,YAAW,CAAC,GAAI,QAAQ,aAAa,UAAU,QAAQ,GAAI,OAAO,YAAY,WAAW,UAAU,CAAC,EAAG;AAAA,QAC5H;AAAA,MACF,IACA;AAAA,IACN,CAAC;AAAA,EACH,GACA,OAAO,CAAC,MAAM,UAAU,OAAO,OAAO,CAAC,MAEvC,MAAM,QAAQ;AAAA,IACZ,OAAO,QAAQ,iBAAiB,EAAE,IAAI,OAAO,CAAC,QAAQ,OAAO,MAAM;AAjF3E;AAkFU,aAAO,SACH,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,UACE,KAAI,wCAAS,SAAT,mBAAe,YAAW,CAAC;AAAA,UAC/B,QAAQ;AAAA,UACR,QAAQ,CAAC,OAAO,KAAK;AAAA,UACrB,QAAQ;AAAA,UACR,cAAc,CAAC,EAAE,OAAO,MAAO,WAAW,QAAQ,EAAE,IAAI,MAAM,IAAI,EAAE,IAAI,OAAO;AAAA,UAC/E,UAAU;AAAA,UACV,GAAI,OAAO,YAAY,WAAW,UAAU,CAAC;AAAA,QAC/C;AAAA,QACA;AAAA,MACF,IACA;AAAA,IACN,CAAC;AAAA,EACH,GACA,OAAO,CAAC,MAAM,UAAU,OAAO,OAAO,CAAC,MACxC,iBAAiB,UAAM,wCAAuB,EAAE,QAAQ,GAAG,EAAE,QAAQ,YAAY,CAAC,IAAI,OACtF,oBAAoB,UAAM,wCAAuB,EAAE,QAAQ,GAAG,EAAE,QAAQ,eAAe,CAAC,IAAI,OAC5F,UAAU,UAAM,+BAAe,IAAI;AAExC;","names":["entry","options"]}
|
|
@@ -4,21 +4,11 @@ import { packagePublint } from "../publint";
|
|
|
4
4
|
import { getAllInputs2 } from "./inputs";
|
|
5
5
|
import { packageCompileTscNoEmit } from "./tscNoEmit";
|
|
6
6
|
import { packageCompileTscTypes } from "./tscTypes";
|
|
7
|
-
const stringOrArray = (value) => {
|
|
8
|
-
if (value === void 0) {
|
|
9
|
-
return void 0;
|
|
10
|
-
}
|
|
11
|
-
if (Array.isArray(value)) {
|
|
12
|
-
return value;
|
|
13
|
-
} else {
|
|
14
|
-
return [value];
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
7
|
const compileFolder = async (folder, options, _verbose) => {
|
|
18
8
|
const outDir = (options == null ? void 0 : options.outDir) ?? "dist";
|
|
19
9
|
const entry = getAllInputs2(folder).filter((entry2) => !entry2.includes(".spec.") && !entry2.includes(".story."));
|
|
20
10
|
const optionsResult = defineConfig({
|
|
21
|
-
bundle:
|
|
11
|
+
bundle: true,
|
|
22
12
|
cjsInterop: true,
|
|
23
13
|
clean: true,
|
|
24
14
|
dts: false,
|
|
@@ -65,7 +55,7 @@ const packageCompileTsup2 = async (params) => {
|
|
|
65
55
|
folder,
|
|
66
56
|
{
|
|
67
57
|
...((_a = compile == null ? void 0 : compile.tsup) == null ? void 0 : _a.options) ?? {},
|
|
68
|
-
bundle:
|
|
58
|
+
bundle: false,
|
|
69
59
|
format: ["esm", "cjs"],
|
|
70
60
|
outDir: "dist/browser",
|
|
71
61
|
outExtension: ({ format }) => format === "esm" ? { js: ".js" } : { js: ".cjs" },
|
|
@@ -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 { getAllInputs2 } from './inputs'\nimport { packageCompileTscNoEmit } from './tscNoEmit'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsup2Params = Partial<\n CompileParams & {\n compile?: {\n browser?: Record<string, Options | boolean>\n node?: Record<string, Options | boolean>\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst
|
|
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 { getAllInputs2 } from './inputs'\nimport { packageCompileTscNoEmit } from './tscNoEmit'\nimport { packageCompileTscTypes } from './tscTypes'\n\nexport type PackageCompileTsup2Params = Partial<\n CompileParams & {\n compile?: {\n browser?: Record<string, Options | boolean>\n node?: Record<string, Options | boolean>\n tsup?: {\n options?: Options\n }\n }\n }\n>\n\nconst compileFolder = async (folder: string, options?: Options, _verbose?: boolean) => {\n const outDir = options?.outDir ?? 'dist'\n const entry = getAllInputs2(folder).filter((entry) => !entry.includes('.spec.') && !entry.includes('.story.'))\n const optionsResult = defineConfig({\n bundle: true,\n cjsInterop: true,\n clean: true,\n dts: false,\n entry,\n format: ['cjs', 'esm'],\n loader: { '.gif': 'copy', '.jpg': 'copy', '.json': 'copy', '.png': 'copy', '.svg': 'copy', '.webp': 'copy' },\n outDir,\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 const compileForNode = compile?.node ?? { src: {} }\n const compileForBrowser = compile?.browser ?? { src: {} }\n\n return (\n packageCompileTscNoEmit({ verbose }) ||\n (\n await Promise.all(\n Object.entries(compileForNode).map(async ([folder, options]) => {\n return folder\n ? await compileFolder(\n folder,\n { ...(compile?.tsup?.options ?? {}), outDir: 'dist/node', platform: 'node', ...(typeof options === 'object' ? options : {}) },\n verbose,\n )\n : 0\n }),\n )\n ).reduce((prev, value) => prev + value, 0) ||\n (\n await Promise.all(\n Object.entries(compileForBrowser).map(async ([folder, options]) => {\n return folder\n ? await compileFolder(\n folder,\n {\n ...(compile?.tsup?.options ?? {}),\n bundle: false,\n format: ['esm', 'cjs'],\n outDir: 'dist/browser',\n outExtension: ({ format }) => (format === 'esm' ? { js: '.js' } : { js: '.cjs' }),\n platform: 'browser',\n ...(typeof options === 'object' ? options : {}),\n },\n verbose,\n )\n : 0\n }),\n )\n ).reduce((prev, value) => prev + value, 0) ||\n (compileForNode ? await packageCompileTscTypes({ verbose }, { outDir: 'dist/node' }) : 0) ||\n (compileForBrowser ? await packageCompileTscTypes({ verbose }, { outDir: 'dist/browser' }) : 0) ||\n (publint ? await packagePublint() : 0)\n )\n}\n"],"mappings":"AAAA,SAAS,OAAO,oBAA6B;AAE7C,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAE/B,SAAS,qBAAqB;AAC9B,SAAS,+BAA+B;AACxC,SAAS,8BAA8B;AAcvC,MAAM,gBAAgB,OAAO,QAAgB,SAAmB,aAAuB;AACrF,QAAM,UAAS,mCAAS,WAAU;AAClC,QAAM,QAAQ,cAAc,MAAM,EAAE,OAAO,CAACA,WAAU,CAACA,OAAM,SAAS,QAAQ,KAAK,CAACA,OAAM,SAAS,SAAS,CAAC;AAC7G,QAAM,gBAAgB,aAAa;AAAA,IACjC,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,KAAK;AAAA,IACL;AAAA,IACA,QAAQ,CAAC,OAAO,KAAK;AAAA,IACrB,QAAQ,EAAE,QAAQ,QAAQ,QAAQ,QAAQ,SAAS,QAAQ,QAAQ,QAAQ,QAAQ,QAAQ,SAAS,OAAO;AAAA,IAC3G;AAAA,IACA,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,GAC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AAAA,UAC/B,QAAQ;AAAA,UACR,QAAQ,CAAC,OAAO,KAAK;AAAA,UACrB,QAAQ;AAAA,UACR,cAAc,CAAC,EAAE,OAAO,MAAO,WAAW,QAAQ,EAAE,IAAI,MAAM,IAAI,EAAE,IAAI,OAAO;AAAA,UAC/E,UAAU;AAAA,UACV,GAAI,OAAO,YAAY,WAAW,UAAU,CAAC;AAAA,QAC/C;AAAA,QACA;AAAA,MACF,IACA;AAAA,IACN,CAAC;AAAA,EACH,GACA,OAAO,CAAC,MAAM,UAAU,OAAO,OAAO,CAAC,MACxC,iBAAiB,MAAM,uBAAuB,EAAE,QAAQ,GAAG,EAAE,QAAQ,YAAY,CAAC,IAAI,OACtF,oBAAoB,MAAM,uBAAuB,EAAE,QAAQ,GAAG,EAAE,QAAQ,eAAe,CAAC,IAAI,OAC5F,UAAU,MAAM,eAAe,IAAI;AAExC;","names":["entry","options"]}
|
package/package.json
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@types/yargs": "^17.0.25",
|
|
67
67
|
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
|
68
68
|
"@typescript-eslint/parser": "^6.7.3",
|
|
69
|
-
"@xylabs/tsconfig": "~3.0.
|
|
69
|
+
"@xylabs/tsconfig": "~3.0.72",
|
|
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.199",
|
|
112
112
|
"@types/parse-git-config": "^3.0.2",
|
|
113
|
-
"@xylabs/eslint-config": "^3.0.
|
|
114
|
-
"@xylabs/tsconfig": "^3.0.
|
|
113
|
+
"@xylabs/eslint-config": "^3.0.72",
|
|
114
|
+
"@xylabs/tsconfig": "^3.0.72",
|
|
115
115
|
"publint": "^0.2.2",
|
|
116
116
|
"typescript": "^5.2.2"
|
|
117
117
|
},
|
|
@@ -169,5 +169,5 @@
|
|
|
169
169
|
"package-clean": "echo Not cleaning..."
|
|
170
170
|
},
|
|
171
171
|
"sideEffects": false,
|
|
172
|
-
"version": "3.0.
|
|
172
|
+
"version": "3.0.72"
|
|
173
173
|
}
|
|
@@ -19,22 +19,11 @@ export type PackageCompileTsup2Params = Partial<
|
|
|
19
19
|
}
|
|
20
20
|
>
|
|
21
21
|
|
|
22
|
-
const stringOrArray = (value: string[] | string | undefined) => {
|
|
23
|
-
if (value === undefined) {
|
|
24
|
-
return undefined
|
|
25
|
-
}
|
|
26
|
-
if (Array.isArray(value)) {
|
|
27
|
-
return value
|
|
28
|
-
} else {
|
|
29
|
-
return [value]
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
22
|
const compileFolder = async (folder: string, options?: Options, _verbose?: boolean) => {
|
|
34
23
|
const outDir = options?.outDir ?? 'dist'
|
|
35
24
|
const entry = getAllInputs2(folder).filter((entry) => !entry.includes('.spec.') && !entry.includes('.story.'))
|
|
36
25
|
const optionsResult = defineConfig({
|
|
37
|
-
bundle:
|
|
26
|
+
bundle: true,
|
|
38
27
|
cjsInterop: true,
|
|
39
28
|
clean: true,
|
|
40
29
|
dts: false,
|
|
@@ -96,7 +85,7 @@ export const packageCompileTsup2 = async (params?: PackageCompileTsup2Params) =>
|
|
|
96
85
|
folder,
|
|
97
86
|
{
|
|
98
87
|
...(compile?.tsup?.options ?? {}),
|
|
99
|
-
bundle:
|
|
88
|
+
bundle: false,
|
|
100
89
|
format: ['esm', 'cjs'],
|
|
101
90
|
outDir: 'dist/browser',
|
|
102
91
|
outExtension: ({ format }) => (format === 'esm' ? { js: '.js' } : { js: '.cjs' }),
|