diff --git a/.eslintrc.json b/.eslintrc.json index 0ccafafb..8ca2eccc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -35,8 +35,8 @@ "addons/xterm-addon-unicode-graphemes/benchmark/tsconfig.json", "addons/xterm-addon-web-links/src/tsconfig.json", "addons/xterm-addon-web-links/test/tsconfig.json", - "addons/xterm-addon-webgl/src/tsconfig.json", - "addons/xterm-addon-webgl/test/tsconfig.json" + "addons/addon-webgl/src/tsconfig.json", + "addons/addon-webgl/test/tsconfig.json" ], "sourceType": "module" }, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eea525d0..cd3fa512 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,8 @@ jobs: ./addons/xterm-addon-unicode-graphemes/out-test/* \ ./addons/xterm-addon-web-links/out/* \ ./addons/xterm-addon-web-links/out-test/* \ - ./addons/xterm-addon-webgl/out/* \ - ./addons/xterm-addon-webgl/out-test/* + ./addons/addon-webgl/out/* \ + ./addons/addon-webgl/out-test/* - name: Upload artifacts uses: actions/upload-artifact@v3 with: @@ -267,8 +267,8 @@ jobs: run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=core - name: Integration tests (xterm-addon-canvas) run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=xterm-addon-canvas - - name: Integration tests (xterm-addon-webgl) - run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=xterm-addon-webgl + - name: Integration tests (addon-webgl) + run: yarn test-playwright-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl test-api: needs: build diff --git a/addons/xterm-addon-webgl/.gitignore b/addons/addon-webgl/.gitignore similarity index 100% rename from addons/xterm-addon-webgl/.gitignore rename to addons/addon-webgl/.gitignore diff --git a/addons/xterm-addon-webgl/.npmignore b/addons/addon-webgl/.npmignore similarity index 100% rename from addons/xterm-addon-webgl/.npmignore rename to addons/addon-webgl/.npmignore diff --git a/addons/xterm-addon-webgl/LICENSE b/addons/addon-webgl/LICENSE similarity index 100% rename from addons/xterm-addon-webgl/LICENSE rename to addons/addon-webgl/LICENSE diff --git a/addons/xterm-addon-webgl/README.md b/addons/addon-webgl/README.md similarity index 83% rename from addons/xterm-addon-webgl/README.md rename to addons/addon-webgl/README.md index 5dee6b62..f944a17e 100644 --- a/addons/xterm-addon-webgl/README.md +++ b/addons/addon-webgl/README.md @@ -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+. ### Install ```bash -npm install --save xterm-addon-webgl +npm install --save @xterm/addon-webgl ``` ### Usage ```ts -import { Terminal } from 'xterm'; -import { WebglAddon } from 'xterm-addon-webgl'; +import { Terminal } from '@xterm/xterm'; +import { WebglAddon } from '@xterm/addon-webgl'; const terminal = new Terminal(); terminal.open(element); 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 diff --git a/addons/xterm-addon-webgl/package.json b/addons/addon-webgl/package.json similarity index 80% rename from addons/xterm-addon-webgl/package.json rename to addons/addon-webgl/package.json index 1458effc..f52f8b59 100644 --- a/addons/xterm-addon-webgl/package.json +++ b/addons/addon-webgl/package.json @@ -1,13 +1,13 @@ { - "name": "xterm-addon-webgl", + "name": "@xterm/addon-webgl", "version": "0.16.0", "author": { "name": "The xterm.js authors", "url": "https://xtermjs.org/" }, - "main": "lib/xterm-addon-webgl.js", - "types": "typings/xterm-addon-webgl.d.ts", - "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-webgl", + "main": "lib/addon-webgl.js", + "types": "typings/addon-webgl.d.ts", + "repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-webgl", "license": "MIT", "keywords": [ "terminal", diff --git a/addons/xterm-addon-webgl/src/GlyphRenderer.ts b/addons/addon-webgl/src/GlyphRenderer.ts similarity index 100% rename from addons/xterm-addon-webgl/src/GlyphRenderer.ts rename to addons/addon-webgl/src/GlyphRenderer.ts diff --git a/addons/xterm-addon-webgl/src/RectangleRenderer.ts b/addons/addon-webgl/src/RectangleRenderer.ts similarity index 100% rename from addons/xterm-addon-webgl/src/RectangleRenderer.ts rename to addons/addon-webgl/src/RectangleRenderer.ts diff --git a/addons/xterm-addon-webgl/src/RenderModel.ts b/addons/addon-webgl/src/RenderModel.ts similarity index 100% rename from addons/xterm-addon-webgl/src/RenderModel.ts rename to addons/addon-webgl/src/RenderModel.ts diff --git a/addons/xterm-addon-webgl/src/TypedArray.test.ts b/addons/addon-webgl/src/TypedArray.test.ts similarity index 100% rename from addons/xterm-addon-webgl/src/TypedArray.test.ts rename to addons/addon-webgl/src/TypedArray.test.ts diff --git a/addons/xterm-addon-webgl/src/TypedArray.ts b/addons/addon-webgl/src/TypedArray.ts similarity index 100% rename from addons/xterm-addon-webgl/src/TypedArray.ts rename to addons/addon-webgl/src/TypedArray.ts diff --git a/addons/xterm-addon-webgl/src/Types.d.ts b/addons/addon-webgl/src/Types.d.ts similarity index 100% rename from addons/xterm-addon-webgl/src/Types.d.ts rename to addons/addon-webgl/src/Types.d.ts diff --git a/addons/xterm-addon-webgl/src/WebglAddon.ts b/addons/addon-webgl/src/WebglAddon.ts similarity index 100% rename from addons/xterm-addon-webgl/src/WebglAddon.ts rename to addons/addon-webgl/src/WebglAddon.ts diff --git a/addons/xterm-addon-webgl/src/WebglRenderer.ts b/addons/addon-webgl/src/WebglRenderer.ts similarity index 100% rename from addons/xterm-addon-webgl/src/WebglRenderer.ts rename to addons/addon-webgl/src/WebglRenderer.ts diff --git a/addons/xterm-addon-webgl/src/WebglUtils.ts b/addons/addon-webgl/src/WebglUtils.ts similarity index 100% rename from addons/xterm-addon-webgl/src/WebglUtils.ts rename to addons/addon-webgl/src/WebglUtils.ts diff --git a/addons/xterm-addon-webgl/src/renderLayer/BaseRenderLayer.ts b/addons/addon-webgl/src/renderLayer/BaseRenderLayer.ts similarity index 100% rename from addons/xterm-addon-webgl/src/renderLayer/BaseRenderLayer.ts rename to addons/addon-webgl/src/renderLayer/BaseRenderLayer.ts diff --git a/addons/xterm-addon-webgl/src/renderLayer/LinkRenderLayer.ts b/addons/addon-webgl/src/renderLayer/LinkRenderLayer.ts similarity index 100% rename from addons/xterm-addon-webgl/src/renderLayer/LinkRenderLayer.ts rename to addons/addon-webgl/src/renderLayer/LinkRenderLayer.ts diff --git a/addons/xterm-addon-webgl/src/renderLayer/Types.ts b/addons/addon-webgl/src/renderLayer/Types.ts similarity index 100% rename from addons/xterm-addon-webgl/src/renderLayer/Types.ts rename to addons/addon-webgl/src/renderLayer/Types.ts diff --git a/addons/xterm-addon-webgl/src/tsconfig.json b/addons/addon-webgl/src/tsconfig.json similarity index 100% rename from addons/xterm-addon-webgl/src/tsconfig.json rename to addons/addon-webgl/src/tsconfig.json diff --git a/addons/xterm-addon-webgl/test/WebglRenderer.test.ts b/addons/addon-webgl/test/WebglRenderer.test.ts similarity index 100% rename from addons/xterm-addon-webgl/test/WebglRenderer.test.ts rename to addons/addon-webgl/test/WebglRenderer.test.ts diff --git a/addons/xterm-addon-webgl/test/playwright.config.ts b/addons/addon-webgl/test/playwright.config.ts similarity index 100% rename from addons/xterm-addon-webgl/test/playwright.config.ts rename to addons/addon-webgl/test/playwright.config.ts diff --git a/addons/xterm-addon-webgl/test/tsconfig.json b/addons/addon-webgl/test/tsconfig.json similarity index 100% rename from addons/xterm-addon-webgl/test/tsconfig.json rename to addons/addon-webgl/test/tsconfig.json diff --git a/addons/xterm-addon-webgl/tsconfig.json b/addons/addon-webgl/tsconfig.json similarity index 100% rename from addons/xterm-addon-webgl/tsconfig.json rename to addons/addon-webgl/tsconfig.json diff --git a/addons/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts b/addons/addon-webgl/typings/addon-webgl.d.ts similarity index 96% rename from addons/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts rename to addons/addon-webgl/typings/addon-webgl.d.ts index 79108e0d..e9f459cf 100644 --- a/addons/xterm-addon-webgl/typings/xterm-addon-webgl.d.ts +++ b/addons/addon-webgl/typings/addon-webgl.d.ts @@ -5,7 +5,7 @@ import { Terminal, ITerminalAddon, IEvent } from 'xterm'; -declare module 'xterm-addon-webgl' { +declare module '@xterm/addon-webgl' { /** * An xterm.js addon that provides search functionality. */ diff --git a/addons/xterm-addon-webgl/webpack.config.js b/addons/addon-webgl/webpack.config.js similarity index 94% rename from addons/xterm-addon-webgl/webpack.config.js rename to addons/addon-webgl/webpack.config.js index 578b1102..f31ffd51 100644 --- a/addons/xterm-addon-webgl/webpack.config.js +++ b/addons/addon-webgl/webpack.config.js @@ -6,7 +6,7 @@ const path = require('path'); const addonName = 'WebglAddon'; -const mainFile = 'xterm-addon-webgl.js'; +const mainFile = 'addon-webgl.js'; module.exports = { entry: `./out/${addonName}.js`, diff --git a/bin/publish.js b/bin/publish.js index e9c7c3e8..c9ce5e51 100644 --- a/bin/publish.js +++ b/bin/publish.js @@ -27,16 +27,16 @@ if (changedFiles.some(e => e.search(/^addons\//) === -1)) { // Publish addons if any files were changed inside of the addon const addonPackageDirs = [ - path.resolve(__dirname, '../addons/xterm-addon-attach'), - path.resolve(__dirname, '../addons/xterm-addon-canvas'), - path.resolve(__dirname, '../addons/xterm-addon-fit'), - // path.resolve(__dirname, '../addons/xterm-addon-image'), - path.resolve(__dirname, '../addons/xterm-addon-ligatures'), - path.resolve(__dirname, '../addons/xterm-addon-search'), - path.resolve(__dirname, '../addons/xterm-addon-serialize'), - path.resolve(__dirname, '../addons/xterm-addon-unicode11'), - path.resolve(__dirname, '../addons/xterm-addon-web-links'), - path.resolve(__dirname, '../addons/xterm-addon-webgl') + // path.resolve(__dirname, '../addons/xterm-addon-attach'), + // path.resolve(__dirname, '../addons/xterm-addon-canvas'), + // path.resolve(__dirname, '../addons/xterm-addon-fit'), + // // path.resolve(__dirname, '../addons/xterm-addon-image'), + // path.resolve(__dirname, '../addons/xterm-addon-ligatures'), + // path.resolve(__dirname, '../addons/xterm-addon-search'), + // path.resolve(__dirname, '../addons/xterm-addon-serialize'), + // path.resolve(__dirname, '../addons/xterm-addon-unicode11'), + // path.resolve(__dirname, '../addons/xterm-addon-web-links'), + path.resolve(__dirname, '../addons/addon-webgl') ]; console.log(`Checking if addons need to be published`); for (const p of addonPackageDirs) { @@ -70,7 +70,7 @@ function checkAndPublishPackage(packageDir) { fs.writeFileSync(packageJsonFile, JSON.stringify(packageJson, null, 2)); // Publish - const args = ['publish']; + const args = ['publish', '--access', 'public']; if (!isStableRelease) { args.push('--tag', 'beta'); } diff --git a/bin/test_playwright.js b/bin/test_playwright.js index 02c2a763..12aa0cf0 100644 --- a/bin/test_playwright.js +++ b/bin/test_playwright.js @@ -20,7 +20,7 @@ while (argv.some(e => e.startsWith('--suite='))) { let configs = [ { 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-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) { diff --git a/demo/client.ts b/demo/client.ts index a1145ab9..a8f549b6 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -16,7 +16,7 @@ import { FitAddon } from '../addons/xterm-addon-fit/out/FitAddon'; import { SearchAddon, ISearchOptions } from '../addons/xterm-addon-search/out/SearchAddon'; import { SerializeAddon } from '../addons/xterm-addon-serialize/out/SerializeAddon'; 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 { UnicodeGraphemesAddon } from '../addons/xterm-addon-unicode-graphemes/out/UnicodeGraphemesAddon'; 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 { SerializeAddon } from 'xterm-addon-serialize'; // 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 { UnicodeGraphemesAddon } from 'xterm-addon-unicode-graphemes'; // import { LigaturesAddon } from 'xterm-addon-ligatures'; diff --git a/demo/tsconfig.json b/demo/tsconfig.json index f728f20e..cd15a36d 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -12,7 +12,7 @@ "xterm-addon-search": ["../addons/xterm-addon-search"], "xterm-addon-serialize": ["../addons/xterm-addon-serialize"], "xterm-addon-web-links": ["../addons/xterm-addon-web-links"], - "xterm-addon-webgl": ["../addons/xterm-addon-webgl"] + "addon-webgl": ["../addons/addon-webgl"] } }, "include": [ diff --git a/package.json b/package.json index 70e0f4a9..d0510e5d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "xterm", + "name": "@xterm/xterm", "description": "Full xterm terminal, in your browser", "version": "5.3.0", "main": "lib/xterm.js", diff --git a/tsconfig.all.json b/tsconfig.all.json index 5d8af629..e3fc22cf 100644 --- a/tsconfig.all.json +++ b/tsconfig.all.json @@ -17,6 +17,6 @@ { "path": "./addons/xterm-addon-unicode11" }, { "path": "./addons/xterm-addon-unicode-graphemes" }, { "path": "./addons/xterm-addon-web-links" }, - { "path": "./addons/xterm-addon-webgl" } + { "path": "./addons/addon-webgl" } ] }