Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update React to v18 #46

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
58b2240
debug: add ability to dismiss exception widgets
vince-fugnitto Jul 19, 2022
f980ff1
Only show "New File/Folder" on folders (#11453)
msujew Jul 25, 2022
d1e588a
siw: update `find in folder` menu
vince-fugnitto Jul 22, 2022
21aa763
Implement automatic translation updates (#11437)
msujew Jul 26, 2022
3b3467f
deps: yarn upgrade
vince-fugnitto Jul 25, 2022
4b1220a
Harmonize definition of `LocationLink` with VSCode (#11465)
planger Jul 27, 2022
49d2316
Fix command variable returning undefined
alvsan09 Jul 26, 2022
92084ae
terminal: buffer the output before sending (#11449)
paul-marechal Jul 27, 2022
f4327c2
plugin: remove `Plugin: Deploy Plugin by Id`
vince-fugnitto Jul 13, 2022
1a5bc7a
Move local VSX and Open VSX plugins to user folder during resolution …
colin-grant-work Jul 27, 2022
d293127
cli: improve error handling when downloading (#11454)
pluralia Jul 27, 2022
4e6b739
vsx: display error message when failing to fetch (#11457)
vince-fugnitto Jul 28, 2022
2664945
Pass `StopReason` to `OnWillStopAction` methods (#11428)
colin-grant-work Jul 28, 2022
cf1b71e
Add missing vscode api in env namespace (#11446)
yiningwang11 Jul 28, 2022
39dd9ed
misc: fix typos
vince-fugnitto Jul 28, 2022
920818d
docs: update changelog for `v1.28.0`
vince-fugnitto Jul 28, 2022
0acec36
v1.28.0
vince-fugnitto Jul 28, 2022
0195178
core: update re-exports
vince-fugnitto Jul 28, 2022
56190e6
lint: add `no-unreachable` rule
vince-fugnitto Jul 28, 2022
d971520
Prevent error when text document content provider returns empty strin…
hyy215 Jul 29, 2022
9da42cf
Hide toolbars on inactive tabbars (#11480)
colin-grant-work Jul 29, 2022
0c0f8c7
Ensure download directory exists (#11486)
colin-grant-work Jul 29, 2022
220af8d
Modify theme services to use preference service (#11473)
colin-grant-work Aug 2, 2022
7e177f9
Improve Plugin Preference Access (#11393)
colin-grant-work Aug 2, 2022
5aeef6c
plugin: add `keys` support for `Memento`
vince-fugnitto Jul 29, 2022
ae5c8e8
#10027 Support EvaluatableExpressions (#11484)
ndoschek Aug 4, 2022
7b29ac6
Run automatic translation on `workflow_dispatch` (#11526)
msujew Aug 4, 2022
c617a60
Add the check in both Proxies (#11524)
colin-grant-work Aug 4, 2022
e94a923
Remove `any` types (#11490)
msujew Aug 4, 2022
5318f1e
Map vscode theme icons to codicons (#11527)
msujew Aug 4, 2022
2a7341d
terminal: add `toggle terminal` command (#11193)
jaimemartinagui Aug 5, 2022
b8df9e8
git: fix `discard changes` when deleting
vince-fugnitto Aug 4, 2022
6b71d94
nls: do not localize `Open VSX Registry`
vince-fugnitto Aug 3, 2022
bdd3261
vsx: rendering and styling updates (#11494)
yiliang114 Aug 8, 2022
a266b2e
Git blame: ensure disposal (#11540)
colin-grant-work Aug 8, 2022
4a23a1c
Implement `workbench.action.focusNthEditorGroup` (#11496)
colin-grant-work Aug 8, 2022
a49f6d4
Update React to v18
AlexandraBuzila Jul 19, 2022
34a5487
Update React to v18
AlexandraBuzila Jul 26, 2022
35f3b51
Update React to v18
AlexandraBuzila Jul 26, 2022
918b496
Update React to v18
AlexandraBuzila Aug 2, 2022
7238267
Update React to v18
AlexandraBuzila Aug 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/translation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Automatic Translation

on: workflow_dispatch

jobs:
translation:
name: Translation Update
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
registry-url: "https://registry.npmjs.org"

- name: Use Python 3.x
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Install and Build
shell: bash
run: |
yarn --skip-integrity-check --network-timeout 100000
env:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9

- id: compute-next-version
run: |
export THEIA_CORE_VERSION=$(node -p "require(\"./packages/core/package.json\").version")
echo "NEXT_VERSION_NUMBER=$(npx -q semver@7 --increment minor $THEIA_CORE_VERSION)" >> $GITHUB_ENV

- name: Perform Automatic Translation
run: |
node ./scripts/translation-update.js
env:
DEEPL_API_TOKEN: ${{ secrets.DEEPL_API_TOKEN }}

- name: Get Actor User Data
uses: octokit/request-action@v2.x
id: actor_user_data
with:
route: GET /users/{user}
user: ${{ github.actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commiter: ${{ github.actor }} <${{ fromJson(steps.actor_user_data.outputs.data).email }}>
author: ${{ github.actor }} <${{ fromJson(steps.actor_user_data.outputs.data).email }}>
branch: bot/translation-update
title: Translation update for version ${{ env.NEXT_VERSION_NUMBER }}
commit-message: Translation update for version ${{ env.NEXT_VERSION_NUMBER }}
body: Automated translation update for Theia version ${{ env.NEXT_VERSION_NUMBER }}. Triggered by @${{ github.actor }}.
labels: localization
61 changes: 54 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,63 @@

- [Previous Changelogs](https://github.com/eclipse-theia/theia/tree/master/doc/changelogs/)

## v1.28.0 - Unreleased

- [plugin] added support for property `SourceControlInputBox#visible` [#11412](https://github.com/eclipse-theia/theia/pull/11412) - Contributed on behalf of STMicroelectronics
## v1.29.0 - unreleased

- [plugin] added support for `EvaluatableExpressions` [#11484](https://github.com/eclipse-theia/theia/pull/11484) - Contributed on behalf of STMicroelectronics

<a name="breaking_changes_1.29.0">[Breaking Changes:](#breaking_changes_1.29.0)</a>

- [core] `updateThemePreference` and `updateThemeFromPreference` removed from `CommonFrontendContribution`. Corresponding functionality as been moved to the respective theme service. `load` removed from `IconThemeService` [#11473](https://github.com/eclipse-theia/theia/issues/11473)
- [core] updated `react` and `react-dom` dependencies to version 18, which introduce new root API for rendering (replaces ReactDOM.render). Since React no longer supports render callbacks, the `onRender` field from `ReactDialog` and `ReactWidget` was removed. [#11455](https://github.com/eclipse-theia/theia/pull/11455) - Contributed on behalf of STMicroelectronics

## v1.28.0 - 7/28/2022

- [cli] improved error handling when interacting with the API [#11454](https://github.com/eclipse-theia/theia/issues/11454)
- [core] added better support when unloading language packs [#11338](https://github.com/eclipse-theia/theia/pull/11338)
- [core] added proper support for null-value RPC encoding [#11396](https://github.com/eclipse-theia/theia/pull/11396)
- [core] updated `WidgetManager` to compare keys using deep equal [#11450](https://github.com/eclipse-theia/theia/issues/11450)
- [core] updated handling to pass `StopReason` to `OnWillStopAction` [#11428](https://github.com/eclipse-theia/theia/issues/11428)
- [core] updated the `caption` rendering for `ViewContainer` [#11422](https://github.com/eclipse-theia/theia/pull/11422)
- [debug] added support for `InstructionBreakpoints` [#111866](https://github.com/eclipse-theia/theia/pull/11186)
- [debug] added support for the `Disassembly` view [#11186](https://github.com/eclipse-theia/theia/pull/11186)
- [debug] added the ability to dismiss exception widgets [#11441](https://github.com/eclipse-theia/theia/issues/11441)
- [debug] fixed an issue causing an infinite loop with child debug sessions [#11388](https://github.com/eclipse-theia/theia/pull/11388)
- [file-search] updated `vscode-ripgrep` to `@vscode-ripgrep@1.14.2` [#11389](https://github.com/eclipse-theia/theia/pull/11389)
- [filesystem] fixed implementation of `FileChangeEvent#contains` [#11409](https://github.com/eclipse-theia/theia/pull/11409)
- [git] upgraded `dugite-extra` to `v0.1.16` [#11445](https://github.com/eclipse-theia/theia/issues/11445)
- [keymaps] added handling for multiple keybindings for a given command [#11363](https://github.com/eclipse-theia/theia/pull/11363)
- [markers] updated rendering of markers [#11408](https://github.com/eclipse-theia/theia/pull/11408)
- [monaco] added localization support for commands contributed by monaco [#11434](https://github.com/eclipse-theia/theia/pull/11434)
- [monaco] fixed `activeItem` handling in the `QuickPick` menu [#11438](https://github.com/eclipse-theia/theia/pull/11438)
- [monaco] improved `tokenization` performance [#11416](https://github.com/eclipse-theia/theia/pull/11416)
- [monaco] upgraded monaco to VS Code `v1.67.2` [#11331](https://github.com/eclipse-theia/theia/pull/11331)
- [navigator] updated `New File` and `New Folder` to only appear for folders [#11453](https://github.com/eclipse-theia/theia/issues/11453)
- [navigator] updated explorer toolbar items [#11429](https://github.com/eclipse-theia/theia/pull/11429)
- [plugin] added support for `activeParameter` in the `SignatureInformation` VS Code API [#11426](https://github.com/eclipse-theia/theia/pull/11426)
- [plugin] added support for `title` in the `QuickPickOptions` VS Code API [#11418](https://github.com/eclipse-theia/theia/pull/11418)
- [plugin] added support for `vscode.env` VS Code API namespace [#11446](https://github.com/eclipse-theia/theia/issues/11446)
- [plugin] added support for all selected URIs in command execution [#11433](https://github.com/eclipse-theia/theia/pull/11433)
- [plugin] added support for the `DebugProtocolBreakpoint` and `DebugProtocolSource` VS Code API [#10011](https://github.com/eclipse-theia/theia/issues/10011) - Contributed on behalf of STMicroelectronics
- [plugin] added support for the `TerminalOptions#message` VS Code API [#11385](https://github.com/eclipse-theia/theia/pull/11835)
- [plugin] added support for the `workbench.action.saveWorkspaceAs` command [#11395](https://github.com/eclipse-theia/theia/pull/11395)
- [plugin] added support for the property `SourceControlInputBox#visible` [#11412](https://github.com/eclipse-theia/theia/pull/11412) - Contributed on behalf of STMicroelectronics
- [plugin] updated `LocationLink` definition [#11465](https://github.com/eclipse-theia/theia/issues/11456)
- [preferences] added handling to properly dispose the model after saving [#11410](https://github.com/eclipse-theia/theia/pull/11410)
- [process] improved performance of `lsof` on `macOS` [#11411](https://github.com/eclipse-theia/theia/pull/11411)
- [search-in-workspace] updated `Find in Folder` to only apply for folders [#11456](https://github.com/eclipse-theia/theia/issues/11456)
- [search-in-workspace] updated `vscode-ripgrep` to `@vscode-ripgrep@1.14.2` [#11389](https://github.com/eclipse-theia/theia/pull/11389)
- [terminal] added output buffering support [#11449](https://github.com/eclipse-theia/theia/issues/11449)
- [variable-resolver] added handling for user cancellation of variables [#11406](https://github.com/eclipse-theia/theia/pull/11406)
- [vsx-registry] updated the extensions view to display a message when failing to fetch extensions [#11457](https://github.com/eclipse-theia/theia/issues/11457)

<a name="breaking_changes_1.28.0">[Breaking Changes:](#breaking_changes_1.28.0)</a>

- [core] `handleDefault`, `handleElectronDefault` method no longer called in `BrowserMainMenuFactory.registerMenu()`, `DynamicMenuWidget.buildSubMenus()` or `ElectronMainMenuFactory.fillSubmenus()`. Override the respective calling function rather than `handleDefault`. The argument to each of the three methods listed above is now `MenuNode` and not `CompositeMenuNode`, and the methods are truly recursive and called on entire menu tree. `ActionMenuNode.action` removed; access relevant field on `ActionMenuNode.command`, `.when` etc. [#11290](https://github.com/eclipse-theia/theia/pull/11290)
- [core] renamed `CommonCommands.NEW_FILE` to `CommonCommands.NEW_UNTITLED_FILE` [#11429](https://github.com/eclipse-theia/theia/pull/11429)
- [plugin-ext] `CodeEditorWidgetUtil` moved to `packages/plugin-ext/src/main/browser/menus/vscode-theia-menu-mappings.ts`. `MenusContributionPointHandler` extensively refactored. See PR description for details. [#11290](https://github.com/eclipse-theia/theia/pull/11290)
- [plugin] added support for `DebugProtocolBreakpoint` and `DebugProtocolSource` [#10011](https://github.com/eclipse-theia/theia/issues/10011) - Contributed on behalf of STMicroelectronics
- [plugin] `CodeEditorWidgetUtil` moved to `packages/plugin-ext/src/main/browser/menus/vscode-theia-menu-mappings.ts`. `MenusContributionPointHandler` extensively refactored. See PR description for details. [#11290](https://github.com/eclipse-theia/theia/pull/11290)
- [plugin] `LocalFilePluginDeployerResolver` moved to `plugin-ext` `local-vsix-file-plugin-deployer-resolver.ts`. [#11466](https://github.com/eclipse-theia/theia/issues/11466)
- [plugin] removed `Plugin: Deploy Plugin by Id` command [#11417](https://github.com/eclipse-theia/theia/pull/11417)
- [vsx-registry] removed `downloadPath` field from `VSXExtensionResolver`. Plugins are now placed directly in user plugin directory. [#11466](https://github.com/eclipse-theia/theia/issues/11466)

## v1.27.0 - 6/30/2022

Expand Down Expand Up @@ -273,7 +320,7 @@
- [core] fixed tail decoration rendering for the `TreeWidget` [#10898](https://github.com/eclipse-theia/theia/pull/10898)
- [core] improved tabbar styling [#10822](https://github.com/eclipse-theia/theia/pull/10822)
- [core] updated sash visibility handling [#10941](https://github.com/eclipse-theia/theia/pull/10941)
- [core] updated type check for `TreeContainerPRops` [#10881](https://github.com/eclipse-theia/theia/pull/10881)
- [core] updated type check for `TreeContainerProps` [#10881](https://github.com/eclipse-theia/theia/pull/10881)
- [core] updated validation warning for `undefined` preference values [#10887](https://github.com/eclipse-theia/theia/pull/10887)
- [core] updated view container styling [#10854](https://github.com/eclipse-theia/theia/pull/10854)
- [debug] fixed issue where the current debug configuration was not updated [#10917](https://github.com/eclipse-theia/theia/pull/10917)
Expand Down Expand Up @@ -389,7 +436,7 @@

<a name="breaking_changes_1.23.0">[Breaking Changes:](#breaking_changes_1.23.0)</a>

- [core] moved methods `attachReadyToShow`, `restoreMaximizedState`, `attachCloseListeners`, `handleStopRequest`, `checkSafeToStop`, `handleReload`, `reload` from `ElectronMainAPplication` into new class `TheiaElectronWindow` [#10600](https://github.com/eclipse-theia/theia/pull/10600)
- [core] moved methods `attachReadyToShow`, `restoreMaximizedState`, `attachCloseListeners`, `handleStopRequest`, `checkSafeToStop`, `handleReload`, `reload` from `ElectronMainApplication` into new class `TheiaElectronWindow` [#10600](https://github.com/eclipse-theia/theia/pull/10600)
- [core] removed all of our own custom HTTP Polling implementation [#10514](https://github.com/eclipse-theia/theia/pull/10514)
- [core] removed method `attachGlobalShortcuts` from `ElectronMainApplication`. Attaching shortcuts in that way interfered with internal shortcuts. Use internal keybindings instead of global shortcuts. [#10704](https://github.com/eclipse-theia/theia/pull/10704)
- [core] removed the `Event.maxListeners` field; The feature still exists but please use `Event.getMaxListeners(event)` and `Event.setMaxListeners(event, maxListeners)` instead.
Expand Down
1 change: 1 addition & 0 deletions configs/errors.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-underscore-dangle": "off",
"no-unreachable": "error",
"no-unused-expressions": "error",
"no-var": "error",
"no-void": "error",
Expand Down
8 changes: 4 additions & 4 deletions dev-packages/application-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theia/application-manager",
"version": "1.27.0",
"version": "1.28.0",
"description": "Theia application manager API.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -33,8 +33,8 @@
"@babel/plugin-transform-classes": "^7.10.0",
"@babel/plugin-transform-runtime": "^7.10.0",
"@babel/preset-env": "^7.10.0",
"@theia/application-package": "1.27.0",
"@theia/ffmpeg": "1.27.0",
"@theia/application-package": "1.28.0",
"@theia/ffmpeg": "1.28.0",
"@types/fs-extra": "^4.0.2",
"@types/semver": "^7.3.8",
"babel-loader": "^8.2.2",
Expand Down Expand Up @@ -70,7 +70,7 @@
}
},
"devDependencies": {
"@theia/ext-scripts": "1.27.0",
"@theia/ext-scripts": "1.28.0",
"@types/node-abi": "*"
},
"nyc": {
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/application-package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theia/application-package",
"version": "1.27.0",
"version": "1.28.0",
"description": "Theia application package API.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -42,7 +42,7 @@
"write-json-file": "^2.2.0"
},
"devDependencies": {
"@theia/ext-scripts": "1.27.0"
"@theia/ext-scripts": "1.28.0"
},
"nyc": {
"extends": "../../configs/nyc.json"
Expand Down
14 changes: 7 additions & 7 deletions dev-packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theia/cli",
"version": "1.27.0",
"version": "1.28.0",
"description": "Theia CLI.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -30,12 +30,12 @@
"clean": "theiaext clean"
},
"dependencies": {
"@theia/application-manager": "1.27.0",
"@theia/application-package": "1.27.0",
"@theia/ffmpeg": "1.27.0",
"@theia/localization-manager": "1.27.0",
"@theia/ovsx-client": "1.27.0",
"@theia/request": "1.27.0",
"@theia/application-manager": "1.28.0",
"@theia/application-package": "1.28.0",
"@theia/ffmpeg": "1.28.0",
"@theia/localization-manager": "1.28.0",
"@theia/ovsx-client": "1.28.0",
"@theia/request": "1.28.0",
"@types/chai": "^4.2.7",
"@types/mocha": "^5.2.7",
"@types/node-fetch": "^2.5.7",
Expand Down
18 changes: 11 additions & 7 deletions dev-packages/cli/src/download-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,17 @@ export default async function downloadPlugins(options: DownloadPluginsOptions =
// De-duplicate extension ids to only download each once:
const ids = new Set<string>(dependencies.flat());
await parallelOrSequence(...Array.from(ids, id => async () => {
const extension = await client.getLatestCompatibleExtensionVersion(id);
const version = extension?.version;
const downloadUrl = extension?.files.download;
if (downloadUrl) {
await downloadPlugin({ id, downloadUrl, version });
} else {
failures.push(`No download url for extension pack ${id} (${version})`);
try {
const extension = await client.getLatestCompatibleExtensionVersion(id);
const version = extension?.version;
const downloadUrl = extension?.files.download;
if (downloadUrl) {
await downloadPlugin({ id, downloadUrl, version });
} else {
failures.push(`No download url for extension pack ${id} (${version})`);
}
} catch (err) {
failures.push(err.message);
}
}));
};
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/ffmpeg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theia/ffmpeg",
"version": "1.27.0",
"version": "1.28.0",
"description": "Theia FFMPEG reader utility.",
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/localization-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theia/localization-manager",
"version": "1.27.0",
"version": "1.28.0",
"description": "Theia localization manager API.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -39,7 +39,7 @@
"typescript": "~4.5.5"
},
"devDependencies": {
"@theia/ext-scripts": "1.27.0"
"@theia/ext-scripts": "1.28.0"
},
"nyc": {
"extends": "../../configs/nyc.json"
Expand Down
11 changes: 11 additions & 0 deletions dev-packages/localization-manager/src/localization-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,15 @@ describe('localization-manager#translateLanguage', () => {
a: 'b'
});
});

it('should keep placeholders intact', async () => {
const input = {
key: '{1} {0}'
};
const target = {};
await manager.translateLanguage(input, target, 'EN', defaultOptions);
assert.deepStrictEqual(target, {
key: '[{1} {0}]'
});
});
});
14 changes: 12 additions & 2 deletions dev-packages/localization-manager/src/localization-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ export class LocalizationManager {
free_api: options.freeApi,
target_lang: targetLanguage.toUpperCase() as DeeplLanguage,
source_lang: options.sourceLanguage?.toUpperCase() as DeeplLanguage,
text: map.text
text: map.text.map(e => this.addIgnoreTags(e)),
tag_handling: ['xml'],
ignore_tags: ['x']
});
translationResponse.translations.forEach(({ text }, i) => {
map.localize(i, text);
map.localize(i, this.removeIgnoreTags(text));
});
console.log(chalk.green(`Successfully translated ${map.text.length} value${map.text.length > 1 ? 's' : ''} for language "${targetLanguage}"`));
} catch (e) {
Expand All @@ -106,6 +108,14 @@ export class LocalizationManager {
}
}

protected addIgnoreTags(text: string): string {
return text.replace(/(\{\d*\})/g, '<x>$1</x>');
}

protected removeIgnoreTags(text: string): string {
return text.replace(/<x>(\{\d+\})<\/x>/g, '$1');
}

protected buildLocalizationMap(source: Localization, target: Localization): LocalizationMap {
const functionMap = new Map<number, (value: string) => void>();
const text: string[] = [];
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/ovsx-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theia/ovsx-client",
"version": "1.27.0",
"version": "1.28.0",
"description": "Theia Open-VSX Client",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -29,7 +29,7 @@
"watch": "theiaext watch"
},
"dependencies": {
"@theia/request": "1.27.0",
"@theia/request": "1.28.0",
"semver": "^5.4.1"
}
}
6 changes: 2 additions & 4 deletions dev-packages/ovsx-client/src/ovsx-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,8 @@ export interface VSXResponseError extends Error {
}

export namespace VSXResponseError {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function is(error: any): error is VSXResponseError {
return !!error && typeof error === 'object'
&& 'statusCode' in error && typeof error['statusCode'] === 'number';
export function is(error: unknown): error is VSXResponseError {
return !!error && typeof error === 'object' && typeof (error as VSXResponseError).statusCode === 'number';
}
}

Expand Down
8 changes: 4 additions & 4 deletions dev-packages/private-eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"private": true,
"name": "@theia/eslint-plugin",
"version": "1.27.0",
"version": "1.28.0",
"description": "Custom ESLint rules for developing Theia extensions and applications",
"main": "index.js",
"scripts": {
"prepare": "tsc -b"
},
"dependencies": {
"@theia/core": "1.27.0",
"@theia/ext-scripts": "1.27.0",
"@theia/re-exports": "1.27.0",
"@theia/core": "1.28.0",
"@theia/ext-scripts": "1.28.0",
"@theia/re-exports": "1.28.0",
"js-levenshtein": "^1.1.6"
}
}
2 changes: 1 addition & 1 deletion dev-packages/private-ext-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@theia/ext-scripts",
"version": "1.27.0",
"version": "1.28.0",
"license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
"description": "NPM scripts for Theia packages.",
"bin": {
Expand Down
Loading