Add oxlint import/no-cycle and break existing src/common cycles
Enable oxlint's import/no-cycle rule (import plugin) so circular module dependencies are caught in CI, similar to eslint-plugin-import/no-cycle and biome no-import-cycles discussed in the issue. Relocate shared types and dependencies to remove cycles under src/common: - Types.ts: host IInsertEvent, IDeleteEvent, IParams, UnderlineStyle, IBuffer, and IBufferSet; drop imports from CircularList, buffer/Types, parser/Types, and Services - CoreTerminal.ts: define and export ICoreTerminal - ServiceRegistry.ts: define IServiceIdentifier (break Services registry loop) - UnicodeService: stop constructing UnicodeV6; CoreTerminal registers the default v6 provider after service creation - buffer/Types.ts and parser/Types.ts: re-export moved types for callers Fixes https://github.com/xtermjs/xterm.js/issues/5897 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import { IBuffer as IBufferApi, IBufferNamespace as IBufferNamespaceApi } from '@xterm/xterm';
|
||||
import { BufferApiView } from './BufferApiView';
|
||||
import { ICoreTerminal } from '../Types';
|
||||
import { ICoreTerminal } from '../CoreTerminal';
|
||||
import { Disposable } from '../Lifecycle';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { IParams } from '../parser/Types';
|
||||
import { IDisposable, IFunctionIdentifier, IParser } from '@xterm/xterm';
|
||||
import { ICoreTerminal } from '../Types';
|
||||
import { ICoreTerminal } from '../CoreTerminal';
|
||||
|
||||
export class ParserApi implements IParser {
|
||||
constructor(private _core: ICoreTerminal) { }
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { ICoreTerminal } from '../Types';
|
||||
import { ICoreTerminal } from '../CoreTerminal';
|
||||
import { IUnicodeHandling, IUnicodeVersionProvider } from '@xterm/xterm';
|
||||
|
||||
export class UnicodeApi implements IUnicodeHandling {
|
||||
|
||||
Reference in New Issue
Block a user