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

6582 commits

Author SHA1 Message Date
Asher Gomez
03d8e474d7
BREAKING(io): remove Deno.copy() (#25345)
Towards #22079

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-03 10:46:13 +00:00
Luca Casonato
5cf97f539b
BREAKING(permissions): remove --allow-hrtime (#25367)
Remove `--allow-hrtime` and `--deny-hrtime`. We are doing this because
it is already possible to get access to high resolution timers through
workers and SharedArrayBuffer.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-03 11:24:25 +02:00
David Sherret
b5695d02df
fix: only enable byonm if workspace root has pkg json (#25379)
Closes #25355
2024-09-03 09:18:37 +00:00
Bartek Iwańczuk
b9b4b0dd67
feat: hide several --unstable-* flags (#25378)
This commit hides following unstable flags:
- `--unstable-ffi` (the API is now stable)
- `--unstable-webgpu` (this API is now stable)
- `--unstable-fs` (no more unstable APIs)
- `--unstable-byonm` (BYONM is on by default)


The flags are still parseable, but they are not used. Concrete cleanup
will be done in a follow up PR.
2024-09-03 11:11:41 +02:00
Luca Casonato
90338eff8d
BREAKING(dts): improve types for Deno.serve (#25369)
This significantly simplifies the types for `Deno.serve`.

The following types become generic over the address type:
- ServeHandlerInfo
- ServeHandler
- ServeOptions
- ServeInit

The following types are removed entirely:
- ServeTlsOptions
- ServeUnixOptions
- ServeUnixHandlerInfo
- ServeUnixHandler
2024-09-03 11:09:40 +02:00
Asher Gomez
1a82b0f808
BREAKING(console): remove Deno.customInspect (#25348)
Note: this is implemented on Deploy. However, according to @magurotuna,
a thin compatibility layer might be in the works that'd prevent
breakages for PRs such as this one.

Towards #22079
2024-09-03 09:07:19 +00:00
David Sherret
bf7571a6f9
fix: make some warnings more standard (#25324) 2024-09-03 10:45:01 +02:00
Bedis Nbiba
3f6740ca52
fix: fix jupyter display function type (#25326) 2024-09-03 10:42:39 +02:00
Asher Gomez
9bf10aa1e0
chore(fs): remove Deno.flock[Sync]() (#25350)
Towards #22079
2024-09-03 18:39:37 +10:00
Bartek Iwańczuk
1f51b5310f
feat: support DENO_LOG env var instead of RUST_LOG (#25356)
Instead of `RUST_LOG` env var, we now support `DENO_LOG` env var.
This is done to be able to set a setting specific to `deno` that
wouldn't impact
other binaries written in Rust.

Ref
https://github.com/denoland/deno/issues/10558#issuecomment-2324300211
2024-09-03 10:36:28 +02:00
Asher Gomez
45c1737531
BREAKING(io): remove Deno.iter[Sync]() (#25346)
Towards #22079
2024-09-03 18:35:54 +10:00
Asher Gomez
259752537f
BREAKING: remove Deno.close() (#25347)
Towards #22079
2024-09-03 18:33:26 +10:00
Bartek Iwańczuk
e49d80e500
chore: cleanup code for deprecation notices in JS code (#25368)
This code hasn't been used in some time, so I cleaned as much of it as
possible.
2024-09-03 08:15:26 +00:00
Asher Gomez
5f08d634f7
BREAKING: remove deno vendor (#25343) 2024-09-03 17:00:57 +10:00
Coty
2533d68cab
fix(cli/tools): correct deno init --serve template behavior (#25318) 2024-09-02 23:01:36 +00:00
Asher Gomez
f6eab6c4bd
BREAKING: remove --allow-none flag (#25337)
Towards #22079

Signed-off-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-09-02 22:06:27 +00:00
Nayeem Rahman
e804175a0a
feat(lsp): html/css/yaml file formatting (#25353) 2024-09-02 18:27:25 +01:00
Asher Gomez
c62829fc03
BREAKING: remove --trace-ops (#25344)
Towards #22079
2024-09-02 18:26:05 +02:00
David Sherret
3015f16fbf
fix: remove entrypoint hack for Deno 2.0 (#25332) 2024-09-02 15:33:07 +00:00
Asher Gomez
bc51eca700
BREAKING: remove deno bundle (#25339)
`deno bundle` now produces:
```
error: ⚠️ `deno bundle` was removed in Deno 2.

See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs.deno.com/runtime/manual/advanced/migrate_deprecations
```

`deno bundle --help` now produces:
```
⚠️ `deno bundle` was removed in Deno 2.

See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs.deno.com/runtime/manual/advanced/migrate_deprecations

Usage: deno bundle [OPTIONS]

Options:
  -q, --quiet     Suppress diagnostic output
      --unstable  Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features
                    To view the list of individual unstable feature flags, run this command again with --help=unstable
```
2024-09-02 17:27:37 +02:00
Asher Gomez
503f95a54f
BREAKING: remove --ts flag (#25338) 2024-09-02 17:27:26 +02:00
Asher Gomez
4c35668d90
BREAKING: remove --jobs flag (#25336) 2024-09-02 17:26:42 +02:00
David Sherret
a3bd1ba26d
fix(BREAKING): make dns record types have consistent naming (#25357)
Closes https://github.com/denoland/deno/issues/15207
2024-09-02 11:19:08 +00:00
Bob Callaway
3a63572187
fix(publish): ensure provenance is spec compliant (#25200)
Fixes: #25199 

Ensures that for the SLSA provenance document generated on publishing,
`subject` is an array of ResourceDescriptor objects per the in-toto
specification
[requirements](https://github.com/in-toto/attestation/blob/main/spec/v1/statement.md#fields).

---------

Signed-off-by: Bob Callaway <bcallaway@google.com>
2024-08-31 15:53:46 +00:00
Asher Gomez
b536ed1a74
chore(fs): remove Deno.futime[Sync]() (#25252) 2024-08-31 13:13:23 +10:00
Bartek Iwańczuk
c29e5b9d1e
fix(upgrade): more informative information on invalid version (#25319)
Before:
```
$ deno upgrade v1.xx
error: Invalid version passed
```

After:
```
$ deno upgrade v1.xx
error: Invalid version passed (v1.xx)

Example usage:
  deno upgrade | deno upgrade 1.46 | deno upgrade canary
```

Also updates help text to use "shorthand version" without flags, but a
positional arg.
2024-08-31 00:22:20 +00:00
Asher Gomez
8e478a1a7d
chore: remove Deno.resources() (#25251) 2024-08-31 09:34:09 +10:00
Asher Gomez
504ae362d5
chore: remove Deno.metrics() (#25167) 2024-08-31 08:43:32 +10:00
David Sherret
35074a10c6
fix(lint): support linting jsr pkg without version field (#25230) 2024-08-30 18:05:44 -04:00
Bartek Iwańczuk
b9da6d0d00
v2.0.0-rc.0 (#25316)
Not strictly necessary, but bumping for good measure :))
2024-08-31 00:00:21 +02:00
David Sherret
f891e73bbf
refactor: remove DENO_FUTURE (#25314) 2024-08-30 21:58:24 +00:00
David Sherret
4a5642779e
fix: upgrade deno_ast 0.42 (#25313) 2024-08-30 17:12:13 -04:00
Bartek Iwańczuk
b1c6142f74
BREAKING: DENO_FUTURE=1 by default, or welcome to Deno 2.0 (#25213)
This commit effectively turns Deno into Deno 2.0.

This is done by forcing `DENO_FUTURE=1` env var, that was available in
the past few months to try Deno 2 changes.

This commit contains several breaking changes scheduled for Deno 2:
- all deprecated JavaScript APIs are not available any more, mostly
`Deno.*` APIs
- `window` global is removed
- FFI, WebGPU and FS APIs are now stable and don't require
`--unstable-*` flags
- import assertions are no longer supported
- "bring your own node modules" is enabled by default

This is the first commit in a series that are scheduled before the Deno
2 release.

Follow up work is tracked in
https://github.com/denoland/deno/issues/25241.

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-08-30 13:58:58 -04:00
Bartek Iwańczuk
768132b85f
feat(upgrade): print info links for Deno 2 RC releases (#25225)
In addition to printing a blog post information (if it's available),
this will also print a link to migration guide and the bug tracker.

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-30 02:32:01 +02:00
Nathan Whitaker
86d5b919d8
feat(config): Node modules option for 2.0 (#25299) 2024-08-29 15:57:43 -07:00
denobot
0fb8df6c0c
chore: forward v1.46.2 release commit to main (#25296)
This is the release commit being forwarded back to main for 1.46.2
2024-08-29 22:13:28 +02:00
Leo Kettmeir
055cdd00f7
fix: update deno_doc (#25290) 2024-08-29 02:34:43 -07:00
David Sherret
2afbc1aa39
feat: deprecate import assertions (#25281)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-29 01:06:09 +00:00
Asher Gomez
d183533404
docs: refer to globalThis instead of window in declaration files (#25286) 2024-08-29 00:22:40 +00:00
Bartek Iwańczuk
27d0897841
test: run specs::npm::exec_file_inside_npm_package with DENO_FUTURE=1 (#25282)
The test is failing if run with `DENO_FUTURE=1` which is blocking
https://github.com/denoland/deno/pull/25213.

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-29 02:21:59 +02:00
David Sherret
3afa3db4d3
fix: delete old Deno 1.x headers file when loading cache (#25283) 2024-08-28 23:47:15 +00:00
Nathan Whitaker
37501aa323
fix(napi): Don't run microtasks in napi_resolve_deferred (#25246)
Fixes an incredibly obscure bug that causes parcel's file watcher to not
get any file update notifications on macOS.

The issue was that the native addon was calling `napi_resolve_deferred`,
but when we resolved the promise, v8 was running microtasks
automatically. That executed JS, which called back into the native addon
and broke the addon's assumption that the call wouldn't be reentrant.
2024-08-28 13:42:42 -07:00
David Sherret
b708a13eb0
feat: improve lockfile v4 to store normalized version constraints and be more terse (#25247)
Stores normalized version constraints in the lockfile, which will
improve reproducibility and will fix a bug with duplicate specifiers
ending up in the lockfile. Also, gets rid of some duplicate data in the
specifiers area of the lockfile.
2024-08-28 14:17:47 -04:00
Bartek Iwańczuk
044e7c4e63
build: Allow building 'rc' release from source (#25227)
We're not gonna use it, but this might help distribution tools like
Homebrew to also release Deno 2.0 RC releases.
2024-08-28 14:31:25 +00:00
Pig Fang
f6c537f898
fix(fmt): fix incorrect quotes in components (#25249)
Unlike in dprint, `single_quote` option is shared between all
formatters, so we shouldn't change this option when formatting
attributes in components. This PR fixes this.

This problem doesn't affect formatting HTML.
2024-08-28 09:48:14 -04:00
Nayeem Rahman
97d1635343
fix(lsp): panic on url_to_uri() (#25238) 2024-08-28 05:15:48 +01:00
Bartek Iwańczuk
efcabce1c1
feat: remove --lock-write flag (#25214)
This commit remove `--lock-write` that was deprecated in v1.45 release.

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

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-28 13:23:51 +10:00
Bartek Iwańczuk
3dba98532a
fix: replace npm install hint with deno install hint (#25244)
Needed for https://github.com/denoland/deno/pull/25213.

With Deno 2, we should suggest using `deno install` instead of `npm
install`.
2024-08-28 02:31:41 +00:00
HasanAlrimawi
672ce3041a
fix: removed unstable-htttp from deno help (#25216)
Closes #25210 .

Removed --unstable-http from being displayed on deno run --help=unstable

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-27 13:45:27 +02:00
Marvin Hagemeister
7e68cce815
fix(task): support tasks with colons in name in deno run (#25233)
Fix task names containing a colon not being found with `deno run`. We
were only checking for a `module not found` error message, but strings
containing a colon throw a different error.

Fixes https://github.com/denoland/deno/issues/25232
2024-08-27 11:27:10 +02:00