From a8bd195aa1249520777e1fd3dece078ab193a56a Mon Sep 17 00:00:00 2001 From: Roj Date: Wed, 6 Mar 2024 13:37:29 +0300 Subject: [PATCH 1/3] Nitpick docs --- frontend/docs/about-slow-types.md | 4 +-- frontend/docs/api.md | 2 +- frontend/docs/badges.md | 34 +++++++++++------------- frontend/docs/faq.md | 12 ++++----- frontend/docs/immutability.md | 2 +- frontend/docs/introduction.md | 8 +++--- frontend/docs/migrate-x-to-jsr.md | 2 +- frontend/docs/packages.md | 12 ++++----- frontend/docs/publishing-packages.md | 28 +++++++++---------- frontend/docs/scopes.md | 4 +-- frontend/docs/scoring.md | 2 +- frontend/docs/using-packages.md | 6 ++--- frontend/docs/why.md | 14 +++++----- frontend/docs/with/cloudflare-workers.md | 2 +- frontend/docs/with/deno.md | 4 +-- frontend/docs/with/nextjs.md | 2 +- frontend/docs/with/node.md | 2 +- frontend/docs/with/vite.md | 2 +- frontend/routes/index.tsx | 4 +-- 19 files changed, 72 insertions(+), 74 deletions(-) diff --git a/frontend/docs/about-slow-types.md b/frontend/docs/about-slow-types.md index 825873fb..bda7f6ef 100644 --- a/frontend/docs/about-slow-types.md +++ b/frontend/docs/about-slow-types.md @@ -1,11 +1,11 @@ --- -description: JSR uses TypeScript types to generate docs and improve node compat. "Slow types" can get in the way of this. +description: JSR uses TypeScript types to generate documentation and improve Node.js compatibility. "Slow types" can get in the way of this. --- In many of its features, JSR analyzes source code, and in particular TypeScript types in the source code. This is done to generate documentation, generate type declarations for the npm compatibility layer, and to speed up type checking of -projects using JSR packages in Deno. +Deno projects using packages from JSR. For these features to work, the TypeScript source must not export any functions, classes, interfaces, or variables, or type aliases, that are themselves or diff --git a/frontend/docs/api.md b/frontend/docs/api.md index 90771698..dc9ab8d2 100644 --- a/frontend/docs/api.md +++ b/frontend/docs/api.md @@ -151,7 +151,7 @@ metadata. Instead, retrieve yanked status from the package metadata. The npm compatibility registry API is used to download npm compatible tarballs for JSR packages, and to retrieve npm compatible package metadata. -[Learn more about the npm compatibility layer](/docs/npm-compatibility). +[Learn more about the npm compatibility layer.](/docs/npm-compatibility) The npm compatibility registry API is served from the `https://npm.jsr.io` domain. diff --git a/frontend/docs/badges.md b/frontend/docs/badges.md index 5ef18546..83defb63 100644 --- a/frontend/docs/badges.md +++ b/frontend/docs/badges.md @@ -1,63 +1,61 @@ --- -description: JSR provides a badges for each package that can be used to showcase the package version or JSR score for a package. +description: JSR provides badges for each package that can be used to showcase its latest version or its score. --- -For every package, JSR provides an SVG badge that can be included in READMEs, -documentation, or other places to showcase the package version or JSR score for -a package. +JSR provides badges for each package that can be used to showcase its latest version or its score. ## Version Badge -The version badge is a simple way to show the version of a package. It is +The version badge can be used to showcase the version of a package. It is available at the following URL: ``` https://jsr.io/badges/@/ ``` -It looks like this: +Here's how it looks: [![JSR](https://jsr.io/badges/@luca/flag)](https://jsr.io/@luca/flag) -To include it in a markdown document, copy the following code and replace -`` and `` with the scope and package name of the package. +To include it in a Markdown document, use the following code, replacing +`` and `` with the actual scope and name of the package. ```markdown -[![](https://jsr.io/badges/@/)](https://jsr.io/@/) +[![JSR](https://jsr.io/badges/@/)](https://jsr.io/@/) ``` -In a HTML document, use the following code: +In HTML documents, the following can be used: ```html - + JSR ``` ## JSR Score Badge -The JSR score badge is a way to show the JSR score of a package. It is available +The JSR score badge can be used to showcase the JSR score of a package. It is available at the following URL: ``` https://jsr.io/badges/@//score ``` -It looks like this: +Here's how it looks: [![JSR Score](https://jsr.io/badges/@luca/flag/score)](https://jsr.io/@luca/flag) -To include it in a markdown document, copy the following code and replace -`` and `` with the scope and package name of the package. +To include it in a Markdown document, use the following code, replacing +`` and `` with the actual scope and name of the package. ```markdown -[![](https://jsr.io/badges/@//score)](https://jsr.io/@/) +[![JSR Score](https://jsr.io/badges/@//score)](https://jsr.io/@/) ``` -In a HTML document, use the following code: +In HTML documents, the following can be used: ```html - + JSR Score ``` diff --git a/frontend/docs/faq.md b/frontend/docs/faq.md index 2bac6ff4..725db584 100644 --- a/frontend/docs/faq.md +++ b/frontend/docs/faq.md @@ -6,10 +6,10 @@ description: Answers to frequently asked questions about JSR. ### What is JSR? JSR is a new package registry for JavaScript. It is a free alternative to npm, -that is designed to work well with all JavaScript tools and runtimes, like Node, +that is designed to work well with all JavaScript tools and runtimes, like Node.js, Deno, Bun, Vite, and more. -[Learn more about "Why JSR?".](/docs/why) +[Learn more about why we built JSR.](/docs/why) ### How do I use JSR? @@ -41,7 +41,7 @@ seamlessly work with JSR. JSR is designed to be better than npm: - No need for build steps, which leads to better user experience for package publishers - Secure, token-less publishing for resistance against supply chain attacks -- and more... [Learn more about "Why JSR?".](/docs/why) +- and more... [Learn more about why we built JSR.](/docs/why) ### How is JSR funded? / Do I have to pay for JSR? @@ -57,14 +57,14 @@ foreseeable future - JSR is designed to be very cheap to run. ### Can I delete a package from JSR? Source code published to JSR can not be deleted. -[Learn more about immutability](/docs/immutability). +[Learn more about immutability.](/docs/immutability) You can "yank" a version of a package, which will hide the version from the default view, but it will still be available to users who depend on it. -[Learn more about yanking](/docs/packages#yanking-versions). +[Learn more about yanking.](/docs/packages#yanking-versions) You may delete a package if it has no published versions. -[Learn more about deleting empty packages](/docs/packages#deleting-a-package). +[Learn more about deleting empty packages.](/docs/packages#deleting-a-package) ### Why are there quotas for scopes and package versions on JSR? diff --git a/frontend/docs/immutability.md b/frontend/docs/immutability.md index b5541d4a..58adf55d 100644 --- a/frontend/docs/immutability.md +++ b/frontend/docs/immutability.md @@ -46,7 +46,7 @@ version number in your config file before publishing a new version. You can't delete a package version after it has been published. However, you can publish a new version of your package and yank the old version. -[Learn more about yanking](/docs/packages#yanking-versions). +[Learn more about yanking.](/docs/packages#yanking-versions) Note that yanking does not remove the contents of the package version from the registry. It only superficially hides the version from users in some places. diff --git a/frontend/docs/introduction.md b/frontend/docs/introduction.md index eb3fc087..7aa3115f 100644 --- a/frontend/docs/introduction.md +++ b/frontend/docs/introduction.md @@ -4,9 +4,9 @@ description: JSR is a new modern package registry for JavaScript and TypeScript. --- The JavaScript Registry (**JSR**) is a modern package registry for JavaScript -and TypeScript. JSR works with many runtimes (Node, Deno, browsers, and more) +and TypeScript. JSR works with many runtimes (Node.js, Deno, browsers, and more) and is backwards compatible with npm. -[Learn more about why we built JSR](/docs/why). +[Learn more about why we built JSR.](/docs/why) ## Using JSR packages @@ -43,7 +43,7 @@ printProgress(); You can find more packages on [jsr.io](https://jsr.io). Each package on the JSR site also displays documentation, which is automatically generated from the package's source code. -[Learn more about using JSR packages](/docs/using-packages). +[Learn more about using packages.](/docs/using-packages) ## Publishing JSR packages @@ -98,4 +98,4 @@ Successfully published @luca/greet@1.0.0 Visit https://jsr.io/@luca/greet@1.0.0 for details ``` -Learn more about [publishing JSR packages](/docs/publishing-packages). +[Learn more about publishing packages.](/docs/publishing-packages) diff --git a/frontend/docs/migrate-x-to-jsr.md b/frontend/docs/migrate-x-to-jsr.md index 23861ed6..704387c2 100644 --- a/frontend/docs/migrate-x-to-jsr.md +++ b/frontend/docs/migrate-x-to-jsr.md @@ -5,7 +5,7 @@ description: guide to learn how. --- -> **NOTE:** This guide is for Deno users only. If you are using JSR with Node or +> **NOTE:** This guide is for Deno users only. If you are using JSR with Node.js or > in a different runtime environment, this information does not pertain to you. For package authors currently hosting modules on diff --git a/frontend/docs/packages.md b/frontend/docs/packages.md index aa5dcc59..d44b2e7e 100644 --- a/frontend/docs/packages.md +++ b/frontend/docs/packages.md @@ -6,11 +6,11 @@ description: Packages are collections of JavaScript or TypeScript code published Packages are the core of JSR. Packages are collections of JavaScript or TypeScript code published by an author to the JSR site. Packages can be imported by other users using `jsr:` imports. -[Learn more about using JSR](/docs/using-packages). +[Learn more about using JSR.](/docs/using-packages) Packages are contained by scopes. Scopes are collections of packages published by an author to the JSR site. Scopes are similar to npm organizations or GitHub -accounts. [Learn more about scopes](/docs/scopes). +accounts. [Learn more about scopes.](/docs/scopes) Packages have a name. Package names are unique within a scope - no two packages in the same scope can have the same name. Package names must be between 2 and 20 @@ -43,7 +43,7 @@ repository, one must be an admin of the repository on GitHub. Linking a GitHub repository also enables tokenless publishing from GitHub Actions using OIDC. -[Learn more about publishing from GitHub Actions](/docs/publishing-packages#publishing-from-github-actions). +[Learn more about publishing from GitHub Actions.](/docs/publishing-packages#publishing-from-github-actions) ## Deleting a package @@ -52,7 +52,7 @@ admins can delete a package. Packages can only be deleted if they have no published versions. If a package has published versions, it can not be deleted. -[Learn more about registry immutability](/docs/immutability). +[Learn more about registry immutability.](/docs/immutability) ## Versions @@ -60,10 +60,10 @@ Code in a package is published as a version. A version is a snapshot of the package's code at a point in time. Versions are immutable - once a version is published, it cannot be changed or deleted. This ensures that packages are reliable and that users can trust that a package will not change out from under -them. [Learn more about registry immutability](/docs/immutability). +them. [Learn more about registry immutability.](/docs/immutability) Versions are published using the `jsr publish` or `deno publish` command. -[Learn more about publishing packages](/docs/publishing-packages). +[Learn more about publishing packages.](/docs/publishing-packages) Versions must be valid [SemVer](https://semver.org/) versions. We recommend that packages follow semantic versioning policies. These work as follows: diff --git a/frontend/docs/publishing-packages.md b/frontend/docs/publishing-packages.md index bddbf862..f1e68e02 100644 --- a/frontend/docs/publishing-packages.md +++ b/frontend/docs/publishing-packages.md @@ -5,8 +5,8 @@ description: Learn how to publish packages to JSR. You can publish most JavaScript and TypeScript code written using ESM modules as a JSR package. JSR packages are published to [jsr.io](/), and can be imported -from **Deno**, **Node**, and other tools. -[Learn more about using JSR packages](/docs/using-packages). +from **Deno**, **Node.js**, and other tools. +[Learn more about using packages.](/docs/using-packages) Both code written originally to use `package.json`, and code written originally for Deno can be published as a JSR package. JSR supports and encourages @@ -35,16 +35,16 @@ code must follow these rules to be able to be published to JSR. - **`node:` built-ins are supported**: You can import Node.js built-ins using the `node:` scheme. For example, you can import the `fs` module using `import { readFile } from "node:fs";`. If your package has a `package.json`, - you can also import Node built-ins with bare specifiers (without the `node:` + you can also import Node.js built-ins with bare specifiers (without the `node:` prefix). - **Simple file names**: File names must be Windows and Unix compatible. This means that file names cannot contain characters like `*`, `:`, or `?`. You may also not have multiple files with the same name, but different casing. - **Preferably, no TypeScript "slow types"**: To speed up type checking, support - documentation generation, and node compatibility, JSR packages should not use + documentation generation, and Node.js compatibility, JSR packages should not use certain TypeScript types in exported functions, classes, or variables. This is enforced by default, but can be opted out of. - [Learn more about "slow types"](/docs/about-slow-types). + [Learn more about "slow types."](/docs/about-slow-types) - **Valid cross file imports**: All of the relative imports between modules in your package must resolve at publish time. The format of supported specifiers depends on whether a `package.json` is in use, and is elaborated below. @@ -125,7 +125,7 @@ import * as express from "npm:express@4"; You may import JSR packages specified in the `"dependencies"` of a `package.json`, ones specified in an import map or `deno.json`, or ones specified in source code using `jsr:` specifiers. -[Learn more about using JSR packages](/docs/using-packages). +[Learn more about using packages.](/docs/using-packages) ```json // package.json @@ -143,7 +143,7 @@ import * as encoding from "@std/encoding"; import { printProgress } from "jsr:@luca/flag@1"; ``` -### Importing Node built-ins +### Importing Node.js built-ins You may import Node.js built-ins using the `node:` scheme. If a `package.json` is present in your package, you may also omit the `node:` scheme. @@ -188,7 +188,7 @@ When writing TypeScript, you should ensure that your code does not use "slow types" that prevent JSR from generating documentation, generating type declarations for the npm compatibility layer, and speeding up type checking for consumers of your package. -[Learn more about "slow types"](/docs/about-slow-types). +[Learn more about "slow types."](/docs/about-slow-types) > You may temporarily bypass this restriction by publishing with the > `--allow-slow-types` flag. This will cause type checking to be significantly @@ -213,12 +213,12 @@ JSR properties in their `deno.json` to avoid having to create another file. ``` The `name` field is the name of your package, prefixed with a JSR scope. -[Learn more about scope and package names](#creating-a-scope-and-package). +[Learn more about scope and package names.](#creating-a-scope-and-package) The `version` field is the version of your package. This field must be a valid [SemVer](https://semver.org/) version. You must increment the version of your package every time you publish a new version. -[Learn more about package versions](/docs/packages#versions). +[Learn more about package versions.](/docs/packages#versions) The `exports` field tells JSR which modules should be importable by users of your package. The `exports` field can either be specified as a single string, or @@ -262,7 +262,7 @@ You can also use the `include` and `exclude` options to include and exclude files during publishing. If using a `deno.json`, you can use `publish.include` and `publish.exclude` to include and exclude files only for publishing, rather than for all Deno subcommands. -[Learn more about ignoring files](#ignoring-files). +[Learn more about ignoring files.](#ignoring-files) ## Creating a scope and package @@ -275,7 +275,7 @@ You can create a scope at [jsr.io/new](/new). Scopes names must be between 2 and hyphens. You can only create a scope if the name is not already taken. Scope names that are very similar to existing scope names -- for example ones that only differ by a hyphen -- are prohibited. -[Learn more about scopes](/docs/scopes). +[Learn more about scopes.](/docs/scopes) After you have created a scope, you can create a package in that scope. You can create a package at [jsr.io/new](/new). Package names must be between 2 and 20 @@ -283,7 +283,7 @@ characters long, and can only contain lowercase letters, numbers, and hyphens. You can only create a package if the name is not already taken. Package names that are very similar to existing package names -- for example ones that only differ by a hyphen -- are prohibited. -[Learn more about packages](/docs/packages). +[Learn more about packages.](/docs/packages) ## Verifying your package @@ -355,7 +355,7 @@ During publishing, both the JSR CLI and the JSR server will run many checks against your package to ensure that it is valid. If any of these checks fail, the CLI will output an error message. You must fix these errors before you can attempt publishing again. -[Learn more about troubleshooting publishing errors](/docs/troubleshooting#publishing-errors). +[Learn more about troubleshooting publishing errors.](/docs/troubleshooting#publishing-errors) ## Publishing from GitHub Actions diff --git a/frontend/docs/scopes.md b/frontend/docs/scopes.md index e34517e7..789d2d99 100644 --- a/frontend/docs/scopes.md +++ b/frontend/docs/scopes.md @@ -90,7 +90,7 @@ If you are the last member of a scope, you cannot leave the scope. You can Scopes can only be deleted if they have no packages. If you want to delete a scope, you must first delete all packages in that scope. -[Learn more about package deletion](/docs/packages#deleting-a-package). +[Learn more about package deletion.](/docs/packages#deleting-a-package) Scopes can be deleted by scope admins from the scope settings page. @@ -99,7 +99,7 @@ Scopes can be deleted by scope admins from the scope settings page. If you link a package in your scope to a GitHub repository, you can publish packages from GitHub Actions without having to configure any secrets or authentication. -[Learn more about publishing from GitHub Actions](/docs/publishing-packages#publishing-from-github-actions). +[Learn more about publishing from GitHub Actions.](/docs/publishing-packages#publishing-from-github-actions) Firstly, publishing is permitted only if the GitHub Actions workflow runs in the GitHub repository that is linked to the package on JSR. diff --git a/frontend/docs/scoring.md b/frontend/docs/scoring.md index b96ce9c5..9cd65a7c 100644 --- a/frontend/docs/scoring.md +++ b/frontend/docs/scoring.md @@ -12,7 +12,7 @@ factors from 4 high level categories: - **Documentation**: The presence of a README file, module documentation, and documentation for public functions and types. - [Learn more about writing documentation](/docs/writing-docs). + [Learn more about writing documentation.](/docs/writing-docs) - **Best practices**: Packages should not use [slow types](/docs/about-slow-types), and should be published with [package provenance](/docs/trust). diff --git a/frontend/docs/using-packages.md b/frontend/docs/using-packages.md index 0c33eaed..cda14ad0 100644 --- a/frontend/docs/using-packages.md +++ b/frontend/docs/using-packages.md @@ -4,7 +4,7 @@ description: Learn how to use JSR packages in your projects. --- You can use JSR packages in any runtime that supports ES modules, like Deno, -Node, Bun, Cloudflare Workers, etc. You can also use JSR packages with bundlers +Node.js, Bun, Cloudflare Workers, etc. You can also use JSR packages with bundlers that support ES modules, such as **Vite**, **esbuild**, **Webpack**, and **Rollup**. @@ -137,14 +137,14 @@ deno add @luca/flag@^1.0.1 npx jsr add @luca/flag@^1.0.1 ``` -Learn more about [semantic versioning here](https://semver.org/). +Learn more about semantic versioning [here](https://semver.org/). ## Entrypoints Every package on JSR has one or more entrypoints. An entrypoint is a module that can be imported by users of the package. The entrypoint is specified in the `exports` field of the package's config file. -[Learn more about `exports`](/docs/publishing-packages#package-metadata). +[Learn more about `exports`.](/docs/publishing-packages#package-metadata) If you don't specify an entrypoint in your import, the runtime will use the package's default entrypoint. For example, when you import `jsr:@luca/flag@1`, diff --git a/frontend/docs/why.md b/frontend/docs/why.md index d06fdec3..aea04a03 100644 --- a/frontend/docs/why.md +++ b/frontend/docs/why.md @@ -6,7 +6,7 @@ description: JavaScript runtimes, and to be fast, simple, and secure. --- -The incredible success of Node has been driven in large part by the success of +The incredible success of Node.js has been driven in large part by the success of [npm](https://www.npmjs.com/). With 2 million (going on 3 million) packages, npm is likely the most successful package manager and registry in history. The JavaScript community should look on this accomplishment with pride. @@ -18,9 +18,9 @@ was when npm was originally introduced: adopted [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) as the module format of choice, superseding CommonJS. -- **There are more JavaScript runtimes than just Node and browsers**. With the +- **There are more JavaScript runtimes than just Node.js and browsers**. With the emergence of Deno, Bun, workerd, and other new JavaScript environments, a - Node-centric package registry no longer makes sense for the entire JS + Node.js-centric package registry no longer makes sense for the entire JS ecosystem. - **TypeScript has emerged as a de facto standard**. TypeScript, as a superset of JavaScript and test bed for the latest ECMAScript features, has emerged as @@ -41,9 +41,9 @@ published directly to JSR. Platforms (like Deno) that [natively support TypeScript](/docs/using-packages#native-jsr-imports) can use these files directly. -For other environments (like Node) that lack native TypeScript support, JSR will +For other environments (like Node.js) that lack native TypeScript support, JSR will transpile your source code to JavaScript, and distribute your modules with -`.d.ts` files to support TypeScript tooling for Node projects. No additional +`.d.ts` files to support TypeScript tooling for Node.js projects. No additional configuration or build steps are required on the side of module authors. JSR will also generate reference documentation for your packages from TypeScript @@ -62,7 +62,7 @@ community in this direction. For this reason, JSR was designed for ESM only. The goal of JSR is to work everywhere JavaScript works, and to provide a runtime-agnostic registry for JavaScript and TypeScript code. Today, JSR works with Deno and other npm environments that populate a `node_modules`. This means -that Node, Bun, Cloudflare Workers, and other projects that manage dependencies +that Node.js, Bun, Cloudflare Workers, and other projects that manage dependencies with a `package.json` can interoperate with JSR as well. We intend to expand our support of bundlers and other runtimes as time goes on, @@ -89,7 +89,7 @@ including but not limited to: - Automatic API documentation generation from source code - Zero-config [publishing from GitHub Actions](/docs/publishing-packages#publishing-from-github-actions) -- Automatic inclusion of `.d.ts` files for Node/npm distribution +- Automatic inclusion of `.d.ts` files for Node.js/npm distribution - Automated guidance on TypeScript best practices that will keep your code loading as fast as possible. - Much more diff --git a/frontend/docs/with/cloudflare-workers.md b/frontend/docs/with/cloudflare-workers.md index c054f2de..6c015fd6 100644 --- a/frontend/docs/with/cloudflare-workers.md +++ b/frontend/docs/with/cloudflare-workers.md @@ -49,4 +49,4 @@ Cloudflare Worker. You can then visit `http://localhost:8787` to see the result. $ wrangler dev ``` -[Learn more about using JSR packages](/docs/using-packages). +[Learn more about using packages.](/docs/using-packages) diff --git a/frontend/docs/with/deno.md b/frontend/docs/with/deno.md index 8a4c6eae..ca091e8a 100644 --- a/frontend/docs/with/deno.md +++ b/frontend/docs/with/deno.md @@ -52,7 +52,7 @@ import { printProgress } from "jsr:@luca/flag@^1.0.1"; printProgress(); ``` -Learn more about [using JSR packages](/docs/using-packages). +[Learn more about using packages.](/docs/using-packages) ## Additional tooling @@ -63,7 +63,7 @@ Deno provides a variety of additional tools to help manage JSR packages. The `deno publish` command can be used to publish JSR packages. Packages can be published from a local machine, or from CI. -Learn more about [publishing JSR packages](/docs/publishing-packages). +[Learn more about publishing packages.](/docs/publishing-packages) ### Documentation linting and preview diff --git a/frontend/docs/with/nextjs.md b/frontend/docs/with/nextjs.md index dd5eb9af..26f71b86 100644 --- a/frontend/docs/with/nextjs.md +++ b/frontend/docs/with/nextjs.md @@ -47,4 +47,4 @@ application at `http://localhost:3000/`. You can then visit $ next dev ``` -[Learn more about using JSR packages](/docs/using-packages). +[Learn more about using packages.](/docs/using-packages) diff --git a/frontend/docs/with/node.md b/frontend/docs/with/node.md index 32806adb..98705fba 100644 --- a/frontend/docs/with/node.md +++ b/frontend/docs/with/node.md @@ -37,4 +37,4 @@ Running this code will print a red "Hello, world!" text to your terminal. $ node main.js ``` -[Learn more about using JSR packages](/docs/using-packages). +[Learn more about using packages.](/docs/using-packages) diff --git a/frontend/docs/with/vite.md b/frontend/docs/with/vite.md index 480f8cf9..d2139720 100644 --- a/frontend/docs/with/vite.md +++ b/frontend/docs/with/vite.md @@ -47,4 +47,4 @@ it. $ vite ``` -[Learn more about using JSR packages](/docs/using-packages). +[Learn more about using packages.](/docs/using-packages) diff --git a/frontend/routes/index.tsx b/frontend/routes/index.tsx index b7d1d9dd..30b5d2dd 100644 --- a/frontend/routes/index.tsx +++ b/frontend/routes/index.tsx @@ -128,7 +128,7 @@ export default function Home({ data }: PageProps) { Node logo @@ -160,7 +160,7 @@ export default function Home({ data }: PageProps) {

- JSR modules can be used in Node, Deno, Bun, Cloudflare Workers, + JSR modules can be used in Node.js, Deno, Bun, Cloudflare Workers, and more.

From 70448aeefd1c9b0d737cc6745566bc62b6568f7a Mon Sep 17 00:00:00 2001 From: Roj Date: Wed, 6 Mar 2024 13:44:34 +0300 Subject: [PATCH 2/3] fmt --- frontend/docs/badges.md | 7 ++++--- frontend/docs/faq.md | 4 ++-- frontend/docs/introduction.md | 3 +-- frontend/docs/migrate-x-to-jsr.md | 5 +++-- frontend/docs/publishing-packages.md | 10 +++++----- frontend/docs/using-packages.md | 6 +++--- frontend/docs/why.md | 18 +++++++++--------- frontend/routes/index.tsx | 4 ++-- 8 files changed, 29 insertions(+), 28 deletions(-) diff --git a/frontend/docs/badges.md b/frontend/docs/badges.md index 83defb63..8fcdfb02 100644 --- a/frontend/docs/badges.md +++ b/frontend/docs/badges.md @@ -2,7 +2,8 @@ description: JSR provides badges for each package that can be used to showcase its latest version or its score. --- -JSR provides badges for each package that can be used to showcase its latest version or its score. +JSR provides badges for each package that can be used to showcase its latest +version or its score. ## Version Badge @@ -34,8 +35,8 @@ In HTML documents, the following can be used: ## JSR Score Badge -The JSR score badge can be used to showcase the JSR score of a package. It is available -at the following URL: +The JSR score badge can be used to showcase the JSR score of a package. It is +available at the following URL: ``` https://jsr.io/badges/@//score diff --git a/frontend/docs/faq.md b/frontend/docs/faq.md index 725db584..36d165a2 100644 --- a/frontend/docs/faq.md +++ b/frontend/docs/faq.md @@ -6,8 +6,8 @@ description: Answers to frequently asked questions about JSR. ### What is JSR? JSR is a new package registry for JavaScript. It is a free alternative to npm, -that is designed to work well with all JavaScript tools and runtimes, like Node.js, -Deno, Bun, Vite, and more. +that is designed to work well with all JavaScript tools and runtimes, like +Node.js, Deno, Bun, Vite, and more. [Learn more about why we built JSR.](/docs/why) diff --git a/frontend/docs/introduction.md b/frontend/docs/introduction.md index 7aa3115f..021ac758 100644 --- a/frontend/docs/introduction.md +++ b/frontend/docs/introduction.md @@ -42,8 +42,7 @@ printProgress(); You can find more packages on [jsr.io](https://jsr.io). Each package on the JSR site also displays documentation, which is automatically generated from the -package's source code. -[Learn more about using packages.](/docs/using-packages) +package's source code. [Learn more about using packages.](/docs/using-packages) ## Publishing JSR packages diff --git a/frontend/docs/migrate-x-to-jsr.md b/frontend/docs/migrate-x-to-jsr.md index 704387c2..e2c9d9c8 100644 --- a/frontend/docs/migrate-x-to-jsr.md +++ b/frontend/docs/migrate-x-to-jsr.md @@ -5,8 +5,9 @@ description: guide to learn how. --- -> **NOTE:** This guide is for Deno users only. If you are using JSR with Node.js or -> in a different runtime environment, this information does not pertain to you. +> **NOTE:** This guide is for Deno users only. If you are using JSR with Node.js +> or in a different runtime environment, this information does not pertain to +> you. For package authors currently hosting modules on [deno.land/x](https://deno.land/x), it should be possible to migrate those diff --git a/frontend/docs/publishing-packages.md b/frontend/docs/publishing-packages.md index f1e68e02..8873acb1 100644 --- a/frontend/docs/publishing-packages.md +++ b/frontend/docs/publishing-packages.md @@ -35,15 +35,15 @@ code must follow these rules to be able to be published to JSR. - **`node:` built-ins are supported**: You can import Node.js built-ins using the `node:` scheme. For example, you can import the `fs` module using `import { readFile } from "node:fs";`. If your package has a `package.json`, - you can also import Node.js built-ins with bare specifiers (without the `node:` - prefix). + you can also import Node.js built-ins with bare specifiers (without the + `node:` prefix). - **Simple file names**: File names must be Windows and Unix compatible. This means that file names cannot contain characters like `*`, `:`, or `?`. You may also not have multiple files with the same name, but different casing. - **Preferably, no TypeScript "slow types"**: To speed up type checking, support - documentation generation, and Node.js compatibility, JSR packages should not use - certain TypeScript types in exported functions, classes, or variables. This is - enforced by default, but can be opted out of. + documentation generation, and Node.js compatibility, JSR packages should not + use certain TypeScript types in exported functions, classes, or variables. + This is enforced by default, but can be opted out of. [Learn more about "slow types."](/docs/about-slow-types) - **Valid cross file imports**: All of the relative imports between modules in your package must resolve at publish time. The format of supported specifiers diff --git a/frontend/docs/using-packages.md b/frontend/docs/using-packages.md index cda14ad0..f5775ea3 100644 --- a/frontend/docs/using-packages.md +++ b/frontend/docs/using-packages.md @@ -4,9 +4,9 @@ description: Learn how to use JSR packages in your projects. --- You can use JSR packages in any runtime that supports ES modules, like Deno, -Node.js, Bun, Cloudflare Workers, etc. You can also use JSR packages with bundlers -that support ES modules, such as **Vite**, **esbuild**, **Webpack**, and -**Rollup**. +Node.js, Bun, Cloudflare Workers, etc. You can also use JSR packages with +bundlers that support ES modules, such as **Vite**, **esbuild**, **Webpack**, +and **Rollup**. ## Adding a package diff --git a/frontend/docs/why.md b/frontend/docs/why.md index aea04a03..de38d27b 100644 --- a/frontend/docs/why.md +++ b/frontend/docs/why.md @@ -6,9 +6,9 @@ description: JavaScript runtimes, and to be fast, simple, and secure. --- -The incredible success of Node.js has been driven in large part by the success of -[npm](https://www.npmjs.com/). With 2 million (going on 3 million) packages, npm -is likely the most successful package manager and registry in history. The +The incredible success of Node.js has been driven in large part by the success +of [npm](https://www.npmjs.com/). With 2 million (going on 3 million) packages, +npm is likely the most successful package manager and registry in history. The JavaScript community should look on this accomplishment with pride. So why build JSR when npm exists? Because the world today is not the same as it @@ -18,8 +18,8 @@ was when npm was originally introduced: adopted [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) as the module format of choice, superseding CommonJS. -- **There are more JavaScript runtimes than just Node.js and browsers**. With the - emergence of Deno, Bun, workerd, and other new JavaScript environments, a +- **There are more JavaScript runtimes than just Node.js and browsers**. With + the emergence of Deno, Bun, workerd, and other new JavaScript environments, a Node.js-centric package registry no longer makes sense for the entire JS ecosystem. - **TypeScript has emerged as a de facto standard**. TypeScript, as a superset @@ -41,8 +41,8 @@ published directly to JSR. Platforms (like Deno) that [natively support TypeScript](/docs/using-packages#native-jsr-imports) can use these files directly. -For other environments (like Node.js) that lack native TypeScript support, JSR will -transpile your source code to JavaScript, and distribute your modules with +For other environments (like Node.js) that lack native TypeScript support, JSR +will transpile your source code to JavaScript, and distribute your modules with `.d.ts` files to support TypeScript tooling for Node.js projects. No additional configuration or build steps are required on the side of module authors. @@ -62,8 +62,8 @@ community in this direction. For this reason, JSR was designed for ESM only. The goal of JSR is to work everywhere JavaScript works, and to provide a runtime-agnostic registry for JavaScript and TypeScript code. Today, JSR works with Deno and other npm environments that populate a `node_modules`. This means -that Node.js, Bun, Cloudflare Workers, and other projects that manage dependencies -with a `package.json` can interoperate with JSR as well. +that Node.js, Bun, Cloudflare Workers, and other projects that manage +dependencies with a `package.json` can interoperate with JSR as well. We intend to expand our support of bundlers and other runtimes as time goes on, and document the APIs and techniques for doing so. diff --git a/frontend/routes/index.tsx b/frontend/routes/index.tsx index 30b5d2dd..8e4a6421 100644 --- a/frontend/routes/index.tsx +++ b/frontend/routes/index.tsx @@ -160,8 +160,8 @@ export default function Home({ data }: PageProps) {

- JSR modules can be used in Node.js, Deno, Bun, Cloudflare Workers, - and more. + JSR modules can be used in Node.js, Deno, Bun, Cloudflare + Workers, and more.

Module authors can count on great editor support from strongly From a0ad9e9e8534c015f0874a974795971957fd58b2 Mon Sep 17 00:00:00 2001 From: Roj Date: Wed, 6 Mar 2024 16:39:56 +0300 Subject: [PATCH 3/3] Apply requested changes --- frontend/docs/badges.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/docs/badges.md b/frontend/docs/badges.md index 8fcdfb02..674fa907 100644 --- a/frontend/docs/badges.md +++ b/frontend/docs/badges.md @@ -1,9 +1,9 @@ --- -description: JSR provides badges for each package that can be used to showcase its latest version or its score. +description: JSR provides badges for each package that can be used to showcase its latest version or its JSR score. --- JSR provides badges for each package that can be used to showcase its latest -version or its score. +version or its JSR score. ## Version Badge @@ -29,7 +29,7 @@ In HTML documents, the following can be used: ```html - JSR + ``` @@ -57,6 +57,6 @@ In HTML documents, the following can be used: ```html - JSR Score + ```