The rules are now as follows:
* In `import` statements, as mandated by the WHATWG specification,
the import specifier is always treated as a URL.
If it is a relative URL, it must start with either / or ./ or ../
* A script name passed to deno as a command line argument may be either
an absolute URL or a local path.
- If the name starts with a valid URI scheme followed by a colon, e.g.
'http:', 'https:', 'file:', 'foo+bar:', it always interpreted as a
URL (even if Deno doesn't support the indicated protocol).
- Otherwise, the script name is interpreted as a local path. The local
path may be relative, and operating system semantics determine how
it is resolved. Prefixing a relative path with ./ is not required.
A lot of its functionality is unused still, but the goal it to slowly
migrate logging functionality to it. There is also a useful progress bar
which can be ported over later - it depends on this module.
4c1fa54d10/src/cargo/util/progress.rs
1. Separate Snapshot and Script StartupData functions based on cfg "no-snapshot-init"
2. Replace deprecated Once::ONCE_INIT with Once::new (https://github.com/rust-lang/rust/pull/61757)
3. Elide lifetime
4. Fix typos
This uses `prefers-color-scheme: dark` to automatically switch
to dark mode if the user specifies it in their system settings.
Dark mode is supported in Firefox 67, Chrome 76, Safari 12.1,
and iOS 13 as of this commit, but the current status can be
checked here: https://caniuse.com/#feat=prefers-color-scheme
Additionally, this uses CSS Variables to implement the color-switching
mechanism. This isn’t supported in IE, but the site degrades
reasonably well with them disabled.
Support table: https://caniuse.com/#feat=css-variables