David Sherret
c0e3b6ed9d
fix(publish): always include config file when publishing ( #23797 )
...
Closes https://github.com/denoland/deno/issues/23796
2024-05-14 18:15:43 +00:00
David Sherret
432792a46c
chore: 045_proxy output stdout & stderr on failure ( #23810 )
...
Part of https://github.com/denoland/deno/issues/23624
2024-05-14 16:47:57 +00:00
David Sherret
c6189e2070
fix(publish): error for missing version constraints on dry-publish instead of just publish ( #23798 )
...
Closes https://github.com/denoland/deno/issues/22835
2024-05-14 10:30:09 -04:00
David Sherret
f2dc3f9a94
chore(task): various small refactorings ( #23793 )
2024-05-13 22:55:14 +00:00
Matt Mastracci
adc7b3de26
fix(runtime): Allow opening /dev/fd/XXX for unix ( #23743 )
...
`deno run script.ts <(some command)` is a valid use case -- let's allow
this to work without `--allow-all`.
Fixes #23703
2024-05-10 11:21:36 -06:00
David Sherret
a9708037c9
fix(node): better cjs re-export handling ( #23760 )
...
Closes #23458
2024-05-10 09:55:20 -04:00
David Sherret
263b6b971d
fix(task): regression where npx <command>
sometimes couldn't find command ( #23730 )
...
Closes https://github.com/denoland/deno/issues/23724
2024-05-09 03:16:44 +00:00
Matt Mastracci
9f7f681e26
fix(runtime): allow nul device on windows ( #23741 )
...
Fixes [23721](https://github.com/denoland/deno/issues/23721 )
2024-05-08 14:39:06 -06:00
Bartek Iwańczuk
4e23a5b1fc
FUTURE: deno install
changes ( #23498 )
...
This PR implements the changes we plan to make to `deno install` in deno
2.0.
- `deno install` without arguments caches dependencies from
`package.json` / `deno.json` and sets up the `node_modules` folder
- `deno install <pkg>` adds the package to the config file (either
`package.json` or `deno.json`), i.e. it aliases `deno add`
- `deno add` can also add deps to `package.json` (this is gated behind
`DENO_FUTURE` due to uncertainty around handling projects with both
`deno.json` and `package.json`)
- `deno install -g <bin>` installs a package as a globally available
binary (the same as `deno install <bin>` in 1.0)
---------
Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-05-08 12:34:46 -07:00
David Sherret
5379bb0289
fix(jsr): panic when importing jsr package with deps via https ( #23728 )
...
Closes #23644
2024-05-07 21:53:17 +00:00
David Sherret
998036b399
chore: fix flaky net_listen_allow_localhost_4555 ( #23726 )
...
Moves the test npm registry server port from `4558` to `426x`
2024-05-07 17:21:56 +00:00
Luca Casonato
f3cc760f2f
fix(runtime): allow r/w access to /etc without --allow-all ( #23718 )
...
This is not a special path that can be used to escalate or bypass Deno
permissions, such as `--allow-env`.
2024-05-07 14:51:42 +02:00
David Sherret
1587387bcc
chore(test): move npm registries to separate servers and to the tests/registry
folder ( #23717 )
...
1. Moves the npm registries to their own dedicated ports.
2. Moves the data files out of `tests/testdata/npm/registry` to
`tests/registry/npm`.
2024-05-07 01:06:01 +00:00
David Sherret
2dcbef2abb
fix(compile): relative permissions should be retained as relative ( #23719 )
...
Closes #23715
2024-05-06 19:21:58 -04:00
Satya Rohith
02d0ff58d2
refactor(tests): move worker_threads itests to spec tests ( #23648 )
2024-05-03 05:52:47 +00:00
David Sherret
3e98ea4e69
chore(tests/specs): ability to have sub tests in file ( #23667 )
...
Allows writing named sub-tests. These are:
1. Filterable on the command line via `cargo test ...`
2. Run in parallel
3. Use a fresh temp and deno dir for each test (unlike steps)
2024-05-03 10:19:42 +05:30
David Sherret
b7945a218e
chore: move cert itests to spec tests ( #23607 )
2024-05-03 00:43:12 +00:00
Bartek Iwańczuk
cf0579c7d4
test: npm registry handles two test scopes ( #23663 )
...
This commit updates our testing npm registry to handle
additional `@denotest2` scope in addition to `@denotest`
scope. I might have to update it further in the future to handle
additional scopes, but it's good enough for now.
2024-05-03 00:00:38 +00:00
Leo Kettmeir
1b27b58396
fix(test): proper type checking for files with doc tests ( #23654 )
...
Closes https://github.com/denoland/deno/issues/23430
---------
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-05-02 18:13:51 +00:00
Matt Mastracci
505130d813
chore(cli): add permission test ( #23633 )
2024-05-01 13:17:05 -06:00
David Sherret
56bf634fa9
fix(node): require.resolve - fallback to global cache when bare specifier from paths not found ( #23618 )
...
Part of #22607 (probably closes it, but I haven't done thorough testing)
Makes it so that `require.resolve` with `paths` specified will fallback
to using the global cache when the paths can't be found when using a
global cache (not when using a node_modules folder)
2024-04-30 23:41:29 -04:00
David Sherret
f2216c90a7
chore: fix flaky module graph cache tests ( #23623 )
2024-05-01 01:36:52 +00:00
Luca Casonato
6cdf81db7c
feat(cli): add support for jsxImportSourceTypes ( #23419 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-04-30 18:12:35 +00:00
Kenta Moriuchi
783533d2e3
FUTURE: remove import assertions support for JavaScript ( #23541 )
...
Ref #17944 , https://github.com/swc-project/swc/issues/8893
TypeScript removes the `assert` keywords in the transpile, so this PR
only works for JavaScript files
2024-04-29 22:43:05 +02:00
David Sherret
4384a126bb
fix: handle specifying an import map in an ancestor dir of deno.json ( #23602 )
...
* https://github.com/denoland/deno_config/pull/51
Closes https://github.com/denoland/deno/issues/21440
2024-04-29 14:32:27 -04:00
David Sherret
48daf2dc88
chore: add tests for moduleGraph2 ( #23603 )
...
Also did some renames from underscores to hyphens
2024-04-29 14:09:58 -04:00
David Sherret
da52058a94
chore: migrate bench, publish, and more itests to spec tests ( #23584 )
2024-04-29 10:08:27 -04:00
Satya Rohith
b8444066ea
fix(ext/node): support NODE_DEBUG env ( #23583 )
2024-04-29 09:36:53 +00:00
Satya Rohith
455cf1743f
fix(ext/node): add support for MessagePort.removeListener/off ( #23598 )
...
Closes https://github.com/denoland/deno/issues/23564
2024-04-29 08:53:54 +00:00
David Sherret
651e3e9e6d
fix(compile): certain jsr specifiers sometimes can't load ( #23567 )
...
When returning a jsr specifier for resolve it seems like deno core does
not work properly and hangs.
Closes https://github.com/denoland/deno/issues/23551
Closes https://github.com/denoland/deno/issues/23139
2024-04-27 21:11:57 +00:00
Bartek Iwańczuk
115dedde22
fix: unref stdin read ( #23534 )
...
Closes https://github.com/denoland/deno_core/issues/648
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-04-25 05:32:01 +00:00
David Sherret
f3284529f1
feat(jsr): support importing from jsr via HTTPS specifiers (except for type checking) ( #23513 )
...
Closes https://github.com/jsr-io/jsr/issues/322
2024-04-24 21:43:34 +00:00
Matt Mastracci
2f8825a935
feat: Add deno serve
subcommand ( #23511 )
...
By default, `deno serve` will assign port 8000 (like `Deno.serve`).
Users may choose a different port using `--port`.
`deno serve /tmp/file.ts`
`server.ts`:
```ts
export default {
fetch(req) {
return new Response("hello world!\n");
},
};
```
2024-04-24 19:45:49 +00:00
David Sherret
ded6afccf2
fix(publish): --dry-publish should error for gitignored excluded files ( #23540 )
...
Files that were gitignored only were not included in the diagnostic.
2024-04-24 18:52:05 +00:00
Nathan Whitaker
8a367d3cc3
fix(cli): Don't panic on invalid emit options ( #23463 )
...
Fixes #23456 .
2024-04-23 08:50:50 -07:00
Bartek Iwańczuk
35220f0069
fix(workspace): provide workspace members as 'imports' in import map ( #23492 )
...
This commit changes the workspace support to provide all workspace
members to be available as imports based on their names and versions.
Closes https://github.com/denoland/deno/issues/23343
2024-04-23 17:21:06 +02:00
Asher Gomez
2f5a6a8514
FUTURE(ext/net): remove Deno.ConnectTlsOptions.(certFile|certChain|privateKey)
( #23270 )
...
Towards #23089
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-04-21 03:03:44 +00:00
Asher Gomez
98e2f6d50b
FUTURE(ext/net): remove Deno.ListenTlsOptions.(keyFile|certFile)
( #23271 )
...
Towards #23089
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-04-21 01:58:59 +00:00
David Sherret
695f314a91
feat(task): support running npm binary commands in deno.json ( #23478 )
...
npm binary commands like `vite` from a `node_modules/.bin` folder will
now execute when defined in a deno.json
Closes https://github.com/denoland/deno/issues/23477
2024-04-20 20:13:46 -04:00
David Sherret
db3b3fb665
chore: auto-complete for __spec__.jsonc file ( #23476 )
...
This makes writing these tests a little easier.
2024-04-20 22:47:10 +00:00
Asher Gomez
05b49a803f
FUTURE: remove Deno.customInspect
( #23453 )
2024-04-19 20:50:18 +10:00
David Sherret
c497e766f1
refactor: move redirect handling into deno_graph ( #23444 )
2024-04-19 01:43:28 +00:00
Asher Gomez
25a80bc523
test(publish): check specifiers outside fast check module graph ( #23369 )
...
Closes #23023
2024-04-17 23:46:33 +00:00
Matt Mastracci
9c0446567b
fix(cli): Identify and fix a test deadlock ( #23411 )
...
If a worker tried to flush large amounts of data right as the test was
ending, it could cause the flush sync marker to get lost.
2024-04-16 15:14:59 -06:00
David Sherret
43c8c1cc6e
feat(check): allow using side effect imports with unknown module kinds (ex. css modules) ( #23392 )
...
This allows people to use imports like:
```ts
import "./app.css";
```
...with `deno check` in systems where there's a bundle step (ex. Vite).
This will still error when using it with `deno run` or if the referenced
file does not exist.
See test cases for behaviour.
2024-04-16 16:46:31 -04:00
Bartek Iwańczuk
55c27cadc8
test: add test for running in V8 jitless mode ( #23054 )
...
Fixes https://github.com/denoland/deno/issues/22453
This is fixed due to upgrade of deno_core, just adding
a test here.
2024-04-15 23:47:01 +00:00
David Sherret
6f278e5c40
fix(lsp): improved cjs tracking ( #23374 )
...
Our cjs tracking was a bit broken. It was marking stuff as esm that was
actually cjs leading to type checking errors.
2024-04-15 17:50:52 -04:00
David Sherret
4e8d30fca1
chore(test): use file_test_runner for spec tests ( #23348 )
...
Extracted out this code to https://github.com/denoland/file_test_runner
and added parallelism. This makes these tests run 6 seconds faster on my
machine and allows re-using this code in other crates like deno_graph,
deno_doc, etc (ex. https://github.com/denoland/deno_graph/pull/437 ).
2024-04-12 17:58:40 -04:00
David Sherret
98077e4b3c
fix(publish): do not warn about excluded external modules in node_modules directory ( #23173 )
2024-04-11 23:52:35 +00:00
David Sherret
df73db671b
fix(npm): local nodeModulesDir was sometimes resolving duplicates of same package ( #23320 )
2024-04-11 13:18:19 -04:00