1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

9190 commits

Author SHA1 Message Date
Divy Srivastava
3a46a89e34
chore: add test for ws ping/pong (#18204)
This commit adds test for https://github.com/denoland/deno/issues/17761
which was fixed by https://github.com/denoland/deno/pull/17762. Verified
that test fails on Deno 1.30.1
2023-03-15 22:09:09 +05:30
David Sherret
5c505316b3
chore(tests): fix flaky test_no_lock (#18206)
The test output capturing is known to be flaky.

Closes #18199
2023-03-16 00:03:36 +09:00
David Sherret
7070b8ed50
fix(lsp): avoid calling client while holding lock (#18197) 2023-03-15 14:34:23 +00:00
Bartek Iwańczuk
2ca1607027
chore(core): don't print cargo directives if not creating snapshot (#18205) 2023-03-15 19:28:44 +05:30
Filip Skokan
72ced37821
fix(wpt): set META_TITLE on global for the testharness (#18193)
Fixes hopefully the last mismatch of reported test titles.

-
[redirect-schemes.any.html](https://wpt.fyi/results/fetch/api/redirect/redirect-schemes.any.html?run_id=5139017526411264&run_id=5093839906275328)
-
[redirect-schemes.any.worker.html](https://wpt.fyi/results/fetch/api/redirect/redirect-schemes.any.worker.html?run_id=5139017526411264&run_id=5093839906275328)
-
ebf6814ebd/resources/testharness.js (L4754-L4756)
2023-03-15 14:03:07 +01:00
Divy Srivastava
51649272bd
perf: do not depend on iana-time-zone (#18088)
Chrono's `clock` feature pulls in `iana-time-zone` which links to macOS
core_foundation. This PR itself is not enough to get rid of
CoreFoundation. Removal depends on getting rid of security framework,
see #18071
2023-03-15 07:14:22 +00:00
David Sherret
6f9c0a9b7a
chore(ci): escape quotes in "Lint PR title" step (#18200) 2023-03-14 23:55:04 -04:00
Bartek Iwańczuk
96ea5b1d3d
refactor: deno_core not using std::env::current_dir (#18173)
This commit changes "deno_core" to not rely on implicitly calling
"std::env::current_dir()" when resolving module specifiers using
APIs from "deno_core::modules_specifier".

Supersedes https://github.com/denoland/deno/pull/15454
2023-03-14 16:47:09 -04:00
Lino Le Van
eb990efcce
feat(ext/url): URLSearchParams.size (#17884) 2023-03-14 20:28:33 +00:00
Bartek Iwańczuk
1930c09b04
refactor(core): remove "resolve_url_or_path_deprecated" (#18174)
Remove remaining usages of "resolve_url_or_path_deprecated" in favor
of "resolve_url_or_path" with explicit calls to
"std::env::current_dir()".

Towards landing https://github.com/denoland/deno/pull/15454
2023-03-14 17:18:01 +00:00
Divy Srivastava
485e12062c
ci: update to Ubuntu-22.04-XL runners (#18181)
Updates CI to use ubuntu-22.04-xl runners. A change to sysroot setup
was necessary that links `libdl.so.2` and `libdl.a` that are no longer
present on ubuntu-22.04.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-14 22:12:33 +05:30
Yiyu Lin
96b1ede254
refactor(lockfile): move anyhow to thiserror (#18178) 2023-03-14 10:55:52 -04:00
Kenta Moriuchi
8d412f6412
fix(ext/web): Stop using globalThis.ReadableStream in Blob (#18187) 2023-03-14 15:06:12 +01:00
Nicholas Berlette
9089c12912
fix(core/internal): fix typo in primordial type definitions (#18125)
This PR resolves a very small typo in the primordial typedefs file
`./core/internal.d.ts`. The correct reference now reads `typeof
FinalizationRegistry.prototype.register`. Before this PR the type alias
pointed to `registar`, which obviously doesn't exist.
2023-03-14 15:05:59 +01:00
Bartek Iwańczuk
6f308b3af0
test: fix flaky resolve_import_map_flags_take_precedence test (#18182)
Trying to fix https://github.com/denoland/deno/issues/18180
2023-03-14 13:37:15 +02:00
Nayeem Rahman
c47075ba4d
test: parallelize applicable node compat tests (#18161) 2023-03-14 16:56:06 +09:00
Yoshiya Hinosawa
e80cc17dc4
fix(ext/node): add crypto.createCipheriv (#18091) 2023-03-14 15:59:23 +09:00
Bartek Iwańczuk
9aa20b3ba7
refactor: --watch commands use deno_core::resolve_url_or_path (#18172)
This commit changes various CLI subcommands that have support for
the "--watch" flag to use initial current working directory when
resolving "main module". 

This is part of migration towards explicitly passing current working
directory to "deno_core::resolve_url_or_path" API.

As a side effect this makes "deno <subcommand> --watch" more aligned to
user expectations, where calling "Deno.chdir()" during program doesn't
break watcher.

Towards landing https://github.com/denoland/deno/pull/15454
2023-03-14 02:44:16 +00:00
Bartek Iwańczuk
48ede89f1f
refactor(core): resolve_url_or_path and resolve_url_or_path_deprecated (#18170)
This commit changes current "deno_core::resolve_url_or_path" API to
"resolve_url_or_path_deprecated" and adds new "resolve_url_or_path"
API that requires to explicitly pass the directory from which paths
should be resolved to. 

Some of the call sites were updated to use the new API, the reminder
of them will be updated in a follow up PR.

Towards landing https://github.com/denoland/deno/pull/15454
2023-03-14 01:12:09 +00:00
Bartek Iwańczuk
c4771356f2
refactor: Remove call sites of "deno_core::resolve_url_or_path" (#18169)
These call sites didn't need to use "resolve_url_or_path".

Towards landing https://github.com/denoland/deno/pull/15454
2023-03-13 19:31:03 -04:00
David Sherret
a35c8e6588
fix(info/doc): add missing --no-lock and --lock flags (#18166)
Closes #18159
2023-03-13 17:04:00 -04:00
ud2
3db03abf88
fix(ext/fs): retry if file already exists in makeTempFile (#17787)
Closes #17781.
2023-03-13 20:54:34 +01:00
David Sherret
b9d2ac32d5
chore(ci): verify the PR title as part of linting (#18163)
This verifies the PR title as part of the lint step.
2023-03-13 18:59:13 +00:00
David Sherret
44b0d4cb11
fix(npm): show a progress bar when initializing the node_modules folder (#18136)
Creating the node_modules folder when the packages are already
downloaded can take a bit of time and not knowing what is going on can
be confusing. It's better to show a progress bar.
2023-03-13 18:18:29 +00:00
Bartek Iwańczuk
e8f22c0765
refactor(core): pass cwd explicitly to resolve_path (#18092)
Towards landing #15454
2023-03-13 18:50:23 +01:00
Ryan Dahl
4c2aeb2502
Update code-of-conduct email (#18162) 2023-03-13 17:14:06 +00:00
Yoshiya Hinosawa
cd8a8993f1
chore(ext/node): copy internal/crypto/types.ts from std (#18156) 2023-03-14 00:18:07 +09:00
Kamil Ogórek
58d8b2e98d
docs(ext): Update docs for URLPattern to make all examples work (#17870) 2023-03-13 15:26:58 +01:00
David Sherret
11f225ef7d
fix: ensure no node_modules directory is created when a package.json exists and no npm dependencies are used (#18134)
Closes #18133
Closes #18038
2023-03-13 14:03:19 +00:00
Geert-Jan Zwiers
983447e860
chore(cli/tests): use test builder in more integration tests (#18031) 2023-03-13 09:40:46 -04:00
Ryan Dahl
224cff7a2f
Revert "feat(core): prevent isolate drop for CLI main worker (#18059)" (#18157)
Fixes https://github.com/denoland/deno/issues/18120
https://github.com/denoland/deno/issues/18137
https://github.com/denoland/fresh/issues/1073

This reverts commit 0cce9c2bcc.
2023-03-13 12:58:17 +00:00
sean watters
e712fbfe4a
fix(core): Upgrades bytes crate from =1.2.1 to ^1.4.0 (#18123)
Motivation: currently can't embed `deno_core` in any project that
depends on later version of `bytes` crate.
2023-03-13 13:26:46 +01:00
Filip Skokan
92c388761a
wpt: only tag daily runs as master (#18155)
This PR updates the WPT upload script so that it only labels runs that
come from the daily WPT job as "master".

This is so that only the daily synchronized runs get selected when
viewing dashboards such as
[this](https://wpt.fyi/results/?label=master&label=experimental&product=deno&product=node.js&product=chrome&product=edge&product=firefox&product=safari&aligned&view=subtest&q=deno%3A%21missing).
2023-03-13 13:24:16 +01:00
Luca Bruno
3f26ee8604
feat(ext/fetch): support fallible request-builder hooks (#18116)
This tweaks the signature of `request_builder_hook` in order to support
fallible hooks.

The rationale for this is mostly on two sides:
* it allows a hook to inspect and possibly drop an outgoing request
(e.g. for policying purposes), bubbling up a detailed error message to
the user.
* it wires into newer `reqwest` API which allows to split and then
reassemble a `RequestBuilder`, although only in a fallible way
(https://github.com/seanmonstar/reqwest/pull/1770)
2023-03-13 10:29:05 +00:00
Kenta Moriuchi
e5673f5ed8
fix(core): SafePromiseAll to be unaffected by Array#@@iterator (#17542) 2023-03-13 19:24:31 +09:00
David Sherret
bcb6ee9d08
refactor(npm): push npm struct creation to a higher level (#18139)
This has been bothering me for a while and it became more painful while
working on #18136 because injecting the shared progress bar became very
verbose. Basically we should move the creation of all these npm structs
up to a higher level.

This is a stepping stone for a future refactor where we can improve how
we create all our structs.
2023-03-12 23:32:59 -04:00
David Sherret
8db853514c
fix(check): regression where config "types" entries caused type checking errors (#18124)
Closes #18117
Closes #18121 (this is just over 10ms faster in a directory one up from
the root folder)

cc @nayeemrmn
2023-03-11 11:43:45 -05:00
Ikko Eltociear Ashimine
e4430400ce
chore: typo (#18128) 2023-03-11 08:58:55 -05:00
Bartek Iwańczuk
215528f499
build: run clippy with --all-features (#18115) 2023-03-10 21:07:28 +09:00
David Sherret
a7a804919d
chore(ci): update other workflows to use cargo-toolchain.toml (#18109)
I accidentally missed these in #18104
2023-03-10 11:55:51 +01:00
denobot
857393d934
chore: forward v1.31.2 release commit to main (#18114)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-03-10 17:39:29 +09:00
Yusuke Tanaka
e3408067cc
refactor: use pin! macro from std (#18110)
<!--
Before submitting a PR, please read http://deno.land/manual/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->

This commit replaces `pin_mut!` macro with `pin!` macro that has been
provided from std since Rust 1.68.0.
With the std version we can not only expect its stability but also pass
an expression (rather than identifier) as an argument to the macro.
2023-03-10 02:28:51 +00:00
Lino Le Van
c7a5f928d3
chore(cli): fix outdated comment (#18106) 2023-03-09 21:13:53 -05:00
Bartek Iwańczuk
d1685b120b
refactor(core): remove RuntimeOptions::extensions_with_js (#18099)
This commit removes "deno_core::RuntimeOptions::extensions_with_js".

Now it's embedders' responsibility to properly register extensions
that will not contains JavaScript sources when running from an existing
snapshot.

Prerequisite for https://github.com/denoland/deno/pull/18080
2023-03-09 19:22:27 -05:00
Bartek Iwańczuk
78d430103a
fix(prompt): better output with control chars (#18108) 2023-03-10 01:09:14 +01:00
David Sherret
0da193882e
chore(ci): ensure Rust toolchain installation is based on rust-toolchain.toml (#18104)
It seems like `dtolnay/rust-toolchain` does not want to support
rust-toolchain.toml unfortunately and we had thought it did.
2023-03-09 17:01:41 -05:00
Bartek Iwańczuk
44e67df1cd
fix: Split extension registration and snapshotting (#18098)
This commit partially reverts changes from
https://github.com/denoland/deno/pull/18095.

Turns out I made a mistake that became apparent when working
on removing "RuntimeOptions::extensions_with_js" in a follow up.
2023-03-09 21:09:45 +01:00
David Sherret
47012bd931
refactor(tests/lsp): consolidate more into test LspClient and reduce verbosity (#18100) 2023-03-09 15:09:03 -05:00
Divy Srivastava
2f81e555d8
chore: bump rusty_v8 to 0.64.0 (#18096) 2023-03-09 19:51:26 +00:00
Bartek Iwańczuk
bb07e230d1
chore: update Rust to 1.68.0 (#18102) 2023-03-09 19:18:00 +00:00