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

482 commits

Author SHA1 Message Date
David Sherret
b34e751a5b
refactor: make resolver required (#17783)
Makes the resolver required and prints a warning when vendoring and a
dynamic import can't be resolved.

Closes #16522
2023-02-15 11:30:54 -05:00
Bartek Iwańczuk
1d00bbe47e
fix: loading built-in Node modules embedded in the binary (#17777)
Fixes bug introduced in ed3a7ce2f7 that
caused errors when loading built-in Node modules, when using "deno_graph".
2023-02-14 16:48:27 +01:00
Bartek Iwańczuk
0f1349bca8
feat: Deprecate 'deno bundle' subcommand (#17695)
This commit adds a deprecation warning when using "deno bundle"
subcommand and removes it from the output of "deno help".
2023-02-14 02:13:44 +01:00
Nayeem Rahman
13493d9121
fix(cli/graph_util): don't append referrer info for root module errors (#17730) 2023-02-11 10:36:29 -05: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
David Sherret
b3e88e0681
refactor: deno_graph 0.43 upgrade (#17692) 2023-02-09 22:00:23 -05:00
Kamil Ogórek
ef9b66950f
fix: use static Reflect methods in nodeGlobalThis proxy (#17696)
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-08 19:11:12 -05:00
Leo Kettmeir
49af1ab18d
refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
Leo Kettmeir
b4aa153097
refactor: Use ES modules for internal runtime code (#17648)
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-02-07 20:22:46 +01:00
Bartek Iwańczuk
65500f36e8
chore: upgrade rusty_v8 to 0.62.2 (#17604)
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2023-02-07 13:36:41 +01:00
Bartek Iwańczuk
4d7145dd5a
chore: update std submodule to 0.176.0 (#17668) 2023-02-06 23:22:52 +01:00
Leo Kettmeir
84a96110cd
refactor: rename deno specifiers to internal (#17655) 2023-02-05 17:49:20 +01:00
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
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
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
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
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
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
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
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
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
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
David Sherret
d1cdf65b10
fix(npm): handle declaration file resolution where packages incorrectly define "types" last in "exports" (#17290)
Closes #17279
2023-01-06 12:57:52 -05:00
David Sherret
0ee64ad847
fix: upgrade deno_ast to 0.23 (#17269)
Closes #17172
Closes #15669
Closes #8529
2023-01-04 18:54:54 -05:00
Fenix
501472f06b
fix(cli): bundle command support shebang file (#17113) 2023-01-03 16:19:28 +00:00
David Sherret
10e4b2e140
chore: update copyright year to 2023 (#17247)
Yearly tradition of creating extra noise in git.
2023-01-02 21:00:42 +00:00
Bartek Iwańczuk
ef5f8cd265
fix(lsp): "Add all missing imports" uses correct specifiers (#17216)
This commit fixes "Add all missing imports" quick fix; before
it was replacing all occurrences with the same specifier. Now
every line returned from TSC is processed individually.
2022-12-29 21:07:09 +01:00
Bartek Iwańczuk
208c91b68f
fix(core): run macrotasks and next ticks after polling dynamic imports (#17173)
This commit fixes handling of rejected promises in dynamic imports
evaluation.

Previously we were running callbacks for next ticks and macrotasks
_before_ polling
dynamic imports and checked for unhandled rejections immediately after.
This is wrong,
as `unhandledrejection` event is dispatched and its callbacks are run as
macrotasks.

This commit changes order of actions performed by the event loop to
following:
- poll async ops
- poll dynamic imports
- run next tick callbacks
- run macrotask callbacks
- check for unhandled promise rejections
2022-12-23 19:46:24 +01:00
Kamil Ogórek
6a47ffa4d3
fix(core): Do not print errors prop for non-AggregateError errors (#17123)
This commit fixes formatting of JSError with "errors" property. Before this
commit all instances of "Error" were treated as if they were "AggregateError"
if they had "errors" property. After this commit only actual instances of 
"AggregateError" are formatted in such a way, while instances of "Error"
that have "errors" property are formatted without showing details of "errors".
2022-12-21 01:18:49 +01:00
Kamil Ogórek
199144daf0
fix(cli): allow for specifying noErrorTruncation compiler option (#17127)
Fixes https://github.com/denoland/deno/issues/16568
2022-12-19 20:29:44 -05:00
Leo Kettmeir
80955dfa61
fix: display URL in invalid URL error (#17128) 2022-12-19 20:58:02 +01:00
Bartek Iwańczuk
383d40a33b
fix(npm): conditional exports with --node-modules-dir (#17111)
This commit fixes conditional exports in `require()` implementation
if `--node-modules-dir` flag is used.
2022-12-19 17:09:54 +01:00
David Sherret
f2c9cc500c
fix(lint): column number for pretty reporting was off by 1 (#17107)
Closes #17086
2022-12-17 16:00:33 -05:00
David Sherret
9e977cd6aa
fix(npm): improve exports resolution when type checking (#17071)
Closes #17012
2022-12-15 21:15:25 -05:00
Leo Kettmeir
50c7526526
fix: re-add Response.json static method (#17061)
Same as #16040
2022-12-15 10:33:19 -05:00
Bartek Iwańczuk
4a17c93088
feat: add --inspect-wait flag (#17001)
This commit adds new "--inspect-wait" flag which works similarly
to "--inspect-brk" in that it waits for inspector session to be
established before running code. However it doesn't break on the first
statement of user code, but instead runs it as soon as a session
is established.
2022-12-12 15:33:30 +01:00