@naturalcycles/dev-lib 20.0.7 → 20.0.8

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.
@@ -29,8 +29,8 @@ const testFiles = ['**/*.test.ts', '**/*.test.tsx', '**/*.test.cts', '**/*.test.
29
29
 
30
30
  const cwd = process.cwd()
31
31
  const tsconfigSrcPath = `${cwd}/tsconfig.json`
32
- const tsconfigScriptsPath = `${cwd}/tsconfig.scripts.json`
33
- const tsconfigE2ePath = `${cwd}/tsconfig.e2e.json`
32
+ const tsconfigScriptsPath = `${cwd}/scripts/tsconfig.json`
33
+ const tsconfigE2ePath = `${cwd}/e2e/tsconfig.json`
34
34
 
35
35
  const config = getEslintConfigForDir()
36
36
  export default config
@@ -4,13 +4,13 @@
4
4
  {
5
5
  "extends": "./tsconfig.src.json",
6
6
  "compilerOptions": {
7
- "rootDir": "${configDir}",
8
- "baseUrl": "${configDir}",
9
- "outDir": "${configDir}/dist/e2e",
7
+ "rootDir": "${configDir}/..",
8
+ "baseUrl": "${configDir}/..",
9
+ "outDir": "${configDir}/../dist/e2e",
10
10
  "paths": {
11
- "@src/*": ["${configDir}/src/*"]
11
+ "@src/*": ["${configDir}/../src/*"]
12
12
  },
13
- "tsBuildInfoFile": "${configDir}/node_modules/.cache/e2e.tsbuildinfo",
13
+ "tsBuildInfoFile": "${configDir}/../node_modules/.cache/e2e.tsbuildinfo",
14
14
  "module": "esnext",
15
15
  "moduleResolution": "bundler",
16
16
  "lib": ["esnext", "dom", "dom.iterable"]
@@ -21,5 +21,5 @@
21
21
  // "@src/*": ["./src/*"],
22
22
  // },
23
23
  },
24
- "include": ["${configDir}/e2e"]
24
+ "include": ["${configDir}"]
25
25
  }
@@ -4,13 +4,13 @@
4
4
  {
5
5
  "extends": "./tsconfig.src.json",
6
6
  "compilerOptions": {
7
- "rootDir": "${configDir}",
8
- "baseUrl": "${configDir}",
9
- "outDir": "${configDir}/dist/scripts",
7
+ "rootDir": "${configDir}/..",
8
+ "baseUrl": "${configDir}/..",
9
+ "outDir": "${configDir}/../dist/scripts",
10
10
  "paths": {
11
- "@src/*": ["${configDir}/src/*"]
11
+ "@src/*": ["${configDir}/../src/*"]
12
12
  },
13
- "tsBuildInfoFile": "${configDir}/node_modules/.cache/scripts.tsbuildinfo"
13
+ "tsBuildInfoFile": "${configDir}/../node_modules/.cache/scripts.tsbuildinfo"
14
14
  },
15
- "include": ["${configDir}/scripts"]
15
+ "include": ["${configDir}"]
16
16
  }
@@ -2,7 +2,7 @@ export declare function buildProd(): Promise<void>;
2
2
  /**
3
3
  * Use 'src' to indicate root.
4
4
  */
5
- export declare function runTSCInFolders(tsconfigPaths: string[], args?: string[], parallel?: boolean): Promise<void>;
5
+ export declare function runTSCInFolders(dirs: string[], args?: string[], parallel?: boolean): Promise<void>;
6
6
  /**
7
7
  * Pass 'src' to run in root.
8
8
  */
@@ -12,13 +12,13 @@ export async function buildProd() {
12
12
  /**
13
13
  * Use 'src' to indicate root.
14
14
  */
15
- export async function runTSCInFolders(tsconfigPaths, args = [], parallel = true) {
15
+ export async function runTSCInFolders(dirs, args = [], parallel = true) {
16
16
  if (parallel) {
17
- await Promise.all(tsconfigPaths.map(p => runTSCInFolder(p, args)));
17
+ await Promise.all(dirs.map(dir => runTSCInFolder(dir, args)));
18
18
  }
19
19
  else {
20
- for (const p of tsconfigPaths) {
21
- await runTSCInFolder(p, args);
20
+ for (const dir of dirs) {
21
+ await runTSCInFolder(dir, args);
22
22
  }
23
23
  }
24
24
  }
@@ -26,11 +26,11 @@ export async function runTSCInFolders(tsconfigPaths, args = [], parallel = true)
26
26
  * Pass 'src' to run in root.
27
27
  */
28
28
  export async function runTSCInFolder(dir, args = []) {
29
- let mod = dir;
29
+ let configDir = dir;
30
30
  if (dir === 'src') {
31
- mod = '';
31
+ configDir = '';
32
32
  }
33
- const tsconfigPath = ['tsconfig', mod, `json`].filter(Boolean).join('.');
33
+ const tsconfigPath = [configDir, 'tsconfig.json'].filter(Boolean).join('/');
34
34
  if (!fs2.pathExists(tsconfigPath) || !fs2.pathExists(dir)) {
35
35
  // console.log(`Skipping to run tsc for ${tsconfigPath}, as it doesn't exist`)
36
36
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "20.0.7",
4
+ "version": "20.0.8",
5
5
  "dependencies": {
6
6
  "@biomejs/biome": "^2",
7
7
  "@commitlint/cli": "^19",
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../cfg/tsconfig.scripts.json",
3
+ "compilerOptions": {}
4
+ }