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.
- package/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/bin/trmv-compliance.js +4 -0
- package/dist/bin/trmv-config.js +4 -0
- package/dist/bin/trmv-doctor.js +4 -0
- package/dist/bin/trmv-mock-lint.js +4 -0
- package/dist/bin/trmv-refactor.js +4 -0
- package/dist/bin/trmv-typecheck.js +4 -0
- package/dist/changes/index.d.ts +24 -0
- package/dist/changes/index.js +112 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.js +36 -0
- package/dist/config/command.d.ts +20 -0
- package/dist/config/command.js +68 -0
- package/dist/config/error.d.ts +3 -0
- package/dist/config/error.js +4 -0
- package/dist/config/files.d.ts +6 -0
- package/dist/config/files.js +29 -0
- package/dist/config/format.d.ts +25 -0
- package/dist/config/format.js +172 -0
- package/dist/config/index.d.ts +73 -0
- package/dist/config/index.js +239 -0
- package/dist/config/read.d.ts +4 -0
- package/dist/config/read.js +37 -0
- package/dist/contract/data/CONTRACT_HASH +1 -0
- package/dist/contract/data/README.md +69 -0
- package/dist/contract/data/cli.yaml +239 -0
- package/dist/contract/data/config.yaml +8 -0
- package/dist/contract/data/findings.yaml +212 -0
- package/dist/contract/data/languages.yaml +146 -0
- package/dist/contract/data/regex-subset.md +28 -0
- package/dist/contract/data/schema/rename-map.schema.json +51 -0
- package/dist/contract/data/schema/trmv.schema.json +92 -0
- package/dist/contract/data/schema/word-table.schema.json +55 -0
- package/dist/contract/data/vectors/cli.yaml +216 -0
- package/dist/contract/data/vectors/command-split.yaml +69 -0
- package/dist/contract/data/vectors/diff.yaml +287 -0
- package/dist/contract/data/vectors/format.yaml +160 -0
- package/dist/contract/data/vectors/glob.yaml +148 -0
- package/dist/contract/data/vectors/materialize.yaml +51 -0
- package/dist/contract/data/vectors/os-errors.yaml +123 -0
- package/dist/contract/data/vectors/refactor-symbols.yaml +220 -0
- package/dist/contract/data/vectors/refactor-text.yaml +186 -0
- package/dist/contract/data/vectors/refactor-words.yaml +83 -0
- package/dist/contract/data/vectors/regex-subset.yaml +40 -0
- package/dist/contract/data/vectors/repr.yaml +118 -0
- package/dist/contract/data/vectors/skill-leaks.yaml +6 -0
- package/dist/contract/data/vectors/test-files.yaml +135 -0
- package/dist/contract/data/vectors/yaml.yaml +858 -0
- package/dist/contract/glob.d.ts +3 -0
- package/dist/contract/glob.js +49 -0
- package/dist/contract/index.d.ts +13 -0
- package/dist/contract/index.js +14 -0
- package/dist/contract/json.d.ts +1 -0
- package/dist/contract/json.js +43 -0
- package/dist/contract/os-error.d.ts +13 -0
- package/dist/contract/os-error.js +66 -0
- package/dist/contract/parser.d.ts +18 -0
- package/dist/contract/parser.js +207 -0
- package/dist/contract/plugin.d.ts +5 -0
- package/dist/contract/plugin.js +90 -0
- package/dist/contract/regex.d.ts +5 -0
- package/dist/contract/regex.js +116 -0
- package/dist/contract/render.d.ts +3 -0
- package/dist/contract/render.js +19 -0
- package/dist/contract/schema.d.ts +10 -0
- package/dist/contract/schema.js +139 -0
- package/dist/contract/snapshot.d.ts +47 -0
- package/dist/contract/snapshot.js +129 -0
- package/dist/contract/text.d.ts +14 -0
- package/dist/contract/text.js +56 -0
- package/dist/contract/values.d.ts +24 -0
- package/dist/contract/values.js +127 -0
- package/dist/contract/which.d.ts +4 -0
- package/dist/contract/which.js +27 -0
- package/dist/contract/yaml.d.ts +11 -0
- package/dist/contract/yaml.js +595 -0
- package/dist/doctor/index.d.ts +3 -0
- package/dist/doctor/index.js +69 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/lang/conventions.d.ts +33 -0
- package/dist/lang/conventions.js +216 -0
- package/dist/lang/edges.d.ts +2 -0
- package/dist/lang/edges.js +142 -0
- package/dist/lang/files.d.ts +28 -0
- package/dist/lang/files.js +122 -0
- package/dist/lang/imports.d.ts +3 -0
- package/dist/lang/imports.js +64 -0
- package/dist/lang/index.d.ts +13 -0
- package/dist/lang/index.js +18 -0
- package/dist/lang/lines.d.ts +21 -0
- package/dist/lang/lines.js +96 -0
- package/dist/lang/projects.d.ts +30 -0
- package/dist/lang/projects.js +115 -0
- package/dist/lang/specifiers.d.ts +7 -0
- package/dist/lang/specifiers.js +88 -0
- package/dist/lang/ts.d.ts +2 -0
- package/dist/lang/ts.js +7 -0
- package/dist/lang/tsc.d.ts +32 -0
- package/dist/lang/tsc.js +130 -0
- package/dist/lang/types.d.ts +27 -0
- package/dist/lang/types.js +4 -0
- package/dist/refactor/baseline.d.ts +13 -0
- package/dist/refactor/baseline.js +148 -0
- package/dist/refactor/bindings.d.ts +76 -0
- package/dist/refactor/bindings.js +594 -0
- package/dist/refactor/carve.d.ts +31 -0
- package/dist/refactor/carve.js +145 -0
- package/dist/refactor/compliance.d.ts +15 -0
- package/dist/refactor/compliance.js +161 -0
- package/dist/refactor/compound.d.ts +5 -0
- package/dist/refactor/compound.js +40 -0
- package/dist/refactor/diff.d.ts +2 -0
- package/dist/refactor/diff.js +170 -0
- package/dist/refactor/edits.d.ts +16 -0
- package/dist/refactor/edits.js +34 -0
- package/dist/refactor/generate.d.ts +4 -0
- package/dist/refactor/generate.js +209 -0
- package/dist/refactor/index.d.ts +11 -0
- package/dist/refactor/index.js +144 -0
- package/dist/refactor/lines.d.ts +13 -0
- package/dist/refactor/lines.js +34 -0
- package/dist/refactor/literal-sources.d.ts +20 -0
- package/dist/refactor/literal-sources.js +243 -0
- package/dist/refactor/map.d.ts +21 -0
- package/dist/refactor/map.js +45 -0
- package/dist/refactor/members.d.ts +68 -0
- package/dist/refactor/members.js +187 -0
- package/dist/refactor/mention-scope.d.ts +19 -0
- package/dist/refactor/mention-scope.js +113 -0
- package/dist/refactor/mentions.d.ts +28 -0
- package/dist/refactor/mentions.js +92 -0
- package/dist/refactor/mocks.d.ts +16 -0
- package/dist/refactor/mocks.js +139 -0
- package/dist/refactor/module-rename.d.ts +17 -0
- package/dist/refactor/module-rename.js +160 -0
- package/dist/refactor/outcomes.d.ts +42 -0
- package/dist/refactor/outcomes.js +61 -0
- package/dist/refactor/own-scope.d.ts +16 -0
- package/dist/refactor/own-scope.js +142 -0
- package/dist/refactor/position.d.ts +34 -0
- package/dist/refactor/position.js +58 -0
- package/dist/refactor/program-check.d.ts +11 -0
- package/dist/refactor/program-check.js +49 -0
- package/dist/refactor/progress.d.ts +27 -0
- package/dist/refactor/progress.js +66 -0
- package/dist/refactor/rename.d.ts +18 -0
- package/dist/refactor/rename.js +1299 -0
- package/dist/refactor/retarget.d.ts +79 -0
- package/dist/refactor/retarget.js +647 -0
- package/dist/refactor/routing.d.ts +19 -0
- package/dist/refactor/routing.js +237 -0
- package/dist/refactor/session.d.ts +81 -0
- package/dist/refactor/session.js +180 -0
- package/dist/refactor/sites.d.ts +62 -0
- package/dist/refactor/sites.js +207 -0
- package/dist/refactor/symbols.d.ts +41 -0
- package/dist/refactor/symbols.js +385 -0
- package/dist/refactor/timings.d.ts +24 -0
- package/dist/refactor/timings.js +79 -0
- package/dist/refactor/typescript.d.ts +5 -0
- package/dist/refactor/typescript.js +279 -0
- package/dist/refactor/words.d.ts +42 -0
- package/dist/refactor/words.js +114 -0
- package/dist/refactor/workspace.d.ts +59 -0
- package/dist/refactor/workspace.js +314 -0
- package/dist/refactor/writer.d.ts +10 -0
- package/dist/refactor/writer.js +110 -0
- package/dist/twin/index.d.ts +50 -0
- package/dist/twin/index.js +180 -0
- package/dist/typecheck/index.d.ts +11 -0
- package/dist/typecheck/index.js +210 -0
- 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
|