@xylabs/ts-scripts-yarn3 3.1.9 → 3.1.11

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.
@@ -28,7 +28,6 @@ const deploy = () => {
28
28
  ["yarn", "xy clean"],
29
29
  ["yarn", "xy build"],
30
30
  ["yarn", "xy cycle"],
31
- ["yarn", "xy gen-docs"],
32
31
  ["yarn", "version apply --all"],
33
32
  ["yarn", "workspaces foreach -pt npm publish"]
34
33
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/actions/deploy.ts"],"sourcesContent":["import { runSteps } from '../lib'\n\nexport const deploy = () => {\n return runSteps('Deploy [Patch]', [\n ['yarn', 'workspaces foreach --all version patch --deferred'],\n ['yarn', 'xy clean'],\n ['yarn', 'xy build'],\n ['yarn', 'xy cycle'],\n ['yarn', 'xy gen-docs'],\n ['yarn', 'version apply --all'],\n ['yarn', 'workspaces foreach -pt npm publish'],\n ])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAyB;AAElB,MAAM,SAAS,MAAM;AAC1B,aAAO,qBAAS,kBAAkB;AAAA,IAChC,CAAC,QAAQ,mDAAmD;AAAA,IAC5D,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,aAAa;AAAA,IACtB,CAAC,QAAQ,qBAAqB;AAAA,IAC9B,CAAC,QAAQ,oCAAoC;AAAA,EAC/C,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../src/actions/deploy.ts"],"sourcesContent":["import { runSteps } from '../lib'\n\nexport const deploy = () => {\n return runSteps('Deploy [Patch]', [\n ['yarn', 'workspaces foreach --all version patch --deferred'],\n ['yarn', 'xy clean'],\n ['yarn', 'xy build'],\n ['yarn', 'xy cycle'],\n ['yarn', 'version apply --all'],\n ['yarn', 'workspaces foreach -pt npm publish'],\n ])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAyB;AAElB,MAAM,SAAS,MAAM;AAC1B,aAAO,qBAAS,kBAAkB;AAAA,IAChC,CAAC,QAAQ,mDAAmD;AAAA,IAC5D,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,qBAAqB;AAAA,IAC9B,CAAC,QAAQ,oCAAoC;AAAA,EAC/C,CAAC;AACH;","names":[]}
@@ -5,7 +5,6 @@ const deploy = () => {
5
5
  ["yarn", "xy clean"],
6
6
  ["yarn", "xy build"],
7
7
  ["yarn", "xy cycle"],
8
- ["yarn", "xy gen-docs"],
9
8
  ["yarn", "version apply --all"],
10
9
  ["yarn", "workspaces foreach -pt npm publish"]
11
10
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/actions/deploy.ts"],"sourcesContent":["import { runSteps } from '../lib'\n\nexport const deploy = () => {\n return runSteps('Deploy [Patch]', [\n ['yarn', 'workspaces foreach --all version patch --deferred'],\n ['yarn', 'xy clean'],\n ['yarn', 'xy build'],\n ['yarn', 'xy cycle'],\n ['yarn', 'xy gen-docs'],\n ['yarn', 'version apply --all'],\n ['yarn', 'workspaces foreach -pt npm publish'],\n ])\n}\n"],"mappings":"AAAA,SAAS,gBAAgB;AAElB,MAAM,SAAS,MAAM;AAC1B,SAAO,SAAS,kBAAkB;AAAA,IAChC,CAAC,QAAQ,mDAAmD;AAAA,IAC5D,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,aAAa;AAAA,IACtB,CAAC,QAAQ,qBAAqB;AAAA,IAC9B,CAAC,QAAQ,oCAAoC;AAAA,EAC/C,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../src/actions/deploy.ts"],"sourcesContent":["import { runSteps } from '../lib'\n\nexport const deploy = () => {\n return runSteps('Deploy [Patch]', [\n ['yarn', 'workspaces foreach --all version patch --deferred'],\n ['yarn', 'xy clean'],\n ['yarn', 'xy build'],\n ['yarn', 'xy cycle'],\n ['yarn', 'version apply --all'],\n ['yarn', 'workspaces foreach -pt npm publish'],\n ])\n}\n"],"mappings":"AAAA,SAAS,gBAAgB;AAElB,MAAM,SAAS,MAAM;AAC1B,SAAO,SAAS,kBAAkB;AAAA,IAChC,CAAC,QAAQ,mDAAmD;AAAA,IAC5D,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,UAAU;AAAA,IACnB,CAAC,QAAQ,qBAAqB;AAAA,IAC9B,CAAC,QAAQ,oCAAoC;AAAA,EAC/C,CAAC;AACH;","names":[]}
@@ -21,7 +21,9 @@ __export(copyTypeFiles_exports, {
21
21
  copyTypeFiles: () => copyTypeFiles
22
22
  });
23
23
  module.exports = __toCommonJS(copyTypeFiles_exports);
24
+ var import_async_mutex = require("async-mutex");
24
25
  var import_promises = require("fs/promises");
26
+ const copyFileMutex = new import_async_mutex.Mutex();
25
27
  const getDistTypeFiles = async (compilerOptions) => {
26
28
  const outDir = compilerOptions.outDir ?? "dist";
27
29
  return (await (0, import_promises.readdir)(outDir, { recursive: true })).filter((file) => file.endsWith("d.ts")).map((file) => `${outDir}/${file}`);
@@ -31,20 +33,22 @@ const getDistTypeMapFiles = async (compilerOptions) => {
31
33
  return (await (0, import_promises.readdir)(outDir, { recursive: true })).filter((file) => file.endsWith("d.ts.map")).map((file) => `${outDir}/${file}`);
32
34
  };
33
35
  const copyTypeFiles = async (compilerOptions) => {
34
- const distTypeFiles = await getDistTypeFiles(compilerOptions);
35
- await Promise.all(
36
- distTypeFiles.map(async (file) => {
37
- await (0, import_promises.copyFile)(file, file.replace("d.ts", "d.mts"));
38
- await (0, import_promises.copyFile)(file, file.replace("d.ts", "d.cts"));
39
- })
40
- );
41
- const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions);
42
- await Promise.all(
43
- distTypeMapFiles.map(async (file) => {
44
- await (0, import_promises.copyFile)(file, file.replace("d.ts.map", "d.mts.map"));
45
- await (0, import_promises.copyFile)(file, file.replace("d.ts.map", "d.cts.map"));
46
- })
47
- );
36
+ await copyFileMutex.runExclusive(async () => {
37
+ const distTypeFiles = await getDistTypeFiles(compilerOptions);
38
+ await Promise.all(
39
+ distTypeFiles.map(async (file) => {
40
+ await (0, import_promises.copyFile)(file, file.replace("d.ts", "d.mts"));
41
+ await (0, import_promises.copyFile)(file, file.replace("d.ts", "d.cts"));
42
+ })
43
+ );
44
+ const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions);
45
+ await Promise.all(
46
+ distTypeMapFiles.map(async (file) => {
47
+ await (0, import_promises.copyFile)(file, file.replace("d.ts.map", "d.mts.map"));
48
+ await (0, import_promises.copyFile)(file, file.replace("d.ts.map", "d.cts.map"));
49
+ })
50
+ );
51
+ });
48
52
  };
49
53
  // Annotate the CommonJS export names for ESM import in node:
50
54
  0 && (module.exports = {
@@ -1 +1 @@
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 await copyFile(file, file.replace('d.ts', 'd.cts'))\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 await copyFile(file, file.replace('d.ts.map', 'd.cts.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;AAClD,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;AAC1D,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 { Mutex } from 'async-mutex'\nimport { copyFile, readdir } from 'fs/promises'\nimport { TsConfigCompilerOptions } from 'tsc-prog'\n\nconst copyFileMutex = new Mutex()\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 //using a mutex since sometimes two compiles are running at once and cause a lock on windows\n await copyFileMutex.runExclusive(async () => {\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 await copyFile(file, file.replace('d.ts', 'd.cts'))\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 await copyFile(file, file.replace('d.ts.map', 'd.cts.map'))\n }),\n )\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAsB;AACtB,sBAAkC;AAGlC,MAAM,gBAAgB,IAAI,yBAAM;AAEhC,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,cAAc,aAAa,YAAY;AAE3C,UAAM,gBAAgB,MAAM,iBAAiB,eAAe;AAC5D,UAAM,QAAQ;AAAA,MACZ,cAAc,IAAI,OAAO,SAAS;AAChC,kBAAM,0BAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAClD,kBAAM,0BAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,MACpD,CAAC;AAAA,IACH;AAEA,UAAM,mBAAmB,MAAM,oBAAoB,eAAe;AAClE,UAAM,QAAQ;AAAA,MACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,kBAAM,0BAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAC1D,kBAAM,0BAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,MAC5D,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,4 +1,6 @@
1
+ import { Mutex } from "async-mutex";
1
2
  import { copyFile, readdir } from "fs/promises";
3
+ const copyFileMutex = new Mutex();
2
4
  const getDistTypeFiles = async (compilerOptions) => {
3
5
  const outDir = compilerOptions.outDir ?? "dist";
4
6
  return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith("d.ts")).map((file) => `${outDir}/${file}`);
@@ -8,20 +10,22 @@ const getDistTypeMapFiles = async (compilerOptions) => {
8
10
  return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith("d.ts.map")).map((file) => `${outDir}/${file}`);
9
11
  };
10
12
  const copyTypeFiles = async (compilerOptions) => {
11
- const distTypeFiles = await getDistTypeFiles(compilerOptions);
12
- await Promise.all(
13
- distTypeFiles.map(async (file) => {
14
- await copyFile(file, file.replace("d.ts", "d.mts"));
15
- await copyFile(file, file.replace("d.ts", "d.cts"));
16
- })
17
- );
18
- const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions);
19
- await Promise.all(
20
- distTypeMapFiles.map(async (file) => {
21
- await copyFile(file, file.replace("d.ts.map", "d.mts.map"));
22
- await copyFile(file, file.replace("d.ts.map", "d.cts.map"));
23
- })
24
- );
13
+ await copyFileMutex.runExclusive(async () => {
14
+ const distTypeFiles = await getDistTypeFiles(compilerOptions);
15
+ await Promise.all(
16
+ distTypeFiles.map(async (file) => {
17
+ await copyFile(file, file.replace("d.ts", "d.mts"));
18
+ await copyFile(file, file.replace("d.ts", "d.cts"));
19
+ })
20
+ );
21
+ const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions);
22
+ await Promise.all(
23
+ distTypeMapFiles.map(async (file) => {
24
+ await copyFile(file, file.replace("d.ts.map", "d.mts.map"));
25
+ await copyFile(file, file.replace("d.ts.map", "d.cts.map"));
26
+ })
27
+ );
28
+ });
25
29
  };
26
30
  export {
27
31
  copyTypeFiles
@@ -1 +1 @@
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 await copyFile(file, file.replace('d.ts', 'd.cts'))\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 await copyFile(file, file.replace('d.ts.map', 'd.cts.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;AAClD,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;AAC1D,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 { Mutex } from 'async-mutex'\nimport { copyFile, readdir } from 'fs/promises'\nimport { TsConfigCompilerOptions } from 'tsc-prog'\n\nconst copyFileMutex = new Mutex()\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 //using a mutex since sometimes two compiles are running at once and cause a lock on windows\n await copyFileMutex.runExclusive(async () => {\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 await copyFile(file, file.replace('d.ts', 'd.cts'))\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 await copyFile(file, file.replace('d.ts.map', 'd.cts.map'))\n }),\n )\n })\n}\n"],"mappings":"AAAA,SAAS,aAAa;AACtB,SAAS,UAAU,eAAe;AAGlC,MAAM,gBAAgB,IAAI,MAAM;AAEhC,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,cAAc,aAAa,YAAY;AAE3C,UAAM,gBAAgB,MAAM,iBAAiB,eAAe;AAC5D,UAAM,QAAQ;AAAA,MACZ,cAAc,IAAI,OAAO,SAAS;AAChC,cAAM,SAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAClD,cAAM,SAAS,MAAM,KAAK,QAAQ,QAAQ,OAAO,CAAC;AAAA,MACpD,CAAC;AAAA,IACH;AAEA,UAAM,mBAAmB,MAAM,oBAAoB,eAAe;AAClE,UAAM,QAAQ;AAAA,MACZ,iBAAiB,IAAI,OAAO,SAAS;AACnC,cAAM,SAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAC1D,cAAM,SAAS,MAAM,KAAK,QAAQ,YAAY,WAAW,CAAC;AAAA,MAC5D,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
package/package.json CHANGED
@@ -64,9 +64,11 @@
64
64
  "@types/yargs": "^17.0.26",
65
65
  "@typescript-eslint/eslint-plugin": "^6.7.3",
66
66
  "@typescript-eslint/parser": "^6.7.3",
67
- "@xylabs/tsconfig": "~3.1.9",
67
+ "@xylabs/tsconfig": "~3.1.11",
68
+ "async-mutex": "^0.4.0",
68
69
  "chalk": "^4.1.2",
69
70
  "cosmiconfig": "^8.3.6",
71
+ "cosmiconfig-typescript-loader": "^5.0.0",
70
72
  "cpy": "^8.1.2",
71
73
  "depcheck": "^1.4.6",
72
74
  "eslint": "^8.50.0",
@@ -109,8 +111,8 @@
109
111
  "@types/license-checker": "^25.0.4",
110
112
  "@types/lodash": "^4.14.199",
111
113
  "@types/parse-git-config": "^3.0.2",
112
- "@xylabs/eslint-config": "^3.1.9",
113
- "@xylabs/tsconfig": "^3.1.9",
114
+ "@xylabs/eslint-config": "^3.1.11",
115
+ "@xylabs/tsconfig": "^3.1.11",
114
116
  "publint": "^0.2.3",
115
117
  "typescript": "^5.2.2"
116
118
  },
@@ -144,9 +146,6 @@
144
146
  "./cjs": {
145
147
  "default": "./dist/index.js"
146
148
  },
147
- "./docs": {
148
- "default": "./dist/docs.json"
149
- },
150
149
  "./esm": {
151
150
  "default": "./dist/index.mjs"
152
151
  },
@@ -169,5 +168,5 @@
169
168
  "package-clean": "echo Not cleaning..."
170
169
  },
171
170
  "sideEffects": false,
172
- "version": "3.1.9"
171
+ "version": "3.1.11"
173
172
  }
@@ -6,7 +6,6 @@ export const deploy = () => {
6
6
  ['yarn', 'xy clean'],
7
7
  ['yarn', 'xy build'],
8
8
  ['yarn', 'xy cycle'],
9
- ['yarn', 'xy gen-docs'],
10
9
  ['yarn', 'version apply --all'],
11
10
  ['yarn', 'workspaces foreach -pt npm publish'],
12
11
  ])
@@ -1,6 +1,9 @@
1
+ import { Mutex } from 'async-mutex'
1
2
  import { copyFile, readdir } from 'fs/promises'
2
3
  import { TsConfigCompilerOptions } from 'tsc-prog'
3
4
 
5
+ const copyFileMutex = new Mutex()
6
+
4
7
  const getDistTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {
5
8
  const outDir = compilerOptions.outDir ?? 'dist'
6
9
  return (await readdir(outDir, { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `${outDir}/${file}`)
@@ -12,20 +15,23 @@ const getDistTypeMapFiles = async (compilerOptions: TsConfigCompilerOptions) =>
12
15
  }
13
16
 
14
17
  export const copyTypeFiles = async (compilerOptions: TsConfigCompilerOptions) => {
15
- //hybrid packages want two copies of the types
16
- const distTypeFiles = await getDistTypeFiles(compilerOptions)
17
- await Promise.all(
18
- distTypeFiles.map(async (file) => {
19
- await copyFile(file, file.replace('d.ts', 'd.mts'))
20
- await copyFile(file, file.replace('d.ts', 'd.cts'))
21
- }),
22
- )
18
+ //using a mutex since sometimes two compiles are running at once and cause a lock on windows
19
+ await copyFileMutex.runExclusive(async () => {
20
+ //hybrid packages want two copies of the types
21
+ const distTypeFiles = await getDistTypeFiles(compilerOptions)
22
+ await Promise.all(
23
+ distTypeFiles.map(async (file) => {
24
+ await copyFile(file, file.replace('d.ts', 'd.mts'))
25
+ await copyFile(file, file.replace('d.ts', 'd.cts'))
26
+ }),
27
+ )
23
28
 
24
- const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)
25
- await Promise.all(
26
- distTypeMapFiles.map(async (file) => {
27
- await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))
28
- await copyFile(file, file.replace('d.ts.map', 'd.cts.map'))
29
- }),
30
- )
29
+ const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions)
30
+ await Promise.all(
31
+ distTypeMapFiles.map(async (file) => {
32
+ await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))
33
+ await copyFile(file, file.replace('d.ts.map', 'd.cts.map'))
34
+ }),
35
+ )
36
+ })
31
37
  }