summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-01chore(tools): update deprecated commands in format and lint tool (#16864)Geert-Jan Zwiers
Updates tools/format.js and tools/lint.js from Deno.spawn to Deno.Command API.
2022-12-01perf(ext/websocket): skip Events constructor checks (#16365)Divy Srivastava
WebSocket internal events can bypass Event's webidl checks and `ReflectDefineProperty` on the object value. Note, this intentionally makes websocket events `isTrusted` configurable (not spec-compliant) which hurts performance a lot. Before: ``` Msg/sec: 167627.750000 Msg/sec: 168239.250000 Msg/sec: 169690.000000 ``` After: ``` Msg/sec: 191065.500000 Msg/sec: 194745.250000 Msg/sec: 194746.000000 ```
2022-12-01chore: forward v1.28.3 release commit to main (#16884)denobot
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-11-30fix(npm): improve package.json exports support for types (#16880)David Sherret
2022-11-30fix(repl): respect --quiet flag (#16875)Bartek Iwańczuk
This commit changes REPL behavior to respect --quiet flag. Once this flag is present REPL will not print a banner at the start.
2022-11-30chore: upgrade rusty_v8 to 0.58.0 (#16879)Bartek Iwańczuk
2022-11-30chore: remove unnecessary lifetimes (#16878)David Sherret
It seems we don't really need to allow these clippy rules.
2022-11-30fix(ext/web): fix typings for readable stream readers (#16191)ud2
* Introduces `ReadableStreamDefaultReadResult` and modifies `ReadableStreamDefaultReader.read` to return this type (closes #15269). * Adds the missing `ReadableStreamBYOBReader` constructor. * Removes the nonexistent `ReadableStreamReader` class.
2022-11-30chore: upgrade rusty_v8 to 0.57.0 (#16871)Bartek Iwańczuk
2022-11-30fix(fmt/markdown): fix emoji width calculation in tables (#16870)David Sherret
https://github.com/dprint/dprint-plugin-markdown/pull/67
2022-11-30fix(lsp): analyze fs dependencies of dependencies to find npm package ↵David Sherret
requirements (#16866) Closes #16867
2022-11-29fix(coverage): Error if the emit cache is invalid (#16850)sigmaSd
2022-11-29fix(ext/node): allow absolute path in createRequire (#16853)Yoshiya Hinosawa
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-28fix(npm): don't resolve JS files when resolving types (#16854)David Sherret
Closes #16851
2022-11-28refactor: create util folder, move nap_sym to napi/sym, move http_cache to ↵David Sherret
cache folder (#16857)
2022-11-28feat(core): show unresolved promise origin (#16650)Bartek Iwańczuk
This commit updates unhelpful messages that are raised when event loop stalls on unresolved top-level promises. Instead of "Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises." and "Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promises." we are now printing a message like: error: Top-level await promise never resolved [SOURCE LINE] ^ at [FUNCTION NAME] ([FILENAME]) eg: error: Top-level await promise never resolved await new Promise((_resolve, _reject) => {}); ^ at <anonymous> (file:///Users/ib/dev/deno/cli/tests/testdata/test/unresolved_promise.ts:1:1) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2022-11-28fix(npm): allow to inspect npm modules with --inspect-brk (#16841)Bartek Iwańczuk
2022-11-28fix(runtime): feature-flag snapshot from snapshot (#16843)Leo Kettmeir
2022-11-28feat(unstable): rework Deno.Command (#16812)Leo Kettmeir
Refactors the `Deno.Command` class to not handle any state, but only being an intermediary to calling its methods, and as such any methods and properties besides `output`, `outputSync` & `spawn` have been removed. Interracting with a `spawn`ed subprocess now works by using the methods and properties on the returned class of the `spawn` method.
2022-11-27fix(npm): ensure npm package downloaded once per run when using `--reload` ↵David Sherret
(#16842)
2022-11-27fix(ext/ffi): Null buffer pointer value is inconsistent (#16625)Aapo Alasuutari
Currently, slow call path will always create a dangling pointer to replace a null pointer when called with eg. a `new Uint8Array()` parameter, which V8 initialises as a null pointer backed buffer. However, the fast call path will never change the pointer value and will thus expose a null pointer. Thus, it's possible that the pointer value that a native call sees coming from Deno changes between two sequential invocations of the same function with the exact same parameters. Since null pointers can be quite important, and `Uint8Array` is the chosen fast path for Deno FFI `"buffer"` parameters, I think it is fairly important that the null pointer be properly exposed to the native code. Thus this PR. ### `*mut c_void` While here, I also changed the type of our pointer values to `*mut c_void`. This is mainly due to JS buffers always being `*mut`, and because we offer a way to turn a pointer into a JS `ArrayBuffer` (`op_ffi_get_buf`) which is read-write. I'm not exactly sure which way we should really go here, we have pointers that are definitely mut but we also cannot assume all of our pointers are. So, do we go with the maxima or the minima? ### `optimisedCall(new Uint8Array())` V8 seems to have a bug where calling an optimised function with a newly created empty `Uint8Array` (no argument or 0) will not see the data pointer being null but instead it's some stable pointer, perhaps pointing to some internal null-backing-store. The pointer value is also an odd (not even) number, so it might specifically be a tagged pointer. This will probably be an issue for some users, if they try to use eg. `method(cstr("something"), new Uint8Array())` as a way to do a fast call to `method` with a null pointer as the second parameter. If instead of a `new Uint8Array()` the user instead uses some `const NULL = new Uint8Array()` where the `NULL` buffer has been passed to a slow call previously, then the fast call will properly see a null pointer. I'll take this up with some V8 engineers to see if this couldn't be fixed.
2022-11-27feat(ops): fast calls for Wasm (#16776)Divy Srivastava
This PR introduces Wasm ops. These calls are optimized for entry from Wasm land. The `#[op(wasm)]` attribute is opt-in. Last parameter `Option<&mut [u8]>` is the memory slice of the Wasm module *when entered from a Fast API call*. Otherwise, the user is expected to implement logic to obtain the memory if `None` ```rust #[op(wasm)] pub fn op_args_get( offset: i32, buffer_offset: i32, memory: Option<&mut [u8]>, ) { // ... } ```
2022-11-27perf(ops): Reenable fast unit result optimization (#16827)Divy Srivastava
The optimization was missed in the optimizer rewrite https://github.com/denoland/deno/pull/16514
2022-11-27Revert "fix(ext/flash): graceful server startup/shutdown with unsettl… ↵Bartek Iwańczuk
(#16839) …ed promises in mind (#16616)" This reverts commit fd023cf7937e67dfde5482d34ebc60839eb7397c. There are reports saying that Vite is often hanging in 1.28.2 and this is the only PR that changed something with HTTP server. I think we should hold off on trying to fix this and instead focus on #16787 CC @magurotuna
2022-11-27chore(ops): increase codegen tests coverage (#16834)Divy Srivastava
Upgrade fast_call tests to full (both tier) codegen tests.
2022-11-27feat(core): support initializing extensions with and without JS (#16789)Bartek Iwańczuk
This commit allows to execute more JS code from extensions when creating a snapshot from an existing snapshot. "deno_core::RuntimeOptions::extensions_with_js" field was added that is used to pass a list of extensions whose both "ops" and associated JS source should be executed upon start. Co-authored-by: crowlkats <crowlkats@toaxl.com>
2022-11-27feat(core): send "executionContextDestroyed" notification on program end ↵Bartek Iwańczuk
(#16831) This commit changes "JsRuntime" to send "executionContextDestroyed" notification when the program finishes and shows a prompt informing that runtime is waiting for inspector to disconnect.
2022-11-26chore: update deno_doc (#16838)Leo Kettmeir
2022-11-26fix(inspector): send "isDefault" in aux data (#16836)Bartek Iwańczuk
With trial and error I found that most debuggers expect "isDefault" to be sent in "auxData" field of "executionContextCreated" notification. This stems from the fact that Node.js sends this data and eg. VSCode requires it to close connection to the debugger when the program finishes execution.
2022-11-26chore: update rusty_v8 to 0.56.1 (#16835)Bartek Iwańczuk
2022-11-26chore: update rusty_v8 to 0.56.0 (#16814)Bartek Iwańczuk
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-11-26feat(ops): support raw pointer arguments (#16826)Divy Srivastava
See https://github.com/denoland/deno/pull/16814#discussion_r1032744083. Allows nullable buffers in low-level ops like FFI: ```rust fn op_ffi_ptr_of<FP>( state: &mut OpState, buf: *const u8, out: &mut [u32], ) where FP: FfiPermissions + 'static { // .. } ```
2022-11-26tests: move integration tests to separate modules (#16816)Bartek Iwańczuk
2022-11-26refactor: `DenoDir` - move to cache folder and make `root_dir` private (#16823)David Sherret
2022-11-25refactor: move generated_symbol_exports_list_* files to napi folder (#16822)David Sherret
2022-11-25refactor: move cdp.rs to tools/repl (#16821)David Sherret
2022-11-25refactor: move dts files, diagnostics.rs, and tsc.rs to tsc folder (#16820)David Sherret
2022-11-25refactor: move lockfile.rs to args module (#16818)David Sherret
This should be in the `args` folder as it's similar to `config_file`.
2022-11-25fix(npm): better error message when attempting to use typescript in npm ↵David Sherret
packages (#16813)
2022-11-25fix(ops): circular dependency in deno_ops test (#16809)Divy Srivastava
2022-11-25refactor(lsp): consolidate relative_specifier (#16780)David Sherret
Closes #14840
2022-11-25fix(cli/js): improve resource sanitizer messages (#16798)Luca Casonato
This commit improves the guidance for how to close a child process stdout / stderr to also include guidance for when using `new Deno.Command()`.
2022-11-25fix(repl): more reliable history handling (#16797)Bartek Iwańczuk
This commit changes history handling of the REPL. There were some situations were history wasn't properly saved and flushed to a file, making history very spotty. This commit changes it to save every line into the history file and flush it to disk before being evaluated. Thanks to this all lines, including "close()" will be stored in the history file. If for any reason we're not able to save history file, a single warning will be printed to the REPL and it will continue to work, even if subsequent tries will fail to save to disk.
2022-11-24fix(task): output encoding issues on windows (#16794)David Sherret
Closes #16792
2022-11-24chore: forward v1.28.2 release commit to main (#16796)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-24fix(npm/types): resolve main entrypoint declaration file when no types entry ↵David Sherret
(#16791) Closes #16782
2022-11-24fix(ext/flash): graceful server startup/shutdown with unsettled promises in ↵Yusuke Tanaka
mind (#16616) This PR resets the revert commit made by #16610, bringing back #16383 which attempts to fix the issue happening when we use the flash server with `--watch` option enabled. Also, some code changes are made to pass the regression test added in #16610.
2022-11-24fix(npm/check): prioritize exports over types entry (#16788)David Sherret
2022-11-24refactor(core): fix typo in ops_builtin.rs (#16613)Ikko Ashimine
2022-11-24feat(cli): add warning for incorrectly ordered flags (#16734)Asher Gomez
This code checks if permission flags are incorrectly defined after the module name (e.g. `deno run mod.ts --allow-read` instead of the correct `deno run --allow-read mod.ts`). If so, a simple warning is displayed.