Fixes https://github.com/denoland/deno/issues/25333.
We fall back to junctions if the error kind is `PermissionDenied` but
the std library actually sets the kind to `Uncategorized` if the symlink
fails due to insufficient privileges. This was causing the fallback to
not actually fall back in this case.
Before:
```
$ deno upgrade v1.xx
error: Invalid version passed
```
After:
```
$ deno upgrade v1.xx
error: Invalid version passed (v1.xx)
Example usage:
deno upgrade | deno upgrade 1.46 | deno upgrade canary
```
Also updates help text to use "shorthand version" without flags, but a
positional arg.
In addition to printing a blog post information (if it's available),
this will also print a link to migration guide and the bug tracker.
---------
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Fixes an incredibly obscure bug that causes parcel's file watcher to not
get any file update notifications on macOS.
The issue was that the native addon was calling `napi_resolve_deferred`,
but when we resolved the promise, v8 was running microtasks
automatically. That executed JS, which called back into the native addon
and broke the addon's assumption that the call wouldn't be reentrant.
To ensure consistency across the codebase, this commit refactors the
code in the `ext` folder to use `throw new Error`` instead of `throw`
for throwing errors.
Fixes https://github.com/denoland/deno/issues/25270
Turns out we only virtualized it so one could have a `Console` property,
and the other one not. We can just make this `console.Console` available
everywhere.
Part of #20613.
If a node addon is using the legacy `napi_module_register` on ctor
approach to module registration, we have to store the registered module
so that other threads can load the addon (because `napi_module_register`
will only be called once per process).
Unlike in dprint, `single_quote` option is shared between all
formatters, so we shouldn't change this option when formatting
attributes in components. This PR fixes this.
This problem doesn't affect formatting HTML.
Fixes#23281. Part of #20613.
We were emitting the `online` event in the constructor, so the caller
could never receive it (since there was no time for them to add a
listener). Instead, emit the event where it's intended – after the
worker is initialized.
---
After this parcel no longer freezes, but still will fail due to other
bugs (which will be fixed in other PRs)
Closes#25210 .
Removed --unstable-http from being displayed on deno run --help=unstable
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Fix task names containing a colon not being found with `deno run`. We
were only checking for a `module not found` error message, but strings
containing a colon throw a different error.
Fixes https://github.com/denoland/deno/issues/25232
- Add missing exports to `node:cluster`
- Fix default export not being an instance of `EventEmitter`
- Fix aliasing of properties
- Fix `disconnected` -> `disconnect` export naming
This makes `log4js` work in Deno. `karma` starts too, but somehow the
server isn't responding. That looks like a different issue.
Fixes https://github.com/denoland/deno/issues/24858
This commit gets deno_node's customizer to use fixed-length array
instead of `Vec` to avoid wrong capacity allocation.
In the previous code we reserve a capacity of 14 for
`external_references`. However, after pushing all the necessary
`ExternalReference`s, it ends up with a length of 21, not 14. This means
another allocation happens even though we reserve some space.
To make sure that there will no longer be extra allocation, it should be
a good idea to use fixed-length array here.
This commit enables the `log` feature for the `tracing` crate.
This allows us to examine additional detailed logs emitted by third party crates
that use `tracing` crate for logging by setting `RUST_LOG` env var or passing
`-L` option in command line.
Closes#25045