David Sherret
9956737941
refactor(lint): move reporters to separate module ( #24757 )
2024-07-27 09:01:42 -04:00
Kyle Kelley
63f8218a7d
fix: adapt to new jupyter runtime API and include session IDs ( #24762 )
...
Closes #24737 , #24437 .
2024-07-27 10:39:08 +02:00
denobot
ed2bf8ce31
chore: forward v1.45.4 release commit to main ( #24754 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-07-26 14:26:13 -04:00
David Sherret
bee16c54ab
fix(publish): workspace included license file had incorrect path ( #24747 )
...
Also fixes the issue where we say a package was successfully published
before it wasn't.
Bug in https://github.com/denoland/deno/pull/24714
2024-07-26 15:35:29 +00:00
Bartek Iwańczuk
7776636c2e
fix: support npm:bindings
and npm:callsites
packages ( #24727 )
...
Adds support for `npm:bindings` and `npm:callsites` packages because of
changes in
https://github.com/denoland/deno_core/pull/838 .
This `deno_core` bump causes us to stop prepending `file://` scheme for
locations
in stack traces that are for local files.
Fixes https://github.com/denoland/deno/issues/24462 , fixes
https://github.com/denoland/deno/issues/22671 , fixes
https://github.com/denoland/deno/issues/15717 , fixes
https://github.com/denoland/deno/issues/19130 , fixes
https://github.com/WiseLibs/better-sqlite3/issues/1205 , fixes
https://github.com/WiseLibs/better-sqlite3/issues/1034 , fixes
https://github.com/denoland/deno/issues/20936
---------
Co-authored-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
2024-07-26 09:08:15 +02:00
Asher Gomez
ef38aa9d9c
chore: fix bench task ( #24718 )
...
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/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.
-->
2024-07-25 23:53:52 +00:00
David Sherret
3bf147fe28
refactor: decouple node resolution from deno_core ( #24724 )
2024-07-25 19:08:14 -04:00
David Sherret
763f05e74d
fix(unstable): move sloppy-import warnings to lint rule ( #24710 )
...
Adds a new `no-sloppy-imports` lint rule and cleans up the lint code.
Closes #22844
Closes https://github.com/denoland/deno_lint/issues/1293
2024-07-25 09:07:59 -04:00
David Sherret
84b7504d0f
fix(workspaces/publish): include the license file from the workspace root if not in pkg ( #24714 )
2024-07-25 01:43:30 +00:00
Nathan Whitaker
795ed23b35
fix(future): Emit deno install
warning less often, suggest deno install
in error message ( #24706 )
...
Two small changes:
- In our BYONM errors, suggest running `deno install` instead of `npm
install` if `DENO_FUTURE` is set
- Only emit warning about `deno install` changes if you do `deno install
<foo>` with deno_future unset
2024-07-24 23:37:13 +00:00
Leo Kettmeir
b305ba3e1c
perf: update deno_doc ( #24700 )
...
Ref https://github.com/denoland/deno_doc/pull/616
2024-07-24 12:23:16 -07:00
HasanAlrimawi
fcd9bbe8ee
fix: update lsp error message of 'relative import path' to 'use deno add' for npm/jsr packages ( #24524 )
2024-07-24 16:12:42 +01:00
David Sherret
52ababc4bf
fix(node): better detection for when to surface node resolution errors ( #24653 )
2024-07-24 00:22:24 +00:00
Bartek Iwańczuk
445e05a39d
Reland "fix: CFunctionInfo and CTypeInfo leaks ( #24634 )" ( #24692 )
...
Reverted in
95847f4e94
.
2024-07-24 02:11:38 +02:00
David Sherret
9114a2df69
fix(upgrade): do not error if config in cwd invalid ( #24689 )
...
```
> deno upgrade
error: Unsupported lockfile version 'invalid'. Try upgrading Deno or recreating the lockfile.
V:\scratch
> V:\deno\target\debug\deno upgrade
Looking up latest version
Local deno version 1.45.3 is the most recent release
```
Closes #24517
Closes #20729
2024-07-23 19:00:48 -04:00
David Sherret
6055629ee7
refactor: update to use deno_package_json ( #24688 )
...
This is in preparation for extracting out node resolution code from
ext/node (which is something I'm going to do gradually over time).
Uses https://github.com/denoland/deno_package_json
2024-07-23 17:34:46 -04:00
HasanAlrimawi
f0df54fc70
fix: enable the reporting of parsing related problems when running deno lint ( #24332 )
2024-07-23 21:17:17 +00:00
Nayeem Rahman
a45a40533e
fix(lsp): rewrite import for 'infer return type' action ( #24685 )
2024-07-23 19:39:14 +01:00
denobot
9806064ac2
chore: forward v1.45.3 release commit to main ( #24681 )
...
This is the release commit being forwarded back to main for 1.45.3
---------
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-23 03:41:40 +02:00
Bartek Iwańczuk
8a7ed17ea2
Revert "fix(cli): add NAPI support in standalone mode ( #24642 )" ( #24682 )
...
This reverts commit 4e8f5875bc
.
Reverting because, it caused a failure during v1.45.3 publish:
https://github.com/denoland/deno/actions/runs/10048730693/job/27773718095
CC @Mutefish0
2024-07-23 02:42:26 +02:00
Bartek Iwańczuk
3f8efe5289
Revert "chore: move all node-api impl to ext ( #24662 )" ( #24680 )
...
This reverts commit d00fbd7025
.
Reverting because, it caused a failure during v1.45.3 publish:
https://github.com/denoland/deno/actions/runs/10048730693/job/27773718095
2024-07-23 00:01:31 +00:00
Kenta Moriuchi
715675565a
fix(types): Conform lib.deno_web.d.ts to lib.dom.d.ts and lib.webworker.d.ts ( #24599 )
...
Fix #24578
Fix #21981
2024-07-22 22:02:39 +02:00
David Sherret
6960637b5c
fix(publish): warn about missing license file ( #24677 )
...
Part of https://github.com/denoland/deno/issues/24676 , but just a
warning for now.
2024-07-22 15:46:37 -04:00
snek
92abdb7669
chore: move all node-api impl to ext ( #24662 )
...
these symbols are re-exported from runtime/cli using `build.rs`, so we
don't need them in the same crate.
2024-07-22 11:41:59 -07:00
David Sherret
a459b43d59
fix(npm): handle packages with only pre-released 0.0.0 versions ( #24563 )
...
* https://github.com/denoland/deno_semver/pull/26
Closes https://github.com/denoland/deno/issues/24550
2024-07-22 10:58:48 -04:00
Nayeem Rahman
5a696551b7
fix(lsp): scope attribution for asset documents ( #24663 )
2024-07-22 15:06:08 +01:00
Bartek Iwańczuk
95847f4e94
Revert "fix: CFunctionInfo and CTypeInfo leaks ( #24634 )" ( #24665 )
...
This reverts commit 6c5905dbc3
.
Reverting because of errors like this in CI:
```
#
# Fatal error in , line 0
# Check failed: FastApiCallNode::ArityForArgc(c_arg_count, slow_arg_count) == value_input_count.
#
#
#
#FailureMessage Object: 0x7fd5b3ffd9d0
==== C stack trace ===============================
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1111883) [0x55b8d2107883]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1110b6b) [0x55b8d2106b6b]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x110c6f9) [0x55b8d21026f9]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x20413cd) [0x55b8d30373cd]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x2034222) [0x55b8d302a222]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x202ff44) [0x55b8d3025f44]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1e0b253) [0x55b8d2e01253]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1dfcd96) [0x55b8d2df2d96]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1df92aa) [0x55b8d2def2aa]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1df8b71) [0x55b8d2deeb71]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x11ce49b) [0x55b8d21c449b]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x121fb23) [0x55b8d2215b23]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1221359) [0x55b8d2217359]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x1112f3b) [0x55b8d2108f3b]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x111792b) [0x55b8d210d92b]
/home/runner/work/deno/deno/target/release/deps/url_ops-e4068c650cedb9fa(+0x110df0f) [0x55b8d2103f0f]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3) [0x7fd5cb294ac3]
/lib/x86_64-linux-gnu/libc.so.6(+0x126850) [0x7fd5cb326850]
```
2024-07-22 14:58:58 +02:00
Ivancing
4e8f5875bc
fix(cli): add NAPI support in standalone mode ( #24642 )
...
Currently, importing Node-Addons modules in a standalone binary results
in a `missing symbol called` error
(https://github.com/denoland/deno/issues/24614 ). Because the NAPI
symbols are not exported in this mode. This PR should fix the issue.
2024-07-21 10:40:42 -07:00
Divy Srivastava
6c5905dbc3
fix: CFunctionInfo and CTypeInfo leaks ( #24634 )
...
Trying out the deno_core patch
Ref https://github.com/denoland/deno_core/pull/832
Closes https://github.com/denoland/deno/issues/24575
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-21 03:05:35 +02:00
David Sherret
5f6d84a281
fix(lsp): hang when caching failed ( #24651 )
...
Closes #24600
2024-07-19 21:22:54 -04:00
David Sherret
afcae364be
refactor: update to deno_config 0.25 ( #24645 )
...
- Gets rid of WorkspaceMemberContext. It's now `Workspace` and
`WorkspaceDirectory`
- Uses the workspace cache in the lsp
* https://github.com/denoland/deno_config/pull/95
* https://github.com/denoland/deno_config/pull/96
2024-07-19 15:56:07 -04:00
Nathan Whitaker
a4c76add56
fix(cli): Respect implied BYONM from DENO_FUTURE in deno task
( #24652 )
...
Regression from
04f9db5b22
Originally I thought to fix the issue in the PR we needed to explicitly
pass through the `node-modules-dir` flag, but after applying the correct
fix that david pointed out (setting `NPM_PROCESS_STATE`) that wasn't
necessary (or correct).
We had a test for deno task with BYONM, but it only tested with
`"unstable": ["byonm"]` in deno.json, so it didn't catch this.
2024-07-19 18:59:04 +00:00
David Sherret
f6c7c13764
fix(fmt): was sometimes putting comments in front of commas in parameter lists ( #24650 )
...
* https://github.com/dprint/dprint-plugin-typescript/pull/651
2024-07-19 15:58:21 +00:00
Marvin Hagemeister
ee2e693340
fix(node): support tty.hasColors()
and tty.getColorDepth()
( #24619 )
...
This PR adds support for
[`tty.WriteStream.prototype.hasColors()`](https://nodejs.org/api/tty.html#writestreamhascolorscount-env )
and
[`tty.WriteStream.prototype.getColorDepth()`](https://nodejs.org/api/tty.html#writestreamgetcolordepthenv ).
I couldn't find any usage on GitHub which passes parameters to it.
Therefore I've skipped adding support for the `env` parameter to keep
our snapshot size small.
Based on https://github.com/denoland/deno_terminal/pull/3
Fixes https://github.com/denoland/deno/issues/24616
2024-07-19 12:39:05 +02:00
David Sherret
3bda8eb4fe
fix(lsp): support npm workspaces and fix some resolution issues ( #24627 )
...
Makes the lsp use the same code as the rest of the cli.
2024-07-18 18:16:35 -04:00
David Sherret
ecd4f900c6
fix(publish): surface syntax errors when using --no-check ( #24620 )
2024-07-17 23:06:30 -04:00
Bartek Iwańczuk
7b33623b1d
Reland "refactor(fetch): reimplement fetch with hyper instead of reqwest" ( #24593 )
...
Originally landed in
f6fd6619e7
.
Reverted in https://github.com/denoland/deno/pull/24574 .
This reland contains a fix that sends "Accept: */*" header for calls made
from "FileFetcher". Absence of this header made downloading source code
from JSR broken. This is tested by ensuring this header is present in the
test server that servers JSR packages.
---------
Co-authored-by: Sean McArthur <sean@seanmonstar.com>
2024-07-18 01:37:31 +02: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
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
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
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
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