File SystemUtilitiesDetect when code is executed with BunCheck process.versions.bun to detect whether code is running in Bun. This works in both JavaScript and TypeScript without extra type definitions.Copy MarkdownOpenUpgrade Bun to the latest versionBun upgrades itself with the built-in bun upgrade command.Get the current Bun versionBun.version contains the current version of Bun in semver format.