0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

2003 commits

Author SHA1 Message Date
Gasman
0eb5be9a12
fix(ext/console): log class for class constructor (#17615)
Co-authored-by: tannal <tannal.cn@gmail.com>
2023-02-05 00:34:36 +01:00
Nayeem Rahman
a635c9700c
refactor: reland "preserve ProcState::file_fetcher between restarts" (#17636)
Just some watcher init step that I thought would be "cloned over" but
needs to be done again on reset.
2023-02-03 20:15:16 +01:00
David Sherret
dc854e83a4
fix(repl): handle @types/node not being cached in the repl (#17617)
Closes #17599
2023-02-01 16:37:05 -05:00
David Sherret
f6f76a76b2
fix(lockfile): emit trailing newline (#17618) 2023-02-01 15:57:02 -05:00
Bartek Iwańczuk
d318e38b76
Revert "fix(watch): preserve ProcState::file_fetcher between restarts (#15466) (#17591)
This reverts commit 3545bff678.
2023-01-30 16:22:17 +01:00
Kenta Moriuchi
266915d5ce
fix(ext): internal structuredClone for ArrayBuffer and TypedArray subclasses (#17431) 2023-01-29 15:15:01 +01:00
David Sherret
fe11df09b1
fix(lsp): update document dependencies on configuration change (#17556) 2023-01-28 10:18:32 -05:00
David Sherret
2b247be517
fix: ensure "fs" -> "node:fs" error/quick fix works when user has import map (#17566)
Closes #17563
2023-01-27 22:36:23 +00: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
34c14dbf99
fix: support import map specified as data uri (#17531) 2023-01-25 16:51:04 -05:00
Bartek Iwańczuk
c6c8c91a6e
feat: embed import map in the config file (#17478)
This commit changes handling of config file to enable
specifying "imports" and "scopes" objects effectively making
the configuration file an import map.

"imports" and "scopes" take precedence over "importMap" configuration,
but have lower priority than "--importmap" CLI flag.

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-25 21:13:40 +01:00
David Sherret
b5b4887c4a
feat(fmt): make semi-colon option a boolean (#17527) 2023-01-25 15:06:00 -05:00
David Sherret
83642976bf
fix: remove leftover Deno.spawn references (#17524) 2023-01-25 12:28:08 -05:00
Bartek Iwańczuk
8b7023bc7e
Revert "chore: upgrade rusty_v8 to 0.62.0 (#17200)" (#17523)
This reverts commit e2d75491d5.
2023-01-25 15:36:10 +01:00
Bartek Iwańczuk
e2d75491d5
chore: upgrade rusty_v8 to 0.62.0 (#17200) 2023-01-25 12:22:27 +00:00
Leo Kettmeir
f3711f28f4
feat(cli): add DENO_V8_FLAGS env var (#17313)
Closes #5669
2023-01-25 05:03:03 +01: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
David Sherret
f14ea3d4d4
feat: suggest adding a "node:" prefix for bare specifiers that look like built-in Node modules (#17519) 2023-01-24 15:14:49 -05:00
Bartek Iwańczuk
e1c51f3c0d
feat(fmt): add ability to configure semicolons (#17292)
Allows to change behavior of `deno fmt` to use "ASI" setting for
semicolons instead of always prefering them, this is done
by "--options-semi=asi" flag or `"semi": "asi"` setting
in the config file.
2023-01-24 21:07:00 +01:00
Bartek Iwańczuk
abd9610530
refactor: remove Deno.core (#16881)
This commit removes "Deno.core" namespace. It is strictly private API
that has no stability guarantees, we were supposed to remove it long time ago.

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-01-24 18:54:10 +01:00
Leo Kettmeir
1084027d50
fix: update expected output for config auto-discovery debug log (#17514) 2023-01-24 17:28:22 +01:00
Leo Kettmeir
0204071e30
feat: log detection of config file (#17338)
Closes #14578
2023-01-24 15:41:22 +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
bf237c6241
refactor: Move lockfile to a separate crate (#17503)
Moves the lockfile implementation to a separate crate so other projects
like Deploy can use it as well.
2023-01-23 23:41:02 +01:00
Leo Kettmeir
18e8ce4ca5
feat(runtime): add bigint to seek typings (#17314) 2023-01-19 05:30:56 +01:00
Andreu Botella
69ec45eac7
refactor(cli): Integrate standalone mode cert handling into Flags (#17419)
The way the standalone mode handles the `--cert` flag is different to
all other modes. This is because `--cert` takes a path to the
certificate file, which is directly added to the root cert store; except
for compile mode, where its byte contents are stored in the standalone
metadata, and they are added to the root cert store after the
`ProcState` is created.

This change instead changes `Flags::ca_file` (an `Option<String>`) into
`Flags::ca_data`, which can represent a `String` file path or a
`Vec<u8>` with the certificate contents. That way, standalone mode can
create a `ProcState` whose root cert store alreay contains the
certificate.

This change also adds a tests for certificates in standalone mode, since
there weren't any before.

This refactor will help with implementing web workers in standalone mode
in the future.
2023-01-18 01:18:24 +01:00
Kenta Moriuchi
6da958d7ec
chore: update dlint to v0.37.0 for GitHub Actions (#17295)
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR
includes following changes:
 
* fix(prefer-primordials): Stop using array pattern assignments
* fix(prefer-primordials): Stop using global intrinsics except for
`SharedArrayBuffer`
* feat(guard-for-in): Apply new guard-for-in rule
2023-01-16 17:17:18 +01:00
Leo Kettmeir
df4d0c55c0
fix(cli/fmt): show filepath for InvalidData error (#17361) 2023-01-16 00:30:52 +00:00
Asher Gomez
7683ba5e90
chore: update std submodule and its imports (#17408) 2023-01-15 21:09:26 +01:00
Divy Srivastava
d5634164cb
chore: use rustfmt imports_granularity option (#17421)
Closes https://github.com/denoland/deno/issues/2699
Closes https://github.com/denoland/deno/issues/2347

Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not
need to switch the cargo toolchain to nightly. Do we care about
formatting stability of our codebase across Rust versions? (I don't)
2023-01-14 23:18:58 -05:00
Isaiah Gamble
efcbfd5206
fix(ext/fetch) Fix request clone error in flash server (#16174) 2023-01-15 05:08:34 +01:00
Kamil Ogórek
1d7203c24c
fix(ext/flash): Correctly handle errors for chunked responses (#17303)
The leading cause of the problem was that `handleResponse` has
`tryRespondChunked` passed as an argument, which in turn is implemented
as a call to `core.ops.op_try_flash_respond_chuncked`, that throws in
the repro code.

`handleResponse` was not handled correctly, as it not returned any
value, and had no `catch` attached to it.
It also effectively was never correctly handled inside two other blocks
with `resp.then` and `PromisePrototypeCatch(PromisePrototypeThen(resp,
"..."))` as well, as it just short-circuited the promise with an empty
resolve, instead of relying on the last `(async () => {})` block.

This change makes `handleResponse` return a correct value and attach
`onError` handler to the "non-thenable" variant of response handling
code.
2023-01-14 15:06:28 +01:00
Divy Srivastava
ae2981d7ac
fix(runtime/fs): preserve permissions in copyFileSync for macOS (#17412)
Fixes https://github.com/denoland/deno/issues/16921
2023-01-14 13:45:30 +00:00
Kiryl Dziamura
934ed8e7d1
fix(npm): use original node regex in npm resolution (#17404)
Fixes regex for matching conditional exports in a package.
Updated to the same regex Node.js uses.
2023-01-14 00:57:24 +01:00
Bartek Iwańczuk
1b17985c5a
fix(permissions): lock stdio streams when prompt is shown (#17392)
This commit changes permission prompt to lock stdio streams when prompt
is shown.
2023-01-13 10:05:07 -05:00
Bartek Iwańczuk
9644220df2
tests: Disable flaky flash_shutdown test (#17390) 2023-01-13 15:19:20 +01:00
Yiyu Lin
a00e432297
chore: add copyright_checker tool and add the missing copyright (#17285) 2023-01-13 16:51:32 +09:00
Bartek Iwańczuk
9e282155b7
tests: move integration tests to a single module (#17380)
Effectively reverts changes done in
https://github.com/denoland/deno/pull/16816
2023-01-13 02:59:13 +01:00
Bartek Iwańczuk
4d66be1e05
Revert "test: fix flaky deno_land_unsafe_ssl test (#17357)" (#17368)
This reverts commit ee2c6cb04a.

Closes https://github.com/denoland/deno/issues/17359
2023-01-12 15:25:20 +01:00
Leo Kettmeir
cc806cdf21
fix: check if BroadcastChannel is open before sending (#17366)
Fixes #16978
2023-01-12 13:43:36 +01:00
Leo Kettmeir
a6b3910bdf
feat: allow passing a ReadableStream to Deno.writeFile/Deno.writeTextFile (#17329)
Closes #13229
2023-01-12 03:37:23 +01:00
Bartek Iwańczuk
ee2c6cb04a
test: fix flaky deno_land_unsafe_ssl test (#17357) 2023-01-12 01:04:25 +01:00
Leo Kettmeir
b0e0e4f24b
fix: don't panic on resolveDns if unsupported record type is specified (#17336)
Fixes #14373
2023-01-11 21:31:14 +01:00
Nayeem Rahman
71ea4ef274
fix(watch): preserve ProcState::file_fetcher between restarts (#15466)
This commit changes "ProcState" to store "file_fetcher" field in an "Arc",
allowing it to be preserved between restarts and thus keeping the state
alive between the restarts. File watchers for "deno test" and "deno bench"
now reset "ProcState" between restarts.
2023-01-10 16:28:10 +01:00
Bartek Iwańczuk
636352e0ca
fix(npm): allow to read package.json if permissions are granted (#17209)
This commit changes signature of "deno_core::ModuleLoader::resolve" to pass
an enum indicating whether or not we're resolving a specifier for dynamic import.

Additionally "CliModuleLoader" was changes to store both "parent permissions" (or
"root permissions") as well as "dynamic permissions" that allow to check for permissions
in top-level module load an dynamic imports.

Then all code paths that have anything to do with Node/npm compat are now checking
for permissions which are passed from module loader instance associated with given
worker.
2023-01-10 14:35:44 +01:00
Leo Kettmeir
e6c49d14b1
feat(runtime/os): add Deno.env.has() (#17315) 2023-01-09 20:19:55 +01:00
David Sherret
2be1282be4
fix(install): should always include --no-config in shim unless --config is specified (#17300)
Closes #17294
2023-01-08 09:03:55 -05:00