Merge branch 'main' into draft/upbeat-pascal

pull/3392/head
Thomas Zilz 2 years ago committed by GitHub
commit c7ea3cf4c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,55 +0,0 @@
###############################################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
###############################################################################################
name: $(Date:yyyyMMdd)$(Rev:.r)
pr: none
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
- repository: vscode
type: github
name: microsoft/vscode
ref: main
endpoint: Monaco
parameters:
- name: quality
displayName: Quality
type: string
default: latest
values:
- latest
- next
extends:
template: azure-pipelines/npm-package/pipeline.yml@templates
parameters:
npmPackages:
- name: foobar
testPlatforms:
- name: Linux
nodeVersions:
- 16.14.2
- name: MacOS
nodeVersions:
- 16.14.2
- name: Windows
nodeVersions:
- 16.14.2
testSteps:
- checkout: vscode
- script: dir $(Build.SourcesDirectory)
buildSteps:
- script: dir $(Build.SourcesDirectory)
tag: ${{ parameters.quality }}
publishPackage: false
postPublishSteps:
- script: dir .
workingDirectory: $(Build.SourcesDirectory)

@ -0,0 +1,56 @@
###############################################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
###############################################################################################
name: $(Date:yyyyMMdd)$(Rev:.r)
trigger: none
pr: none
schedules:
- cron: '0 7 * * *'
displayName: Daily release
branches:
include:
- main
always: true
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
extends:
template: azure-pipelines/npm-package/pipeline.yml@templates
parameters:
npmPackages:
- name: monaco-editor-core
workingDirectory: $(Build.SourcesDirectory)/dependencies/vscode/out-monaco-editor-core
testPlatforms: []
buildSteps:
- script: npm ci
displayName: Install NPM dependencies
- script: yarn ts-node ./scripts/ci/prepare-monaco-editor-core nightly
displayName: Setup, Build & Test monaco-editor-core
tag: next
publishPackage: true
publishRequiresApproval: false
- name: monaco-editor
workingDirectory: $(Build.SourcesDirectory)/release
testPlatforms: []
buildSteps:
- script: npm ci
displayName: Install NPM dependencies
- script: yarn ts-node ./scripts/ci/prepare-monaco-editor nightly
displayName: Setup, Build & Test monaco-editor
tag: next
publishPackage: true
publishRequiresApproval: false

@ -0,0 +1,58 @@
###############################################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
###############################################################################################
name: $(Date:yyyyMMdd)$(Rev:.r)
trigger: none
pr: none
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
parameters:
- name: publishMonacoEditorCore
displayName: 🚀 Publish Monaco Editor Core
type: boolean
default: false
- name: publishMonacoEditor
displayName: 🚀 Publish Editor Core
type: boolean
default: false
extends:
template: azure-pipelines/npm-package/pipeline.yml@templates
parameters:
npmPackages:
- name: monaco-editor-core
workingDirectory: $(Build.SourcesDirectory)/dependencies/vscode/out-monaco-editor-core
testPlatforms: []
buildSteps:
- script: npm ci
displayName: Install NPM dependencies
- script: yarn ts-node ./scripts/ci/prepare-monaco-editor-core stable
displayName: Setup, Build & Test monaco-editor-core
tag: latest
publishPackage: ${{ parameters.publishMonacoEditorCore }}
publishRequiresApproval: false
- name: monaco-editor
workingDirectory: $(Build.SourcesDirectory)/release
testPlatforms: []
buildSteps:
- script: npm ci
displayName: Install NPM dependencies
- script: yarn ts-node ./scripts/ci/prepare-monaco-editor stable
displayName: Setup, Build & Test monaco-editor
tag: latest
publishPackage: ${{ parameters.publishMonacoEditor }}
publishRequiresApproval: false

@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
build:
name: CI
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

@ -1,25 +0,0 @@
name: PR Chat
on:
pull_request_target:
types: [opened, ready_for_review, closed]
jobs:
main:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Checkout Actions
uses: actions/checkout@v2
with:
repository: 'microsoft/vscode-github-triage-actions'
ref: stable
path: ./actions
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run Code Review Chat
uses: ./actions/code-review-chat
with:
token: ${{secrets.GITHUB_TOKEN}}
slack_token: ${{ secrets.SLACK_TOKEN }}
slack_bot_name: 'VSCodeBot'
notification_channel: codereview

@ -1,250 +0,0 @@
name: Publish to npm
on:
schedule:
- cron: '0 5 * * *'
# enable users to manually trigger with workflow_dispatch
workflow_dispatch:
inputs:
nightly:
description: 'is nightly?'
required: true
default: 'true'
jobs:
publish:
if: ${{ github.repository == 'microsoft/monaco-editor' }}
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
with:
node-version: 16
- name: (monaco-editor) checkout
uses: actions/checkout@v2
with:
repository: 'microsoft/monaco-editor'
path: './monaco-editor'
- name: Compute state
id: state
run: |
echo '::echo::on'
node ./monaco-editor/.github/workflows/publish/computeState.js "${{github.event_name}}" "${{github.event.inputs.nightly}}"
# outputs: dist_tag, version, vscode_branch, skip_monaco_editor_core, skip_monaco_editor
- name: (vscode) checkout
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
uses: actions/checkout@v2
with:
repository: 'microsoft/vscode'
ref: ${{ steps.state.outputs.vscode_branch }}
path: './vscode'
- name: (vscode-loc) checkout
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
uses: actions/checkout@v2
with:
repository: 'microsoft/vscode-loc'
path: './vscode-loc'
- name: (vscode) execute `yarn`
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn --frozen-lockfile --network-timeout 180000
- name: (vscode) Download Playwright
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: ./vscode
run: yarn playwright-install
- name: (vscode) Run Hygiene Checks
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn gulp hygiene
- name: (vscode) Run Valid Layers Checks
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn valid-layers-check
- name: (vscode) Compile /build/
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn --cwd build compile
- name: (vscode) Run eslint
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn eslint
- name: (vscode) Run Monaco Editor Checks
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn monaco-compile-check
- name: (vscode) Compile
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn --max_old_space_size=4095 compile
- name: (vscode) Run Unit Tests (Browser)
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn test-browser --browser chromium
- name: (vscode) Patch package.json version
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
run: node ./monaco-editor/.github/workflows/publish/setVersion.js ./vscode/build/monaco/package.json ${{ steps.state.outputs.version }}
- name: (vscode) Editor Distro
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: yarn gulp editor-distro
- name: Editor ESM sources check
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode/test/monaco'
run: yarn run esm-check
- name: (vscode) Typings validation prep
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode'
run: mkdir typings-test
- name: (vscode) Typings validation
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: ./vscode/typings-test
run: |
yarn init -yp
../node_modules/.bin/tsc --init
echo "import '../out-monaco-editor-core';" > a.ts
../node_modules/.bin/tsc --noEmit
- name: (vscode) Package Editor with Webpack
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: ./vscode/test/monaco
run: yarn run bundle-webpack
- name: (vscode) Compile Editor Tests
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: ./vscode/test/monaco
run: yarn run compile
- name: (vscode) Run Editor Tests
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
timeout-minutes: 5
working-directory: ./vscode/test/monaco
run: yarn test
- name: Set `npm` config
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish `monaco-editor-core`
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
working-directory: './vscode/out-monaco-editor-core'
run: npm publish --tag ${{ steps.state.outputs.dist_tag }}
- name: Delete `npm` config
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
run: npm config delete //registry.npmjs.org/:_authToken
- name: (monaco-editor) Patch package.json version
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
run: node ./monaco-editor/.github/workflows/publish/setVersion.js ./monaco-editor/package.json ${{ steps.state.outputs.version }}
- name: (monaco-editor) execute `npm ci` (1)
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm ci
- name: (monaco-editor) execute `npm ci` (2)
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor/webpack-plugin'
run: npm ci
- name: (monaco-editor) Patch package.json monaco-editor-core dev dependency version
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
run: node ./monaco-editor/.github/workflows/publish/setDevDependencyVersion.js ./monaco-editor/package.json monaco-editor-core ${{ steps.state.outputs.version }}
- name: (monaco-editor) execute `npm install` to pick up local monaco-editor-core
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm install
- name: (monaco-editor) Install OS Dependencies for Playwright
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: sudo npm run playwright-install-deps
- name: (monaco-editor) Check prettier
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run prettier-check
- name: (monaco-editor) Build
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run release
- name: (monaco-editor) Run unit tests
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm test
- name: (monaco-editor) Compile webpack plugin
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run compile --prefix webpack-plugin
- name: (monaco-editor) Package using webpack plugin
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run package-for-smoketest-webpack
- name: (monaco-editor) Package using esbuild
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run package-for-smoketest-esbuild
- name: (monaco-editor) Package using vite
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run package-for-smoketest-vite
- name: (monaco-editor) Package using parcel
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run package-for-smoketest-parcel --prefix test/smoke/parcel
- name: (monaco-editor) Run smoke test
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run smoketest
- name: (monaco-editor) Build website
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run build-website
- name: Set `npm` config
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish `monaco-editor`
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor/release'
run: npm publish --tag ${{ steps.state.outputs.dist_tag }}
- name: Create Issue On Failure
if: failure()
uses: JasonEtco/create-an-issue@9e6213aec58987fa7d2f4deb8b256b99e63107a2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: ./monaco-editor/.github/publish-failure-issue-template.md

@ -1,19 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const fs = require('fs');
if (process.argv.length !== 5) {
console.error(
`usage: node setDevDependencyVersion.js <PATH_TO_PACKAGE_JSON_FILE> <PACKAGE> <VERSION>`
);
process.exit(1);
}
const packagejson = JSON.parse(fs.readFileSync(process.argv[2]).toString());
packagejson['devDependencies'][process.argv[3]] = process.argv[4];
fs.writeFileSync(process.argv[2], JSON.stringify(packagejson, null, '\t') + '\n');

@ -1,17 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const fs = require('fs');
if (process.argv.length !== 4) {
console.error(`usage: node setVersion.js <PATH_TO_PACKAGE_JSON_FILE> <VERSION>`);
process.exit(1);
}
const packagejson = JSON.parse(fs.readFileSync(process.argv[2]).toString());
packagejson.version = process.argv[3];
fs.writeFileSync(process.argv[2], JSON.stringify(packagejson, null, '\t') + '\n');

1
.gitignore vendored

@ -1,6 +1,7 @@
**/node_modules/
**/out/
**/release/
**/dependencies/
/test/manual/generated/**
/test/smoke/vite/dist/**
/test/smoke/parcel/dist/**

95
package-lock.json generated

@ -1,12 +1,12 @@
{
"name": "monaco-editor",
"version": "0.35.0",
"version": "0.34.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "monaco-editor",
"version": "0.35.0",
"version": "0.34.1",
"hasInstallScript": true,
"license": "MIT",
"devDependencies": {
@ -23,7 +23,7 @@
"jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0",
"mocha": "^9.2.0",
"monaco-editor-core": "0.35.0-dev.20221018.2",
"monaco-editor-core": "0.35.0-dev.20221208",
"parcel": "^2.7.0",
"playwright": "^1.18.1",
"prettier": "^2.5.1",
@ -4279,9 +4279,9 @@
}
},
"node_modules/loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
@ -4423,9 +4423,9 @@
}
},
"node_modules/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
@ -4435,9 +4435,9 @@
}
},
"node_modules/mocha": {
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz",
"integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==",
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz",
"integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==",
"dev": true,
"dependencies": {
"@ungap/promise-all-settled": "1.1.2",
@ -4453,9 +4453,9 @@
"he": "1.2.0",
"js-yaml": "4.1.0",
"log-symbols": "4.1.0",
"minimatch": "3.0.4",
"minimatch": "4.2.1",
"ms": "2.1.3",
"nanoid": "3.2.0",
"nanoid": "3.3.1",
"serialize-javascript": "6.0.0",
"strip-json-comments": "3.1.1",
"supports-color": "8.1.1",
@ -4500,6 +4500,18 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"node_modules/mocha/node_modules/minimatch": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz",
"integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": ">=10"
}
},
"node_modules/mocha/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@ -4507,9 +4519,9 @@
"dev": true
},
"node_modules/monaco-editor-core": {
"version": "0.35.0-dev.20221018.2",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221018.2.tgz",
"integrity": "sha512-RHx0zCV7y7WZHL6o4AWDd+SlXaXOegWVcg+tDxnyCrttqGfyh8q2Lwdx6Js+hKdCM2MFiiOkJoROMPQqiDIhbQ==",
"version": "0.35.0-dev.20221208",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221208.tgz",
"integrity": "sha512-XQpKe+FoGoIWDqn/xiz5+Iyi1PrVWArlrBqqkQuWu4IBjUvs7/krZLqnsy/Vfoflu9Ldtoc1JU9wNu0tyDv66A==",
"dev": true
},
"node_modules/mri": {
@ -4575,9 +4587,9 @@
}
},
"node_modules/nanoid": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz",
"integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==",
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
"integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==",
"dev": true,
"bin": {
"nanoid": "bin/nanoid.cjs"
@ -9807,9 +9819,9 @@
"dev": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
@ -9912,18 +9924,18 @@
"dev": true
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"mocha": {
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz",
"integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==",
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz",
"integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==",
"dev": true,
"requires": {
"@ungap/promise-all-settled": "1.1.2",
@ -9939,9 +9951,9 @@
"he": "1.2.0",
"js-yaml": "4.1.0",
"log-symbols": "4.1.0",
"minimatch": "3.0.4",
"minimatch": "4.2.1",
"ms": "2.1.3",
"nanoid": "3.2.0",
"nanoid": "3.3.1",
"serialize-javascript": "6.0.0",
"strip-json-comments": "3.1.1",
"supports-color": "8.1.1",
@ -9969,6 +9981,15 @@
}
}
},
"minimatch": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz",
"integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@ -9978,9 +9999,9 @@
}
},
"monaco-editor-core": {
"version": "0.35.0-dev.20221018.2",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221018.2.tgz",
"integrity": "sha512-RHx0zCV7y7WZHL6o4AWDd+SlXaXOegWVcg+tDxnyCrttqGfyh8q2Lwdx6Js+hKdCM2MFiiOkJoROMPQqiDIhbQ==",
"version": "0.35.0-dev.20221208",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221208.tgz",
"integrity": "sha512-XQpKe+FoGoIWDqn/xiz5+Iyi1PrVWArlrBqqkQuWu4IBjUvs7/krZLqnsy/Vfoflu9Ldtoc1JU9wNu0tyDv66A==",
"dev": true
},
"mri": {
@ -10034,9 +10055,9 @@
}
},
"nanoid": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz",
"integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==",
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
"integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==",
"dev": true
},
"neo-async": {

@ -1,7 +1,7 @@
{
"name": "monaco-editor",
"version": "0.34.1",
"vscode": "0316a754aa4c25208bef91937efbce2ab1e3ce37",
"vscodeRef": "0316a754aa4c25208bef91937efbce2ab1e3ce37",
"private": true,
"description": "A browser based code editor",
"author": "Microsoft Corporation",
@ -49,7 +49,7 @@
"jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0",
"mocha": "^9.2.0",
"monaco-editor-core": "0.35.0-dev.20221018.2",
"monaco-editor-core": "0.35.0-dev.20221208",
"parcel": "^2.7.0",
"playwright": "^1.18.1",
"prettier": "^2.5.1",

@ -2844,9 +2844,9 @@
}
},
"node_modules/loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
@ -5652,9 +5652,9 @@
"peer": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"requires": {
"big.js": "^5.2.2",

@ -10,7 +10,9 @@ function createWindow() {
height: 600,
webPreferences: {
nodeIntegration: true,
worldSafeExecuteJavaScript: true
worldSafeExecuteJavaScript: true,
sandbox: false,
contextIsolation: false
}
});
mainWindow.loadURL(`file://${__dirname}/electron-index.html`);

@ -1,2 +1,3 @@
/dist/*.js
/dist/*.ttf
dist/*.js
dist/*.txt
dist/*.ttf

@ -10,7 +10,7 @@
"license": "MIT",
"devDependencies": {
"css-loader": "^5.2.7",
"electron": "^17.2.0",
"electron": "^19.1.8",
"file-loader": "^6.2.0",
"glob": "^7.2.0",
"html-webpack-plugin": "^5.5.0",
@ -1372,13 +1372,14 @@
"license": "MIT"
},
"node_modules/electron": {
"version": "17.4.11",
"version": "19.1.8",
"resolved": "https://registry.npmjs.org/electron/-/electron-19.1.8.tgz",
"integrity": "sha512-UfPQdFjgKI0xCm1V5sV3iAVOs0kCwAE91xWzV5tI7ij14yOkxTdXp9BqTzFaSbQYLYxn6q1BUUe1nlzjJjzAnw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@electron/get": "^1.13.0",
"@types/node": "^14.6.2",
"@electron/get": "^1.14.1",
"@types/node": "^16.11.26",
"extract-zip": "^1.0.3"
},
"bin": {
@ -1394,9 +1395,10 @@
"license": "ISC"
},
"node_modules/electron/node_modules/@types/node": {
"version": "14.18.23",
"dev": true,
"license": "MIT"
"version": "16.18.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.3.tgz",
"integrity": "sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg==",
"dev": true
},
"node_modules/emojis-list": {
"version": "3.0.0",
@ -2459,9 +2461,10 @@
}
},
"node_modules/loader-utils": {
"version": "2.0.2",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"license": "MIT",
"dependencies": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
@ -5424,16 +5427,20 @@
"dev": true
},
"electron": {
"version": "17.4.11",
"version": "19.1.8",
"resolved": "https://registry.npmjs.org/electron/-/electron-19.1.8.tgz",
"integrity": "sha512-UfPQdFjgKI0xCm1V5sV3iAVOs0kCwAE91xWzV5tI7ij14yOkxTdXp9BqTzFaSbQYLYxn6q1BUUe1nlzjJjzAnw==",
"dev": true,
"requires": {
"@electron/get": "2.0.0",
"@types/node": "^14.6.2",
"@types/node": "^16.11.26",
"extract-zip": "^1.0.3"
},
"dependencies": {
"@types/node": {
"version": "14.18.23",
"version": "16.18.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.3.tgz",
"integrity": "sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg==",
"dev": true
}
}
@ -6102,7 +6109,9 @@
"dev": true
},
"loader-utils": {
"version": "2.0.2",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"requires": {
"big.js": "^5.2.2",

@ -11,7 +11,7 @@
"license": "MIT",
"devDependencies": {
"css-loader": "^5.2.7",
"electron": "^17.2.0",
"electron": "^19.1.8",
"file-loader": "^6.2.0",
"glob": "^7.2.0",
"html-webpack-plugin": "^5.5.0",

@ -0,0 +1,34 @@
#!/bin/bash
set -e
# cwd must be the vscode repository.
yarn --frozen-lockfile --network-timeout 180000
yarn playwright-install
yarn gulp hygiene
yarn valid-layers-check
yarn --cwd build compile
yarn eslint
yarn monaco-compile-check
yarn --max_old_space_size=4095 compile
yarn test-browser --browser chromium
yarn gulp editor-distro
mkdir typings-test
cd typings-test
yarn init -yp
../node_modules/.bin/tsc --init
echo "import '../out-monaco-editor-core';" > a.ts
../node_modules/.bin/tsc --noEmit
cd ..
cd test/monaco
yarn run esm-check
yarn run bundle-webpack
yarn run compile
yarn test
cd ../..
# npm package is now in dependencies/vscode/out-monaco-editor-core, ready to be published

@ -0,0 +1,33 @@
#!/bin/bash
set -e
# execute `npm install` to pick up local monaco-editor-core
npm install
# Install OS Dependencies for Playwright
sudo npm run playwright-install-deps
# Check prettier
npm run prettier-check
# Build
npm run release
# Run unit tests
npm test
# Compile webpack plugin
npm run compile --prefix webpack-plugin
# Package using webpack plugin
npm run package-for-smoketest-webpack
# Package using esbuild
npm run package-for-smoketest-esbuild
# Package using vite
npm run package-for-smoketest-vite
# Package using parcel
npm run package-for-smoketest-parcel --prefix test/smoke/parcel
# Run smoke test
npm run smoketest
# Build website
npm run build-website
# npm package is now ready to be published in ./release

@ -0,0 +1,67 @@
import { mkdir, rm } from 'fs/promises';
import { join, resolve } from 'path';
import { group, gitShallowClone, run, writeJsonFile, getNightlyVersion } from '../lib';
const selfPath = __dirname;
const rootPath = join(selfPath, '..', '..');
const dependenciesPath = join(rootPath, 'dependencies');
const vscodePath = resolve(dependenciesPath, 'vscode');
const monacoEditorPackageJsonPath = resolve(rootPath, 'package.json');
async function prepareMonacoEditorCoreReleaseStableOrNightly() {
const monacoEditorPackageJson = require(monacoEditorPackageJsonPath) as {
version: string;
vscodeRef: string;
};
let version: string;
let ref: string;
const arg = process.argv[2];
if (arg === 'stable') {
version = monacoEditorPackageJson.version;
ref = monacoEditorPackageJson.vscodeRef;
} else if (arg === 'nightly') {
version = getNightlyVersion(monacoEditorPackageJson.version);
ref = 'main';
} else {
throw new Error('Invalid argument');
}
await prepareMonacoEditorCoreRelease(version, ref);
// npm package is now in dependencies/vscode/out-monaco-editor-core, ready to be published
}
async function prepareMonacoEditorCoreRelease(version: string, vscodeRef: string) {
await mkdir(vscodePath, { recursive: true });
await rm(dependenciesPath, { force: true, recursive: true });
await group('Checkout vscode', async () => {
await gitShallowClone(vscodePath, 'https://github.com/microsoft/vscode.git', vscodeRef);
});
await group('Checkout vscode-loc', async () => {
await gitShallowClone(
// Must be a sibling to the vscode repository
'dependencies/vscode-loc',
'https://github.com/microsoft/vscode-loc.git',
'main'
);
});
await group('Set Version', async () => {
const monacoEditorCorePackageJsonSourcePath = resolve(
vscodePath,
'./build/monaco/package.json'
);
const packageJson = require(monacoEditorCorePackageJsonSourcePath) as { version: string };
packageJson.version = version;
await writeJsonFile(monacoEditorCorePackageJsonSourcePath, packageJson);
});
await group('Building & Testing', async () => {
await run(resolve(selfPath, './monaco-editor-core.sh'), { cwd: vscodePath });
});
}
prepareMonacoEditorCoreReleaseStableOrNightly();

@ -0,0 +1,50 @@
import { readFile } from 'fs/promises';
import { join, resolve } from 'path';
import { getNightlyVersion, group, run, writeJsonFile } from '../lib';
const selfPath = __dirname;
const rootPath = join(selfPath, '..', '..');
const monacoEditorPackageJsonPath = resolve(rootPath, 'package.json');
async function prepareMonacoEditorReleaseStableOrNightly() {
const monacoEditorPackageJson = JSON.parse(
await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
) as { version: string };
let version: string;
const arg = process.argv[2];
if (arg === 'stable') {
version = monacoEditorPackageJson.version;
} else if (arg === 'nightly') {
version = getNightlyVersion(monacoEditorPackageJson.version);
} else {
throw new Error('Invalid argument');
}
await prepareMonacoEditorRelease(version);
// npm package is now in ./release, ready to be published
}
async function prepareMonacoEditorRelease(version: string) {
await group('npm ci', async () => {
await run('npm ci', { cwd: resolve(rootPath, 'webpack-plugin') });
});
await group('Set Version', async () => {
const packageJson = JSON.parse(
await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
) as { version: string; devDependencies: Record<string, string> };
packageJson.version = version;
packageJson.devDependencies['monaco-editor-core'] = version;
await writeJsonFile(monacoEditorPackageJsonPath, packageJson);
});
await group('Building & Testing', async () => {
await run(resolve(selfPath, './monaco-editor.sh'), { cwd: rootPath });
});
}
prepareMonacoEditorReleaseStableOrNightly();

@ -0,0 +1,55 @@
import { spawn } from 'child_process';
import { mkdir, writeFile } from 'fs/promises';
export interface RunOptions {
cwd: string;
}
export async function run(command: string, options: RunOptions) {
console.log(`Running ${command} in ${options.cwd}`);
const process = spawn(command, { shell: true, cwd: options.cwd, stdio: 'inherit' });
return new Promise<void>((resolve, reject) => {
process.on('exit', (code) => {
if (code !== 0) {
reject(new Error(`Command ${command} exited with code ${code}`));
} else {
resolve();
}
});
});
}
export async function gitShallowClone(targetPath: string, repositoryUrl: string, ref: string) {
await mkdir(targetPath, { recursive: true });
const options: RunOptions = { cwd: targetPath };
await run('git init', options);
await run(`git remote add origin ${repositoryUrl}`, options);
await run(`git fetch --depth 1 origin ${ref}`, options);
await run(`git checkout ${ref}`, options);
}
export async function group(name: string, body: () => Promise<void>): Promise<void> {
console.log(`##[group]${name}`);
try {
await body();
} catch (e) {
console.error(e);
throw e;
} finally {
console.log('##[endgroup]');
}
}
export async function writeJsonFile(filePath: string, jsonData: unknown): Promise<void> {
await writeFile(filePath, JSON.stringify(jsonData, null, '\t') + '\n');
}
export function getNightlyVersion(version: string): string {
const pieces = version.split('.');
const minor = parseInt(pieces[1], 10);
const date = new Date();
const yyyy = date.getUTCFullYear();
const mm = String(date.getUTCMonth() + 1).padStart(2, '0');
const dd = String(date.getUTCDate()).padStart(2, '0');
return `0.${minor + 1}.0-dev.${yyyy}${mm}${dd}`;
}

@ -383,5 +383,32 @@ testTokenization('elixir', [
{ startIndex: 15, type: 'delimiter.square.elixir' }
]
}
],
// Bitstrings
[
{
line: '<<height::32-integer, width::32-integer, data::binary>>',
tokens: [
{ startIndex: 0, type: 'delimiter.angle.special.elixir' },
{ startIndex: 2, type: 'identifier.elixir' },
{ startIndex: 8, type: 'operator.elixir' },
{ startIndex: 10, type: 'number.elixir' },
{ startIndex: 12, type: 'operator.elixir' },
{ startIndex: 13, type: 'identifier.elixir' },
{ startIndex: 20, type: 'punctuation.elixir' },
{ startIndex: 21, type: 'white.elixir' },
{ startIndex: 22, type: 'identifier.elixir' },
{ startIndex: 27, type: 'operator.elixir' },
{ startIndex: 29, type: 'number.elixir' },
{ startIndex: 31, type: 'operator.elixir' },
{ startIndex: 32, type: 'identifier.elixir' },
{ startIndex: 39, type: 'punctuation.elixir' },
{ startIndex: 40, type: 'white.elixir' },
{ startIndex: 41, type: 'identifier.elixir' },
{ startIndex: 45, type: 'operator.elixir' },
{ startIndex: 47, type: 'identifier.elixir' },
{ startIndex: 53, type: 'delimiter.angle.special.elixir' }
]
}
]
]);

@ -167,7 +167,7 @@ export const language = <languages.IMonarchLanguage>{
// Keyword list shorthand
keywordsShorthand: [
[/(@atomName)(:)/, ['constant', 'constant.punctuation']],
[/(@atomName)(:)(\s+)/, ['constant', 'constant.punctuation', 'white']],
// Use positive look-ahead to ensure the string is followed by :
// and should be considered a keyword.
[
@ -532,6 +532,13 @@ export const language = <languages.IMonarchLanguage>{
next: '@doubleQuotedHeredocDocstring'
}
],
[
/\@(module|type)?doc (~[sS])?'''/,
{
token: 'comment.block.documentation',
next: '@singleQuotedHeredocDocstring'
}
],
[
/\@(module|type)?doc (~[sS])?"/,
{
@ -539,6 +546,13 @@ export const language = <languages.IMonarchLanguage>{
next: '@doubleQuotedStringDocstring'
}
],
[
/\@(module|type)?doc (~[sS])?'/,
{
token: 'comment.block.documentation',
next: '@singleQuotedStringDocstring'
}
],
[/\@(module|type)?doc false/, 'comment.block.documentation'],
// Module attributes
[/\@(@variableName)/, 'variable']
@ -549,11 +563,21 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@docstringContent' }
],
singleQuotedHeredocDocstring: [
[/'''/, { token: 'comment.block.documentation', next: '@pop' }],
{ include: '@docstringContent' }
],
doubleQuotedStringDocstring: [
[/"/, { token: 'comment.block.documentation', next: '@pop' }],
{ include: '@docstringContent' }
],
singleQuotedStringDocstring: [
[/'/, { token: 'comment.block.documentation', next: '@pop' }],
{ include: '@docstringContent' }
],
// Operators, punctuation, brackets
symbols: [

@ -21,6 +21,7 @@ global.self = global;
global.document.queryCommandSupported = function () {
return false;
};
global.UIEvent = tmp.window.UIEvent;
global.window = {
location: {},

@ -968,9 +968,9 @@
}
},
"node_modules/loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dependencies": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
@ -2548,9 +2548,9 @@
"dev": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",

@ -34,27 +34,27 @@ monaco.languages.registerColorProvider('colorLanguage', {
color: { red: 1, blue: 0, green: 0, alpha: 1 },
range: {
startLineNumber: 1,
startColumn: 0,
startColumn: 1,
endLineNumber: 1,
endColumn: 0
endColumn: 4
}
},
{
color: { red: 0, blue: 1, green: 0, alpha: 1 },
range: {
startLineNumber: 2,
startColumn: 0,
startColumn: 1,
endLineNumber: 2,
endColumn: 0
endColumn: 5
}
},
{
color: { red: 0, blue: 0, green: 1, alpha: 1 },
range: {
startLineNumber: 3,
startColumn: 0,
startColumn: 1,
endLineNumber: 3,
endColumn: 0
endColumn: 6
}
}
];

Loading…
Cancel
Save