Full common split: composite tsconfigs and target-* modules
- Add composite TypeScript projects for common/primitives and common/runtime - Decouple primitives from runtime (buffer service interfaces, UnicodeProperties, CellTypes, etc.) - Move Types.ts to runtime; re-export primitive types from runtime/Types - Rename src/browser -> src/target-browser, src/headless -> src/target-headless - Update import paths (target-browser/*, target-headless/*) across repo - Fix esbuild outbase so common/* and target-* resolve under out-esbuild/ - Point unicode addons at primitives for UnicodeTypes/UnicodeProperties - Update ARCHITECTURE.md and AGENTS.md Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
co-authored by
Daniel Imms
parent
9a65429a30
commit
c569e5ab19
@@ -7,7 +7,7 @@ import { perfContext, before, ThroughputRuntimeCase } from 'xterm-benchmark';
|
||||
|
||||
import { spawn } from 'node-pty';
|
||||
import { Utf8ToUtf32, stringFromCodePoint } from 'common/input/TextDecoder';
|
||||
import { CoreBrowserTerminal } from 'browser/CoreBrowserTerminal';
|
||||
import { CoreBrowserTerminal } from 'target-browser/CoreBrowserTerminal';
|
||||
|
||||
perfContext('Terminal: ls -lR /usr/lib', () => {
|
||||
let content = '';
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"es2021",
|
||||
],
|
||||
"outDir": "../../out-test/benchmark",
|
||||
"rootDir": "../..",
|
||||
"types": [
|
||||
"../../node_modules/@types/node"
|
||||
],
|
||||
@@ -18,7 +19,7 @@
|
||||
"../../src/common/runtime/*",
|
||||
"../../src/common/*"
|
||||
],
|
||||
"browser/*": [ "../../src/browser/*" ],
|
||||
"target-browser/*": [ "../../src/target-browser/*" ],
|
||||
"Terminal": ["../../src/Terminal"]
|
||||
},
|
||||
},
|
||||
@@ -31,6 +32,6 @@
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../../src/common" },
|
||||
{ "path": "../../src/browser" },
|
||||
{ "path": "../../src/target-browser" },
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { test } from '@playwright/test';
|
||||
import { deepStrictEqual, notStrictEqual, strictEqual } from 'assert';
|
||||
import { ITestContext, createTestContext, openTerminal, pollFor, timeout } from './TestUtils';
|
||||
import { IRenderDimensions } from 'browser/renderer/shared/Types';
|
||||
import { IRenderDimensions } from 'target-browser/renderer/shared/Types';
|
||||
|
||||
let ctx: ITestContext;
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { Browser, JSHandle, Page } from '@playwright/test';
|
||||
import { deepStrictEqual, strictEqual } from 'assert';
|
||||
import type { IRenderDimensions as IRenderDimensionsInternal } from 'browser/renderer/shared/Types';
|
||||
import type { IRenderService } from 'browser/services/Services';
|
||||
import type { IRenderDimensions as IRenderDimensionsInternal } from 'target-browser/renderer/shared/Types';
|
||||
import type { IRenderService } from 'target-browser/services/Services';
|
||||
import type { ICoreTerminal, IDisposable, IMarker } from 'common/Types';
|
||||
import * as playwright from '@playwright/test';
|
||||
import { IBuffer, IBufferCell, IBufferLine, IBufferNamespace, IBufferRange, IDecoration, IDecorationOptions, IModes, IRenderDimensions, ITerminalInitOnlyOptions, ITerminalOptions, Terminal } from '@xterm/xterm';
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
"declaration": true,
|
||||
"moduleResolution": "nodenext",
|
||||
"paths": {
|
||||
"browser/*": [
|
||||
"../../src/browser/*"
|
||||
"target-browser/*": [
|
||||
"../../src/target-browser/*"
|
||||
],
|
||||
"common/*": [
|
||||
"../../src/common/primitives/*",
|
||||
@@ -37,7 +37,7 @@
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../src/browser"
|
||||
"path": "../../src/target-browser"
|
||||
},
|
||||
{
|
||||
"path": "../../src/common"
|
||||
|
||||
Reference in New Issue
Block a user