This commit fixes `deno task` by checking if the provided
task name actually has a wildcard char ("*").
Previously, if the "--recursive" flag was passed, the task name
was treated as a regex, which lead to a situation where exact task
name resulted in a regex that matched all tasks with the specific
prefix.
This commit fixes it, by checking if the provided task name, is an exact
name, or is it a wildcard match.
Closes https://github.com/denoland/deno/issues/27370
Closes https://github.com/denoland/deno/issues/27401
Closes https://github.com/denoland/deno/issues/27408
Fixes #27038.
Previously, for NPM packages the latest version was the version with the
"latest" tag. For JSR packages, the latest version was the greatest
version that matched a `*` version requirement. Unfortunately, that
doesn't work well with pre-release versions.
This PR changes it so that the latest version is always > the currently
requested version.
For NPM: if "latest" tag > current then "latest" tag; otherwise the
greatest version that is >= current
For JSR: greatest version >= current
This is the most reasonable behavior I could come up with. For example,
```
versions:
2.0.0-beta.2
2.0.0-beta.1
1.0.0 => "latest" tag
with a version req `^2.0.0-beta.1`
previously:
"Update" column => 2.0.0-beta.2
"Latest" column => 1.0.0
now:
"Update" column => 2.0.0-beta.2
"Latest" column => 2.0.0-beta.2
```
Working on loading plugin configuration for
https://github.com/denoland/deno/pull/27203
I encountered a lot of complexity, so did some drive-by cleanups to make
it easier to grok the code and have fewer duplicate names.
Merging as a fix so that LTS gets this as it's a useful diagnostic tool.
The 1MB unique is because we deduplicate files that we store (ex. some
packages have the same file multiple times so we store that once).
I ended up changing the file system implementation to determine
its root directory as the last step of building it instead of being the
first step which makes it much more reliable.
split up otel config into user configurable and runtime configurable
parts. user configurable part is now set via env vars parsed according
to the otel spec. otel is now enabled via `OTEL_DENO=true`, and
`--unstable-otel` only acts as a guard.
Fixes: https://github.com/denoland/deno/issues/27273
Currently deno eagerly caches all npm packages in the workspace's npm
resolution. So, for instance, running a file `foo.ts` that imports
`npm:chalk` will also install all dependencies listed in `package.json`
and all `npm` dependencies listed in the lockfile.
This PR refactors things to give more control over when and what npm
packages are automatically cached while building the module graph.
After this PR, by default the current behavior is unchanged _except_ for
`deno install --entrypoint`, which will only cache npm packages used by
the given entrypoint. For the other subcommands, this behavior can be
enabled with `--unstable-npm-lazy-caching`
Fixes #25782.
---------
Signed-off-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit provides schema files for lint rules and lint tags
in this repo instead of pulling them from `deno_lint` repository.
A unit test was added to ensure all available rules are listed
in the schema file. A unit test for tags can be done once
https://github.com/denoland/deno/pull/27162 lands.
This commit changes "deno outdated" subcommand to
error out if run in a directory that has no config file
(including parent directories). This matches
"pnpm" behavior.
Also added tests for filtering that yields no results,
to ensure that it exists cleanly, that also matches "pnpm"
behavior.
Closes https://github.com/denoland/deno/issues/27287
---------
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Fixes https://github.com/denoland/deno/issues/27289
We exported these but forgot to add them to the list of builtins used by
the resolver, so we weren't resolving bare imports of some modules (e.g.
`"_http_common"`)
Also adds a missing export of `HTTPParser` from `_http_common`
This was doing an allocation for reparsing the specifier. Might as well
do `.join` here and it means I can extract out this file fetcher code to
deno_cache_dir more easily.
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
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.
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>
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
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>