A starting point for developing with Dojo
Console colors for Deno
An example Dojo 2 Application
Commands and Action Abstractions for Dojo
A static code analysis tool for JavaScript and TypeScript.
An example chat application using Deno and Oak
Dojo 2.0 Prototypes and Experiments
A GitHub bot, making Eric's life easier
Prototype Core of Dojo 2
A TypeScript API Documentation Generator
push eventoakserver/oak
commit sha c368d30885a1c799fc21676940f899170e5963ab
Test for body parsing invalid content
push time in 4 hours
issue commentdenoland/deno
Deno CLI - allow ts-ignore comments
This should be moved to https://github.com/denoland/deno_lint/
comment created time in 4 hours
issue closedoakserver/oak
Sending Raw text - Server Crush
If we try to use this code, and we send raw text via postman decode will fail.
app.use(async (ctx) => {
const result = ctx.request.body(); // content type automatically detected
if (result.type === "json") {
const value = await result.value; // an object of parsed JSON
}
here is the error :
error: Uncaught SyntaxError: Unexpected token a in JSON at position 0
JSON.parse(decoder.decode(await this.#valuePromise()));
at JSON.parse (<anonymous>)
at value (body.ts:202:16)
we need internal handling to solve this issue.
closed time in 4 hours
gungunfebrianzaissue commentoakserver/oak
Sending Raw text - Server Crush
The only time the result.type would be set to JSON is when the Content-Type is set to application/json. If you set that content type and then send a body that is invalid JSON, the behaviour you are seeing is to be expected (that an error throws).
If there is a risk that someone might try to send invalid JSON in the payload, you should write the code to handle that properly, in a way that is meaningful to your application. For example:
app.use(async (ctx) => {
const result = ctx.request.body(); // content type automatically detected
if (result.type === "json") {
try {
const value = await result.value;
} catch (e) {
if (e instanceof SyntaxError) {
ctx.throw(Status.BadRequest, e.message);
} else {
ctx.throw(Status.InternalServerError);
}
}
}
});
comment created time in 4 hours
push eventoakserver/oak
commit sha 877785fa1f1cd4ad20d90baac2aa91a28860e467
Update links in docs
push time in 5 hours
issue closedoakserver/oak
Main page shows wrong version as latest, and no changelog

I see that Oak is very much maintained and up-to-date, but on casual inspection, the latest version was released in May. With Deno's rapid development this is very discouraging for potential users. It is very misleading, can it be corrected?
Also, I can't find a changelog, is there one? Cheers.
closed time in 5 hours
David-Elseissue commentoakserver/oak
Main page shows wrong version as latest, and no changelog
That is a behaviour of "releases" in GitHub and it cannot be controlled (like a lot of things on GitHub). Please refer to the tags to determine the latest release. I may "release" every tag in the future, but I am not sure.
There is no change log at this point. Something I will consider in the future.
comment created time in 5 hours
issue commentdenoland/deno
Add a way to dynamically import the same module multiple times
Basically what you are asking for is hot module reloading... That is problematic in a lot of ways. ES Modules and their exports are immutable by design. As stated in #5548 we should find better ways to do this to support things like development. There is discussion in #6694 about this as well.
Instead of asking for a specific feature, what use case are you trying to solve?
comment created time in 5 hours
issue commentdenoland/deno
Consider "release" branch of std
It solves enough of this problem to close the issue, certainly.
comment created time in 5 hours
issue closeddenoland/deno
Consider "release" branch of std
We currently committed code to master for std to be compatible with the version of the cli in master, and that flushed out a whole set of people complaining about the breaking changes and code not running. People are either ignoring the warning message, not understanding what it means, or depending on code that depends on master. All which lead to 😠 😭 😖.
Maybe we should introduce a release branch for the purposes of std which is created at the same time as the cli release, and point https://deno.land/std/ at that branch by default instead of master. We can then eliminate the warning code in the cli as well. I believe it is reasonable to expect https://deno.land/std/ to be compatible with the current release of the cli, even though people should still depend on specific versions as a matter of best practice.
closed time in 5 hours
kitsonkpush eventoakserver/oak
commit sha d1e1e69bb0298849b467a0347acf02ad65897de3
Repoint docs at github.io
push time in 7 hours
push eventh-o-t/nocuous
commit sha c9e3041deec4ba56ec6c0f3489026d42d5eee9a5
Create codeql-analysis.yml Experiment with code scanning.
push time in 7 hours
issue closedoakserver/oak
Link is in the repo description: https://oakserver.github.io/oak/
closed time in a day
captDaylightissue commentoakserver/oak
GitHub can now be published of any branch.
comment created time in a day
issue commentdenoland/deno
Add a way to dynamically import the same module multiple times
Why do we even have to store dynamically imported modules in cache?
Because that is very similar to the way browsers work. Clearly dynamic implies something to you that it doesn't actually mean to imply, it means "allow me to conditionally run this code in the current execution context", but all the rules to how modules are fetched, compiled and imported apply whether it be static or dynamic.
Ultimately this is a duplicate of #5548 and #6694
comment created time in a day
pull request commentdenoland/deno
feat(std): add deno_shim for browsers
Yeah, I need to rework it. Certainly possible to do as a seperate package as well.
comment created time in a day
issue commentdenoland/deno
Deno info should not type check
Just for context, there is a small amount of dependencies that not type checking would not catch currently, that would be caught under type checking.
For example:
const a = "./a.ts";
const a_mod = await import(a);
Would be caught under type checking, as the TypeScript compiler realises that value being passed to the dynamic import is statically determinable at call point, and would then make "./a.ts" a dependency of the module.
comment created time in 2 days
issue commentdenoland/deno
@bartlomieju looks like the type stripping isn't stripping types. 😭
comment created time in 4 days
fork kitsonk/deno_lint
Blazing fast linter for JavaScript and TypeScript written in Rust
fork in 4 days
issue closedoakserver/oak
Code:
import { Application } from "https://deno.land/x/oak/mod.ts";
const body = "Hello World"
const app = new Application();
app.use((ctx) => {
ctx.response.body = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
${body}
</body>
</html>`;
});
await app.listen({ port: 8000 });
deno --version
Output:
deno 1.2.1
v8 8.5.216
typescript 3.9.2
Error:
error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
Type 'URL' is not assignable to type 'string'.
return new URL(url).pathname
~~~
at https://deno.land/[email protected]/path/win32.ts:917:18
TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
Type 'URL' is not assignable to type 'string'.
return new URL(url).pathname;
~~~
at https://deno.land/[email protected]/path/posix.ts:438:18
Note: It is working file with [email protected]
closed time in 5 days
deepakshrmaissue commentoakserver/oak
You need to reload your cache deno run --reload whatever.ts.
Please don't use an unpinned version of oak, as it will lead to this very specific issue and is clearly mentioned in the README:
Warning The examples in this README pull from
main, which may not make sense to do when you are looking to actually deploy a workload. You would want to "pin" to a particular version which is compatible with the version of Deno you are using and has a fixed set of APIs you would expect.https://deno.land/x/supports using git tags in the URL to direct you at a particular version. So to use version 3.0.0 of oak, you would want to importhttps://deno.land/x/[email protected]/mod.ts.
Currently you should use https://deno.land/x/[email protected]/mod.ts which is the latest release.
comment created time in 5 days
issue commentdenoland/deno
Collect and share Deno code coverage
Blocked by #106, we are not going to introduce an external library to instrument the code, we are going to get it directly from V8 and built it into the test harness. There are other solutions for the Rust code, we just need to integrate them into the CI process.
I don't think the lack of code coverage is a big factor in people making a decision about contributing or not, personally.
comment created time in 5 days
issue commentdenoland/deno
`deno test` fails to load `Deno` when a tsconfig.json file is present
If you supply a lib attribute in your compiler options, it will always override the defaults, and you need to include deno.ns. What happens when you omit a lib attribute in your tsconfig.json?
comment created time in 5 days
issue commentdenoland/deno
bundle output contains top-level await.
It should read "some bundles can also be loaded in the web browser". There are all sorts of things that can make bundles incompatible with browsers.
Top level await is already in V8 and being implemented in Chromium, so it will eventually end up in Chrome and Edge.
comment created time in 5 days
issue commentdenoland/vscode_deno
Has this project been abandoned?
We have a close relationship with the TypeScript core team. The problem here is that the main maintainer doesn't have the time to maintain it and so @ry is trying to pick up the challenge as mentioned above. I would personally take it up, but I have limited time to dedicate to Deno at the moment and I've been buried in another thing. We will get it sorted out for sure, but it will take a bit of time.
comment created time in 5 days
issue commentdenoland/deno
In my opinion, that feels like an highly opinionated "framework" that should start life outside std and only come into std if it become a de facto.
comment created time in 5 days
issue commentdenoland/deno
In my opinion, that feels like an highly opinionated "framework" that should start life outside std and only come into std if it become a de facto.
comment created time in 5 days
issue commentdenoland/deno
Support access token authorisation for remote files
@pomke the tokens are tied to users, not repos... it would be a limitation that the same user has to have read access to all the repos. That is a limitation that seems reasonable.
comment created time in 5 days
issue commentdenoland/deno
Using Deno bundle programmatically requires the --unstable flag
In fact we will be breaking those APIs: #4752
comment created time in 5 days
issue commentdenoland/deno
Support access token authorisation for remote files
We need to get it implemented on the command line and with environment variables first, and iterate from there. We don't need to solve every problem at the start.
comment created time in 5 days
issue commentdenoland/deno
[Feature Request] Public API for TTYs
I don't see how this issue is unique/different from #6706 you opened, which is far more specific about what capabilities you would like to see... For the sake of everyone's sanity, could we try to keep the discussion in one issue, up until there is something actionable that warrants creating multiple issues?
comment created time in 5 days
pull request commentdenoland/deno
BREAKING refactor(std/path): Rename some symbols
This would have no effect without explicitly upgrading
stdand there's no transitive effect from an intermediary dependency updating its version ofstd.
That is the residual issue. When we merged with master, we had a load of people up in arms, because they were on 1.1.3 and their dependency was using std from master, which then was breaking. The fix of not serving the main branch, but the latest release with a "bare" specifier wouldn't fix it either, because as soon as we release that version of standard, we would break a lot of libraries that exist out there that are using the latest release of std that would need to be updated. I know it would break the main branch of oak, and the fact that this required changes in 20+ files indicates how pervasive this API. Mostly because there really isn't anything in the browser standards that comes close to providing the functionality, so we have no choice.
I am all for breaking things, but as pointed out, this is 6 of one, half dozen of another. For every argument on this API there is an equal counter argument against. In my mind, the APIs in std are JavaScript convention first, Go Lang second, then other prior art. There is a strong convention with Node.js in this space, and Go Lang is semi-aligned to that. Sadly, Rust is the outlier here.
In my mind, a breaking change that doesn't have a strong compelling argument coupled with wide 3rd party adoption, is a challenge.
comment created time in 5 days
pull request commentdenoland/deno
BREAKING refactor(std/path): Rename some symbols
While dirname() is non sensical to some, parent() is non sensical to others.
Go Lang, which is the "default" for std APIs:
basename()->base()dirname()->dir()extname()->ext()sep->separator
Also, this wouldn't be a minor breaking change, it would have significant impacts, and we originally thought correcting URL | string was a good idea and look at the impact that had. If this was a year ago, I would have thought it would be a good conversation to debate, but sadly, I think the cowpath is already paved.
comment created time in 5 days
issue commentdenoland/deno
[Feature Request] Public API for TTYs
Duplicate of #6706 and #3456 which was closed by #6520.
comment created time in 6 days
issue commentdenoland/deno
Possibly... We were talking about introducing a top level option of --isolated in addition to the existing --no-check which would set the config to "isolateModules": true without needing to use a --config tsconfig.json. We could use the code paths then to just do the type checking with no emit and then use the swc type stripping, even before we could do the AST transform. That would be a stepping stone to making that the default in a future version.
comment created time in 6 days
issue commentdenoland/deno
@bartlomieju after the compiler refactor, my opinion is that we need to investigate the swc AST -> TypeScript AST and feed the compiler pre-parsed AST (this in theory would also open the door to just using tsc for type checking as well, but as we discussed, we can't do that without a significant breaking change, because Deno would only work effectively with "isolatedModules": true).
comment created time in 6 days
push eventkitsonk/deno
commit sha 076547fbbb52b1df9d6db36dd72353bffa9e4a8b
chore: use matches macro for bool matches (#6904)
commit sha b7942bf0f6f151e172db9b1e08cf4436e8365e8b
Change release build flags to optimize for size (#6907)
commit sha 315efbc0e86d9d848efa4b889aefbc665508598a
fix: downcast from SwcDiagnosticBuffer to OpError (#6909)
commit sha c6917133942c791480cd2aec7297b2a2ee623059
refactor: Use SWC to strip types for "--no-check" flag (#6895)
commit sha 1b60840f286bc0203a3bd2900f67557a8ff2c3f6
feat(std/async): add pooledMap utility (#6898)
commit sha 97252ece754feb5c09ac07cd38594f5c13f14c67
WIP
push time in 7 days
push eventkitsonk/deno
commit sha 070ff0dbe1c783fa932278610215c181b62300a7
bump ci
push time in 8 days
issue commentdenoland/deno_website2
example fails when trying to run
Ref denoland/deno#6723 there are changes afoot so that documentation doesn't have to be updated on every release.
comment created time in 8 days
pull request commentdenoland/deno
chore(ci): update actions to run on ubuntu-18.04
Everyone had to re-sign the CLA, as the terms were changed.
comment created time in 8 days
push eventkitsonk/deno
commit sha 700f1d922cf9e78875baf4371d53c294b41e978d
chore: use matches macro for bool matches
push time in 8 days
PR opened denoland/deno
Nightly clippy flags these up as errors, but there appears to issue with adopting this style prematurely.
pr created time in 8 days
push eventkitsonk/deno
commit sha 98e0ed54db5bbd8befcb5afbb1d63f2b80677f51
fix: ModuleSpecifier removes relative path parts (#6762)
commit sha 6c637f04bf70b631c363ef9c87303e7d7dcdc633
refactor(cli): Remove dead code (#6765)
commit sha de3416689175214f33b226d4c510da63737c0db9
fix(std/wasi): remove number overload from rights in path_open (#6768)
commit sha d60f9c2549c7dfb0fbd6c9c8984c215f5dd75e76
fix(cli/js/web): IPv6 hostname should be compressed (#6772)
commit sha 2d58fee8071987567a25f26b14e29cdcca9cb5ab
Update dprint. Also ignore gh-pages dir. (#6778)
commit sha 121eaa4efcaa5c8a4cab25eed15de07642e0407d
fix(std/encoding/toml): could not parse strings with apostrophes/semicolons (#6781)
commit sha 6e34f6a7cca11ba245f0b55c3b956b59948b37b7
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.
commit sha da48fa42d309e32684210a8d30ec3fc7ef7079df
chore: update Rust to 1.45.0 (#6791)
commit sha 071a6e284aaaa26d40300b82d9f4cbb15a4dd6f5
Share reqwest client between fetch calls (#6792)
commit sha aebea6bd24dc1788c6db2f58204177af1c5d2dd6
doc(std/bytes): Fix wrong import in the example code (copyBytes) (#6787)
commit sha faa64edaf409757549a7df85812f6ea4f368051c
Upgrade to rusty_v8 0.7.0 (#6801)
commit sha c587450cd458514d8ae17d1fb649b1d36bb4649e
typo (#6800)
commit sha 53adde866dd399aa2509d14508642fce37afb8f5
refactor(std/path): enrich the types in parse_format_test (#6803)
commit sha fa61956f03491101b6ef64423ea2f1f73af26a73
Port internal TS code to JS (#6793) Co-authored-by: Ryan Dahl <[email protected]>
commit sha 628c10b55259f9d2b215b4203c2228062da189dc
fix benchmark_test (#6814)
commit sha 903d28f872b90a800c64339dea058806cde0be67
Remove duplicate code and allow filename overwrite for DomFile (#6817)
commit sha 2460689b1a9582ef6ab8c5fa429e281c88bc14d1
Remove deno_typescript (#6813)
commit sha f34a441a7d3e3e5c1517207a1ee2ed2a0eaee0c9
fix(tools/lint): don't exceed max command line length on windows (#6804)
commit sha 9d13b539b5dfc96e2b5a0e89fc8e0312d6500fff
Fix lastModified for DomFile in FormData (#6830)
commit sha bf9930066d3a5d26baad22fb1766de26be49c2ae
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
push time in 8 days
issue commentmicrosoft/TypeScript
Symbols disallowed as object keys
Duplicate of #1863
comment created time in 8 days
pull request commentdenoland/deno
Can you
git mvthe various typescript files so the diff was easier to look at?
If I did that right now, it would break CLI, so I have simply hacked around it for now.
comment created time in 8 days
push eventoakserver/oak
commit sha 0bcffbb05e772ae2e7a598dfac83de1efece79b8
Fix CI configuration
push time in 8 days
issue commentoakserver/oak
deno lint was added in 59782a5917c58187b27c490d0a3cb69b1a3aa7ac.
comment created time in 8 days
push eventoakserver/oak
commit sha 59782a5917c58187b27c490d0a3cb69b1a3aa7ac
Lint code and add deno lint to pipeline
push time in 8 days
issue openeddenoland/deno_lint
False positive on no-this-alias
The following code triggers the rule no-this-alias inappropriately:
const { value } = this;
The rule should be catching only things like this:
const self = this;
created time in 8 days
push eventoakserver/media_types
commit sha 0167e1bcfba6ff2f0c62034cf7d8e667728cdebf
Add deno lint to CI
push time in 8 days
Pull request review commentdenoland/deno
Use SWC to strip types for "--no-check" flag
mod tests { let source_code = compiled_file.code; assert!(source_code .as_bytes()- .starts_with(b"console.log(\"Hello World\");"));+ .starts_with(b"console.log('Hello World');"));
Super yucky! It really shouldn't be doing that.
comment created time in 8 days
issue commentoakserver/oak
Sharing state between middlewares using the context
The context is the same, trust me.
Why you don't think it is the same is that .cookies.get() only looks at cookie values in the request and not anything in the response. Because of the support for verified keys, I am not too keen on changing the behaviour, it would make it appear that the cookie is actually part of the request, when it isn't.
I would simply have the middleware move the session state in and out of the context.state... So something like this:
let sessionId = context.cookies.get(SESSION_ID);
let state;
if (!sessionId) {
sessionId = // new guid
context.cookies.set(SESSION_ID, sessionId);
// init state
}
context.state.session = // get state
await next();
// whatever other cleanup, persistence, whatever
delete context.state.session;
That way, consumers of your middleware don't have to even think about it, they will simply use:
context.state.session.whatever
comment created time in 8 days
issue commentdenoland/deno
Question: install scripts with external assets
npm install -g with a postinstall hook ~can add~ has added your computer to a crypto-mining farm (in the past)
comment created time in 8 days
issue commentdenoland/deno
`deno bundle <file> -m` (minifier)
We already use swc in Deno. Again this is still a long term goal, as there are a load of other things we need to do (including ones related to bundling, see: #4549) before this became a priority, some of which would block this (source maps for example).
comment created time in 8 days
pull request commentdenoland/deno
Use SWC to strip types for "--no-check" flag
I agree that compiler refactor is important, I don't suggest trying to hook SWC up to type checking process in this PR. Are you ok with landing change just for
--no-check?
Yeah, I hadn't actually looked at the changes... straight forwards and should be easy to integrate. 👍
Thinking more, we might want to help people make the transition. I know we have avoided it, but if we surfaced --isolated as an option for run and check, then people would be able to easily run their code in type check and get back errors that are more meaningful to what they need to fix in order to support just type stripping. It would make the introduction of the breaking change easier.
comment created time in 8 days
issue commentdenoland/deno
`deno bundle <file> -m` (minifier)
This would be a long term goal.
We couldn't use uglify as it doesn't work with modern JavaScript, uglify-es is no longer maintained, terser is the successor to uglify. Even then we wouldn't use it. We would look to swc though its minification likely needs improvement.
comment created time in 8 days
issue commentdenoland/deno
Also, Hermes is significantly slower than V8 as well (34 times slower based on that benchmark). I am afraid there are a lot better paths to #986 than using Hermes.
comment created time in 8 days
pull request commentdenoland/deno
Use SWC to strip types for "--no-check" flag
Couple thoughts... I know we are eager to do this, but I think the refactor of the compiler is important (#6894). This should be even easier to implement when that is redone.
Second, we can't use it for the type checking without breaking a lot of code in the wild, especially code that doesn't use export type and import type plus const enum and potentially other code. (You want to run it with "isolatedModules": true so that the type checking is as close to just type stripping as possible). Honestly we wouldn't be able to do that until 2.0 IMO.
comment created time in 8 days
PR opened denoland/deno
This is a major refactor of the TypeScript compilation infrastructure. Raising for early visibility, but it is still very much a work in progress. It totally rewrites how the compilations are handled to abstract out the logic, which should make it easier to move parts and pieces in the future, at the same time leveraging more Rust infrastructure and signficantly "dumbing" down the interface to the TypeScript compiler.
Currently it is a seperate crate as that has been easier for me to work on it without having to deal with merge conflicts and other changes.
Currently I have the following working:
- Ability to create snapshots with custom libs (like
deno.ns). - Ability to compile a set of sources and specify any custom libs to type check against.
- Ability to transpile an arbitrary set of sources.
Things that I need to do:
- Introduce bundling, which the bundle creation will be done in Rust, using the TypeScript compiler just for type checking and transpilation.
- Finish off the display of the diagnostics.
- Look at moving the dependency graph logic in.
- Integrate into the CLI.
When finished this will:
Fixes #5606 Fixes #5607 Fixes #6686
pr created time in 9 days
issue commentdenoland/deno
std should be checked with strict type checking
This should be closed.
comment created time in 9 days
Pull request review commentswc-project/swc
+{+ "type": "Module",+ "span": {+ "start": 14,+ "end": 45,+ "ctxt": 0+ },+ "body": [+ {+ "type": "ExportAllDeclaration",+ "span": {+ "start": 14,+ "end": 45,+ "ctxt": 0+ },+ "source": {+ "type": "StringLiteral",+ "span": {+ "start": 33,+ "end": 45,+ "ctxt": 0+ },+ "value": "../typings",+ "hasEscape": false+ }+ }+ ],
Babel and typescript-eslint set exportKind to "type" instead of "value": https://astexplorer.net/#/gist/408ad6e07e866fd7743725e9073bdf5b/74e0f25919bf3f997a3d83dee2a3635fc701156a. TypeScript transpileOnly() will always strip export type and import type statements. The main reason the syntax was introduced was to make type stripping possible (as export ... from ... cannot be statically determined to be a type or not).
Erroring I suspect would be a challenge, since it is valid TypeScript and we wouldn't want to @ts-ignore it.
comment created time in 9 days
issue commentoakserver/oak
Sharing state between middlewares using the context
Normally you don't want to grab a reference to the context, but instead have a middleware that does pre and post processing before other middleware that needs that occurs. It could set something in the .state per request, like:
app.use(async (context, next) => {
context.state.session = "whatever";
await next();
delete context.state.session;
});
If you are obsessed about hiding it, use a symbol that only you have reference to as the key.
But if you are really obsessed about hiding it:
const myPrivateData = new WeakMap();
myPrivateData.set(context, "something");
The context object is the same object through the handling of the request.
comment created time in 9 days
push eventoakserver/oak
commit sha eca47926692a9f3d53c02fe24a213dd57c008328
Update to Deno 1.2.1, std 0.62.0, media_types 2.4.3
push time in 9 days
created tagoakserver/media_types
A module that assists in resolving media types and extensions.
created time in 9 days
PR closed oakserver/media_types
Because of these types of issues: https://github.com/deligenius/view-engine/issues/13
pr closed time in 9 days
pull request commentoakserver/media_types
Thanks, but needed to upgrade the Deno version for CI as well as fix the formatting error.
Fixed in f3623d95f17a12ad0dbf7c5780736b515edc29fd
comment created time in 9 days
push eventoakserver/media_types
commit sha f3623d95f17a12ad0dbf7c5780736b515edc29fd
Update to Deno 1.2.1 and std 0.62.0
push time in 9 days
pull request commentdenoland/deno_third_party
This will not update the Deno CLI to TypeScript 3.9.7. This simply updates the version of TypeScript typescript-eslint uses.
comment created time in 10 days
issue commentdenoland/deno
Using @deno-types breaks Deno.bundle() imports
Duplicate of #6338
comment created time in 10 days
issue commentdenoland/deno
Regarding the type stripping: #6864 is the tracking issue.
comment created time in 10 days
issue commentoakserver/oak
Sharing state between middlewares using the context
context.state? Which can be strongly typed using generics?
comment created time in 11 days
issue commentdenoland/deno
Stream API for HTTP requests (Server implements ReadableStream<ServerRequest>)
@jimmywarting unless it gets implemented in the standard, it won't get implemented in Deno.
comment created time in 11 days
issue commentdenoland/deno
Efficiency/speed proposal: just strip types
As stated this is already implemented, and we have plans for improving it.
Also see #5432 which is effectively the master issue for all this work.
comment created time in 11 days
issue commentdenoland/deno
Fetch API doesn't respect forbidden headers
Ah, I mis-read what you said. I thought you were suggesting the behaviour of Deno was to silently drop the cookie header, but it is browsers.
The problem is fetch() will always behave differently in a server context and a client context. You have all the situations with same origin and cross origin which just don't make sense in a server context. I am still just for documenting it. As you state, Node's implementation just passes forbidden as well.
It is that or we implement some sort of cookie jar per origin that manages the cookies itself, and set the cookies on the document if you "really" want browser compatibility, but that just doesn't seem logical to me.
comment created time in 11 days
issue commentoakserver/oak
ctx.response.headers.set() going to lowercase
I see that two, just because someone posts something on Stack Overflow as an answer doesn't make it true. I specifically tested against IE11 and had no issue with content-type. I suggest you try it yourself as well.
comment created time in 11 days
issue commentdenoland/deno
Move config parsing out of js/compiler.ts
In my refactor of the compiler branch, I have all of the parsing and processing of the tsconfig, including the ignoring the options we ignore in Rust now.
comment created time in 11 days
issue commentdenoland/deno
Compiler Hints cause issues with bundle
Duplicate of #6338
comment created time in 11 days
issue commentdenoland/deno
Fetch API doesn't respect forbidden headers
The behaviour is to silently drop them, at least in Chrome. I just did:
await fetch("http://localhost:8000", { headers: new Headers([["cookie", "foo=bar"]]) });
And it simply stripped the cookie header. The reason why they are forbidden is because the user agent controls them, and can't be overridden by user land. We should simply document the behaviour in my opinion, since there is no browser error when passed.
comment created time in 11 days
issue commentdenoland/deno
Argument of type 'string | URL' is not assignable to parameter of type 'string'
@chovy that additional error you have is that the code is not --no-check safe. ./levels.ts is re-exporting a type that does not have a runtime emit. So instead of export { SomeInterface } from "whatever.ts" you should use export type { SomeInterface } from "whatever.ts".
comment created time in 11 days
issue commentdenoland/deno
deno info --no-check main.ts should give you a full dependency tree.
comment created time in 11 days
pull request commentdenoland/deno
fix: deno-types directive should have higher precedence than X-TypeScript-Types header
Well, and a lot of folks who want to support Deno and Node.js with a single distributable of JavaScript plus TypeScript types. It would mean a lot of folks would not be able to consume that JavaScript in a type safe way as the authors intended.
comment created time in 11 days
issue commentoakserver/oak
ctx.response.headers.set() going to lowercase
I just tried with IE11 and had no issues with an all lowercase content type.
comment created time in 11 days
issue commentoakserver/oak
ctx.response.headers.set() going to lowercase
Correct. That is the behaviour of Headers() in the browser, of which the Deno implementation is used underneath: https://fetch.spec.whatwg.org/#terminology-headers.
Is this causing some sort of problem? It shouldn't.
comment created time in 12 days
issue commentdenoland/deno
Deno v1.1.x fails with TypeScript error in deno test
There are a lot of things that "work" at runtime that aren't valid when you type check. If you don't want to type check it, use --no-check or // @ts-nocheck in the file.
comment created time in 12 days
issue commentoakserver/oak
It was valid at the time the bug was reported. Deno has changed since then.
comment created time in 13 days
issue commentdenoland/deno
Support module type augmentation
As you pointed out Deno does support it. You just have to know the module name. Let alone augmenting existing TypeScript is "dangerous" in my opinion, like augmenting built in globals.
Your best approach is to import whatever you want, augment it, and re-export it, and any code the needs the argumentation would depend on that re-export.
comment created time in 13 days
issue commentdenoland/deno
feature-request: first-class test-coverage support
No. There are big reactors in the internals at the moment which make this something that would need to come afterwards.
comment created time in 13 days
issue commentdenoland/deno
Argument of type 'string | URL' is not assignable to parameter of type 'string'
You should replace deps.ts with a file that you have on your local machine. Likely what you run with deno run ....
comment created time in 14 days
issue commentdenoland/deno
Deno.transpileOnly does not resolve modules at all. You have to supply it sources. An import map makes no sense in that context.
comment created time in 14 days
issue commentdenoland/deno
Argument of type 'string | URL' is not assignable to parameter of type 'string'
@reselbob your problem is the same as the others. You are using Deno 1.2.0, but some dependency of yours is pulling in std prior to 0.61.0 (the log states it is 0.57.0). You need to identify the offending dependency and update it.
comment created time in 14 days
issue commentdenoland/deno
Everything is just an explicit URL with no "magic" resolution. This proposal would require magical resolution and coupling to things like how code is structured in GitHub. That is not something that Deno wants to do.
For the Deno namespace, if the Built-in modules proposal for ECMAScript/JavaScript ever got close to being adopted, Deno would consider using that syntax to make the Deno namespace a built-in module.
comment created time in 15 days
issue commentdenoland/deno
deno bundle @ts-nocheck must appear in first 5 lines
So, why wouldn't it be an issue for the plugin?
comment created time in 15 days
issue commentdenoland/deno
deno bundle @ts-nocheck must appear in first 5 lines
the first 5 lines at least in VSCode
Using what plugin? Why would this be an issue for the Deno CLI? Not entirely sure what problem this is causing either.
comment created time in 15 days