1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-16 16:53:20 -05:00
Commit graph

8888 commits

Author SHA1 Message Date
denobot
65755a115a
chore: forward v1.30.1 release commit to main (#17623)
This is the release commit being forwarded back to main for 1.30.1
2023-02-02 16:28:40 +00: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
Divy Srivastava
690b6ac39e
fix(napi): remove wrong length check in napi_create_function (#17614)
This check is not needed. 

This PR + #17613 makes `npm:ref-napi` work with Deno.
2023-02-01 20:18:03 +05:30
Divy Srivastava
524bccdf6a
fix(napi): return node globalThis from napi_get_global (#17613)
Fixes https://github.com/denoland/deno/issues/17587
2023-02-01 15:41:04 +01:00
luketpeterson
1b46b2f0e4
chore: bump serde & serde_json deps to use semver minimums (#17610)
Changing serde & serde_json dependencies to use semver minimums rather
than exact crate version.

Fixes https://github.com/denoland/deno/issues/17609
2023-02-01 14:40:35 +00:00
David Sherret
600fff79cd
refactor(semver): generalize semver related structs (#17605)
- Generalizes the npm version code (ex. `NpmVersion` -> `Version`,
`NpmVersionReq` -> `VersionReq`). This is a slow refactor towards
extracting out this code for deno specifiers and better usage in
deno_graph.
- Removes `SpecifierVersionReq`. Consolidates `NpmVersionReq` and
`SpecifierVersionReq` to just `VersionReq`
- Removes `NpmVersionMatcher`. This now just looks at `VersionReq`.
- Paves the way to allow us to create `NpmPackageReference`'s from a
package.json's dependencies/dev dependencies
(`VersionReq::parse_from_npm`).
2023-01-31 21:27:40 -05:00
Luca Casonato
e85ca8be0d
chore(core): remove have_unpolled_ops on rt state (#17601)
It's not needed - `!state.have_unpolled_ops.is_empty()` does the same
thing.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-31 01:17:51 +01: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
Leo Kettmeir
3035dee9f1
chore: update webgpu (#17534) 2023-01-30 15:14:16 +01:00
Kenta Moriuchi
266915d5ce
fix(ext): internal structuredClone for ArrayBuffer and TypedArray subclasses (#17431) 2023-01-29 15:15:01 +01:00
Aapo Alasuutari
04ba709b6e
perf(ops): Remove unnecessary fast call fallback options usage (#17585)
Currently fast ops will always check for the alignment of a TypedArray
when getting a slice out of them. A match is then done to ensure that
some slice was received and if not a fallback will be requested.

For Uint8Arrays (and WasmMemory which is equivalent to a Uint8Array) the
alignment will always be okay. Rust probably optimises this away for the
most part (since the Uint8Array check is `x % 1 != 0`), but what it
cannot optimise away is the fast ops path's request for fallback options
parameter.

The extra parameter's cost is likely negligible but V8 will need to
check if a fallback was requested and prepare the fallback call just in
case it was. In the future the lack of a fallback may also enable V8 to
much better optimise the result handling.

For V8 created buffers, it seems like all buffers are actually always
guaranteed to be properly aligned: All buffers seem to always be created
8-byte aligned, and creating a 32 bit array or 64 bit array with a
non-aligned offset from an ArrayBuffer is not allowed. Unfortunately,
Deno FFI cannot give the same guarantees, and it is actually possible
for eg. 32 bit arrays to be created unaligned using it. These arrays
work fine (at least on Linux) so it seems like this is not illegal, it
just means that we cannot remove the alignment checking for 32 bit
arrays.
2023-01-29 19:35:08 +05:30
Satya Rohith
2c78550144
refactor(core): derive equality traits for ResolutionKind enum (#17578)
The commit derives Eq, PartialEq, and Debug traits for the
`ResolutionKind` enum to make it possible for external
implementors to assert ResolutionKind.
2023-01-29 17:39:43 +05:30
RA80533
50ba8ae6b2
docs: fix typos in WriteFileOptions's JSDoc (#17507) 2023-01-28 22:10:06 +01:00
David Sherret
8b35229da3
fix(install): tsconfig.json -> deno.json for config file suffix (#17573)
Closes #17571
2023-01-28 14:51:11 -05:00
Bartek Iwańczuk
9cd271a9a5
fix(napi): guard threadsafe function counters behind a mutex (#17552) 2023-01-28 16:30:05 +01:00
David Sherret
fe11df09b1
fix(lsp): update document dependencies on configuration change (#17556) 2023-01-28 10:18:32 -05:00
David Sherret
1803df7d3a
fix(fmt): semiColons: false - handle prop with following generator and do while with no block body (#17567)
Closes #17559
2023-01-28 10:06:37 -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
Geert-Jan Zwiers
1a1faff2f6
chore(cli/cache): fewer string allocations (#17549) 2023-01-27 20:46:38 +05:30
Geert-Jan Zwiers
7f38f30a5c
refactor(lsp): fewer clones (#17551) 2023-01-26 23:24:03 +01:00
David Sherret
21065797f6
fix(upgrade): ensure temp dir cleanup on failure (#17535)
Closes #17533
2023-01-26 09:02:25 -05:00
Kenta Moriuchi
7b6339da6a
fix(core): Add lint check for core (#17223)
The prefer-primordials lint was skipped for `core/*.js`.
2023-01-26 16:56:42 +05:30
Spencer Comfort
87c2493855
chore(ci): update python to 3.11 (#17530) 2023-01-26 16:52:32 +05:30
Ikko Eltociear Ashimine
67a3b5f72a
chore(core): fix typo in runtime.rs (#17537)
determinstic -> deterministic
2023-01-26 06:54:01 +00:00
denobot
a6f915c22f
1.30.0 (#17532)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-26 00:15:08 +01: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
Leo Kettmeir
b71d224d11
fix(upgrade): don't display release information for canary (#17516) 2023-01-25 16:29:27 +01: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
Asher Gomez
0d1471282b
feat(upgrade): link to release notes & blog post (#17073)
This change prints a link to the release notes to `deno upgrade` output
and its variations.

Release notes aren't printed for commands relating to canary versions.

Closes #16350.
2023-01-24 13:30:45 +01: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
Divy Srivastava
cd19231306
fix(napi): improve napi_adjust_external_memory (#17501)
<!--
Before submitting a PR, please read http://deno.land/manual/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
2023-01-23 19:00:01 +05:30
Divy Srivastava
c3e0b12c72
fix(napi): handle return value from initializer (#17502)
Fixes https://github.com/denoland/deno/issues/17349
2023-01-23 18:59:46 +05:30
Divy Srivastava
b96bbc32c8
fix(napi): improve napi_is_detached_arraybuffer (#17498) 2023-01-23 14:22:18 +05:30