diff --git a/.github/workflows/info-needed-closer.yml b/.github/workflows/info-needed-closer.yml deleted file mode 100644 index ce6836c3..00000000 --- a/.github/workflows/info-needed-closer.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Info Needed Closer -on: - schedule: - - cron: 20 12 * * * # 5:20am Redmond - repository_dispatch: - types: [trigger-needs-more-info] - workflow_dispatch: - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v2 - with: - repository: 'microsoft/vscode-github-triage-actions' - path: ./actions - ref: stable - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run Info Needed Closer - uses: ./actions/needs-more-info-closer - with: - label: info-needed - closeDays: 7 - additionalTeam: 'spahnke|rcjsuen' - closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!" - pingDays: 120 - pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information." diff --git a/.github/workflows/locker.yml b/.github/workflows/locker.yml deleted file mode 100644 index cf8986b5..00000000 --- a/.github/workflows/locker.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Locker -on: - schedule: - - cron: 21 23 * * * # 5:20pm Redmond - repository_dispatch: - types: [trigger-locker] - workflow_dispatch: - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout Actions - uses: actions/checkout@v2 - with: - repository: 'microsoft/vscode-github-triage-actions' - path: ./actions - ref: stable - - name: Install Actions - run: npm install --production --prefix ./actions - - name: Run Locker - uses: ./actions/locker - with: - daysSinceClose: 45 - appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} - daysSinceUpdate: 3 - ignoredLabel: '*out-of-scope' diff --git a/.nvmrc b/.nvmrc index bcaa3377..48b14e6b 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.17 \ No newline at end of file +20.14.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index b36b9d93..ac405998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Monaco Editor Changelog +## [0.52.0] + +- Comment added inside of `IModelContentChangedEvent` + +## [0.51.0] + +- New fields `IEditorOptions.placeholder` and `IEditorOptions.compactMode` +- New fields `IGotoLocationOptions.multipleTests` and `IGotoLocationOptions.alternativeTestsCommand` +- New field `IInlineEditOptions.backgroundColoring` +- New experimental field `IEditorOptions.experimental.useTrueInlineView` +- New options `CommentThreadRevealOptions` for comments + +Contributions to `monaco-editor`: + +- [@ScottCarda-MS (Scott Carda)](https://github.com/ScottCarda-MS): Update Q# Keywords [PR #4586](https://github.com/microsoft/monaco-editor/pull/4586) + ## [0.50.0] - New field `IEditorMinimapOptions.sectionHeaderLetterSpacing` diff --git a/MAINTAINING.md b/MAINTAINING.md index f2578b96..9249366b 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -25,7 +25,9 @@ Make sure every unassigned issue is labeled properly: - API Changes / Breaking Changes / New and noteworthy (use the diff from the compare step) - Add thank you mentions ([use this tool](https://tools.code.visualstudio.com/acknowledgement) and select only the monaco-editor) - Commit & Create PR -- [Trigger build](https://dev.azure.com/monacotools/Monaco/_build?definitionId=416) once merged +- [Trigger build](https://dev.azure.com/monacotools/Monaco/_build?definitionId=416) once merged. Tick the following checkboxes: + - Publish Monaco Editor Core + - Publish Monaco Editor #### Publish new webpack plugin diff --git a/build/build-monaco-editor.ts b/build/build-monaco-editor.ts index 1a2d3ba0..c3aa4b5f 100644 --- a/build/build-monaco-editor.ts +++ b/build/build-monaco-editor.ts @@ -5,7 +5,7 @@ import path = require('path'); import fs = require('fs'); -import { REPO_ROOT, readFiles, writeFiles, IFile } from '../build/utils'; +import { REPO_ROOT, readFiles, writeFiles, IFile, readFile } from '../build/utils'; import { removeDir } from '../build/fs'; import ts = require('typescript'); import { generateMetadata } from './releaseMetadata'; @@ -66,9 +66,10 @@ generateMetadata(); * Release to `dev` or `min`. */ function AMD_releaseOne(type: 'dev' | 'min') { - const coreFiles = readFiles(`node_modules/monaco-editor-core/${type}/**/*`, { + let coreFiles = readFiles(`node_modules/monaco-editor-core/${type}/**/*`, { base: `node_modules/monaco-editor-core/${type}` }); + coreFiles = fixNlsFiles(coreFiles); AMD_addPluginContribs(type, coreFiles); writeFiles(coreFiles, `out/monaco-editor/${type}`); @@ -79,6 +80,33 @@ function AMD_releaseOne(type: 'dev' | 'min') { writeFiles(pluginFiles, `out/monaco-editor/${type}`); } +function fixNlsFiles(files: IFile[]): IFile[] { + return files.map((f) => { + if (!f.path.match(/nls\.messages\.[a-z\-]+\.js/)) { + return f; + } + + const dirName = path.dirname(f.path); + const fileName = path.basename(f.path); + + const newPath = path.join(dirName, 'vs', fileName); + let contentStr = f.contents.toString('utf-8'); + + contentStr = ` +define([], function () { +${contentStr} +}); +`; + + const newContents = Buffer.from(contentStr, 'utf-8'); + + return { + path: newPath, + contents: newContents + }; + }); +} + /** * Edit editor.main.js: * - rename the AMD module 'vs/editor/editor.main' to 'vs/editor/edcore.main' @@ -96,6 +124,15 @@ function AMD_addPluginContribs(type: 'dev' | 'min', files: IFile[]) { // Rename the AMD module 'vs/editor/editor.main' to 'vs/editor/edcore.main' contents = contents.replace(/"vs\/editor\/editor\.main\"/, '"vs/editor/edcore.main"'); + // This ensures that old nls-plugin configurations are still respected by the new localization solution. + const contentPrefixSource = readFile('src/nls-fix.js') + .contents.toString('utf-8') + .replace(/\r\n|\n/g, ' '); + + // TODO: Instead of adding this source to the header to maintain the source map indices, it should rewrite the sourcemap! + const searchValue = 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt'; + contents = contents.replace(searchValue, searchValue + ' */ ' + contentPrefixSource + ' /*'); + const pluginFiles = readFiles(`out/languages/bundled/amd-${type}/**/monaco.contribution.js`, { base: `out/languages/bundled/amd-${type}` }); diff --git a/build/utils.ts b/build/utils.ts index 06f056ef..e69ad6bd 100644 --- a/build/utils.ts +++ b/build/utils.ts @@ -268,16 +268,18 @@ export function readFiles( }); const base = options.base; + return files.map((file) => readFile(file, base)); +} + +export function readFile(file: string, base: string = '') { const baseLength = base === '' ? 0 : base.endsWith('/') ? base.length : base.length + 1; - return files.map((file) => { - const fullPath = path.join(REPO_ROOT, file); - const contents = fs.readFileSync(fullPath); - const relativePath = file.substring(baseLength); - return { - path: relativePath, - contents - }; - }); + const fullPath = path.join(REPO_ROOT, file); + const contents = fs.readFileSync(fullPath); + const relativePath = file.substring(baseLength); + return { + path: relativePath, + contents + }; } export function writeFiles(files: IFile[], dest: string) { diff --git a/package-lock.json b/package-lock.json index c0bb2fe7..3b9fd075 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "monaco-editor", - "version": "0.50.0", + "version": "0.52.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "monaco-editor", - "version": "0.50.0", + "version": "0.52.0", "hasInstallScript": true, "license": "MIT", "devDependencies": { @@ -25,7 +25,7 @@ "jsdom": "^19.0.0", "jsonc-parser": "^3.0.0", "mocha": "^9.2.0", - "monaco-editor-core": "0.50.0-rc", + "monaco-editor-core": "0.52.0-rc2", "parcel": "^2.7.0", "pin-github-action": "^1.8.0", "playwright": "^1.32.2", @@ -5394,9 +5394,9 @@ "dev": true }, "node_modules/monaco-editor-core": { - "version": "0.50.0-rc", - "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.50.0-rc.tgz", - "integrity": "sha512-DM/rRS4/dxWvHnszmSA81hpAhy8k5k1zE/aYc+lvH+4SxEJNsdHhindo8xM7VavawujvGhs+X3SPbi3ytl3rJQ==", + "version": "0.52.0-rc2", + "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.52.0-rc2.tgz", + "integrity": "sha512-buoH7pURwcTnmnO+aQ69jlbJ1Nop7w3sQm1pmBJ6pr/M9/WhAD2GsgL/bOf7kK+Vzd9FlzitlThImezQ28s9+g==", "dev": true }, "node_modules/mri": { @@ -11150,9 +11150,9 @@ } }, "monaco-editor-core": { - "version": "0.50.0-rc", - "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.50.0-rc.tgz", - "integrity": "sha512-DM/rRS4/dxWvHnszmSA81hpAhy8k5k1zE/aYc+lvH+4SxEJNsdHhindo8xM7VavawujvGhs+X3SPbi3ytl3rJQ==", + "version": "0.52.0-rc2", + "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.52.0-rc2.tgz", + "integrity": "sha512-buoH7pURwcTnmnO+aQ69jlbJ1Nop7w3sQm1pmBJ6pr/M9/WhAD2GsgL/bOf7kK+Vzd9FlzitlThImezQ28s9+g==", "dev": true }, "mri": { diff --git a/package.json b/package.json index d02fab4e..5e52ca55 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "monaco-editor", - "version": "0.50.0", - "vscodeRef": "5437499feb04f7a586f677b155b039bc2b3669eb", + "version": "0.52.0", + "vscodeRef": "493330cdc6475247184ea459c66776c3da12cd2d", "private": true, "description": "A browser based code editor", "homepage": "https://github.com/microsoft/monaco-editor", @@ -52,7 +52,7 @@ "jsdom": "^19.0.0", "jsonc-parser": "^3.0.0", "mocha": "^9.2.0", - "monaco-editor-core": "0.50.0-rc", + "monaco-editor-core": "0.52.0-rc2", "parcel": "^2.7.0", "pin-github-action": "^1.8.0", "playwright": "^1.32.2", diff --git a/samples/browser-script-editor/index.html b/samples/browser-script-editor/index.html index ea46101f..e11bc811 100644 --- a/samples/browser-script-editor/index.html +++ b/samples/browser-script-editor/index.html @@ -16,7 +16,6 @@ var require = { paths: { vs: '../node_modules/monaco-editor/min/vs' } }; - -