mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-29 05:34:21 +08:00
https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/ Some changes to the ArrayBuffer types was needed. And TypeScript started "panicking" if we included a bundle multiple times, so updated the BUILD.gn files. Bug: none Change-Id: I3277c191c83ea773ef88765ff89a4f4103b5757c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6210862 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
17 lines
317 B
JavaScript
17 lines
317 B
JavaScript
const SemVer = require('../classes/semver')
|
|
const parse = (version, options, throwErrors = false) => {
|
|
if (version instanceof SemVer) {
|
|
return version
|
|
}
|
|
try {
|
|
return new SemVer(version, options)
|
|
} catch (er) {
|
|
if (!throwErrors) {
|
|
return null
|
|
}
|
|
throw er
|
|
}
|
|
}
|
|
|
|
module.exports = parse
|