Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
path: npm-debug.log
- name: Lint
run: npm run lint
- name: Check cycles
run: npm run cycles
- name: Type Check
run: npm run check-types
- name: Test
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,3 @@ for (const file of files) {
```

This pre-`tsc` step removes the flagged globals in the compiled orientation; runtime semantics still match the target build.

## Roadmap

- Emit source maps and clearer diagnostics for transform choices.
- Broaden fixtures covering live-binding and top-level await edge cases across Node versions.
- Benchmark scope analysis choices: compare `periscopic`, `scope-analyzer`, and `eslint-scope` on fixtures and pick the final adapter.
13 changes: 3 additions & 10 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ Next:
- Explore a true `'aggressive'` mode (mixed exports/module.exports, limited reassignments, identifier-safe computed keys) with guarded semantics and explicit diagnostics.
- Consider a constrained ESM → CJS “pretty” path where live-binding and TLA semantics permit it.

## Documentation & UX

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

## CLI

- 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).
Expand All @@ -25,8 +19,7 @@ Next:
- Performance ergonomics: batch parse/format where possible, optional concurrency flag, and a `--watch` mode that rebuilds on change with minimal restarts.
- 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.

## Next Steps
## Tooling & Diagnostics

- Prototype CJS→ESM `pretty: 'safe'` path with fixtures and diagnostics.
- Evaluate surface area for ESM→CJS pretty mode; decide if it ships initially or stays experimental.
- Add CLI/API option plumbing and docs once behavior solidifies.
- Emit source maps and clearer diagnostics for transform choices.
- Benchmark scope analysis choices: compare `periscopic`, `scope-analyzer`, and `eslint-scope` on fixtures and pick the final adapter.
7 changes: 7 additions & 0 deletions oxlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"rules": {
"no-console": "error",
"unicorn/filename-case": ["error", { "case": "camelCase" }],
"@typescript-eslint/no-explicit-any": "error",
"import/no-unused-modules": [
"warn",
{ "missingExports": true, "unusedExports": true }
Expand All @@ -28,6 +29,12 @@
"rules": {
"no-unused-vars": "off"
}
},
{
"files": ["test/**"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
]
}
Loading