Skip to content

Commit

Permalink
Merge branch 'master' into GH-12745-remove-from-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasHelming committed Feb 23, 2024
2 parents d352ed7 + df6341a commit 47cd9eb
Show file tree
Hide file tree
Showing 431 changed files with 12,142 additions and 4,495 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish Next

permissions:
id-token: write

on: workflow_dispatch

jobs:
publish:
name: Perform Publishing
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Use Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install
shell: bash
run: |
yarn global add node-gyp
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

- name: Publish NPM
shell: bash
run: |
yarn publish:next
env:
NPM_CONFIG_PROVENANCE: "true"
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
73 changes: 73 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Publish Release

permissions:
id-token: write

on:
workflow_dispatch:
inputs:
release_type:
description: 'Release Type'
required: true
default: 'minor'
type: choice
options:
- 'minor'
- 'patch'

jobs:
publish:
name: Perform Publishing
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Use Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install
shell: bash
run: |
yarn global add node-gyp
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

- name: Publish NPM
shell: bash
run: |
yarn publish:latest -- ${{ inputs.release_type }}
yarn publish:check
env:
NPM_CONFIG_PROVENANCE: "true" # enable provenance check
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_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@v6
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/package-update
title: Package update for version ${{ env.NEXT_VERSION_NUMBER }}
commit-message: Package update for version ${{ env.NEXT_VERSION_NUMBER }}
body: Automated package update for Theia version ${{ env.NEXT_VERSION_NUMBER }}. Triggered by @${{ github.actor }}.
9 changes: 3 additions & 6 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ ports:
- port: 9339 # Node.js debug port
onOpen: ignore
tasks:
- init: yarn --network-timeout 100000 && yarn build:examples && yarn download:plugins
- init: yarn --network-timeout 100000 && yarn browser build && yarn download:plugins
command: >
jwm &
yarn --cwd examples/browser start ../.. --hostname=0.0.0.0
github:
prebuilds:
pullRequestsFromForks: true
yarn browser start ../.. --hostname=0.0.0.0
vscode:
extensions:
- dbaeumer.vscode-eslint@2.0.0:CwAMx4wYz1Kq39+1Aul4VQ==
- dbaeumer.vscode-eslint
62 changes: 58 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,62 @@

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

## not yet released

- [plugin] stub multiDocumentHighlightProvider proposed API [#13248](https://github.com/eclipse-theia/theia/pull/13248) - contributed on behalf of STMicroelectronics
- [terminal] update terminalQuickFixProvider proposed API according to vscode 1.85 version [#13240](https://github.com/eclipse-theia/theia/pull/13240) - contributed on behalf of STMicroelectronics
## v1.47.0 not yet released

- [component] add here

<a name="breaking_changes_not_yet_released">[Breaking Changes:](#breaking_changes_not_yet_released)</a>
- [monaco] Upgrade Monaco dependency to 1.83.1 [#13217](https://github.com/eclipse-theia/theia/pull/13217)- contributed on behalf of STMicroelectronics\
There are a couple of breaking changes that come with this monaco update
- Moved `ThemaIcon` and `ThemeColor` to the common folder
- Minor typing adjustments in QuickPickService: in parti
- FileUploadService: moved id field from data transfer item to the corresponding file info
- The way we instantiate monaco services has changed completely: if you touch monaco services in your code, please read the description in the
file comment in `monaco-init.ts`.

## v1.46.0 - 01/25/2024
- [plugin] Add prefix to contributed view container ids [#13362](https://github.com/eclipse-theia/theia/pull/13362) - contributed on behalf of STMicroelectronics
- [application-manager] updated message for missing Electron main entries [#13242](https://github.com/eclipse-theia/theia/pull/13242)
- [application-package] bumped the default supported API from `1.84.2` to `1.85.1` [#13276](https://github.com/eclipse-theia/theia/pull/13276) - contributed on behalf of STMicroelectronics
- [browser-only] added support for 'browser-only' Theia [#12853](https://github.com/eclipse-theia/theia/pull/12853)
- [builtins] update built-ins to version 1.83.1 [#13298](https://github.com/eclipse-theia/theia/pull/13298) - contributed on behalf of STMicroelectronics
- [core] added keybindings to toggle the tree checkbox [#13271](https://github.com/eclipse-theia/theia/pull/13271)
- [core] added logic to dispose cancellation event listeners [#13254](https://github.com/eclipse-theia/theia/pull/13254)
- [core] added preference 'workbench.tree.indent' to control the indentation in the tree widget [#13179](https://github.com/eclipse-theia/theia/pull/13179) - contributed on behalf of STMicroelectronics
- [core] fixed copy/paste from a menu in electron [#13220](https://github.com/eclipse-theia/theia/pull/13220) - contributed on behalf of STMicroelectronics
- [core] fixed file explorer progress bar issue [#13268](https://github.com/eclipse-theia/theia/pull/13268)
- [core] fixed issue with cyclic menu contributions [#13264](https://github.com/eclipse-theia/theia/pull/13264)
- [core] fixed leak when reconnecting to back end without reload [#13250](https://github.com/eclipse-theia/theia/pull/13250) - contributed on behalf of STMicroelectronics
- [core] fixed SelectComponent to render dropdown correctly in dialog [#13261](https://github.com/eclipse-theia/theia/pull/13261)
- [core] removed error logs from RpcProxyFactory [#13191](https://github.com/eclipse-theia/theia/pull/13191)
- [documentation] improved documentation about 'ContributionProvider' use [#13278](https://github.com/eclipse-theia/theia/pull/13278)
- [docuemtnation] improved documentation on passing objects across RPC [#13238](https://github.com/eclipse-theia/theia/pull/13238)
- [documentation] updated plugin API docs for headless plugins and Inversify DI [#13299](https://github.com/eclipse-theia/theia/pull/13299)
- [filesystem] updated logic to only read unbuffered when we read the whole file [#13197](https://github.com/eclipse-theia/theia/pull/13197)
- [headless-plugin] added support for "headless plugins" in a new plugin host [#13138](https://github.com/eclipse-theia/theia/pull/13138)
- [monaco] updated logic to add document URI as context to getDefaultFormatter [#13280](https://github.com/eclipse-theia/theia/pull/13280) - contributed on behalf of STMicroelectronics
- [notebook] fixed dynamic notebook widgets resizing [#13289](https://github.com/eclipse-theia/theia/pull/13289)
- [notebook] fixed multiple problems with the notebook output rendering [#13239](https://github.com/eclipse-theia/theia/pull/13239)
- [notebook] improved notebook error logging [#13256](https://github.com/eclipse-theia/theia/pull/13256)
- [plugin] added logic to synchronize messages sent via different proxies [#13180](https://github.com/eclipse-theia/theia/pull/13180)
- [remote] added support for specifying the port of a remote SSH connection [#13296](https://github.com/eclipse-theia/theia/pull/13296) - contributed on behalf of STMicroelectronics
- [plugin] fixed inputbox onTriggerButton() event [#13207](https://github.com/eclipse-theia/theia/pull/13207) - contributed on behalf of STMicroelectronics
- [plugin] fixed localization for the removeSession method [#13257](https://github.com/eclipse-theia/theia/pull/13257)
- [plugin] fixed `vscode.env.appRoot` path [#13285](https://github.com/eclipse-theia/theia/pull/13285)
- [plugin] stubbed multiDocumentHighlightProvider proposed API [#13248](https://github.com/eclipse-theia/theia/pull/13248) - contributed on behalf of STMicroelectronics
- [plugin] updated logic to handle activeCustomEditorId [#13267](https://github.com/eclipse-theia/theia/pull/13267)
- [plugin] updated logic to pass context to webview context menu action [#13228](https://github.com/eclipse-theia/theia/pull/13228)
- [plugin] updated logic to use more stable hostname for webviews [#13092](https://github.com/eclipse-theia/theia/pull/13225) [#13258](https://github.com/eclipse-theia/theia/pull/13265)
- [terminal] fixed wording in error message [#13245](https://github.com/eclipse-theia/theia/pull/13245) - contributed on behalf of STMicroelectronics
- [terminal] renamed terminal.sendText() parameter from addNewLine to shouldExecute [#13236](https://github.com/eclipse-theia/theia/pull/13236) - contributed on behalf of STMicroelectronics
- [terminal] updated logic to resize terminal [#13281](https://github.com/eclipse-theia/theia/pull/13281)
- [terminal] updated terminalQuickFixProvider proposed API according to vscode 1.85 version [#13240](https://github.com/eclipse-theia/theia/pull/13240) - contributed on behalf of STMicroelectronics
- [vsx-registry] implemented verified extension filtering [#12995](https://github.com/eclipse-theia/theia/pull/12995)

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

- [core] moved `FileUri` from `node` package to `common` [#12853](https://github.com/eclipse-theia/theia/pull/12853)
- [plugin] introduced new common interfaces/classes for reuse by different plugin hosts [#13138](https://github.com/eclipse-theia/theia/pull/13138)

## v1.45.0 - 12/21/2023

Expand Down Expand Up @@ -185,6 +237,8 @@

- [deps] bumped supported Node.js version from 16.x to >=18, you may need to update your environments [#12711](https://github.com/eclipse-theia/theia/pull/12711)
- [preferences] removed the `welcome.alwaysShowWelcomePage` preference in favor of `workbench.startupEditor` [#12813](https://github.com/eclipse-theia/theia/pull/12813)
- [terminal] deprecated `terminal.integrated.rendererType` preference [#12691](https://github.com/eclipse-theia/theia/pull/12691)
- [terminal] removed protected method `TerminalWidgetImpl.getTerminalRendererType` [#12691](https://github.com/eclipse-theia/theia/pull/12691)

## v1.40.0 - 07/27/2023

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<div id="badges" align="center">

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-curved)](https://github.com/eclipse-theia/theia/labels/help%20wanted)
[![Discourse status](https://img.shields.io/discourse/status?label=Chat&server=https%3A%2F%2Fcommunity.theia-ide.org%2F)](https://community.theia-ide.org/)
[![Build Status](https://github.com/eclipse-theia/theia/workflows/Build/badge.svg?branch=master)](https://github.com/eclipse-theia/theia/actions?query=branch%3Amaster+event%3Apush+event%3Aschedule)
[![Publish VS Code Built-in Extensions](https://github.com/eclipse-theia/vscode-builtin-extensions/actions/workflows/publish-vsx-latest.yml/badge.svg?branch=master)](https://github.com/eclipse-theia/vscode-builtin-extensions/actions/workflows/publish-vsx-latest.yml)
[![Open questions](https://img.shields.io/badge/Open-questions-blue.svg?style=flat-curved)](https://github.com/eclipse-theia/theia/discussions/categories/q-a)
Expand Down Expand Up @@ -88,7 +87,7 @@ Read below to learn how to take part in improving Theia:

Read below how to engage with Theia community:

- Join the discussion on [Discourse](https://community.theia-ide.org/).
- Join the discussion on [GitHub](https://github.com/eclipse-theia/theia/discussions).
- Ask a question, request a new feature and file a bug with [GitHub issues](https://github.com/eclipse-theia/theia/issues/new/choose).
- Vote on existing GitHub issues by reacting with a 👍. We regularly check issues with votes!
- Star the repository to show your support.
Expand Down
1 change: 1 addition & 0 deletions configs/base.tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"strictNullChecks": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"importHelpers": true,
"downlevelIteration": true,
"resolveJsonModule": true,
"module": "CommonJS",
Expand Down
12 changes: 7 additions & 5 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.45.0",
"version": "1.46.0",
"description": "Theia application manager API.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -33,9 +33,9 @@
"@babel/plugin-transform-classes": "^7.10.0",
"@babel/plugin-transform-runtime": "^7.10.0",
"@babel/preset-env": "^7.10.0",
"@theia/application-package": "1.45.0",
"@theia/ffmpeg": "1.45.0",
"@theia/native-webpack-plugin": "1.45.0",
"@theia/application-package": "1.46.0",
"@theia/ffmpeg": "1.46.0",
"@theia/native-webpack-plugin": "1.46.0",
"@types/fs-extra": "^4.0.2",
"@types/semver": "^7.5.0",
"babel-loader": "^8.2.2",
Expand All @@ -45,6 +45,7 @@
"css-loader": "^6.2.0",
"electron-rebuild": "^3.2.7",
"fs-extra": "^4.0.2",
"http-server": "^14.1.1",
"ignore-loader": "^0.1.2",
"less": "^3.0.3",
"mini-css-extract-plugin": "^2.6.1",
Expand All @@ -58,6 +59,7 @@
"source-map-support": "^0.5.19",
"string-replace-loader": "^3.1.0",
"style-loader": "^2.0.0",
"tslib": "^2.6.2",
"umd-compat-loader": "^2.1.2",
"webpack": "^5.76.0",
"webpack-cli": "4.7.0",
Expand All @@ -73,7 +75,7 @@
}
},
"devDependencies": {
"@theia/ext-scripts": "1.45.0",
"@theia/ext-scripts": "1.46.0",
"@types/node-abi": "*"
},
"nyc": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,32 @@ export class ApplicationPackageManager {
start(args: string[] = []): cp.ChildProcess {
if (this.pck.isElectron()) {
return this.startElectron(args);
} else if (this.pck.isBrowserOnly()) {
return this.startBrowserOnly(args);
}
return this.startBrowser(args);
}

startBrowserOnly(args: string[]): cp.ChildProcess {
const { command, mainArgs, options } = this.adjustBrowserOnlyArgs(args);
return this.__process.spawnBin(command, mainArgs, options);
}

adjustBrowserOnlyArgs(args: string[]): Readonly<{ command: string, mainArgs: string[]; options: cp.SpawnOptions }> {
let { mainArgs, options } = this.adjustArgs(args);

// first parameter: path to generated frontend
// second parameter: disable cache to support watching
mainArgs = ['lib/frontend', '-c-1', ...mainArgs];

const portIndex = mainArgs.findIndex(v => v.startsWith('--port'));
if (portIndex === -1) {
mainArgs.push('--port=3000');
}

return { command: 'http-server', mainArgs, options };
}

startElectron(args: string[]): cp.ChildProcess {
// If possible, pass the project root directory to electron rather than the script file so that Electron
// can determine the app name. This requires that the package.json has a main field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export abstract class AbstractGenerator {
return this.pck.ifElectron(value, defaultValue);
}

protected ifBrowserOnly(value: string, defaultValue: string = ''): string {
return this.pck.ifBrowserOnly(value, defaultValue);
}

protected async write(path: string, content: string): Promise<void> {
await fs.ensureFile(path);
await fs.writeFile(path, content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ import { AbstractGenerator } from './abstract-generator';
export class BackendGenerator extends AbstractGenerator {

async generate(): Promise<void> {
if (this.pck.isBrowserOnly()) {
// no backend generation in case of browser-only target
return;
}
const backendModules = this.pck.targetBackendModules;
await this.write(this.pck.backend('server.js'), this.compileServer(backendModules));
await this.write(this.pck.backend('main.js'), this.compileMain(backendModules));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class FrontendGenerator extends AbstractGenerator {

async generate(options?: GeneratorOptions): Promise<void> {
await this.write(this.pck.frontend('index.html'), this.compileIndexHtml(this.pck.targetFrontendModules));
await this.write(this.pck.frontend('index.js'), this.compileIndexJs(this.pck.targetFrontendModules, this.pck.frontendPreloadModules));
await this.write(this.pck.frontend('index.js'), this.compileIndexJs(this.pck.targetFrontendModules, this.pck.targetFrontendPreloadModules));
await this.write(this.pck.frontend('secondary-window.html'), this.compileSecondaryWindowHtml());
await this.write(this.pck.frontend('secondary-index.js'), this.compileSecondaryIndexJs(this.pck.secondaryWindowModules));
if (this.pck.isElectron()) {
Expand Down Expand Up @@ -109,21 +109,37 @@ ${Array.from(frontendPreloadModules.values(), jsModulePath => `\
module.exports = (async () => {
const { messagingFrontendModule } = require('@theia/core/lib/${this.pck.isBrowser()
? 'browser/messaging/messaging-frontend-module'
: 'electron-browser/messaging/electron-messaging-frontend-module'}');
? 'browser/messaging/messaging-frontend-module'
: 'electron-browser/messaging/electron-messaging-frontend-module'}');
const container = new Container();
container.load(messagingFrontendModule);
${this.ifBrowserOnly(`const { messagingFrontendOnlyModule } = require('@theia/core/lib/browser-only/messaging/messaging-frontend-only-module');
container.load(messagingFrontendOnlyModule);`)}
await preload(container);
${this.ifMonaco(() => `
const { MonacoInit } = require('@theia/monaco/lib/browser/monaco-init');
`)};
const { FrontendApplication } = require('@theia/core/lib/browser');
const { frontendApplicationModule } = require('@theia/core/lib/browser/frontend-application-module');
const { loggerFrontendModule } = require('@theia/core/lib/browser/logger-frontend-module');
container.load(frontendApplicationModule);
${this.pck.ifBrowserOnly(`const { frontendOnlyApplicationModule } = require('@theia/core/lib/browser-only/frontend-only-application-module');
container.load(frontendOnlyApplicationModule);`)}
container.load(loggerFrontendModule);
${this.ifBrowserOnly(`const { loggerFrontendOnlyModule } = require('@theia/core/lib/browser-only/logger-frontend-only-module');
container.load(loggerFrontendOnlyModule);`)}
try {
${Array.from(frontendModules.values(), jsModulePath => `\
await load(container, ${this.importOrRequire()}('${jsModulePath}'));`).join(EOL)}
${this.ifMonaco(() => `
MonacoInit.init(container);
`)};
await start();
} catch (reason) {
console.error('Failed to start the frontend application.');
Expand Down

0 comments on commit 47cd9eb

Please sign in to comment.