type-rename-move 0.0.1 → 0.14.0

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.
Files changed (174) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/dist/bin/trmv-compliance.js +4 -0
  4. package/dist/bin/trmv-config.js +4 -0
  5. package/dist/bin/trmv-doctor.js +4 -0
  6. package/dist/bin/trmv-mock-lint.js +4 -0
  7. package/dist/bin/trmv-refactor.js +4 -0
  8. package/dist/bin/trmv-typecheck.js +4 -0
  9. package/dist/changes/index.d.ts +24 -0
  10. package/dist/changes/index.js +112 -0
  11. package/dist/cli/index.d.ts +4 -0
  12. package/dist/cli/index.js +36 -0
  13. package/dist/config/command.d.ts +20 -0
  14. package/dist/config/command.js +68 -0
  15. package/dist/config/error.d.ts +3 -0
  16. package/dist/config/error.js +4 -0
  17. package/dist/config/files.d.ts +6 -0
  18. package/dist/config/files.js +29 -0
  19. package/dist/config/format.d.ts +25 -0
  20. package/dist/config/format.js +172 -0
  21. package/dist/config/index.d.ts +73 -0
  22. package/dist/config/index.js +239 -0
  23. package/dist/config/read.d.ts +4 -0
  24. package/dist/config/read.js +37 -0
  25. package/dist/contract/data/CONTRACT_HASH +1 -0
  26. package/dist/contract/data/README.md +69 -0
  27. package/dist/contract/data/cli.yaml +239 -0
  28. package/dist/contract/data/config.yaml +8 -0
  29. package/dist/contract/data/findings.yaml +212 -0
  30. package/dist/contract/data/languages.yaml +146 -0
  31. package/dist/contract/data/regex-subset.md +28 -0
  32. package/dist/contract/data/schema/rename-map.schema.json +51 -0
  33. package/dist/contract/data/schema/trmv.schema.json +92 -0
  34. package/dist/contract/data/schema/word-table.schema.json +55 -0
  35. package/dist/contract/data/vectors/cli.yaml +216 -0
  36. package/dist/contract/data/vectors/command-split.yaml +69 -0
  37. package/dist/contract/data/vectors/diff.yaml +287 -0
  38. package/dist/contract/data/vectors/format.yaml +160 -0
  39. package/dist/contract/data/vectors/glob.yaml +148 -0
  40. package/dist/contract/data/vectors/materialize.yaml +51 -0
  41. package/dist/contract/data/vectors/os-errors.yaml +123 -0
  42. package/dist/contract/data/vectors/refactor-symbols.yaml +220 -0
  43. package/dist/contract/data/vectors/refactor-text.yaml +186 -0
  44. package/dist/contract/data/vectors/refactor-words.yaml +83 -0
  45. package/dist/contract/data/vectors/regex-subset.yaml +40 -0
  46. package/dist/contract/data/vectors/repr.yaml +118 -0
  47. package/dist/contract/data/vectors/skill-leaks.yaml +6 -0
  48. package/dist/contract/data/vectors/test-files.yaml +135 -0
  49. package/dist/contract/data/vectors/yaml.yaml +858 -0
  50. package/dist/contract/glob.d.ts +3 -0
  51. package/dist/contract/glob.js +49 -0
  52. package/dist/contract/index.d.ts +13 -0
  53. package/dist/contract/index.js +14 -0
  54. package/dist/contract/json.d.ts +1 -0
  55. package/dist/contract/json.js +43 -0
  56. package/dist/contract/os-error.d.ts +13 -0
  57. package/dist/contract/os-error.js +66 -0
  58. package/dist/contract/parser.d.ts +18 -0
  59. package/dist/contract/parser.js +207 -0
  60. package/dist/contract/plugin.d.ts +5 -0
  61. package/dist/contract/plugin.js +90 -0
  62. package/dist/contract/regex.d.ts +5 -0
  63. package/dist/contract/regex.js +116 -0
  64. package/dist/contract/render.d.ts +3 -0
  65. package/dist/contract/render.js +19 -0
  66. package/dist/contract/schema.d.ts +10 -0
  67. package/dist/contract/schema.js +139 -0
  68. package/dist/contract/snapshot.d.ts +47 -0
  69. package/dist/contract/snapshot.js +129 -0
  70. package/dist/contract/text.d.ts +14 -0
  71. package/dist/contract/text.js +56 -0
  72. package/dist/contract/values.d.ts +24 -0
  73. package/dist/contract/values.js +127 -0
  74. package/dist/contract/which.d.ts +4 -0
  75. package/dist/contract/which.js +27 -0
  76. package/dist/contract/yaml.d.ts +11 -0
  77. package/dist/contract/yaml.js +595 -0
  78. package/dist/doctor/index.d.ts +3 -0
  79. package/dist/doctor/index.js +69 -0
  80. package/dist/index.d.ts +2 -0
  81. package/dist/index.js +5 -0
  82. package/dist/lang/conventions.d.ts +33 -0
  83. package/dist/lang/conventions.js +216 -0
  84. package/dist/lang/edges.d.ts +2 -0
  85. package/dist/lang/edges.js +142 -0
  86. package/dist/lang/files.d.ts +28 -0
  87. package/dist/lang/files.js +122 -0
  88. package/dist/lang/imports.d.ts +3 -0
  89. package/dist/lang/imports.js +64 -0
  90. package/dist/lang/index.d.ts +13 -0
  91. package/dist/lang/index.js +18 -0
  92. package/dist/lang/lines.d.ts +21 -0
  93. package/dist/lang/lines.js +96 -0
  94. package/dist/lang/projects.d.ts +30 -0
  95. package/dist/lang/projects.js +115 -0
  96. package/dist/lang/specifiers.d.ts +7 -0
  97. package/dist/lang/specifiers.js +88 -0
  98. package/dist/lang/ts.d.ts +2 -0
  99. package/dist/lang/ts.js +7 -0
  100. package/dist/lang/tsc.d.ts +32 -0
  101. package/dist/lang/tsc.js +130 -0
  102. package/dist/lang/types.d.ts +27 -0
  103. package/dist/lang/types.js +4 -0
  104. package/dist/refactor/baseline.d.ts +13 -0
  105. package/dist/refactor/baseline.js +148 -0
  106. package/dist/refactor/bindings.d.ts +76 -0
  107. package/dist/refactor/bindings.js +594 -0
  108. package/dist/refactor/carve.d.ts +31 -0
  109. package/dist/refactor/carve.js +145 -0
  110. package/dist/refactor/compliance.d.ts +15 -0
  111. package/dist/refactor/compliance.js +161 -0
  112. package/dist/refactor/compound.d.ts +5 -0
  113. package/dist/refactor/compound.js +40 -0
  114. package/dist/refactor/diff.d.ts +2 -0
  115. package/dist/refactor/diff.js +170 -0
  116. package/dist/refactor/edits.d.ts +16 -0
  117. package/dist/refactor/edits.js +34 -0
  118. package/dist/refactor/generate.d.ts +4 -0
  119. package/dist/refactor/generate.js +209 -0
  120. package/dist/refactor/index.d.ts +11 -0
  121. package/dist/refactor/index.js +144 -0
  122. package/dist/refactor/lines.d.ts +13 -0
  123. package/dist/refactor/lines.js +34 -0
  124. package/dist/refactor/literal-sources.d.ts +20 -0
  125. package/dist/refactor/literal-sources.js +243 -0
  126. package/dist/refactor/map.d.ts +21 -0
  127. package/dist/refactor/map.js +45 -0
  128. package/dist/refactor/members.d.ts +68 -0
  129. package/dist/refactor/members.js +187 -0
  130. package/dist/refactor/mention-scope.d.ts +19 -0
  131. package/dist/refactor/mention-scope.js +113 -0
  132. package/dist/refactor/mentions.d.ts +28 -0
  133. package/dist/refactor/mentions.js +92 -0
  134. package/dist/refactor/mocks.d.ts +16 -0
  135. package/dist/refactor/mocks.js +139 -0
  136. package/dist/refactor/module-rename.d.ts +17 -0
  137. package/dist/refactor/module-rename.js +160 -0
  138. package/dist/refactor/outcomes.d.ts +42 -0
  139. package/dist/refactor/outcomes.js +61 -0
  140. package/dist/refactor/own-scope.d.ts +16 -0
  141. package/dist/refactor/own-scope.js +142 -0
  142. package/dist/refactor/position.d.ts +34 -0
  143. package/dist/refactor/position.js +58 -0
  144. package/dist/refactor/program-check.d.ts +11 -0
  145. package/dist/refactor/program-check.js +49 -0
  146. package/dist/refactor/progress.d.ts +27 -0
  147. package/dist/refactor/progress.js +66 -0
  148. package/dist/refactor/rename.d.ts +18 -0
  149. package/dist/refactor/rename.js +1299 -0
  150. package/dist/refactor/retarget.d.ts +79 -0
  151. package/dist/refactor/retarget.js +647 -0
  152. package/dist/refactor/routing.d.ts +19 -0
  153. package/dist/refactor/routing.js +237 -0
  154. package/dist/refactor/session.d.ts +81 -0
  155. package/dist/refactor/session.js +180 -0
  156. package/dist/refactor/sites.d.ts +62 -0
  157. package/dist/refactor/sites.js +207 -0
  158. package/dist/refactor/symbols.d.ts +41 -0
  159. package/dist/refactor/symbols.js +385 -0
  160. package/dist/refactor/timings.d.ts +24 -0
  161. package/dist/refactor/timings.js +79 -0
  162. package/dist/refactor/typescript.d.ts +5 -0
  163. package/dist/refactor/typescript.js +279 -0
  164. package/dist/refactor/words.d.ts +42 -0
  165. package/dist/refactor/words.js +114 -0
  166. package/dist/refactor/workspace.d.ts +59 -0
  167. package/dist/refactor/workspace.js +314 -0
  168. package/dist/refactor/writer.d.ts +10 -0
  169. package/dist/refactor/writer.js +110 -0
  170. package/dist/twin/index.d.ts +50 -0
  171. package/dist/twin/index.js +180 -0
  172. package/dist/typecheck/index.d.ts +11 -0
  173. package/dist/typecheck/index.js +210 -0
  174. package/package.json +84 -3
@@ -0,0 +1,118 @@
1
+ # Canonical repr of normalized values: Python's repr for str, int, float, bool, None, list and mapping.
2
+ # Each `value` is read with the shared YAML profile; `repr` is the exact expected text.
3
+ cases:
4
+ - value: ''
5
+ repr: ''''''
6
+ - value: plain
7
+ repr: '''plain'''
8
+ - value: it's
9
+ repr: '"it''s"'
10
+ - value: say "hi"
11
+ repr: '''say "hi"'''
12
+ - value: it's "both"
13
+ repr: '''it\''s "both"'''
14
+ - value: back\slash
15
+ repr: '''back\\slash'''
16
+ - value: "tab\there"
17
+ repr: '''tab\there'''
18
+ - value: 'line
19
+
20
+ break'
21
+ repr: '''line\nbreak'''
22
+ - value: "cr\rhere"
23
+ repr: '''cr\rhere'''
24
+ - value: "\0"
25
+ repr: '''\x00'''
26
+ - value: "\a"
27
+ repr: '''\x07'''
28
+ - value: "\e[0m"
29
+ repr: '''\x1b[0m'''
30
+ - value: "\x7F"
31
+ repr: '''\x7f'''
32
+ - value: "\N"
33
+ repr: '''\x85'''
34
+ - value: "\_"
35
+ repr: '''\xa0'''
36
+ - value: "caf\xE9"
37
+ repr: "'caf\xE9'"
38
+ - value: "\u200B"
39
+ repr: '''\u200b'''
40
+ - value: "\L"
41
+ repr: '''\u2028'''
42
+ - value: "\U0001F600"
43
+ repr: "'\U0001F600'"
44
+ - value: "\U000E0001"
45
+ repr: '''\U000e0001'''
46
+ - value: "\uFEFF"
47
+ repr: '''\ufeff'''
48
+ - value: ''''
49
+ repr: '"''"'
50
+ - value: '"'
51
+ repr: '''"'''
52
+ - value: \'
53
+ repr: '"\\''"'
54
+ - value: 0
55
+ repr: '0'
56
+ - value: -1
57
+ repr: '-1'
58
+ - value: 42
59
+ repr: '42'
60
+ - value: 9007199254740993
61
+ repr: '9007199254740993'
62
+ - value: 1.0
63
+ repr: '1.0'
64
+ - value: -0.0
65
+ repr: '-0.0'
66
+ - value: 0.1
67
+ repr: '0.1'
68
+ - value: 1.5
69
+ repr: '1.5'
70
+ - value: 1.0e+16
71
+ repr: 1e+16
72
+ - value: 1000000000000000.0
73
+ repr: '1000000000000000.0'
74
+ - value: 1.5e-07
75
+ repr: '1.5e-07'
76
+ - value: 1.0e+100
77
+ repr: 1e+100
78
+ - value: 1.2345678901234568e+17
79
+ repr: '1.2345678901234568e+17'
80
+ - value: .inf
81
+ repr: inf
82
+ - value: -.inf
83
+ repr: -inf
84
+ - value: true
85
+ repr: 'True'
86
+ - value: false
87
+ repr: 'False'
88
+ - value: null
89
+ repr: None
90
+ - value: []
91
+ repr: '[]'
92
+ - value:
93
+ - 1
94
+ - a
95
+ - null
96
+ repr: '[1, ''a'', None]'
97
+ - value:
98
+ - - 1
99
+ - - 2
100
+ - k: v
101
+ repr: '[[1, [2]], {''k'': ''v''}]'
102
+ - value: {}
103
+ repr: '{}'
104
+ - value:
105
+ a: 1
106
+ b: x
107
+ repr: '{''a'': 1, ''b'': ''x''}'
108
+ - value:
109
+ a:
110
+ - 1
111
+ - b: null
112
+ repr: '{''a'': [1, {''b'': None}]}'
113
+ - value:
114
+ 1: int key
115
+ repr: '{1: ''int key''}'
116
+ - value:
117
+ it's: true
118
+ repr: '{"it''s": True}'
@@ -0,0 +1,6 @@
1
+ # Tokens only one language's idioms use. No SKILL.md may contain one; they belong in
2
+ # plugin/trmv/languages/<language>.md. A token matches where no word character touches it on either side.
3
+ python: [basedpyright, rope, TYPE_CHECKING, '*.py', pyproject.toml, MagicMock, unittest.mock, pytest, ruff, .venv,
4
+ __init__.py, mypy, '@override']
5
+ typescript: [tsc, tsconfig.json, vitest, Vitest, vi.fn, jest, Jest, '*.ts', .d.ts, node_modules, '@ts-expect-error',
6
+ eslint, prettier]
@@ -0,0 +1,135 @@
1
+ # Test-file classification per language under its `test_globs`; the Python results equal the pre-restructure classifier.
2
+ python:
3
+ - path: tests/x.py
4
+ test: true
5
+ - path: a/test/b.py
6
+ test: true
7
+ - path: test_x.py
8
+ test: true
9
+ - path: pkg/x_test.py
10
+ test: true
11
+ - path: conftest.py
12
+ test: true
13
+ - path: testing/x.py
14
+ test: false
15
+ - path: atest_x.py
16
+ test: false
17
+ - path: Tests/x.py
18
+ test: false
19
+ - path: tests
20
+ test: false
21
+ - path: src/tests.py
22
+ test: false
23
+ - path: a/b/tests/c/d.py
24
+ test: true
25
+ - path: test_dir/x.py
26
+ test: false
27
+ - path: .venv/tests/x.py
28
+ test: true
29
+ - path: pkg/conftest.py
30
+ test: true
31
+ - path: x_test.pyc
32
+ test: false
33
+ - path: test_
34
+ test: true
35
+ - path: a/test_/b.py
36
+ test: false
37
+ - path: test/x.py
38
+ test: true
39
+ - path: src/test.py
40
+ test: false
41
+ - path: a/x_test.py
42
+ test: true
43
+ - path: TEST_x.py
44
+ test: false
45
+ - path: test_x.txt
46
+ test: true
47
+ - path: src/pkg/mod.py
48
+ test: false
49
+ - path: myconftest.py
50
+ test: false
51
+ - path: tests.py
52
+ test: false
53
+ - path: a/tests
54
+ test: false
55
+ - path: _test.py
56
+ test: true
57
+ typescript:
58
+ - path: src/a.test.ts
59
+ test: true
60
+ - path: src/a.spec.tsx
61
+ test: true
62
+ - path: src/__tests__/a.ts
63
+ test: true
64
+ - path: src/__mocks__/a.ts
65
+ test: true
66
+ - path: test/a.ts
67
+ test: true
68
+ - path: src/testing/a.ts
69
+ test: false
70
+ - path: src/latest.ts
71
+ test: false
72
+ - path: src/contest.ts
73
+ test: false
74
+ - path: tests/a.ts
75
+ test: true
76
+ - path: a/test/b/c.ts
77
+ test: true
78
+ - path: src/a.test
79
+ test: false
80
+ - path: src/atest.ts
81
+ test: false
82
+ - path: src/a.tests.ts
83
+ test: false
84
+ - path: src/Test/a.ts
85
+ test: false
86
+ - path: src/__tests__
87
+ test: false
88
+ - path: src/__mocks__
89
+ test: false
90
+ - path: src/tests
91
+ test: false
92
+ - path: src/test
93
+ test: false
94
+ - path: a.test.ts
95
+ test: true
96
+ - path: src/a.test.d.ts
97
+ test: true
98
+ - path: src/a.test.js
99
+ test: true
100
+ - path: src/a.spec.mjs
101
+ test: true
102
+ - path: src/a.e2e.test.ts
103
+ test: true
104
+ - path: src/__tests__/deep/b.tsx
105
+ test: true
106
+ - path: src/.test.ts
107
+ test: true
108
+ - path: src/test.ts
109
+ test: false
110
+ - path: src/spec.ts
111
+ test: false
112
+ - path: test.ts
113
+ test: false
114
+ - path: src/a.testing.ts
115
+ test: false
116
+ - path: src/a_test.ts
117
+ test: false
118
+ - path: src/test_a.ts
119
+ test: false
120
+ - path: src/conftest.ts
121
+ test: false
122
+ - path: src/test-utils/a.ts
123
+ test: false
124
+ - path: src/a.Test.ts
125
+ test: false
126
+ - path: src/A.SPEC.ts
127
+ test: false
128
+ - path: src/__Tests__/a.ts
129
+ test: false
130
+ - path: src/x__tests__/a.ts
131
+ test: false
132
+ - path: src/a.ts
133
+ test: false
134
+ - path: src/index.ts
135
+ test: false