Masthash

#deno

Pavel Zinoviev ๐Ÿ”ฎ
2 days ago

Hey! I'm trying to rewrite my #telegram bot from #nodejs to #deno and struggling with a couple of issues. First of all: does anyone know Deno's alternative of the emitter.once(eventName, listener)?

NodeJs doc for example: https://nodejs.org/api/events.html#emitteronceeventname-listener

Deno
2 days ago

#Deno Deploy's new project creation flow has gotten a makeover. It's now much easier to get started with templates like a full-stack Fresh ๐Ÿ‹ app.

https://dash.deno.com/new

Deno
4 days ago

This simple #Deno KV tutorial will teach you how to use:
๐Ÿ”‘ secondary indexes
๐Ÿ’ฅ atomic transactions
๐Ÿ“ list and pagination

https://deno.com/blog/build-crud-api-oak-denokv

thomas ๐ŸŒธ
4 days ago

I'm the world's biggest #Deno advocate, wouldn't this be funny... ๐Ÿ˜†

github npm software engineer role

You cannot use #deno / #node without the same letters as in the word `done` ๐Ÿ‘€

New #Deno issue that deserves your attention: "First-class support for full-stack web development":
@deno_land
#JavaScript

https://github.com/denoland/deno/issues/19335

Deno
5 days ago

Did you know that
#deno
is the most starred Rust project on GitHub?

๐Ÿฆ• โค๏ธ ๐Ÿฆ€

https://github.com/EvanLi/Github-Ranking/blob/master/Top100/Rust.md

Deno
5 days ago

Access IP address over TLS with #Deno 1.34

I made a little tool to see how many App Store downloads I've had, it's really hard to work out with their app and I want to make a little pi pico dashboard-y thing next!

It was a fun excuse to play around with Deno too.

#OpenSource #Deno #AppStore #JavaScript #TypeScript

https://github.com/robb-j/appstore-downloads

thomas ๐ŸŒธ
1 week ago

I think I need to fork (https://github.com/preactjs/preact-render-to-string/issues) [#preact] and get an return value that also includes a list of all elements used, specifically hyphenated web-components. Then I can conditionally add the the #webcomponent dependency to the page. (this is for a #deno project)

cc thoughts @marvinh ?

Deno
1 week ago

Announcing Node.js built-ins support in Deno Deploy

Starting today, all Node.js built-in modules like `fs`, `path`, and `http` can be imported and used on #Deno Deploy.

This means: you can now run Node.js programs at the edge. ๐Ÿคฏ

โžก๏ธ https://deno.com/blog/node-builtins-on-deploy

๐Ÿข ๐Ÿฆ• ๐Ÿช„

AlternativeTo
1 week ago

#Deno, the runtime for JavaScript and TypeScript, has released version 1.34 which enhances the developer experience and compatibility with #npm and #NodeJS.
https://alternativeto.net/news/2023/5/deno-1-34-released-with-better-compatiblity-with-npm-and-node-js/

Deno Deploy now supports all 47 Node.js modules using the 'node:' prefix on the import URL.
#deno #nodejs #javascript #edge
https://deno.com/blog/node-builtins-on-deploy

I might or might not just have written a small utility to create password variants for your wordlist. Use it as a seed for your favorite #password cracker;

https://github.com/theimpossibleastronaut/ordbok

It comes with zero warranty, but it is written in #deno #typescript and is free to use.

Deno
2 weeks ago

#Deno 1.34 is here! Top updates:

1๏ธโƒฃ deno compile supports npm packages
2๏ธโƒฃ More Node.js APIs supported
3๏ธโƒฃ Glob support in deno.json
4๏ธโƒฃ TLS certificates with IP addresses
5๏ธโƒฃ Language server and config file improvements

Full release notes

https://deno.com/blog/v1.34

Deno
2 weeks ago

Introducing the Deno Deploy Changelog ๐Ÿ“ข

https://deno.com/deploy/changelog

#deno

Here'a a handy way to discover all the records in a Deno KV data store. You can run it in the #deno repl with the --unstable flag:
@deno_land

TIL with #Deno in order for environmental variables to be loaded from the .env file, you need to make sure you add this import to the file first run in the deno app:

import "https://deno.land/std/dotenv/load.ts";

Deno
2 weeks ago

`deno compile` your program with web workers into a single binary

#deno

I'm thinking about how I could a good #cli for #hsml
I may orientate on existing CLIs like #Rust, #deno or #pnpm

so e.g.

```bash
hsml compile # compiles all .hsml files to .html inside current folder and recursive below
hsml compile ./example.hsml # just compiles the given file
hsml fmt # formats
hsml fmt # just formats given file
hsml parse ./example.hsml # parses the given file and std::out as json AST
```

But I'm not sure if this fulfills all need or if I need to change something

Currently #deno vendor didn't works on npm:<pkg> ๐Ÿ˜ž

thomas ๐ŸŒธ
2 weeks ago

Just put together some thoughts on my expierence shipping the "Deno Resume" module, check it out #deno "Organizing Files in a Deno Module" https://dev.to/reggi/organizing-files-in-a-deno-module-d63

Olivier Forget
2 weeks ago

I've wanted to play with #sqlite's #FTS5 (Full text #search extension) in #Deno for a long time. But this issue may not get resolved (for good reasons):

https://github.com/dyedgreen/deno-sqlite/issues/108

So I forked the repo and made a one-line change to the Makefile and bam! got my FTS.

https://github.com/teleclimber/deno-sqlite/commit/05ce37da26742e6d3b80dc7b92e3b80cbd93689b

So far it seems to work fine. Give it a shot if you like, you can import like this:

import { DB } from "https://github.com/teleclimber/deno-sqlite/raw/master/mod.ts";

I'll publish as a proper module in time if signals are positive.

thomas ๐ŸŒธ
2 weeks ago

New #Deno project just dropped ๐Ÿ‘‡, it's a Resume website / pdf builder ๐Ÿ’ช๐Ÿ“„๐ŸŽ‰. Check it out and give me your thoughts!

https://dev.to/reggi/a-deno-resume-website-builder-using-tailwind-1ggp

cc @thepracticaldev

The #cslnext #csl project (no, I'm not good with project names, and it's likely temporary) has turned out to be pretty fun.

I switched to using #deno for development a couple of weeks ago, and in the past couple of days finally hit a key milestone:

https://github.com/bdarcus/csl-next/commit/ece85826f4141c06d34de877f3c11b6cbad5225d

Will be tagging v0.1.0 in the coming days, which is just me saying the draft model is solid enough to start building out the processing functionality.

Deno
3 weeks ago

@WindmillDev (YC S22), a platform for building enterprise workflows from scripts, chose #Deno for its:
โšก๏ธ minimal cold start times
๐Ÿ”’ ability to securely run untrusted code
๐Ÿช„ ease in creating and sharing self-contained scripts

https://deno.com/blog/immutable-scripts-windmill-production-grade-ops

Looks like auth is going to be part of Deno KV! There is a PR to add Deno KV OAuth to deno-saaskit that has been approved by multiple #Deno team members:
@deno_land

https://github.com/denoland/saaskit/pull/192

Deno
3 weeks ago

Curious about consistency control in #Deno KV? Here's a demo:

https://dash.deno.com/playground/eventual-vs-strong

Comparison of read latencies for strong and eventual consistencies in Deno KV
thomas ๐ŸŒธ
3 weeks ago

Trying to think more and more about creating a service or business that appeals to #Deno developers where the deliverable is a dynamic module url.

One idea is to create a Deno-specific image host, where you upload images to a bucket and in return you get a object with the src, height, width, alt? of the images all ready to be spread over an `img` tag.

import img from "๐š‘๐š๐š๐š™๐šœ://๐š’๐š–๐š.๐šŒ๐š˜๐š–/:๐šž๐šœ๐šŽ๐š›/:๐š‹๐šž๐šŒ๐š”๐šŽ๐š.๐š๐šœ""

<img {...img.profile} />

Who would use this? ๐Ÿค”

Deno
3 weeks ago

Cross-platform glob support in deno.json is coming to #Deno 1.34

An example of deno.json config file with glob expressions
thomas ๐ŸŒธ
3 weeks ago

Trying to get better at publishing and packaging my little #Deno projects into their own repos with documentation and or articles. Here's what I made this week ๐Ÿป๐ŸŽ‰

โš“๏ธ๐ŸŒฒ Create a static link-list page using tailwind
https://github.com/reggi/anchorarbor

โžก๏ธ๐Ÿ‘ท๐Ÿ’ช Code Generates Classes using the Linear Builder Class pattern
https://github.com/reggi/linear-builder-class

๐ŸŽ†๐Ÿ” Convert an image (or folder of images) into a json file uses base64
https://github.com/reggi/image-to-json

thomas ๐ŸŒธ
3 weeks ago

Let's say you're building a Deno module, and it has some main programmatic functionally under mod.ts.

What should the executable file name of a #Deno module be named?

#code #opensource #cli #terminal #bin #module #programming #package

thomas ๐ŸŒธ
3 weeks ago

Still gravitate toward the idea of being able to senselessly import any file type into #Deno, and having custom file interpreters ๐Ÿค”. One day ๐Ÿคž

idea of importing any file type in deno
Deno
3 weeks ago

The new CsvStringifyStream API transforms the source streaming input into the stream of csv rows:

#deno

The new CsvStringifyStream API transforms the source streaming input into the stream of csv rows

Kitson Kelly, formerly of the #Deno team has created a utility library kv-toolbox for Deno KV that includes functions for persisting blobs in the KV data store:
@deno_land

https://github.com/kitsonk/kv-toolbox

Alberto de Murga
3 weeks ago

I am creating a library using #typescript I would like to generate using the same codebase a valid #deno import, an #javascript #ESM module and #CommonJS module for maximum compatibility. Does anyone have a magic tsconfig configuration in the best case, or any idea about an easy solution to achieve this?

thomas ๐ŸŒธ
3 weeks ago

Create a script that generates code from a small definition and scaffolds a class using a "builder pattern" but keeps typescript generics from one method to the next intact! #typescript #deno #oop #programming #code #coding โžก๏ธ๐Ÿ‘ท๐Ÿ’ช
https://github.com/reggi/linear-builder-class

Deno
3 weeks ago

#Deno 1.33.3 contains experimental support for npm modules with "deno compile"

Is this something you would use?

Deno 1.33.3 contains experimental support for npm modules with "deno compile"
Deno
3 weeks ago

Guess what today is?

๐Ÿฆ•๐ŸŽ‰๐ŸŽ‚

#deno

Deno's 5th bday!
Deno
3 weeks ago

Build your own ChatGPT-style doc search with Fresh ๐Ÿ‹, Supabase, OpenAI

https://deno.com/blog/build-chatgpt-doc-search-with-supabase-fresh

#deno

thomas ๐ŸŒธ
3 weeks ago

Tinkering today with a server where you write TSX / JSX and get a single endpoint that can serve just the plain HTML in different ways. For example you can do .htmlwc or .js and get the web component in either HTML format or JS format. Lots of interesting ideas here. #deno #htmx #html #server #webdev #overthewire #webcomponent #webcomponents

https://gist.github.com/reggi/2a49b47d367a31ceb37280f11579825c

Deno
4 weeks ago

#Deno KV supports pagination using cursors

Stefan Baumgartner
4 weeks ago

One common misconception I'm always confronted with is that people think #Deno is actually executing TypeScript. It's not. It's transpiling TypeScript in a pre-step and then executes JavaScript. When you run e.g. a server you don't really see the difference, but it can add substantial cost to your execution time if have arbitrary workloads.

Luca from the #Deno team explains the difference between 'eventual' versus 'strong' consistency in Deno KV reads and writes
@lcasdev
#denokv

https://twitter.com/lcasdev/status/1656395094302380034?s=20

Nicd :unverified:
4 weeks ago

@boneskull Doesn't #Deno run TypeScript out of the box? https://deno.com/runtime

#Deno team member Luca demonstrates how a higher-level database API can be built with Deno KV doing the persistence:
@lcasdev
#denokv

https://youtube.com/shorts/J8c-HPqDKTM?feature=share

Example showing how to create a SPA in #Deno Fresh using a hidden island element so that all content is dynamic in the browser:
#denofresh

https://github.com/nhrones/FreshSSRtoSPA

Olivier Forget
4 weeks ago

Got to the point where #Dropserver can package an app.

I was immediately struck by the package size for an app I'm working on:

59Kb

The app (a shopping list tracking thing) is quite functional and the package includes all the frontend and some of the backend (#Deno will fetch necessary remote modules which will increase the on-disk size).

An archive that small is trivial to host (on S3, Netlify, whatever) so that other users may install the app on their own Dropserver instance.

1/

A screenshot of a command that prints the size of a gzipped archive.

The command: gzip -l dropapp-0.2.0.tar.gz

The result: 58756 compressed, 193536 uncompressed, 69.6% compression
Alberto de Murga
4 weeks ago

I am rooting hard for #deno, but it is the third time this week that I need to stop a project because some kind of bug :(

thomas ๐ŸŒธ
4 weeks ago

Hot take, all servers should be a function that have the shape (req: Request) => Response. #deno

fastwebsockets, https://github.com/denoland/fastwebsockets.

fastwebsockets is a fast WebSocket protocol implementation.

It passes the Autobahn|TestSuite and is fuzzed with LLVM's libfuzzer.

It can be used as a raw WebSocket frame parser, or as a full-fledged WebSocket client/server.

#WebSocket #RustLang #deno #tokio #performance

Deno
1 month ago

`Deno.serve()` got faster in #Deno 1.33.

As we get closer to stabilizing this API, we are also rebuilding it around Hyper 1.0, which comes with a 60% bump in request-handling throughput:

`Deno.serve()` in Deno 1.33 has 163,593 requests per second; in 1.32 it has 108,424 requests per second.