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

410 commits

Author SHA1 Message Date
Bert Belder
76a6a1ff46
Fix a bunch of spelling errors (#5314) 2020-05-16 00:36:49 +02:00
Tomasz Gałkowski
8440d765d5
fix: setTimeout and friends have too strict types (#5412) 2020-05-15 09:51:49 -04:00
Chris Knight
8c45d3a06d
doc: add stream api (#5418) 2020-05-15 09:35:50 -04:00
Kevin (Kun) "Kassimo" Qian
7de86ab605
cli: don't panic on Deno.close invalid argument (#5320) 2020-05-14 06:59:56 -04:00
Dante Calderón
c3a205bae8
Fix typos across the repo (#5295)
Corrections made:
* cli/js/tests/README.md:44:7: corrected "discoveres" to "discovers"
* cli/js/tests/chown_test.ts:111:37: corrected "priviledge" to "privilege"
* cli/worker.rs:231:56: corrected "decendants" to "descendants"
* deno_typescript/lib.rs:136:50: corrected "emmited" to "emitted"
* core/es_isolate.rs:492:67: corrected "registerd" to "registered"
* core/isolate.rs:103:28: corrected "initalize" to "initialize"
* docs/runtime.md:29:14: corrected "ect" to "etc"
* docs/tools/debugger.md:122:16: corrected "implementes" to "implements"
* std/encoding/_yaml/dumper/dumper_state.ts:57:63: corrected "everwhere" to "everywhere"
* std/encoding/csv.ts:37:43: corrected "referal" to "referral"
* std/fmt/sprintf.ts:209:20: corrected "unusuable" to "unusable"
* std/fmt/README.md:21:40: corrected "Alternativly" to "Alternatively"
* std/fmt/README.md:35:68: corrected "seperated" to "separated"
* std/fmt/README.md:179:59: corrected "provded" to "provided"
* std/mime/multipart.ts:581:46: corrected "writen" to "written"
* std/path/_globrex.ts:19:52: corrected "equivelant" to "equivalent"
* std/node/events_test.ts:447:9: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:475:9: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:500:29: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:530:40: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:555:9: corrected "asyncronous" to "asynchronous"
* tools/deno_tcp_proxy.ts:1:42: corrected "perfromance" to "performance"
* std/node/module.ts:1003:18: corrected "existend" to "existed"
2020-05-14 06:38:42 +02:00
Pavan Kumar
9c01403865
default to 0.0.0.0 for Deno.listen (#5203) 2020-05-13 09:18:41 -04:00
Kitson Kelly
3d7552af2e
Update to TypeScript 3.9 (#4510) 2020-05-13 08:03:04 -04:00
A.E Clarence
e90c95b465
fix example of readTextFile (#5247) 2020-05-12 13:38:44 -04:00
Ryan Dahl
fb7d7f40ed
Merge std_tests.rs into integration_tests.rs.rs (#5228)
* Remove usage of url_to_filename from integration_tests
* Make test ports not conflict with each other
2020-05-11 14:49:19 -04:00
Kitson Kelly
d16c7394cb
fix: Expose ErrorEvent globally (#5222) 2020-05-11 14:28:13 +02:00
Kitson Kelly
670d01d012
fix: Allow multiple Set-Cookie headers (#5100) 2020-05-09 19:20:18 +02:00
Ryan Dahl
b8364a2636
BREAKING: make Deno.hostname unstable (#5108) 2020-05-09 12:44:35 -04:00
Michał Zdunek
9790399bce
add option to lint and format only staged files (#5172) 2020-05-09 06:22:27 -04:00
Ryan Dahl
4e5e6da348
Add hint on how to exit REPL (#5143)
Removes exit and help commands
2020-05-08 18:58:51 -04:00
Oliver Lenehan
a08a4abac1
feat(workers): "crypto" global accessible in Worker scope (#5121) 2020-05-08 14:30:53 +02:00
Chris Knight
5fea4e826c
fix: correct type error text (#5150) 2020-05-08 14:28:46 +02:00
Bartek Iwańczuk
2b66b8a03e
BREAKING: Remove support for .wasm imports (#5135)
Importing .wasm files is non-standardized therefore deciding to
support current functionality past 1.0 release is risky.

Besides that .wasm import posed many challenges in our codebase
due to complex interactions with TS compiler which spawned
thread for each encountered .wasm import.

This commit removes:
- cli/compilers/wasm.rs
- cli/compilers/wasm_wrap.js
- two integration tests related to .wasm imports
2020-05-07 20:43:27 +02:00
zjopy
761b7efb3b
fix(docs): add missing "deno run" (#5126) 2020-05-07 13:48:48 +02:00
Ryan Dahl
221221cc97
BREAKING: execPath should require allow-read (#5109) 2020-05-06 15:51:33 -04:00
Nikolai Vavilov
76c77bb32c
Check destination length in encodeInto (#5078) 2020-05-06 13:10:15 -04:00
Bartek Iwańczuk
91369841ef
refactor(ts): make processImports logic more verbose (#5089) 2020-05-06 16:59:43 +02:00
Bartek Iwańczuk
2ecdbb62ae
refactor: merge TS compiler into single file (#5091) 2020-05-06 00:19:18 +02:00
Ryan Dahl
5875bb9c0d
Simplify ProcessStdio (#5092) 2020-05-05 16:54:25 -04:00
Bartek Iwańczuk
cf5a39a361
refactor(ts): remove op_cache (#5071)
This PR removes op_cache and refactors how Deno interacts with TS compiler.

Ultimate goal is to completely sandbox TS compiler worker; it should operate on
simple request -> response basis. With this commit TS compiler no longer
caches compiled sources as they are generated but rather collects all sources
and sends them back to Rust when compilation is done.

Additionally "Diagnostic" and its children got refactored to use "Deserialize" trait
instead of manually implementing JSON deserialization.
2020-05-05 18:23:15 +02:00
Nayeem Rahman
8c509bd885
feat(URL): Support drive letters for file URLs on Windows (#5074)
refactor: Parse URLs more sequentially. This makes it easier to change matching behaviour depending on the protocol.
fix: Fail when a host isn't given for certain protocols.
fix: Convert back-slashes info forward-slashes.
2020-05-04 14:32:54 -04:00
Ryan Dahl
6c02b061ce
stabilize Deno.cwd and require --allow-read (#5068) 2020-05-04 14:23:06 -04:00
Ryan Dahl
38ecabf205
Simplify ts-compiler's normalizeString (#5072) 2020-05-04 12:22:42 -04:00
Daniel Lenksjö
1500547afa
fix: URL constructor throws confusing error on invalid scheme (#5057) 2020-05-04 10:06:47 -04:00
Ryan Dahl
821a4ae5fd
Make it so ts compiler doesn't call cwd op (#5070)
Removes duplicate implementation of the module resolution algorithm
2020-05-04 09:39:40 -04:00
木杉
58d0c4f9d6
fix(console): formatting misalignment on console.table (#5046) 2020-05-04 13:36:26 +02:00
Kitson Kelly
7e32269f3f
Add TransformStream and TransformStreamController (#5042) 2020-05-03 15:10:52 -04:00
Ryan Dahl
bbbf9f299c
Deno.chdir should require allow-read not allow-write (#5033) 2020-05-02 18:33:43 -04:00
Bartek Iwańczuk
de2c042482
BREAKING: remove support for JSON imports (#5037)
This commit removes support for importing JSON files as modules.

This change is dictated by security; browsers rolled back on this
support as well.
2020-05-02 00:32:05 +02:00
Bartek Iwańczuk
6661e7e287
BREAKING: remove window.location and self.location (#5034)
This commit removes "location" global available on "window",
"globalThis" and "self".
2020-05-01 20:15:28 +02:00
Ryan Dahl
5d3c49082f
Correct copyright in cli/js/web/decode_utf8.ts (#5035) 2020-05-01 13:29:00 -04:00
Marcos Casagrande
4297b865f9
internal: reorder Buffer's copyBytes arguments (#5021) 2020-04-30 15:46:44 -04:00
Luca Casonato
80e2211141
Unstable methods should not appear in runtime or d.ts (#4957)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-04-30 11:23:40 -04:00
Kitson Kelly
81c75332fb
feat: Add WritableStreams (and enable ReadableStreams piping) (#4980) 2020-04-30 10:40:10 -04:00
Ryan Dahl
bc792c0267
make camel case readDir, readLink, realPath (#4995) 2020-04-29 16:39:37 -04:00
Bartek Iwańczuk
d308e8d0c0
BREAKING: remove custom implementation of Deno.Buffer.toString() (#4992)
Keep in mind Buffer.toString() still exists, but returns [object Object]. 

Reason for removal of Buffer.toString() was that it implicitly used 
TextDecoder with fixed "utf-8" encoding and no way to customize 
the encoding.
2020-04-29 22:38:10 +02:00
Nayeem Rahman
b51c863550
feat(std/path): Add fromFileUrl() (#4993)
Fix: URL constructor accepts a URL object which is not a base
2020-04-29 16:20:55 -04:00
Bert Belder
3e6ea62841
BREAKING: Include limited metadata in 'DirEntry' objects (#4941)
This change is to prevent needed a separate stat syscall for each file
when using readdir.

For consistency, this PR also modifies std's `WalkEntry` interface to
extend `DirEntry` with an additional `path` field.
2020-04-29 16:00:31 -04:00
Valentin Anger
721a4ad59d
BREAKING: Map-like interface for Deno.env (#4942) 2020-04-29 14:48:19 -04:00
Brayden
2337fca277
Make Deno.isatty stable (#4937) 2020-04-29 12:43:34 +02:00
Marcos Casagrande
0703431ec2
fix: bug in Deno.copy (#4977) 2020-04-28 21:30:48 -04:00
Bartek Iwańczuk
640f6878f6
refactor: Deno.listener closes when breaking out of async iterator (#4976) 2020-04-29 01:08:02 +02:00
Bartek Iwańczuk
1b6181e434
refactor: factor out datagram from Deno.listen(), make it unstable (#4968)
This commit changes Deno.listen() API by factoring out datagram listeners to Deno.listenDatagram(). New Deno.listenDatagram() is unstable.
2020-04-28 21:46:39 +02:00
Ryan Dahl
ea28a088a4
Remove Conn.closeRead (#4970) 2020-04-28 15:17:55 -04:00
Bartek Iwańczuk
6ee00e4da3
refactor: change InspectOptions, make Deno.inspect stable (#4967) 2020-04-28 20:11:50 +02:00
Nayeem Rahman
678313b176
BREAKING: Remove Deno.EOF, use null instead (#4953) 2020-04-28 12:40:43 -04:00
Ali Hasani
47c2f034e9
BREAKING: address renamed to path in UnixAddr UnixConnectOptions UnixListenOptions (#4959) 2020-04-28 12:37:59 -04:00
Ryan Dahl
e0ca60e770
BREAKING: Use LLVM target triple for Deno.build (#4948)
Deno.build.os values have changed to correspond to standard LLVM target triples
"win" -> "windows"
"mac" -> "darwin"
2020-04-28 12:35:23 -04:00
Nayeem Rahman
76ee6fb335
refactor(cli/js/permissions): Split read and write permission descriptors (#4774) 2020-04-28 16:43:58 +02:00
Marcos Casagrande
927a771fa4
url: Make zero a valid port (#4963) 2020-04-28 10:40:17 -04:00
Bartek Iwańczuk
2cb875bcfb
refactor: rename sync io interfaces (#4945)
This commit renames sync io interfaces:
* SyncReader -> ReaderSync
* SyncWriter -> WriterSync
* SyncSeeker -> SeekerSync
2020-04-28 13:23:30 +02:00
Chris Knight
b980b26d85
doc: remove unstable API marker form Deno.Metrics and Deno.RunOptions (#4949) 2020-04-28 12:35:43 +02:00
Bartek Iwańczuk
8feb30e325
BREAKING: remove overload of Deno.test() (#4951)
This commit removes overload of Deno.test() that accepted named
function.
2020-04-28 12:33:09 +02:00
Bartek Iwańczuk
b508e84567
refactor: remove combined io interface like ReadCloser (#4944)
This commit removes "combined" interfaces from cli/js/io.ts; in the
like of "ReadCloser", "WriteCloser" in favor of using intersections
of concrete interfaces.
2020-04-28 12:32:43 +02:00
Bartek Iwańczuk
dea3ca39ba
refactor: rename SeekMode variants to camelCase and stabilize (#4946) 2020-04-28 12:30:59 +02:00
Luca Casonato
30dc9bb748
Make shutdown unstable and async (#4940) 2020-04-28 01:36:47 -04:00
Divya
de751e5221
fix(#4769) Adds readTextFile, writeTextFile, with sync counterparts (#4901) 2020-04-28 01:35:20 -04:00
Marcos Casagrande
2fc5878668
Change URL.port implementation to match WHATWG specifications (#4954)
Changed `URL.port` implementation to match [WHATWG
specifications](https://url.spec.whatwg.org/#port-state).

This PR matches the behaviour of other browsers:

1.  a `TypeError` must be thrown when passing an URL with an invalid
port to the constructor.

2. When setting an invalid port, using property setter, I haven't found
what should happen in this case, so I mimic **Firefox** & **Node**
behaviour. If an invalid port is set, it will use the previous value.
**Chrome** sets the value to `'0'` if an invalid port is set. I prefer
to keep the previous valid value.  (I can use Chrome's behaviour if you
think it's better, it's a simple value change)

```
url.port = '3000'; // valid
url.port = 'deno'; // invalid
assertEquals(url.port, '3000');
```

3. If the port value equals the current protocol default port value,
`port` will be an empty string.
2020-04-28 01:23:06 -04:00
Luca Casonato
15099cc016
Make Deno.kill unstable (#4950) 2020-04-27 23:36:43 -04:00
Bartek Iwańczuk
76641eb05e
refactor: remove stdio interfaces, use intersection types (#4952) 2020-04-28 02:01:00 +02:00
Nayeem Rahman
4041a7b857
BREAKING: Remove Deno.symbols namespace (#4936) 2020-04-28 01:06:03 +02:00
Chris Knight
2f0641885c
docs: document default value of sanitizeOps and sanitizeResources (#4943) 2020-04-28 00:56:22 +02:00
Ryan Dahl
f2d5e6f58a
loadavg and osRelease made unstable (#4938) 2020-04-27 18:00:19 -04:00
Luca Casonato
95a08857f1
Make unix sockets require allow-write (#4939) 2020-04-27 16:56:24 -04:00
Bert Belder
ee4e6a1ef9
Rename FileInfo time fields and represent them as Date objects (#4932)
This patch also increases the resolution of reported file times to
sub-millisecond precision.
2020-04-27 21:13:32 +02:00
uki00a
d440495b6b
fix(console): don't throw RangeError when an invalid date is passed (#4929) 2020-04-27 13:39:39 -04:00
Bartek Iwańczuk
8e9ab9e33e
refactor: decouple Console implementation from stdout (#4899)
When creating a console instance, one must pass "printFunc" arg
which is used internally by Console to output messages.

Due to numerous refactors there was a single method ("console.clear()")
that used "Deno.stdout" instead of "printFunc".

This commit unifies how "Console" outpus message, by using 
"printFunc" in all methods; consequently "Deno.stdout" is no longer
imported in "cli/js/console.ts" making it a standalone module that doesn't
depend on any CLI-specific APIs.
2020-04-27 15:40:47 +02:00
Bartek Iwańczuk
8e4333fd99
BREAKING: remove Deno.runTests() API (#4922)
Deno.runTests() interface is not yet good enough to be exposed
publicly with stability guarantees.

This commit removes public API related to testing: Deno.runTests()
and Deno.TestMessage, but keeps them exposed on Deno.internal object
so they can be used with "deno test" subcommand.
2020-04-27 14:51:22 +02:00
Marcos Casagrande
26dfd3c110
Add buffer size argument to copy (#4907) 2020-04-26 16:25:24 -04:00
Bartek Iwańczuk
62150dd328
BREAKING CHANGE: change return type of Deno.resources() (#4893) 2020-04-25 22:02:15 +02:00
Nayeem Rahman
b33685e94b
fix(cli/js/symbols): Update symbol descriptions (#4878)
Don't use Symbol.for() to define Deno.symbols.customInspect.
2020-04-25 10:53:26 -04:00
Ryan Dahl
0c47cd6785
introduce unstable flag, make a few things unstable (#4892) 2020-04-25 09:31:54 -04:00
Ryan Dahl
f8d83361cd
chdir should require --allow-write (#4889) 2020-04-24 19:55:33 -04:00
Bartek Iwańczuk
1378df3364
remove bootstrap methods from global scope after bootstrapping (#4869) 2020-04-25 01:03:45 +02:00
Bartek Iwańczuk
912a57f6a2
change type of stdio handles in JS api (#4891) 2020-04-25 01:01:25 +02:00
Bartek Iwańczuk
4a8d25646a
BREAKING CHANGE: remove Deno.OpenMode (#4884)
This commit removes Deno.OpenMode along with overloaded variants
of Deno.open() and Deno.openSync() that used OpenMode.
2020-04-25 00:45:55 +02:00
Bartek Iwańczuk
0cb1bb98cc
BREAKING CHANGE: change order of args in Deno.copy() (#4885) 2020-04-25 00:09:14 +02:00
Bartek Iwańczuk
833539fcaf
add help messages to Deno.test() sanitizers (#4887) 2020-04-25 00:07:25 +02:00
Bartek Iwańczuk
e9fa6b87ce
stabilize Deno.iter() and Deno.iterSync() (#4890) 2020-04-25 00:05:48 +02:00
Bartek Iwańczuk
824329f0da
BREAKING CHANGE: rename Deno.fsEvents() to Deno.watchFs() (#4886) 2020-04-24 23:40:29 +02:00
Bartek Iwańczuk
6a37e4426e
BREAKING CHANGE: rename TLS APIs to camel case (#4888)
This commit renames all APIs containing "TLS" to use camel case
(connectTLS -> connectTls, etc.)
2020-04-24 23:29:14 +02:00
Fenzland
cb935a375c
fix(#2142) make URLSearchParams more standardized (#4695) 2020-04-23 10:30:32 -04:00
Nayeem Rahman
65bba2b87e
refactor(cli/js/testing): Rename disableOpSanitizer to sanitizeOps (#4854)
* rename disableOpSanitizer to sanitizeOps
* rename disableResourceSanitizer to sanitizeResources
2020-04-23 14:40:16 +02:00
Bartek Iwańczuk
197a589a4a
fix Deno.iterSync() examples (#4855) 2020-04-22 18:36:04 -04:00
Ryan Dahl
e26c2cd7c8
Add comments in Reader/SyncReader about iter/iterSync (#4852) 2020-04-22 22:00:48 +02:00
Bartek Iwańczuk
68d287eed5
BREAKING CHANGE: rename Deno.toAsyncIterator() to Deno.iter() (#4848)
* rename Deno.toAsyncIterator() to Deno.iter()
* adds sync version Deno.iterSync()
* adds optional second argument for buffer size
2020-04-22 21:30:45 +02:00
Ryan Dahl
da6819a14c
Add comment distinguishing Deno.Buffer from Node's Buffer (#4847) 2020-04-22 14:26:16 -04:00
张超杰
08936c2efc
chore(docs): A space should be left after the single-line comment (#4811) 2020-04-22 10:21:05 -04:00
Kitson Kelly
8bcfc03d71
Rewrite streams (#4842) 2020-04-22 10:06:51 -04:00
张超杰
b270d6c8d0
typo 2020-04-21 16:11:52 -04:00
Ryan Dahl
cc1720132a
Move resource_table from deno::State to deno_core::Isolate (#4834) 2020-04-21 09:48:44 -04:00
Ryan Dahl
6e5f3453f8
Remove core/plugin.rs (#4824)
This simplifies the plugin interface in order to deliver op crates with a similar API
2020-04-20 10:27:15 -04:00
迷渡
ade05f3c00
fix(doc): Group ID (#4803) 2020-04-18 11:25:35 -04:00
EnokMan
47617e60d5
feat: startTLS (#4773) 2020-04-18 11:21:20 -04:00
迷渡
9d53a7a523
fix(doc): FileInfo.created is creation time (#4799) 2020-04-18 00:05:33 -04:00
Gudmund Vatn
260084ccbf
Add close method to Plugin (#4670) (#4785) 2020-04-17 12:51:10 +02:00