0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 01:44:26 -05:00
Commit graph

2689 commits

Author SHA1 Message Date
Nathan Whitaker
ee4c14a550
chore: update to rust 1.85 (#28236)
Updates to use rust 1.85. Doesn't move to the 2024 edition, as that's a
fair bit more involved.

A nice side benefit is that the new rustc version seems to lead to a
slight reduction in binary size (at least on mac):

```
    FILE SIZE   
 -------------- 
  +4.3%  +102Ki    __DATA_CONST,__const
  [NEW] +69.3Ki    __TEXT,__literals
  [NEW] +68.5Ki    Rebase Info
  +5.0% +39.9Ki    __TEXT,__unwind_info
   +57% +8.85Ki    [__TEXT]
  [NEW] +8.59Ki    Lazy Binding Info
  [NEW] +5.16Ki    __TEXT,__stub_helper
  [NEW] +3.58Ki    Export Info
  [NEW] +3.42Ki    __DATA,__la_symbol_ptr
  -0.1%    -726    [12 Others]
 -21.4% -3.10Ki    [__DATA_CONST]
 -95.8% -3.39Ki    __DATA_CONST,__got
 -20.9% -3.43Ki    [__DATA]
  -0.5% -4.52Ki    Code Signature
 -100.0% -11.6Ki    [__LINKEDIT]
  -1.0% -43.5Ki    Symbol Table
  -1.6% -44.0Ki    __TEXT,__gcc_except_tab
  -0.2% -48.1Ki    __TEXT,__const
  -3.3% -78.6Ki    __TEXT,__eh_frame
  -0.7%  -320Ki    __TEXT,__text
  -1.5%  -334Ki    String Table
  -0.5%  -586Ki    TOTAL
```
2025-02-25 08:50:01 -08:00
Divy Srivastava
e66ef32a8f
fix(ext/node): SQLite reset guards to prevent database locks (#28298)
Fixes https://github.com/denoland/deno/issues/28295
2025-02-25 19:27:55 +05:30
denobot
b9cffda7c9
chore: forward v2.2.2 release commit to main (#28292)
This is the release commit being forwarded back to main for 2.2.2

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2025-02-25 14:36:11 +05:30
Leo Kettmeir
4ba166b207
fix(http): generate OtelInfo only when otel metrics are enabled (#28286) 2025-02-24 20:27:35 -08:00
Divy Srivastava
7fa8fc4b26
fix(ext/node): descriptive sqlite error messages (#28272)
Fixes https://github.com/denoland/deno/issues/28259
2025-02-24 17:55:36 +05:30
Leo Kettmeir
f800f5444a
chore: remove unused dependencies (#28204) 2025-02-21 02:46:56 -08:00
Divy Srivastava
648ee8f0e7
fix(ext/node): decipherIv() range error on invalid final block length (#28215)
Fixes https://github.com/denoland/deno/issues/28208
2025-02-21 04:48:38 +00:00
denobot
84fabecc9b
chore: forward v2.2.1 release commit to main (#28213)
This is the release commit being forwarded back to main for 2.2.1

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2025-02-21 01:35:34 +00:00
Divy Srivastava
c1276d8fa0
fix(ext/node): rewrite SQLite named parameter handing (#28197)
Allow bare named params and handle invalid param name. Also adds
`StatementSync#setAllowBareNamedParameters`

Fixes https://github.com/denoland/deno/issues/28183
2025-02-20 18:34:34 +05:30
Divy Srivastava
664d50fab8
fix(ext/node): Fix handling of sqlite large integers (#28193)
Use `v8::Number` instead of `v8::Integer` to handle > i32::MAX.

Fixes https://github.com/denoland/deno/issues/28187
2025-02-20 16:32:46 +05:30
Bartek Iwańczuk
e4b8fa5f4f
fix: move extension file declarations to cli/tsc/dts (#28180)
This commits moves all `.d.ts` files from `ext/*` to `cli/tsc/dts`.

Due to TSC snapshot removal, `cargo publish` is now erroring out,
unable to find the declaration files. These files were moved to
"cli/tsc/dts", because it's much easier than keeping them in 
extension directories, while still providing them compressed 
or uncompressed depending on the build type.
2025-02-19 02:53:21 +01:00
Bartek Iwańczuk
e03c990493
fix(ext/cache): add missing Cargo feature (#28178) 2025-02-19 00:29:01 +00:00
denobot
2968816863
2.2.0 (#28175)
Bumped versions for 2.2.0

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-02-18 23:12:17 +00:00
Leo Kettmeir
bf79971c95
feat(http): add otel metrics (#28034)
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2025-02-18 14:19:52 -08:00
Gowtham K
9b9eeabcc8
fix(node/sqlite): sqlite named parameters (#28154)
This PR introduces support for named parameters in SQLite queries, as
outlined in #28134
2025-02-18 22:03:39 +05:30
snek
6206343b54
fix: handle all values for buffers in turbocall codegen (#28170)
Now that ArrayBuffer/ArrayBufferView is a generic Value type, we have to
handle it being passed any value. To do this, thread
FastApiCallbackOptions through the function, and add error raising
logic.

If we run conversion and the value is not valid, we return `isize::MAX`,
and then in cranelift we use this value to know that we should branch to
the error logic.

An example compilation looks like this:
```rust
extern "C" fn print_buffer(ptr: *const u8, len: usize);
```

```clif
function %print_buffer_wrapper(i64, i64, i64, i64) system_v {
    sig0 = (i64, i64) system_v
    sig1 = (i64) -> i64 system_v
    sig2 = (i64) system_v

block0(v0: i64, v1: i64, v2: i64, v3: i64):
    v4 = iconst.i64 0x6525_9198_2d00 ; turbocall_ab_contents
    v5 = call_indirect sig1, v4(v1)
    v6 = iconst.i64 0x7fff_ffff_ffff_ffff
    v7 = icmp eq v5, v6
    brif v7, block1, block2

block2:
    v8 = iconst.i64 0x7558_4c0c_0700 ; sym.ptr
    call_indirect sig0, v8(v5, v2)
    return

block1 cold:
    v9 = iconst.i64 0x6525_9198_2d70 ; turbocall_raise
    call_indirect sig2, v9(v3)
    return
}
```

Also cleaned up all the `unwrap`s and added some logging.
2025-02-18 16:24:25 +00:00
Divy Srivastava
4ab380e0a7
fix(ext/node): implement StatementSync#iterate (#28168)
Fixes https://github.com/denoland/deno/issues/28130
2025-02-18 21:26:17 +05:30
Rajhans Jadhao
45777b8eca
fix(ext/node): use primordials in ext/node/polyfills/path/common.ts (#28164)
Related to https://github.com/denoland/deno/issues/24236
2025-02-18 12:51:14 +01:00
Leo Kettmeir
17a51c401a
feat(jupyter): make GPUTexture and GPUBuffer displayable (#28117) 2025-02-18 00:29:45 -08:00
David Sherret
fe55e3e573
refactor: better sys trait impls (#28140) 2025-02-16 22:15:53 +01:00
snek
979e2f7158
feat: Upgrade V8 to 13.4 (#28080)
- upgrade v8 to 13.4
- turbocall conversion for arraybuffers is now much more complex, so use
cranelift
- misc updates for deprecated fns
- v8 default stack size is too small now, causing stack overflow
exceptions in some tests
- add syscall shim to support new syscall in old sysroot
2025-02-14 11:26:47 +00:00
denobot
4921411bb2
chore: forward v2.1.10 release commit to main (#28099)
This is the release commit being forwarded back to main for 2.1.10

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-02-13 08:33:19 +00:00
Divy Srivastava
cda0c5b3ae
fix: do special file permission check for check_read_path (#27989)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-02-12 15:46:21 +00:00
Leo Kettmeir
7253820764
refactor: object wrap WebGPU (#27665)
Fixes #25874
Fixes #26760
Fixes #24288
Fixes #24798
Fixes #25627
Fixes #25915
Fixes #26769
2025-02-12 13:45:41 +00:00
Leo Kettmeir
c1a0d63753
fix(streams): handle Resource stream error (#27975)
Fixes #27715
2025-02-11 09:27:52 -08:00
Jo Franchetti
07410d19cf
docs: adding examples and a see link to Websockets jdocs (#27957)
adding examples to websockets interfaces and a see link

---------

Co-authored-by: Phil Hawksworth <phil@deno.com>
2025-02-11 15:35:15 +01:00
Divy Srivastava
196ceb76bb
fix(ext/node): DatabaseSync#exec should execute batch statements (#28053)
Fixes https://github.com/denoland/deno/issues/28050
2025-02-11 19:52:33 +05:30
Luca Casonato
6619210509
fix(otel): custom span start + end times are fractional ms (#27995)
Previously they were treated as fractional seconds.
2025-02-06 14:53:43 +01:00
Divy Srivastava
4a2b8fc22d
fix(ext/node): expose sqlite changeset constants (#27992)
https://nodejs.org/api/sqlite.html#sqliteconstants
2025-02-06 13:08:40 +05:30
Yoshiya Hinosawa
78fceb4a33
fix(ext/node): fix twitter-api-v2 compatibility (#27971) 2025-02-06 16:35:55 +09:00
Divy Srivastava
a401a79c75
fix(ext/node): fix missing privateKey.x in curve25519 JWK (#27990)
Fixes https://github.com/denoland/deno/issues/27972
2025-02-06 12:11:42 +05:30
Divy Srivastava
28faaee772
fix(ext/node): throw Session methods when database is closed (#27968) 2025-02-06 08:52:49 +05:30
Divy Srivastava
ece384c094
fix(ext/node): implement DatabaseSync#applyChangeset() (#27967)
https://nodejs.org/api/sqlite.html#databaseapplychangesetchangeset-options

```js
const sourceDb = new DatabaseSync(':memory:');
const targetDb = new DatabaseSync(':memory:');

sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');

const session = sourceDb.createSession();

const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
insert.run(1, 'hello');
insert.run(2, 'world');

const changeset = session.changeset();
targetDb.applyChangeset(changeset);
// Now that the changeset has been applied, targetDb contains the same data as sourceDb. 
```
2025-02-06 08:52:39 +05:30
Hajime-san
1eb4142143
feat(ext/canvas): enhance createImageBitmap specification compliance (#25517) 2025-02-05 04:10:11 -08:00
Divy Srivastava
28834a89bb
fix(ext/node): implement SQLite Session API (#27909)
https://nodejs.org/api/sqlite.html#class-session

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-02-04 21:59:13 +05:30
snek
98339cf327
fix(ext/napi): napi_is_buffer tests for ArrayBufferView (#27956)
use correct type check

Fixes: https://github.com/denoland/deno/issues/27951
2025-02-04 14:30:40 +00:00
Divy Srivastava
c2832d70a1
fix(ext/sqlite): add sourceSQL and expandedSQL getters (#27921) 2025-02-04 17:38:41 +05:30
Divy Srivastava
441b1d307f
fix(ext/node): handle non-ws upgrade headers (#27931) 2025-02-04 17:35:48 +05:30
Yoshiya Hinosawa
4405f47a4f
refactor(ext/fetch): do not share error instance (#27941) 2025-02-04 13:38:07 +09:00
Divy Srivastava
f28bbcced5
fix(ext/node): expose brotli stream APIs (#27943)
Fixes https://github.com/denoland/deno/issues/27170
2025-02-04 07:47:02 +05:30
David Sherret
61faa32920
perf: node resolution cache (#27838)
This adds a cache for node resolution, which makes repeat lookups about
15x faster.
2025-02-03 20:25:10 -05:00
Divy Srivastava
b5c3f4f782
fix(ext/node): support read-only database in node:sqlite (#27930)
Implements the `readOnly` option for `DatabaseSync`.

Permissions:
`--allow-read=test.db --allow-write=test.db` => all works
`--allow-read=test.db` => only `readOnly` dbs work, cannot create new db
2025-02-03 16:41:45 +05:30
Divy Srivastava
7107c358a1
fix(ext/node): set process fields on own instance (#27927)
Ref https://github.com/denoland/deno/pull/27891#issuecomment-2626286689

```
% deno eval 'console.log(Object.getOwnPropertyNames(process))'
[
  "_events",
  "_eventsCount",
  "_maxListeners",
  "versions",
  "stdin",
  "stdout",
  "stderr"
]

% target/debug/deno eval 'console.log(Object.getOwnPropertyNames(process))'
[
  "_events",
  "_eventsCount",
  "_maxListeners",
  "release",
  "arch",
  "report",
  "title",
  "argv",
  "argv0",
  "chdir",
  "config",
  "cpuUsage",
  "cwd",
  "env",
  "execArgv",
  "exit",
  "abort",
  "reallyExit",
  "_exiting",
  "exitCode",
  "mainModule",
  "nextTick",
  "dlopen",
  "pid",
  "ppid",
  "platform",
  "setSourceMapsEnabled",
  "hrtime",
  "_kill",
  "kill",
  "memoryUsage",
  "stderr",
  "stdin",
  "stdout",
  "version",
  "versions",
  "emitWarning",
  "binding",
  "umask",
  "getgid",
  "getuid",
  "getegid",
  "geteuid",
  "getBuiltinModule",
  "_eval",
  "execPath",
  "uptime",
  "allowedNodeEnvironmentFlags",
  "features",
  "noDeprecation"
]
```
2025-02-03 16:39:04 +05:30
Divy Srivastava
3c56e6c7cd
fix(ext/node): enforce -RW perms on node:sqlite (#27928)
require RW permission on the database path except when using in-memory
mode.
2025-02-02 15:49:39 +05:30
Divy Srivastava
7d19668255
fix(ext/node): throw RangeError when sqlite INTEGER is too large (#27907)
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-02-01 13:19:53 +05:30
David Sherret
8971064546
feat: TypeScript 5.7 (#27857)
Co-authored-by: Kenta Moriuchi <moriken@kimamass.com>
2025-01-31 16:07:42 -05:00
Divy Srivastava
1cbaee9f52
fix(ext/node): sqlite bind support bigint values (#27890) 2025-01-31 18:31:05 +05:30
Yoshiya Hinosawa
1cecc0a8b0
fix(ext/node): support proxy http request (#27871) 2025-01-31 21:46:54 +09:00
Divy Srivastava
057f257052
fix(ext/node): represent sqlite blob as Uint8Array (#27889) 2025-01-31 17:53:48 +05:30
Divy Srivastava
08cc22105f
fix(ext/node): set process.env as own property (#27891)
Fixes `gcp-metadata@6.1.1`

```
% deno eval "import 'npm:gcp-metadata@6.1.1'" # main
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'GOOGLE_SDK_NODE_LOGGING')
    at Object.log (file:///Users/divy/Library/Caches/deno/npm/registry.npmjs.org/google-logging-utils/0.0.2/build/src/logging-utils.js:356:36)
    at Object.<anonymous> (file:///Users/divy/Library/Caches/deno/npm/registry.npmjs.org/gcp-metadata/6.1.1/build/src/index.js:52:20)
    at Object.<anonymous> (file:///Users/divy/Library/Caches/deno/npm/registry.npmjs.org/gcp-metadata/6.1.1/build/src/index.js:409:4)
    at Module._compile (node:module:745:34)
    at loadMaybeCjs (node:module:770:10)
    at Object.Module._extensions..js (node:module:755:12)
    at Module.load (node:module:662:32)
    at Function.Module._load (node:module:534:12)
    at Module.require (node:module:681:19)
    at require (node:module:812:16)

% target/debug/deno eval "import 'npm:gcp-metadata@6.1.1'" # this PR
```

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2025-01-31 11:38:26 +05:30