@trpc/upgrade 0.0.0-alpha.15 → 0.0.0-alpha.16
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 +8 -2
- package/package.json +1 -1
- package/src/bin/cli.ts +3 -2
package/dist/cli.cjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
var path = require('node:path');
|
|
2
3
|
var cli$1 = require('@effect/cli');
|
|
3
4
|
var platform = require('@effect/platform');
|
|
4
5
|
var platformNode = require('@effect/platform-node');
|
|
5
6
|
var effect = require('effect');
|
|
6
7
|
var typescript = require('typescript');
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
12
|
+
|
|
13
|
+
var version = "0.0.0-alpha.15";
|
|
9
14
|
|
|
10
15
|
const MakeCommand = (command, ...args)=>{
|
|
11
16
|
return platform.Command.make(command, ...args).pipe(platform.Command.workingDirectory(process.cwd()), platform.Command.runInShell(true));
|
|
@@ -27,8 +32,9 @@ const filterIgnored = (files)=>effect.Effect.gen(function*() {
|
|
|
27
32
|
yield* effect.Effect.logDebug('All files in program:', files.map((_)=>_.fileName));
|
|
28
33
|
yield* effect.Effect.logDebug('Ignored files:', ignores);
|
|
29
34
|
// Ignore "common files"
|
|
30
|
-
const filteredSourcePaths = files.filter((source)=>source.fileName.startsWith(
|
|
35
|
+
const filteredSourcePaths = files.filter((source)=>source.fileName.startsWith(path__default.default.resolve()) && // only look ahead of current directory
|
|
31
36
|
!source.fileName.includes('/trpc/packages/') && // relative paths when running codemod locally
|
|
37
|
+
!source.fileName.includes('/node_modules/') && // always ignore node_modules
|
|
32
38
|
!ignores.includes(source.fileName)).map((source)=>source.fileName);
|
|
33
39
|
yield* effect.Effect.logDebug('Filtered files:', filteredSourcePaths);
|
|
34
40
|
return filteredSourcePaths;
|
package/package.json
CHANGED
package/src/bin/cli.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
|
-
import path from 'path';
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
import { Command as CLICommand, Options, Prompt } from '@effect/cli';
|
|
4
4
|
import { Command } from '@effect/platform';
|
|
5
5
|
import { NodeContext, NodeRuntime } from '@effect/platform-node';
|
|
@@ -86,8 +86,9 @@ const filterIgnored = (files: readonly SourceFile[]) =>
|
|
|
86
86
|
const filteredSourcePaths = files
|
|
87
87
|
.filter(
|
|
88
88
|
(source) =>
|
|
89
|
-
source.fileName.startsWith(
|
|
89
|
+
source.fileName.startsWith(path.resolve()) && // only look ahead of current directory
|
|
90
90
|
!source.fileName.includes('/trpc/packages/') && // relative paths when running codemod locally
|
|
91
|
+
!source.fileName.includes('/node_modules/') && // always ignore node_modules
|
|
91
92
|
!ignores.includes(source.fileName), // ignored files
|
|
92
93
|
)
|
|
93
94
|
.map((source) => source.fileName);
|