1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
Commit graph

12767 commits

Author SHA1 Message Date
Leo Kettmeir
be5419d479
fix: add link to env var docs (#25557) 2024-09-10 13:09:06 +00:00
Leo Kettmeir
c2f97494f7
refactor: move WebGPU, FFI and FS typings from unstable to stable (#25488)
Closes #25377
2024-09-10 05:04:59 -07:00
Bartek Iwańczuk
9a169e3cf1
test: remove usage of --unstable flag (#25549)
This commit removes all occurrences of `--unstable` flag
from all the tests that are run in CI.

Turns out none of the tests actually required that flag
anymore.
2024-09-10 11:28:59 +00:00
HasanAlrimawi
3f6afd1947
fix: update malva in deno to support astro css comments (#25553)
This PR addresses issue #25534 

**Code Changes**
- Updated malva version to the latest in cli/Cargo.toml.
- Updated LanguageOptions to match new Malva config.
- Added test case same as the issue to assure changes success.
2024-09-10 12:54:43 +02:00
Divy Srivastava
c4d088863e
fix(inspector): Fix panic when re-entering runtime ops (#25537)
Mark `op_require_break_on_next_statement` as reentrant and properly
release borrow on the `OpState`. This fixes `BorrowMut` assertions when
running with inspector + op metrics.

Fixes https://github.com/denoland/deno/issues/25515
2024-09-10 08:14:26 +05:30
Bartek Iwańczuk
4af98fa82f
build: remove --unstable flags from CI (#25548)
This commit removes usages of deprecated `--unstable` flag
from the CI scripts.
2024-09-10 03:10:20 +02:00
Bartek Iwańczuk
41ba7cdade
bench: fix CI (#25547)
Fixes bench failures on `main` branch.
2024-09-10 00:19:49 +00:00
Asher Gomez
a445ebd74f
BREAKING(fs): remove Deno.fsync[Sync]() (#25448)
Towards #22079

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-09 22:39:56 +00:00
Bartek Iwańczuk
064a73f7a0
BREAKING: Remove --unstable flag (#25522)
This commit effectively removes the --unstable flag.

It's still being parsed, but it only prints a warning that a granular
flag should be used instead and doesn't actually enable any
unstable feature.

Closes https://github.com/denoland/deno/issues/25485
Closes https://github.com/denoland/deno/issues/23237
2024-09-09 23:44:29 +02:00
David Sherret
560ad0331b
fix(node/byonm): do not accidentally resolve bare node built-ins (#25543)
This was accidentally enabled in byonm, but it requires the
`--unstable-bare-node-builtins` flag.

Closes #25358
2024-09-09 21:35:41 +00:00
Asher Gomez
aadcf3346c
BREAKING(io): remove Deno.{Reader,Writer}[Sync] and Deno.Closer (#25524) 2024-09-10 07:07:12 +10:00
Bartek Iwańczuk
04a9cc95ac
feat: Add better error messages for unstable APIs (#25519)
This commit improves error messages for unstable APIs:
- `--unstable-broadcast-channel`
- `--unstable-cron`
- `--unstable-http`
- `--unstable-kv`
- `--unstable-temporal`

By providing information and hints what went wrong and how the
error can be fixed. It reuses the same infra that was added in 
https://github.com/denoland/deno/pull/21764.
2024-09-09 22:51:55 +02:00
Kenta Moriuchi
d9b5bccdea
fix: Float16Array type (#25506) 2024-09-09 22:47:33 +02:00
David Sherret
72f025c743
fix: remove recently added deno.json node_modules aliasing (#25542)
This was initially added in #25399 in order to make transitioning over
from package.json to deno.json more easy, but it causes some problems
that are shown in the issue and it also means that the output of `deno
install` would have different resolution than `npm install`. Overall, I
think it's too much complexity to be smarter about this and it's
probably best to not do it. If someone needs an aliased folder then they
should keep using a package.json

Closes #25538
2024-09-09 20:19:29 +00:00
David Sherret
1e0ac609b5
BREAKING: remove deprecated files config (#25535)
The long form "files" config has been flattened into the parent.

Old:

```json
{
  "test": {
    "files": {
      "include": ["**/*.ts"],
      "exclude": ["ignore.ts"]
    }
  }
}
```

New:

```json
{
  "test": {
    "include": ["**/*.ts"],
    "exclude": ["ignore.ts"]
  }
}
```

This was deprecated some time ago, but we're removing it now in Deno
2.0.

Closes #25415
2024-09-09 16:33:09 +00:00
Pig Fang
3daab54612
fix(fmt): fix tabs in YAML (#25536)
Fixes #25176
2024-09-09 15:45:17 +00:00
Mohammad Sulaiman
582be0adc2
chore: Deprecate worker itests (#25514) 2024-09-09 11:07:41 -04:00
Satya Rohith
5126ccb842
fix(ext/node): Stream should be instance of EventEmitter (#25527)
Closes https://github.com/denoland/deno/issues/25526
2024-09-09 15:06:56 +02:00
Divy Srivastava
ea8bf0945a
fix(ext/node): report freemem() on Linux in bytes (#25511) 2024-09-09 17:03:17 +05:30
Asher Gomez
39f2704bd7
BREAKING(fs): remove Deno.fdatasync[Sync]() (#25520) 2024-09-09 21:09:57 +10:00
Yoshiya Hinosawa
ce1d668929
fix(ext/node): delay accept() call 2 ticks in net.Server#listen (#25481)
A workaround for the issue #25480

`Deno.Listener` can't be closed synchronously after `accept()` is
called. This PR delays the `accept` call 2 ticks (The listener callback
is called 1 tick later. So the 1 tick delay is not enough), and makes
`net.Server` capable of being closed synchronously.

This unblocks `npm:detect-port` and `npm:portfinder`

closes #18301 
closes #25175
2024-09-08 12:22:18 +09:00
Bartek Iwańczuk
30687c786c
feat: Update no-window lint rule (#25486)
Closes https://github.com/denoland/deno/issues/25323
2024-09-07 09:35:27 +00:00
Nathan Whitaker
98e8e2f8bc
feat(add/install): Flag to add dev dependency to package.json (#25495)
```
deno install --dev npm:chalk
```
Adds to `devDependencies` if a `package.json` is present, otherwise it
just adds to `imports` in `deno.json`
2024-09-07 02:22:27 -07:00
Asher Gomez
a9ed06b832
BREAKING(net): remove Deno.{Conn,TlsConn,TcpConn,UnixConn}.prototype.rid (#25446)
Towards #22079

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-06 23:01:36 +00:00
Asher Gomez
5bac4075c3
chore: soft-remove Deno.{stdin,stderr,stdout}.rid (#25479)
Towards #22079
2024-09-07 08:37:35 +10:00
Nathan Whitaker
292344af42
fix(install): Make sure target node_modules exists when symlinking (#25494)
Fixes https://github.com/denoland/deno/issues/25493
2024-09-06 19:08:56 +00:00
Nathan Whitaker
51f5f5789b
feat(add): Add npm packages to package.json if present (#25477)
Closes https://github.com/denoland/deno/issues/25321

Ended up being a larger refactoring, since we're now juggling
(potentially) two config files in the same `add`, instead of choosing
one. I don't love the shape of the code, but I think it's good enough

Some smaller side improvements:
- `deno remove` supports `jsonc`
- `deno install --dev` will be a really simple change
- if `deno remove` removes the last import/dependency in the
`imports`/`dependencies`/`devDependencies` field, it removes the field
instead of leaving an empty object
2024-09-06 17:18:13 +00:00
Kenta Moriuchi
f0a3d20642
fix(runtime): use more null proto objects again (#25040)
proceed with #23921

This PR is a preparation for
https://github.com/denoland/deno_lint/pull/1307

---------

Signed-off-by: Kenta Moriuchi <moriken@kimamass.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-09-06 12:52:59 +02:00
Kenta Moriuchi
8ef08f1d29
feat(lsp): turn on useUnknownInCatchVariables (#25474) 2024-09-06 12:23:59 +02:00
Leo Kettmeir
56363e4f4e
fix(jupyter): allow unstable flags (#25483)
Closes #25463
2024-09-06 10:11:59 +00:00
Bartek Iwańczuk
5dedb49ac4
refactor(permissions): remove FromStr implementations, add ::parse methods (#25473)
The `.parse()` calls in permission code are only making it more
confusing, verbosity
is encouraged and welcome in this code even at the cost of not being
concise.

Left a couple TODOs to not use `AnyError`.
2024-09-06 11:28:53 +02:00
Marvin Hagemeister
73ab32c551
fix: invalid ipv6 hostname on deno serve (#25482)
This PR fixes an invalid URL being printed when running `deno serve`

Before: invalid URL

```sh
$ deno serve --host localhost
deno serve: Listening on http://::1:8000/
```

After: valid URL

```sh
$ deno serve --host localhost
deno serve: Listening on http://[::1]:8000/
```
2024-09-06 09:22:52 +00:00
Asher Gomez
dcf155516b
BREAKING(fs): disallow new Deno.FsFile() (#25478)
Towards #22079
2024-09-06 18:28:42 +10:00
Asher Gomez
d8f3123c36
BREAKING(buffer): remove Deno.Buffer (#25441)
Towards #22079

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-06 18:28:05 +10:00
Asher Gomez
7937ae3f2f
chore(net): soft-remove Deno.serveHttp() (#25451)
Towards #22079

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-06 08:15:00 +10:00
Bartek Iwańczuk
6919f33216
2.0.0-rc.1 (#25467) 2024-09-05 18:34:42 +02:00
David Sherret
c678550a17
BREAKING: remove "emit" and "map" from deno info output (#25468)
The map field has been empty for years now and we don't want the emit
file to be exposed so it allows us to iterate on making the cache
faster. Additionally, it's racy/unreliable to rely on this information.
Instead, people should emit the TS files themselves using tools like
deno_emit, typescript, esbuild, etc.

Closes https://github.com/denoland/deno/issues/17703
2024-09-05 14:22:13 +00:00
David Sherret
15fce5b290
feat(check): turn on useUnknownInCatchVariables (#25465)
Part of #25162

Closes #11826
2024-09-05 15:22:31 +02:00
Leo Kettmeir
b54347c448
feat(flags): allow double commas to escape values in path based flags (#25453)
Fixes https://github.com/denoland/deno/issues/6553
Fixes https://github.com/denoland/deno/issues/9535
2024-09-05 06:14:43 -07:00
Bartek Iwańczuk
794d347ec6
fix: add suggestion how to fix importing CJS module (#21764)
```
$ cat exports_error.js
Object.defineProperty(exports, "__esModule", { value: true });

$ deno exports_error.js
error: Uncaught (in promise) ReferenceError: exports is not defined
Object.defineProperty(exports, "__esModule", { value: true });
                      ^
    at file:///exports_error.js:1:23

    info: Deno doesn't support CommonJS modules without `.cjs` extension.
    hint: Rewrite this module to ESM or change the file extension to `.cjs`.
```
2024-09-05 12:49:07 +00:00
Yoshiya Hinosawa
dda6328745
fix(ext/node): stub process.cpuUsage() (#25462)
closes #23401
2024-09-05 21:21:29 +09:00
Bartek Iwańczuk
5319b85f14
feat(uninstall): alias to 'deno remove' if -g flag missing (#25461)
Close https://github.com/denoland/deno/issues/25457
2024-09-05 13:51:37 +02:00
Asher Gomez
7d95c5c062
BREAKING(fs): remove Deno.funlock[Sync]() (#25442)
Towards #22079

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-05 11:23:37 +00:00
Asher Gomez
c73b4a0877
BREAKING(fs): remove Deno.seek[Sync]() (#25449)
Towards #22079
2024-09-05 20:37:28 +10:00
Yoshiya Hinosawa
b01578ae1f
chore(tests): reduce the use of --unstable flag in test util (#25443) 2024-09-05 18:34:12 +09:00
Bartek Iwańczuk
5dc907df87
fix: update hint for deno add <package> (#25455)
Follow up to https://github.com/denoland/deno/pull/25430
2024-09-05 11:08:22 +02:00
Kamil Ogórek
2c4d99a458
feat: include version number in all --json based outputs (#25335)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-05 08:51:40 +00:00
Mohammad Sulaiman
49340b96f6
chore: deprecate doc itests (#25452) 2024-09-05 08:09:09 +00:00
Bartek Iwańczuk
dfc5eec43c
feat: Allow importing .cjs files (#25426)
This commit adds support for executing top-level `.cjs` files, 
as well as import `.cjs` files from within npm packages.

This works only for `.cjs` files, the contents of sibling `package.json`
are not consulted for the `"type"` field.

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

---------

Signed-off-by: David Sherret <dsherret@users.noreply.github.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-09-05 07:59:12 +00:00
Marvin Hagemeister
4554ab6aef
fix(config): validate export names (#25436)
The property names of the `exports` field in `deno.json` was never
validated. The `patternProperties` only validates values, whose property
name matches the regex. It doesn't validate the property names
themselves. That's what `propertyNames` is for.

Related https://github.com/denoland/deno/issues/25435
2024-09-05 09:50:04 +02:00