Commit graph

513 commits

Author SHA1 Message Date
Kurt Mackey cd67f7bdc8
fix: Create body stream from any valid bodySource (#7128)
Fixes #6752
2020-08-20 11:47:58 -04:00
Nayeem Rahman 015fa0bd41
refactor: permissions (#7074) 2020-08-18 16:29:32 -04:00
Bert Belder f6e9150b33
Async op dispatcher support with 'stateful_json_op_(a)sync()' (#7095)
Closes: #7020
2020-08-18 20:50:52 +02:00
Bert Belder b308a774e8
Fix nightly and Windows-only clippy warnings (#7095) 2020-08-18 20:50:52 +02:00
Casper Beyer 3c986ca524
test(cli): use assertThrowsAsync for permission tests (#7092) 2020-08-18 11:05:51 -04:00
crowlKats b44b7a9a60
Blob.arrayBuffer returns uint8array (#7086) 2020-08-17 17:46:08 -04:00
Joel Chippindale 1f7d4089f9
Fix handling of multiple spaces in URLSearchParams (#7068)
This ensures that all spaces are set to be "+" in the string rather than
just the first and brings deno into line with how browsers handle spaces
in URLSearchParams, see #7001.
2020-08-17 14:52:45 -04:00
Tomofumi Chiba b684df784e
fix: add NO_PROXY to deno help and add test (#7048) 2020-08-15 09:48:29 -04:00
Casper Beyer 4b3a3d9d0f
Enable WebAssembly.instantiateStreaming (#7043) 2020-08-14 13:48:37 -04:00
souldzin d6cee70695
feat: Add "--json" flag to deno lint (#6940)
Co-authored-by: JackSkylark <jdslaughter44@gmail.com>
2020-08-13 17:30:46 +02:00
Nayeem Rahman 18ec1290af
feat: Support file URLs in Deno.run for executable (#6994) 2020-08-12 14:20:34 -04:00
Divy Srivastava 6706eb5515
feat: add "--ignore" to deno lint (#6934) 2020-08-12 15:47:44 +02:00
Prabhanjan b344a7f81f
fix: URLSearchParams.toString() behaviour is different from browsers (#7017) 2020-08-12 12:08:24 +02:00
Paul Thompson eed77aa020
feat(web): FileReader API (#6673) 2020-08-11 14:00:53 +02:00
Ryan Dahl 7d01fcbb77
Remove unnecessary drop calls (#7007) 2020-08-10 17:31:05 -04:00
Nayeem Rahman 52c1017a74
feat: Stabilize Deno.mainModule (#6993) 2020-08-10 16:41:51 -04:00
uki00a 67fe8cd848
fix: console.log should see color codes when grouping occurs (#7000) 2020-08-09 19:09:09 -04:00
Bert Belder 604d008190
test(cli/wasm_unreachable): don't assume git work dir is named 'deno' (#6991) 2020-08-08 22:06:44 +02:00
Bert Belder febb972dd4
test(cli/stat_test): older versions of Linux don't support birthtime (#6991) 2020-08-08 22:06:44 +02:00
Bert Belder f17eb634fa
test(cli/inspector_port_collision): skip test on WSL (#6991) 2020-08-08 22:06:44 +02:00
Bert Belder 9806933f57
test(cli/inspector_port_collision): fail rather than hang (#6991) 2020-08-08 22:06:44 +02:00
Bert Belder f22b7dc783
fix(cli): show error on unrecognized V8 flag, exit on --help (#6980) 2020-08-08 21:23:21 +02:00
Bartek Iwańczuk 59ca66a207
Encode op errors as strings instead of numbers (#6977) 2020-08-07 16:47:18 -04:00
Nayeem Rahman 479164d287
fix(deno info): Never type check (#6978) 2020-08-07 16:46:54 -04:00
Bartek Iwańczuk 41215eb29c
Op crate for Web APIs (#6906)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-08-07 16:55:02 +02:00
Luca Casonato ce7808baf0
feat(cli): custom http client for fetch (#6918) 2020-08-05 20:44:03 +02:00
Maayan Hanin 5fc5e7b54a
fix(cli): add support for non-UTF8 source files (#6789)
Fixes: #5542
2020-08-03 23:39:48 +02:00
Luca Casonato 9d50c5c1a6
feat: hash file names in gen cache (#6911) 2020-08-03 14:55:03 +02:00
Divy Srivastava 0da4779b17
feat(unstable): add "--ignore" flag to deno fmt (#6890) 2020-07-30 12:09:08 -04:00
Bartek Iwańczuk 315efbc0e8
fix: downcast from SwcDiagnosticBuffer to OpError (#6909) 2020-07-28 15:08:13 -04:00
Bartek Iwańczuk 69552b1def
upgrade: deno_lint v0.1.17 (#6869) 2020-07-25 17:47:55 +02:00
Bartek Iwańczuk b45f9a7357
fix: deno-types directive should have higher precedence than X-TypeScript-Types header (#6761) 2020-07-24 14:21:36 +02:00
Nayeem Rahman a8f74aa381
fix: Improve URL compatibility (#6807)
- Fix protocol regex.
- Truncate repeated leading slashes in file paths.
- Make drive letter support platform-independent.
- Drop the hostname if a drive letter is parsed.
- Fix drive letter normalization and basing.
- Allow basing over the host.
- Fix same-protocol basing.
- Remove Windows UNC path support.
- Reverts #6418. This is non-standard. Wouldn't be too much of a problem but it 
   makes other parts of the spec hard to realize.
2020-07-23 21:37:11 -04:00
Nayeem Rahman b61347b255
fix(cli/js/ops/fs_events): Ignore polling errors caused by return() (#6785) 2020-07-23 21:33:52 -04:00
Bartek Iwańczuk b449964d1a
refactor: remove more compiler runtime code (#6841) 2020-07-23 15:29:36 +02:00
Casper Beyer 587eefe773
test(cli/unit): remove rogue console.log statement (#6846) 2020-07-22 16:46:43 -04:00
Ryan Dahl bf9930066d
Reduce size of TypeScript Compiler snapshot (#6809)
This PR is intentionally ugly. It duplicates all of the code in cli/js2/ into
cli/tsc/  ... because it's very important that we all understand that this code
is unnecessarily duplicated in our binary. I hope this ugliness provides the
motivation to clean it up.

The typescript git submodule is removed, because it's a very large repo and
contains all sorts of stuff we don't need. Instead the necessary files are
copied directly into the deno repo. Hence +200k lines.

COMPILER_SNAPSHOT.bin size
```
master         3448139
this branch    3320972
```

Fixes #6812
2020-07-22 12:03:46 -04:00
Ryan Dahl 2460689b1a
Remove deno_typescript (#6813) 2020-07-20 19:49:57 -04:00
Bartek Iwańczuk fa61956f03
Port internal TS code to JS (#6793)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-07-19 19:49:44 +02:00
Bartek Iwańczuk 6e34f6a7cc
fix: providing empty source code for missing compiled files (#6760)
This commit adds a fallback mechanism for absent compiled source file.

Because imported type declaration files are not emitted by TS compiler
and their imports are not elided users often hit "No such file or directory"
error. With this commit in such situation an empty source file will be
provided to V8 with a warning to the user suggesting using "import type"/
"export type" syntax instead.
2020-07-17 15:50:17 +02:00
JohannLai d60f9c2549
fix(cli/js/web): IPv6 hostname should be compressed (#6772) 2020-07-16 12:08:29 -04:00
Bartek Iwańczuk 73a9036089
fix: panic for runtime error in TS compiler (#6758) 2020-07-15 14:23:17 +02:00
David Sherret cde4dbb351
Use dprint for internal formatting (#6682) 2020-07-14 15:24:17 -04:00
Maayan Hanin d619e3c7ac
fix(cli): don't panic when no "HOME" env var is set (#6728) 2020-07-13 18:24:54 +02:00
Bartek Iwańczuk 11560387bb
Revert "feat: move unstable Deno.permissions to navigator.permissions… (#6729)
* Revert "feat: move unstable Deno.permissions to navigator.permissions (#6244)"

This reverts commit 202e7fa6ad.
2020-07-13 18:23:24 +02:00
Marcos Casagrande 44187c81f4
test: ignore max buffer tests (#6732) 2020-07-13 15:40:48 +02:00
uki00a 4731f4800c
fix(Deno.ppid): improve error message when --unstable is missing (#6717) 2020-07-13 14:00:56 +02:00
Marcos Casagrande 1a96a96e10
feat(cli): add copy argument to Buffer.bytes (#6697) 2020-07-13 00:58:59 -04:00
Nayeem Rahman 63edeb1c36
fix(cli/js/web/url): Implement IPv4 hostname parsing (#6707) 2020-07-13 00:56:45 -04:00
Marcos Casagrande 4aeac64ecd
fix(cli/fetch): fix relative redirect (#6715) 2020-07-13 00:53:36 -04:00
Kitson Kelly dd59bf5fc3
fix: more tolerant performance.measure unit tests (#6726)
Fixes #6725
2020-07-13 00:50:57 -04:00
Oscar Linde 3be2064803
feat(cli): add DENO_CERT environment variable (#6370) 2020-07-12 19:18:27 -04:00
Bartek Iwańczuk a26b4a9f1e
chore: reenable ignored integration tests (#6703) 2020-07-11 18:29:55 +02:00
Nayeem Rahman 5ec41cbcc2
feat(Deno.inspect): Add sorted, trailingComma, compact and iterableLimit to InspectOptions (#6591) 2020-07-11 00:52:18 -04:00
Kitson Kelly 40d081d3d9
feat: add performance user timing APIs (#6421) 2020-07-10 22:38:15 -04:00
Nayeem Rahman 69e0886362
fix(URL): Implement spec-compliant host parsing (#6689) 2020-07-10 15:51:24 -04:00
Marcos Casagrande 39dba12a06
fix(cli/buffer): allow Buffer to store MAX_SIZE bytes (#6570) 2020-07-10 11:49:35 -04:00
Sebastien Filion 1bcc35b84a
feat(unstable): add Deno.consoleSize (#6520) 2020-07-10 10:07:12 -04:00
Maayan Hanin edb7a0eead
fix(cli): panic when stdio is null on windows (#6528)
Fixes: #6409
2020-07-09 21:06:51 +02:00
Kitson Kelly 202e7fa6ad
feat: move unstable Deno.permissions to navigator.permissions (#6244) 2020-07-09 05:00:18 -04:00
Emmanuel cbbd944359
feat(cli): json option for "deno info" (#6372) 2020-07-08 10:50:12 -04:00
uki00a a2bf61d1ae
feat(unstable): Deno.ppid (#6539) 2020-07-08 10:35:45 -04:00
Marcos Casagrande 231899695d
feat(cli): Add WriteFileOptions to writeTextFile & writeTextFileSync (#6280) 2020-07-08 09:38:22 -04:00
Kitson Kelly 82aabb657a
feat: add --no-check option (#6456)
This commit adds a "--no-check" option to following subcommands:
- "deno cache"
- "deno info"
- "deno run"
- "deno test"

The "--no-check" options allows to skip type checking step and instead 
directly transpiles TS sources to JS sources. 

This solution uses `ts.transpileModule()` API and is just an interim
solution before implementing it fully in Rust.
2020-07-08 11:26:39 +02:00
Marcos Casagrande e4899b6ba4
perf(cli/body): improve .arrayBuffer() speed (#6669) 2020-07-07 22:25:34 -04:00
Sebastien Filion 4534db656d
feat(test): Add support for regex in filter flag (#6343)
Currently, the documentation makes it sound like the test subcommand's filter
flag could accept some kind of pattern matching value like a glob or a regex,
although the function "createFilterFn" accepts a regex as an argument, there's
no way to pass an actual regex value from the CLI.

This commit makes it possible to pass a string that could be cast as regex 
when string matches "^/.*/$".

With this change, a user can use the filter flag as follow:

deno test --filter "/test-.+/"

Also tested that `\` get escaped properly, on MacOS at least, and this is 
also a valid flag:

deno test --filter "/test-\d+/"
2020-07-07 15:13:38 +02:00
Takahiko Inayama 14a44464a6
feat: add lockfile support to bundle (#6624) 2020-07-07 13:05:28 +02:00
uki00a ab4c574f52
fix: Deno.setRaw shouldn't panic on ENOTTY (#6630) 2020-07-06 18:26:34 -04:00
crowlKats 2b52e3daf1
feat: deno upgrade --output (#6352) 2020-07-06 18:21:26 -04:00
dubiousjim 6b78729ba8
feat: Deno.chown() make uid, gid args optional (#4612) 2020-07-06 13:15:13 +02:00
Bartek Iwańczuk d1289db1c3
chore: re-enable tests using media_types (#6642) 2020-07-05 23:09:50 -04:00
Marcos Casagrande 3b4260dc54
fix(cli/fetch): response constructor default properties (#6650) 2020-07-05 21:37:18 -04:00
Bert Belder e4e80f20c2
fix(tools): command line args parsing bug, unused function parameter (#6629) 2020-07-04 19:15:03 -04:00
Kyle June d52e4007c8
Update timers to ignore Date Override (#6552) 2020-07-04 15:16:27 -04:00
Ryan Dahl 5f9e600c5b
chore: port http_server.py to rust (#6364) 2020-07-04 13:05:01 -04:00
Casper Beyer fca492907c
test(cli): enable realpath symlink tests on Windows (#6627) 2020-07-04 16:54:20 +02:00
Bartek Iwańczuk cc12e86fe3
refactor: lock file (#6569)
- refactor lock file creation
- provide deterministic output in lock file (alphabetically sorted)
- dynamic imports are checked against lock file
2020-07-02 17:54:51 +02:00
Bartek Iwańczuk 851344f2ed
upgrade: swc_ecma_visit, dprint, deno_lint (#6580) 2020-07-01 16:04:56 +02:00
Andrey Filatkin a690a20679
fix(cli/upgrade): upgrade fails on Windows with space in temp path (#6522) 2020-06-29 09:13:07 -04:00
Marcos Casagrande 89ebe2079b
fix(cli/body): Maximum call stack size exceeded error (#6537) 2020-06-28 10:31:56 -04:00
Marcos Casagrande 6c093c0b5a
fix(cli): Buffer.bytes() ArrayBuffer size (#6511) 2020-06-27 13:52:27 +02:00
Ryan Dahl 42464e922d
'Compile' messages changed to 'Check' messages (#6504) 2020-06-26 16:59:08 -04:00
Casper Beyer e278c90d8a
feat(unstable): add Deno.fdatasyncSync and fdatasync (#6403) 2020-06-26 08:36:35 -04:00
Nayeem Rahman ed0b1d4627
fix(cli/js/web/url): Support UNC paths on Windows (#6418) 2020-06-26 08:34:17 -04:00
Casper Beyer 175867ab76
fix(cli): strings shouldn't be interpreted as file URLs (#6412) 2020-06-26 08:29:34 -04:00
Kitson Kelly 70463bac7d
fix: Omit buildinfo when --reload passed (#6489) 2020-06-26 08:23:25 -04:00
Bartek Iwańczuk 4817c153e4
Re-land "fix(cli): ipv6 parsing for --allow-net params" (#6472)
With some minor adjustments
2020-06-26 08:09:02 -04:00
Ali Hasani 150c04aea7
remove duplicate identifier (#6483) 2020-06-25 21:14:42 +02:00
Luca Casonato 4102a19585
fix: panic when process stdio rid is 0 or invalid (#6405) 2020-06-25 12:38:19 -04:00
Kitson Kelly 6f09b8de41
Restore stats for incremental compile (#6474) 2020-06-25 15:50:16 +02:00
Casper Beyer a455a0babf
Fix readLinkSync and readLink tests on Windows (#6463) 2020-06-25 07:27:23 -04:00
Casper Beyer ab0f12fcb8
Remove stale comment referring to deleted code (#6462) 2020-06-25 07:08:42 -04:00
Casper Beyer 87f8f99c49
refactor(cli/tests/unit) to use assertThrows (#6459) 2020-06-25 00:57:08 +02:00
Bartek Iwańczuk 6bbe52fba3
Revert "fix(cli): ipv6 parsing for --allow-net params (#6453)" (#6458) 2020-06-25 00:41:13 +02:00
Bartek Iwańczuk 3cbd1075c7
Incremental compilation for TypeScript (#6428)
This commit adds incremental compilation capabilities to internal TS compiler.

Instead of using "ts.createProgram()" API for compilation step (during deno 
startup), "ts.createIncrementalProgram()" API is used instead.

Thanks to TS' ".tsbuildinfo" file that already stores all necessary metadata
for compilation I was able to remove our own invention that is ".graph" file. 
".tsbuildinfo" file is stored alongside compiled source and is used to 
cache-bust outdated dependencies, facilitated by the "version" field. 
The value for "version" field is computed in Rust during loading of module 
graph and is basically a hash of the file contents.

Please keep in mind that incremental compilation is only used for initial 
compilation (or dynamic imports compilation) - bundling and runtime compiler 
APIs haven't been changed at all.

Due to problems with source map I changed compilation settings to inline 
source map (inlineSourceMap instead of sourceMap).
2020-06-24 16:59:12 +02:00
Nayeem Rahman 3314b46321
fix(cli/js/web/console): Improve string quoting behaviour (#6457) 2020-06-24 09:47:05 -04:00
Colin Harrington 702547d65a
fix(cli): ipv6 parsing for --allow-net params (#6453)
Co-authored-by: Liming Jin <jinliming2@gmail.com>
2020-06-24 09:43:29 -04:00
Kitson Kelly 1d8fc39494
Add ability to output compiler performance information (#6434) 2020-06-24 11:58:23 +02:00
Chris Couzens f6a4146973
fix(cli/web): Support URLSearchParam as Body (#6416)
The following used to fail in Deno despite working in the browser:

```javascript
new Request('http://localhost/', {method: 'POST', body: new URLSearchParams({hello: 'world'})}).text().then(console.log)
```
2020-06-23 23:56:05 -04:00
Casper Beyer 6b3be01a00
feat(unstable): add Deno.fstatSync and fstat (#6425) 2020-06-22 08:58:52 -04:00
Casper Beyer 40866d7cd5
feat(unstable): add Deno.fsyncSync and fsync (#6411) 2020-06-21 09:29:44 -04:00
Ryan Dahl 0a81ec6b1e
Remove Deno.dir and dirs dependency (#6385) 2020-06-20 23:49:27 -04:00
Casper Beyer 86f92e04c7
feat(unstable): add Deno.ftruncate and ftruncateSync (#6243) 2020-06-20 09:46:10 -04:00
Bartek Iwańczuk 826a3135b4
refactor(compiler): split code paths for compile and bundle (#6304)
* refactor "compile" and "runtimeCompile" in "compiler.ts" and factor out
separate methods for "compile" and "bundle" operations

* remove noisy debug output from "compiler.ts"
 
* provide "Serialize" implementations for enums in "msg.rs"

* rename "analyze_dependencies_and_references" to "pre_process_file" and
move it to "tsc.rs"

* refactor ModuleGraph to use more concrete types and properly annotate
locations where errors occur

* remove dead code from "file_fetcher.rs" - "SourceFile.types_url" is no
longer needed, as type reference parsing is done in "ModuleGraph"

* remove unneeded field "source_path" from ".meta" files stored for
compiled source file (towards #6080)
2020-06-19 12:27:15 +02:00
uki00a 345a5b3dff
fix: "deno test" should respect NO_COLOR=true (#6371) 2020-06-19 12:10:31 +02:00
Alan Gou ffedbd79ad
build: lint cli/tests/unit using deno lint (#6327) 2020-06-19 11:05:37 +02:00
Bartek Iwańczuk 90c5dcfe79
chore(test): move testing utilities to test_util crate (#6360) 2020-06-18 11:54:55 -04:00
Ryan Dahl a2969ecd27
Deno.bundle supports targets < ES2017 (#6346)
This commit provides a "system_loader_es5.js" bundle loader which will be added
to the bundle when the target is < ES2017, which is the minimum target syntax
required for "system_loader.js".

Supports #5913 (via Deno.bundle()) with a couple caveats:

* Allowing "deno bundle" to take a different target is not supported, as we
specifically ignore "target" when passed in a TypeScript config file. This is
because deno bundle is really intended to generate bundles that work in Deno.
It is an unintentional side effect that some bundles are loadable in browsers.

* While a target of "es3" will be accepted, the module loader will still only be
compatible with ES5 or later. Realistically no one should be expecting bundles
generated by Deno to be used on IE8 and prior, and there is just too much
"baggage" to support that at this point.

This is a minor variation of 75bb9d, which exposed some sort of internal V8 bug.
Ref #6358

This is 100% authored by Kitson Kelly. Github might change the author when landing
so I'm leaving this in:
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-06-18 09:06:48 -04:00
River 2a5af8b36b
fix: decode path properly on win32 (#6351) 2020-06-18 06:10:07 -04:00
Bartek Iwańczuk 097e42418c
chore: move fmt test to integration tests (#6340) 2020-06-17 21:50:30 +02:00
Bartek Iwańczuk e60922981b
Revert "Deno.bundle supports targets < ES2017. (#6328)" (#6342)
This reverts commit 75bb9dbdfc.
2020-06-17 19:44:40 +02:00
Kitson Kelly 75bb9dbdfc
Deno.bundle supports targets < ES2017. (#6328)
This commit provides a "system_loader_es5.js" bundle loader which will be added
to the bundle when the target is < ES2017, which is the minimum target syntax
required for "system_loader.js".

Supports #5913 (via Deno.bundle()) with a couple caveats:

* Allowing "deno bundle" to take a different target is not supported, as we
specifically ignore "target" when passed in a TypeScript config file. This is
because deno bundle is really intended to generate bundles that work in Deno.
It is an unintentional side effect that some bundles are loadable in browsers.

* While a target of "es3" will be accepted, the module loader will still only be
compatible with ES5 or later. Realistically no one should be expecting bundles
generated by Deno to be used on IE8 and prior, and there is just too much
"baggage" to support that at this point.
2020-06-17 15:13:02 +02:00
skdltmxn b3c72d1e45
feat(std/hash): reimplement all hashes in WASM (#6292) 2020-06-16 17:12:50 -04:00
Peter Evers fc850b11e5
unixpacket should also return byte length on send (#6291) 2020-06-15 12:20:45 -04:00
Bartek Iwańczuk b1893e65f2
fix(compiler): JSX compilation and provide better error message (#6300) 2020-06-15 17:53:05 +02:00
Kermit Xuan 77545219a6
fix: DatagramConn.send should return bytes sent (#6265) 2020-06-13 10:14:31 -04:00
Nayeem Rahman 1fff6f55c3
refactor: Don't destructure the Deno namespace (#6268) 2020-06-12 15:23:38 -04:00
Nayeem Rahman e613bfe47a
feat: Add TestDefinition::only (#5793) 2020-06-12 11:58:04 -04:00
Ryan Dahl e9424bf6b5
Revert "feat: add Deno.osName()" (#6261)
Deno.build.os provides the same functionality

This reverts commit 6ccf9037a6.
2020-06-12 09:53:53 -04:00
Casper Beyer b34f468943
improve truncate tests (#6251) 2020-06-12 09:40:06 -04:00
Ryan Dahl d0970daacd
make std deno-lint clean (#6240)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-06-12 09:19:29 -04:00
Casper Beyer 9285221452
fix(cli/js): broken truncate permission tests (#6249)
The tests for testing that `Deno.truncateSync` and `Deno.truncate`
require write permissions seem to not call the functions they are
testing *at all* and are calling `Deno.mkdir` and `Deno.mkdirSync`
instead.

This commit replaces those calls with calls to `Deno.truncateSync`
and `Deno.truncate` respectively.
2020-06-12 14:25:07 +02:00
Bartek Iwańczuk e7054d50f0
update: deno_lint to v0.1.10 (#6248)
* update: deno lint to v0.1.10

* Parallelize "deno lint" subcommand
2020-06-12 01:44:17 +02:00
Rubin Bhandari 6ccf9037a6
feat: add Deno.osName() (#5714) 2020-06-11 13:11:26 -04:00
River 818a801092
feat: URL support in Deno filesystem methods (#5990) 2020-06-11 12:36:20 -04:00
Casper Beyer 813210d433
fix: WebAssembly runtime error propagation (#6137)
Currently WebAssembly runtime errors don't propagate up to the user as
they use urls to denote where the error occurred which get caught by the source-map
pipeline which doesn't support the wasm scheme.
2020-06-11 11:03:27 -04:00
Jaap Aarts 5ee2ce1b1c
feat: allow reading the entry file from stdin (#6130) 2020-06-11 10:58:09 -04:00
John Gardner ca5b5ba530
feat: Add Deno.mainModule (#6180) 2020-06-10 23:00:29 -04:00
Bartek Iwańczuk e4e332abbb
feat(lint): use default globs, upgrade to v0.1.9 (#6222)
This commit:
* added default file globs so "deno lint" can be run
without arguments (just like "deno fmt")
* added test for globs in "deno lint"
* upgrade "deno_lint" crate to v0.1.9
2020-06-10 23:29:48 +02:00
Josh Byrnes 408edbb065
fix(URL): IPv6 hostname support (#5766) 2020-06-10 14:05:10 -04:00
Casper Beyer be8bacaaa4
fix: Remove try-catch from Buffer.readFrom, readFromSync (#6161) 2020-06-10 11:54:54 -04:00
Ryan Dahl 54c3f8e27f
fix udp BorrowMutError (#6221) 2020-06-10 11:26:28 -04:00
Nayeem Rahman 8f050355ff
fix(cli/js/process): Always return a code in ProcessStatus (#5244) 2020-06-10 11:10:08 -04:00
Bartek Iwańczuk 4b7d3b060e
fix: several regressions in TS compiler (#6177)
This commit fixes several regressions in TS compiler:

* double compilation of same module during same process run

* compilation of JavaScript entry point with non-JS imports

* unexpected skip of emit during compilation

Additional checks were added to ensure "allowJs" setting is 
used in TS compiler if JavaScript has non-JS dependencies.
2020-06-10 16:02:41 +02:00
Bartek Iwańczuk db70b77e4b
fix: handle @deno-types in export {} (#6202)
* fix: handle @deno-types in export {}

* lint

* fix tests

* fmt

* fix test
2020-06-10 14:19:41 +02:00
Bartek Iwańczuk 8366f36873
upgrade: deno_lint v0.1.8 (#6208) 2020-06-09 18:40:08 +02:00
Casper Beyer 1e0808d501
fix: Deno.readSync on stdin (#6126)
Currently sync operations on stdin are failing because tokio::Stdin
cannot be converted to a std::File.

This commit replaces tokio::stdin with a raw file descriptor 
wrapped in a std::fs::File which can be converted to a 
tokio::File and back again making the synchronous version 
of op_read actually work.
2020-06-09 18:29:12 +02:00
Tuan Le 878f306a39
feat(cli): Add Deno.env.delete() (#5859) 2020-06-09 14:58:30 +02:00
Nayeem Rahman 44251ce8ea
fix(cli/js/web/worker): Disable relative module specifiers (#5266) 2020-06-09 14:33:52 +02:00
uki00a 2b2d800b43
feat(doc): display all overloads in cli details view (#6186) 2020-06-09 14:12:47 +02:00
Nayeem Rahman b3e189ee4f
fix(cli/js/process): Strengthen socket types based on pipes (#4836) 2020-06-09 13:18:18 +02:00
Jack Kelly cb29f7f323
test: fixed initial [WILDCARD] not matching empty the on first line (#5420) 2020-06-08 19:24:27 +02:00
Peter Indiola 6236252c66
feat(cli/js/net): make rid on listener public (#5571) 2020-06-08 18:24:51 +02:00
Marcos Casagrande d907133944
fix(cli/web/fetch): multipart/form-data request body support for binary files (#5886) 2020-06-08 18:08:26 +02:00
Ryan Dahl 8a4533eb75 feat: deno eval -p (#5682) 2020-06-06 09:07:59 -04:00
Casper Beyer ed5aedc6b4
Rename abbreviated assertions in std/testing (#6118) 2020-06-05 23:43:00 -04:00
Ryan Dahl 78bfeebad1
Revert "fix: Use # to denote line number in stack traces" (#6119)
This reverts commit c4c6a8dae4

There is some controversy about this change because vscode doesn't interpret the fragments correctly. Needs more discussion before landing.
2020-06-05 11:37:40 -04:00
Andrew Mitchell c4c6a8dae4
fix: Use # to denote line number in stack traces (#6114)
This makes the URLs in stack traces actual URLs to the files.
Before: https://deno.land/std/testing/asserts.ts:138:11
After: https://deno.land/std/testing/asserts.ts#138:11
2020-06-05 08:01:02 -04:00
Bert Belder 9a783ae4e6
ci: upgrade to Rust 1.44.0 (#6113) 2020-06-05 05:11:15 +02:00
Ryan Dahl e3cc3db20f
Revert "feat: format deno bundle output (#5139)" (#6085)
This reverts commit 93cf3bd534.
2020-06-04 08:36:25 -04:00