mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
No changes in the changelog (https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) to concern ourselves about, but one useful change is they upgraded the log4js dependency which was spitting out console messages on each test run. This is fixed with this version of Karma. Bug: none Change-Id: Ic49618cbda7a079cacb9813f5129692a83508a92 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3745621 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Philip Pfaffe <pfaffe@chromium.org> Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
32 lines
611 B
JavaScript
32 lines
611 B
JavaScript
'use strict'
|
|
|
|
const path = require('path')
|
|
const { URL } = require('url')
|
|
|
|
/**
|
|
* Url object used for tracking files in `file-list.js`.
|
|
*/
|
|
class Url {
|
|
constructor (path, type, integrity) {
|
|
this.path = path
|
|
this.originalPath = path
|
|
this.type = type
|
|
this.integrity = integrity
|
|
this.isUrl = true
|
|
}
|
|
|
|
/**
|
|
* Detect type from the file extension in the path part of the URL.
|
|
* @returns {string} detected file type or empty string
|
|
*/
|
|
detectType () {
|
|
return path.extname(new URL(this.path).pathname).slice(1)
|
|
}
|
|
|
|
toString () {
|
|
return this.path
|
|
}
|
|
}
|
|
|
|
module.exports = Url
|