1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-02 09:34:19 -04:00
Commit graph

197 commits

Author SHA1 Message Date
Bartek Iwańczuk
d11e89127d
Revert "perf(core): preserve ops between snapshots (#18080)" (#18267)
This reverts commit 4b6305f4f2.
2023-03-18 14:59:51 +00:00
Andrew
44553aa09e
docs(FFI/UnsafePointerView): fix a typo in a docstring (#18034) 2023-03-18 12:25:06 +00:00
Bartek Iwańczuk
4b6305f4f2
perf(core): preserve ops between snapshots (#18080)
This commit changes the build process in a way that preserves already
registered ops in the snapshot. This allows us to skip creating hundreds of
"v8::String" on each startup, but sadly there is still some op registration
going on startup (however we're registering 49 ops instead of >200 ops). 

This situation could be further improved, by moving some of the ops 
from "runtime/" to a separate extension crates.

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-03-18 12:51:21 +01:00
Matt Mastracci
3487fde236
perf(core) Reduce copying and cloning in extension initialization (#18252)
Follow-up to #18210:

* we are passing the generated `cfg` object into the state function
rather than passing individual config fields
 * reduce cloning dramatically by making the state_fn `FnOnce`
 * `take` for `ExtensionBuilder` to avoid more unnecessary copies
 * renamed `config` to `options`
2023-03-17 22:15:27 +00:00
Matt Mastracci
e55b448730
feat(core) deno_core::extension! macro to simplify extension registration (#18210)
This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements:

* `deno_core::ops!` registers a block of `#[op]`s, optionally with type
parameters, useful for places where we share lists of ops
* `deno_core::extension!` is used to register an extension, and creates
two methods that can be used at runtime/snapshot generation time:
`init_ops` and `init_ops_and_esm`.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17 18:22:15 +00:00
Leo Kettmeir
35196eab27
BREAKING(unstable): remove WebGPU (#18094)
This PR _**temporarily**_ removes WebGPU (which has behind the
`--unstable` flag in Deno), due to performance complications due to its
presence.

It will be brought back in the future; as a point of reference, Chrome
will ship WebGPU to stable on 26/04/2023.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17 00:29:32 +01:00
Bartek Iwańczuk
3f031ad9af
BREAKING(ext/fs): FileInfo.dev is defined on Windows (#18237)
Addresses feedback from
https://github.com/denoland/deno/pull/18073#issuecomment-1471480385.

Reverts changes to `FileInfo` fields that are not available on Windows
making them `null`. Only `FileInfo.dev` is non-null.
2023-03-17 00:14:56 +01:00
Bartek Iwańczuk
48a0b7f98f
feat(fs): support FileInfo.dev on Windows (#18073)
This commit adds support for retrieving `dev` information
when stating files on Windows.

Additionally `Deno.FileInfo` interfaces was changed to always
return 0 for fields that we don't retrieve information for on Windows.

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

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2023-03-16 02:35:13 +01:00
Bartek Iwańczuk
1930c09b04
refactor(core): remove "resolve_url_or_path_deprecated" (#18174)
Remove remaining usages of "resolve_url_or_path_deprecated" in favor
of "resolve_url_or_path" with explicit calls to
"std::env::current_dir()".

Towards landing https://github.com/denoland/deno/pull/15454
2023-03-14 17:18:01 +00:00
Bartek Iwańczuk
48ede89f1f
refactor(core): resolve_url_or_path and resolve_url_or_path_deprecated (#18170)
This commit changes current "deno_core::resolve_url_or_path" API to
"resolve_url_or_path_deprecated" and adds new "resolve_url_or_path"
API that requires to explicitly pass the directory from which paths
should be resolved to. 

Some of the call sites were updated to use the new API, the reminder
of them will be updated in a follow up PR.

Towards landing https://github.com/denoland/deno/pull/15454
2023-03-14 01:12:09 +00:00
Bartek Iwańczuk
c4771356f2
refactor: Remove call sites of "deno_core::resolve_url_or_path" (#18169)
These call sites didn't need to use "resolve_url_or_path".

Towards landing https://github.com/denoland/deno/pull/15454
2023-03-13 19:31:03 -04:00
David Sherret
bcb6ee9d08
refactor(npm): push npm struct creation to a higher level (#18139)
This has been bothering me for a while and it became more painful while
working on #18136 because injecting the shared progress bar became very
verbose. Basically we should move the creation of all these npm structs
up to a higher level.

This is a stepping stone for a future refactor where we can improve how
we create all our structs.
2023-03-12 23:32:59 -04:00
David Sherret
8db853514c
fix(check): regression where config "types" entries caused type checking errors (#18124)
Closes #18117
Closes #18121 (this is just over 10ms faster in a directory one up from
the root folder)

cc @nayeemrmn
2023-03-11 11:43:45 -05:00
Bartek Iwańczuk
b32a6f8ad2
refactor(core): don't use Result in ExtensionBuilder::state (#18066)
There's no point for this API to expect result. If something fails it should
result in a panic during build time to signal to embedder that setup is
wrong.
2023-03-07 22:37:37 +01:00
ayame113
08591d052a
chore(docs): Fixed manual link (#18060) 2023-03-07 08:01:56 -05:00
Nayeem Rahman
273777f7d9
fix(check): include dts files in tsc roots (#18026) 2023-03-05 12:47:04 -05:00
Geert-Jan Zwiers
399a22db88
chore(docs): add note about loadavg returning 0 on windows (#18006) 2023-03-04 05:31:55 -04:00
Divy Srivastava
38555a6a0f
feat(ops): reland fast zero copy string arguments (#17996)
Reland https://github.com/denoland/deno/pull/16777

The codegen is disabled in async ops and when fallback to slow call is
possible (return type is a Result) to avoid hitting this V8 bug:
https://github.com/denoland/deno/issues/17159
2023-03-03 19:04:10 +05:30
David Sherret
033b70af19
fix(npm): lazily install package.json dependencies only when necessary (#17931)
This lazily does an "npm install" when any package name matches what's
found in the package.json or when running a script from package.json
with deno task.

Part of #17916

Closes #17928
2023-02-24 19:35:43 -05:00
Leo Kettmeir
484b6fe2fa
refactor(flash): move remoteAddr to options bag (#17913)
Applies suggestion from #17912
2023-02-24 23:36:07 +01:00
David Sherret
344317ec50
feat(npm): support bare specifiers from package.json in more subcommands and language server (#17891) 2023-02-23 10:58:10 -05:00
David Sherret
a6ca4d0d61
refactor: use deno_graph for npm specifiers (#17858)
This changes npm specifiers to be handled by deno_graph and resolved to
an npm package name and version when the specifier is encountered. It
also slightly changes how npm specifier resolution occurs—previously it
would collect all the npm specifiers and resolve them all at once, but
now it resolves them on the fly as they are encountered in the module
graph.

https://github.com/denoland/deno_graph/pull/232

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-22 14:15:25 -05:00
Aapo Alasuutari
0f9daaeacb
fix(ext/ffi): Fix re-ref'ing UnsafeCallback (#17704) 2023-02-22 19:09:59 +00:00
Aapo Alasuutari
b56b8c8a75
feat(ext/ffi): Replace pointer integers with v8::External objects (#16889) 2023-02-22 19:32:38 +02:00
Ryan Dahl
4afa150f21
Revert "feat: Deprecate Deno.run API in favor of Deno.Command (#17630)" (#17875)
Deno.Command needs to be stabilized first and allow people to upgrade to
it before we can deprecate Deno.run. Otherwise lint will suddenly fail
with deprecated errors without giving people a chance to update.
2023-02-22 07:27:00 -05:00
David Sherret
2f98c3e1a6
chore: remove base64 encoding code from typescript snapshot (#17862)
This code is no longer used because we use swc for this now.
2023-02-21 22:56:58 -05:00
David Sherret
3479bc7661
fix(npm): improve peer dependency resolution (#17835)
This PR fixes peer dependency resolution to only resolve peers based on
the current graph traversal path. Previously, it would resolve a peers
by looking at a graph node's ancestors, which is not correct because
graph nodes are shared by different resolutions.

It also stores more information about peer dependency resolution in the
lockfile.
2023-02-21 12:03:48 -05:00
Bartek Iwańczuk
848e2c0d57
feat: Deprecate Deno.run API in favor of Deno.Command (#17630) 2023-02-16 12:11:32 +01:00
David Sherret
c4b9a91e27
refactor: use deno_graph's semver and npm structs (#17791) 2023-02-15 13:20:40 -05:00
Leo Kettmeir
c7535950b6
feat(flash): add 2nd param to handler to get remote address (#17633)
Closes #17583
2023-02-15 16:37:41 +01:00
Bartek Iwańczuk
201737c518
feat: stabilize Deno.osUptime() (#17554)
This commit stabilizes "Deno.osUptime()" API. The "--unstable" flag is
no longer required to use this API.
2023-02-14 12:35:38 +01:00
Bartek Iwańczuk
2502a37d41
chore(build): don't compress TSC snapshot in debug build (#17772)
Compressing the TSC snapshot in debug build took
~45s on M1 MacBook Pro; without compression it took ~1s.
Thus we're not not using compressed snapshot, trading off
a lot of build time for some startup time in debug build.
2023-02-14 02:46:32 +01:00
Bartek Iwańczuk
f917d2e2c1
feat: Stabilize Deno.Command API (#17628)
This commit stabilizes "Deno.Command" API with all its related APIs.

"--unstable" flag is no longer required to use this API.
2023-02-13 19:25:00 +01:00
Leo Kettmeir
8b5be962f5
fix: add WouldBlock error (#17339) 2023-02-12 23:14:33 +01:00
Leo Kettmeir
a55f0eb2fc
feat: add signal option to Deno.resolveDns (#17384)
Closes #14406
2023-02-11 14:14:02 +00:00
Leo Kettmeir
e22ebc6b6b
feat: add more variants to Deno.build.os (#17340)
Closes #14799
2023-02-11 14:25:45 +01:00
Kamil Ogórek
68008bee51
fix(dts): make Deno.Command accept readonly prop in options.args (#17718) 2023-02-10 18:09:02 +01:00
David Sherret
b3e88e0681
refactor: deno_graph 0.43 upgrade (#17692) 2023-02-09 22:00:23 -05:00
Leo Kettmeir
84a96110cd
refactor: rename deno specifiers to internal (#17655) 2023-02-05 17:49:20 +01:00
Leo Kettmeir
3035dee9f1
chore: update webgpu (#17534) 2023-01-30 15:14:16 +01:00
RA80533
50ba8ae6b2
docs: fix typos in WriteFileOptions's JSDoc (#17507) 2023-01-28 22:10:06 +01:00
David Sherret
f5840bdcd3
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-27 10:43:16 -05:00
David Sherret
83642976bf
fix: remove leftover Deno.spawn references (#17524) 2023-01-25 12:28:08 -05:00
Asher Gomez
900929f65c
feat: Add sync APIs for "Deno.permissions" (#17019)
This commit adds sync versions of async APIs to "Deno.permissions"
namespace.

Following APIs were added:
- "Deno.permissions.querySync"
- "Deno.permissions.requestSync"
- "Deno.permissions.revokeSync"
2023-01-25 00:42:44 +01:00
Leo Kettmeir
2027d98a8e
feat: allow first arg in test step to be a function (#17096) 2023-01-24 15:41:01 +01:00
Bartek Iwańczuk
fc2e00152b
feat: support node built-in module imports (#17264)
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-24 09:05:54 -05:00
Leo Kettmeir
cadeaae045
feat(runtime/command): make stdin default to inherit for spawn() (#17334)
Closes #17230
2023-01-24 15:03:46 +01:00
David Sherret
654e177c91
refactor(deno_graph): remove unused Resolved::Ok#kind usage (#17504)
See https://github.com/denoland/deno_graph/pull/205 for more details.
2023-01-24 08:23:19 -05:00
Bartek Iwańczuk
da23f7f876
feat: Stabilize Deno.Listener.ref/unref (#17477) 2023-01-20 16:32:55 +01:00
Leo Kettmeir
18e8ce4ca5
feat(runtime): add bigint to seek typings (#17314) 2023-01-19 05:30:56 +01:00