diff --git a/.github/publish-failure-issue-template.md b/.github/publish-failure-issue-template.md new file mode 100644 index 00000000..2b9ead2d --- /dev/null +++ b/.github/publish-failure-issue-template.md @@ -0,0 +1,7 @@ +--- +title: NPM Publishing Failed +assignees: [] +labels: bug +--- + +NPM publishing failed. Check the last GitHub Action log. diff --git a/.github/workflows/locker.yml b/.github/workflows/locker.yml new file mode 100644 index 00000000..cf8986b5 --- /dev/null +++ b/.github/workflows/locker.yml @@ -0,0 +1,27 @@ +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/.github/workflows/needs-more-info-closer.yml b/.github/workflows/needs-more-info-closer.yml new file mode 100644 index 00000000..88de1919 --- /dev/null +++ b/.github/workflows/needs-more-info-closer.yml @@ -0,0 +1,30 @@ +name: Needs More Info 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 Needs More Info Closer + uses: ./actions/needs-more-info-closer + with: + appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} + label: needs more info + 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/publish.yml b/.github/workflows/publish.yml index 15e76c57..7f7a4789 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -225,3 +225,11 @@ jobs: 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 diff --git a/metadata.js b/metadata.js index d74f298a..6215731d 100644 --- a/metadata.js +++ b/metadata.js @@ -18,6 +18,7 @@ rootPath: './out/release/typescript', paths: { // use ./ to indicate it is relative to the `rootPath` + src: './../../amd/typescript', dev: './dev', min: './min', esm: './esm' @@ -30,6 +31,7 @@ rootPath: './out/release/css', paths: { // use ./ to indicate it is relative to the `rootPath` + src: './../../amd/css', dev: './dev', min: './min', esm: './esm' @@ -42,6 +44,7 @@ rootPath: './out/release/json', paths: { // use ./ to indicate it is relative to the `rootPath` + src: './../../amd/json', dev: './dev', min: './min', esm: './esm' @@ -54,6 +57,7 @@ rootPath: './out/release/html', paths: { // use ./ to indicate it is relative to the `rootPath` + src: './../../amd/html', dev: './dev', min: './min', esm: './esm' @@ -66,6 +70,7 @@ rootPath: './out/release/basic-languages', paths: { // use ./ to indicate it is relative to the `rootPath` + src: './../../amd/basic-languages', dev: './dev', min: './min', esm: './esm' diff --git a/src/basic-languages/shell/shell.test.ts b/src/basic-languages/shell/shell.test.ts index 71ce92b0..20bb0124 100644 --- a/src/basic-languages/shell/shell.test.ts +++ b/src/basic-languages/shell/shell.test.ts @@ -33,6 +33,40 @@ testTokenization('shell', [ { startIndex: 14, type: 'white.shell' }, { startIndex: 15, type: '' } ] + }, + // Tests for case reported in bug #2851, do not confuse identifier(with dashes) with attribute + { + line: 'foo-bar --baz gorp -123 --abc-123', + tokens: [ + { startIndex: 0, type: '' }, + { startIndex: 7, type: 'white.shell' }, + { startIndex: 8, type: 'attribute.name.shell' }, + { startIndex: 13, type: 'white.shell' }, + { startIndex: 14, type: '' }, + { startIndex: 18, type: 'white.shell' }, + { startIndex: 19, type: 'attribute.name.shell' }, + { startIndex: 23, type: 'white.shell' }, + { startIndex: 24, type: 'attribute.name.shell' } + ] + }, + // Bug #2851 add new definition 'Identifiers with dashes', here one test + { + line: 'foo | foo-bar | foo-bar-1 | foo-bar-2021-1', + tokens: [ + { startIndex: 0, type: '' }, + { startIndex: 3, type: 'white.shell' }, + { startIndex: 4, type: 'delimiter.shell' }, + { startIndex: 5, type: 'white.shell' }, + { startIndex: 6, type: '' }, + { startIndex: 13, type: 'white.shell' }, + { startIndex: 14, type: 'delimiter.shell' }, + { startIndex: 15, type: 'white.shell' }, + { startIndex: 16, type: '' }, + { startIndex: 25, type: 'white.shell' }, + { startIndex: 26, type: 'delimiter.shell' }, + { startIndex: 27, type: 'white.shell' }, + { startIndex: 28, type: '' } + ] } ], diff --git a/src/basic-languages/shell/shell.ts b/src/basic-languages/shell/shell.ts index 20a465a1..8c347d08 100644 --- a/src/basic-languages/shell/shell.ts +++ b/src/basic-languages/shell/shell.ts @@ -134,13 +134,19 @@ export const language = { 'zsh' ], + startingWithDash: /\-+\w+/, + + identifiersWithDashes: /[a-zA-Z]\w+(?:@startingWithDash)+/, + // we include these common regular expressions symbols: /[=>{ } ], + { include: '@whitespace' }, + { include: '@strings' }, { include: '@parameters' }, { include: '@heredoc' }, [/[{}\[\]()]/, '@brackets'], - [/-+\w+/, 'attribute.name'], - [/@symbols/, 'delimiter'], { include: '@numbers' }, diff --git a/src/basic-languages/swift/swift.ts b/src/basic-languages/swift/swift.ts index 4a4e7a10..54ed852e 100644 --- a/src/basic-languages/swift/swift.ts +++ b/src/basic-languages/swift/swift.ts @@ -57,8 +57,8 @@ export const language = { '@asyncHandler', '@available', '@convention', - '@derivative', // Swift for TensorFlow - '@differentiable', // Swift for TensorFlow + '@derivative', + '@differentiable', '@discardableResult', '@dynamicCallable', '@dynamicMemberLookup', @@ -72,6 +72,7 @@ export const language = { '@noreturn', '@objc', '@objcMembers', + '@preconcurrency', '@propertyWrapper', '@requires_stored_property_inits', '@resultBuilder', @@ -318,11 +319,6 @@ export const language = { [/./, 'identifier'] ], - // symbol: [ - // [ /@symbols/, 'operator' ], - // [ /@operators/, 'operator' ] - // ], - invokedmethod: [ [ /([.])(@identifier)/, diff --git a/test/manual/dev-setup.js b/test/manual/dev-setup.js index 034e5afe..2ebaf5a3 100644 --- a/test/manual/dev-setup.js +++ b/test/manual/dev-setup.js @@ -71,7 +71,7 @@ if (/\.\//.test(resolvedPath)) { // starts with ./ => treat as relative to the root path if (IS_FILE_PROTOCOL) { - resolvedPath = DIRNAME + '/../' + this.rootPath + '/' + resolvedPath; + resolvedPath = DIRNAME + '/../../' + this.rootPath + '/' + resolvedPath; } else { resolvedPath = PATH_PREFIX + '/monaco-editor/' + this.rootPath + '/' + resolvedPath; } @@ -81,13 +81,13 @@ this.isRelease() ) { if (IS_FILE_PROTOCOL) { - resolvedPath = DIRNAME + '/../' + resolvedPath; + resolvedPath = DIRNAME + '/../../' + resolvedPath; } else { resolvedPath = PATH_PREFIX + '/monaco-editor/' + resolvedPath; } } else { if (IS_FILE_PROTOCOL) { - resolvedPath = DIRNAME + '/../..' + resolvedPath; + resolvedPath = DIRNAME + '/../../../' + resolvedPath; } else { resolvedPath = PATH_PREFIX + resolvedPath; } @@ -207,6 +207,18 @@ loadScript(RESOLVED_CORE.getResolvedPath(PATH_PREFIX) + '/loader.js', function () { let loaderPathsConfig = {}; + window.AMD = true; + if (IS_FILE_PROTOCOL) { + loaderPathsConfig['vs/language/fillers/monaco-editor-core'] = + DIRNAME + '/../.././out/amd/fillers/monaco-editor-core-amd'; + loaderPathsConfig['vs/fillers/monaco-editor-core'] = + DIRNAME + '/../.././out/amd/fillers/monaco-editor-core-amd'; + } else { + loaderPathsConfig['vs/language/fillers/monaco-editor-core'] = + PATH_PREFIX + '/monaco-editor/./out/amd/fillers/monaco-editor-core-amd'; + loaderPathsConfig['vs/fillers/monaco-editor-core'] = + PATH_PREFIX + '/monaco-editor/./out/amd/fillers/monaco-editor-core-amd'; + } if (!RESOLVED_CORE.isRelease()) { RESOLVED_PLUGINS.forEach(function (plugin) { plugin.generateLoaderConfig(loaderPathsConfig, PATH_PREFIX);