@trpc/upgrade 0.0.0-alpha.13 → 0.0.0-alpha.15
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 +3 -7
- package/package.json +1 -1
- package/src/bin/cli.ts +3 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var path = require('path');
|
|
3
2
|
var cli$1 = require('@effect/cli');
|
|
4
3
|
var platform = require('@effect/platform');
|
|
5
4
|
var platformNode = require('@effect/platform-node');
|
|
6
5
|
var effect = require('effect');
|
|
7
6
|
var typescript = require('typescript');
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
12
|
-
|
|
13
|
-
var version = "0.0.0-alpha.13";
|
|
8
|
+
var version = "0.0.0-alpha.14";
|
|
14
9
|
|
|
15
10
|
const MakeCommand = (command, ...args)=>{
|
|
16
11
|
return platform.Command.make(command, ...args).pipe(platform.Command.workingDirectory(process.cwd()), platform.Command.runInShell(true));
|
|
@@ -28,10 +23,11 @@ const uninstallPackage = (packageName)=>{
|
|
|
28
23
|
};
|
|
29
24
|
const filterIgnored = (files)=>effect.Effect.gen(function*() {
|
|
30
25
|
const ignores = yield* platform.Command.string(MakeCommand('git', 'check-ignore', '**/*').pipe(platform.Command.runInShell(true))).pipe(effect.Effect.tap((_)=>effect.Effect.logDebug('Ignored files output:', _)), effect.Effect.map((_)=>_.split('\n')));
|
|
26
|
+
yield* effect.Effect.logDebug('cwd:', process.cwd());
|
|
31
27
|
yield* effect.Effect.logDebug('All files in program:', files.map((_)=>_.fileName));
|
|
32
28
|
yield* effect.Effect.logDebug('Ignored files:', ignores);
|
|
33
29
|
// Ignore "common files"
|
|
34
|
-
const filteredSourcePaths = files.filter((source)=>source.fileName.startsWith(
|
|
30
|
+
const filteredSourcePaths = files.filter((source)=>source.fileName.startsWith(process.cwd()) && // only look ahead of current directory
|
|
35
31
|
!source.fileName.includes('/trpc/packages/') && // relative paths when running codemod locally
|
|
36
32
|
!ignores.includes(source.fileName)).map((source)=>source.fileName);
|
|
37
33
|
yield* effect.Effect.logDebug('Filtered files:', filteredSourcePaths);
|
package/package.json
CHANGED
package/src/bin/cli.ts
CHANGED
|
@@ -74,6 +74,8 @@ const filterIgnored = (files: readonly SourceFile[]) =>
|
|
|
74
74
|
Effect.map((_) => _.split('\n')),
|
|
75
75
|
);
|
|
76
76
|
|
|
77
|
+
yield* Effect.logDebug('cwd:', process.cwd());
|
|
78
|
+
|
|
77
79
|
yield* Effect.logDebug(
|
|
78
80
|
'All files in program:',
|
|
79
81
|
files.map((_) => _.fileName),
|
|
@@ -84,7 +86,7 @@ const filterIgnored = (files: readonly SourceFile[]) =>
|
|
|
84
86
|
const filteredSourcePaths = files
|
|
85
87
|
.filter(
|
|
86
88
|
(source) =>
|
|
87
|
-
source.fileName.startsWith(
|
|
89
|
+
source.fileName.startsWith(process.cwd()) && // only look ahead of current directory
|
|
88
90
|
!source.fileName.includes('/trpc/packages/') && // relative paths when running codemod locally
|
|
89
91
|
!ignores.includes(source.fileName), // ignored files
|
|
90
92
|
)
|