Skip to content

Commit

Permalink
Merge branch 'master' into 8349-support-vscode-settings-schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
danarad05 committed Dec 2, 2020
2 parents 2081604 + 3bc2c2b commit 6032007
Show file tree
Hide file tree
Showing 98 changed files with 1,265 additions and 757 deletions.
120 changes: 120 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Build

on:
push:
branches:
- master
workflow_dispatch:
pull_request:
branches:
- master
schedule:
- cron: '0 4 * * *' # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule

jobs:

build:
name: ${{ matrix.os }}, Node.js v${{ matrix.node }}, Python ${{ matrix.python }}

strategy:
fail-fast: false
matrix:
os: [windows-2019, ubuntu-18.04, macos-10.15]
node: ['12.x']
python: ['2.x']
include:
- os: ubuntu-18.04
node: '12.x'
python: '3.x'
tests: 'skip'

runs-on: ${{ matrix.os }}
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # To fetch all history for all branches and tags. (Will be required for caching with lerna: https://github.com/markuplint/markuplint/pull/111)

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Build
shell: bash
run: |
yarn --skip-integrity-check --network-timeout 100000
npx electron-replace-ffmpeg
npx electron-codecs-test
./scripts/check_git_status.sh
env:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9

- name: Test (headless)
if: matrix.tests != 'skip'
shell: bash
run: |
yarn test:theia
- name: Test (browser)
if: matrix.tests != 'skip' && runner.os == 'Linux'
uses: GabrielBB/xvfb-action@v1
with:
run: yarn test:browser

- name: Test (electron)
if: matrix.tests != 'skip' && runner.os == 'Linux'
uses: GabrielBB/xvfb-action@v1
with:
run: yarn test:electron

publish:
needs: build
if: github.ref == 'refs/heads/master' && github.event_name != 'schedule' # We still publish the manually dispatched workflows: 'workflow_dispatch'.
runs-on: ubuntu-18.04

# The current approach is silly. We should be smarter and use `actions/upload-artifact` and `actions/download-artifact` instead of rebuilding
# everything from scratch again. (git checkout, Node.js install, yarn, etc.) It was not possible to share artifacts on Travis CI without an
# external storage (such as S3), so we did rebuild everything before the npm publish. We should overcome this limitation with GH Actions.

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # To fetch all history for all branches and tags. (Will be required for caching with lerna: https://github.com/markuplint/markuplint/pull/111)

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

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

- name: Publish npm
run: |
yarn --skip-integrity-check --network-timeout 100000
yarn docs
yarn publish:next
env:
NODE_OPTIONS: --max_old_space_size=4096
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # The variable name comes from here: https://github.com/actions/setup-node/blob/70b9252472eee7495c93bb1588261539c3c2b98d/src/authutil.ts#L48

- name: Publish GH Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Change Log

## v1.8.0 - 26/11/2020

- [api-tests] fixed issue with `saveable` test suite [#8736](https://github.com/eclipse-theia/theia/pull/8736)
- [application-manager] enabled `monaco-editor.*` sourcemaps when debugging [#8744](https://github.com/eclipse-theia/theia/pull/8744)
- [console] updated the `anser` import workaround [#8741](https://github.com/eclipse-theia/theia/pull/8741)
- [core] added ability to filter tree nodes [#8540](https://github.com/eclipse-theia/theia/pull/8540)
- [debug] fixed issue where the debug-view is not properly updated when hidden [#8645](https://github.com/eclipse-theia/theia/pull/8645)
- [documentation] improved documentation for `@theia/cli` electron configurations [#8699](https://github.com/eclipse-theia/theia/pull/8699)
- [documentation] improved documentation for `BackendApplicationContribution` [#8686](https://github.com/eclipse-theia/theia/pull/8686)
- [documentation] improved documentation for `MenuContribution` [#8715](https://github.com/eclipse-theia/theia/pull/8715)
- [documentation] improved documentation for `MessageService` [#8688](https://github.com/eclipse-theia/theia/pull/8688)
- [documentation] improved documentation for `PreferenceContribution` [#8677](https://github.com/eclipse-theia/theia/pull/8677)
- [documentation] improved documentation for `Task` API [#8695](https://github.com/eclipse-theia/theia/pull/8695)
- [documentation] improved documentation for `TreeDecorator` and `TreeDecoratorService` [#8698](https://github.com/eclipse-theia/theia/pull/8698)
- [documentation] updated publishing documentation for the repository [#8719](https://github.com/eclipse-theia/theia/pull/8719)
- [editor] enabled `editor.semanticHighlighting.enabled` by default [#8593](https://github.com/eclipse-theia/theia/pull/8593)
- [electron] fixed issue with `application.confirmExit` preventing the app from closing [#8732](https://github.com/eclipse-theia/theia/pull/8732)
- [file-search] fixed issue where file-search did not properly ignore the `.git` folder [#8721](https://github.com/eclipse-theia/theia/pull/8721)
- [monaco] added ability to compare quick-open entries [#8185](https://github.com/eclipse-theia/theia/pull/8185)
- [output] improved extensibility of output channel commands [#8733](https://github.com/eclipse-theia/theia/pull/8733)
- [plugin] added ability to use `viewId` as a progress location [#8700](https://github.com/eclipse-theia/theia/pull/8700)
- [plugin] added logic to only store webviews when they have a corresponding serializer [#8680](https://github.com/eclipse-theia/theia/pull8680)
- [plugin] added support for `activeColorTheme` and `onDidChangeActiveColorTheme` API [#8710](https://github.com/eclipse-theia/theia/pull/8710)
- [plugin] added support for semantic highlighting [#8593](https://github.com/eclipse-theia/theia/pull/8593)
- [plugin] fixed issue where problem matchers specified by task providers are not respected [#8756](https://github.com/eclipse-theia/theia/pull/8756)
- [plugin] fixed issues with the `Authentication` API [#8725](https://github.com/eclipse-theia/theia/pull/8725)
- [plugin] fixed terminating hosted instance issue [#8674](https://github.com/eclipse-theia/theia/pull/8674)
- [preview] fixed issue where empty document content was not properly rendered [#8729](https://github.com/eclipse-theia/theia/pull/8729)
- [repo] updated `eslint` and peer-dependencies to latest versions [#8770](https://github.com/eclipse-theia/theia/pull/8770)
- [search-in-workspace] added ability to perform searches in dirty editors [#8579](https://github.com/eclipse-theia/theia/pull/8579)
- [search-in-workspace] added ability to search opened editors outside the workspace [#8646](https://github.com/eclipse-theia/theia/pull/8646)
- [security] updated `yargs` dependency [#8711](https://github.com/eclipse-theia/theia/pull/8711)
- [workspace] fixed missing binding of `WorkspaceFrontendContribution` [#8734](https://github.com/eclipse-theia/theia/pull/8734)

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

- [electron] removed `attachWillPreventUnload` method from the Electron main application. The `confirmExit` logic is handled on the frontend [#8732](https://github.com/eclipse-theia/theia/pull/8732)
- [file-search] deprecated dependency on `@theia/process` and replaced its usage by node's `child_process` API [#8721](https://github.com/eclipse-theia/theia/pull/8721)


## v1.7.0 - 29/10/2020

<a name="release_milestone_1.7.0">[1.7.0 Release Milestone](https://github.com/eclipse-theia/theia/milestone/12?closed=1)</a>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/eclipse-theia/theia)
[![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://travis-ci.com/eclipse-theia/theia.svg?branch=master)](https://travis-ci.com/eclipse-theia/theia)
[![Build Status](https://github.com/eclipse-theia/theia/workflows/Build/badge.svg?branch=master)](https://github.com/eclipse-theia/theia/actions?query=branch%3Amaster)
[![Publish VS Code Built-in Extensions](https://github.com/theia-ide/vscode-builtin-extensions/workflows/publish-vscode-built-in-extensions/badge.svg)](https://github.com/theia-ide/vscode-builtin-extensions/actions)
[![Open questions](https://img.shields.io/badge/Open-questions-blue.svg?style=flat-curved)](https://github.com/eclipse-theia/theia/labels/question)
[![Open bugs](https://img.shields.io/badge/Open-bugs-red.svg?style=flat-curved)](https://github.com/eclipse-theia/theia/labels/bug)
Expand Down
3 changes: 2 additions & 1 deletion configs/errors.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
],
"no-new-wrappers": "error",
"no-null/no-null": "error",
"no-shadow": [
"no-shadow": "off",
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
Expand Down
6 changes: 3 additions & 3 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.7.0",
"version": "1.8.0",
"description": "Theia application manager API.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -32,7 +32,7 @@
"@babel/plugin-transform-classes": "^7.10.0",
"@babel/plugin-transform-runtime": "^7.10.0",
"@babel/preset-env": "^7.10.0",
"@theia/application-package": "^1.7.0",
"@theia/application-package": "^1.8.0",
"@theia/compression-webpack-plugin": "^3.0.0",
"@types/fs-extra": "^4.0.2",
"@types/webpack": "^4.41.2",
Expand All @@ -56,7 +56,7 @@
"worker-loader": "^1.1.1"
},
"devDependencies": {
"@theia/ext-scripts": "^1.7.0"
"@theia/ext-scripts": "^1.8.0"
},
"nyc": {
"extends": "../../configs/nyc.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module.exports = {
test: /\\.js$/,
enforce: 'pre',
loader: 'source-map-loader',
exclude: /jsonc-parser|fast-plist|onigasm|(monaco-editor.*)/
exclude: /jsonc-parser|fast-plist|onigasm/
},
{
test: /\\.woff(2)?(\\?v=[0-9]\\.[0-9]\\.[0-9])?$/,
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.7.0",
"version": "1.8.0",
"description": "Theia application package API.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -41,7 +41,7 @@
"write-json-file": "^2.2.0"
},
"devDependencies": {
"@theia/ext-scripts": "^1.7.0"
"@theia/ext-scripts": "^1.8.0"
},
"nyc": {
"extends": "../../configs/nyc.json"
Expand Down
6 changes: 3 additions & 3 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.7.0",
"version": "1.8.0",
"description": "Theia CLI.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -29,8 +29,8 @@
"clean": "theiaext clean"
},
"dependencies": {
"@theia/application-manager": "^1.7.0",
"@theia/application-package": "^1.7.0",
"@theia/application-manager": "^1.8.0",
"@theia/application-package": "^1.8.0",
"@types/chai": "^4.2.7",
"@types/mkdirp": "^0.5.2",
"@types/mocha": "^5.2.7",
Expand Down
3 changes: 2 additions & 1 deletion dev-packages/cli/src/test-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ export default async function newTestPage(options: TestPageOptions): Promise<pup
mocha.setup({
reporter: 'spec',
ui: 'bdd',
useColors: true
useColors: true,
retries: 5
} as MochaSetupOptions);
});

Expand Down
2 changes: 1 addition & 1 deletion dev-packages/electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theia/electron",
"version": "1.7.0",
"version": "1.8.0",
"description": "Electron runtime dependencies for Theia",
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/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.7.0",
"version": "1.8.0",
"license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
"description": "NPM scripts for Theia packages.",
"bin": {
Expand Down
11 changes: 10 additions & 1 deletion dev-packages/ext-scripts/theia-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@
// @ts-check
const path = require('path');

const index = process.argv.findIndex(arg => arg.indexOf('run') !== -1);
// See: https://github.com/eclipse-theia/theia/issues/8779#issuecomment-733747340
const filter = require('os').platform() === 'win32'
? arg => arg.indexOf(path.join('ext-scripts', 'theia-run.js')) !== -1
: arg => arg.indexOf(path.join('.bin', 'run')) !== -1
let index = process.argv.findIndex(filter);
if (index === -1) {
// Fall back to the original logic.
// https://github.com/eclipse-theia/theia/blob/6ef08676314a2ceca93023ddd149579493ae7914/dev-packages/ext-scripts/theia-run.js#L21
index = process.argv.findIndex(arg => arg.indexOf('run') !== -1);
}
const args = process.argv.slice(index + 1);
const scopedArgs = args.length > 1 ? [args[0], '--scope', ...args.slice(1)] : args;
process.argv = [...process.argv.slice(0, index + 1), 'run', ...scopedArgs];
Expand Down
8 changes: 4 additions & 4 deletions examples/api-samples/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"private": true,
"name": "@theia/api-samples",
"version": "1.7.0",
"version": "1.8.0",
"description": "Theia - Example code to demonstrate Theia API",
"dependencies": {
"@theia/core": "^1.7.0",
"@theia/output": "^1.7.0"
"@theia/core": "^1.8.0",
"@theia/output": "^1.8.0"
},
"theiaExtensions": [
{
Expand Down Expand Up @@ -43,6 +43,6 @@
"clean": "theiaext clean"
},
"devDependencies": {
"@theia/ext-scripts": "^1.7.0"
"@theia/ext-scripts": "^1.8.0"
}
}
4 changes: 2 additions & 2 deletions examples/api-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@theia/api-tests",
"version": "1.7.0",
"version": "1.8.0",
"description": "Theia API tests",
"dependencies": {
"@theia/core": "^1.7.0"
"@theia/core": "^1.8.0"
},
"license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
"repository": {
Expand Down
21 changes: 19 additions & 2 deletions examples/api-tests/src/saveable.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ describe('Saveable', function () {

beforeEach(async () => {
await preferences.set('editor.autoSave', 'off', undefined, rootUri.toString());
await preferences.set('editor.closeOnFileDelete', true);
await editorManager.closeAll({ save: false });
await fileService.create(fileUri, 'foo', { fromUserGesture: false, overwrite: true });
widget = /** @type {EditorWidget & SaveableWidget} */
Expand Down Expand Up @@ -227,6 +228,22 @@ describe('Saveable', function () {
assert.equal(state.value, 'foo', 'fs should NOT be updated after rejected close');
});

it('delete file for saved with editor.CloseOnFileDelete off', async () => {
await preferences.set('editor.closeOnFileDelete', false);
assert.isFalse(Saveable.isDirty(widget), 'should NOT be dirty before delete');
assert.isTrue(editor.document.valid, 'should be valid before delete');
const waitForInvalid = new Deferred();
const listener = editor.document.onDidChangeValid(() => waitForInvalid.resolve());
try {
await fileService.delete(fileUri);
await waitForInvalid.promise;
assert.isFalse(editor.document.valid, 'should be INVALID after delete');
assert.isFalse(widget.isDisposed, 'model should NOT be disposed after delete');
} finally {
listener.dispose();
}
});

it('accept save on close and reject it', async () => {
let outOfSync = false;
toTearDown.push(setShouldOverwrite(async () => {
Expand Down Expand Up @@ -284,7 +301,7 @@ describe('Saveable', function () {
try {
await fileService.delete(fileUri);
await waitForDidChangeTitle.promise;
assert.isTrue(widget.title.label.endsWith('(deleted from disk)'), 'should be marked as deleted');
assert.isTrue(widget.title.label.endsWith('(deleted)'), 'should be marked as deleted');
assert.isTrue(Saveable.isDirty(widget), 'should be dirty after delete');
assert.isFalse(widget.isDisposed, 'model should NOT be disposed after delete');
} finally {
Expand All @@ -296,7 +313,7 @@ describe('Saveable', function () {
try {
await fileService.create(fileUri, 'foo');
await waitForDidChangeTitle.promise;
assert.isFalse(widget.title.label.endsWith('(deleted from disk)'), 'should NOT be marked as deleted');
assert.isFalse(widget.title.label.endsWith('(deleted)'), 'should NOT be marked as deleted');
assert.isTrue(Saveable.isDirty(widget), 'should be dirty after added again');
assert.isFalse(widget.isDisposed, 'model should NOT be disposed after added again');
} finally {
Expand Down
Loading

0 comments on commit 6032007

Please sign in to comment.