mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-10-28 08:26:01 +08:00
Redo localization for onboarding (#63987)
This commit is contained in:
1 parent
fe4714c574
commit
55e92ac9b1
49 files changed
+30714
-254944
No files matched your search
+2
-1
@@ -53,7 +53,8 @@
|
||||
// Needs to be LF to have a working shebang.
|
||||
"packages/typescript/bin/tsc",
|
||||
"tsc/internal/bundled/source/**",
|
||||
"tsc/internal/locale/lcl/**",
|
||||
"tsc/internal/diagnostics/diagnosticMessages.generated.json",
|
||||
"tsc/internal/diagnostics/loc/*.generated.json",
|
||||
"packages/typescript/dist/**",
|
||||
"packages/typescript/tsconfig.tsbuildinfo",
|
||||
"packages/vscode-typescript/dist/**",
|
||||
|
||||
+17
-3
@@ -492,11 +492,25 @@ export const generateTristate = goGenerateTask("generate:tristate", [
|
||||
export const generateDiagnostics = goGenerateTask("generate:diagnostics", [
|
||||
{
|
||||
file: "tsc/internal/diagnostics/diagnostics.go",
|
||||
inputs: ["generate.go", "diagnosticMessages.json", "extraDiagnosticMessages.json", "../{collections,json}/*.go", "../locale/lcl/*/diagnosticMessages/diagnosticMessages.generated.json.lcl"],
|
||||
inputs: ["generate.go", "diagnosticMessages.json", "../../../tools/LocProject.json", "../{collections,json}/*.go", "loc/*.generated.json"],
|
||||
exclude: ["**/*_test.go"],
|
||||
outputs: ["diagnostics_generated.go", "loc_generated.go", "loc/*.json.gz"],
|
||||
outputs: ["diagnostics_generated.go", "diagnosticMessages.generated.json", "loc_generated.go", "loc/*.json.gz"],
|
||||
commands: [
|
||||
["go", "run", "generate.go", "-diagnostics", "diagnostics_generated.go", "-loc", "loc_generated.go", "-locdir", "loc"],
|
||||
[
|
||||
"go",
|
||||
"run",
|
||||
"generate.go",
|
||||
"-diagnostics",
|
||||
"diagnostics_generated.go",
|
||||
"-loc",
|
||||
"loc_generated.go",
|
||||
"-locdir",
|
||||
"loc",
|
||||
"-locproject",
|
||||
"../../../tools/LocProject.json",
|
||||
"-locsource",
|
||||
"diagnosticMessages.generated.json",
|
||||
],
|
||||
["dprint", "fmt", "diagnostics_generated.go", "loc_generated.go"],
|
||||
],
|
||||
},
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"Projects": [
|
||||
{
|
||||
"LocItems": [
|
||||
{
|
||||
"SourceFile": "tsc\\internal\\diagnostics\\diagnosticMessages.generated.json",
|
||||
"Languages": "zh-CN;zh-TW;cs-CZ;de-DE;es-ES;fr-FR;it-IT;ja-JP;ko-KR;pl-PL;pt-BR;ru-RU;tr-TR",
|
||||
"CopyOption": "UsePlaceholders",
|
||||
"OutputPath": "tsc\\internal\\diagnostics\\loc\\{Lang}.generated.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
# OneLocBuild materializes packaged LCL handbacks under the artifact directory.
|
||||
# Its manifests map those files to their native repository paths. After applying
|
||||
# them, the diagnostics generator produces deterministic runtime gzip files.
|
||||
# The resulting changes update a stable GitHub branch and pull request.
|
||||
schedules:
|
||||
- cron: '0 7 * * *'
|
||||
displayName: Daily localization update
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
|
||||
variables:
|
||||
- name: TYPESCRIPT_AUTOMATION_GITHUB_APP_CLIENT_ID
|
||||
value: Iv23li4GolzJSEp1mzHI
|
||||
- name: TYPESCRIPT_AUTOMATION_GITHUB_APP_KEY_ID
|
||||
value: https://jststeam-passwords.vault.azure.net/keys/typescript-automation
|
||||
|
||||
jobs:
|
||||
- job: Generate
|
||||
displayName: Generate localization update
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
fetchTags: false
|
||||
submodules: false
|
||||
|
||||
- template: /tools/pipelines/steps/setup-node-npm-ci.yml@self
|
||||
|
||||
- pwsh: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$match = Select-String -Path tsc/go.mod -Pattern '^go ([0-9]+\.[0-9]+)$'
|
||||
if (!$match) {
|
||||
throw "Unable to determine the Go version from tsc/go.mod"
|
||||
}
|
||||
Write-Host "##vso[task.setvariable variable=GoVersion]$($match.Matches[0].Groups[1].Value)"
|
||||
displayName: Determine Go version
|
||||
|
||||
- task: GoTool@0
|
||||
displayName: Install Go
|
||||
inputs:
|
||||
version: $(GoVersion)
|
||||
goDownloadUrl: https://aka.ms/golang/release/latest
|
||||
|
||||
- task: AzureCLI@2
|
||||
displayName: Create OneLocBuild token
|
||||
inputs:
|
||||
azureSubscription: devdiv-onelocbuild-ceapex
|
||||
scriptType: pscore
|
||||
scriptLocation: inlineScript
|
||||
inlineScript: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$PSNativeCommandUseErrorActionPreference = $true
|
||||
$token = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
|
||||
Write-Host "##vso[task.setvariable variable=OneLocBuildToken;issecret=true]$token"
|
||||
|
||||
- task: OneLocBuild@3
|
||||
displayName: Generate localized files
|
||||
env:
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
inputs:
|
||||
locProj: tools/LocProject.json
|
||||
outDir: $(Build.ArtifactStagingDirectory)
|
||||
LclSource: lclFilesfromPackage
|
||||
LclPackageId: $(OneLocLclPackageId)
|
||||
packageSourceAuth: patAuth
|
||||
patVariable: $(OneLocBuildToken)
|
||||
isCreatePrSelected: false
|
||||
|
||||
- pwsh: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
# OneLoc leaves native files in the artifact directory. Its manifests
|
||||
# pair each generated path with the repository path selected by the
|
||||
# LocProject CopyOption and OutputPath.
|
||||
$locRoot = Join-Path "$(Build.ArtifactStagingDirectory)" "loc"
|
||||
$generatedFiles = @(Get-Content -LiteralPath (Join-Path $locRoot "XLocFileList.txt"))
|
||||
$destinationFiles = @(Get-Content -LiteralPath (Join-Path $locRoot "AllFileList.txt"))
|
||||
if ($generatedFiles.Count -eq 0) {
|
||||
throw "OneLocBuild did not produce any localized files"
|
||||
}
|
||||
if ($generatedFiles.Count -ne $destinationFiles.Count) {
|
||||
throw "OneLocBuild produced mismatched source and destination manifests"
|
||||
}
|
||||
|
||||
$sourceRoot = [IO.Path]::GetFullPath("$(Build.SourcesDirectory)") + [IO.Path]::DirectorySeparatorChar
|
||||
$manifestDestinations = [Collections.Generic.HashSet[string]]::new([StringComparer]::OrdinalIgnoreCase)
|
||||
for ($i = 0; $i -lt $generatedFiles.Count; $i++) {
|
||||
$source = [IO.Path]::GetFullPath($generatedFiles[$i])
|
||||
$destination = [IO.Path]::GetFullPath($destinationFiles[$i])
|
||||
if (!$destination.StartsWith($sourceRoot, [StringComparison]::OrdinalIgnoreCase)) {
|
||||
throw "Refusing to write localized file outside the checkout: $destination"
|
||||
}
|
||||
if (!(Test-Path -LiteralPath $source -PathType Leaf)) {
|
||||
throw "OneLocBuild did not produce $source"
|
||||
}
|
||||
$null = $manifestDestinations.Add($destination)
|
||||
}
|
||||
|
||||
$handbackDirectory = Join-Path $sourceRoot "tsc/internal/diagnostics/loc"
|
||||
Get-ChildItem -LiteralPath $handbackDirectory -Filter "*.generated.json" -File |
|
||||
Where-Object { !$manifestDestinations.Contains($_.FullName) } |
|
||||
Remove-Item -Force
|
||||
|
||||
for ($i = 0; $i -lt $generatedFiles.Count; $i++) {
|
||||
$source = [IO.Path]::GetFullPath($generatedFiles[$i])
|
||||
$destination = [IO.Path]::GetFullPath($destinationFiles[$i])
|
||||
New-Item -Path (Split-Path -Parent $destination) -ItemType Directory -Force | Out-Null
|
||||
Copy-Item -LiteralPath $source -Destination $destination -Force
|
||||
}
|
||||
displayName: Apply localized files
|
||||
|
||||
- pwsh: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$PSNativeCommandUseErrorActionPreference = $true
|
||||
npx hereby generate:diagnostics
|
||||
displayName: Generate localization artifacts
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Add localization project to handoff
|
||||
inputs:
|
||||
SourceFolder: $(Build.SourcesDirectory)/tools
|
||||
Contents: LocProject.json
|
||||
TargetFolder: $(Build.ArtifactStagingDirectory)/loc
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: Publish localization handoff
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/loc
|
||||
artifact: Loc
|
||||
|
||||
- template: /tools/pipelines/steps/create-github-app-token.yml
|
||||
parameters:
|
||||
azureSubscription: TypeScript-DevDiv-KeyVault
|
||||
repositories: TypeScript
|
||||
permissions: contents:write,pull_requests:write
|
||||
insertSteps:
|
||||
- pwsh: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$PSNativeCommandUseErrorActionPreference = $true
|
||||
|
||||
git add --all -- tsc/internal/diagnostics/loc tsc/internal/diagnostics/loc_generated.go
|
||||
$changes = @(git diff --cached --name-only)
|
||||
if ($changes.Count -eq 0) {
|
||||
Write-Host "Localization files are already up to date."
|
||||
exit 0
|
||||
}
|
||||
|
||||
$branch = "localization-update"
|
||||
git switch -c $branch
|
||||
git config user.email "290192711+typescript-automation[bot]@users.noreply.github.com"
|
||||
git config user.name "typescript-automation[bot]"
|
||||
$hooksPath = Join-Path $env:AGENT_TEMPDIRECTORY "empty-git-hooks"
|
||||
New-Item -Path $hooksPath -ItemType Directory -Force | Out-Null
|
||||
git config core.hooksPath $hooksPath
|
||||
git commit -m "Update localization files"
|
||||
|
||||
$basicAuth = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("x-access-token:$env:GH_TOKEN"))
|
||||
Write-Host "##vso[task.setsecret]$basicAuth"
|
||||
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $basicAuth"
|
||||
git remote set-url origin https://github.com/microsoft/TypeScript.git
|
||||
|
||||
$remoteBranch = git ls-remote --heads origin $branch
|
||||
$branchExists = [bool] $remoteBranch
|
||||
if ($branchExists) {
|
||||
git fetch origin "refs/heads/${branch}:refs/remotes/origin/${branch}"
|
||||
}
|
||||
|
||||
$shouldPush = $true
|
||||
if ($branchExists) {
|
||||
$localTree = git rev-parse 'HEAD^{tree}'
|
||||
$remoteTree = git rev-parse "origin/${branch}^{tree}"
|
||||
if ($localTree -eq $remoteTree) {
|
||||
Write-Host "Remote branch already contains the same files."
|
||||
$shouldPush = $false
|
||||
}
|
||||
}
|
||||
|
||||
if ($shouldPush) {
|
||||
git push --force-with-lease --set-upstream origin $branch
|
||||
}
|
||||
|
||||
$existingPr = gh pr list --repo microsoft/TypeScript --base main --head $branch --state open --json url --jq '.[0].url // empty'
|
||||
if ($existingPr) {
|
||||
Write-Host "Updated existing pull request: $existingPr"
|
||||
}
|
||||
else {
|
||||
gh pr create --repo microsoft/TypeScript --base main --head $branch --title "Update localization files" --body "Updates localization handbacks and their generated runtime artifacts."
|
||||
}
|
||||
displayName: Create or update localization pull request
|
||||
env:
|
||||
GH_TOKEN: $(GH_TOKEN)
|
||||
@@ -30,10 +30,10 @@ steps:
|
||||
displayName: Create GitHub App token
|
||||
inputs:
|
||||
azureSubscription: ${{ parameters.azureSubscription }}
|
||||
scriptType: bash
|
||||
scriptType: pscore
|
||||
scriptLocation: inlineScript
|
||||
inlineScript: |
|
||||
cat << 'GITHUB_APP_TOKEN_CLI_EOF' > /tmp/create-github-app-token.cjs
|
||||
@'
|
||||
"use strict";
|
||||
|
||||
// src/api.ts
|
||||
@@ -589,8 +589,8 @@ steps:
|
||||
reportError(error);
|
||||
process.exitCode = 1;
|
||||
});
|
||||
GITHUB_APP_TOKEN_CLI_EOF
|
||||
node /tmp/create-github-app-token.cjs
|
||||
'@ | Set-Content -LiteralPath "$(Agent.TempDirectory)/create-github-app-token.cjs" -Encoding utf8NoBOM
|
||||
node "$(Agent.TempDirectory)/create-github-app-token.cjs"
|
||||
env:
|
||||
APP_CLIENT_ID: $(TYPESCRIPT_AUTOMATION_GITHUB_APP_CLIENT_ID)
|
||||
KEY_ID: $(TYPESCRIPT_AUTOMATION_GITHUB_APP_KEY_ID)
|
||||
@@ -603,12 +603,13 @@ steps:
|
||||
- ${{ each step in parameters.insertSteps }}:
|
||||
- ${{ step }}
|
||||
|
||||
- task: Bash@3
|
||||
- task: PowerShell@2
|
||||
displayName: Revoke GitHub App token
|
||||
condition: always()
|
||||
continueOnError: true
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: node /tmp/create-github-app-token.cjs
|
||||
pwsh: true
|
||||
script: node "$(Agent.TempDirectory)/create-github-app-token.cjs"
|
||||
env:
|
||||
REVOKE_TOKEN: $(${{ parameters.tokenVariable }})
|
||||
@@ -649,14 +649,27 @@ test("diagnostic generation tracks Go and locale outputs and supports force", as
|
||||
const directory = fs.mkdtempSync(path.join(root, "tsc/internal/_diagnostics-probe-"));
|
||||
context.after(() => fs.rmSync(directory, { recursive: true, force: true }));
|
||||
const output = path.join(directory, "diagnostics_generated.go");
|
||||
const source = path.join(directory, "diagnosticMessages.generated.json");
|
||||
const localized = path.join(directory, "loc_generated.go");
|
||||
const locDirectory = path.join(directory, "loc");
|
||||
fs.mkdirSync(locDirectory);
|
||||
const handbacks = fs.globSync("loc/*.generated.json", { cwd: path.join(root, "tsc/internal/diagnostics") });
|
||||
for (const handback of handbacks) {
|
||||
fs.copyFileSync(path.join(root, "tsc/internal/diagnostics", handback), path.join(locDirectory, path.basename(handback)));
|
||||
}
|
||||
const project = path.join(directory, "tools/LocProject.json");
|
||||
fs.mkdirSync(path.dirname(project));
|
||||
const projectData = JSON.parse(fs.readFileSync(path.join(root, "tools/LocProject.json"), "utf8"));
|
||||
projectData.Projects[0].LocItems = [projectData.Projects[0].LocItems[0]];
|
||||
projectData.Projects[0].LocItems[0].SourceFile = "diagnosticMessages.generated.json";
|
||||
fs.writeFileSync(project, JSON.stringify(projectData));
|
||||
const options = {
|
||||
cwd: path.join(root, "tsc/internal/diagnostics"),
|
||||
inputs: ["generate.go", "diagnosticMessages.json", "extraDiagnosticMessages.json", "../{collections,json}/*.go", "../locale/lcl/*/diagnosticMessages/diagnosticMessages.generated.json.lcl"],
|
||||
inputs: ["generate.go", "diagnosticMessages.json", project, "../{collections,json}/*.go", path.join(locDirectory, "*.generated.json")],
|
||||
exclude: ["**/*_test.go"],
|
||||
outputs: [output, localized, path.join(directory, "loc/*.json.gz")],
|
||||
outputs: [output, source, localized, path.join(locDirectory, "*.json.gz")],
|
||||
commands: [
|
||||
["go", "run", "generate.go", "-diagnostics", output, "-loc", localized, "-locdir", path.join(directory, "loc")],
|
||||
["go", "run", "generate.go", "-diagnostics", output, "-loc", localized, "-locdir", locDirectory, "-locproject", project, "-locsource", source],
|
||||
["dprint", "fmt", output, localized],
|
||||
],
|
||||
};
|
||||
@@ -664,10 +677,14 @@ test("diagnostic generation tracks Go and locale outputs and supports force", as
|
||||
await generate();
|
||||
const locales = fs.globSync("loc/*.json.gz", { cwd: directory }).map(file => path.join(directory, file));
|
||||
assert.ok(locales.length > 0);
|
||||
const files = [output, localized, ...locales];
|
||||
const files = [output, source, localized, ...locales];
|
||||
const timestamps = files.map(file => fs.statSync(file).mtimeMs);
|
||||
assert.equal(await generate(), true);
|
||||
assert.deepEqual(files.map(file => fs.statSync(file).mtimeMs), timestamps);
|
||||
fs.appendFileSync(project, "\n");
|
||||
assert.equal(await generate(), false);
|
||||
fs.appendFileSync(path.join(locDirectory, path.basename(handbacks[0])), "\n");
|
||||
assert.equal(await generate(), false);
|
||||
const archive = fs.readFileSync(locales[0]);
|
||||
fs.rmSync(locales[0]);
|
||||
assert.equal(await generate(), false);
|
||||
@@ -679,7 +696,7 @@ test("diagnostic generation tracks Go and locale outputs and supports force", as
|
||||
fs.writeFileSync(unexpected, "unexpected");
|
||||
assert.equal(await generate(), false);
|
||||
assert.equal(fs.existsSync(unexpected), false);
|
||||
fs.rmSync(path.join(directory, "loc"), { recursive: true });
|
||||
for (const locale of locales) fs.rmSync(locale);
|
||||
assert.equal(await generate(), false);
|
||||
assert.deepEqual(fs.readFileSync(locales[0]), archive);
|
||||
fs.rmSync(localized);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1852,6 +1852,14 @@
|
||||
"category": "Message",
|
||||
"code": 1549
|
||||
},
|
||||
"An ambient module declaration with import attributes must use a pattern name with an '*' character.": {
|
||||
"category": "Error",
|
||||
"code": 1550
|
||||
},
|
||||
"Import attributes are not allowed on a module augmentation.": {
|
||||
"category": "Error",
|
||||
"code": 1551
|
||||
},
|
||||
"An import attributes type may only contain property signatures.": {
|
||||
"category": "Error",
|
||||
"code": 1552
|
||||
@@ -4496,6 +4504,10 @@
|
||||
"category": "Error",
|
||||
"code": 5001
|
||||
},
|
||||
"Option '{0}' requires value to be greater than '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 5002
|
||||
},
|
||||
"Cannot find the common subdirectory path for the input files.": {
|
||||
"category": "Error",
|
||||
"code": 5009
|
||||
@@ -4624,7 +4636,7 @@
|
||||
"category": "Error",
|
||||
"code": 5073
|
||||
},
|
||||
"Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified.": {
|
||||
"Option '--incremental' is only valid with a known configuration file (like 'tsconfig.json') or when '--tsBuildInfoFile' is explicitly provided.": {
|
||||
"category": "Error",
|
||||
"code": 5074
|
||||
},
|
||||
@@ -4684,7 +4696,7 @@
|
||||
"category": "Error",
|
||||
"code": 5089
|
||||
},
|
||||
"Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?": {
|
||||
"Non-relative paths are not allowed. Did you forget a leading './'?": {
|
||||
"category": "Error",
|
||||
"code": 5090
|
||||
},
|
||||
@@ -4934,7 +4946,7 @@
|
||||
"category": "Error",
|
||||
"code": 6046
|
||||
},
|
||||
"Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'.": {
|
||||
"Locale must be an IETF BCP 47 language tag. Examples: '{0}', '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 6048
|
||||
},
|
||||
@@ -5846,7 +5858,7 @@
|
||||
"category": "Message",
|
||||
"code": 6352
|
||||
},
|
||||
"Project '{0}' is out of date because its dependency '{1}' is out of date": {
|
||||
"Failed to delete file '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 6353
|
||||
},
|
||||
@@ -6008,7 +6020,7 @@
|
||||
"category": "Message",
|
||||
"code": 6400
|
||||
},
|
||||
"Project '{0}' is out of date because there was error reading file '{1}'": {
|
||||
"Project '{0}' is out of date because config file does not exist.": {
|
||||
"category": "Message",
|
||||
"code": 6401
|
||||
},
|
||||
@@ -6084,7 +6096,7 @@
|
||||
"category": "Message",
|
||||
"code": 6419
|
||||
},
|
||||
"Project '{0}' is out of date because {1}.": {
|
||||
"Project '{0}' is out of date because input '{1}' does not exist.": {
|
||||
"category": "Message",
|
||||
"code": 6420
|
||||
},
|
||||
@@ -6092,6 +6104,18 @@
|
||||
"category": "Message",
|
||||
"code": 6421
|
||||
},
|
||||
"Project '{0}' is out of date because it has errors.": {
|
||||
"category": "Message",
|
||||
"code": 6423
|
||||
},
|
||||
"Multiple 'module.exports' assignments cannot be serialized for declaration emit.": {
|
||||
"category": "Error",
|
||||
"code": 6424
|
||||
},
|
||||
"Nested CommonJS export constructs cannot be serialized for declaration emit.": {
|
||||
"category": "Error",
|
||||
"code": 6425
|
||||
},
|
||||
|
||||
"The expected type comes from property '{0}' which is declared here on type '{1}'": {
|
||||
"category": "Message",
|
||||
@@ -6751,6 +6775,38 @@
|
||||
"category": "Message",
|
||||
"code": 6932
|
||||
},
|
||||
"Do not print diagnostics.": {
|
||||
"category": "Message",
|
||||
"code": 6933
|
||||
},
|
||||
"Run in single threaded mode.": {
|
||||
"category": "Message",
|
||||
"code": 6934
|
||||
},
|
||||
"Generate pprof CPU/memory profiles to the given directory.": {
|
||||
"category": "Message",
|
||||
"code": 6935
|
||||
},
|
||||
"Set the number of checkers per project.": {
|
||||
"category": "Message",
|
||||
"code": 6936
|
||||
},
|
||||
"4, unless --singleThreaded is passed.": {
|
||||
"category": "Message",
|
||||
"code": 6937
|
||||
},
|
||||
"Set the number of projects to build concurrently.": {
|
||||
"category": "Message",
|
||||
"code": 6938
|
||||
},
|
||||
"Deduplicate packages with the same name and version.": {
|
||||
"category": "Message",
|
||||
"code": 6939
|
||||
},
|
||||
"Allow loading external content mapper plugins that execute code during compilation.": {
|
||||
"category": "Message",
|
||||
"code": 6940
|
||||
},
|
||||
|
||||
"Variable '{0}' implicitly has an '{1}' type.": {
|
||||
"category": "Error",
|
||||
@@ -6974,6 +7030,10 @@
|
||||
"category": "Error",
|
||||
"code": 7061
|
||||
},
|
||||
"Declaration emit elides private members, but '{0}' refers to a private member. Write an explicit type here.": {
|
||||
"category": "Error",
|
||||
"code": 7080
|
||||
},
|
||||
|
||||
"You cannot rename this element.": {
|
||||
"category": "Error",
|
||||
@@ -7079,7 +7139,7 @@
|
||||
"category": "Error",
|
||||
"code": 8029
|
||||
},
|
||||
"The type of a function declaration must match the function's signature.": {
|
||||
"A JSDoc '@type' tag on a function must have a signature with the correct number of arguments.": {
|
||||
"category": "Error",
|
||||
"code": 8030
|
||||
},
|
||||
@@ -7119,6 +7179,10 @@
|
||||
"category": "Error",
|
||||
"code": 8039
|
||||
},
|
||||
"File rename is not supported by the editor": {
|
||||
"category": "Error",
|
||||
"code": 8040
|
||||
},
|
||||
|
||||
"Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit.": {
|
||||
"category": "Error",
|
||||
@@ -7176,7 +7240,7 @@
|
||||
"category": "Error",
|
||||
"code": 9018
|
||||
},
|
||||
"Binding elements can't be exported directly with --isolatedDeclarations.": {
|
||||
"Binding elements with initializers can't be exported directly with --isolatedDeclarations.": {
|
||||
"category": "Error",
|
||||
"code": 9019
|
||||
},
|
||||
@@ -8383,6 +8447,54 @@
|
||||
"category": "Message",
|
||||
"code": 95197
|
||||
},
|
||||
"{0} references": {
|
||||
"category": "Message",
|
||||
"code": 95198
|
||||
},
|
||||
"1 reference": {
|
||||
"category": "Message",
|
||||
"code": 95199
|
||||
},
|
||||
"{0} implementations": {
|
||||
"category": "Message",
|
||||
"code": 95200
|
||||
},
|
||||
"1 implementation": {
|
||||
"category": "Message",
|
||||
"code": 95201
|
||||
},
|
||||
"Loading": {
|
||||
"category": "Message",
|
||||
"code": 95202
|
||||
},
|
||||
"Installing types for '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 95203
|
||||
},
|
||||
"Project '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 95204
|
||||
},
|
||||
"Fix All": {
|
||||
"category": "Message",
|
||||
"code": 95205
|
||||
},
|
||||
"Organize Imports": {
|
||||
"category": "Message",
|
||||
"code": 95206
|
||||
},
|
||||
"Remove Unused Imports": {
|
||||
"category": "Message",
|
||||
"code": 95207
|
||||
},
|
||||
"Sort Imports": {
|
||||
"category": "Message",
|
||||
"code": 95208
|
||||
},
|
||||
"JSDoc comment": {
|
||||
"category": "Message",
|
||||
"code": 95209
|
||||
},
|
||||
|
||||
"No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": {
|
||||
"category": "Error",
|
||||
@@ -8580,8 +8692,200 @@
|
||||
"category": "Error",
|
||||
"code": 18061
|
||||
},
|
||||
"Regular expression pattern modifiers are only available when targeting '{0}' or later.": {
|
||||
"category": "Error",
|
||||
"code": 18062
|
||||
},
|
||||
"Duplicate named capturing groups are only available when targeting '{0}' or later.": {
|
||||
"category": "Error",
|
||||
"code": 18063
|
||||
},
|
||||
"Private identifiers cannot be used in destructuring patterns.": {
|
||||
"category": "Error",
|
||||
"code": 18064
|
||||
},
|
||||
"Content mapper file extension '{0}' must begin with a '.'.": {
|
||||
"category": "Error",
|
||||
"code": 18065
|
||||
},
|
||||
"Content mapper file extension '{0}' is a built-in extension and cannot be registered by a content mapper.": {
|
||||
"category": "Error",
|
||||
"code": 18066
|
||||
},
|
||||
"Content mapper file extension '{0}' is registered by more than one content mapper.": {
|
||||
"category": "Error",
|
||||
"code": 18067
|
||||
},
|
||||
"Content mappers require the '--runExternalCode' command line flag to be enabled.": {
|
||||
"category": "Error",
|
||||
"code": 18068
|
||||
},
|
||||
"The content mapper '{0}' failed to transform this file.": {
|
||||
"category": "Error",
|
||||
"code": 18069
|
||||
},
|
||||
"The content mapper '{0}' failed {1} times and will not be used.": {
|
||||
"category": "Error",
|
||||
"code": 18070
|
||||
},
|
||||
"The content mapper '{0}' did not provide the required position mappings.": {
|
||||
"category": "Error",
|
||||
"code": 18071
|
||||
},
|
||||
"The content mapper '{0}' produced a position mapping that points outside the original content (original offset {1}).": {
|
||||
"category": "Error",
|
||||
"code": 18072
|
||||
},
|
||||
"The content mapper '{0}' produced a verbatim mapping that does not match the original content (virtual offset {1}, original offset {2}).": {
|
||||
"category": "Error",
|
||||
"code": 18073
|
||||
},
|
||||
"This location is in virtual code produced by the content mapper '{0}' and has no corresponding location in the original file.": {
|
||||
"category": "Message",
|
||||
"code": 18074
|
||||
},
|
||||
"The content mapper package '{0}' could not be resolved.": {
|
||||
"category": "Error",
|
||||
"code": 18075
|
||||
},
|
||||
"The 'package.json' of the content mapper package '{0}' could not be parsed.": {
|
||||
"category": "Error",
|
||||
"code": 18076
|
||||
},
|
||||
"The 'package.json' of the content mapper package '{0}' does not specify a 'name'.": {
|
||||
"category": "Error",
|
||||
"code": 18077
|
||||
},
|
||||
"The 'package.json' of the content mapper package '{0}' does not declare a 'typescript.contentMapper' object.": {
|
||||
"category": "Error",
|
||||
"code": 18078
|
||||
},
|
||||
"The 'typescript.contentMapper.exec' of the content mapper package '{0}' must be a non-empty array of strings.": {
|
||||
"category": "Error",
|
||||
"code": 18079
|
||||
},
|
||||
"Virtual code produced by the content mapper '{0}' has problems with no corresponding location in this file.": {
|
||||
"category": "Error",
|
||||
"code": 18080
|
||||
},
|
||||
"The content mapper '{0}' produced overlapping or out-of-order position mappings (near virtual offset {1}).": {
|
||||
"category": "Error",
|
||||
"code": 18081
|
||||
},
|
||||
"The content mapper '{0}' produced invalid mapping features near original offset {1}.": {
|
||||
"category": "Error",
|
||||
"code": 18082
|
||||
},
|
||||
"The content mapper '{0}' produced a position mapping with an invalid kind (near virtual offset {1}).": {
|
||||
"category": "Error",
|
||||
"code": 18083
|
||||
},
|
||||
"The content mapper process could not be started or initialized.": {
|
||||
"category": "Message",
|
||||
"code": 18084
|
||||
},
|
||||
"The content mapper process failed while handling the transform request.": {
|
||||
"category": "Message",
|
||||
"code": 18085
|
||||
},
|
||||
"The content mapper returned an invalid transform response.": {
|
||||
"category": "Message",
|
||||
"code": 18086
|
||||
},
|
||||
"The content mapper selected unsupported position encoding '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 18087
|
||||
},
|
||||
"The content mapper diagnostic source must not be empty.": {
|
||||
"category": "Message",
|
||||
"code": 18088
|
||||
},
|
||||
"The content mapper diagnostic source '{0}' is reserved by TypeScript.": {
|
||||
"category": "Message",
|
||||
"code": 18089
|
||||
},
|
||||
"The content mapper returned a project response that could not be decoded.": {
|
||||
"category": "Message",
|
||||
"code": 18090
|
||||
},
|
||||
"The content mapper process failed while handling the project request.": {
|
||||
"category": "Message",
|
||||
"code": 18091
|
||||
},
|
||||
"The content mapper did not return 'configIdentity', which is required when the content mapper has '\"dynamicConfig\": true' in its package.json.": {
|
||||
"category": "Message",
|
||||
"code": 18092
|
||||
},
|
||||
"The content mapper returned a non-absolute path in 'watchedFiles'.": {
|
||||
"category": "Message",
|
||||
"code": 18093
|
||||
},
|
||||
"The content mapper returned 'configIdentity', which is only allowed when it declares '\"dynamicConfig\": true' in its package.json.": {
|
||||
"category": "Message",
|
||||
"code": 18094
|
||||
},
|
||||
"The content mapper returned 'watchedFiles', which is only allowed when it declares '\"dynamicConfig\": true' in its package.json.": {
|
||||
"category": "Message",
|
||||
"code": 18095
|
||||
},
|
||||
"Content mapper supplemental output file '{0}' conflicts with an existing file.": {
|
||||
"category": "Message",
|
||||
"code": 18096
|
||||
},
|
||||
"Supplemental virtual file produced by the content mapper for file '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 18097
|
||||
},
|
||||
"The content mapper returned an output with unsupported virtual extension '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 18098
|
||||
},
|
||||
"The content mapper '{0}' could not be initialized.": {
|
||||
"category": "Error",
|
||||
"code": 18099
|
||||
},
|
||||
"The content mapper command '{0}' could not be started: {1}": {
|
||||
"category": "Message",
|
||||
"code": 18100
|
||||
},
|
||||
"The content mapper process exited before responding to the 'initialize' request (exit code {0}).": {
|
||||
"category": "Message",
|
||||
"code": 18101
|
||||
},
|
||||
"The content mapper did not respond to the 'initialize' request within {0} seconds.": {
|
||||
"category": "Message",
|
||||
"code": 18102
|
||||
},
|
||||
"The content mapper returned an 'initialize' response that could not be decoded: {0}": {
|
||||
"category": "Message",
|
||||
"code": 18103
|
||||
},
|
||||
"The content mapper's 'initialize' request failed: {0}": {
|
||||
"category": "Message",
|
||||
"code": 18104
|
||||
},
|
||||
"Diagnostic directive {0} returned by the content mapper has an invalid range.": {
|
||||
"category": "Message",
|
||||
"code": 18105
|
||||
},
|
||||
"The content mapper returned a diagnostic directive with invalid policy '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 18106
|
||||
},
|
||||
"Diagnostic directive {0} returned by the content mapper must specify 'unusedExpectDirectiveIndex' when there is not exactly one 'unusedExpectDirectiveDiagnostics' entry.": {
|
||||
"category": "Message",
|
||||
"code": 18107
|
||||
},
|
||||
"The content mapper returned diagnostic directives with overlapping virtual ranges.": {
|
||||
"category": "Message",
|
||||
"code": 18108
|
||||
},
|
||||
"The invalid diagnostic directive is in supplemental output {0} returned by the content mapper.": {
|
||||
"category": "Message",
|
||||
"code": 18109
|
||||
},
|
||||
"Diagnostic directive {0} returned by the content mapper has an invalid 'unusedExpectDirectiveIndex'.": {
|
||||
"category": "Message",
|
||||
"code": 18110
|
||||
}
|
||||
}
|
||||
@@ -3374,6 +3374,22 @@ var List_of_file_name_suffixes_to_search_when_resolving_a_module = &Message{code
|
||||
|
||||
var X_false_unless_checkJs_is_set = &Message{code: 6932, category: CategoryMessage, key: "false_unless_checkJs_is_set_6932", text: "`false`, unless `checkJs` is set"}
|
||||
|
||||
var Do_not_print_diagnostics = &Message{code: 6933, category: CategoryMessage, key: "Do_not_print_diagnostics_6933", text: "Do not print diagnostics."}
|
||||
|
||||
var Run_in_single_threaded_mode = &Message{code: 6934, category: CategoryMessage, key: "Run_in_single_threaded_mode_6934", text: "Run in single threaded mode."}
|
||||
|
||||
var Generate_pprof_CPU_Slashmemory_profiles_to_the_given_directory = &Message{code: 6935, category: CategoryMessage, key: "Generate_pprof_CPU_Slashmemory_profiles_to_the_given_directory_6935", text: "Generate pprof CPU/memory profiles to the given directory."}
|
||||
|
||||
var Set_the_number_of_checkers_per_project = &Message{code: 6936, category: CategoryMessage, key: "Set_the_number_of_checkers_per_project_6936", text: "Set the number of checkers per project."}
|
||||
|
||||
var X_4_unless_singleThreaded_is_passed = &Message{code: 6937, category: CategoryMessage, key: "4_unless_singleThreaded_is_passed_6937", text: "4, unless --singleThreaded is passed."}
|
||||
|
||||
var Set_the_number_of_projects_to_build_concurrently = &Message{code: 6938, category: CategoryMessage, key: "Set_the_number_of_projects_to_build_concurrently_6938", text: "Set the number of projects to build concurrently."}
|
||||
|
||||
var Deduplicate_packages_with_the_same_name_and_version = &Message{code: 6939, category: CategoryMessage, key: "Deduplicate_packages_with_the_same_name_and_version_6939", text: "Deduplicate packages with the same name and version."}
|
||||
|
||||
var Allow_loading_external_content_mapper_plugins_that_execute_code_during_compilation = &Message{code: 6940, category: CategoryMessage, key: "Allow_loading_external_content_mapper_plugins_that_execute_code_during_compilation_6940", text: "Allow loading external content mapper plugins that execute code during compilation."}
|
||||
|
||||
var Variable_0_implicitly_has_an_1_type = &Message{code: 7005, category: CategoryError, key: "Variable_0_implicitly_has_an_1_type_7005", text: "Variable '{0}' implicitly has an '{1}' type."}
|
||||
|
||||
var Parameter_0_implicitly_has_an_1_type = &Message{code: 7006, category: CategoryError, key: "Parameter_0_implicitly_has_an_1_type_7006", text: "Parameter '{0}' implicitly has an '{1}' type."}
|
||||
@@ -3780,6 +3796,98 @@ var Duplicate_named_capturing_groups_are_only_available_when_targeting_0_or_late
|
||||
|
||||
var Private_identifiers_cannot_be_used_in_destructuring_patterns = &Message{code: 18064, category: CategoryError, key: "Private_identifiers_cannot_be_used_in_destructuring_patterns_18064", text: "Private identifiers cannot be used in destructuring patterns."}
|
||||
|
||||
var Content_mapper_file_extension_0_must_begin_with_a = &Message{code: 18065, category: CategoryError, key: "Content_mapper_file_extension_0_must_begin_with_a_18065", text: "Content mapper file extension '{0}' must begin with a '.'."}
|
||||
|
||||
var Content_mapper_file_extension_0_is_a_built_in_extension_and_cannot_be_registered_by_a_content_mapper = &Message{code: 18066, category: CategoryError, key: "Content_mapper_file_extension_0_is_a_built_in_extension_and_cannot_be_registered_by_a_content_mapper_18066", text: "Content mapper file extension '{0}' is a built-in extension and cannot be registered by a content mapper."}
|
||||
|
||||
var Content_mapper_file_extension_0_is_registered_by_more_than_one_content_mapper = &Message{code: 18067, category: CategoryError, key: "Content_mapper_file_extension_0_is_registered_by_more_than_one_content_mapper_18067", text: "Content mapper file extension '{0}' is registered by more than one content mapper."}
|
||||
|
||||
var Content_mappers_require_the_runExternalCode_command_line_flag_to_be_enabled = &Message{code: 18068, category: CategoryError, key: "Content_mappers_require_the_runExternalCode_command_line_flag_to_be_enabled_18068", text: "Content mappers require the '--runExternalCode' command line flag to be enabled."}
|
||||
|
||||
var The_content_mapper_0_failed_to_transform_this_file = &Message{code: 18069, category: CategoryError, key: "The_content_mapper_0_failed_to_transform_this_file_18069", text: "The content mapper '{0}' failed to transform this file."}
|
||||
|
||||
var The_content_mapper_0_failed_1_times_and_will_not_be_used = &Message{code: 18070, category: CategoryError, key: "The_content_mapper_0_failed_1_times_and_will_not_be_used_18070", text: "The content mapper '{0}' failed {1} times and will not be used."}
|
||||
|
||||
var The_content_mapper_0_did_not_provide_the_required_position_mappings = &Message{code: 18071, category: CategoryError, key: "The_content_mapper_0_did_not_provide_the_required_position_mappings_18071", text: "The content mapper '{0}' did not provide the required position mappings."}
|
||||
|
||||
var The_content_mapper_0_produced_a_position_mapping_that_points_outside_the_original_content_original_offset_1 = &Message{code: 18072, category: CategoryError, key: "The_content_mapper_0_produced_a_position_mapping_that_points_outside_the_original_content_original_o_18072", text: "The content mapper '{0}' produced a position mapping that points outside the original content (original offset {1})."}
|
||||
|
||||
var The_content_mapper_0_produced_a_verbatim_mapping_that_does_not_match_the_original_content_virtual_offset_1_original_offset_2 = &Message{code: 18073, category: CategoryError, key: "The_content_mapper_0_produced_a_verbatim_mapping_that_does_not_match_the_original_content_virtual_of_18073", text: "The content mapper '{0}' produced a verbatim mapping that does not match the original content (virtual offset {1}, original offset {2})."}
|
||||
|
||||
var This_location_is_in_virtual_code_produced_by_the_content_mapper_0_and_has_no_corresponding_location_in_the_original_file = &Message{code: 18074, category: CategoryMessage, key: "This_location_is_in_virtual_code_produced_by_the_content_mapper_0_and_has_no_corresponding_location__18074", text: "This location is in virtual code produced by the content mapper '{0}' and has no corresponding location in the original file."}
|
||||
|
||||
var The_content_mapper_package_0_could_not_be_resolved = &Message{code: 18075, category: CategoryError, key: "The_content_mapper_package_0_could_not_be_resolved_18075", text: "The content mapper package '{0}' could not be resolved."}
|
||||
|
||||
var The_package_json_of_the_content_mapper_package_0_could_not_be_parsed = &Message{code: 18076, category: CategoryError, key: "The_package_json_of_the_content_mapper_package_0_could_not_be_parsed_18076", text: "The 'package.json' of the content mapper package '{0}' could not be parsed."}
|
||||
|
||||
var The_package_json_of_the_content_mapper_package_0_does_not_specify_a_name = &Message{code: 18077, category: CategoryError, key: "The_package_json_of_the_content_mapper_package_0_does_not_specify_a_name_18077", text: "The 'package.json' of the content mapper package '{0}' does not specify a 'name'."}
|
||||
|
||||
var The_package_json_of_the_content_mapper_package_0_does_not_declare_a_typescript_contentMapper_object = &Message{code: 18078, category: CategoryError, key: "The_package_json_of_the_content_mapper_package_0_does_not_declare_a_typescript_contentMapper_object_18078", text: "The 'package.json' of the content mapper package '{0}' does not declare a 'typescript.contentMapper' object."}
|
||||
|
||||
var The_typescript_contentMapper_exec_of_the_content_mapper_package_0_must_be_a_non_empty_array_of_strings = &Message{code: 18079, category: CategoryError, key: "The_typescript_contentMapper_exec_of_the_content_mapper_package_0_must_be_a_non_empty_array_of_strin_18079", text: "The 'typescript.contentMapper.exec' of the content mapper package '{0}' must be a non-empty array of strings."}
|
||||
|
||||
var Virtual_code_produced_by_the_content_mapper_0_has_problems_with_no_corresponding_location_in_this_file = &Message{code: 18080, category: CategoryError, key: "Virtual_code_produced_by_the_content_mapper_0_has_problems_with_no_corresponding_location_in_this_fi_18080", text: "Virtual code produced by the content mapper '{0}' has problems with no corresponding location in this file."}
|
||||
|
||||
var The_content_mapper_0_produced_overlapping_or_out_of_order_position_mappings_near_virtual_offset_1 = &Message{code: 18081, category: CategoryError, key: "The_content_mapper_0_produced_overlapping_or_out_of_order_position_mappings_near_virtual_offset_1_18081", text: "The content mapper '{0}' produced overlapping or out-of-order position mappings (near virtual offset {1})."}
|
||||
|
||||
var The_content_mapper_0_produced_invalid_mapping_features_near_original_offset_1 = &Message{code: 18082, category: CategoryError, key: "The_content_mapper_0_produced_invalid_mapping_features_near_original_offset_1_18082", text: "The content mapper '{0}' produced invalid mapping features near original offset {1}."}
|
||||
|
||||
var The_content_mapper_0_produced_a_position_mapping_with_an_invalid_kind_near_virtual_offset_1 = &Message{code: 18083, category: CategoryError, key: "The_content_mapper_0_produced_a_position_mapping_with_an_invalid_kind_near_virtual_offset_1_18083", text: "The content mapper '{0}' produced a position mapping with an invalid kind (near virtual offset {1})."}
|
||||
|
||||
var The_content_mapper_process_could_not_be_started_or_initialized = &Message{code: 18084, category: CategoryMessage, key: "The_content_mapper_process_could_not_be_started_or_initialized_18084", text: "The content mapper process could not be started or initialized."}
|
||||
|
||||
var The_content_mapper_process_failed_while_handling_the_transform_request = &Message{code: 18085, category: CategoryMessage, key: "The_content_mapper_process_failed_while_handling_the_transform_request_18085", text: "The content mapper process failed while handling the transform request."}
|
||||
|
||||
var The_content_mapper_returned_an_invalid_transform_response = &Message{code: 18086, category: CategoryMessage, key: "The_content_mapper_returned_an_invalid_transform_response_18086", text: "The content mapper returned an invalid transform response."}
|
||||
|
||||
var The_content_mapper_selected_unsupported_position_encoding_0 = &Message{code: 18087, category: CategoryMessage, key: "The_content_mapper_selected_unsupported_position_encoding_0_18087", text: "The content mapper selected unsupported position encoding '{0}'."}
|
||||
|
||||
var The_content_mapper_diagnostic_source_must_not_be_empty = &Message{code: 18088, category: CategoryMessage, key: "The_content_mapper_diagnostic_source_must_not_be_empty_18088", text: "The content mapper diagnostic source must not be empty."}
|
||||
|
||||
var The_content_mapper_diagnostic_source_0_is_reserved_by_TypeScript = &Message{code: 18089, category: CategoryMessage, key: "The_content_mapper_diagnostic_source_0_is_reserved_by_TypeScript_18089", text: "The content mapper diagnostic source '{0}' is reserved by TypeScript."}
|
||||
|
||||
var The_content_mapper_returned_a_project_response_that_could_not_be_decoded = &Message{code: 18090, category: CategoryMessage, key: "The_content_mapper_returned_a_project_response_that_could_not_be_decoded_18090", text: "The content mapper returned a project response that could not be decoded."}
|
||||
|
||||
var The_content_mapper_process_failed_while_handling_the_project_request = &Message{code: 18091, category: CategoryMessage, key: "The_content_mapper_process_failed_while_handling_the_project_request_18091", text: "The content mapper process failed while handling the project request."}
|
||||
|
||||
var The_content_mapper_did_not_return_configIdentity_which_is_required_when_the_content_mapper_has_dynamicConfig_Colon_true_in_its_package_json = &Message{code: 18092, category: CategoryMessage, key: "The_content_mapper_did_not_return_configIdentity_which_is_required_when_the_content_mapper_has_dynam_18092", text: "The content mapper did not return 'configIdentity', which is required when the content mapper has '\"dynamicConfig\": true' in its package.json."}
|
||||
|
||||
var The_content_mapper_returned_a_non_absolute_path_in_watchedFiles = &Message{code: 18093, category: CategoryMessage, key: "The_content_mapper_returned_a_non_absolute_path_in_watchedFiles_18093", text: "The content mapper returned a non-absolute path in 'watchedFiles'."}
|
||||
|
||||
var The_content_mapper_returned_configIdentity_which_is_only_allowed_when_it_declares_dynamicConfig_Colon_true_in_its_package_json = &Message{code: 18094, category: CategoryMessage, key: "The_content_mapper_returned_configIdentity_which_is_only_allowed_when_it_declares_dynamicConfig_Colo_18094", text: "The content mapper returned 'configIdentity', which is only allowed when it declares '\"dynamicConfig\": true' in its package.json."}
|
||||
|
||||
var The_content_mapper_returned_watchedFiles_which_is_only_allowed_when_it_declares_dynamicConfig_Colon_true_in_its_package_json = &Message{code: 18095, category: CategoryMessage, key: "The_content_mapper_returned_watchedFiles_which_is_only_allowed_when_it_declares_dynamicConfig_Colon__18095", text: "The content mapper returned 'watchedFiles', which is only allowed when it declares '\"dynamicConfig\": true' in its package.json."}
|
||||
|
||||
var Content_mapper_supplemental_output_file_0_conflicts_with_an_existing_file = &Message{code: 18096, category: CategoryMessage, key: "Content_mapper_supplemental_output_file_0_conflicts_with_an_existing_file_18096", text: "Content mapper supplemental output file '{0}' conflicts with an existing file."}
|
||||
|
||||
var Supplemental_virtual_file_produced_by_the_content_mapper_for_file_0 = &Message{code: 18097, category: CategoryMessage, key: "Supplemental_virtual_file_produced_by_the_content_mapper_for_file_0_18097", text: "Supplemental virtual file produced by the content mapper for file '{0}'."}
|
||||
|
||||
var The_content_mapper_returned_an_output_with_unsupported_virtual_extension_0 = &Message{code: 18098, category: CategoryMessage, key: "The_content_mapper_returned_an_output_with_unsupported_virtual_extension_0_18098", text: "The content mapper returned an output with unsupported virtual extension '{0}'."}
|
||||
|
||||
var The_content_mapper_0_could_not_be_initialized = &Message{code: 18099, category: CategoryError, key: "The_content_mapper_0_could_not_be_initialized_18099", text: "The content mapper '{0}' could not be initialized."}
|
||||
|
||||
var The_content_mapper_command_0_could_not_be_started_Colon_1 = &Message{code: 18100, category: CategoryMessage, key: "The_content_mapper_command_0_could_not_be_started_Colon_1_18100", text: "The content mapper command '{0}' could not be started: {1}"}
|
||||
|
||||
var The_content_mapper_process_exited_before_responding_to_the_initialize_request_exit_code_0 = &Message{code: 18101, category: CategoryMessage, key: "The_content_mapper_process_exited_before_responding_to_the_initialize_request_exit_code_0_18101", text: "The content mapper process exited before responding to the 'initialize' request (exit code {0})."}
|
||||
|
||||
var The_content_mapper_did_not_respond_to_the_initialize_request_within_0_seconds = &Message{code: 18102, category: CategoryMessage, key: "The_content_mapper_did_not_respond_to_the_initialize_request_within_0_seconds_18102", text: "The content mapper did not respond to the 'initialize' request within {0} seconds."}
|
||||
|
||||
var The_content_mapper_returned_an_initialize_response_that_could_not_be_decoded_Colon_0 = &Message{code: 18103, category: CategoryMessage, key: "The_content_mapper_returned_an_initialize_response_that_could_not_be_decoded_Colon_0_18103", text: "The content mapper returned an 'initialize' response that could not be decoded: {0}"}
|
||||
|
||||
var The_content_mapper_s_initialize_request_failed_Colon_0 = &Message{code: 18104, category: CategoryMessage, key: "The_content_mapper_s_initialize_request_failed_Colon_0_18104", text: "The content mapper's 'initialize' request failed: {0}"}
|
||||
|
||||
var Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_range = &Message{code: 18105, category: CategoryMessage, key: "Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_range_18105", text: "Diagnostic directive {0} returned by the content mapper has an invalid range."}
|
||||
|
||||
var The_content_mapper_returned_a_diagnostic_directive_with_invalid_policy_0 = &Message{code: 18106, category: CategoryMessage, key: "The_content_mapper_returned_a_diagnostic_directive_with_invalid_policy_0_18106", text: "The content mapper returned a diagnostic directive with invalid policy '{0}'."}
|
||||
|
||||
var Diagnostic_directive_0_returned_by_the_content_mapper_must_specify_unusedExpectDirectiveIndex_when_there_is_not_exactly_one_unusedExpectDirectiveDiagnostics_entry = &Message{code: 18107, category: CategoryMessage, key: "Diagnostic_directive_0_returned_by_the_content_mapper_must_specify_unusedExpectDirectiveIndex_when_t_18107", text: "Diagnostic directive {0} returned by the content mapper must specify 'unusedExpectDirectiveIndex' when there is not exactly one 'unusedExpectDirectiveDiagnostics' entry."}
|
||||
|
||||
var The_content_mapper_returned_diagnostic_directives_with_overlapping_virtual_ranges = &Message{code: 18108, category: CategoryMessage, key: "The_content_mapper_returned_diagnostic_directives_with_overlapping_virtual_ranges_18108", text: "The content mapper returned diagnostic directives with overlapping virtual ranges."}
|
||||
|
||||
var The_invalid_diagnostic_directive_is_in_supplemental_output_0_returned_by_the_content_mapper = &Message{code: 18109, category: CategoryMessage, key: "The_invalid_diagnostic_directive_is_in_supplemental_output_0_returned_by_the_content_mapper_18109", text: "The invalid diagnostic directive is in supplemental output {0} returned by the content mapper."}
|
||||
|
||||
var Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_unusedExpectDirectiveIndex = &Message{code: 18110, category: CategoryMessage, key: "Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_unusedExpectDirectiveIndex_18110", text: "Diagnostic directive {0} returned by the content mapper has an invalid 'unusedExpectDirectiveIndex'."}
|
||||
|
||||
var X_nodenext_if_module_is_nodenext_node16_if_module_is_node16_or_node18_otherwise_bundler = &Message{code: 69010, category: CategoryMessage, key: "nodenext_if_module_is_nodenext_node16_if_module_is_node16_or_node18_otherwise_bundler_69010", text: "`nodenext` if `module` is `nodenext`; `node16` if `module` is `node16` or `node18`; otherwise, `bundler`."}
|
||||
|
||||
var File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module = &Message{code: 80001, category: CategorySuggestion, key: "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", text: "File is a CommonJS module; it may be converted to an ES module."}
|
||||
@@ -4296,137 +4404,29 @@ var Add_resolution_mode_import_attribute = &Message{code: 95196, category: Categ
|
||||
|
||||
var Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it = &Message{code: 95197, category: CategoryMessage, key: "Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197", text: "Add 'resolution-mode' import attribute to all type-only imports that need it"}
|
||||
|
||||
var Do_not_print_diagnostics = &Message{code: 100000, category: CategoryMessage, key: "Do_not_print_diagnostics_100000", text: "Do not print diagnostics."}
|
||||
var X_0_references = &Message{code: 95198, category: CategoryMessage, key: "_0_references_95198", text: "{0} references"}
|
||||
|
||||
var Run_in_single_threaded_mode = &Message{code: 100001, category: CategoryMessage, key: "Run_in_single_threaded_mode_100001", text: "Run in single threaded mode."}
|
||||
var X_1_reference = &Message{code: 95199, category: CategoryMessage, key: "1_reference_95199", text: "1 reference"}
|
||||
|
||||
var Generate_pprof_CPU_Slashmemory_profiles_to_the_given_directory = &Message{code: 100002, category: CategoryMessage, key: "Generate_pprof_CPU_Slashmemory_profiles_to_the_given_directory_100002", text: "Generate pprof CPU/memory profiles to the given directory."}
|
||||
var X_0_implementations = &Message{code: 95200, category: CategoryMessage, key: "_0_implementations_95200", text: "{0} implementations"}
|
||||
|
||||
var Set_the_number_of_checkers_per_project = &Message{code: 100003, category: CategoryMessage, key: "Set_the_number_of_checkers_per_project_100003", text: "Set the number of checkers per project."}
|
||||
var X_1_implementation = &Message{code: 95201, category: CategoryMessage, key: "1_implementation_95201", text: "1 implementation"}
|
||||
|
||||
var X_4_unless_singleThreaded_is_passed = &Message{code: 100004, category: CategoryMessage, key: "4_unless_singleThreaded_is_passed_100004", text: "4, unless --singleThreaded is passed."}
|
||||
var Loading = &Message{code: 95202, category: CategoryMessage, key: "Loading_95202", text: "Loading"}
|
||||
|
||||
var X_0_references = &Message{code: 100005, category: CategoryMessage, key: "_0_references_100005", text: "{0} references"}
|
||||
var Installing_types_for_0 = &Message{code: 95203, category: CategoryMessage, key: "Installing_types_for_0_95203", text: "Installing types for '{0}'"}
|
||||
|
||||
var X_1_reference = &Message{code: 100006, category: CategoryMessage, key: "1_reference_100006", text: "1 reference"}
|
||||
var Project_0 = &Message{code: 95204, category: CategoryMessage, key: "Project_0_95204", text: "Project '{0}'"}
|
||||
|
||||
var X_0_implementations = &Message{code: 100007, category: CategoryMessage, key: "_0_implementations_100007", text: "{0} implementations"}
|
||||
var Fix_All = &Message{code: 95205, category: CategoryMessage, key: "Fix_All_95205", text: "Fix All"}
|
||||
|
||||
var X_1_implementation = &Message{code: 100008, category: CategoryMessage, key: "1_implementation_100008", text: "1 implementation"}
|
||||
var Organize_Imports = &Message{code: 95206, category: CategoryMessage, key: "Organize_Imports_95206", text: "Organize Imports"}
|
||||
|
||||
var Set_the_number_of_projects_to_build_concurrently = &Message{code: 100009, category: CategoryMessage, key: "Set_the_number_of_projects_to_build_concurrently_100009", text: "Set the number of projects to build concurrently."}
|
||||
var Remove_Unused_Imports = &Message{code: 95207, category: CategoryMessage, key: "Remove_Unused_Imports_95207", text: "Remove Unused Imports"}
|
||||
|
||||
var Deduplicate_packages_with_the_same_name_and_version = &Message{code: 100011, category: CategoryMessage, key: "Deduplicate_packages_with_the_same_name_and_version_100011", text: "Deduplicate packages with the same name and version."}
|
||||
var Sort_Imports = &Message{code: 95208, category: CategoryMessage, key: "Sort_Imports_95208", text: "Sort Imports"}
|
||||
|
||||
var Loading = &Message{code: 100012, category: CategoryMessage, key: "Loading_100012", text: "Loading"}
|
||||
|
||||
var Installing_types_for_0 = &Message{code: 100013, category: CategoryMessage, key: "Installing_types_for_0_100013", text: "Installing types for '{0}'"}
|
||||
|
||||
var Project_0 = &Message{code: 100014, category: CategoryMessage, key: "Project_0_100014", text: "Project '{0}'"}
|
||||
|
||||
var Fix_All = &Message{code: 100015, category: CategoryMessage, key: "Fix_All_100015", text: "Fix All"}
|
||||
|
||||
var Organize_Imports = &Message{code: 100016, category: CategoryMessage, key: "Organize_Imports_100016", text: "Organize Imports"}
|
||||
|
||||
var Remove_Unused_Imports = &Message{code: 100017, category: CategoryMessage, key: "Remove_Unused_Imports_100017", text: "Remove Unused Imports"}
|
||||
|
||||
var Sort_Imports = &Message{code: 100018, category: CategoryMessage, key: "Sort_Imports_100018", text: "Sort Imports"}
|
||||
|
||||
var JSDoc_comment = &Message{code: 100019, category: CategoryMessage, key: "JSDoc_comment_100019", text: "JSDoc comment"}
|
||||
|
||||
var Content_mapper_file_extension_0_must_begin_with_a = &Message{code: 100020, category: CategoryError, key: "Content_mapper_file_extension_0_must_begin_with_a_100020", text: "Content mapper file extension '{0}' must begin with a '.'."}
|
||||
|
||||
var Content_mapper_file_extension_0_is_a_built_in_extension_and_cannot_be_registered_by_a_content_mapper = &Message{code: 100021, category: CategoryError, key: "Content_mapper_file_extension_0_is_a_built_in_extension_and_cannot_be_registered_by_a_content_mapper_100021", text: "Content mapper file extension '{0}' is a built-in extension and cannot be registered by a content mapper."}
|
||||
|
||||
var Content_mapper_file_extension_0_is_registered_by_more_than_one_content_mapper = &Message{code: 100022, category: CategoryError, key: "Content_mapper_file_extension_0_is_registered_by_more_than_one_content_mapper_100022", text: "Content mapper file extension '{0}' is registered by more than one content mapper."}
|
||||
|
||||
var Allow_loading_external_content_mapper_plugins_that_execute_code_during_compilation = &Message{code: 100023, category: CategoryMessage, key: "Allow_loading_external_content_mapper_plugins_that_execute_code_during_compilation_100023", text: "Allow loading external content mapper plugins that execute code during compilation."}
|
||||
|
||||
var Content_mappers_require_the_runExternalCode_command_line_flag_to_be_enabled = &Message{code: 100024, category: CategoryError, key: "Content_mappers_require_the_runExternalCode_command_line_flag_to_be_enabled_100024", text: "Content mappers require the '--runExternalCode' command line flag to be enabled."}
|
||||
|
||||
var The_content_mapper_0_failed_to_transform_this_file = &Message{code: 100025, category: CategoryError, key: "The_content_mapper_0_failed_to_transform_this_file_100025", text: "The content mapper '{0}' failed to transform this file."}
|
||||
|
||||
var The_content_mapper_0_failed_1_times_and_will_not_be_used = &Message{code: 100026, category: CategoryError, key: "The_content_mapper_0_failed_1_times_and_will_not_be_used_100026", text: "The content mapper '{0}' failed {1} times and will not be used."}
|
||||
|
||||
var The_content_mapper_0_did_not_provide_the_required_position_mappings = &Message{code: 100027, category: CategoryError, key: "The_content_mapper_0_did_not_provide_the_required_position_mappings_100027", text: "The content mapper '{0}' did not provide the required position mappings."}
|
||||
|
||||
var The_content_mapper_0_produced_a_position_mapping_that_points_outside_the_original_content_original_offset_1 = &Message{code: 100028, category: CategoryError, key: "The_content_mapper_0_produced_a_position_mapping_that_points_outside_the_original_content_original_o_100028", text: "The content mapper '{0}' produced a position mapping that points outside the original content (original offset {1})."}
|
||||
|
||||
var The_content_mapper_0_produced_a_verbatim_mapping_that_does_not_match_the_original_content_virtual_offset_1_original_offset_2 = &Message{code: 100029, category: CategoryError, key: "The_content_mapper_0_produced_a_verbatim_mapping_that_does_not_match_the_original_content_virtual_of_100029", text: "The content mapper '{0}' produced a verbatim mapping that does not match the original content (virtual offset {1}, original offset {2})."}
|
||||
|
||||
var This_location_is_in_virtual_code_produced_by_the_content_mapper_0_and_has_no_corresponding_location_in_the_original_file = &Message{code: 100030, category: CategoryMessage, key: "This_location_is_in_virtual_code_produced_by_the_content_mapper_0_and_has_no_corresponding_location__100030", text: "This location is in virtual code produced by the content mapper '{0}' and has no corresponding location in the original file."}
|
||||
|
||||
var The_content_mapper_package_0_could_not_be_resolved = &Message{code: 100031, category: CategoryError, key: "The_content_mapper_package_0_could_not_be_resolved_100031", text: "The content mapper package '{0}' could not be resolved."}
|
||||
|
||||
var The_package_json_of_the_content_mapper_package_0_could_not_be_parsed = &Message{code: 100032, category: CategoryError, key: "The_package_json_of_the_content_mapper_package_0_could_not_be_parsed_100032", text: "The 'package.json' of the content mapper package '{0}' could not be parsed."}
|
||||
|
||||
var The_package_json_of_the_content_mapper_package_0_does_not_specify_a_name = &Message{code: 100033, category: CategoryError, key: "The_package_json_of_the_content_mapper_package_0_does_not_specify_a_name_100033", text: "The 'package.json' of the content mapper package '{0}' does not specify a 'name'."}
|
||||
|
||||
var The_package_json_of_the_content_mapper_package_0_does_not_declare_a_typescript_contentMapper_object = &Message{code: 100034, category: CategoryError, key: "The_package_json_of_the_content_mapper_package_0_does_not_declare_a_typescript_contentMapper_object_100034", text: "The 'package.json' of the content mapper package '{0}' does not declare a 'typescript.contentMapper' object."}
|
||||
|
||||
var The_typescript_contentMapper_exec_of_the_content_mapper_package_0_must_be_a_non_empty_array_of_strings = &Message{code: 100035, category: CategoryError, key: "The_typescript_contentMapper_exec_of_the_content_mapper_package_0_must_be_a_non_empty_array_of_strin_100035", text: "The 'typescript.contentMapper.exec' of the content mapper package '{0}' must be a non-empty array of strings."}
|
||||
|
||||
var Virtual_code_produced_by_the_content_mapper_0_has_problems_with_no_corresponding_location_in_this_file = &Message{code: 100036, category: CategoryError, key: "Virtual_code_produced_by_the_content_mapper_0_has_problems_with_no_corresponding_location_in_this_fi_100036", text: "Virtual code produced by the content mapper '{0}' has problems with no corresponding location in this file."}
|
||||
|
||||
var The_content_mapper_0_produced_overlapping_or_out_of_order_position_mappings_near_virtual_offset_1 = &Message{code: 100037, category: CategoryError, key: "The_content_mapper_0_produced_overlapping_or_out_of_order_position_mappings_near_virtual_offset_1_100037", text: "The content mapper '{0}' produced overlapping or out-of-order position mappings (near virtual offset {1})."}
|
||||
|
||||
var The_content_mapper_0_produced_invalid_mapping_features_near_original_offset_1 = &Message{code: 100039, category: CategoryError, key: "The_content_mapper_0_produced_invalid_mapping_features_near_original_offset_1_100039", text: "The content mapper '{0}' produced invalid mapping features near original offset {1}."}
|
||||
|
||||
var The_content_mapper_0_produced_a_position_mapping_with_an_invalid_kind_near_virtual_offset_1 = &Message{code: 100040, category: CategoryError, key: "The_content_mapper_0_produced_a_position_mapping_with_an_invalid_kind_near_virtual_offset_1_100040", text: "The content mapper '{0}' produced a position mapping with an invalid kind (near virtual offset {1})."}
|
||||
|
||||
var The_content_mapper_process_could_not_be_started_or_initialized = &Message{code: 100041, category: CategoryMessage, key: "The_content_mapper_process_could_not_be_started_or_initialized_100041", text: "The content mapper process could not be started or initialized."}
|
||||
|
||||
var The_content_mapper_process_failed_while_handling_the_transform_request = &Message{code: 100042, category: CategoryMessage, key: "The_content_mapper_process_failed_while_handling_the_transform_request_100042", text: "The content mapper process failed while handling the transform request."}
|
||||
|
||||
var The_content_mapper_returned_an_invalid_transform_response = &Message{code: 100043, category: CategoryMessage, key: "The_content_mapper_returned_an_invalid_transform_response_100043", text: "The content mapper returned an invalid transform response."}
|
||||
|
||||
var The_content_mapper_selected_unsupported_position_encoding_0 = &Message{code: 100045, category: CategoryMessage, key: "The_content_mapper_selected_unsupported_position_encoding_0_100045", text: "The content mapper selected unsupported position encoding '{0}'."}
|
||||
|
||||
var The_content_mapper_diagnostic_source_must_not_be_empty = &Message{code: 100046, category: CategoryMessage, key: "The_content_mapper_diagnostic_source_must_not_be_empty_100046", text: "The content mapper diagnostic source must not be empty."}
|
||||
|
||||
var The_content_mapper_diagnostic_source_0_is_reserved_by_TypeScript = &Message{code: 100047, category: CategoryMessage, key: "The_content_mapper_diagnostic_source_0_is_reserved_by_TypeScript_100047", text: "The content mapper diagnostic source '{0}' is reserved by TypeScript."}
|
||||
|
||||
var The_content_mapper_returned_a_project_response_that_could_not_be_decoded = &Message{code: 100048, category: CategoryMessage, key: "The_content_mapper_returned_a_project_response_that_could_not_be_decoded_100048", text: "The content mapper returned a project response that could not be decoded."}
|
||||
|
||||
var The_content_mapper_process_failed_while_handling_the_project_request = &Message{code: 100049, category: CategoryMessage, key: "The_content_mapper_process_failed_while_handling_the_project_request_100049", text: "The content mapper process failed while handling the project request."}
|
||||
|
||||
var The_content_mapper_did_not_return_configIdentity_which_is_required_when_the_content_mapper_has_dynamicConfig_Colon_true_in_its_package_json = &Message{code: 100050, category: CategoryMessage, key: "The_content_mapper_did_not_return_configIdentity_which_is_required_when_the_content_mapper_has_dynam_100050", text: "The content mapper did not return 'configIdentity', which is required when the content mapper has '\"dynamicConfig\": true' in its package.json."}
|
||||
|
||||
var The_content_mapper_returned_a_non_absolute_path_in_watchedFiles = &Message{code: 100051, category: CategoryMessage, key: "The_content_mapper_returned_a_non_absolute_path_in_watchedFiles_100051", text: "The content mapper returned a non-absolute path in 'watchedFiles'."}
|
||||
|
||||
var The_content_mapper_returned_configIdentity_which_is_only_allowed_when_it_declares_dynamicConfig_Colon_true_in_its_package_json = &Message{code: 100052, category: CategoryMessage, key: "The_content_mapper_returned_configIdentity_which_is_only_allowed_when_it_declares_dynamicConfig_Colo_100052", text: "The content mapper returned 'configIdentity', which is only allowed when it declares '\"dynamicConfig\": true' in its package.json."}
|
||||
|
||||
var The_content_mapper_returned_watchedFiles_which_is_only_allowed_when_it_declares_dynamicConfig_Colon_true_in_its_package_json = &Message{code: 100053, category: CategoryMessage, key: "The_content_mapper_returned_watchedFiles_which_is_only_allowed_when_it_declares_dynamicConfig_Colon__100053", text: "The content mapper returned 'watchedFiles', which is only allowed when it declares '\"dynamicConfig\": true' in its package.json."}
|
||||
|
||||
var Content_mapper_supplemental_output_file_0_conflicts_with_an_existing_file = &Message{code: 100054, category: CategoryMessage, key: "Content_mapper_supplemental_output_file_0_conflicts_with_an_existing_file_100054", text: "Content mapper supplemental output file '{0}' conflicts with an existing file."}
|
||||
|
||||
var Supplemental_virtual_file_produced_by_the_content_mapper_for_file_0 = &Message{code: 100055, category: CategoryMessage, key: "Supplemental_virtual_file_produced_by_the_content_mapper_for_file_0_100055", text: "Supplemental virtual file produced by the content mapper for file '{0}'."}
|
||||
|
||||
var The_content_mapper_returned_an_output_with_unsupported_virtual_extension_0 = &Message{code: 100056, category: CategoryMessage, key: "The_content_mapper_returned_an_output_with_unsupported_virtual_extension_0_100056", text: "The content mapper returned an output with unsupported virtual extension '{0}'."}
|
||||
|
||||
var The_content_mapper_0_could_not_be_initialized = &Message{code: 100057, category: CategoryError, key: "The_content_mapper_0_could_not_be_initialized_100057", text: "The content mapper '{0}' could not be initialized."}
|
||||
|
||||
var The_content_mapper_command_0_could_not_be_started_Colon_1 = &Message{code: 100058, category: CategoryMessage, key: "The_content_mapper_command_0_could_not_be_started_Colon_1_100058", text: "The content mapper command '{0}' could not be started: {1}"}
|
||||
|
||||
var The_content_mapper_process_exited_before_responding_to_the_initialize_request_exit_code_0 = &Message{code: 100059, category: CategoryMessage, key: "The_content_mapper_process_exited_before_responding_to_the_initialize_request_exit_code_0_100059", text: "The content mapper process exited before responding to the 'initialize' request (exit code {0})."}
|
||||
|
||||
var The_content_mapper_did_not_respond_to_the_initialize_request_within_0_seconds = &Message{code: 100060, category: CategoryMessage, key: "The_content_mapper_did_not_respond_to_the_initialize_request_within_0_seconds_100060", text: "The content mapper did not respond to the 'initialize' request within {0} seconds."}
|
||||
|
||||
var The_content_mapper_returned_an_initialize_response_that_could_not_be_decoded_Colon_0 = &Message{code: 100061, category: CategoryMessage, key: "The_content_mapper_returned_an_initialize_response_that_could_not_be_decoded_Colon_0_100061", text: "The content mapper returned an 'initialize' response that could not be decoded: {0}"}
|
||||
|
||||
var The_content_mapper_s_initialize_request_failed_Colon_0 = &Message{code: 100062, category: CategoryMessage, key: "The_content_mapper_s_initialize_request_failed_Colon_0_100062", text: "The content mapper's 'initialize' request failed: {0}"}
|
||||
|
||||
var Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_range = &Message{code: 100063, category: CategoryMessage, key: "Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_range_100063", text: "Diagnostic directive {0} returned by the content mapper has an invalid range."}
|
||||
|
||||
var The_content_mapper_returned_a_diagnostic_directive_with_invalid_policy_0 = &Message{code: 100064, category: CategoryMessage, key: "The_content_mapper_returned_a_diagnostic_directive_with_invalid_policy_0_100064", text: "The content mapper returned a diagnostic directive with invalid policy '{0}'."}
|
||||
|
||||
var Diagnostic_directive_0_returned_by_the_content_mapper_must_specify_unusedExpectDirectiveIndex_when_there_is_not_exactly_one_unusedExpectDirectiveDiagnostics_entry = &Message{code: 100065, category: CategoryMessage, key: "Diagnostic_directive_0_returned_by_the_content_mapper_must_specify_unusedExpectDirectiveIndex_when_t_100065", text: "Diagnostic directive {0} returned by the content mapper must specify 'unusedExpectDirectiveIndex' when there is not exactly one 'unusedExpectDirectiveDiagnostics' entry."}
|
||||
|
||||
var The_content_mapper_returned_diagnostic_directives_with_overlapping_virtual_ranges = &Message{code: 100066, category: CategoryMessage, key: "The_content_mapper_returned_diagnostic_directives_with_overlapping_virtual_ranges_100066", text: "The content mapper returned diagnostic directives with overlapping virtual ranges."}
|
||||
|
||||
var The_invalid_diagnostic_directive_is_in_supplemental_output_0_returned_by_the_content_mapper = &Message{code: 100067, category: CategoryMessage, key: "The_invalid_diagnostic_directive_is_in_supplemental_output_0_returned_by_the_content_mapper_100067", text: "The invalid diagnostic directive is in supplemental output {0} returned by the content mapper."}
|
||||
|
||||
var Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_unusedExpectDirectiveIndex = &Message{code: 100068, category: CategoryMessage, key: "Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_unusedExpectDirectiveIndex_100068", text: "Diagnostic directive {0} returned by the content mapper has an invalid 'unusedExpectDirectiveIndex'."}
|
||||
var JSDoc_comment = &Message{code: 95209, category: CategoryMessage, key: "JSDoc_comment_95209", text: "JSDoc comment"}
|
||||
|
||||
var allMessages = [...]**Message{
|
||||
&Unterminated_string_literal,
|
||||
@@ -6115,6 +6115,14 @@ var allMessages = [...]**Message{
|
||||
&X_true_for_ES2022_and_above_including_ESNext,
|
||||
&List_of_file_name_suffixes_to_search_when_resolving_a_module,
|
||||
&X_false_unless_checkJs_is_set,
|
||||
&Do_not_print_diagnostics,
|
||||
&Run_in_single_threaded_mode,
|
||||
&Generate_pprof_CPU_Slashmemory_profiles_to_the_given_directory,
|
||||
&Set_the_number_of_checkers_per_project,
|
||||
&X_4_unless_singleThreaded_is_passed,
|
||||
&Set_the_number_of_projects_to_build_concurrently,
|
||||
&Deduplicate_packages_with_the_same_name_and_version,
|
||||
&Allow_loading_external_content_mapper_plugins_that_execute_code_during_compilation,
|
||||
&Variable_0_implicitly_has_an_1_type,
|
||||
&Parameter_0_implicitly_has_an_1_type,
|
||||
&Member_0_implicitly_has_an_1_type,
|
||||
@@ -6318,6 +6326,52 @@ var allMessages = [...]**Message{
|
||||
&Regular_expression_pattern_modifiers_are_only_available_when_targeting_0_or_later,
|
||||
&Duplicate_named_capturing_groups_are_only_available_when_targeting_0_or_later,
|
||||
&Private_identifiers_cannot_be_used_in_destructuring_patterns,
|
||||
&Content_mapper_file_extension_0_must_begin_with_a,
|
||||
&Content_mapper_file_extension_0_is_a_built_in_extension_and_cannot_be_registered_by_a_content_mapper,
|
||||
&Content_mapper_file_extension_0_is_registered_by_more_than_one_content_mapper,
|
||||
&Content_mappers_require_the_runExternalCode_command_line_flag_to_be_enabled,
|
||||
&The_content_mapper_0_failed_to_transform_this_file,
|
||||
&The_content_mapper_0_failed_1_times_and_will_not_be_used,
|
||||
&The_content_mapper_0_did_not_provide_the_required_position_mappings,
|
||||
&The_content_mapper_0_produced_a_position_mapping_that_points_outside_the_original_content_original_offset_1,
|
||||
&The_content_mapper_0_produced_a_verbatim_mapping_that_does_not_match_the_original_content_virtual_offset_1_original_offset_2,
|
||||
&This_location_is_in_virtual_code_produced_by_the_content_mapper_0_and_has_no_corresponding_location_in_the_original_file,
|
||||
&The_content_mapper_package_0_could_not_be_resolved,
|
||||
&The_package_json_of_the_content_mapper_package_0_could_not_be_parsed,
|
||||
&The_package_json_of_the_content_mapper_package_0_does_not_specify_a_name,
|
||||
&The_package_json_of_the_content_mapper_package_0_does_not_declare_a_typescript_contentMapper_object,
|
||||
&The_typescript_contentMapper_exec_of_the_content_mapper_package_0_must_be_a_non_empty_array_of_strings,
|
||||
&Virtual_code_produced_by_the_content_mapper_0_has_problems_with_no_corresponding_location_in_this_file,
|
||||
&The_content_mapper_0_produced_overlapping_or_out_of_order_position_mappings_near_virtual_offset_1,
|
||||
&The_content_mapper_0_produced_invalid_mapping_features_near_original_offset_1,
|
||||
&The_content_mapper_0_produced_a_position_mapping_with_an_invalid_kind_near_virtual_offset_1,
|
||||
&The_content_mapper_process_could_not_be_started_or_initialized,
|
||||
&The_content_mapper_process_failed_while_handling_the_transform_request,
|
||||
&The_content_mapper_returned_an_invalid_transform_response,
|
||||
&The_content_mapper_selected_unsupported_position_encoding_0,
|
||||
&The_content_mapper_diagnostic_source_must_not_be_empty,
|
||||
&The_content_mapper_diagnostic_source_0_is_reserved_by_TypeScript,
|
||||
&The_content_mapper_returned_a_project_response_that_could_not_be_decoded,
|
||||
&The_content_mapper_process_failed_while_handling_the_project_request,
|
||||
&The_content_mapper_did_not_return_configIdentity_which_is_required_when_the_content_mapper_has_dynamicConfig_Colon_true_in_its_package_json,
|
||||
&The_content_mapper_returned_a_non_absolute_path_in_watchedFiles,
|
||||
&The_content_mapper_returned_configIdentity_which_is_only_allowed_when_it_declares_dynamicConfig_Colon_true_in_its_package_json,
|
||||
&The_content_mapper_returned_watchedFiles_which_is_only_allowed_when_it_declares_dynamicConfig_Colon_true_in_its_package_json,
|
||||
&Content_mapper_supplemental_output_file_0_conflicts_with_an_existing_file,
|
||||
&Supplemental_virtual_file_produced_by_the_content_mapper_for_file_0,
|
||||
&The_content_mapper_returned_an_output_with_unsupported_virtual_extension_0,
|
||||
&The_content_mapper_0_could_not_be_initialized,
|
||||
&The_content_mapper_command_0_could_not_be_started_Colon_1,
|
||||
&The_content_mapper_process_exited_before_responding_to_the_initialize_request_exit_code_0,
|
||||
&The_content_mapper_did_not_respond_to_the_initialize_request_within_0_seconds,
|
||||
&The_content_mapper_returned_an_initialize_response_that_could_not_be_decoded_Colon_0,
|
||||
&The_content_mapper_s_initialize_request_failed_Colon_0,
|
||||
&Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_range,
|
||||
&The_content_mapper_returned_a_diagnostic_directive_with_invalid_policy_0,
|
||||
&Diagnostic_directive_0_returned_by_the_content_mapper_must_specify_unusedExpectDirectiveIndex_when_there_is_not_exactly_one_unusedExpectDirectiveDiagnostics_entry,
|
||||
&The_content_mapper_returned_diagnostic_directives_with_overlapping_virtual_ranges,
|
||||
&The_invalid_diagnostic_directive_is_in_supplemental_output_0_returned_by_the_content_mapper,
|
||||
&Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_unusedExpectDirectiveIndex,
|
||||
&X_nodenext_if_module_is_nodenext_node16_if_module_is_node16_or_node18_otherwise_bundler,
|
||||
&File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module,
|
||||
&This_constructor_function_may_be_converted_to_a_class_declaration,
|
||||
@@ -6576,17 +6630,10 @@ var allMessages = [...]**Message{
|
||||
&Wrap_all_invalid_decorator_expressions_in_parentheses,
|
||||
&Add_resolution_mode_import_attribute,
|
||||
&Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it,
|
||||
&Do_not_print_diagnostics,
|
||||
&Run_in_single_threaded_mode,
|
||||
&Generate_pprof_CPU_Slashmemory_profiles_to_the_given_directory,
|
||||
&Set_the_number_of_checkers_per_project,
|
||||
&X_4_unless_singleThreaded_is_passed,
|
||||
&X_0_references,
|
||||
&X_1_reference,
|
||||
&X_0_implementations,
|
||||
&X_1_implementation,
|
||||
&Set_the_number_of_projects_to_build_concurrently,
|
||||
&Deduplicate_packages_with_the_same_name_and_version,
|
||||
&Loading,
|
||||
&Installing_types_for_0,
|
||||
&Project_0,
|
||||
@@ -6595,51 +6642,4 @@ var allMessages = [...]**Message{
|
||||
&Remove_Unused_Imports,
|
||||
&Sort_Imports,
|
||||
&JSDoc_comment,
|
||||
&Content_mapper_file_extension_0_must_begin_with_a,
|
||||
&Content_mapper_file_extension_0_is_a_built_in_extension_and_cannot_be_registered_by_a_content_mapper,
|
||||
&Content_mapper_file_extension_0_is_registered_by_more_than_one_content_mapper,
|
||||
&Allow_loading_external_content_mapper_plugins_that_execute_code_during_compilation,
|
||||
&Content_mappers_require_the_runExternalCode_command_line_flag_to_be_enabled,
|
||||
&The_content_mapper_0_failed_to_transform_this_file,
|
||||
&The_content_mapper_0_failed_1_times_and_will_not_be_used,
|
||||
&The_content_mapper_0_did_not_provide_the_required_position_mappings,
|
||||
&The_content_mapper_0_produced_a_position_mapping_that_points_outside_the_original_content_original_offset_1,
|
||||
&The_content_mapper_0_produced_a_verbatim_mapping_that_does_not_match_the_original_content_virtual_offset_1_original_offset_2,
|
||||
&This_location_is_in_virtual_code_produced_by_the_content_mapper_0_and_has_no_corresponding_location_in_the_original_file,
|
||||
&The_content_mapper_package_0_could_not_be_resolved,
|
||||
&The_package_json_of_the_content_mapper_package_0_could_not_be_parsed,
|
||||
&The_package_json_of_the_content_mapper_package_0_does_not_specify_a_name,
|
||||
&The_package_json_of_the_content_mapper_package_0_does_not_declare_a_typescript_contentMapper_object,
|
||||
&The_typescript_contentMapper_exec_of_the_content_mapper_package_0_must_be_a_non_empty_array_of_strings,
|
||||
&Virtual_code_produced_by_the_content_mapper_0_has_problems_with_no_corresponding_location_in_this_file,
|
||||
&The_content_mapper_0_produced_overlapping_or_out_of_order_position_mappings_near_virtual_offset_1,
|
||||
&The_content_mapper_0_produced_invalid_mapping_features_near_original_offset_1,
|
||||
&The_content_mapper_0_produced_a_position_mapping_with_an_invalid_kind_near_virtual_offset_1,
|
||||
&The_content_mapper_process_could_not_be_started_or_initialized,
|
||||
&The_content_mapper_process_failed_while_handling_the_transform_request,
|
||||
&The_content_mapper_returned_an_invalid_transform_response,
|
||||
&The_content_mapper_selected_unsupported_position_encoding_0,
|
||||
&The_content_mapper_diagnostic_source_must_not_be_empty,
|
||||
&The_content_mapper_diagnostic_source_0_is_reserved_by_TypeScript,
|
||||
&The_content_mapper_returned_a_project_response_that_could_not_be_decoded,
|
||||
&The_content_mapper_process_failed_while_handling_the_project_request,
|
||||
&The_content_mapper_did_not_return_configIdentity_which_is_required_when_the_content_mapper_has_dynamicConfig_Colon_true_in_its_package_json,
|
||||
&The_content_mapper_returned_a_non_absolute_path_in_watchedFiles,
|
||||
&The_content_mapper_returned_configIdentity_which_is_only_allowed_when_it_declares_dynamicConfig_Colon_true_in_its_package_json,
|
||||
&The_content_mapper_returned_watchedFiles_which_is_only_allowed_when_it_declares_dynamicConfig_Colon_true_in_its_package_json,
|
||||
&Content_mapper_supplemental_output_file_0_conflicts_with_an_existing_file,
|
||||
&Supplemental_virtual_file_produced_by_the_content_mapper_for_file_0,
|
||||
&The_content_mapper_returned_an_output_with_unsupported_virtual_extension_0,
|
||||
&The_content_mapper_0_could_not_be_initialized,
|
||||
&The_content_mapper_command_0_could_not_be_started_Colon_1,
|
||||
&The_content_mapper_process_exited_before_responding_to_the_initialize_request_exit_code_0,
|
||||
&The_content_mapper_did_not_respond_to_the_initialize_request_within_0_seconds,
|
||||
&The_content_mapper_returned_an_initialize_response_that_could_not_be_decoded_Colon_0,
|
||||
&The_content_mapper_s_initialize_request_failed_Colon_0,
|
||||
&Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_range,
|
||||
&The_content_mapper_returned_a_diagnostic_directive_with_invalid_policy_0,
|
||||
&Diagnostic_directive_0_returned_by_the_content_mapper_must_specify_unusedExpectDirectiveIndex_when_there_is_not_exactly_one_unusedExpectDirectiveDiagnostics_entry,
|
||||
&The_content_mapper_returned_diagnostic_directives_with_overlapping_virtual_ranges,
|
||||
&The_invalid_diagnostic_directive_is_in_supplemental_output_0_returned_by_the_content_mapper,
|
||||
&Diagnostic_directive_0_returned_by_the_content_mapper_has_an_invalid_unusedExpectDirectiveIndex,
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
package diagnostics
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/microsoft/TypeScript/tsc/internal/json"
|
||||
"github.com/microsoft/TypeScript/tsc/internal/locale"
|
||||
"golang.org/x/text/language"
|
||||
"gotest.tools/v3/assert"
|
||||
@@ -143,3 +147,67 @@ func TestLocalize_ByKey(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestLocaleFiles(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files, err := filepath.Glob("loc/*.generated.json")
|
||||
assert.NilError(t, err)
|
||||
assert.Assert(t, len(files) > 0)
|
||||
|
||||
for _, path := range files {
|
||||
localeName := strings.TrimSuffix(filepath.Base(path), ".generated.json")
|
||||
t.Run(localeName, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
file, openErr := os.Open(path)
|
||||
assert.NilError(t, openErr)
|
||||
defer file.Close()
|
||||
|
||||
var handback map[Key]string
|
||||
assert.NilError(t, json.UnmarshalRead(file, &handback))
|
||||
validateLocalizedMessages(t, handback)
|
||||
|
||||
activeMessages := make(map[Key]string, len(handback))
|
||||
for key, text := range handback {
|
||||
if keyToMessage(key) != nil {
|
||||
activeMessages[key] = text
|
||||
}
|
||||
}
|
||||
|
||||
actual := getLocalizedMessages(language.MustParse(localeName))
|
||||
assert.DeepEqual(t, actual, activeMessages)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestLocaleFilesIgnoreStaleDiagnostics(t *testing.T) {
|
||||
t.Parallel()
|
||||
validateLocalizedMessages(t, map[Key]string{
|
||||
"Removed_diagnostic_99999": "Stale translation.",
|
||||
})
|
||||
}
|
||||
|
||||
func validateLocalizedMessages(t *testing.T, localizedMessages map[Key]string) {
|
||||
t.Helper()
|
||||
for key, localizedText := range localizedMessages {
|
||||
message := keyToMessage(key)
|
||||
if message == nil {
|
||||
continue
|
||||
}
|
||||
localizedPlaceholders := placeholderSet(localizedText)
|
||||
englishPlaceholders := placeholderSet(message.text)
|
||||
assert.Equal(t, len(localizedPlaceholders), len(englishPlaceholders), "placeholder mismatch for %q", key)
|
||||
for placeholder := range englishPlaceholders {
|
||||
assert.Assert(t, localizedPlaceholders[placeholder], "localized diagnostic %q is missing placeholder %s", key, placeholder)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func placeholderSet(text string) map[string]bool {
|
||||
result := map[string]bool{}
|
||||
for _, placeholder := range placeholderRegexp.FindAllString(text, -1) {
|
||||
result[placeholder] = true
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -1,342 +0,0 @@
|
||||
{
|
||||
"Do not print diagnostics.": {
|
||||
"category": "Message",
|
||||
"code": 100000
|
||||
},
|
||||
"Run in single threaded mode.": {
|
||||
"category": "Message",
|
||||
"code": 100001
|
||||
},
|
||||
"Generate pprof CPU/memory profiles to the given directory.": {
|
||||
"category": "Message",
|
||||
"code": 100002
|
||||
},
|
||||
"Set the number of checkers per project.": {
|
||||
"category": "Message",
|
||||
"code": 100003
|
||||
},
|
||||
"4, unless --singleThreaded is passed.": {
|
||||
"category": "Message",
|
||||
"code": 100004
|
||||
},
|
||||
"{0} references": {
|
||||
"category": "Message",
|
||||
"code": 100005
|
||||
},
|
||||
"1 reference": {
|
||||
"category": "Message",
|
||||
"code": 100006
|
||||
},
|
||||
"{0} implementations": {
|
||||
"category": "Message",
|
||||
"code": 100007
|
||||
},
|
||||
"1 implementation": {
|
||||
"category": "Message",
|
||||
"code": 100008
|
||||
},
|
||||
"Set the number of projects to build concurrently.": {
|
||||
"category": "Message",
|
||||
"code": 100009
|
||||
},
|
||||
"Non-relative paths are not allowed. Did you forget a leading './'?": {
|
||||
"category": "Error",
|
||||
"code": 5090
|
||||
},
|
||||
"A JSDoc '@type' tag on a function must have a signature with the correct number of arguments.": {
|
||||
"category": "Error",
|
||||
"code": 8030
|
||||
},
|
||||
"Failed to delete file '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 6353
|
||||
},
|
||||
"Project '{0}' is out of date because config file does not exist.": {
|
||||
"category": "Message",
|
||||
"code": 6401
|
||||
},
|
||||
"Project '{0}' is out of date because input '{1}' does not exist.": {
|
||||
"category": "Message",
|
||||
"code": 6420
|
||||
},
|
||||
"Project '{0}' is out of date because it has errors.": {
|
||||
"category": "Message",
|
||||
"code": 6423
|
||||
},
|
||||
"Multiple 'module.exports' assignments cannot be serialized for declaration emit.": {
|
||||
"category": "Error",
|
||||
"code": 6424
|
||||
},
|
||||
"Nested CommonJS export constructs cannot be serialized for declaration emit.": {
|
||||
"category": "Error",
|
||||
"code": 6425
|
||||
},
|
||||
"Locale must be an IETF BCP 47 language tag. Examples: '{0}', '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 6048
|
||||
},
|
||||
"An ambient module declaration with import attributes must use a pattern name with an '*' character.": {
|
||||
"category": "Error",
|
||||
"code": 1550
|
||||
},
|
||||
"Import attributes are not allowed on a module augmentation.": {
|
||||
"category": "Error",
|
||||
"code": 1551
|
||||
},
|
||||
"tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.": {
|
||||
"category": "Error",
|
||||
"code": 5112
|
||||
},
|
||||
"Option '--incremental' is only valid with a known configuration file (like 'tsconfig.json') or when '--tsBuildInfoFile' is explicitly provided.": {
|
||||
"category": "Error",
|
||||
"code": 5074
|
||||
},
|
||||
"Option '{0}' requires value to be greater than '{1}'.": {
|
||||
"category": "Error",
|
||||
"code": 5002
|
||||
},
|
||||
"Declaration emit elides private members, but '{0}' refers to a private member. Write an explicit type here.": {
|
||||
"category": "Error",
|
||||
"code": 7080
|
||||
},
|
||||
"Binding elements with initializers can't be exported directly with --isolatedDeclarations.": {
|
||||
"category": "Error",
|
||||
"code": 9019
|
||||
},
|
||||
"Deduplicate packages with the same name and version.": {
|
||||
"category": "Message",
|
||||
"code": 100011
|
||||
},
|
||||
"Loading": {
|
||||
"category": "Message",
|
||||
"code": 100012
|
||||
},
|
||||
"Project '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 100014
|
||||
},
|
||||
"Installing types for '{0}'": {
|
||||
"category": "Message",
|
||||
"code": 100013
|
||||
},
|
||||
"Fix All": {
|
||||
"category": "Message",
|
||||
"code": 100015
|
||||
},
|
||||
"Organize Imports": {
|
||||
"category": "Message",
|
||||
"code": 100016
|
||||
},
|
||||
"Remove Unused Imports": {
|
||||
"category": "Message",
|
||||
"code": 100017
|
||||
},
|
||||
"Sort Imports": {
|
||||
"category": "Message",
|
||||
"code": 100018
|
||||
},
|
||||
"File rename is not supported by the editor": {
|
||||
"category": "Error",
|
||||
"code": 8040
|
||||
},
|
||||
"JSDoc comment": {
|
||||
"category": "Message",
|
||||
"code": 100019
|
||||
},
|
||||
"Regular expression pattern modifiers are only available when targeting '{0}' or later.": {
|
||||
"category": "Error",
|
||||
"code": 18062
|
||||
},
|
||||
"Duplicate named capturing groups are only available when targeting '{0}' or later.": {
|
||||
"category": "Error",
|
||||
"code": 18063
|
||||
},
|
||||
"Content mapper file extension '{0}' must begin with a '.'.": {
|
||||
"category": "Error",
|
||||
"code": 100020
|
||||
},
|
||||
"Content mapper file extension '{0}' is a built-in extension and cannot be registered by a content mapper.": {
|
||||
"category": "Error",
|
||||
"code": 100021
|
||||
},
|
||||
"Content mapper file extension '{0}' is registered by more than one content mapper.": {
|
||||
"category": "Error",
|
||||
"code": 100022
|
||||
},
|
||||
"Allow loading external content mapper plugins that execute code during compilation.": {
|
||||
"category": "Message",
|
||||
"code": 100023
|
||||
},
|
||||
"Content mappers require the '--runExternalCode' command line flag to be enabled.": {
|
||||
"category": "Error",
|
||||
"code": 100024
|
||||
},
|
||||
"The content mapper '{0}' failed to transform this file.": {
|
||||
"category": "Error",
|
||||
"code": 100025
|
||||
},
|
||||
"The content mapper '{0}' failed {1} times and will not be used.": {
|
||||
"category": "Error",
|
||||
"code": 100026
|
||||
},
|
||||
"The content mapper '{0}' did not provide the required position mappings.": {
|
||||
"category": "Error",
|
||||
"code": 100027
|
||||
},
|
||||
"The content mapper '{0}' produced a position mapping that points outside the original content (original offset {1}).": {
|
||||
"category": "Error",
|
||||
"code": 100028
|
||||
},
|
||||
"The content mapper '{0}' produced a verbatim mapping that does not match the original content (virtual offset {1}, original offset {2}).": {
|
||||
"category": "Error",
|
||||
"code": 100029
|
||||
},
|
||||
"This location is in virtual code produced by the content mapper '{0}' and has no corresponding location in the original file.": {
|
||||
"category": "Message",
|
||||
"code": 100030
|
||||
},
|
||||
"The content mapper package '{0}' could not be resolved.": {
|
||||
"category": "Error",
|
||||
"code": 100031
|
||||
},
|
||||
"The 'package.json' of the content mapper package '{0}' could not be parsed.": {
|
||||
"category": "Error",
|
||||
"code": 100032
|
||||
},
|
||||
"The 'package.json' of the content mapper package '{0}' does not specify a 'name'.": {
|
||||
"category": "Error",
|
||||
"code": 100033
|
||||
},
|
||||
"The 'package.json' of the content mapper package '{0}' does not declare a 'typescript.contentMapper' object.": {
|
||||
"category": "Error",
|
||||
"code": 100034
|
||||
},
|
||||
"The 'typescript.contentMapper.exec' of the content mapper package '{0}' must be a non-empty array of strings.": {
|
||||
"category": "Error",
|
||||
"code": 100035
|
||||
},
|
||||
"Virtual code produced by the content mapper '{0}' has problems with no corresponding location in this file.": {
|
||||
"category": "Error",
|
||||
"code": 100036
|
||||
},
|
||||
"The content mapper '{0}' produced overlapping or out-of-order position mappings (near virtual offset {1}).": {
|
||||
"category": "Error",
|
||||
"code": 100037
|
||||
},
|
||||
"The content mapper '{0}' produced invalid mapping features near original offset {1}.": {
|
||||
"category": "Error",
|
||||
"code": 100039
|
||||
},
|
||||
"The content mapper '{0}' produced a position mapping with an invalid kind (near virtual offset {1}).": {
|
||||
"category": "Error",
|
||||
"code": 100040
|
||||
},
|
||||
"The content mapper process could not be started or initialized.": {
|
||||
"category": "Message",
|
||||
"code": 100041
|
||||
},
|
||||
"The content mapper process failed while handling the transform request.": {
|
||||
"category": "Message",
|
||||
"code": 100042
|
||||
},
|
||||
"The content mapper returned an invalid transform response.": {
|
||||
"category": "Message",
|
||||
"code": 100043
|
||||
},
|
||||
"The content mapper selected unsupported position encoding '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 100045
|
||||
},
|
||||
"The content mapper diagnostic source must not be empty.": {
|
||||
"category": "Message",
|
||||
"code": 100046
|
||||
},
|
||||
"The content mapper diagnostic source '{0}' is reserved by TypeScript.": {
|
||||
"category": "Message",
|
||||
"code": 100047
|
||||
},
|
||||
"The content mapper returned a project response that could not be decoded.": {
|
||||
"category": "Message",
|
||||
"code": 100048
|
||||
},
|
||||
"The content mapper process failed while handling the project request.": {
|
||||
"category": "Message",
|
||||
"code": 100049
|
||||
},
|
||||
"The content mapper did not return 'configIdentity', which is required when the content mapper has '\"dynamicConfig\": true' in its package.json.": {
|
||||
"category": "Message",
|
||||
"code": 100050
|
||||
},
|
||||
"The content mapper returned a non-absolute path in 'watchedFiles'.": {
|
||||
"category": "Message",
|
||||
"code": 100051
|
||||
},
|
||||
"The content mapper returned 'configIdentity', which is only allowed when it declares '\"dynamicConfig\": true' in its package.json.": {
|
||||
"category": "Message",
|
||||
"code": 100052
|
||||
},
|
||||
"The content mapper returned 'watchedFiles', which is only allowed when it declares '\"dynamicConfig\": true' in its package.json.": {
|
||||
"category": "Message",
|
||||
"code": 100053
|
||||
},
|
||||
"Content mapper supplemental output file '{0}' conflicts with an existing file.": {
|
||||
"category": "Message",
|
||||
"code": 100054
|
||||
},
|
||||
"Supplemental virtual file produced by the content mapper for file '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 100055
|
||||
},
|
||||
"The content mapper returned an output with unsupported virtual extension '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 100056
|
||||
},
|
||||
"The content mapper '{0}' could not be initialized.": {
|
||||
"category": "Error",
|
||||
"code": 100057
|
||||
},
|
||||
"The content mapper command '{0}' could not be started: {1}": {
|
||||
"category": "Message",
|
||||
"code": 100058
|
||||
},
|
||||
"The content mapper process exited before responding to the 'initialize' request (exit code {0}).": {
|
||||
"category": "Message",
|
||||
"code": 100059
|
||||
},
|
||||
"The content mapper did not respond to the 'initialize' request within {0} seconds.": {
|
||||
"category": "Message",
|
||||
"code": 100060
|
||||
},
|
||||
"The content mapper returned an 'initialize' response that could not be decoded: {0}": {
|
||||
"category": "Message",
|
||||
"code": 100061
|
||||
},
|
||||
"The content mapper's 'initialize' request failed: {0}": {
|
||||
"category": "Message",
|
||||
"code": 100062
|
||||
},
|
||||
"Diagnostic directive {0} returned by the content mapper has an invalid range.": {
|
||||
"category": "Message",
|
||||
"code": 100063
|
||||
},
|
||||
"The content mapper returned a diagnostic directive with invalid policy '{0}'.": {
|
||||
"category": "Message",
|
||||
"code": 100064
|
||||
},
|
||||
"Diagnostic directive {0} returned by the content mapper must specify 'unusedExpectDirectiveIndex' when there is not exactly one 'unusedExpectDirectiveDiagnostics' entry.": {
|
||||
"category": "Message",
|
||||
"code": 100065
|
||||
},
|
||||
"The content mapper returned diagnostic directives with overlapping virtual ranges.": {
|
||||
"category": "Message",
|
||||
"code": 100066
|
||||
},
|
||||
"The invalid diagnostic directive is in supplemental output {0} returned by the content mapper.": {
|
||||
"category": "Message",
|
||||
"code": 100067
|
||||
},
|
||||
"Diagnostic directive {0} returned by the content mapper has an invalid 'unusedExpectDirectiveIndex'.": {
|
||||
"category": "Message",
|
||||
"code": 100068
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ package main
|
||||
import (
|
||||
"bytes"
|
||||
"cmp"
|
||||
"encoding/xml"
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/format"
|
||||
@@ -15,7 +14,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -39,33 +37,13 @@ type diagnosticMessage struct {
|
||||
key string
|
||||
}
|
||||
|
||||
type LCX struct {
|
||||
TgtCul string `xml:"TgtCul,attr"`
|
||||
RootItems []RootItem `xml:"Item"`
|
||||
}
|
||||
|
||||
type RootItem struct {
|
||||
ItemId string `xml:"ItemId,attr"`
|
||||
Items []StringTableItem `xml:"Item"`
|
||||
}
|
||||
|
||||
type StringTableItem struct {
|
||||
ItemId string `xml:"ItemId,attr"`
|
||||
Items []LocalizedItem `xml:"Item"`
|
||||
}
|
||||
|
||||
type LocalizedItem struct {
|
||||
ItemId string `xml:"ItemId,attr"`
|
||||
Str Str `xml:"Str"`
|
||||
}
|
||||
|
||||
type Str struct {
|
||||
Val string `xml:"Val"`
|
||||
Tgt *Tgt `xml:"Tgt"`
|
||||
}
|
||||
|
||||
type Tgt struct {
|
||||
Val string `xml:"Val"`
|
||||
type localizationProject struct {
|
||||
Projects []struct {
|
||||
LocItems []struct {
|
||||
SourceFile string `json:"SourceFile"`
|
||||
Languages string `json:"Languages"`
|
||||
} `json:"LocItems"`
|
||||
} `json:"Projects"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
@@ -74,24 +52,16 @@ func main() {
|
||||
diagnosticsOutput := flag.String("diagnostics", "", "path to the output diagnostics_generated.go file")
|
||||
locOutput := flag.String("loc", "", "path to the output loc_generated.go file")
|
||||
locDir := flag.String("locdir", "", "directory to write locale .json.gz files")
|
||||
locProject := flag.String("locproject", "", "path to the localization project file")
|
||||
locSourceOutput := flag.String("locsource", "", "path to the localization source file")
|
||||
flag.Parse()
|
||||
|
||||
if *diagnosticsOutput == "" || *locOutput == "" || *locDir == "" {
|
||||
if *diagnosticsOutput == "" || *locOutput == "" || *locDir == "" || *locProject == "" || *locSourceOutput == "" {
|
||||
flag.Usage()
|
||||
return
|
||||
}
|
||||
|
||||
rawDiagnosticMessages := readRawMessages("diagnosticMessages.json")
|
||||
|
||||
_, filename, _, ok := runtime.Caller(0)
|
||||
if !ok {
|
||||
panic("could not get current filename")
|
||||
}
|
||||
filename = filepath.FromSlash(filename) // runtime.Caller always returns forward slashes; https://go.dev/issues/3335, https://go.dev/cl/603275
|
||||
|
||||
rawExtraMessages := readRawMessages(filepath.Join(filepath.Dir(filename), "extraDiagnosticMessages.json"))
|
||||
|
||||
maps.Copy(rawDiagnosticMessages, rawExtraMessages)
|
||||
diagnosticMessages := slices.Collect(maps.Values(rawDiagnosticMessages))
|
||||
|
||||
slices.SortFunc(diagnosticMessages, func(a *diagnosticMessage, b *diagnosticMessage) int {
|
||||
@@ -119,8 +89,17 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
locSource, err := generateLocalizationSource(diagnosticMessages)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to generate localization source: %v", err)
|
||||
}
|
||||
if err := os.WriteFile(*locSourceOutput, locSource, 0o666); err != nil {
|
||||
log.Fatalf("failed to write localization source: %v", err)
|
||||
}
|
||||
|
||||
// Generate localizations file
|
||||
locBuf := generateLocalizations(knownKeys, *locDir)
|
||||
localeNames := readLocaleNames(*locProject, *locSourceOutput, *locDir)
|
||||
locBuf := generateLocalizations(knownKeys, *locDir, localeNames)
|
||||
|
||||
formatted, err = format.Source(locBuf.Bytes())
|
||||
if err != nil {
|
||||
@@ -171,7 +150,88 @@ func generateDiagnostics(diagnosticMessages []*diagnosticMessage) *bytes.Buffer
|
||||
return &buf
|
||||
}
|
||||
|
||||
func generateLocalizations(knownKeys map[string]bool, locDir string) *bytes.Buffer {
|
||||
func readLocaleNames(projectPath string, sourcePath string, localeDir string) []string {
|
||||
file, err := os.Open(projectPath)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to open localization project: %v", err)
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
var project localizationProject
|
||||
if err := json.UnmarshalRead(file, &project); err != nil {
|
||||
log.Fatalf("failed to decode localization project: %v", err)
|
||||
}
|
||||
|
||||
projectRoot, err := filepath.Abs(filepath.Join(filepath.Dir(projectPath), ".."))
|
||||
if err != nil {
|
||||
log.Fatalf("failed to resolve localization project root: %v", err)
|
||||
}
|
||||
sourcePath, err = filepath.Abs(sourcePath)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to resolve localization source path: %v", err)
|
||||
}
|
||||
|
||||
var languagesValue string
|
||||
found := false
|
||||
for _, project := range project.Projects {
|
||||
for _, item := range project.LocItems {
|
||||
itemSourceFile := filepath.FromSlash(strings.ReplaceAll(item.SourceFile, "\\", "/"))
|
||||
if filepath.Join(projectRoot, itemSourceFile) != sourcePath {
|
||||
continue
|
||||
}
|
||||
if found {
|
||||
log.Fatalf("duplicate localization item for %q in %s", sourcePath, projectPath)
|
||||
}
|
||||
found = true
|
||||
languagesValue = item.Languages
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
log.Fatalf("localization item for %q not found in %s", sourcePath, projectPath)
|
||||
}
|
||||
|
||||
languages := strings.Split(languagesValue, ";")
|
||||
declared := make(map[string]bool, len(languages))
|
||||
for _, localeName := range languages {
|
||||
tag, err := language.Parse(localeName)
|
||||
if err != nil {
|
||||
log.Fatalf("invalid locale %q in %s: %v", localeName, projectPath, err)
|
||||
}
|
||||
if canonical := tag.String(); canonical != localeName {
|
||||
log.Fatalf("locale %q in %s is not canonical; use %q", localeName, projectPath, canonical)
|
||||
}
|
||||
if declared[localeName] {
|
||||
log.Fatalf("duplicate locale %q in %s", localeName, projectPath)
|
||||
}
|
||||
declared[localeName] = true
|
||||
}
|
||||
|
||||
entries, err := os.ReadDir(localeDir)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to read locale directory: %v", err)
|
||||
}
|
||||
for _, entry := range entries {
|
||||
if entry.IsDir() || filepath.Ext(entry.Name()) != ".json" {
|
||||
continue
|
||||
}
|
||||
if !strings.HasSuffix(entry.Name(), ".generated.json") {
|
||||
log.Fatalf("locale file %q must use the .generated.json suffix", filepath.Join(localeDir, entry.Name()))
|
||||
}
|
||||
localeName := strings.TrimSuffix(entry.Name(), ".generated.json")
|
||||
if !declared[localeName] {
|
||||
log.Fatalf("locale file %q is not declared in %s", filepath.Join(localeDir, entry.Name()), projectPath)
|
||||
}
|
||||
delete(declared, localeName)
|
||||
}
|
||||
if len(declared) != 0 {
|
||||
missing := slices.Sorted(maps.Keys(declared))
|
||||
log.Fatalf("locales declared in %s have no handback files: %s", projectPath, strings.Join(missing, ", "))
|
||||
}
|
||||
|
||||
return languages
|
||||
}
|
||||
|
||||
func generateLocalizations(knownKeys map[string]bool, locDir string, localeNames []string) *bytes.Buffer {
|
||||
var buf bytes.Buffer
|
||||
|
||||
buf.WriteString("// Code generated by generate.go; DO NOT EDIT.\n")
|
||||
@@ -187,37 +247,27 @@ func generateLocalizations(knownKeys map[string]bool, locDir string) *bytes.Buff
|
||||
buf.WriteString("\t\"github.com/microsoft/TypeScript/tsc/internal/json\"\n")
|
||||
buf.WriteString(")\n")
|
||||
|
||||
// Remove and recreate the loc directory for a clean state
|
||||
if err := os.RemoveAll(locDir); err != nil {
|
||||
log.Fatalf("failed to remove locale directory: %v", err)
|
||||
}
|
||||
if err := os.MkdirAll(locDir, 0o755); err != nil {
|
||||
log.Fatalf("failed to create locale directory: %v", err)
|
||||
}
|
||||
|
||||
// Generate locale maps
|
||||
localeFiles, err := filepath.Glob(filepath.Join("..", "locale", "lcl", "*", "diagnosticMessages", "diagnosticMessages.generated.json.lcl"))
|
||||
existingArchives, err := filepath.Glob(filepath.Join(locDir, "*.json.gz"))
|
||||
if err != nil {
|
||||
log.Fatalf("failed to find locale files: %v", err)
|
||||
log.Fatalf("failed to find existing locale archives: %v", err)
|
||||
}
|
||||
if len(localeFiles) == 0 {
|
||||
log.Fatalf("no locale files found in %s", filepath.Join("..", "locale", "lcl"))
|
||||
for _, archive := range existingArchives {
|
||||
if err := os.Remove(archive); err != nil {
|
||||
log.Fatalf("failed to remove existing locale archive %s: %v", archive, err)
|
||||
}
|
||||
}
|
||||
slices.Sort(localeFiles)
|
||||
|
||||
type localeInfo struct {
|
||||
varName string
|
||||
tgtCul string
|
||||
canonical string // canonical lowercase form (e.g., "zh-cn", "pt-br")
|
||||
lang string
|
||||
messages map[string]string
|
||||
filename string
|
||||
varName string
|
||||
tgtCul string
|
||||
filename string
|
||||
}
|
||||
|
||||
var locales []localeInfo
|
||||
|
||||
for _, localeFile := range localeFiles {
|
||||
localizedMessages, tgtCul := readLocalizedMessages(localeFile)
|
||||
for _, tgtCul := range localeNames {
|
||||
localeFile := filepath.Join(locDir, tgtCul+".generated.json")
|
||||
localizedMessages := readLocalizedMessages(localeFile)
|
||||
if len(localizedMessages) == 0 {
|
||||
continue
|
||||
}
|
||||
@@ -237,18 +287,11 @@ func generateLocalizations(knownKeys map[string]bool, locDir string) *bytes.Buff
|
||||
localeVar := strings.ReplaceAll(strings.ReplaceAll(tgtCul, "-", ""), "_", "")
|
||||
|
||||
// Parse the locale using language.Tag to get canonical forms
|
||||
tag, err := language.Parse(tgtCul)
|
||||
if err != nil {
|
||||
if _, err := language.Parse(tgtCul); err != nil {
|
||||
log.Printf("failed to parse locale %q: %v", tgtCul, err)
|
||||
continue
|
||||
}
|
||||
|
||||
base, _ := tag.Base()
|
||||
lang := strings.ToLower(base.String())
|
||||
|
||||
// Get canonical form (lowercase with dash)
|
||||
canonical := strings.ToLower(tgtCul)
|
||||
|
||||
// Filename for the JSON.gz file (use the original tgtCul as standard language tag)
|
||||
filename := fmt.Sprintf("%s.json.gz", tgtCul)
|
||||
|
||||
@@ -283,12 +326,9 @@ func generateLocalizations(knownKeys map[string]bool, locDir string) *bytes.Buff
|
||||
}
|
||||
|
||||
locales = append(locales, localeInfo{
|
||||
varName: localeVar,
|
||||
tgtCul: tgtCul,
|
||||
canonical: canonical,
|
||||
lang: lang,
|
||||
messages: localizedMessages,
|
||||
filename: filename,
|
||||
varName: localeVar,
|
||||
tgtCul: tgtCul,
|
||||
filename: filename,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -336,6 +376,16 @@ func generateLocalizations(knownKeys map[string]bool, locDir string) *bytes.Buff
|
||||
return &buf
|
||||
}
|
||||
|
||||
func generateLocalizationSource(diagnosticMessages []*diagnosticMessage) ([]byte, error) {
|
||||
var messages collections.OrderedMap[string, string]
|
||||
for _, m := range diagnosticMessages {
|
||||
_, key := convertPropertyName(m.key, m.Code)
|
||||
messages.Set(key, m.key)
|
||||
}
|
||||
data, err := json.MarshalIndent(&messages, "", " ")
|
||||
return append(data, '\n'), err
|
||||
}
|
||||
|
||||
func readRawMessages(p string) map[int]*diagnosticMessage {
|
||||
file, err := os.Open(p)
|
||||
if err != nil {
|
||||
@@ -353,49 +403,30 @@ func readRawMessages(p string) map[int]*diagnosticMessage {
|
||||
codeToMessage := make(map[int]*diagnosticMessage, len(rawMessages))
|
||||
for k, m := range rawMessages {
|
||||
m.key = k
|
||||
if existing, ok := codeToMessage[m.Code]; ok {
|
||||
log.Fatalf("diagnostics %q and %q both use code %d", existing.key, k, m.Code)
|
||||
}
|
||||
codeToMessage[m.Code] = m
|
||||
}
|
||||
|
||||
return codeToMessage
|
||||
}
|
||||
|
||||
func readLocalizedMessages(p string) (map[string]string, string) {
|
||||
func readLocalizedMessages(p string) map[string]string {
|
||||
file, err := os.Open(p)
|
||||
if err != nil {
|
||||
log.Printf("failed to open locale file %s: %v", p, err)
|
||||
return nil, ""
|
||||
log.Fatalf("failed to open locale file %s: %v", p, err)
|
||||
return nil
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
var lcx LCX
|
||||
if err := xml.NewDecoder(file).Decode(&lcx); err != nil {
|
||||
log.Printf("failed to decode locale file %s: %v", p, err)
|
||||
return nil, ""
|
||||
var messages map[string]string
|
||||
if err := json.UnmarshalRead(file, &messages); err != nil {
|
||||
log.Fatalf("failed to decode locale file %s: %v", p, err)
|
||||
return nil
|
||||
}
|
||||
|
||||
messages := make(map[string]string)
|
||||
|
||||
// Navigate the nested Item structure
|
||||
for _, rootItem := range lcx.RootItems {
|
||||
for _, stringTable := range rootItem.Items {
|
||||
for _, item := range stringTable.Items {
|
||||
// ItemId has format ";key_code", remove the leading semicolon
|
||||
itemId := strings.TrimPrefix(item.ItemId, ";")
|
||||
|
||||
// Get the localized text from Tgt if available, otherwise use Val
|
||||
var text string
|
||||
if item.Str.Tgt != nil && item.Str.Tgt.Val != "" {
|
||||
text = item.Str.Tgt.Val
|
||||
} else {
|
||||
text = item.Str.Val
|
||||
}
|
||||
|
||||
messages[itemId] = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return messages, lcx.TgtCul
|
||||
return messages
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Localized diagnostics
|
||||
|
||||
Do not edit the generated gzip files in this directory.
|
||||
|
||||
The localization team owns the generated JSON handbacks. The gzip files are
|
||||
generated from them for runtime distribution.
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -131,7 +131,7 @@ func TestContentMapperBuildDetectsNewPhysicalSupplementalFile(t *testing.T) {
|
||||
testSys.writeFileNoError(supplementalFileName, "export {};\n")
|
||||
result = execute.CommandLine(t.Context(), sys, args, testSys)
|
||||
assert.Equal(t, result.Status, tsc.ExitStatusDiagnosticsPresent_OutputsGenerated)
|
||||
assert.Assert(t, strings.Contains(testSys.currentWrite.String(), "TS100025"), testSys.currentWrite.String())
|
||||
assert.Assert(t, strings.Contains(testSys.currentWrite.String(), "TS18069"), testSys.currentWrite.String())
|
||||
assert.Assert(t, strings.Contains(testSys.currentWrite.String(), "conflicts with an existing file"), testSys.currentWrite.String())
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestContentMapperTransformFailureDiagnostics(t *testing.T) {
|
||||
|
||||
f.VerifyNonSuggestionDiagnostics(t, []*lsproto.Diagnostic{
|
||||
{
|
||||
Code: &lsproto.IntegerOrString{Integer: new(int32(100025))},
|
||||
Code: &lsproto.IntegerOrString{Integer: new(int32(18069))},
|
||||
Message: lsproto.StringOrMarkupContent{String: new(
|
||||
"The content mapper 'mapper' failed to transform this file.\n The content mapper process failed while handling the transform request.",
|
||||
)},
|
||||
|
||||
-19571
File diff suppressed because it is too large.
Load diff
-19535
File diff suppressed because it is too large.
Load diff
-19580
File diff suppressed because it is too large.
Load diff
-19529
File diff suppressed because it is too large.
Load diff
-19583
File diff suppressed because it is too large.
Load diff
-19583
File diff suppressed because it is too large.
Load diff
-19535
File diff suppressed because it is too large.
Load diff
-19571
File diff suppressed because it is too large.
Load diff
-19571
File diff suppressed because it is too large.
Load diff
-19558
File diff suppressed because it is too large.
Load diff
-19561
File diff suppressed because it is too large.
Load diff
-19534
File diff suppressed because it is too large.
Load diff
-19564
File diff suppressed because it is too large.
Load diff
Vendored
+1
-1
@@ -5,7 +5,7 @@ export const component = 1;
|
||||
|
||||
=== Diagnostics ===
|
||||
|
||||
/component.vue:1:1 - error TS100025: The content mapper 'mapper' failed to transform this file.
|
||||
/component.vue:1:1 - error TS18069: The content mapper 'mapper' failed to transform this file.
|
||||
The content mapper process failed while handling the transform request.
|
||||
|
||||
1
|
||||
|
||||
Vendored
+5
-5
@@ -25,31 +25,31 @@
|
||||
|
||||
=== Diagnostics ===
|
||||
|
||||
/expectWithoutUnusedDiagnostic.expectmissing:1:1 - error TS100025: The content mapper 'mapper' failed to transform this file.
|
||||
/expectWithoutUnusedDiagnostic.expectmissing:1:1 - error TS18069: The content mapper 'mapper' failed to transform this file.
|
||||
Diagnostic directive 0 returned by the content mapper must specify 'unusedExpectDirectiveIndex' when there is not exactly one 'unusedExpectDirectiveDiagnostics' entry.
|
||||
|
||||
1
|
||||
~
|
||||
|
||||
/invalidPolicy.invalidpolicy:1:1 - error TS100025: The content mapper 'mapper' failed to transform this file.
|
||||
/invalidPolicy.invalidpolicy:1:1 - error TS18069: The content mapper 'mapper' failed to transform this file.
|
||||
The content mapper returned a diagnostic directive with invalid policy '2'.
|
||||
|
||||
1
|
||||
~
|
||||
|
||||
/invalidRange.invalidrange:1:1 - error TS100025: The content mapper 'mapper' failed to transform this file.
|
||||
/invalidRange.invalidrange:1:1 - error TS18069: The content mapper 'mapper' failed to transform this file.
|
||||
Diagnostic directive 0 returned by the content mapper has an invalid range.
|
||||
|
||||
1
|
||||
~
|
||||
|
||||
/invalidUnusedDiagnosticIndex.invalidunusedindex:1:1 - error TS100025: The content mapper 'mapper' failed to transform this file.
|
||||
/invalidUnusedDiagnosticIndex.invalidunusedindex:1:1 - error TS18069: The content mapper 'mapper' failed to transform this file.
|
||||
Diagnostic directive 0 returned by the content mapper has an invalid 'unusedExpectDirectiveIndex'.
|
||||
|
||||
1
|
||||
~
|
||||
|
||||
/overlap.overlap:1:1 - error TS100025: The content mapper 'mapper' failed to transform this file.
|
||||
/overlap.overlap:1:1 - error TS18069: The content mapper 'mapper' failed to transform this file.
|
||||
The content mapper returned diagnostic directives with overlapping virtual ranges.
|
||||
|
||||
1
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ export const value = 1;
|
||||
|
||||
=== Diagnostics ===
|
||||
|
||||
/component.box:1:1 - error TS100025: The content mapper 'mapper' failed to transform this file.
|
||||
/component.box:1:1 - error TS18069: The content mapper 'mapper' failed to transform this file.
|
||||
The content mapper returned an output with unsupported virtual extension '.coffee'.
|
||||
|
||||
1
|
||||
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@ const value = 1;
|
||||
|
||||
=== Diagnostics ===
|
||||
|
||||
/component.astro:1:1 - error TS100025: The content mapper 'mapper' failed to transform this file.
|
||||
/component.astro:1:1 - error TS18069: The content mapper 'mapper' failed to transform this file.
|
||||
Content mapper supplemental output file '/component.astro.0.ts' conflicts with an existing file.
|
||||
|
||||
1
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
// === Syntax and Semantic Diagnostics ===
|
||||
/ProfileCard.vue(1,1): error TS100036: Virtual code produced by the content mapper 'mapper@1.0.0' has problems with no corresponding location in this file.
|
||||
/ProfileCard.vue(1,1): error TS18080: Virtual code produced by the content mapper 'mapper@1.0.0' has problems with no corresponding location in this file.
|
||||
|
||||
|
||||
==== /ProfileCard.vue (1 errors) ====
|
||||
<template><h1>Profile</h1></template>
|
||||
|
||||
!!! error TS100036: Virtual code produced by the content mapper 'mapper@1.0.0' has problems with no corresponding location in this file.
|
||||
!!! related TS100036 /ProfileCard.vue:1:1: Cannot find name 'jsxRuntime'.
|
||||
!!! related TS100036 /ProfileCard.vue:1:1: Cannot find name 'Widget'.
|
||||
!!! error TS18080: Virtual code produced by the content mapper 'mapper@1.0.0' has problems with no corresponding location in this file.
|
||||
!!! related TS18080 /ProfileCard.vue:1:1: Cannot find name 'jsxRuntime'.
|
||||
!!! related TS18080 /ProfileCard.vue:1:1: Cannot find name 'Widget'.
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ import "./f.vue";
|
||||
tsgo --runExternalCode --singleThreaded
|
||||
ExitStatus:: DiagnosticsPresent_OutputsGenerated
|
||||
Output::
|
||||
[91merror[0m[90m TS100057: [0mThe content mapper 'missing' could not be initialized.
|
||||
[91merror[0m[90m TS18099: [0mThe content mapper 'missing' could not be initialized.
|
||||
The content mapper command 'missing-mapper' could not be started: contentmappertest: unknown mapper command [missing-mapper]
|
||||
|
||||
Found 1 error.
|
||||
|
||||
+6
-6
@@ -39,32 +39,32 @@ import "./g.vue";
|
||||
tsgo --runExternalCode --singleThreaded
|
||||
ExitStatus:: DiagnosticsPresent_OutputsGenerated
|
||||
Output::
|
||||
[91merror[0m[90m TS100026: [0mThe content mapper 'fail' failed 5 times and will not be used.
|
||||
[96mc.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS100025: [0mThe content mapper 'fail' failed to transform this file.
|
||||
[91merror[0m[90m TS18070: [0mThe content mapper 'fail' failed 5 times and will not be used.
|
||||
[96mc.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS18069: [0mThe content mapper 'fail' failed to transform this file.
|
||||
The content mapper process failed while handling the transform request.
|
||||
|
||||
[7m1[0m
|
||||
[7m [0m [91m~[0m
|
||||
|
||||
[96md.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS100025: [0mThe content mapper 'fail' failed to transform this file.
|
||||
[96md.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS18069: [0mThe content mapper 'fail' failed to transform this file.
|
||||
The content mapper process failed while handling the transform request.
|
||||
|
||||
[7m1[0m
|
||||
[7m [0m [91m~[0m
|
||||
|
||||
[96me.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS100025: [0mThe content mapper 'fail' failed to transform this file.
|
||||
[96me.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS18069: [0mThe content mapper 'fail' failed to transform this file.
|
||||
The content mapper process failed while handling the transform request.
|
||||
|
||||
[7m1[0m
|
||||
[7m [0m [91m~[0m
|
||||
|
||||
[96mf.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS100025: [0mThe content mapper 'fail' failed to transform this file.
|
||||
[96mf.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS18069: [0mThe content mapper 'fail' failed to transform this file.
|
||||
The content mapper process failed while handling the transform request.
|
||||
|
||||
[7m1[0m
|
||||
[7m [0m [91m~[0m
|
||||
|
||||
[96mg.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS100025: [0mThe content mapper 'fail' failed to transform this file.
|
||||
[96mg.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS18069: [0mThe content mapper 'fail' failed to transform this file.
|
||||
The content mapper process failed while handling the transform request.
|
||||
|
||||
[7m1[0m
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import "./app.vue";
|
||||
tsgo --runExternalCode
|
||||
ExitStatus:: DiagnosticsPresent_OutputsGenerated
|
||||
Output::
|
||||
[96mapp.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS100025: [0mThe content mapper 'fail' failed to transform this file.
|
||||
[96mapp.vue[0m:[93m1[0m:[93m1[0m - [91merror[0m[90m TS18069: [0mThe content mapper 'fail' failed to transform this file.
|
||||
The content mapper process failed while handling the transform request.
|
||||
|
||||
[7m1[0m
|
||||
|
||||
Reference in new issue
Block a user