-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New awesome-ajv-errors handling for browser and node for style handling. Updated jest snapshots for jest 29 defaults.
- Loading branch information
Showing
9 changed files
with
1,897 additions
and
1,925 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import { prettify } from "awesome-ajv-errors/dist/index-browser.js" | ||
import { styledPrettify } from "awesome-ajv-errors/dist/index-try-styled.js" | ||
import { prettify } from "awesome-ajv-errors/plain" | ||
import { styledPrettify } from "awesome-ajv-errors/try-styled" | ||
|
||
import { setPrettify } from "./ajv-errors.js" | ||
import { getSuretypeOptions, setSuretypeOptions } from "./options.js" | ||
|
||
setPrettify( prettify ); | ||
styledPrettify | ||
.then( prettify => | ||
{ | ||
setPrettify( prettify ); | ||
|
||
styledPrettify.then( prettify => | ||
{ | ||
// Coerce stylings to true (unless already configured by the user) | ||
const opts = getSuretypeOptions( ); | ||
opts.colors = opts.colors ?? true; | ||
opts.location = opts.location ?? true; | ||
opts.bigNumbers = opts.bigNumbers ?? true; | ||
setSuretypeOptions( opts ); | ||
} ); | ||
setPrettify( prettify ); | ||
} | ||
); |
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
Oops, something went wrong.