@naturalcycles/dev-lib 20.26.0 → 20.26.1

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.
@@ -73,7 +73,7 @@ export declare function runTSCInFolders(dirs: string[], args?: string[], paralle
73
73
  /**
74
74
  * Use 'src' to indicate root.
75
75
  */
76
- export declare function runTSGOInFolders(dirs: string[], args?: string[], parallel?: boolean): Promise<void>;
76
+ export declare function runTSGOInFolders(dirs: string[], args?: string[]): Promise<void>;
77
77
  export declare function runTSCProd(args?: string[]): Promise<void>;
78
78
  export declare function buildCopy(): void;
79
79
  interface RunTestOptions {
@@ -4,7 +4,7 @@ import { createRequire } from 'node:module';
4
4
  import path from 'node:path';
5
5
  import { _isTruthy } from '@naturalcycles/js-lib';
6
6
  import { _uniq } from '@naturalcycles/js-lib/array';
7
- import { _ms, _since } from '@naturalcycles/js-lib/datetime/time.util.js';
7
+ import { _since } from '@naturalcycles/js-lib/datetime/time.util.js';
8
8
  import { _assert } from '@naturalcycles/js-lib/error/assert.js';
9
9
  import { _filterFalsyValues } from '@naturalcycles/js-lib/object/object.util.js';
10
10
  import { semver2 } from '@naturalcycles/js-lib/semver';
@@ -110,7 +110,7 @@ export async function runCheck(opt = {}) {
110
110
  }
111
111
  console.log(`${check(true)}${white(`check`)} ${dimGrey(`took ` + _since(started))}`);
112
112
  for (const [job, ms] of _stringMapEntries(timings)) {
113
- console.log(`${job.padStart(12, ' ')}: ${String(_ms(ms)).padStart(10, ' ')}`);
113
+ console.log(`${job.padStart(12, ' ')}: ${String(ms).padStart(5, ' ')} ms`);
114
114
  }
115
115
  // if (needToTrackChanges) {
116
116
  // const gitStatusAfter = gitStatus()
@@ -376,6 +376,7 @@ export async function buildProd() {
376
376
  export async function typecheckWithTS() {
377
377
  if (hasDependencyInNodeModules('@typescript/native-preview')) {
378
378
  await typecheckWithTSGO();
379
+ return;
379
380
  }
380
381
  await typecheckWithTSC();
381
382
  }
@@ -423,14 +424,10 @@ async function runTSCInFolder(dir, args = []) {
423
424
  /**
424
425
  * Use 'src' to indicate root.
425
426
  */
426
- export async function runTSGOInFolders(dirs, args = [], parallel = true) {
427
- if (parallel) {
428
- await Promise.all(dirs.map(dir => runTSGOInFolder(dir, args)));
429
- }
430
- else {
431
- for (const dir of dirs) {
432
- await runTSGOInFolder(dir, args);
433
- }
427
+ export async function runTSGOInFolders(dirs, args = []) {
428
+ // Run sequential, since tsgo (unlike tsc) uses all cpu cores already
429
+ for (const dir of dirs) {
430
+ await runTSGOInFolder(dir, args);
434
431
  }
435
432
  }
436
433
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "20.26.0",
4
+ "version": "20.26.1",
5
5
  "dependencies": {
6
6
  "@biomejs/biome": "^2",
7
7
  "@eslint/js": "^9",