-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ssr): use real error messages for errors @W-17408217 (#5249)
* chore(ssr): use real error messages for errors No more TODO! * chore: update test fixture with new error * chore: fix expected error message
- Loading branch information
Showing
6 changed files
with
58 additions
and
33 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/@lwc/engine-server/src/__tests__/fixtures/prohibited-variable-name/error-ssr.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
LWCTODO: identifier name '__lwcThrowAnError__' cannot start with '__lwc' | ||
LWC1202: Identifier name cannot start with "__lwc". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) 2025, Salesforce, Inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: MIT | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
import { DiagnosticLevel } from '../../shared/types'; | ||
|
||
/* | ||
* For the next available error code, reference (and update!) the value in ./index.ts | ||
*/ | ||
|
||
export const SsrCompilerErrors = { | ||
RESERVED_IDENTIFIER_PREFIX: { | ||
code: 1202, | ||
message: 'Identifier name cannot start with "__lwc".', | ||
level: DiagnosticLevel.Error, | ||
url: '', | ||
}, | ||
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters