1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
Commit graph

11769 commits

Author SHA1 Message Date
losfair
2d770b85f8 fix: cache negative package.json lookups 2024-08-14 23:52:19 +08:00
David Sherret
68f03a7ebf cherry-pick deno#24983 2024-08-14 22:46:15 +08:00
Heyang Zhou
b8f24ad5f1
feat(cli/cache): add DENO_EMIT_CACHE_BEHAVIOR (#7) 2024-08-13 01:19:33 +08:00
Bert Belder
dfbebad91e
feat(runtime): send console output to OpenTelemetry collector (#3) 2024-08-09 15:00:56 -07:00
Heyang Zhou
9e2fac050f
feat: prioritize DENO_SERVE_ADDRESS over Deno.serve options (#6) 2024-08-09 02:18:21 +08:00
Bert Belder
f14ae37686
fix(ext/http): preserve authority and scheme from absolute URLs (#4) 2024-08-06 13:55:59 -07:00
Heyang Zhou
2f179e4dfd
feat: load multiple eszips (#1) 2024-07-27 00:01:31 +08:00
losfair
deb67c9102 feat: eszip loading 2024-07-18 00:46:34 +08:00
losfair
82c97d3fd4 feat(serve): env var DENO_SERVE_ADDRESS for configuring default listen address 2024-07-17 23:46:27 +08:00
David Sherret
f4b9d85862
fix(workspace): support resolving bare specifiers to npm pkgs within a workspace (#24611)
This makes bare specifiers for npm packages work when inside a
workspace, which emulates the same behaviour as when there's a
node_modules directory. The bare specifier can be overwritten by
specifying an import map entry or package.json dependency entry.

* https://github.com/denoland/deno_config/pull/88

Closes #24605
2024-07-17 09:13:22 -04:00
Divy Srivastava
078def0ff8
perf(ext/node): optimize fs.exists[Sync] (#24613)
Use `access` on *nix and `GetFileAttributesW` on Windows.

[Benchmark](https://paste.divy.work/p/-gq8Ark.js):
```
$ deno run -A bench.mjs # main (568dd)
existsSync: 8980.636629ms

$ target/release/deno run -A bench.mjs # this PR
existsSync: 6448.7604519999995ms

$ bun bench.mjs
existsSync: 6562.88671ms

$ node bench.mjs
existsSync: 7740.064653ms
```

Ref https://github.com/denoland/deno/pull/24434#discussion_r1679777912
2024-07-17 18:05:51 +05:30
David Sherret
568dd132fb
refactor(node): internally add .code() to node resolution errors (#24610)
This makes it easier to tell what kind of error something is (even for
deeply nested errors) and will help in the future once we add error
codes to the JS errors this returns.
2024-07-16 18:32:41 -04:00
Nathan Whitaker
c9da27e147
fix(cli): Create child node_modules for conflicting dependency versions, respect aliases in package.json (#24609)
Fixes #24419.
2024-07-16 20:30:28 +00:00
Satya Rohith
6421dc33ed
fix(ext/node): http request uploads of subarray of buffer should work (#24603)
Closes https://github.com/denoland/deno/issues/24571
2024-07-16 14:16:40 +02:00
Nathan Whitaker
04f9db5b22
fix(node): Fix --allow-scripts with no deno.json (#24533)
We would resolve the wrong package.json, resulting in an inability to
run CJS (or other node-mode) scripts
2024-07-15 12:11:09 -07:00
David Sherret
29186d7e59
fix(workspace): do not resolve to self for npm pkg depending on matching req (#24591)
Closes #24584
2024-07-15 15:08:51 -04:00
snek
70a9631696
chore: upgrade dependencies (#24565)
rustls + hyper + deno_core
2024-07-15 09:56:51 -07:00
Rano | Ranadeep
702f7ee89c
fix(std/http2): release window capacity back to remote stream (#24576)
This PR adds logic to release window capacity after reading the chunks
from the stream. Without it, large response (more than `u16::MAX`) may
fill up the capacity and the whole response can't be read.

Closes https://github.com/denoland/deno/issues/24552
Closes https://github.com/denoland/deno/issues/24305
2024-07-15 17:10:59 +05:30
Igor Borisoglebski
9128cc9850
fix(docs): fix some deno.land/manual broken urls (#24557)
Fixing some broken urls found after the docs migration
2024-07-15 11:08:45 +00:00
David Sherret
8754a01d43
fix(init): use bare specifier for jsr:@std/assert (#24581)
Closes #24580
2024-07-14 13:22:43 -04:00
Ryan Dahl
e0cfc9da39
Revert "refactor(fetch): reimplement fetch with hyper instead of reqwest (#24237)" (#24574)
This reverts commit f6fd6619e7.

I'm seeing a difference between canary and 1.45.2. In
`deno-docs/reference_gen` I can't download dax when running `deno task
types`

```
~/src/deno-docs/reference_gen# deno upgrade --canary
Looking up latest canary version
Found latest version f6fd6619e7
Downloading https://dl.deno.land/canary/f6fd6619e708a515831f707438368d81b0c9aa56/deno-aarch64-apple-darwin.zip
Deno is upgrading to version f6fd6619e7
Archive:  /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmpb5lDnq/deno.zip
  inflating: deno
Upgraded successfully

~/src/deno-docs/reference_gen# deno -v
deno 1.45.2+f6fd661

~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno

~/src/deno-docs/reference_gen# deno task types
Task types deno task types:deno && deno task types:node
Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts
error: JSR package manifest for '@david/dax' failed to load. expected value at line 1 column 1
    at file:///Users/ry/src/deno-docs/reference_gen/deno-docs.ts:2:15

~/src/deno-docs/reference_gen# deno upgrade --version 1.45.2
Downloading https://github.com/denoland/deno/releases/download/v1.45.2/deno-aarch64-apple-darwin.zip
Deno is upgrading to version 1.45.2
Archive:  /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmp3R7uhF/deno.zip
  inflating: deno
Upgraded successfully

~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno

~/src/deno-docs/reference_gen# deno task types
Task types deno task types:deno && deno task types:node
Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts
Task types:node deno run --allow-read --allow-write=. --allow-env --allow-sys node-docs.ts
```
2024-07-13 21:08:23 +00:00
Sean McArthur
f6fd6619e7
refactor(fetch): reimplement fetch with hyper instead of reqwest (#24237)
This commit re-implements `ext/fetch` and all dependent crates
using `hyper` and `hyper-util`, instead of `reqwest`.

The reasoning is that we want to have greater control and access
to low level `hyper` APIs when implementing `fetch` API as well
as `node:http` module.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-13 00:51:37 +02:00
David Sherret
2fca4f11fe
chore: include current versions more in release checklist (#24562) 2024-07-12 18:44:55 -04:00
denobot
3a48bc695f
chore: forward v1.45.2 release commit to main (#24564)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-07-12 18:05:45 -04:00
David Sherret
8243c85a47
fix(publish): show dirty files on dirty check failure (#24541) 2024-07-12 15:35:57 -04:00
David Sherret
9510a8b7d1
fix(config): regression - should not discover npm workspace for nested deno.json not in workspace (#24559)
Closes #24554
2024-07-12 15:33:30 -04:00
vwh
1711158984
fix(cli/init): broken link in deno init sample template (#24545)
This commit fixes the broken link in the sample template provided by the
deno init command.
2024-07-12 15:04:27 -04:00
David Sherret
1c41db76ac
fix: include already seen deps in lockfile dep tracking (#24556)
Tests in https://github.com/denoland/deno_graph/pull/504

Closes #24536
2024-07-12 14:48:03 -04:00
David Sherret
8ee14bd56a
refactor: move importMap with imports/scopes diagnostic to deno_config (#24553) 2024-07-12 12:48:53 -04:00
Satya Rohith
8cbf81cf08
fix(ext/node): handle prefix mapping for IPv4-mapped IPv6 addresses (#24546)
Ensure that the prefix is properly adjusted when dealing with IPv4
addresses mapped to IPv6. This fixes inconsistencies in network
range calculations for mapped addresses.

Closes https://github.com/denoland/deno/issues/24525
2024-07-12 14:25:17 +05:30
Satya Rohith
fee4d3a762
perf(ext/crypto): make randomUUID() 5x faster (#24510) 2024-07-12 10:50:32 +05:30
chirsz
01c074d195
fix(ext/webgpu): GPUDevice.createRenderPipelineAsync should return a Promise (#24349)
Fixes #24317
2024-07-12 09:53:52 +05:30
snek
7ab25dd89e
fix: unblock fsevents native module (#24542)
node-api is fully supported now.

Signed-off-by: snek <snek@deno.com>
2024-07-11 19:15:05 -07:00
denobot
0be4c8947d
chore: forward v1.45.1 release commit to main (#24540)
This is the release commit being forwarded back to main for 1.45.1

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-07-12 01:14:14 +02:00
David Sherret
77f771b69c
fix(npm): use start directory deno.json as "root deno.json config" in npm workspace (#24538) 2024-07-11 21:07:31 +00:00
David Sherret
1200f69082
fix(node): revert invalid package target change (#24539)
Reason is that `e` may contain an invalid package target nested deeply
in the returned errors. We should probably add a `.code()` to all errors
to make matching easier or make the errors flatter.
2024-07-11 16:32:52 -04:00
Nathan Whitaker
3d0e1b65b1
fix(node): Ignore broken default install scripts (#24534)
NPM inserts a default install script when a package has a `binding.gyp`
file.

It's possible, however, for the package to exclude the `binding.gyp`
file when they publish, and in this case the install script will never
succeed for a user of the package.

This happens with `fsevents`, for instance. They don't include the
`binding.gyp` file in their published tarball, but the default install
script appears in the manifest served by `npm`.

This causes us to warn that `fsevents` has an install script, but when
you try to run it it fails due to `binding.gyp` not existing.
2024-07-11 18:39:45 +00:00
David Sherret
ba63740e7f
chore: @netlify/edge-bundler workaround until Deno 2.0 (#24532)
Hack for a few months until Deno 2.0. See code for details
2024-07-11 17:43:46 +00:00
Bartek Iwańczuk
4f15aada02
fix(workspace): allow using --import-map flag with workspace (#24527)
This is a temporary fix, which is not perfect - specifying
`--import-map`
will break resolution of packages defined in `workspace` setting, but
erroring on `--import-map` currently causes regression in code that
worked fine in v1.44.x.
2024-07-11 16:43:28 +00:00
David Sherret
f950f59983
fix(npm): only warn about lifecycle scripts not being run when setting up directory (#24530)
Closes #24518
2024-07-11 16:41:42 +00:00
Marvin Hagemeister
de30f7c188
chore: add std import mapping for tests (#24521)
This makes the LSP understand `@std/` imports in our tests.
2024-07-11 10:03:29 +02:00
David Sherret
a5f8bfdbfb
chore: format yaml internally (#24520)
Uses https://github.com/g-plane/pretty_yaml
2024-07-10 23:59:57 -04:00
Bartek Iwańczuk
e8057bc102
build: update wgpu-core to unblock release (#24515)
`wgpu-core` version 0.20 was yanked and it caused failure to
publish `deno_webgpu`. I bumped and published locally to
unblock the release.
2024-07-11 02:03:08 +02:00
denobot
04ff5c731d
1.45.0 (#24512)
Bumped versions for 1.45.0

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-11 00:08:02 +02:00
Leo Kettmeir
28f9485c25
chore: update deno_doc (#24509) 2024-07-10 22:46:46 +02:00
David Sherret
ad8d265e29
chore: fix flaky publish::npm_workspace test (#24511) 2024-07-10 20:44:37 +00:00
David Sherret
a49d0bd10b
fix(check): CJS types importing dual ESM/CJS package should prefer CJS types (#24492)
Closes #16370
2024-07-10 14:46:25 -04:00
David Sherret
4d2d764816
feat(jsr): support publishing jsr packages in npm workspaces (#24507)
Supports publishing an npm workspace with a directory structure similar
to the following:

- workspace
  - package.json
  - package-a
    - package.json
    - jsr.json
  - package-b
    - package.json
    - jsr.json

deno_config PR: https://github.com/denoland/deno_config/pull/77

Closes https://github.com/denoland/deno/issues/23638
2024-07-10 14:46:09 -04:00
Nathan Whitaker
69afa8718f
chore: tweak warning message for un-run install scripts (#24508)
Previously when we printed out the packages that skipped install
scripts, we didn't prefix them with `npm:`. When you pass
`--allow-scripts` though, we require `npm:`, which means you can't just
copy paste the package name from the warning message.
2024-07-10 18:03:41 +00:00
Marvin Hagemeister
26288cf2a9
fix(node/perf_hooks): stub eventLoopUtilization (#24501)
This PR stubs `perf_hooks.eventLoopUtilization` to make the tests of
[hapi](https://github.com/hapijs/hapi) start. Previously, they'd all
error because of this function throwing a not implemented error. This
brings down the test failures in their suite from 982 to 68 failures.
2024-07-10 19:47:45 +02:00