summaryrefslogtreecommitdiff
path: root/runtime/js/90_deno_ns.js
AgeCommit message (Collapse)Author
2023-12-06fix: display unstable flags at bottom of help text (#21468)David Sherret
Moves the unstable flags to be at the bottom of the help text. They were previously all over the place for some reason.
2023-11-25feat(unstable): --unstable-unsafe-proto (#21313)David Sherret
Closes https://github.com/denoland/deno/issues/21276
2023-11-01feat: granular --unstable-* flags (#20968)Bartek Iwańczuk
This commit adds granular `--unstable-*` flags: - "--unstable-broadcast-channel" - "--unstable-ffi" - "--unstable-fs" - "--unstable-http" - "--unstable-kv" - "--unstable-net" - "--unstable-worker-options" - "--unstable-cron" These flags are meant to replace a "catch-all" flag - "--unstable", that gives a binary control whether unstable features are enabled or not. The downside of this flag that allowing eg. Deno KV API also enables the FFI API (though the latter is still gated with a permission). These flags can also be specified in `deno.json` file under `unstable` key. Currently, "--unstable" flag works the same way - I will open a follow up PR that will print a warning when using "--unstable" and suggest to use concrete "--unstable-*" flag instead. We plan to phase out "--unstable" completely in Deno 2.
2023-11-01feat(cron) implement Deno.cron() (#21019)Igor Zinkovsky
This PR adds unstable `Deno.cron` API to trigger execution of cron jobs. * State: All cron state is in memory. Cron jobs are scheduled according to the cron schedule expression and the current time. No state is persisted to disk. * Time zone: Cron expressions specify time in UTC. * Overlapping executions: not permitted. If the next scheduled execution time occurs while the same cron job is still executing, the scheduled execution is skipped. * Retries: failed jobs are automatically retried until they succeed or until retry threshold is reached. Retry policy can be optionally specified using `options.backoffSchedule`.
2023-09-27feat(unstable): add `Deno.jupyter.broadcast` API (#20656)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20591 --------- Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-07-13fix(tsc): more informative diagnostic when `Deno` does not exist (#19825)David Sherret
Also improved the diagnostic when using something like `Deno.openKv` and it doesn't exist.
2023-07-04fix: move `Deno.serve` to stable namespace (#19718)Bartek Iwańczuk
This was missed in #19141
2023-07-01fix(ext/kv): expose Deno.AtomicOperation (#19674)Luca Casonato
2023-04-30refactor: remove ext/console/01_colors.js (#18927)Leo Kettmeir
2023-04-03refactor: remove "ext/flash" (#18578)Bartek Iwańczuk
With https://github.com/denoland/deno/pull/18568 landed we no longer need "ext/flash". This commit removes "deno_flash" extension completely. This should have some impact on the binary and snapshot size. Closes https://github.com/denoland/deno/issues/17356
2023-04-03refactor: "Deno.serve()" API uses "Deno.serveHttp()" internally (#18568)Bartek Iwańczuk
This commit changes implementation of "Deno.serve()" API to use "Deno.serveHttp()" under the hood. This change will allow us to remove the "flash" server implementation, bringing stability to the "Deno.serve()" API. "cli/tests/unit/flash_test.ts" was renamed to "serve_test.ts". Closes https://github.com/denoland/deno/issues/15574 Closes https://github.com/denoland/deno/issues/15504 Closes https://github.com/denoland/deno/issues/15646 Closes https://github.com/denoland/deno/issues/15909 Closes https://github.com/denoland/deno/issues/15911 Closes https://github.com/denoland/deno/issues/16828 Closes https://github.com/denoland/deno/issues/18046 Closes https://github.com/denoland/deno/issues/15869
2023-03-28Reland "refactor: remove Deno[Deno.internal].nodeUnstable namespace" (#18475)Bartek Iwańczuk
This reverts commit 357bcfcf79fee92195e37bb3f05e247908f207c5.
2023-03-27Revert "refactor: remove Deno[Deno.internal].nodeUnstable namespace (… ↵Bartek Iwańczuk
(#18458) …#18449)" This reverts commit d1a9c4cd7ce0c19ddf9c7c52c0d35d6124a7677d. Appears this made CI very flaky on macOS, but I can't repeat it locally yet
2023-03-27refactor: remove Deno[Deno.internal].nodeUnstable namespace (#18449)Bartek Iwańczuk
Since we can preserve ops in the snapshot these days, we no longer need to have "Deno[Deno.internal].nodeUnstable" namespace. Instead, various built-in Node.js modules can use appropriate APIs directly.
2023-03-22Revert "refactor: rename Deno.openKv() to Deno.kv() (#18349)" (#18362)Ryan Dahl
This reverts commit 50b793c9ed866ee29e8f04b4fa24b485b01a2b74.
2023-03-22refactor: rename Deno.openKv() to Deno.kv() (#18349)Ryan Dahl
2023-03-22feat(ext/kv): key-value store (#18232)Heyang Zhou
This commit adds unstable "Deno.openKv()" API that allows to open a key-value database at a specified path. --------- Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-08refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme ↵Bartek Iwańczuk
for snapshotted modules (#18041) This commit renames "deno_core::InternalModuleLoader" to "ExtModuleLoader" and changes the specifiers used by the modules loaded from this loader to "ext:". "internal:" scheme was really ambiguous and it's more characters than "ext:", which should result in slightly smaller snapshot size. Closes https://github.com/denoland/deno/issues/18020
2023-03-07refactor: Add "deno_fs" extension crate (#18040)Bartek Iwańczuk
This commit factors out APIs related to file system from "runtime/" to a separate "deno_fs" extension crate.
2023-03-05refactor: move definition of Deno.build from "runtime" to "core" (#18036)Bartek Iwańczuk
We use information about build in several extension crates like "ext/node" or "runtime/". In an effort to move "fs" APIs to a separate crate it is a prerequisite to have this information available outside of the "runtime/" crate. This commit moves definition of "build" object to "Deno.core" that is later forwarded to "Deno.build".
2023-03-05refactor(runtime): merge "spawn" into "process" (#18022)Bartek Iwańczuk
This commit merges "runtime/js/40_spawn.js" into "runtime/js/40_process.js", and "runtime::ops::spawn" into "runtime::ops::process". It makes little sense to have them separated given that we want to factor out these APIs into a separate extension crate.
2023-03-05refactor(runtime): remove 40_files.js, 40_write_file.js and 40_read_file.js ↵Bartek Iwańczuk
(#18018) JavaScript APIs from "runtime/js/40_files.js" combined abstractions for stdio streams ("Stdout", "Stderr", "Stdin") and file system file ("File", "FsFile"). APIs from "runtime/js/40_read_file.js" and "runtime/js/40_write_file.js" were implemented using ops from "runtime/ops/fs.rs". This file was removed and relevant APIs were moved to "deno_io/12_io.js" and "runtime/js/30_fs.js". This work is meant to enable factoring out "deno_fs" crate.
2023-03-05refactor: remove unused 40_diagnostics.js file (#18021)Bartek Iwańczuk
This file was not used anywhere - even though it exposed an unstable "Deno.DiagnosticCategory" API. Seems like a left over from when we had "Deno.emit" API.
2023-03-05refactor(core): include_js_files! 'dir' option doesn't change specifiers ↵Bartek Iwańczuk
(#18019) This commit changes "include_js_files!" macro from "deno_core" in a way that "dir" option doesn't cause specifiers to be rewritten to include it. Example: ``` include_js_files! { dir "js", "hello.js", } ``` The above definition required embedders to use: `import ... from "internal:<ext_name>/js/hello.js"`. But with this change, the "js" directory in which the files are stored is an implementation detail, which for embedders results in: `import ... from "internal:<ext_name>/hello.js"`. The directory the files are stored in, is an implementation detail and in some cases might result in a significant size difference for the snapshot. As an example, in "deno_node" extension, we store the source code in "polyfills" directory; which resulted in each specifier to look like "internal:deno_node/polyfills/<module_name>", but with this change it's "internal:deno_node/<module_name>". Given that "deno_node" has over 100 files, many of them having several import specifiers to the same extension, this change removes 10 characters from each import specifier.
2023-03-05refactor(runtime): factor out deno_io extension crate (#18001)Bartek Iwańczuk
This is a prerequisite to factor out FS ops to a separate crate.
2023-02-13feat: Stabilize Deno.Command API (#17628)Bartek Iwańczuk
This commit stabilizes "Deno.Command" API with all its related APIs. "--unstable" flag is no longer required to use this API.
2023-02-08refactor: internal runtime code TS support (#17672)Leo Kettmeir
This is a proof of concept for being able to snapshot TypeScript files. Currently only a single runtime file is authored in TypeScript - "runtime/js/01_version.ts". Not needed infrastructure was removed from "core/snapshot_util.rs". --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-07 refactor: remove prefix from include_js_files & use extension name (#17683)Leo Kettmeir
2023-02-07refactor: Use ES modules for internal runtime code (#17648)Leo Kettmeir
This PR refactors all internal js files (except core) to be written as ES modules. `__bootstrap`has been mostly replaced with static imports in form in `internal:[path to file from repo root]`. To specify if files are ESM, an `esm` method has been added to `Extension`, similar to the `js` method. A new ModuleLoader called `InternalModuleLoader` has been added to enable the loading of internal specifiers, which is used in all situations except when a snapshot is only loaded, and not a new one is created from it. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-25fix: remove leftover Deno.spawn references (#17524)David Sherret
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-27feat(unstable): Add "Deno.osUptime()" API (#17179)Kamil Ogórek
This PR adds support for `Deno.osUptime` which reports number of seconds since os was booted. It will allow us to be compatible with Node's `os.uptime` - https://nodejs.org/api/os.html#osuptime Partially based on https://docs.rs/uptime_lib/latest/src/uptime_lib/lib.rs.html
2022-12-17fix(runtime): `Deno.memoryUsage().rss` should return correct value (#17088)David Sherret
This commit changes implementation of "Deno.memoryUsage()" to return correct value for "rss" field. To do that we implement a specialized function per os to retrieve this information.
2022-11-28feat(unstable): rework Deno.Command (#16812)Leo Kettmeir
Refactors the `Deno.Command` class to not handle any state, but only being an intermediary to calling its methods, and as such any methods and properties besides `output`, `outputSync` & `spawn` have been removed. Interracting with a `spawn`ed subprocess now works by using the methods and properties on the returned class of the `spawn` method.
2022-11-21feat(core): Ability to create snapshots from existing snapshots (#16597)Bartek Iwańczuk
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2022-11-13feat(unstable): "Deno.Command()" API (#16516)Leo Kettmeir
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-10feat: don't require --unstable flag for npm programs (#16520)Bartek Iwańczuk
This PR adds copies of several unstable APIs that are available in "Deno[Deno.internal].nodeUnstable" namespace. These copies do not perform unstable check (ie. don't require "--unstable" flag to be present). Otherwise they work exactly the same, including permission checks. These APIs are not meant to be used by users directly and can change at any time. Copies of following APIs are available in that namespace: - Deno.spawnChild - Deno.spawn - Deno.spawnSync - Deno.serve - Deno.upgradeHttpRaw - Deno.listenDatagram
2022-11-09feat: stabilize Deno.uid() and Deno.gid() (#16424)Colin Ihrig
Closes https://github.com/denoland/deno_std/issues/2791
2022-11-09feat: stabilize Deno.systemMemoryInfo() (#16445)Colin Ihrig
2022-11-09feat: stabilize Deno.networkInterfaces() (#16451)Colin Ihrig
2022-10-27fix: finish stabilizing Deno.osRelease() (#16447)Colin Ihrig
Fixes: https://github.com/denoland/deno/issues/16446
2022-10-26chore(unstable): rename Deno.getUid() and Deno.getGid() (#16432)Colin Ihrig
This commit renames `Deno.getUid()` to `Deno.uid()` and renames `Deno.getGid()` to `Deno.gid()`.
2022-10-26feat: Stabilize Deno.consoleSize() API (#15933)Bartek Iwańczuk
This commit stabilizes "Deno.consoleSize()" API. There is one change compared to previous unstable API, in that the API doesn't accept any arguments. Console size is established by querying syscalls for stdio streams at fd 0, 1 and 2.
2022-10-25Revert "Revert "refactor(ext/net): clean up variadic network ops (#16… ↵Bartek Iwańczuk
(#16422) …392)" (#16417)" This reverts commit 8e3f825c921b38141afa7a69a0664881c5c94461.
2022-10-25feat: stabilize Deno.utime() and Deno.utimeSync() (#16421)Colin Ihrig
2022-10-25Revert "refactor(ext/net): clean up variadic network ops (#16392)" (#16417)Bartek Iwańczuk
Should fix https://github.com/denoland/deno_std/issues/2807
2022-10-25feat: stabilize Deno.futime() and Deno.futimeSync() (#16415)Colin Ihrig
2022-10-25feat: stabilize Deno.loadavg() (#16412)Colin Ihrig
2022-10-24refactor(ext/net): clean up variadic network ops (#16392)Luca Casonato
Previously `op_net_listen`, `op_net_accept`, and various other ops in ext/net where variadic on the transport. This created a lot of code bloat. This commit updates the code to instead have separate ops for each transport.
2022-09-29fix: move Deno.hostname() from denoNsUnstable to denoNs (#16086)TrickyPi