@trpc/upgrade 0.0.0-alpha.3 → 0.0.0-alpha.4
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/dist/cli.cjs +4 -4
- package/package.json +1 -1
- package/src/bin/cli.ts +3 -3
package/dist/cli.cjs
CHANGED
|
@@ -10,7 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
10
10
|
|
|
11
11
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
12
12
|
|
|
13
|
-
var version = "0.0.0-alpha.
|
|
13
|
+
var version = "0.0.0-alpha.4";
|
|
14
14
|
|
|
15
15
|
const assertCleanGitTree = platform.Command.string(platform.Command.make('git', 'status')).pipe(effect.Effect.filterOrFail(effect.String.includes('nothing to commit'), ()=>'Git tree is not clean, please commit your changes and try again, or run with `--force`'));
|
|
16
16
|
const installPackage = (packageName)=>{
|
|
@@ -19,13 +19,13 @@ const installPackage = (packageName)=>{
|
|
|
19
19
|
};
|
|
20
20
|
const filterIgnored = (files)=>effect.Effect.gen(function*() {
|
|
21
21
|
const ignores = yield* platform.Command.string(platform.Command.make('git', 'check-ignore', '**/*')).pipe(effect.Effect.map((_)=>_.split('\n')));
|
|
22
|
-
yield* effect.Effect.
|
|
23
|
-
yield* effect.Effect.
|
|
22
|
+
yield* effect.Effect.logDebug('All files in program:', files.map((_)=>_.fileName));
|
|
23
|
+
yield* effect.Effect.logDebug('Ignored files:', ignores);
|
|
24
24
|
// Ignore "common files"
|
|
25
25
|
const filteredSourcePaths = files.filter((source)=>source.fileName.startsWith(path__default.default.resolve()) && // only look ahead of current directory
|
|
26
26
|
!source.fileName.includes('/trpc/packages/') && // relative paths when running codemod locally
|
|
27
27
|
!ignores.includes(source.fileName)).map((source)=>source.fileName);
|
|
28
|
-
yield* effect.Effect.
|
|
28
|
+
yield* effect.Effect.logDebug('Filtered files:', filteredSourcePaths);
|
|
29
29
|
return filteredSourcePaths;
|
|
30
30
|
});
|
|
31
31
|
const TSProgram = effect.Effect.succeed(typescript.findConfigFile(process.cwd(), typescript.sys.fileExists)).pipe(effect.Effect.filterOrFail(effect.Predicate.isNotNullable, ()=>'No tsconfig found'), effect.Effect.tap((_)=>effect.Effect.logDebug('Using tsconfig', _)), effect.Effect.map((_)=>typescript.readConfigFile(_, typescript.sys.readFile)), effect.Effect.map((_)=>typescript.parseJsonConfigFileContent(_.config, typescript.sys, process.cwd())), effect.Effect.map((_)=>typescript.createProgram({
|
package/package.json
CHANGED
package/src/bin/cli.ts
CHANGED
|
@@ -52,11 +52,11 @@ const filterIgnored = (files: readonly SourceFile[]) =>
|
|
|
52
52
|
Command.make('git', 'check-ignore', '**/*'),
|
|
53
53
|
).pipe(Effect.map((_) => _.split('\n')));
|
|
54
54
|
|
|
55
|
-
yield* Effect.
|
|
55
|
+
yield* Effect.logDebug(
|
|
56
56
|
'All files in program:',
|
|
57
57
|
files.map((_) => _.fileName),
|
|
58
58
|
);
|
|
59
|
-
yield* Effect.
|
|
59
|
+
yield* Effect.logDebug('Ignored files:', ignores);
|
|
60
60
|
|
|
61
61
|
// Ignore "common files"
|
|
62
62
|
const filteredSourcePaths = files
|
|
@@ -68,7 +68,7 @@ const filterIgnored = (files: readonly SourceFile[]) =>
|
|
|
68
68
|
)
|
|
69
69
|
.map((source) => source.fileName);
|
|
70
70
|
|
|
71
|
-
yield* Effect.
|
|
71
|
+
yield* Effect.logDebug('Filtered files:', filteredSourcePaths);
|
|
72
72
|
|
|
73
73
|
return filteredSourcePaths;
|
|
74
74
|
});
|