1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-02 09:34:19 -04:00
Commit graph

2110 commits

Author SHA1 Message Date
Divy Srivastava
00f4c0df97
chore(cli/tests): move macos_shared_libraries test to macos_test.rs (#18268)
As per review comment in original PR:
https://github.com/denoland/deno/pull/18244#issuecomment-1473769606
2023-03-18 21:08:51 +05:30
Yoshiya Hinosawa
5223f3d9b6
fix(ext/node): add createDecipheriv (#18245) 2023-03-18 21:51:28 +09:00
Bartek Iwańczuk
0bc6bf5d33
chore: add tests for node:async_hooks (#18004)
Closes https://github.com/denoland/deno/issues/17878

---------

Co-authored-by: crowlkats <crowlkats@toaxl.com>
2023-03-17 18:53:57 +01:00
Farsen976
e6fe1630f0
fix(cli/integration): clippy lints (#18248)
This addresses two warnings from clippy, redundant-static-lifetimes and trim-split-whitespace.
closes #18247
2023-03-17 20:51:32 +09:00
Divy Srivastava
0eabd2c6d6
chore: add test for macOS shared libraries (#18244)
Closes https://github.com/denoland/deno/issues/18243
2023-03-17 07:41:17 +02:00
Yoshiya Hinosawa
e30d24be72
chore(ext/console): add 'quotes' internal option to Deno.inspect (#18183) 2023-03-17 12:22:09 +09:00
Leo Kettmeir
35196eab27
BREAKING(unstable): remove WebGPU (#18094)
This PR _**temporarily**_ removes WebGPU (which has behind the
`--unstable` flag in Deno), due to performance complications due to its
presence.

It will be brought back in the future; as a point of reference, Chrome
will ship WebGPU to stable on 26/04/2023.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17 00:29:32 +01:00
Bartek Iwańczuk
3f031ad9af
BREAKING(ext/fs): FileInfo.dev is defined on Windows (#18237)
Addresses feedback from
https://github.com/denoland/deno/pull/18073#issuecomment-1471480385.

Reverts changes to `FileInfo` fields that are not available on Windows
making them `null`. Only `FileInfo.dev` is non-null.
2023-03-17 00:14:56 +01:00
Divy Srivastava
1300d6178e
fix(ext/node): resource leak in createHmac (#18229)
This commit fixes https://github.com/denoland/deno/issues/18140.
Verified that test fails on `main`.
2023-03-16 22:25:12 +01:00
Roy Li
2c7174a5a2
fix(repl): Hide indexable properties in tab completion (#18141)
Closes #17831. This change hides the indices of any indexed collection
when triggering tab completion for object properties in the REPL.

An example is shown in the issue, but for verbosity here is another.

Before the change:
```
> const arr = new Uint8ClampedArray([1, 2, 3])
undefined
> arr.
0                     map
1                     reverse
2                     reduce
...
```
After the change:
```
> const arr = new Uint8ClampedArray([1, 2, 3])
undefined
> arr.
constructor               reduce
BYTES_PER_ELEMENT         reduceRight
buffer                    set
...
```

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-03-16 19:46:50 +00:00
David Sherret
56731f2f8d
chore: ignore permission_prompt_strips_ansi_codes_and_control_chars test (#18234)
This test hangs on all operating systems.

Opened https://github.com/denoland/deno/issues/18233 for the future
2023-03-16 14:36:23 -04:00
Nick Hanley
1a3c2e2f1d
feat(repl): add DENO_REPL_HISTORY to change history file path (#18047) 2023-03-17 01:22:24 +09:00
Farsen976
96bc15dfa2
fix(ext/node): implement "ascii" encoding for node:fs writeFile() (#18097) 2023-03-16 12:16:03 +09:00
David Sherret
c1eba16b84
fix(repl): do not panic deleting Deno or deleting all its properties (#18211)
Closes #18194
Closes #12092
2023-03-15 21:41:13 -04:00
Bartek Iwańczuk
48a0b7f98f
feat(fs): support FileInfo.dev on Windows (#18073)
This commit adds support for retrieving `dev` information
when stating files on Windows.

Additionally `Deno.FileInfo` interfaces was changed to always
return 0 for fields that we don't retrieve information for on Windows.

Closes https://github.com/denoland/deno/issues/18053

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2023-03-16 02:35:13 +01:00
Timo Wilhelm
92c3ac3034
fix(ext/http): abort request signal when response errors (#17822) 2023-03-15 22:37:06 +00:00
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
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
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
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
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
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
Kenta Moriuchi
e5673f5ed8
fix(core): SafePromiseAll to be unaffected by Array#@@iterator (#17542) 2023-03-13 19:24:31 +09: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
78d430103a
fix(prompt): better output with control chars (#18108) 2023-03-10 01:09:14 +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
99da8a69e7
fix(ext/webstorage): check size of inputs before insert (#18087) 2023-03-09 12:28:51 +00:00
David Sherret
25d98ca289
refactor(lsp): improve test client initialization (#18015) 2023-03-08 23:15:20 +00:00
Bartek Iwańczuk
72fe9bb470
refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme for snapshotted modules (#18041)
This commit renames "deno_core::InternalModuleLoader" to
"ExtModuleLoader" and changes the specifiers used by the 
modules loaded from this loader to "ext:".

"internal:" scheme was really ambiguous and it's more characters than
"ext:", which should result in slightly smaller snapshot size.

Closes https://github.com/denoland/deno/issues/18020
2023-03-08 12:44:54 +01:00
Nick Hanley
64354f4112
chore(tests): use temp dir in test missing_deno_dir (#18057)
Fixes #18056
2023-03-07 00:00:51 -05:00
David Sherret
ff4b03f233
chore(tests): ability to capture stdout and stderr separately (#18035)
This is to allow making assertions on stdout and stderr separately.
2023-03-06 09:16:50 -05:00
Bartek Iwańczuk
5f34c9be91
refactor: move definition of Deno.build from "runtime" to "core" (#18036)
We use information about build in several extension crates like
"ext/node" or "runtime/". In an effort to move "fs" APIs to a separate 
crate it is a prerequisite to have this information available outside 
of the "runtime/" crate.

This commit moves definition of "build" object to "Deno.core" that is 
later forwarded to "Deno.build".
2023-03-05 22:18:13 +00:00
Nayeem Rahman
273777f7d9
fix(check): include dts files in tsc roots (#18026) 2023-03-05 12:47:04 -05:00
Filip Skokan
7d13d65468
fix(ext/crypto): correctly limit ECDSA and hash algorithms (#18030)
Closes #18029
2023-03-05 12:34:07 +00:00
Bartek Iwańczuk
b40086fd7d
refactor(core): include_js_files! 'dir' option doesn't change specifiers (#18019)
This commit changes "include_js_files!" macro from "deno_core"
in a way that "dir" option doesn't cause specifiers to be rewritten 
to include it.

Example:
```
include_js_files! {
  dir "js",
  "hello.js",
}
```

The above definition required embedders to use:
`import ... from "internal:<ext_name>/js/hello.js"`. 
But with this change, the "js" directory in which the files are stored
is an implementation detail, which for embedders results in: 
`import ... from "internal:<ext_name>/hello.js"`.

The directory the files are stored in, is an implementation detail and 
in some cases might result in a significant size difference for the 
snapshot. As an example, in "deno_node" extension, we store the 
source code in "polyfills" directory; which resulted in each specifier 
to look like "internal:deno_node/polyfills/<module_name>", but with 
this change it's "internal:deno_node/<module_name>". 

Given that "deno_node" has over 100 files, many of them having 
several import specifiers to the same extension, this change removes
10 characters from each import specifier.
2023-03-05 02:31:38 +00:00
Andreu Botella
01028fcdf4
test(compile): Add a test for dynamic imports in deno compile (#18017)
denoland/eszip#115 added support for statically-analyzed dynamic imports
in eszip, which made `deno compile` support dynamic imports starting
from #17858. This PR adds a test for it.

----

This test is adapted from PR #17663.

Closes #17908
2023-03-05 01:37:54 +00:00
David Sherret
84bafd11d5
fix: lazily surface errors in package.json deps parsing (#17974)
Closes #17941
2023-03-03 18:27:05 -04:00
Bartek Iwańczuk
5c43e2a665
chore: update deno_std submodule to 0.178.0 (#18003) 2023-03-03 19:11:10 +00:00
Kenta Moriuchi
55833cf799
fix(core): introduce SafeRegExp to primordials (#17592) 2023-03-01 08:14:16 +09:00
David Sherret
ea1cb4c2fa
chore(test): remove TestCommandOutput macros (#17975) 2023-02-28 15:10:12 -04:00
David Sherret
7c090b1b14
chore: test builders for integration tests (#17965)
Start of adding test builders to simplify integration tests.

I only updated a few test files. We can complete upgrading over time.
2023-02-27 16:52:49 -04:00
Yoshiya Hinosawa
92ba46c384
chore(ext/node): suppress node compat tests stdout by default (#17909) 2023-02-27 19:39:33 +09:00