Giter VIP home page Giter VIP logo

deno-docs's People

Contributors

ayame113 avatar bartlomieju avatar caspervonb avatar cknight avatar crowlkats avatar denobot avatar donjo avatar dsherret avatar getspooky avatar gjzwiers avatar hashrock avatar iuioiua avatar josh-collinsworth avatar kitsonk avatar kt3k avatar kwhinnery avatar littledivy avatar lucacasonato avatar magurotuna avatar nayeemrmn avatar not-my-profile avatar robdwaller avatar ry avatar sant123 avatar thisisjofrank avatar tniessen avatar tokiedokie avatar trivikr avatar ultirequiem avatar vwkd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deno-docs's Issues

Improve contributing guidelines

I suggest the maintainers add a CONTRIBUTING.md file:
https://mozillascience.github.io/working-open-workshop/contributing/

As someone who just had the need to clone Deno & poke around, I can say that beyond just regular rust setup, there are a lot of not fully clear things, e.g:

  • What does a comfortable DX looks like for debugging *.js files from ext/?
  • Known issues with compilation? (for example, it seemed like cargo was over-zealously rebuilding some packages for me

And just in general, it's a very friendly way to let someone who can contribute code or debug something know how to get the rubber to hit the road with minimal headaches.

If those instructions do exist somewhere, you could link them from CONTRIBUTING.md or vice versa, because if they DO exist, they weren't very easily discoverable (I sure did try)

jsdom manual example - Not Implemented: isContext

Using the manual example for:
https://github.com/denoland/manual/blob/v1.26.1/jsx_dom/jsdom.md
I get:

error: Uncaught Error: Not implemented: isContext
throw new Error(message);
^
at notImplemented (https://deno.land/[email protected]/node/_utils.ts:23:9)
at Object.isContext (https://deno.land/[email protected]/node/vm.ts:62:3)
at new Sme (https://esm.sh/v96/[email protected]/deno/jsdom.js:800:8449)
at iY.createWindow (https://esm.sh/v96/[email protected]/deno/jsdom.js:800:6192)
at new py (https://esm.sh/v96/[email protected]/deno/jsdom.js:800:23482)
at file:///Users/tracey/av/jsdom.js:4:34

I tried a few versions back in jsdom -- just in case it was that. But get same style failure up to versions 1y old, too, eg:

deno eval 'import { JSDOM } from  "https://esm.sh/[email protected]"; new JSDOM("<!DOCTYPE html><html><body></body></html>")'

I'm using latest v1.26.1 of deno. Any help appreciated! I'd love to convert my work codebase jest-based (a fair amount using jsdom) from node to deno. (I tried
import { DOMParser } from 'https://deno.land/x/deno_dom/deno-dom-wasm.ts'; too. And that is working decently for some of the testing -- but we could use a more complete DOM fake for some tests (eg: form submitting, etc.)

Full example here:

> cat deno.jsonc;
{
  "compilerOptions": {
    "lib": [
      "deno.ns",
      "dom",
      "dom.iterable",
      "dom.asynciterable"
    ]
  }
}


> cat jsdom.js   
import { JSDOM } from  "https://esm.sh/jsdom";
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts";

const { window: { document } } = new JSDOM(
  `<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Hello from Deno</title>
  </head>
  <body>
    <h1>Hello from Deno</h1>
    <form>
      <input name="user">
      <button>
        Submit
      </button>
    </form>
  </body>
</html>`,
  {
    url: "https://example.com/",
    referrer: "https://example.org/",
    contentType: "text/html",
    storageQuota: 10000000,
  },
);

const h1 = document.querySelector("h1");
assert(h1);

console.log(h1.textContent);


> deno run -A jsdom.js
error: Uncaught Error: Not implemented: isContext
  throw new Error(message);
        ^
    at notImplemented (https://deno.land/[email protected]/node/_utils.ts:23:9)
    at Object.isContext (https://deno.land/[email protected]/node/vm.ts:62:3)
    at new Sme (https://esm.sh/v96/[email protected]/deno/jsdom.js:800:8449)
    at iY.createWindow (https://esm.sh/v96/[email protected]/deno/jsdom.js:800:6192)
    at new py (https://esm.sh/v96/[email protected]/deno/jsdom.js:800:23482)
    at file:///Users/tracey/av/jsdom.js:4:34

Add "What has changed?" page

It would be great if manual had "What has changed?" page. It's not easy right now for users to see what new additions where made to manual since the last release.

It's unreasonable to expect users to go to Github repository and see commit log to figure this out. This could be somehow generated using git log and then mapped to actual manual pages with additions.

CC @lucacasonato

Document special env variables

Special env variables are documented in deno --help output, but some of these are not mentioned in the manual at all. I think we need a page for listing these env vars in the manual to make these variables searchable in the homepage.

ENVIRONMENT VARIABLES:
    DENO_AUTH_TOKENS     A semi-colon separated list of bearer tokens and
                         hostnames to use when fetching remote modules from
                         private repositories
                         (e.g. "[email protected];[email protected]")
    DENO_TLS_CA_STORE    Comma-separated list of order dependent certificate
                         stores. Possible values: "system", "mozilla".
                         Defaults to "mozilla".
    DENO_CERT            Load certificate authority from PEM encoded file
    DENO_DIR             Set the cache directory
    DENO_INSTALL_ROOT    Set deno install's output directory
                         (defaults to $HOME/.deno/bin)
    DENO_NO_PROMPT       Set to disable permission prompts on access
                         (alternative to passing --no-prompt on invocation)
    DENO_NO_UPDATE_CHECK Set to disable checking if a newer Deno version is
                         available
    DENO_WEBGPU_TRACE    Directory to use for wgpu traces
    DENO_JOBS            Number of parallel workers used for the --parallel
                         flag with the test subcommand. Defaults to number
                         of available CPUs.
    HTTP_PROXY           Proxy address for HTTP requests
                         (module downloads, fetch)
    HTTPS_PROXY          Proxy address for HTTPS requests
                         (module downloads, fetch)
    NPM_CONFIG_REGISTRY  URL to use for the npm registry.
    NO_COLOR             Set to disable color
    NO_PROXY             Comma-separated list of hosts which do not use a proxy
                         (module downloads, fetch)

Depricate all refrences to skypack.dev

The skypack-cdn seems to be abandoned. No issue updates have been made recently and the search API on the website is broken. We should:

  1. Preemptively replace links from skypack.dev to esm.sh to ensure if skypack.dev goes completely down new users won't be confused
  2. Note on the node-faq page that the project seems to be abandoned and should not be used.

List not supported features of standalone Deno apps

I think it would be helpful to list here what features are not supported in standalone (aka deno compile) apps. As far I know, there isn't any official doc mentioning the differences.

I only know of Web Workers, but there might be others too.

Thoughts ? ๐Ÿ˜„

Add manual installation guide

There're many edge cases where install.sh doesn't work well with users environment (e.g. missing unzip, broken curl, the shell is not bash or zsh ), but also we don't want to make install.sh more complex to support those edge cases.

To address those edge cases, I suggest we should have manual installation guide, which instructs the users to install Deno completely manually (like with the sections 1. Download, 2. Move, 3. Configure $PATH and each section describes some alternatives.)

esm.sh vs npm specifiers

call out benefits to use npm specifiers over esh.sm:

the major advantage of npm specifiers is that you don't have to rely on 3rd party service to transpile them and Deno's static analysis is more precise than esm.sh due to being run locally. that allows you to load Node-API files and data files from packages. which isn't really possible with esm.sh.

Create SubChapter of Embedding Deno

Related to denoland/manual#15

It is important to have an easy-to-use explanation of all of deno's crates and what features they provide.

It makes it easier to build custom operators and pick and choose features to create the perfect Embedded Runtime.

Error in the debugging section?

https://deno.land/[email protected]/getting_started/debugging_your_code#chrome-devtools

You might notice that DevTools pauses execution on the first line of
_constants.ts instead of file_server.ts. This is expected behavior caused by
the way ES modules are evaluated in JavaScript (_constants.ts is left-most,
bottom-most dependency of file_server.ts so it is evaluated first).

In my system, the DevTools pauses execution on os.ts instead of _constants.ts:

Screen Shot 2022-10-01 at 15 51 20

I'm using Deno 1.26.0 and Chrome 106.

Create catch-all handler for 404s in static site

Redirects from deno.land may not be sent to the correct location - in the Oak server sitting on top of the Docusaurus site, introduce a middleware handler that will be the fallback if a static file isn't found. 301 redirect if possible, otherwise 404.

Invalid signal: SIGINT process.kill("SIGINT")

https://deno.land/[email protected]/examples/subprocess

I follow the code at the bottom of the document page to execute an invalid type error

import { mergeReadableStreams } from "https://deno.land/[email protected]/streams/merge_readable_streams.ts";

// create the file to attach the process to
const file = await Deno.open("./hello.txt", {
  read: true,
  write: true,
  create: true,
});

// start the process
const process = Deno.run({
  cmd: ["yes"],
  stdout: "piped",
  stderr: "piped",
});

// example of combining stdout and stderr while sending to a file
const joined = mergeReadableStreams(
  process.stdout.readable,
  process.stderr.readable,
);

// returns a promise that resolves when the process is killed/closed
joined.pipeTo(file.writable).then(() => console.log("pipe join done"));

// manually stop process "yes" will never end on its own
setTimeout(() => {
  process.kill("SIGINT"); //Change to SIGTERM, no error
}, 100);

error: Uncaught TypeError: Invalid signal: SIGINT
process.kill("SIGINT"); //SIGTERM
^
at opKill (deno:runtime/js/40_process.js:21:9)
at Process.kill (deno:runtime/js/40_process.js:99:7)
at file:///E:/test/deno/deno01/index.ts:648:11
at Object.action (deno:ext/web/02_timers.js:147:13)
at handleTimerMacrotask (deno:ext/web/02_timers.js:64:12)

Set up CI and Deno Deploy project

Create the necessary CI integrations and Deno Deploy setup to run the doc site. Site should be hosted on the main Deno Deploy account.

Generate API Reference for Deno runtime as a build task

The API reference today is dynamically generated per request on the server. The current implementation of the doc site links back to deno.land where this work is being done today.

However, this content is not truly dynamic, and could benefit from static generation. This would also allow us to use the sitemap generation features of Docusaurus.

Using the same API endpoints that exist for the Deno runtime today, we should generate MDX files for the Runtime and include them in the runtime docs folder.

[Deploy docs] - Finish/Fix DynamoDB example

What problem are you trying to solve?

The Connect to DynamoDB docs page has snippets of useful information but is ultimately a let down as there are large gaps that need filled in on your own. It would be far more useful to have a complete working example. Specific issues:

  • Gather credentials from DynamoDB

My experience in getting credentials was different to this. This may be my inexperience of using AWS, but should be checked for currency.

  • Write code that connects to DynamoDB

By referencing new ApiFactory().makeNew(DynamoDB) I am assuming that you are referencing https://deno.land/x/aws_api but there is no mention of this anywhere on the page nor any imports anywhere to guide you. Also, there is a strong caveat to using this library, namely:

Do not use this module in mission critical stuff. It's supposed to be for automation scripts, quick & dirty pieces of infrastructure, and prototype microservices and so on. If you just want the real, full-fat AWS SDK, a port of it has been uploaded at /x/aws_sdk.

Either use this library and highlight the caveat or show the example using the official AWS SDK.

Also, this line const data = await client.send(command); is thrown in without any suggestion where command comes from, how to construct it, what it looks like, etc.

Describe the solution you'd like

The docs for this are too light, much is left to the reader to work out and do a disservice to anyone attempting to follow them. Either this example should be properly and more thoroughly completed or this page removed.

Describe alternatives you've considered

As per above, complete this example or remove this page.

Documentation, Adoption, Migration Strategy

No response

Missing documentation for `deno check` tool

I think it would be helpful to document deno check usage. I knew the command existed but it's usage is not that clear (including --help output).

I expected deno check to typecheck the whole project but it needs the file. Calling it like this deno check **/**.ts is also not what I was looking for. After some trial and error I figured out that it type-checks all of the imported files recursively so I basically needed to call deno check src/mod.ts.

Would be nice to clarify this in docs.

Doubts on "Integrity Checking and Lock Files" Article

Greetings!

The article "Integrity Checking and Lock Files" doesn't explain what happen if the checking fails. How the another developer fix the problem? The dependency on cloud has not the code that the project needs. Must the first developer share the dependency manually? How do that?

Thanks. Deno is great!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.