1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-18 13:22:55 -05:00
Commit graph

6964 commits

Author SHA1 Message Date
Nathan Whitaker
e718e3f471
fix(outdated): allow --latest without --update (#27227)
Ref #27025.

it does nothing (it's the default behavior) but it doesn't hurt to allow
it
2024-12-04 18:32:48 +00:00
David Sherret
f0586238fc
fix(task): kill descendants when killing task process on Windows (#27163) 2024-12-04 12:19:06 -05:00
David Sherret
f863a623c9
fix: improve auto-imports for npm packages (#27224)
Improves auto-imports when using `"nodeModulesDir": "auto"`
2024-12-04 12:05:34 -05:00
Marvin Hagemeister
120b3811eb
fix(task): don't panic with filter on missing task argument (#27180)
We were panicing when running `deno task --filter foo` without a task
argument.

Fixes https://github.com/denoland/deno/issues/27177
2024-12-04 13:06:09 +01:00
David Sherret
8cd257de3d
refactor: remove CliNpmRegistryApi (#27222)
Extracts more code out of the CLI.
2024-12-03 19:44:56 -05:00
Marvin Hagemeister
d5b63bb642
fix(task): only pass args to root task (#27213)
When we run `deno task` with args like `deno task foo arg` the argument
should only be passed to the root task, not to its dependencies.

Fixes https://github.com/denoland/deno/issues/27206
2024-12-03 16:35:46 +01:00
David Sherret
c1dcf1b618
refactor: add deno_npm_cache crate (#27200)
Extracting out more code from the CLI for reuse elsewhere (still more
work to do, but this is a start).

This is the code for extracting npm tarballs and saving information in
the npm cache in the global deno_dir.
2024-12-03 02:10:16 +00:00
Bartek Iwańczuk
53936eda11
fix(fmt): stable formatting of HTML files with JS (#27164)
Closes https://github.com/denoland/deno/issues/26407
Closes https://github.com/denoland/deno/issues/26763
Closes https://github.com/denoland/deno/issues/26560
Closes https://github.com/denoland/deno/issues/26744
Closes https://github.com/denoland/deno/issues/27030
2024-12-03 02:04:55 +01:00
Bartek Iwańczuk
76571fd5a5
chore: upgrade deno_lint to 0.68.2 (#27197) 2024-12-02 21:53:00 +00:00
David Sherret
6dd2d5e49e
refactor: upgrade to deno_npm 0.26 (#27194) 2024-12-02 16:00:31 +00:00
Bartek Iwańczuk
1d49b3cb0f
fix: support workspace:^ and workspace:~ version constraints (#27096)
This commit adds support for understanding "workpace:^"
and "workspace:~" version constraints in npm/pnpm workspaces.

This is done by upgrading various crates to their latest versions.

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

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-30 00:54:26 +01:00
David Sherret
f6248601f4
fix(task): forward signals to spawned sub-processes on unix (#27141)
Closes https://github.com/denoland/deno/issues/18445
2024-11-29 17:36:43 -05:00
Marvin Hagemeister
3553aa9132
fix(publish): error on missing name field (#27131)
This PR improves the error output on publish when the `name` filed is
missing:

```json
{
  "exports": "./mod.ts",
  "version": "0.0.1"
}
```

Before:

```sh
deno publish --dry-run
error: You did not specify an entrypoint in file:///Users/marvinh/dev/test/deno-pkg-timers/deno.json. Add `exports` mapping in the configuration file, eg:
{
  "name": "@scope/name",
  "version": "0.0.0",
  "exports": "<path_to_entrypoint>"
}
```

After:

```sh
deno publish --dry-run
error: Missing 'name' field in 'file:///Users/marvinh/dev/test/deno-pkg-timers/deno.json'.
```

Fixes https://github.com/denoland/deno/issues/27116
2024-11-28 18:11:36 +01:00
denobot
12aea2014a
chore: forward v2.1.2 release commit to main (#27136)
This is the release commit being forwarded back to main for 2.1.2

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-28 17:00:24 +00:00
Marvin Hagemeister
026bbc4a9e
fix(init): support scoped npm packages (#27128)
The naming scheme for create npm packages varies depending on whether
they are scoped or not. We only supported unscoped packages prior to
this PR. This PR adds support for all the following cases which npm
supports:

- `foo` -> `create-foo`
- `@foo/bar` -> `@foo/create-bar`
- `@foo` -> `@foo/create`
- `@foo@2.0.0` -> `@foo/create@2.0.0`
- `@foo/bar@2.0.0` -> `@foo/create-bar@2.0.0`

See https://docs.npmjs.com/cli/v8/commands/npm-init#description

Fixes https://github.com/denoland/deno/issues/27127
2024-11-28 15:07:32 +01:00
Luca Casonato
32e260d55a
fix: support bun specifiers in JSR publish (#24588)
Fixes https://github.com/denoland/deno/issues/26989

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-11-28 14:51:24 +01:00
David Sherret
f161adf19e
perf(compile): read embedded files as static references when UTF-8 and reading as strings (#27033) 2024-11-27 21:28:41 -05:00
Nathan Whitaker
76daa03aa9
fix(info): resolve bare specifier pointing to workspace member (#27020)
Fixes https://github.com/denoland/deno/issues/26721

Previously, we were applying only the import map, which would result in
`@scope/foo` expanding to (e.g.) `jsr:@scope/foo@1.0.0`. Since that
didn't exist it would error and fail to resolve.
2024-11-27 13:54:26 -08:00
Bartek Iwańczuk
93adf37bdf
fix(task): strip ansi codes and control chars when printing tasks (#27100) 2024-11-27 15:54:15 +00:00
David Sherret
2bbfef137c
feat(unstable): repurpose --unstable-detect-cjs to attempt loading more modules as cjs (#27094)
This resurrects the `--unstable-detect-cjs` flag (which became stable),
and repurposes it to attempt loading .js/.jsx/.ts/.tsx files as CJS in
the following additional scenarios:

1. There is no package.json
1. There is a package.json without a "type" field

Also cleans up the implementation of this in the LSP a lot by hanging
`resolution_mode()` off `Document` (didn't think about doing that until
now).
2024-11-27 09:50:38 -05:00
Leo Kettmeir
7400181ecb
fix(tools/doc): HTML resolve main entrypoint from config file (#27103)
Fixes #26901
2024-11-27 02:15:15 -08:00
Bartek Iwańczuk
4700f12ddc
fix(task): handle carriage return in task description (#27099)
Ref https://github.com/denoland/deno/pull/27069#discussion_r1857702814
2024-11-27 01:12:47 +00:00
Nathan Whitaker
a750314e04
fix(install): don't re-set up node_modules if running lifecycle script (#26984)
Fixes https://github.com/denoland/deno/issues/26904

If using `nodeModulesDir: "auto"`, it's possible for the lifecycle
script subprocess to try to set up the node_modules dir (despite the
fact that we're already doing that). If it does that, it hangs trying to
acquire the file lock on the node_modules dir.

As a fix, don't try to set up node_modules if we're running as part of a
lifecycle script.

Ideally we'd have better control over when we do and don't set up
node_modules automatically (that's the underlying problem behind #25782
as well)
2024-11-26 15:29:46 -08:00
Kenta Moriuchi
4330ef553f
fix(streams): reject string in ReadableStream.from type (#25116)
WebIDL `async iterable<T>` type rejects `string`

Ref https://github.com/whatwg/webidl/pull/1397, #24623
2024-11-26 19:42:54 +00:00
David Sherret
115a306656
fix(node): correct resolution of dynamic import of esm from cjs (#27071)
Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution.

Also adds fixes (adds) support for `"resolution-mode"` in TypeScript.
2024-11-26 14:38:24 -05:00
Ian Bull
3a55b67815
chore(compile): prefer denort binary in target/ directory when available (#27052)
Enhances the deno compile workflow for denort development by
automatically checking for a denort binary in the same directory as the
deno binary, provided both are located within a target/ directory. If
found, this denort binary will be used.
    
Key points:

- The DENORT_BIN environment variable remains supported for explicitly
specifying a custom denort binary path.
- Includes additional logic to verify if the deno binary is a symlink
pointing to an executable in the target/ directory.

---------

Signed-off-by: Ian Bull <irbull@gmail.com>
2024-11-26 09:23:09 -05:00
hongmengning
584631d281
docs(cli): remove redundant word in comment (#27055) 2024-11-26 21:07:40 +09:00
snek
e61cf8d7d6
refactor(unstable): move telemetry to own ext (#27067)
Move telemetry to its own ext to clean up some code and resolve circular
deps.
2024-11-26 11:22:18 +00:00
Nayeem Rahman
114fe9bf3e
fix(lsp): support task object notation for tasks request (#27076) 2024-11-26 05:57:51 +00:00
Bartek Iwańczuk
d4fe3311a6
fix(task): handle multiline descriptions properly (#27069)
Closes https://github.com/denoland/deno/issues/27049
2024-11-25 22:02:39 -05:00
David Sherret
2b26444584
fix(check): support jsdoc @import tag (#26991)
* https://github.com/denoland/deno_graph/pull/544

Closes https://github.com/denoland/deno/issues/25516
2024-11-25 18:57:05 -05:00
David Sherret
02b480b171
fix(compile): do not error embedding same symlink via multiple methods (#27015)
Closes https://github.com/denoland/deno/issues/27012
2024-11-25 17:08:06 -05:00
Bartek Iwańczuk
08a56763d4
chore: upgrade sqlformat-rs to non-forked version (#27063) 2024-11-25 15:18:39 +00:00
Bartek Iwańczuk
15f14630ff
fix(init): always force managed node modules (#27047)
Closes https://github.com/denoland/deno/issues/27045
2024-11-25 15:42:34 +01:00
David Sherret
4365f8d999
fix(compile): handle TypeScript file included as asset (#27032)
Closes #27024
2024-11-25 09:37:48 -05:00
Nayeem Rahman
12b377247b
fix(lsp): wasm file import completions (#27018) 2024-11-23 01:26:30 +00:00
João Baptista
9eee2a0e9e
fix(fmt): return None if sql fmt result is the same (#27014)
Similar with https://github.com/denoland/deno/pull/25848, we need to
make `format_sql` to return `None` so we do not flag well formatted sql
files as being wrong.

Signed-off-by: m4rc3l05 <15786310+M4RC3L05@users.noreply.github.com>
2024-11-22 22:57:33 +00:00
Nayeem Rahman
5462b5828d
fix(lsp): remove stray debug output (#27010) 2024-11-22 17:35:10 -05:00
David Sherret
4ded7519e9
fix(compile): correct buffered reading of assets and files (#27008)
Closes #27006
2024-11-22 19:26:38 +00:00
David Sherret
45fad6a622
chore(compile): log code cache file path (#26977)
Ref #26976
2024-11-21 18:16:40 -05:00
Caleb Cox
a19b3f44d4
fix(cli): remove extraneous comma in task --eval help (#26985) 2024-11-21 20:24:54 +00:00
denobot
8a5609ad73
chore: forward v2.1.1 release commit to main (#26981)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-11-21 14:35:32 -05:00
Bhuwan Pandit
a875a3785b
docs(cli/add): add clarification to add command (#26968)
Signed-off-by: Bhuwan Pandit <bhuwanpandit109@gmail.com>
2024-11-21 17:27:00 +00:00
David Sherret
6ee8efc5b4
fix(install/global): do not error if path is an npm pkg and relative file (#26975)
Closes https://github.com/denoland/deno/issues/26969
2024-11-21 17:00:10 +00:00
Bartek Iwańczuk
566a6c2ce7
fix(task): update --filter flag description (#26974)
`--recursive` is now implied by `--filter`.
2024-11-21 16:56:46 +00:00
Bartek Iwańczuk
bfa9230d3b
fix(watch): don't panic if there's no path provided (#26972)
Closes https://github.com/denoland/deno/issues/26970
2024-11-21 16:29:40 +00:00
Cornelius Krassow
3f3568bd95
fix(cli): Fix typo in doc subcommand help output (#26321) 2024-11-21 07:54:20 -08:00
David Sherret
e515ed23e8
fix(task): ensure root config always looks up dependencies in root (#26959)
We were accidentally looking up dependencies in the member.
2024-11-21 09:43:51 -05:00
denobot
3da4eca7c1
2.1.0 (#26957)
Bumped versions for 2.1.0

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-11-21 03:05:02 +01:00
David Sherret
be10901dfc
docs: fix casing of Wasm (#26954) 2024-11-21 01:02:58 +00:00