Start @xterm scope with core and webgl addons

This commit is contained in:
Daniel Imms
2023-11-01 06:44:26 -07:00
parent 4245283e05
commit add7f8133e
32 changed files with 34 additions and 34 deletions
+2 -2
View File
@@ -35,8 +35,8 @@
"addons/xterm-addon-unicode-graphemes/benchmark/tsconfig.json", "addons/xterm-addon-unicode-graphemes/benchmark/tsconfig.json",
"addons/xterm-addon-web-links/src/tsconfig.json", "addons/xterm-addon-web-links/src/tsconfig.json",
"addons/xterm-addon-web-links/test/tsconfig.json", "addons/xterm-addon-web-links/test/tsconfig.json",
"addons/xterm-addon-webgl/src/tsconfig.json", "addons/addon-webgl/src/tsconfig.json",
"addons/xterm-addon-webgl/test/tsconfig.json" "addons/addon-webgl/test/tsconfig.json"
], ],
"sourceType": "module" "sourceType": "module"
}, },
+4 -4
View File
@@ -46,8 +46,8 @@ jobs:
./addons/xterm-addon-unicode-graphemes/out-test/* \ ./addons/xterm-addon-unicode-graphemes/out-test/* \
./addons/xterm-addon-web-links/out/* \ ./addons/xterm-addon-web-links/out/* \
./addons/xterm-addon-web-links/out-test/* \ ./addons/xterm-addon-web-links/out-test/* \
./addons/xterm-addon-webgl/out/* \ ./addons/addon-webgl/out/* \
./addons/xterm-addon-webgl/out-test/* ./addons/addon-webgl/out-test/*
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
@@ -267,8 +267,8 @@ jobs:
run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=core run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=core
- name: Integration tests (xterm-addon-canvas) - name: Integration tests (xterm-addon-canvas)
run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=xterm-addon-canvas run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=xterm-addon-canvas
- name: Integration tests (xterm-addon-webgl) - name: Integration tests (addon-webgl)
run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=xterm-addon-webgl run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl
test-api: test-api:
needs: build needs: build
@@ -1,25 +1,25 @@
## xterm-addon-webgl ## @xterm/addon-webgl
An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables a WebGL2-based renderer. This addon requires xterm.js v4+. An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables a WebGL2-based renderer. This addon requires xterm.js v4+.
### Install ### Install
```bash ```bash
npm install --save xterm-addon-webgl npm install --save @xterm/addon-webgl
``` ```
### Usage ### Usage
```ts ```ts
import { Terminal } from 'xterm'; import { Terminal } from '@xterm/xterm';
import { WebglAddon } from 'xterm-addon-webgl'; import { WebglAddon } from '@xterm/addon-webgl';
const terminal = new Terminal(); const terminal = new Terminal();
terminal.open(element); terminal.open(element);
terminal.loadAddon(new WebglAddon()); terminal.loadAddon(new WebglAddon());
``` ```
See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts) for more advanced usage. See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-webgl/typings/addon-webgl.d.ts) for more advanced usage.
### Handling Context Loss ### Handling Context Loss
@@ -1,13 +1,13 @@
{ {
"name": "xterm-addon-webgl", "name": "@xterm/addon-webgl",
"version": "0.16.0", "version": "0.16.0",
"author": { "author": {
"name": "The xterm.js authors", "name": "The xterm.js authors",
"url": "https://xtermjs.org/" "url": "https://xtermjs.org/"
}, },
"main": "lib/xterm-addon-webgl.js", "main": "lib/addon-webgl.js",
"types": "typings/xterm-addon-webgl.d.ts", "types": "typings/addon-webgl.d.ts",
"repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-webgl", "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-webgl",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [
"terminal", "terminal",
@@ -5,7 +5,7 @@
import { Terminal, ITerminalAddon, IEvent } from 'xterm'; import { Terminal, ITerminalAddon, IEvent } from 'xterm';
declare module 'xterm-addon-webgl' { declare module '@xterm/addon-webgl' {
/** /**
* An xterm.js addon that provides search functionality. * An xterm.js addon that provides search functionality.
*/ */
@@ -6,7 +6,7 @@
const path = require('path'); const path = require('path');
const addonName = 'WebglAddon'; const addonName = 'WebglAddon';
const mainFile = 'xterm-addon-webgl.js'; const mainFile = 'addon-webgl.js';
module.exports = { module.exports = {
entry: `./out/${addonName}.js`, entry: `./out/${addonName}.js`,
+11 -11
View File
@@ -27,16 +27,16 @@ if (changedFiles.some(e => e.search(/^addons\//) === -1)) {
// Publish addons if any files were changed inside of the addon // Publish addons if any files were changed inside of the addon
const addonPackageDirs = [ const addonPackageDirs = [
path.resolve(__dirname, '../addons/xterm-addon-attach'), // path.resolve(__dirname, '../addons/xterm-addon-attach'),
path.resolve(__dirname, '../addons/xterm-addon-canvas'), // path.resolve(__dirname, '../addons/xterm-addon-canvas'),
path.resolve(__dirname, '../addons/xterm-addon-fit'), // path.resolve(__dirname, '../addons/xterm-addon-fit'),
// path.resolve(__dirname, '../addons/xterm-addon-image'), // // path.resolve(__dirname, '../addons/xterm-addon-image'),
path.resolve(__dirname, '../addons/xterm-addon-ligatures'), // path.resolve(__dirname, '../addons/xterm-addon-ligatures'),
path.resolve(__dirname, '../addons/xterm-addon-search'), // path.resolve(__dirname, '../addons/xterm-addon-search'),
path.resolve(__dirname, '../addons/xterm-addon-serialize'), // path.resolve(__dirname, '../addons/xterm-addon-serialize'),
path.resolve(__dirname, '../addons/xterm-addon-unicode11'), // path.resolve(__dirname, '../addons/xterm-addon-unicode11'),
path.resolve(__dirname, '../addons/xterm-addon-web-links'), // path.resolve(__dirname, '../addons/xterm-addon-web-links'),
path.resolve(__dirname, '../addons/xterm-addon-webgl') path.resolve(__dirname, '../addons/addon-webgl')
]; ];
console.log(`Checking if addons need to be published`); console.log(`Checking if addons need to be published`);
for (const p of addonPackageDirs) { for (const p of addonPackageDirs) {
@@ -70,7 +70,7 @@ function checkAndPublishPackage(packageDir) {
fs.writeFileSync(packageJsonFile, JSON.stringify(packageJson, null, 2)); fs.writeFileSync(packageJsonFile, JSON.stringify(packageJson, null, 2));
// Publish // Publish
const args = ['publish']; const args = ['publish', '--access', 'public'];
if (!isStableRelease) { if (!isStableRelease) {
args.push('--tag', 'beta'); args.push('--tag', 'beta');
} }
+1 -1
View File
@@ -20,7 +20,7 @@ while (argv.some(e => e.startsWith('--suite='))) {
let configs = [ let configs = [
{ name: 'core', path: 'out-test/playwright/playwright.config.js' }, { name: 'core', path: 'out-test/playwright/playwright.config.js' },
{ name: 'xterm-addon-canvas', path: 'addons/xterm-addon-canvas/out-test/playwright.config.js' }, { name: 'xterm-addon-canvas', path: 'addons/xterm-addon-canvas/out-test/playwright.config.js' },
{ name: 'xterm-addon-webgl', path: 'addons/xterm-addon-webgl/out-test/playwright.config.js' } { name: 'addon-webgl', path: 'addons/addon-webgl/out-test/playwright.config.js' }
]; ];
if (suiteFilter) { if (suiteFilter) {
+2 -2
View File
@@ -16,7 +16,7 @@ import { FitAddon } from '../addons/xterm-addon-fit/out/FitAddon';
import { SearchAddon, ISearchOptions } from '../addons/xterm-addon-search/out/SearchAddon'; import { SearchAddon, ISearchOptions } from '../addons/xterm-addon-search/out/SearchAddon';
import { SerializeAddon } from '../addons/xterm-addon-serialize/out/SerializeAddon'; import { SerializeAddon } from '../addons/xterm-addon-serialize/out/SerializeAddon';
import { WebLinksAddon } from '../addons/xterm-addon-web-links/out/WebLinksAddon'; import { WebLinksAddon } from '../addons/xterm-addon-web-links/out/WebLinksAddon';
import { WebglAddon } from '../addons/xterm-addon-webgl/out/WebglAddon'; import { WebglAddon } from '../addons/addon-webgl/out/WebglAddon';
import { Unicode11Addon } from '../addons/xterm-addon-unicode11/out/Unicode11Addon'; import { Unicode11Addon } from '../addons/xterm-addon-unicode11/out/Unicode11Addon';
import { UnicodeGraphemesAddon } from '../addons/xterm-addon-unicode-graphemes/out/UnicodeGraphemesAddon'; import { UnicodeGraphemesAddon } from '../addons/xterm-addon-unicode-graphemes/out/UnicodeGraphemesAddon';
import { LigaturesAddon } from '../addons/xterm-addon-ligatures/out/LigaturesAddon'; import { LigaturesAddon } from '../addons/xterm-addon-ligatures/out/LigaturesAddon';
@@ -37,7 +37,7 @@ if ('WebAssembly' in window) {
// import { SearchAddon, ISearchOptions } from 'xterm-addon-search'; // import { SearchAddon, ISearchOptions } from 'xterm-addon-search';
// import { SerializeAddon } from 'xterm-addon-serialize'; // import { SerializeAddon } from 'xterm-addon-serialize';
// import { WebLinksAddon } from 'xterm-addon-web-links'; // import { WebLinksAddon } from 'xterm-addon-web-links';
// import { WebglAddon } from 'xterm-addon-webgl'; // import { WebglAddon } from '@xterm/addon-webgl';
// import { Unicode11Addon } from 'xterm-addon-unicode11'; // import { Unicode11Addon } from 'xterm-addon-unicode11';
// import { UnicodeGraphemesAddon } from 'xterm-addon-unicode-graphemes'; // import { UnicodeGraphemesAddon } from 'xterm-addon-unicode-graphemes';
// import { LigaturesAddon } from 'xterm-addon-ligatures'; // import { LigaturesAddon } from 'xterm-addon-ligatures';
+1 -1
View File
@@ -12,7 +12,7 @@
"xterm-addon-search": ["../addons/xterm-addon-search"], "xterm-addon-search": ["../addons/xterm-addon-search"],
"xterm-addon-serialize": ["../addons/xterm-addon-serialize"], "xterm-addon-serialize": ["../addons/xterm-addon-serialize"],
"xterm-addon-web-links": ["../addons/xterm-addon-web-links"], "xterm-addon-web-links": ["../addons/xterm-addon-web-links"],
"xterm-addon-webgl": ["../addons/xterm-addon-webgl"] "addon-webgl": ["../addons/addon-webgl"]
} }
}, },
"include": [ "include": [
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "xterm", "name": "@xterm/xterm",
"description": "Full xterm terminal, in your browser", "description": "Full xterm terminal, in your browser",
"version": "5.3.0", "version": "5.3.0",
"main": "lib/xterm.js", "main": "lib/xterm.js",
+1 -1
View File
@@ -17,6 +17,6 @@
{ "path": "./addons/xterm-addon-unicode11" }, { "path": "./addons/xterm-addon-unicode11" },
{ "path": "./addons/xterm-addon-unicode-graphemes" }, { "path": "./addons/xterm-addon-unicode-graphemes" },
{ "path": "./addons/xterm-addon-web-links" }, { "path": "./addons/xterm-addon-web-links" },
{ "path": "./addons/xterm-addon-webgl" } { "path": "./addons/addon-webgl" }
] ]
} }