mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
Merge branch 'microsoft:main' into bugfix-workflow-publish
This commit is contained in:
commit
259196bc1e
9 changed files with 138 additions and 13 deletions
7
.github/publish-failure-issue-template.md
vendored
Normal file
7
.github/publish-failure-issue-template.md
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: NPM Publishing Failed
|
||||
assignees: []
|
||||
labels: bug
|
||||
---
|
||||
|
||||
NPM publishing failed. Check the last GitHub Action log.
|
||||
27
.github/workflows/locker.yml
vendored
Normal file
27
.github/workflows/locker.yml
vendored
Normal file
|
|
@ -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'
|
||||
30
.github/workflows/needs-more-info-closer.yml
vendored
Normal file
30
.github/workflows/needs-more-info-closer.yml
vendored
Normal file
|
|
@ -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."
|
||||
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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: '' }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -134,13 +134,19 @@ export const language = <languages.IMonarchLanguage>{
|
|||
'zsh'
|
||||
],
|
||||
|
||||
startingWithDash: /\-+\w+/,
|
||||
|
||||
identifiersWithDashes: /[a-zA-Z]\w+(?:@startingWithDash)+/,
|
||||
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&|+\-*\/\^;\.,]+/,
|
||||
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
[/@identifiersWithDashes/, ''],
|
||||
|
||||
[/(\s)((?:@startingWithDash)+)/, ['white', 'attribute.name']],
|
||||
|
||||
[
|
||||
/[a-zA-Z]\w*/,
|
||||
|
|
@ -153,14 +159,14 @@ export const language = <languages.IMonarchLanguage>{
|
|||
}
|
||||
],
|
||||
|
||||
{ include: '@whitespace' },
|
||||
|
||||
{ include: '@strings' },
|
||||
{ include: '@parameters' },
|
||||
{ include: '@heredoc' },
|
||||
|
||||
[/[{}\[\]()]/, '@brackets'],
|
||||
|
||||
[/-+\w+/, 'attribute.name'],
|
||||
|
||||
[/@symbols/, 'delimiter'],
|
||||
|
||||
{ include: '@numbers' },
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ export const language = <languages.IMonarchLanguage>{
|
|||
'@asyncHandler',
|
||||
'@available',
|
||||
'@convention',
|
||||
'@derivative', // Swift for TensorFlow
|
||||
'@differentiable', // Swift for TensorFlow
|
||||
'@derivative',
|
||||
'@differentiable',
|
||||
'@discardableResult',
|
||||
'@dynamicCallable',
|
||||
'@dynamicMemberLookup',
|
||||
|
|
@ -72,6 +72,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
'@noreturn',
|
||||
'@objc',
|
||||
'@objcMembers',
|
||||
'@preconcurrency',
|
||||
'@propertyWrapper',
|
||||
'@requires_stored_property_inits',
|
||||
'@resultBuilder',
|
||||
|
|
@ -318,11 +319,6 @@ export const language = <languages.IMonarchLanguage>{
|
|||
[/./, 'identifier']
|
||||
],
|
||||
|
||||
// symbol: [
|
||||
// [ /@symbols/, 'operator' ],
|
||||
// [ /@operators/, 'operator' ]
|
||||
// ],
|
||||
|
||||
invokedmethod: [
|
||||
[
|
||||
/([.])(@identifier)/,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue