Commit graph

930 commits

Author SHA1 Message Date
David Sherret 0bfa0cc027
fix(test/regression): handle CLI arg directory using ../ in path (#22244)
Closes #22239
2024-02-03 00:02:12 +00:00
Bartek Iwańczuk aba91490d6
fix(publish): use lighter crate for opening browser (#22224)
Alternative to https://github.com/denoland/deno/pull/22223 which
switches `webbrowser` crate to `open` (https://crates.io/crates/open)
which is lighterweight.
2024-02-01 16:25:56 +01:00
Divy Srivastava ca11536f3f
chore: forward v1.40.3 release commit to main (#22220)
This is the release commit being forwarded back to main for 1.40.3

Ref https://github.com/denoland/deno/pull/22219
2024-02-01 18:11:35 +09:00
David Sherret 4b7c6049ef
refactor: load bytes in deno_graph (#22212)
Upgrades deno_graph to 0.64 where deno_graph is now responsible for
turning bytes into a string. This is in preparation for Wasm modules.
2024-02-01 03:15:22 +00:00
Bartek Iwańczuk 163491f237
chore(publish): try to automatically open the web browser (#22208) 2024-01-31 22:38:57 +01:00
Leo Kettmeir b91ae88860
chore: update deno_doc (#22174) 2024-01-31 17:34:15 +00:00
Bartek Iwańczuk 9ed713153c
chore: forward v1.40.2 commit to main (#22133)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-01-26 18:59:16 +00:00
Bartek Iwańczuk d4153bb117
chore: forward v1.40.1 commit to main (#22107)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-01-25 16:24:11 +00:00
Luca Casonato 414320d46b
chore: update deno_graph (#22099) 2024-01-25 13:37:15 +00:00
denobot 9e575a2862
1.40.0 (#22096)
Bumped versions for 1.40.0

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-25 03:48:50 +01:00
Bartek Iwańczuk a4e64fb7da
chore: upgrade deno_lint to 0.55.0 (#22092) 2024-01-25 00:31:20 +01:00
Luca Casonato 176118a046
feat(publish): exclude and include (#22055) 2024-01-24 20:30:08 +00:00
Bartek Iwańczuk b66f5ed00e
feat: TC39 decorator proposal support (#22040)
This commit adds support for [TC39 Decorator
Proposal](https://github.com/tc39/proposal-decorators).

These decorators are only available in transpiled sources - ie.
non-JavaScript files (because of lack of support in V8).

This entails that "experimental TypeScript decorators" are not available
by default
and require to be configured, with a configuration like this:
```
{
  "compilerOptions": {
    "experimentalDecorators": true
  }
}
```


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

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-01-24 18:46:23 +05:30
Bartek Iwańczuk cc05dc142d
chore: make deno --help more colorful (#21962)
This commit adds coloring to "--help" flag.

Before:
https://github.com/denoland/deno/assets/13602871/23753f95-3289-45bc-8a1e-842d0ccd92df

After:
https://github.com/denoland/deno/assets/13602871/91b035cc-f199-4cf4-a77c-f65b290b5e19
2024-01-23 19:56:50 +01:00
Luca Casonato 137f1a0c68
feat(cli): improved diagnostics printing (#22049)
This initially uses the new diagnostic printer in `deno lint`,
`deno doc` and `deno publish`. In the limit we should also update
`deno check` to use this printer.
2024-01-23 16:37:43 +01:00
Bartek Iwańczuk e49973d96d
chore: update deno_ast and deno_graph (#22033)
This upgrade unblocks support for ES decorator proposal.

Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-01-23 11:25:44 +01:00
David Sherret 69d5f136ba
feat(lockfile): track JSR and npm dependencies in config file (#22004)
See overview in https://github.com/denoland/deno_lockfile/pull/13
2024-01-22 22:31:12 +01:00
Nayeem Rahman bc92f87298
fix(runtime): only discard extension sources if a snapshot is provided (#22023)
Fixes #21928.

We have a code path which empties the extension sources because they're
expected to be pre-executed in the snapshot. Instead of using
conditional compilation for that, we now just check if a snapshot was
provided.

Removes the `dont_use_runtime_snapshot` feature. We didn't allow not
providing a snapshot unless this feature was provided, now we always do.

Adds the `only_snapshotted_js_sources` feature for us to use in CLI.
This asserts that a snapshot is provided and gates the runtime
transpilation code so it isn't included in the executable.
2024-01-22 12:37:25 +00:00
Bartek Iwańczuk 568337f3f4
fix: remove conditional unstable type-checking from other commands (#21991)
It appears I missed this in https://github.com/denoland/deno/pull/21825.
2024-01-21 22:47:46 +00:00
David Sherret fbfeedb68b
fix(lsp): improved npm specifier to import map entry mapping (#22016)
Upgrades to the latest deno_semver
2024-01-21 17:19:10 -05:00
David Sherret 35c1652f56
fix(lsp): regression - formatting was broken on windows (#21972)
~~Waiting on: https://github.com/denoland/deno_config/pull/31~~

Closes #21971
Closes https://github.com/denoland/vscode_deno/issues/1029
2024-01-18 15:57:30 -05:00
Leo Kettmeir 7662b05623
chore: update deno_doc (#21969) 2024-01-17 14:54:00 +01:00
Bartek Iwańczuk b142c81721
chore: upgrade clap to 4.4.17 (#21956) 2024-01-16 13:45:11 +01:00
David Sherret 4e72ca313a
refactor: use globbing from deno_config (#21925) 2024-01-15 19:15:39 -05:00
denobot 248fb9c946
chore: forward v1.39.4 release commit to main (#21933)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-01-13 20:32:50 -05:00
Bartek Iwańczuk 288774c5ed
chore: forward v1.39.3 to main (#21915)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-01-12 19:13:18 +00:00
Divy Srivastava 9268df5f34
fix(web): use rustyline for prompt (#21893)
Workaround until https://github.com/kkawakam/rustyline/pull/759
2024-01-11 22:05:55 +01:00
David Sherret 686141163f
fix(fast_check): analyze identifiers in type assertions/as exprs (#21899)
Closes #21894
2024-01-11 11:55:26 -05:00
David Sherret 70ac06138c
feat(unstable): fast subset type checking of JSR dependencies (#21873) 2024-01-10 22:40:30 +00:00
Bartek Iwańczuk d4893eb51a
refactor: remove snapshotting from deno_runtime (#21794)
Closes https://github.com/denoland/deno/issues/21137
2024-01-10 16:30:50 +01:00
Bartek Iwańczuk 69959aa01f
fix: update deno_lint and swc (#21718)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-01-09 23:20:52 +00:00
Bartek Iwańczuk aadcd64065
chore: forward v1.39.2 release commit to main (#21793) 2024-01-04 23:52:17 +00:00
Divy Srivastava b21462355a
Revert "fix(runtime): Make native modal keyboard interaction consistent with browsers" (#21739)
Reverts denoland/deno#18453

Fixes https://github.com/denoland/deno/issues/21602
https://github.com/denoland/deno/issues/21631
https://github.com/denoland/deno/issues/21641

Reasons for revert:
- alert() and confirm() swallowed ^C with raw mode.
- prompt() did not re-raise the interrupt signal from rustyline. 
- Default 'Y' on confirm() is a bad default and breaking change.

cc @lionel-rowe
2024-01-02 09:36:05 +05:30
David Sherret 7e72f3af61
chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
Leo Kettmeir 4de9ddcf21
chore: update deno_doc to 0.85.0 (#21678) 2023-12-30 00:04:50 +00:00
Bartek Iwańczuk c2414db1f6
refactor: simplify hyper, http, h2 deps (#21715)
Main change is that:
- "hyper" has been renamed to "hyper_v014" to signal that it's legacy
- "hyper1" has been renamed to "hyper" and should be the default
2023-12-27 11:59:57 -05:00
Bartek Iwańczuk 33acd437f5
refactor: finish test_util server cleanup, simplify dependencies (#21714)
Closes https://github.com/denoland/deno/issues/21578
2023-12-27 14:38:44 +01:00
Bartek Iwańczuk 8fbac67395
refactor: change cli/ to use hyper 1.1 (#21705) 2023-12-26 14:32:21 +01:00
Bartek Iwańczuk 760af934d9
chore: forward v1.39.1 commit to main (#21667) (#21671)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2023-12-21 18:43:52 +00:00
denobot 04ba8df711
1.39.0 (#21560)
Bumped versions for 1.39.0

Please ensure:
- [x] Target branch is correct (`vX.XX` if a patch release, `main` if
minor)
- [x] Crate versions are bumped correctly
- [x] deno_std version is incremented in the code (see
`cli/deno_std.rs`)
- [x] Releases.md is updated correctly (think relevancy and remove
reverts)

To make edits to this PR:
```shell
git fetch upstream release_1_39.0 && git checkout -b release_1_39.0 upstream/release_1_39.0
```

cc @mmastrac

---------

Co-authored-by: mmastrac <mmastrac@users.noreply.github.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-12-13 13:24:13 -07:00
lionel-rowe 346d812709
fix(runtime): Make native modal keyboard interaction consistent with browsers (#18453)
Fixes https://github.com/denoland/deno/issues/18223.
Fixes https://github.com/denoland/deno/issues/21477

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-12-13 11:31:12 +01:00
David Sherret a272bc1bd0
fix: ignore more paths in dynamic arg module search (#21539)
Upgrades deno_doc for https://github.com/denoland/deno_graph/pull/344
2023-12-11 10:46:24 -07:00
David Sherret 6bdf2388da
fix(doc): ambient namespaces should have members as exports (#21483) 2023-12-11 14:09:52 +01:00
David Sherret 890780a9e9
feat(unstable): ability to resolve specifiers with no extension, specifiers for a directory, and TS files from JS extensions (#21464)
Adds an `--unstable-sloppy-imports` flag which supports the
following for `file:` specifiers:

* Allows writing `./mod` in a specifier to do extension probing.
- ex. `import { Example } from "./example"` instead of `import { Example
} from "./example.ts"`
* Allows writing `./routes` to do directory extension probing for files
like `./routes/index.ts`
* Allows writing `./mod.js` for *mod.ts* files.

This functionality is **NOT RECOMMENDED** for general use with Deno:

1. It's not as optimal for perf:
https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-2/
1. It makes tooling in the ecosystem more complex in order to have to
understand this.
1. The "Deno way" is to be explicit about what you're doing. It's better
in the long run.
1. It doesn't work if published to the Deno registry because doing stuff
like extension probing with remote specifiers would be incredibly slow.

This is instead only recommended to help with migrating existing
projects to Deno. For example, it's very useful for getting CJS projects
written with import/export declaration working in Deno without modifying
module specifiers and for supporting TS ESM projects written with
`./mod.js` specifiers.

This feature will output warnings to guide the user towards correcting
their specifiers. Additionally, quick fixes are provided in the LSP to
update these specifiers:
2023-12-07 00:03:18 +00:00
David Sherret 7fdc3c8f1f
fix(compile/npm): ignore symlinks to non-existent paths in node_modules directory (#21479)
Part of https://github.com/denoland/deno/issues/21476
2023-12-06 16:25:24 -05:00
Bartek Iwańczuk 07f78912d6
chore: update rustyline to 13.0.0 (#21481)
Prerequisite for https://github.com/denoland/deno/pull/18453.

This update also makes it possible to address
https://github.com/denoland/deno/issues/8049 by
using
https://docs.rs/rustyline/latest/rustyline/struct.Editor.html#method.create_external_printer
2023-12-06 21:56:40 +01:00
Bartek Iwańczuk bd7a6bb016
chore: forward v1.38.5 release commit to main (#21472)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
2023-12-06 00:53:16 +00:00
Bartek Iwańczuk f6b889b432
refactor: snapshotting of runtime/ and cli/ (#21430)
This commit removes some of the technical debt related 
to snapshotting JS code:
- "cli/ops/mod.rs" and "cli/build.rs" no longer define "cli" extension
which was not required anymore
- Cargo features for "deno_runtime" crate have been unified in
"cli/Cargo.toml"
- "cli/build.rs" uses "deno_runtime::snapshot::create_runtime_snapshot"
API
instead of copy-pasting the code
- "cli/js/99_main.js" was completely removed as it's not necessary
anymore

Towards https://github.com/denoland/deno/issues/21137
2023-12-02 23:40:27 +00:00
David Sherret a1d823e27d
feat(compile): support discovering modules for more dynamic arguments (#21381)
This PR causes Deno to include more files in the graph based on how a
template literal looks that's provided to a dynamic import:

```ts
const file = await import(`./dir/${expr}`);
```

In this case, it will search the `dir` directory and descendant
directories for any .js/jsx/etc modules and include them in the graph.

To opt out of this behaviour, move the template literal to a separate
line:

```ts
const specifier = `./dir/${expr}`
const file = await import(specifier);
```
2023-12-01 20:12:10 +00:00
David Sherret d8e8497eb3
fix(fmt): remove trailing comma for single type param in default export in jsx (#21425) 2023-12-01 14:50:38 -05:00
Bartek Iwańczuk b69001bb49
chore: forward v1.38.4 release commit to main (#21400)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
2023-11-30 23:06:54 +01:00
Jakub Jirutka ae327d0a83
build(cli): allow to build without upgrade feature (#19910)
The self-upgrade feature is undesirable when deno is installed from
(Linux) distribution repository - using a system package manager. This
change will allow package maintainers to build deno with the "upgrade"
subcommand and background check disabled.

When the user runs `deno upgrade <args>` and the upgrade feature is
disabled, it will exit with error message explaining that this deno
binary was built without the upgrade feature.

Note: This patch is already used in the Alpine Linux’s
[deno](https://pkgs.alpinelinux.org/packages?name=deno) package.
2023-11-29 18:52:25 +00:00
David Sherret e52033f0f7
fix(fmt/jupyter): handle "source" property that's a string (#21361)
It was corrupting the file.
2023-11-27 23:15:50 +00:00
David Sherret 3c88654552
chore: temp fix for tools/format.js (#21360) 2023-11-27 22:51:00 +00:00
scarf 2b7e145e56
feat(fmt): support formatting code blocks in Jupyter notebooks (#21310) 2023-11-27 10:32:12 -05:00
David Sherret c99de0493a
chore: bump jsonc-parser and dprint-core dependencies (#21330)
This is to reduce duplicate dependencies for
https://github.com/denoland/deno/pull/21310
2023-11-24 12:54:58 -05:00
denobot 2941dd7da8
chore: forward v1.38.3 release commit to main (#21320) 2023-11-24 07:09:15 +01:00
Bartek Iwańczuk 585cf2de89
feat(unstable): tar up directory with deno.json (#21228)
Co-authored-by: David Sherret <dsherret@gmail.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-11-23 23:38:07 +00:00
David Sherret 6f22d2424a
fix(task): use exit code 127 for command not found and parse escaped parens (#21316) 2023-11-23 21:13:08 +00:00
David Sherret 0f2cbcf6a9
fix(fmt): maintain parens for jsx in member expr (#21280)
Fix in
0b44991bb9

Closes https://github.com/denoland/deno/issues/21279
2023-11-20 23:38:06 +00:00
Bartek Iwańczuk 611e71cf3b
chore: update deno_doc to 0.73.3 (#21262)
Removes some unnecessary dependencies.
2023-11-20 14:25:13 +01:00
denobot 21e6a76519
chore: forward v1.38.2 release commit to main (#21236)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-11-17 17:57:25 +09:00
Bartek Iwańczuk 9534e6e113
feat(unstable): Workspaces support (#20410)
This commit adds unstable workspace support. This is extremely
bare-bones and
minimal first-pass at this.

With this change `deno.json` supports specifying `workspaces` key, that
accepts a list of subdirectories. Each workspace can have its own import
map. It's required to specify a `"name"` and `"version"` properties in the
configuration file for the workspace:

```jsonc
// deno.json
{
  "workspaces": [
     "a",
     "b"
  },
  "imports": {
    "express": "npm:express@5"
   }
}
```
``` jsonc
// a/deno.json
{
  "name": "a",
  "version": "1.0.2",
  "imports": {
    "kleur": "npm:kleur"
  }
}
```
```jsonc
// b/deno.json
{
  "name": "b",
  "version": "0.51.0",
  "imports": {
    "chalk": "npm:chalk"
  }
}
```

`--unstable-workspaces` flag is required to use this feature:
```
$ deno run --unstable-workspaces mod.ts
```

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2023-11-17 01:28:38 +00:00
David Sherret 544923afdc
fix(doc): issue discovering re-exports of re-exports sometimes (#21223) 2023-11-16 17:34:56 -05:00
Matt Mastracci 56e76242f3
chore(ext/node): use libz-sys w/zlib-ng feature in node (#21158)
We only want one zlib dependency.

Zlib dependencies are reorganized so they use a hidden
`__vendored_zlib_ng` flag in cli that enables zlib-ng for both libz-sys
(used by ext/node) and flate2 (used by deno_web).
2023-11-11 07:20:12 -07:00
David Sherret b78c7130e9
fix: improve deno doc --lint error messages (#21156)
This also updates deno_graph, which has the JSR change to use "exports".
It's not yet useful atm, so I've made this PR a fix about the deno doc
--lint error message improvements. I'll do a follow-up PR that adds
exports to the deno.json
2023-11-10 18:40:39 +00:00
denobot 1ece7dfd90
chore: forward v1.38.1 release commit to main (#21144)
This is the release commit being forwarded back to main for 1.38.1

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-11-10 18:51:34 +05:30
Matt Mastracci 76fbe85264
chore: finish indexmap1 removal from deno (#21060)
We still pull the dep in from a few other places, but we can let those
get fixed over time.
2023-11-02 16:55:37 -06:00
denobot 41877a0b37
1.38.0 (#21051)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-02 01:01:47 +00:00
David Sherret 58d543a480
fix(repl): jsxImportSource was not working (#21049)
I made some fixes in deno_ast to make this possible and we forgot to
update this.
2023-11-01 23:04:54 +00:00
Bartek Iwańczuk 587f2e0800
feat: precompile JSX (#20962)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-01 20:30:23 +00:00
Matt Mastracci 658f958fb8
chore(cli): bump zeromq dep (#21045)
Reduces the number of crates we need to build pretty significantly
(approx 20).
2023-11-01 20:20:50 +00:00
Asher Gomez f8f4e77632
feat(unstable): deno run --env (#20300)
This change adds the `--env=[FILE]` flag to the `run`, `compile`,
`eval`, `install` and `repl` subcommands. Environment variables set in
the CLI overwrite those defined in the `.env` file.
2023-11-01 15:21:13 +00:00
David Sherret f1df22ce0a
feat(doc): improve non-exported diagnostic (#21033)
This will now catch way more scenarios.
2023-11-01 13:54:44 +01:00
David Sherret 092555c611
refactor: update to deno_doc 0.71 (#21023) 2023-10-31 09:19:43 +05:30
Divy Srivastava 857e0841c0
chore: bump quick-junit to 0.3.5 (#21004)
Towards #20996
2023-10-28 15:10:17 +02:00
David Sherret daf9756127
feat(task): add head command (#20998)
Adds a built-in `head` command to deno task:

https://github.com/denoland/deno_task_shell/pull/93
2023-10-27 23:15:00 -04:00
Divy Srivastava 4c6b986f17
chore(ext/crypto): upgrade to ring 0.17 (#20824)
Ref https://github.com/denoland/deno/issues/18071
2023-10-27 23:15:09 +02:00
David Sherret 9ec18c35c7
feat(doc): display non-exported types referenced in exported types (#20990)
Upgrades to deno_doc 0.70 which includes the feature for showing
non-exported types referenced in exported types as well as a much more
advanced deno doc that uses a symbol graph.
2023-10-26 21:27:50 -04:00
David Sherret 59a5fe530f
refactor: upgrade to deno_ast 0.31 and deno_graph 0.59 (#20965) 2023-10-24 21:43:19 +00:00
David Sherret 8f065a60e7
fix: improved using declaration support (#20959)
Upgrades to deno_ast 0.30.
2023-10-24 09:37:02 -04:00
Yoshiya Hinosawa fb73eb1e9d
feat(unstable): allow bare specifier for builtin node module (#20728)
closes #20566
2023-10-20 13:02:08 +09:00
denobot 5da1bd802c
chore: forward v1.37.2 release commit to main (#20897)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-13 03:12:06 +00:00
David Sherret 93e07fa118
fix: upgrade dprint-plugin-markdown 0.16.2 and typescript 0.88.1 (#20879)
Markdown:

* fix: hard break in list was incorrectly being converted to soft with
hard break
6678390b27

TypeScript:

* fix: multi-line string indent was broken in some cases
(https://github.com/dprint/dprint-plugin-typescript/pull/566)
* feat: add parens around unary expressions in in/instanceof
(https://github.com/dprint/dprint-plugin-typescript/pull/564)
2023-10-11 05:48:03 +00:00
David Sherret 54fcf539c8
fix(npm): upgrade to deno_npm 0.15.2 (#20772)
* fix: handle optional deps not found in dependencies map
(https://github.com/denoland/deno_npm/pull/38)
* fix: resolve a version requirement to the latest dist tag if it
matches (https://github.com/denoland/deno_npm/pull/37)

Closes #20771
2023-10-03 17:35:47 +00:00
Nayeem Rahman 2d1af0cf51
feat(lsp): jupyter notebook analysis (#20719) 2023-09-29 20:44:59 +01:00
David Sherret d43e48c4e9
refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)
This is required from BYONM (bring your own node_modules).

Part of #18967
2023-09-28 22:43:45 +02:00
denobot 3b78981ffe
chore: forward v1.37.1 release commit to main (#20706)
This is the release commit being forwarded back to main for 1.37.1

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-09-27 09:13:48 +00:00
denobot 997aa604df
1.37.0 (#20574)
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-09-19 20:29:17 +00:00
David Sherret 3de9af4d0b
fix(npm): properly handle legacy shasum of package (#20557)
Closes #20554
2023-09-18 16:40:41 -04:00
David Sherret 0709c051f8
feat(unstable): package manager (#20517)
Adds an experimental unstable built-in package manager to Deno, but it is
currently not usable because the registry infrastructure hasn't been
setup and it points to a non-existent url by default. The default
registry url can be configured via the `DENO_REGISTRY_URL` environment
variable.
2023-09-18 10:46:44 -04:00
Bartek Iwańczuk bf07604113
feat: Add "deno jupyter" subcommand (#20337)
This commit adds "deno jupyter" subcommand which
provides a Deno kernel for Jupyter notebooks.

The implementation is mostly based on Deno's REPL and
reuses large parts of it (though there's some clean up that
needs to happen in follow up PRs). Not all functionality of
Jupyter kernel is implemented and some message type
are still not implemented (eg. "inspect_request") but
the kernel is fully working and provides all the capatibilities
that the Deno REPL has; including TypeScript transpilation
and npm packages support.

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

---------

Co-authored-by: Adam Powers <apowers@ato.ms>
Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-09-16 02:42:09 +02:00
David Sherret 54890ee98b
chore(tests): ability to pattern match unordered lines (#20488)
This adds the ability to pattern match unordered lines. For example, the
downloading messages may appear in any order

```
[UNORDERED_START]
Download https://localhost:4546/a.ts
Download https://localhost:4546/b.ts
[UNORDERED_END]
Hello!
```

Additionally, I've made the pattern matching slightly more strict and the output better.
2023-09-14 16:21:57 +00:00
Matt Mastracci 950e0e9cd6
fix(ext/http): create a graceful shutdown API (#20387)
This PR implements a graceful shutdown API for Deno.serve, allowing all
current connections to drain from the server before shutting down, while
preventing new connections from being started or new transactions on
existing connections from being created.

We split the cancellation handle into two parts: a listener handle, and
a connection handle. A graceful shutdown cancels the listener only,
while allowing the connections to drain. The connection handle aborts
all futures. If the listener handle is cancelled, we put the connections
into graceful shutdown mode, which disables keep-alive on http/1.1 and
uses http/2 mechanisms for http/2 connections.

In addition, we now guarantee that all connections are complete or
cancelled, and all resources are cleaned up when the server `finished`
promise resolves -- we use a Rust-side server refcount for this.

Performance impact: does not appear to affect basic serving performance
by more than 1% (~126k -> ~125k)

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-12 00:06:38 +00:00
Nayeem Rahman f75a17521d
fix(lsp): respect configured exclusions for testing APIs (#20427)
LSP testing APIs now obey the various file inclusion settings:
- Modules shown in the text explorer now respect the `exclude`,
`test.exclude` and `test.include` fields in `deno.json`, as well as
`deno.enablePaths` in VSCode settings.
- Modules with testing code lens now respect the `"exclude"`,
`test.exclude` and `test.include` fields in `deno.json`. Code lens
already respects `deno.enablePaths`.
2023-09-09 19:37:01 +01:00
Matt Mastracci 947865c054
feat(cli): allow --log-level=trace for additional deep debugging (#20426)
This allows us to opt in to extremely detailed tracing from dependency
libraries, like so:

```
cargo run --features tracing/log,tracing/max_level_trace -- test --log-level=trace -A --unstable ./cli/tests/unit/serve_test.ts 
```

It will not impact normal operation as it requires the
`tracing/max_level_trace` and `tracing/log` to be active.

Note that tracing is already a dependency -- this just makes it a direct
dep of cli so we can access its features more easily.
2023-09-09 12:03:19 -06:00
David Sherret c521c5fe77
feat: lockfile v3 (#20424)
Details: https://github.com/denoland/deno_lockfile/pull/8
2023-09-08 14:34:57 -04:00
David Sherret 1b7d5937d9
fix(fmt/markdown): improve ignore comment handling (#20421)
Two bug fixes:

* https://github.com/dprint/dprint-plugin-markdown/pull/85
* https://github.com/dprint/dprint-plugin-markdown/pull/84
2023-09-08 16:38:42 +00:00
Nayeem Rahman 17276a1df9
fix: empty include in config file excludes all (#20404) 2023-09-08 15:04:45 +01:00
David Sherret 3fc19dab47
feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00