mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-07 06:02:06 -04:00
chore(deps): replace deprecated xterm packages
This commit is contained in:
@@ -8,7 +8,7 @@ import { useMediaQuery } from 'react-responsive';
|
||||
import { bindActionCreators, Dispatch } from 'redux';
|
||||
import store from 'store';
|
||||
import { editor } from 'monaco-editor';
|
||||
import type { FitAddon } from 'xterm-addon-fit';
|
||||
import type { FitAddon } from '@xterm/addon-fit';
|
||||
|
||||
import { useFeature } from '@growthbook/growthbook-react';
|
||||
import { challengeTypes } from '@freecodecamp/shared/config/challenge-types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { MutableRefObject, useEffect, useRef } from 'react';
|
||||
import type { IDisposable, Terminal } from 'xterm';
|
||||
import type { FitAddon } from 'xterm-addon-fit';
|
||||
import type { FitAddon } from '@xterm/addon-fit';
|
||||
import type { IDisposable, Terminal } from '@xterm/xterm';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { registerTerminal } from '../utils/python-worker-handler';
|
||||
@@ -35,8 +35,8 @@ export const XtermTerminal = ({
|
||||
|
||||
async function createTerminal() {
|
||||
const disposables: IDisposable[] = [];
|
||||
const { Terminal } = await import('xterm');
|
||||
const { FitAddon } = await import('xterm-addon-fit');
|
||||
const { Terminal } = await import('@xterm/xterm');
|
||||
const { FitAddon } = await import('@xterm/addon-fit');
|
||||
|
||||
// Setting convertEol so that \n is converted to \r\n. Otherwise the terminal
|
||||
// will interpret \n as line feed and just move the cursor to the next line.
|
||||
|
||||
Reference in New Issue
Block a user