Bartek Iwańczuk
b312503f8f
refactor: remove old Node compat code ( #16142 )
...
This code was introduced in 808f797633
and
was needed for "compat mode". Since "compat mode" was removed in v1.26, this
code is no longer needed.
2022-10-04 17:53:23 +02:00
Marcos Casagrande
569287b15b
perf(ext/fetch): consume body using ops ( #16038 )
...
This commit adds a fast path to `Request` and `Response` that
make consuming request bodies much faster when using `Body#text`,
`Body#arrayBuffer`, and `Body#blob`, if the body is a FastStream.
Because the response bodies for `fetch` are FastStream, this speeds up
consuming `fetch` response bodies significantly.
2022-10-04 15:48:50 +02:00
Bartek Iwańczuk
0b4a6c4d08
chore: remove 'fix_exotic_specifier' test ( #16143 )
...
It's a test that's been flaky for a week, and after offline discussion,
we're no longer sure what it's testing.
2022-10-04 14:24:35 +02:00
Filip Skokan
0d042d8e54
fix(ext/crypto): interoperable import/export ( #16153 )
...
This PR updates RSA key import/export to a state which is interoperable
with other implementations.
For RSA the only OID in and out is `rsaEncryption`.
For EC the only OID in and out is `id-ecpublickey` (fixed in #16152 ).
see https://github.com/w3c/webcrypto/issues/307#issuecomment-995813032
see https://github.com/w3c/webcrypto/issues/307
see https://github.com/w3c/webcrypto/pull/305
see https://github.com/nodejs/node/pull/42816
2022-10-04 17:37:59 +05:30
Filip Skokan
aa710aac98
fix(ext/crypto): ecdh spki key import/export roundtrip ( #16152 )
2022-10-04 17:09:41 +05:30
Aurélien Bertron
8d20784f7a
fix(ext/crypto): deriveBits for ECDH not taking length into account ( #16128 )
...
Fixes #16047
2022-10-03 23:10:34 -07:00
Bartek Iwańczuk
fde938116d
feat(unstable): add support for npm specifier cli arguments for 'deno cache' ( #16141 )
...
This commit adds support for npm specifier in "deno cache" subcommand.
```
$ deno cache --unstable npm:vite npm:chalk https://deno.land/std/http/file_server.ts
```
Besides downloading requested npm package(s), it will also download
necessary code from "std/node/".
2022-10-03 23:26:42 +02:00
Bartek Iwańczuk
5b097fd7e5
fix(npm): better error is version is specified after subpath ( #16131 )
2022-10-03 19:10:53 +02:00
Bartek Iwańczuk
8e1b2fca59
fix(npm): panic on invalid package name ( #16123 )
2022-10-03 17:45:01 +02:00
Hirotaka Tagawa / wafuwafu13
a4a628dc6f
docs(fs): add default info of OpenOptions
( #16104 )
2022-10-03 17:22:40 +02:00
Satya Rohith
eacd6a7f29
chore(ext/cache): make helper functions public ( #16117 )
2022-10-03 10:52:54 +05:30
Marcos Casagrande
e2990be264
fix(ext/cache): close resource on error ( #16129 )
2022-10-03 09:48:59 +05:30
李瑞丰
b3444e0d3b
fix(ext/crypto): fix importKey error when leading zeroes ( #16009 )
...
Co-authored-by: Jason <m.jason.liu@outlook.com>
2022-10-03 09:37:25 +05:30
Marcos Casagrande
a55b194638
fix(ext/cache): acquire reader lock before async op ( #16126 )
2022-10-02 01:21:48 +02:00
Bartek Iwańczuk
048c06f84f
fix(npm): handle json files in require ( #16125 )
2022-10-01 22:21:19 +02:00
sigmaSd
a6618dc01c
lsp: use deno:/asset instead of deno:asset ( #16023 )
...
Make offering "virtual documents" via the lsp easier to parse. `deno:`
can be ambiguous to parse by editors (can conflict with linux paths)
Neovim recently landed a PR https://github.com/neovim/neovim/pull/19797
that allows it to parse `scheme:/` this PR should make deno lsp work
correctly in neovim
2022-10-01 20:02:25 +02:00
David Sherret
ecfafda9d8
perf: node cjs & esm analysis cache ( #16097 )
...
This commit adds a cache for CJS and ESM analysis that is backed by an
SQLite file.
The connection to the DB is lazily created on first use, so shouldn't
have impact on the startup time.
Benched with running Vite
Deno v1.26:
```
$ deno task dev
Warning deno task is unstable and may drastically change in the future
Task dev deno run -A --unstable --node-modules-dir npm:vite
VITE v3.1.4 ready in 961 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
```
This branch:
```
../deno/target/release/deno task dev
Warning deno task is unstable and may drastically change in the future
Task dev deno run -A --unstable --node-modules-dir npm:vite
VITE v3.1.4 ready in 330 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
```
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-01 12:15:56 +02:00
skanehira
1058d1868f
test(cli): add test cases ( #16091 )
...
Fixes: https://github.com/denoland/deno/issues/16090
2022-09-30 14:02:44 -04:00
Marcos Casagrande
927f4e2e83
fix(ext/fetch): Body#bodyUsed
for static body ( #16080 )
...
This fixes a bug where `Body#bodyUsed` incorrectly returns `false`
for a body that has actually already been consumed, after `Body#body`
is called.
2022-09-29 17:38:04 +02:00
Yoshiya Hinosawa
15ea624790
refactor(cli): use shared sys kind parser in flags.rs ( #16087 )
2022-09-29 19:34:16 +09:00
ayame113
691e36ac50
chore(ext/flash): Enabling disabled windows tests ( #16081 )
2022-09-29 10:34:26 +05:30
denobot
d8827514ff
1.26.0
...
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-29 00:10:44 +02:00
Kitson Kelly
cfbcb3b613
chore: improve JSDoc for built-in APIs ( #16048 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-28 22:21:08 +02:00
Divy Srivastava
e2828ad762
fix(ext/flash): reregister socket on partial read on Windows ( #16076 )
2022-09-28 20:52:24 +02:00
David Sherret
fcb20ab952
chore: fix flaky integration::lint::compact ( #16075 )
2022-09-28 13:52:10 -04:00
Divy Srivastava
e64af6260a
feat(ext/flash): add reuseport
option on Linux ( #16022 )
2022-09-28 23:16:29 +05:30
David Sherret
d677ba67f5
feat(npm): functionality to support child_process.fork ( #15891 )
2022-09-28 13:04:16 -04:00
Brenley Dueck
23125b275f
feat(lint): add --compact flag for terse output ( #15926 )
2022-09-28 18:47:48 +02:00
Guilherme Bernal
6c55772f0d
feat(core): add Deno.core.setPromiseHooks ( #15475 )
2022-09-28 16:09:33 +02:00
Bartek Iwańczuk
b8e3f4c71d
feat: Stabilize Deno.hostname() API ( #15932 )
2022-09-28 15:36:06 +02:00
Luca Casonato
70bc0eb72b
feat(unstable): Deno.setRaw -> Deno.stdin.setRaw ( #15797 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-28 15:03:56 +02:00
Yoshiya Hinosawa
fa9e7aab6d
feat: add --allow-sys permission flag ( #16028 )
2022-09-28 21:46:50 +09:00
Satya Rohith
b312279e58
feat: implement Web Cache API ( #15829 )
2022-09-28 17:41:12 +05:30
David Sherret
a44c83a3d6
fix(npm): use ntfs junctions in node_modules folder on Windows ( #16061 )
2022-09-27 18:02:35 -04:00
Bartek Iwańczuk
a344368603
feat: Stabilize Deno.refTimer() and Deno.unrefTimer() APIs ( #16036 )
2022-09-27 22:11:11 +02:00
Marcos Casagrande
980d65b4d0
fix(cli/bench): strace numeric format ( #16055 )
2022-09-27 21:33:17 +02:00
Sylvain Cau
9bb3ccbab2
fix(cli/vendor): handle assert type json during vendoring ( #16059 )
2022-09-27 14:01:43 -04:00
Satya Rohith
7a47321b09
fix(ext/fetch): blob url ( #16057 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-27 22:07:46 +05:30
Divy Srivastava
f02f2425d5
feat(ext/crypto): add x25519 and Ed25519 CFRG curves ( #14119 )
2022-09-27 17:43:42 +05:30
Kitson Kelly
4ad48d5dab
fix: TypeScript 4.8 update ( #16040 )
2022-09-27 09:38:21 +10:00
Mathias Lafeldt
4b01ef5c23
chore: use Rust 1.64.0 ( #16035 )
2022-09-26 21:52:16 +02:00
Marcos Casagrande
c7dd842f84
perf(ext/fetch): use content-length in InnerBody.consume ( #15925 )
...
This fast path prevents repeated allocations when receiving a fetch body with a known size.
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-26 20:27:50 +02:00
David Sherret
1628dba6db
fix(fmt): keep type args in type queries and keep empty array expr element's trailing comma ( #16034 )
2022-09-26 12:57:50 -04:00
李瑞丰
a2262c11d7
fix(ext/console): fix error when logging a proxied Date ( #16018 )
2022-09-26 23:55:58 +09:00
Marcos Casagrande
b73cb7bf9c
perf(ext/console): break on iterableLimit & better sparse array handling ( #15935 )
2022-09-26 15:55:22 +09:00
David Sherret
f6a9b49dfb
perf: don't re-download package tarball to global cache if local node_modules folder exists for package ( #16005 )
2022-09-23 17:35:48 -04:00
Marcos Casagrande
12306022da
test(ext/fetch): enable null body status test on windows ( #15995 )
2022-09-23 08:34:04 -04:00
Divy Srivastava
72af1496d9
perf: use fast ops for tty ( #15976 )
2022-09-23 09:35:45 +05:30
David Sherret
1b04ff0782
chore: forward v1.25.4 release commit to main ( #16001 )
2022-09-22 15:58:43 -04:00
David Sherret
9bf4ec2eac
chore: temporarily ignore websocketstream test ( #15997 )
2022-09-22 12:41:42 -04:00
David Sherret
0eda3fcd12
fix(compile): keep non-exe extension in output name on Windows ( #15994 )
2022-09-22 11:49:27 -04:00
David Sherret
716005a0d4
feat(npm): add flag for creating and resolving npm packages to a local node_modules folder ( #15971 )
2022-09-22 11:17:02 -04:00
Bartek Iwańczuk
9a216806d5
feat(npm): add support for --reload=npm: and --reload=npm:<package> ( #15972 )
2022-09-22 10:39:58 -04:00
Divy Srivastava
698a340ad7
perf: fs optimizations - part 1 ( #15873 )
2022-09-22 14:39:25 +05:30
Kayla Washburn
1ef96343a1
feat: allow exiting on two consecutive ctrl+c presses ( #15981 )
2022-09-22 04:42:09 -04:00
Aapo Alasuutari
707e9e3580
feat(ops): Automatic fast ops creation ( #15527 )
2022-09-22 10:05:24 +05:30
Yoshiya Hinosawa
cc32a297da
fix(runtime): better error message with Deno.env.get/set ( #15966 )
2022-09-21 15:18:58 +09:00
Bartek Iwańczuk
35fe9ee530
fix(flash): panic if response if undefined ( #15964 )
...
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-09-20 22:08:15 +02:00
Vicary A
2929ec9ffa
fix(ext/webgpu): make GPUDevice.features SetLike ( #15853 )
2022-09-20 03:43:32 +02:00
Kitson Kelly
73e89844ba
feat(cli): update to TypeScript 4.8 ( #15064 )
2022-09-20 07:00:01 +10:00
David Sherret
1464b756a4
refactor: move out test files from root testdata directory into sub directories ( #15949 )
2022-09-19 10:32:21 -04:00
Divy Srivastava
8d50c09c0d
perf(cli): avoid canonicalize_path
if config file does not exist ( #15957 )
2022-09-19 19:31:47 +05:30
Divy Srivastava
e2f3801221
perf(cli): avoid clap::App::clone
( #15951 )
2022-09-19 17:07:49 +05:30
Ben Noordhuis
b1b418b81a
chore: fix clippy warnings ( #15944 )
...
Stop allowing clippy::derive-partial-eq-without-eq and fix warnings
about deriving PartialEq without also deriving Eq.
In one case I removed the PartialEq because it a) wasn't necessary,
and b) sketchy because it was comparing floating point numbers.
IMO, that's a good argument for enforcing the lint rule, because it
would most likely have been caught during review if it had been enabled.
2022-09-19 10:25:03 +02:00
David Sherret
a4a894fa1e
fix(doc): deno doc should parse modules if they haven't been parsed before ( #15941 )
2022-09-18 13:59:33 -04:00
Yoshiya Hinosawa
d7b27ed63b
fix(ext/node): fix builtin module module ( #15904 )
2022-09-17 20:35:32 +09:00
Divy Srivastava
5fe660ecd7
perf(web): optimize encodeInto() ( #15922 )
2022-09-17 16:48:15 +05:30
Divy Srivastava
6154188786
perf(ext/console): avoid wrapConsole
when not inspecting ( #15931 )
2022-09-17 15:34:43 +05:30
Ryan Dahl
684841a18c
upgrade deps ( #15914 )
2022-09-16 19:11:30 -04:00
Nayeem Rahman
38280990da
fix(runtime): fix permission status cache keys ( #15899 )
2022-09-16 20:46:38 +09:00
Colin Ihrig
ee208c1b20
chore: forward v1.25.3 release commit to main ( #15919 )
...
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-09-15 16:24:06 -04:00
Leo Kettmeir
2fc88aba1a
docs: make unstable warnings consistent ( #15913 )
2022-09-15 16:37:35 +02:00
Luca Casonato
516a1da467
Revert "docs: remove unstable messages" ( #15886 )
2022-09-15 14:09:23 +02:00
Divy Srivastava
1de17fad7f
chore(ext/flash): disable flaky flash test ( #15908 )
2022-09-15 09:52:31 +05:30
Colin Ihrig
19deec4494
fix(ops): add node.js env variable allowlist ( #15893 )
...
This commit allows the Node compatibility layer to skip
environment variable permission checks when --unstable
is passed and the variable name is one that Node uses.
Fixes: https://github.com/denoland/deno/issues/15890
2022-09-14 11:59:20 -04:00
Bartek Iwańczuk
7b98282993
fix(npm): binary entrypoint for .js or no extension ( #15900 )
2022-09-14 10:41:47 -04:00
Asher Gomez
6a9acc8142
doc(unstable): mention that signal
input isn't supported in spawnSync
( #15889 )
2022-09-14 08:37:05 +02:00
David Sherret
73efed218f
refactor(npm): create general use NpmPackageResolver
( #15882 )
2022-09-13 11:59:01 -04:00
Leo Kettmeir
b4e618315a
docs: remove unstable messages ( #15878 )
2022-09-13 03:23:34 +02:00
Bartek Iwańczuk
233d5422fd
fix(npm): use shim from deno_node crate for 'module' built-in module ( #15881 )
2022-09-12 18:11:32 -04:00
David Sherret
98454c1eb8
fix(npm): support cjs resolution of package subpath with package.json ( #15855 )
2022-09-12 15:47:54 -04:00
David Sherret
a3a4760831
fix(npm): align Deno importing Node cjs with Node esm importing cjs ( #15879 )
2022-09-12 14:28:51 -04:00
Leo Kettmeir
8f0a6770db
docs: dedupe DOM category ( #15868 )
2022-09-12 09:30:43 +02:00
David Sherret
dee9f0acaf
fix(npm): align Node esm code importing cjs with Node ( #15838 )
2022-09-10 15:00:45 -04:00
David Sherret
3b0de03b59
fix(npm): remove export binding to match node ( #15837 )
2022-09-10 11:38:11 -04:00
Divy Srivastava
a54d5654a2
perf: optimize URL serialization ( #15663 )
2022-09-10 09:15:16 +05:30
Yoshiya Hinosawa
59476ab96d
chore(cli): exclude npm registry data from crate package ( #15832 )
2022-09-10 08:43:51 +09:00
Bartek Iwańczuk
f92bd986de
feat: download progress bar ( #15814 )
2022-09-09 15:57:39 -04:00
denobot
3bce2af0eb
chore: forward v1.25.2 release commit to main ( #15831 )
...
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-09-09 20:31:43 +09:00
Bartek Iwańczuk
6c179daff0
fix(npm): recursive translation of reexports, remove window global in node code ( #15806 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-09-08 22:01:48 +02:00
Leo Kettmeir
93cbac69e8
chore: update url crate to 2.3.1 ( #15818 )
2022-09-08 19:04:59 +02:00
Leo Kettmeir
99c5381af4
fix(docs): change category for Deno.Process to "Sub Process" ( #15812 )
2022-09-08 10:05:01 +02:00
Leo Kettmeir
4e52319795
fix(docs): add missing categories for unstable ( #15807 )
2022-09-08 02:47:47 +02:00
David Sherret
9e6917426a
fix: upgrade deno_ast to 0.19 ( #15808 )
2022-09-07 15:06:18 -04:00
Bartek Iwańczuk
4a250b2f25
feat: add --no-npm flag to disable npm: imports ( #15673 )
...
This commit adds "--no-npm" flag, it's similar to "--no-remote"
flag. This flag makes Deno error out if "npm:" specifier is encountered.
2022-09-07 15:33:51 +02:00
Colin Ihrig
3b1204eb2d
fix(core): make errors more resistant to tampering ( #15789 )
...
This commit makes error objects more resistant to
prototype tampering.
This bug was found when updating the deno_std Node compatibility
layer to Node 18. The Node test 'parallel/test-assert-fail.js'
was breaking std's assertion library.
Refs: https://github.com/denoland/deno_std/pull/2585
2022-09-07 09:11:16 -04:00
Divy Srivastava
d57f9d560d
fix(ext/flash): use utf8 length as Content-Length ( #15793 )
2022-09-07 16:21:30 +05:30
Divy Srivastava
7f4b043f32
fix(test): unflake wasm_unreachable test ( #15794 )
2022-09-07 16:21:18 +05:30
Nayeem Rahman
5819fef2d5
test: fix bad resource fixture ( #15792 )
2022-09-07 09:49:34 +05:30
Divy Srivastava
d2a408f452
perf(runtime): short-circuit queue_async_op
for Poll::Ready ( #15773 )
2022-09-06 23:08:37 +05:30
Alexander Sage
c0a684c14e
fix(cli): Fix panic when providing invalid urls to --reload ( #15784 )
2022-09-06 18:30:42 +02:00
Nayeem Rahman
118dd47ad0
fix(watch): ignore unload errors on drop ( #15782 )
2022-09-06 13:18:23 +02:00
Bartek Iwańczuk
d20e80fa50
refactor(npm): reorganize remapping built-in Node modules to remote URLs ( #15755 )
...
Changes how built-in Node modules are mapped to polyfills
from "deno_std". Instead of intertwining this logic into Node
resolution logic, we map them to "NodeResolution::BuiltIn"
which are remapped to "deno_std" URLs in ProcState.
2022-09-06 12:57:28 +02:00
Bartek Iwańczuk
f2448c5de2
fix(npm): conditional exports in npm: specifiers ( #15778 )
2022-09-06 12:56:34 +02:00
Divy Srivastava
1cdd2504b1
perf(runtime): flatten arguments for write_file ops ( #15776 )
2022-09-05 17:20:48 +05:30
Bartek Iwańczuk
264ad49e18
refactor: cleanup Node compatibility code ( #15766 )
...
- move errors related to Node compat from cli/node/errors.rs to "ext/node" crate
- remove dependency on "node_resolver" crate
- make some of structures private to the "cli/node" module
2022-09-05 12:36:35 +02:00
Aapo Alasuutari
16dbf4adc3
feat(ext/ffi): Support bool FFI type ( #15754 )
2022-09-05 08:56:52 +05:30
David Sherret
08a6af398f
fix(cli): allow using file resource synchronously while being used async ( #15747 )
2022-09-04 22:33:06 -04:00
Divy Srivastava
50fc5d169a
fix(bench): make sure bytes/response is equal ( #15763 )
2022-09-04 18:29:38 +05:30
Bartek Iwańczuk
e324151520
BREAKING(unstable): remove --compat mode ( #15678 )
...
This commit removes "compat" mode. We shipped support for "npm:" specifier
support in v1.25 and that is preferred way to interact with Node code that we
will iterate and improve upon.
2022-09-03 18:19:30 +02:00
Bartek Iwańczuk
fc4025c878
fix(npm): add more context to errors when file doesn't exist ( #15749 )
2022-09-03 15:43:35 +02:00
Bartek Iwańczuk
223403e899
feat(info): add information about npm modules cache ( #15750 )
2022-09-03 15:31:01 +02:00
Christian Dürr
63b8089bda
refactor: move JsError formatting to deno_runtime ( #15345 )
...
This takes the existing `fmt_error` module from cli and puts it as a
public module into `deno_runtime`.
2022-09-02 22:53:23 +02:00
Nayeem Rahman
4f8dea100e
refactor(test): grab runTests() and runBenchmarks() from __bootstrap ( #15420 )
2022-09-02 19:44:45 +02:00
David Sherret
5262937285
fix(npm): respect latest
dist tag for getting current version ( #15746 )
2022-09-02 13:06:42 -04:00
Geert-Jan Zwiers
7d622a6643
fix(init): suppress info logs when using quiet mode ( #15741 )
2022-09-02 17:59:36 +02:00
Garcia
4ec213b0aa
fix(ext/timers): create primordial eval
( #15110 )
2022-09-02 17:55:44 +02:00
David Sherret
03e6727a04
fix(npm): correct exact matching of pre-release versions ( #15745 )
2022-09-02 11:21:40 -04:00
David Sherret
387300aed0
refactor: extract out check code from emit ( #15729 )
...
Closes #15535
2022-09-02 10:54:40 -04:00
Jason
8178665bd1
fix(cli/repl): await Promise.any([])... ( #15623 )
2022-09-02 13:38:06 +02:00
Nayeem Rahman
a74b2ecf37
fix(repl): don't terminate on unhandled error events ( #15548 )
2022-09-02 12:43:39 +02:00
denobot
658d2cdff2
chore: forward v1.25.1 release commit to main ( #15735 )
...
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-09-02 07:42:47 +02:00
Geert-Jan Zwiers
58e76098e6
fix(serde_v8): no panic on reading large text file ( #15494 )
...
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-09-01 22:20:11 +02:00
Aapo Alasuutari
778eb1da24
fix(ext/ffi): Fix pointer types ( #15730 )
2022-09-01 23:01:05 +05:30
David Sherret
3a601e56f4
fix(npm): ignore npm cache directory creation errors ( #15728 )
2022-09-01 12:37:14 -04:00
David Sherret
67713f4b93
fix(npm): ignore the unstable error in the lsp ( #15727 )
2022-09-01 12:06:23 -04:00
David Sherret
e1d7d7b0e3
fix(npm): better node version and version requirement compatibility ( #15714 )
2022-09-01 11:50:12 -04:00
Divy Srivastava
20c835407c
fix(ext/flash): retry write failures ( #15591 )
2022-09-01 18:58:34 +05:30
Geert-Jan Zwiers
cbd8307710
fix(check): --remote and --no-remote should be mutually exclusive ( #14964 )
2022-09-01 11:52:11 +02:00
Bartek Iwańczuk
adec4f575e
fix(npm): translate CJS to ESM with name clashes for files and dirs ( #15697 )
2022-08-31 00:31:59 +02:00
David Sherret
79fe8ffff8
fix(fmt): add the file path to the panic messages when formatting is unstable ( #15693 )
2022-08-30 14:46:03 -04:00
David Sherret
5f251b283b
fix(npm): prefer importing esm from esm ( #15676 )
2022-08-30 14:09:22 -04:00
Bartek Iwańczuk
54be07d05e
fix(npm): skip extracting pax_global_header from tarballs ( #15677 )
2022-08-30 17:15:41 +02:00
Leo Kettmeir
f3a0e48d4e
fix(docs): add missing categories ( #15684 )
2022-08-30 13:16:56 +02:00
Danny Povolotski
5e0fa5dd88
fix(ext/websocket): fix closing of WebSocketStream with unread messages ( #15632 )
2022-08-30 03:43:17 +02:00
David Sherret
c3e48cba18
fix(compile): panic when running with a populated dep analysis cache ( #15672 )
...
Closes #15612
2022-08-29 14:24:10 -04:00
Bartek Iwańczuk
b62ef4d37b
refactor(cli): Remove cli/node dependency on cli/compat ( #15654 )
2022-08-29 20:19:54 +02:00
Bartek Iwańczuk
2851a98072
fix(npm): conditional exports with wildcards ( #15652 )
2022-08-29 19:15:20 +02:00
David Sherret
ea838d27a2
fix: config file errors should not print specifier with debug formatting ( #15648 )
2022-08-29 13:13:39 -04:00
Bartek Iwańczuk
ad98c9fdd1
chore: update test_util/std/ submodule ( #15657 )
2022-08-29 11:35:27 +02:00
Divy Srivastava
d8396225c4
perf: use fast api for op_now ( #15643 )
2022-08-28 12:21:49 +05:30
Geert-Jan Zwiers
7c4f57e8b0
fix(ext/flash): add missing backticks in server docs ( #15644 )
2022-08-27 21:20:25 +02:00
cuobiezi
dbfaaddb4f
fix(cli): deno upgrade --canary
always downloaded latest version even if it was already latest ( #15639 )
...
Closes #15570
2022-08-27 13:46:38 -04:00
David Sherret
ec98d86d21
fix(npm): handle cjs re-exports with the same name as an export ( #15626 )
2022-08-26 14:34:35 -04:00
Yoshiya Hinosawa
9b324b1cf4
fix(ext/node): fix global in node env ( #15622 )
2022-08-26 23:39:05 +09:00
David Sherret
f583a7ebf4
chore(npm): add test for esm npm binary package ( #15609 )
2022-08-26 09:17:48 -04:00
Bartek Iwańczuk
da10c9c8d1
fix(ext/flash): panic on AddrInUse ( #15607 )
2022-08-26 08:42:11 +05:30
David Sherret
376665d115
fix: avoid global declaration collisions in cjs ( #15608 )
...
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
2022-08-25 20:24:18 -04:00
Bartek Iwańczuk
8986e2ced4
v1.25.0
2022-08-25 00:20:07 +02:00
Bartek Iwańczuk
fb1c7b7dea
fix(unstable): finish HTTP response for 205 and 304 responses ( #15584 )
...
This commit fixes "Deno.serve()" API by making sure that
205 and 304 responses end with "\r\n\r\n".
2022-08-24 21:26:57 +02:00
David Sherret
348291f5ec
fix(npm): always require --unstable flag even for esm ( #15583 )
2022-08-24 13:44:38 -04:00
David Sherret
18fcef8b29
fix(npm): cjs export analysis should take into consideration exports with dashes ( #15582 )
2022-08-24 13:37:34 -04:00
Luca Casonato
33c4d45328
fix: resolve jsxImportSource
relative to module ( #15561 )
...
Previously `jsxImportSource` was resolved relative to the config file
during graph building, and relative to the emitted module during
runtime.
This is now fixed so that the JSX import source is resolved relative to
the module both during graph building and at runtime.
2022-08-24 19:36:05 +02:00
David Sherret
684aabbc25
feat: support subpaths in npm package references ( #15578 )
2022-08-24 11:25:32 -04:00
Bartek Iwańczuk
a4cc09447e
fix(unstable): Deno.serve() can parse hostnames ( #15579 )
2022-08-24 16:38:51 +02:00
Bartek Iwańczuk
5268fa0e0f
fix(unstable): various resolution bugs for npm: specifiers ( #15546 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-24 14:54:20 +02:00
Luca Casonato
f3bde1d53b
feat(ext/flash): split upgradeHttp into two APIs ( #15557 )
...
This commit splits `Deno.upgradeHttp` into two different APIs, because
the same API is currently overloaded with two different functions. Flash
requests upgrade immediately, with no need to return a `Response`
object. Instead you have to manually write the response to the socket.
Hyper requests only upgrade once a `Response` object has been sent.
These two behaviours are now split into `Deno.upgradeHttp` and
`Deno.upgradeHttpRaw`. The latter is flash only. The former only
supports hyper requests at the moment, but can be updated to support
flash in the future.
Additionally this removes `void | Promise<void>` as valid return types
for the handler function. If one wants to use `Deno.upgradeHttpRaw`,
they will have to type cast the handler signature - the signature is
meant for the 99.99%, and should not be complicated for the 0.01% that
use `Deno.upgradeHttpRaw()`.
2022-08-24 17:40:57 +05:30
David Sherret
452df99222
feat(npm): support packages with multiple command names ( #15565 )
2022-08-23 22:01:21 -04:00
Luca Casonato
4ef08a58df
feat: update Deno.serve
function signature ( #15563 )
...
This commit changes the `Deno.serve` function signature to be more
versatile and easier to use. It is now a drop in replacement for
std/http's `serve`.
The input validation has also been reworked.
2022-08-24 00:08:56 +02:00
David Sherret
f0993f413b
fix: parse scoped npm specifiers with no version ( #15564 )
2022-08-23 13:08:37 -04:00
David Sherret
e7367044d9
feat: binary npm commands ( #15542 )
2022-08-23 10:39:19 -04:00
David Sherret
362af63c6f
fix(cache): do not attempt to emit non-emitable files ( #15562 )
2022-08-23 10:30:14 -04:00
Luca Casonato
24f7f3fda9
fix(ext/fetch): ignore user content-length header ( #15555 )
...
Previously if a user specified a content-length header for an POST
request without a body, the request would contain two `content-length`
headers. One added by us, and one added by the user.
This commit ignores all content-length headers coming from the user,
because we need to have the sole authority on the content-length because
we transmit the body.
2022-08-23 12:43:04 +02:00
Divy Srivastava
e34260c5b0
BREAKING(ext/ffi): specialized buffer
type ( #15518 )
2022-08-23 09:16:43 +05:30
Kitson Kelly
d0c5477731
docs: add permission tags to JSDocs ( #15541 )
...
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2022-08-23 10:57:01 +10:00
Ikko Ashimine
cf80b0a202
chore: typo ( #15536 )
2022-08-22 12:42:03 -04:00
David Sherret
7a1a082876
perf: cache swc dependency analysis and don't hold onto ParsedSource
s in memory ( #15502 )
2022-08-22 12:14:59 -04:00
Bartek Iwańczuk
c66386dbd2
feat(unstable): Respect --cached-only flags for npm: specifiers ( #15512 )
...
This commit changes "npm:" specifier handling to respect "--cached-only" flags and adds "Download" messages for npm registry api calls.
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-22 17:35:04 +02:00
Yoshiya Hinosawa
57d48134d1
fix(ext/flash): fix default onListen callback ( #15533 )
2022-08-22 17:01:43 +09:00
Bartek Iwańczuk
301f6c46ba
fix(unstable): better error for invalid hostname in Deno.serve() ( #15529 )
2022-08-21 21:15:52 +02:00
Nayeem Rahman
97954003cc
feat: queueMicrotask()
error handling ( #15522 )
...
Adds error event dispatching for queueMicrotask(). Consequently unhandled errors are now reported with Deno.core.terminate(), which is immune to the existing quirk with plainly thrown errors (#14158 ).
2022-08-21 20:16:42 +02:00
Mathias Lafeldt
e96933bc16
chore: use Rust 1.63.0 ( #15464 )
2022-08-21 19:31:14 +02:00
Yoshiya Hinosawa
fb2aeb79a1
fix(ext/flash): fix listening port ( #15519 )
2022-08-21 21:27:14 +09:00
Divy Srivastava
906aa78af3
feat(ops): V8 Fast Calls ( #15291 )
2022-08-21 17:37:53 +05:30
Nayeem Rahman
e39d4e3e7f
fix(core/runtime): always cancel termination in exception handling ( #15514 )
2022-08-21 13:57:10 +02:00
David Sherret
87f80ff6be
feat(unstable): initial support for npm specifiers ( #15484 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20 11:31:33 -04:00
Leo Kettmeir
1ffbd56164
feat: add "deno init" subcommand ( #15469 )
...
This adds an init subcommand to that creates a project starter similar to cargo init.
```
$ deno init my_project
Project initialized
Run these commands to get started:
cd my_project
deno run main.ts
deno run main_test.ts
$ deno run main.ts
Add 2 + 3 5
$ cat main.ts
export function add(a: number, b: number): number {
return a + b;
}
if (import.meta.main) {
console.log("Add 2 + 3", add(2, 3));
}
$ cat main_test.ts
import { assertEquals } from "https://deno.land/std@0.151.0/testing/asserts.ts ";
import { add } from "./main.ts";
Deno.test(function addTest() {
assertEquals(add(2, 3), 5);
});
```
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20 01:37:05 +02:00
Bartek Iwańczuk
5beec3f106
feat(unstable): change Deno.serve() API ( #15498 )
...
- Merge "Deno.serve()" and "Deno.serveTls()" API
- Remove first argument and use "fetch" field options instead
- Update type declarations
- Add more documentation
2022-08-19 14:36:01 +02:00
Divy Srivastava
25a109d9ea
chore(bench): add flash router benchmarks ( #15495 )
2022-08-19 15:54:54 +05:30
Divy Srivastava
9e576dff7c
perf(runtime): optimize Deno.file open & stream ( #15496 )
2022-08-19 15:54:40 +05:30
Divy Srivastava
8bdcec1c84
fix(ext/flash): concurrent response streams ( #15493 )
2022-08-19 10:14:56 +05:30
Divy Srivastava
cd21cff299
feat(ext/flash): An optimized http/1.1 server ( #15405 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-18 17:35:02 +05:30
Kitson Kelly
a2ab5eee01
docs: add category tag for built-in APIs ( #15480 )
2022-08-17 13:12:24 +10:00
David Sherret
868c7e38bf
feat(runtime): add pre_execute_module_cb ( #15485 )
2022-08-16 21:00:35 -04:00
Geert-Jan Zwiers
eab66a9f4d
chore(bench,test): list .mts
under supported file extensions in cli docs ( #15477 )
2022-08-15 21:16:23 +02:00
Bartek Iwańczuk
5a4f84a0e1
chore: upgrade rusty_v8 to 0.48.1 ( #15310 )
2022-08-15 14:12:11 +02:00
David Sherret
18dcc64910
fix(npm): handle storing non-all lowercase package names ( #15470 )
2022-08-14 09:09:16 -04:00
David Sherret
8eed24cd3d
fix(coverage): ensure coverage is only collected in certain situations ( #15467 )
2022-08-12 15:21:17 -04:00
Roj
ee2f4e745c
docs(cli/dts): fix typo ( #15457 )
2022-08-12 15:32:38 +09:00
David Sherret
c3b04683c5
refactor(cli): consolidate most MainWorker related code to the same place ( #15459 )
2022-08-11 16:59:12 -04:00
denobot
e4a5f9952f
chore: forward v1.24.3 release commit to main ( #15462 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-11 16:47:03 -04:00
Aapo Alasuutari
2164f6b1eb
perf(ops): Monomorphic sync op calls ( #15337 )
...
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params).
Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple:
```
opSync("op_foo", param1, param2);
// -> turns to
ops.op_foo(param1, param2);
```
This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path.
Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-08-11 15:56:56 +02:00
David Sherret
321a42d1fb
refactor(runtime): split up MainWorker
and WebWorker
's preload_module
method into two separate methods ( #15451 )
2022-08-10 18:10:51 -04:00
Nayeem Rahman
578f12d531
fix(cli): allow configurations files to also be json modules ( #15444 )
...
Closes #15440
2022-08-11 07:33:42 +10:00
David Sherret
d9fae38d1e
feat: add initial internal npm client and dependency resolver ( #15446 )
2022-08-10 15:23:58 -04:00
Leo Kettmeir
d0ffa0beb5
fix(permissions): ignore empty values ( #15447 )
2022-08-10 21:13:53 +02:00
Kayla Washburn
08061b60d9
fix: allow setting globalThis.location
when no --location
is provided ( #15448 )
2022-08-10 12:57:30 -06:00
sigmaSd
5b2ae25f13
feat(repl): add color to functions for syntax highlighting ( #15434 )
2022-08-10 12:39:16 -04:00
Cre3per
afc29c28ae
fix(task): subcommand parser skips global args ( #15297 )
2022-08-10 11:55:34 -04:00
David Sherret
d6f789eb05
chore: temporarily disable op_require_read_file
( #15433 )
2022-08-09 17:28:13 -04:00
Kitson Kelly
1c2ec1f48f
fix: update deno_graph to fix importing config as JSON module ( #15388 )
...
Ref: denoland/deno_graph#166
2022-08-10 07:27:22 +10:00
Bartek Iwańczuk
1f54d87789
feat: add ext/node for require support ( #15362 )
...
This commit adds "ext/node" extension that implementes CommonJS module system.
In the future this extension might be extended to actually contain implementation of
Node compatibility layer in favor of "deno_std/node".
Currently this functionality is not publicly exposed, it is available via "Deno[Deno.internal].require"
namespace and is meant to be used by other functionality to be landed soon.
This is a minimal first pass, things that still don't work:
support for dynamic imports in CJS
conditional exports
2022-08-09 21:06:01 +02:00
David Sherret
888b26819e
fix: various formatting fixes ( #15412 )
2022-08-05 19:31:19 -04:00
Aapo Alasuutari
9c594de0ff
feat(ext/ffi): Add static method variants to Deno.UnsafePointerView ( #15146 )
2022-08-05 21:57:12 +05:30
denobot
cf33720a85
chore: forward v1.24.2 release commit to main ( #15410 )
2022-08-05 00:10:47 +02:00
Nayeem Rahman
34328690dc
fix(test): output parallel test results independently ( #15399 )
2022-08-04 12:38:40 -04:00
David Sherret
8f102e49c1
fix(vendor): existing import map with bare specifier in remote ( #15390 )
2022-08-04 09:39:14 -04:00
Yongwook Choi
2138b68c24
fix: Update Object.prototype.__proto__
related comments ( #15394 )
2022-08-04 08:39:16 +05:30
David Sherret
8b03c1e6cc
fix(vendor): error on dynamic imports that fail to load instead of panicking ( #15391 )
2022-08-03 21:23:45 -04:00
Bartek Iwańczuk
bc4ee59246
chore(compat): update list of supported modules ( #15397 )
2022-08-03 15:56:48 +02:00
Nayeem Rahman
2e2c623882
fix(test): race condition for cancelled tests ( #15233 )
2022-08-02 10:55:11 -04:00
Kitson Kelly
09d14b1b57
fix(lsp): use correct commit chars for completions ( #15366 )
...
Fixes: #15252
2022-08-02 08:54:17 +10:00
Outvi V
924aa31fa8
fix(lsp): remove excessive line breaks in status page ( #15364 )
...
Fixes #15359
2022-08-02 08:29:05 +10:00
David Sherret
2703996dea
refactor(emit/cache): move cli version into emit hash ( #15348 )
2022-07-30 12:09:12 -04:00
David Sherret
ef5653be98
refactor: reuse FastInsecureHasher
in get_check_hash
( #15354 )
2022-07-30 11:43:03 -04:00
Bartek Iwańczuk
20a89d46c4
fix(core): BorrowMutError in nested error ( #15352 )
2022-07-30 16:09:42 +02:00
Mathias Lafeldt
3f0dcd3b80
docs: turn bare URLs into clickable links ( #15347 )
2022-07-30 12:20:29 +02:00
David Sherret
b676cab0b4
fix(compat): use mjs extension for stream/promises ( #15341 )
2022-07-29 15:48:03 -04:00
Colin Ihrig
088bc52db0
Forward 1.24.1 to main ( #15333 ) ( #15336 )
...
1.24.1 (#15333 )
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-07-29 08:44:46 -04:00
David Sherret
ffd74cb1a1
chore: update jsonc_parser to 0.20 ( #15316 )
2022-07-26 21:24:56 -04:00
Aapo Alasuutari
b4b4e5980b
chore(ops): Remove unused arguments from ops ( #15315 )
2022-07-26 19:34:08 +02:00
Kitson Kelly
7036600be3
fix(lsp): remove CompletionInfo.flags ( #15288 )
...
Fixes: #15287
2022-07-25 07:11:33 +10:00
Aapo Alasuutari
f8fee6cd21
feat(ext/ffi): Safe number pointers ( #15173 )
2022-07-24 16:11:11 +05:30
diachedelic
2843160fc7
feat(ext/crypto): deriveBits P-384 ( #15138 )
...
This commit adds P-384 curve support for crypto.subtle.deriveBits.
Co-authored-by: James Diacono <james@diacono.com.au>
2022-07-23 22:34:37 +05:30
Bartek Iwańczuk
504d2936ec
fix: unhandledrejection handling for sync throw in top level ( #15279 )
...
Fixes an edge in "unhandledrejection" event that prevent synchronous
errors being surfaced when throw from a top-level scope.
2022-07-23 00:40:42 +02:00
Bartek Iwańczuk
72199303d8
fix: Child.unref() unrefs stdio streams properly ( #15275 )
2022-07-22 18:07:20 +02:00
Divy Srivastava
4db650ddd5
Revert "feat(ops): V8 Fast Calls ( #15122 )" ( #15276 )
...
This reverts commit 03dc3b8972
.
2022-07-22 19:06:32 +05:30
Divy Srivastava
03dc3b8972
feat(ops): V8 Fast Calls ( #15122 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-22 17:54:22 +05:30
Bartek Iwańczuk
4e71a9424e
fix: proper typings for unhandledrejection event ( #15271 )
2022-07-21 23:54:53 +02:00
Satya Rohith
6c3d9b981f
fix(cli): unset jsxFragmentFactory & jsxFactory options ( #15264 )
2022-07-21 14:44:18 +05:30
denobot
f0e01682cc
1.24.0 ( #15262 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-21 01:28:00 +02:00
David Sherret
26cea0e2ca
feat(test): add --parallel
flag, soft deprecate --jobs
( #15259 )
...
Co-authored-by: mrkldshv <markladyshev@gmail.com>
2022-07-20 17:36:54 -04:00
David Sherret
5f5bbd597a
fix(coverage): do not verify emit source hash for coverage ( #15260 )
2022-07-20 16:30:57 -04:00
Bartek Iwańczuk
d53936eb7d
Reland "feat: add "unhandledrejection" event support" ( #15211 )
2022-07-20 20:28:19 +02:00
Nayeem Rahman
6e350b2b7c
chore(cli): Ignore "experimentalDecorators" and "moduleDetection" options ( #15202 )
2022-07-20 16:59:56 +02:00
Bartek Iwańczuk
d17b3906bf
chore: use import.meta.resolve() in tests ( #15256 )
2022-07-20 16:56:53 +02:00
David Sherret
73504d76b2
fix(task): resolve deno configuration file first from specified --cwd
arg ( #15257 )
2022-07-20 10:36:14 -04:00
David Sherret
cee3246edb
fix(fmt): improve curried arrow functions ( #15251 )
2022-07-20 08:55:18 -04:00
ayame113
27a72a12b7
chore: align some Web API type definitions to lib.dom.d.ts ( #15219 )
2022-07-20 18:30:41 +08:00
Phosra
b8e1250500
fix(ext/web): align DOMException better with spec ( #15097 )
2022-07-20 10:12:18 +02:00
Dante Issaias
2b1f145c3e
chore(ext): update webgpu ( #15059 )
2022-07-20 02:22:26 +02:00
David Sherret
649536e266
fix(task): do not overflow attempting to parse large number as redirect ( #15249 )
2022-07-19 16:50:09 -04:00
Roj
248bfda8d3
chore(cli): update config file schema to include test config ( #15246 )
2022-07-19 15:10:41 -04:00
David Sherret
0ab262b901
feat: emit files on demand and fix racy emit ( #15220 )
2022-07-19 11:58:18 -04:00
Leo Kettmeir
2eb27c92db
fix: WebSocketStream ping event causes pending promises ( #15235 )
2022-07-18 22:49:49 +02:00
Leo Kettmeir
2bebdc9116
feat(unstable): Ability to ref/unref "Child" in "Deno.spawnChild()" API ( #15151 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-18 22:24:35 +02:00
Roj
70d1ecaeaa
feat(cli): support configuring the test tool in the config file ( #15079 )
2022-07-18 15:12:19 -04:00
sigmaSd
1f04cea160
chore(repl): update rustyline to 10.0.0 ( #15232 )
2022-07-18 20:47:00 +02:00
Bartek Iwańczuk
999cbfb52b
feat: import.meta.resolve() ( #15074 )
...
This commit adds new "import.meta.resolve()" API which
allows to resolve specifiers relative to the module the API
is called in. This API supports resolving using import maps.
2022-07-18 20:05:26 +02:00
David Sherret
0d73eb3dd9
chore: fix flaky captured_output ( #15234 )
2022-07-18 13:20:15 -04:00