@neurodevs/meta-node 0.19.8 → 0.19.9
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/build/impl/NpmWorkspaceTypeChecker.js +11 -7
- package/build/impl/NpmWorkspaceTypeChecker.js.map +1 -1
- package/build/scripts/runNpmWorkspaceTypeChecker.d.ts +1 -0
- package/build/scripts/runNpmWorkspaceTypeChecker.js +4 -0
- package/build/scripts/runNpmWorkspaceTypeChecker.js.map +1 -0
- package/package.json +1 -1
- package/src/impl/NpmWorkspaceTypeChecker.ts +24 -15
- package/src/scripts/runNpmWorkspaceTypeChecker.ts +4 -0
|
@@ -14,25 +14,29 @@ export default class NpmWorkspaceTypeChecker {
|
|
|
14
14
|
return new (this.Class ?? this)(workspacePath);
|
|
15
15
|
}
|
|
16
16
|
async run() {
|
|
17
|
-
console.info('Starting type checking... \n');
|
|
18
17
|
const repoNames = await this.readDir(this.workspacePath, {
|
|
19
18
|
withFileTypes: true,
|
|
20
19
|
});
|
|
21
|
-
await Promise.all(repoNames.map(async (repoName) => {
|
|
20
|
+
const repoPaths = (await Promise.all(repoNames.map(async (repoName) => {
|
|
22
21
|
if (!repoName.isDirectory()) {
|
|
23
22
|
return;
|
|
24
23
|
}
|
|
25
|
-
const
|
|
26
|
-
const repoContents = await this.readDir(
|
|
24
|
+
const repoPath = join(this.workspacePath, repoName.name);
|
|
25
|
+
const repoContents = await this.readDir(repoPath);
|
|
27
26
|
if (!repoContents.includes('tsconfig.json')) {
|
|
28
27
|
return;
|
|
29
28
|
}
|
|
30
|
-
|
|
29
|
+
return repoPath;
|
|
30
|
+
}))).filter((p) => Boolean(p));
|
|
31
|
+
console.info(`\nChecking types for the following repos:\n\n${repoPaths
|
|
32
|
+
.map((r) => ` ${r}`)
|
|
33
|
+
.join('\n')}\n`);
|
|
34
|
+
await Promise.all(repoPaths.map(async (repoPath) => {
|
|
31
35
|
try {
|
|
32
|
-
await this.exec('npx tsc --noEmit', { cwd:
|
|
36
|
+
await this.exec('npx tsc --noEmit', { cwd: repoPath });
|
|
33
37
|
}
|
|
34
38
|
catch {
|
|
35
|
-
console.error(`Type errors found in ${
|
|
39
|
+
console.error(`Type errors found in ${repoPath}!`);
|
|
36
40
|
}
|
|
37
41
|
}));
|
|
38
42
|
console.info('\nType checking completed!\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NpmWorkspaceTypeChecker.js","sourceRoot":"","sources":["../../src/impl/NpmWorkspaceTypeChecker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,MAAM,CAAC,OAAO,OAAO,uBAAuB;IACjC,MAAM,CAAC,KAAK,CAAkC;IAC9C,MAAM,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;IAEhC,aAAa,CAAQ;IAE7B,YAAsB,aAAqB;QACvC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACtC,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,aAAqB;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,aAAa,CAAC,CAAA;IAClD,CAAC;IAEM,KAAK,CAAC,GAAG;QACZ,
|
|
1
|
+
{"version":3,"file":"NpmWorkspaceTypeChecker.js","sourceRoot":"","sources":["../../src/impl/NpmWorkspaceTypeChecker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,IAAI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AAI,CACR,gDAAgD,SAAS;aACpD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;aACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CACtB,CAAA;QAED,MAAM,OAAO,CAAC,GAAG,CACb,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAC7B,IAAI,CAAC;gBACD,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAA;YAC1D,CAAC;YAAC,MAAM,CAAC;gBACL,OAAO,CAAC,KAAK,CAAC,wBAAwB,QAAQ,GAAG,CAAC,CAAA;YACtD,CAAC;QACL,CAAC,CAAC,CACL,CAAA;QAED,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA;IAChD,CAAC;IAED,IAAY,OAAO;QACf,OAAO,uBAAuB,CAAC,OAAO,CAAA;IAC1C,CAAC;IACD,IAAY,IAAI;QACZ,OAAO,uBAAuB,CAAC,IAAI,CAAA;IACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runNpmWorkspaceTypeChecker.js","sourceRoot":"","sources":["../../src/scripts/runNpmWorkspaceTypeChecker.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,MAAM,oCAAoC,CAAA;AAExE,MAAM,OAAO,GAAG,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACrD,MAAM,OAAO,CAAC,GAAG,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -19,31 +19,40 @@ export default class NpmWorkspaceTypeChecker implements WorkspaceTypeChecker {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
public async run() {
|
|
22
|
-
console.info('Starting type checking... \n')
|
|
23
22
|
const repoNames = await this.readDir(this.workspacePath, {
|
|
24
23
|
withFileTypes: true,
|
|
25
24
|
})
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const fullRepoPath = join(this.workspacePath, repoName.name)
|
|
26
|
+
const repoPaths = (
|
|
27
|
+
await Promise.all(
|
|
28
|
+
repoNames.map(async (repoName) => {
|
|
29
|
+
if (!repoName.isDirectory()) {
|
|
30
|
+
return
|
|
31
|
+
}
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
const repoPath = join(this.workspacePath, repoName.name)
|
|
34
|
+
const repoContents = await this.readDir(repoPath)
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
if (!repoContents.includes('tsconfig.json')) {
|
|
37
|
+
return
|
|
38
|
+
}
|
|
39
|
+
return repoPath
|
|
40
|
+
})
|
|
41
|
+
)
|
|
42
|
+
).filter((p): p is string => Boolean(p))
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
console.info(
|
|
45
|
+
`\nChecking types for the following repos:\n\n${repoPaths
|
|
46
|
+
.map((r) => ` ${r}`)
|
|
47
|
+
.join('\n')}\n`
|
|
48
|
+
)
|
|
42
49
|
|
|
50
|
+
await Promise.all(
|
|
51
|
+
repoPaths.map(async (repoPath) => {
|
|
43
52
|
try {
|
|
44
|
-
await this.exec('npx tsc --noEmit', { cwd:
|
|
53
|
+
await this.exec('npx tsc --noEmit', { cwd: repoPath })
|
|
45
54
|
} catch {
|
|
46
|
-
console.error(`Type errors found in ${
|
|
55
|
+
console.error(`Type errors found in ${repoPath}!`)
|
|
47
56
|
}
|
|
48
57
|
})
|
|
49
58
|
)
|