Skip to content

Commit e517b7e

Browse files
chore: use relative imports. (#33)
1 parent b1e8848 commit e517b7e

24 files changed

Lines changed: 1922 additions & 1083 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
path: npm-debug.log
3434
- name: Lint
3535
run: npm run lint
36+
- name: Check cycles
37+
run: npm run cycles
3638
- name: Type Check
3739
run: npm run check-types
3840
- name: Test

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,3 @@ for (const file of files) {
229229
```
230230

231231
This pre-`tsc` step removes the flagged globals in the compiled orientation; runtime semantics still match the target build.
232-
233-
## Roadmap
234-
235-
- Emit source maps and clearer diagnostics for transform choices.
236-
- Broaden fixtures covering live-binding and top-level await edge cases across Node versions.
237-
- Benchmark scope analysis choices: compare `periscopic`, `scope-analyzer`, and `eslint-scope` on fixtures and pick the final adapter.

docs/roadmap.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ Next:
1111
- Explore a true `'aggressive'` mode (mixed exports/module.exports, limited reassignments, identifier-safe computed keys) with guarded semantics and explicit diagnostics.
1212
- Consider a constrained ESM → CJS “pretty” path where live-binding and TLA semantics permit it.
1313

14-
## Documentation & UX
15-
16-
- Note Node runtime floor (current package.json: Node >=22.21.1 <23 || >=24 <25) for `import.meta.*` support in generated code.
17-
- Document diagnostics behavior when `pretty` cannot be applied.
18-
- Consider a README section on “migration mode” describing pretty output trade-offs and when to avoid it.
19-
2014
## CLI
2115

2216
- Deliver a `knighted-module` CLI that wraps the core transform with parity to API options (targets, rewriteSpecifier, appendJsExtension/appendDirectoryIndex, detectCircularRequires, topLevelAwait, cjsDefault, diagnostics hooks, out/in-place).
@@ -25,8 +19,7 @@ Next:
2519
- Performance ergonomics: batch parse/format where possible, optional concurrency flag, and a `--watch` mode that rebuilds on change with minimal restarts.
2620
- DX: `--dry-run` to preview planned rewrites, `--list` to show which files would change, `--summary` to print counts of transformed specifiers/globals, and `--help`/`--version` aligned with package metadata.
2721

28-
## Next Steps
22+
## Tooling & Diagnostics
2923

30-
- Prototype CJS→ESM `pretty: 'safe'` path with fixtures and diagnostics.
31-
- Evaluate surface area for ESM→CJS pretty mode; decide if it ships initially or stays experimental.
32-
- Add CLI/API option plumbing and docs once behavior solidifies.
24+
- Emit source maps and clearer diagnostics for transform choices.
25+
- Benchmark scope analysis choices: compare `periscopic`, `scope-analyzer`, and `eslint-scope` on fixtures and pick the final adapter.

oxlint.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"rules": {
55
"no-console": "error",
66
"unicorn/filename-case": ["error", { "case": "camelCase" }],
7+
"@typescript-eslint/no-explicit-any": "error",
78
"import/no-unused-modules": [
89
"warn",
910
{ "missingExports": true, "unusedExports": true }
@@ -28,6 +29,12 @@
2829
"rules": {
2930
"no-unused-vars": "off"
3031
}
32+
},
33+
{
34+
"files": ["test/**"],
35+
"rules": {
36+
"@typescript-eslint/no-explicit-any": "off"
37+
}
3138
}
3239
]
3340
}

0 commit comments

Comments
 (0)