diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/args/flags.rs | 52 | ||||
-rw-r--r-- | cli/args/mod.rs | 4 | ||||
-rw-r--r-- | cli/js/40_jupyter.js | 2 | ||||
-rw-r--r-- | cli/tsc/dts/lib.deno.ns.d.ts | 85 |
4 files changed, 68 insertions, 75 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 092b97a30..f76d0ca4e 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -985,7 +985,8 @@ Docs: https://deno.land/manual@v", env!("CARGO_PKG_VERSION"), color_print::cstr!( " -Modules: https://deno.land/std/ https://deno.land/x/ +Standard Library: https://jsr.io/@std +Modules: https://jsr.io/ https://deno.land/x/ Bugs: https://github.com/denoland/deno/issues To start the REPL: @@ -1319,11 +1320,11 @@ Use an alternative bundler like \"deno_emit\", \"esbuild\" or \"rollup\" instead Output a single JavaScript file with all dependencies. - deno bundle https://deno.land/std/http/file_server.ts file_server.bundle.js + deno bundle jsr:@std/http/file-server file_server.bundle.js If no output file is given, the output is written to standard output: - deno bundle https://deno.land/std/http/file_server.ts", + deno bundle jsr:@std/http/file-server", ) .defer(|cmd| { compile_args(cmd) @@ -1351,7 +1352,7 @@ fn cache_subcommand() -> Command { Download and compile a module with all of its static dependencies and save them in the local cache, without running any code: - deno cache https://deno.land/std/http/file_server.ts + deno cache jsr:@std/http/file-server Future runs of this module will trigger no downloads or compilation unless --reload is specified.", @@ -1372,7 +1373,7 @@ fn check_subcommand() -> Command { .long_about( "Download and type-check without execution. - deno check https://deno.land/std/http/file_server.ts + deno check jsr:@std/http/file-server Unless --reload is specified, this command will not re-download already cached dependencies.", ) @@ -1407,8 +1408,8 @@ fn compile_subcommand() -> Command { .long_about( "Compiles the given script into a self contained executable. - deno compile -A https://deno.land/std/http/file_server.ts - deno compile --output file_server https://deno.land/std/http/file_server.ts + deno compile -A jsr:@std/http/file-server + deno compile --output file_server jsr:@std/http/file-server Any flags passed which affect runtime behavior, such as '--unstable', '--allow-*', '--v8-flags', etc. are encoded into the output executable and @@ -1900,7 +1901,7 @@ fn info_subcommand() -> Command { Get information about a module: - deno info https://deno.land/std/http/file_server.ts + deno info jsr:@std/http/file-server The following information is shown: @@ -1949,12 +1950,12 @@ fn install_subcommand() -> Command { .long_about( "Installs a script as an executable in the installation root's bin directory. - deno install --global --allow-net --allow-read https://deno.land/std/http/file_server.ts + deno install --global --allow-net --allow-read jsr:@std/http/file-server deno install -g https://examples.deno.land/color-logging.ts To change the executable name, use -n/--name: - deno install -g --allow-net --allow-read -n serve https://deno.land/std/http/file_server.ts + deno install -g --allow-net --allow-read -n serve jsr:@std/http/file-server The executable name is inferred by default: - Attempt to take the file stem of the URL path. The above example would @@ -1966,7 +1967,7 @@ The executable name is inferred by default: To change the installation root, use --root: - deno install -g --allow-net --allow-read --root /usr/local https://deno.land/std/http/file_server.ts + deno install -g --allow-net --allow-read --root /usr/local jsr:@std/http/file-server The installation root is determined, in order of precedence: - --root option @@ -2243,15 +2244,15 @@ ability to spawn subprocesses. Grant all permissions: - deno run -A https://deno.land/std/http/file_server.ts + deno run -A jsr:@std/http/file-server Grant permission to read from disk and listen to network: - deno run --allow-read --allow-net https://deno.land/std/http/file_server.ts + deno run --allow-read --allow-net jsr:@std/http/file-server Grant permission to read allow-listed files from disk: - deno run --allow-read=/etc https://deno.land/std/http/file_server.ts + deno run --allow-read=/etc jsr:@std/http/file-server Specifying the filename '-' to read the file from stdin. @@ -2506,7 +2507,7 @@ maps remote specifiers to the downloaded files. Remote modules and multiple modules may also be specified: - deno vendor main.ts test.deps.ts https://deno.land/std/path/mod.ts", + deno vendor main.ts test.deps.ts jsr:@std/path", ) .defer(|cmd| cmd .arg( @@ -3059,9 +3060,9 @@ fn reload_arg() -> Arg { "Reload source code cache (recompile TypeScript) --reload Reload everything ---reload=https://deno.land/std +--reload=jsr:@std/http/file-server Reload only standard modules ---reload=https://deno.land/std/fs/utils.ts,https://deno.land/std/fmt/colors.ts +--reload=jsr:@std/http/file-server,jsr:@std/assert/assert-equals Reloads specific modules --reload=npm: Reload all npm modules @@ -6772,18 +6773,15 @@ mod tests { #[test] fn install() { - let r = flags_from_vec(svec![ - "deno", - "install", - "https://deno.land/std/http/file_server.ts" - ]); + let r = + flags_from_vec(svec!["deno", "install", "jsr:@std/http/file-server"]); assert_eq!( r.unwrap(), Flags { subcommand: DenoSubcommand::Install(InstallFlags { kind: InstallKind::Global(InstallFlagsGlobal { name: None, - module_url: "https://deno.land/std/http/file_server.ts".to_string(), + module_url: "jsr:@std/http/file-server".to_string(), args: vec![], root: None, force: false, @@ -6798,7 +6796,7 @@ mod tests { "deno", "install", "-g", - "https://deno.land/std/http/file_server.ts" + "jsr:@std/http/file-server" ]); assert_eq!( r.unwrap(), @@ -6806,7 +6804,7 @@ mod tests { subcommand: DenoSubcommand::Install(InstallFlags { kind: InstallKind::Global(InstallFlagsGlobal { name: None, - module_url: "https://deno.land/std/http/file_server.ts".to_string(), + module_url: "jsr:@std/http/file-server".to_string(), args: vec![], root: None, force: false, @@ -6821,14 +6819,14 @@ mod tests { #[test] fn install_with_flags() { #[rustfmt::skip] - let r = flags_from_vec(svec!["deno", "install", "--import-map", "import_map.json", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--lock-write", "--cert", "example.crt", "--cached-only", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--inspect=127.0.0.1:9229", "--name", "file_server", "--root", "/foo", "--force", "--env=.example.env", "https://deno.land/std/http/file_server.ts", "foo", "bar"]); + let r = flags_from_vec(svec!["deno", "install", "--import-map", "import_map.json", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--lock-write", "--cert", "example.crt", "--cached-only", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--inspect=127.0.0.1:9229", "--name", "file_server", "--root", "/foo", "--force", "--env=.example.env", "jsr:@std/http/file-server", "foo", "bar"]); assert_eq!( r.unwrap(), Flags { subcommand: DenoSubcommand::Install(InstallFlags { kind: InstallKind::Global(InstallFlagsGlobal { name: Some("file_server".to_string()), - module_url: "https://deno.land/std/http/file_server.ts".to_string(), + module_url: "jsr:@std/http/file-server".to_string(), args: svec!["foo", "bar"], root: Some("/foo".to_string()), force: true, diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 8a65514bf..2d0df3d3c 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -194,8 +194,8 @@ pub enum CacheSetting { /// This is the equivalent of `--reload` in the CLI. ReloadAll, /// Only some cached resources should be used. This is the equivalent of - /// `--reload=https://deno.land/std` or - /// `--reload=https://deno.land/std,https://deno.land/x/example`. + /// `--reload=jsr:@std/http/file-server` or + /// `--reload=jsr:@std/http/file-server,jsr:@std/assert/assert-equals`. ReloadSome(Vec<String>), /// The usability of a cached value is determined by analyzing the cached /// headers and other metadata associated with a cached response, reloading diff --git a/cli/js/40_jupyter.js b/cli/js/40_jupyter.js index 63af393a5..9fab1c414 100644 --- a/cli/js/40_jupyter.js +++ b/cli/js/40_jupyter.js @@ -40,7 +40,7 @@ import { core, internals } from "ext:core/mod.js"; const $display = Symbol.for("Jupyter.display"); -/** Escape copied from https://deno.land/std@0.192.0/html/entities.ts */ +/** Escape copied from https://jsr.io/@std/html/0.221.0/entities.ts */ const rawToEntityEntries = [ ["&", "&"], ["<", "<"], diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index cc73efbf9..4ec687359 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -574,7 +574,7 @@ declare namespace Deno { * Examples: * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test({ * name: "inherit", @@ -589,7 +589,7 @@ declare namespace Deno { * ``` * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test({ * name: "true", @@ -604,7 +604,7 @@ declare namespace Deno { * ``` * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test({ * name: "false", @@ -619,7 +619,7 @@ declare namespace Deno { * ``` * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test({ * name: "localhost:8080", @@ -848,7 +848,7 @@ declare namespace Deno { * `fn` can be async if required. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test({ * name: "example test", @@ -889,7 +889,7 @@ declare namespace Deno { * `fn` can be async if required. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test({ * name: "example test", @@ -926,7 +926,7 @@ declare namespace Deno { * `fn` can be async if required. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test("My test description", () => { * assertEquals("hello", "hello"); @@ -952,7 +952,7 @@ declare namespace Deno { * `fn` can be async if required. Declared function must have a name. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test(function myTestName() { * assertEquals("hello", "hello"); @@ -975,7 +975,7 @@ declare namespace Deno { * `fn` can be async if required. * * ```ts - * import {assert, fail, assertEquals} from "https://deno.land/std/assert/mod.ts"; + * import { assert, fail, assertEquals } from "jsr:@std/assert"; * * Deno.test("My test description", { permissions: { read: true } }, (): void => { * assertEquals("hello", "hello"); @@ -1002,7 +1002,7 @@ declare namespace Deno { * `fn` can be async if required. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test( * { @@ -1040,7 +1040,7 @@ declare namespace Deno { * `fn` can be async if required. Declared function must have a name. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.test( * { permissions: { read: true } }, @@ -1263,7 +1263,7 @@ declare namespace Deno { * will await resolution to consider the test complete. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.bench({ * name: "example test", @@ -1302,7 +1302,7 @@ declare namespace Deno { * will await resolution to consider the test complete. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.bench("My test description", () => { * assertEquals("hello", "hello"); @@ -1330,7 +1330,7 @@ declare namespace Deno { * will await resolution to consider the test complete. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.bench(function myTestName() { * assertEquals("hello", "hello"); @@ -1355,7 +1355,7 @@ declare namespace Deno { * will await resolution to consider the test complete. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.bench( * "My test description", @@ -1392,7 +1392,7 @@ declare namespace Deno { * will await resolution to consider the test complete. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.bench( * { name: "My test description", permissions: { read: true } }, @@ -1426,7 +1426,7 @@ declare namespace Deno { * will await resolution to consider the test complete. * * ```ts - * import { assertEquals } from "https://deno.land/std/assert/mod.ts"; + * import { assertEquals } from "jsr:@std/assert"; * * Deno.bench( * { permissions: { read: true } }, @@ -1679,10 +1679,8 @@ declare namespace Deno { * Implementations should not retain a reference to `p`. * * Use - * [`itereateReader`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReader) - * from - * [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts) - * to turn a `Reader` into an {@linkcode AsyncIterator}. + * {@linkcode https://jsr.io/@std/io/doc/iterate-reader/~/iterateReader | iterateReader} + * to turn {@linkcode Reader} into an {@linkcode AsyncIterator}. */ read(p: Uint8Array): Promise<number | null>; } @@ -1717,10 +1715,8 @@ declare namespace Deno { * Implementations should not retain a reference to `p`. * * Use - * [`itereateReaderSync`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReaderSync) - * from from - * [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts) - * to turn a `ReaderSync` into an {@linkcode Iterator}. + * {@linkcode https://jsr.io/@std/io/doc/iterate-reader/~/iterateReaderSync | iterateReaderSync} + * to turn {@linkcode ReaderSync} into an {@linkcode Iterator}. */ readSync(p: Uint8Array): number | null; } @@ -1743,9 +1739,8 @@ declare namespace Deno { * slice data, even temporarily. * * This function is one of the lowest - * level APIs and most users should not work with this directly, but rather use - * [`writeAll()`](https://deno.land/std/streams/write_all.ts?s=writeAll) from - * [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts) + * level APIs and most users should not work with this directly, but rather + * use {@linkcode https://jsr.io/@std/io/doc/write-all/~/writeAll | writeAll} * instead. * * Implementations should not retain a reference to `p`. @@ -1978,7 +1973,7 @@ declare namespace Deno { * * This function is one of the lowest level APIs and most users should not * work with this directly, but rather use {@linkcode ReadableStream} and - * {@linkcode https://deno.land/std/streams/mod.ts?s=toArrayBuffer|toArrayBuffer} + * {@linkcode https://jsr.io/@std/streams/doc/to-array-buffer/~/toArrayBuffer | toArrayBuffer} * instead. * * **It is not guaranteed that the full buffer will be read in a single call.** @@ -2010,7 +2005,7 @@ declare namespace Deno { * * This function is one of the lowest level APIs and most users should not * work with this directly, but rather use {@linkcode ReadableStream} and - * {@linkcode https://deno.land/std/streams/mod.ts?s=toArrayBuffer|toArrayBuffer} + * {@linkcode https://jsr.io/@std/streams/doc/to-array-buffer/~/toArrayBuffer | toArrayBuffer} * instead. * * **It is not guaranteed that the full buffer will be read in a single @@ -2549,7 +2544,7 @@ declare namespace Deno { /** Resolves to a {@linkcode Deno.FileInfo} for the file. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * * using file = await Deno.open("hello.txt"); * const fileInfo = await file.stat(); @@ -2560,7 +2555,7 @@ declare namespace Deno { /** Synchronously returns a {@linkcode Deno.FileInfo} for the file. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * * using file = Deno.openSync("hello.txt") * const fileInfo = file.statSync(); @@ -3809,7 +3804,7 @@ declare namespace Deno { * of what it points to. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * const fileInfo = await Deno.lstat("hello.txt"); * assert(fileInfo.isFile); * ``` @@ -3826,7 +3821,7 @@ declare namespace Deno { * returned instead of what it points to. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * const fileInfo = Deno.lstatSync("hello.txt"); * assert(fileInfo.isFile); * ``` @@ -3842,7 +3837,7 @@ declare namespace Deno { * always follow symlinks. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * const fileInfo = await Deno.stat("hello.txt"); * assert(fileInfo.isFile); * ``` @@ -3858,7 +3853,7 @@ declare namespace Deno { * `path`. Will always follow symlinks. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * const fileInfo = Deno.statSync("hello.txt"); * assert(fileInfo.isFile); * ``` @@ -5111,7 +5106,7 @@ declare namespace Deno { /** Revokes a permission, and resolves to the state of the permission. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * * const status = await Deno.permissions.revoke({ name: "run" }); * assert(status.state !== "granted") @@ -5122,7 +5117,7 @@ declare namespace Deno { /** Revokes a permission, and returns the state of the permission. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * * const status = Deno.permissions.revokeSync({ name: "run" }); * assert(status.state !== "granted") @@ -5200,14 +5195,14 @@ declare namespace Deno { * ### Revoking * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * * const status = await Deno.permissions.revoke({ name: "run" }); * assert(status.state !== "granted") * ``` * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * * const status = Deno.permissions.revokeSync({ name: "run" }); * assert(status.state !== "granted") @@ -5313,9 +5308,9 @@ declare namespace Deno { * [ "Sushi" ] * ``` * - * If you are looking for a structured way to parse arguments, there is the - * [`std/flags`](https://deno.land/std/flags) module as part of the Deno - * standard library. + * If you are looking for a structured way to parse arguments, there is + * [`parseArgs()`](https://jsr.io/@std/cli/doc/parse-args/~/parseArgs) from + * the Deno Standard Library. * * @category Runtime Environment */ @@ -5535,7 +5530,7 @@ declare namespace Deno { * Returns a `Deno.FileInfo` for the given file stream. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * * const file = await Deno.open("file.txt", { read: true }); * const fileInfo = await Deno.fstat(file.rid); @@ -5555,7 +5550,7 @@ declare namespace Deno { * stream. * * ```ts - * import { assert } from "https://deno.land/std/assert/mod.ts"; + * import { assert } from "jsr:@std/assert"; * * const file = Deno.openSync("file.txt", { read: true }); * const fileInfo = Deno.fstatSync(file.rid); |