0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 20:25:12 -05:00

docs: point to new "Deno 1.x to 2.x Migration Guide" (#22199)

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Asher Gomez 2024-02-02 12:32:46 +11:00 committed by GitHub
parent fa91ad91c1
commit 3f4639c330
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 153 additions and 100 deletions

View file

@ -1,6 +1,8 @@
Download http://localhost:4545/run/warn_on_deprecated_api/mod.ts Download http://localhost:4545/run/warn_on_deprecated_api/mod.ts
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2.
See the Deno 1 to 2 Migration Guide for more information at https://docs.deno.com/runtime/manual/advanced/migrate_deprecations
Stack trace: Stack trace:
at [WILDCARD]warn_on_deprecated_api/main.js:3:16 at [WILDCARD]warn_on_deprecated_api/main.js:3:16
@ -9,6 +11,8 @@ hint: Use "Deno.Command()" API instead.
hello world hello world
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2.
See the Deno 1 to 2 Migration Guide for more information at https://docs.deno.com/runtime/manual/advanced/migrate_deprecations
Stack trace: Stack trace:
at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18) at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18)
at [WILDCARD]warn_on_deprecated_api/main.js:25:7 at [WILDCARD]warn_on_deprecated_api/main.js:25:7
@ -18,6 +22,8 @@ hint: Use "Deno.Command()" API instead.
hello world hello world
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2.
See the Deno 1 to 2 Migration Guide for more information at https://docs.deno.com/runtime/manual/advanced/migrate_deprecations
Stack trace: Stack trace:
at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18) at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18)
at [WILDCARD]warn_on_deprecated_api/main.js:26:7 at [WILDCARD]warn_on_deprecated_api/main.js:26:7
@ -27,6 +33,8 @@ hint: Use "Deno.Command()" API instead.
hello world hello world
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2.
See the Deno 1 to 2 Migration Guide for more information at https://docs.deno.com/runtime/manual/advanced/migrate_deprecations
Stack trace: Stack trace:
at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18) at runEcho ([WILDCARD]warn_on_deprecated_api/main.js:14:18)
at [WILDCARD]warn_on_deprecated_api/main.js:29:9 at [WILDCARD]warn_on_deprecated_api/main.js:29:9
@ -45,6 +53,8 @@ hello world
hello world hello world
warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2. warning: Use of deprecated "Deno.run()" API. This API will be removed in Deno 2.
See the Deno 1 to 2 Migration Guide for more information at https://docs.deno.com/runtime/manual/advanced/migrate_deprecations
Stack trace: Stack trace:
at runEcho (http://localhost:4545/run/warn_on_deprecated_api/mod.ts:2:18) at runEcho (http://localhost:4545/run/warn_on_deprecated_api/mod.ts:2:18)
at [WILDCARD]warn_on_deprecated_api/main.js:32:7 at [WILDCARD]warn_on_deprecated_api/main.js:32:7

View file

@ -1653,8 +1653,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to read * An abstract interface which when implemented provides an interface to read
* bytes into an array buffer asynchronously. * bytes into an array buffer asynchronously.
* *
* @deprecated Use {@linkcode ReadableStream} instead. {@linkcode Reader} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O */ * @category I/O */
export interface Reader { export interface Reader {
@ -1690,8 +1691,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to read * An abstract interface which when implemented provides an interface to read
* bytes into an array buffer synchronously. * bytes into an array buffer synchronously.
* *
* @deprecated Use {@linkcode ReadableStream} instead. {@linkcode ReaderSync} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O */ * @category I/O */
export interface ReaderSync { export interface ReaderSync {
@ -1727,8 +1729,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to write * An abstract interface which when implemented provides an interface to write
* bytes from an array buffer to a file/resource asynchronously. * bytes from an array buffer to a file/resource asynchronously.
* *
* @deprecated Use {@linkcode WritableStream} instead. {@linkcode Writer} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O */ * @category I/O */
export interface Writer { export interface Writer {
@ -1754,8 +1757,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to write * An abstract interface which when implemented provides an interface to write
* bytes from an array buffer to a file/resource synchronously. * bytes from an array buffer to a file/resource synchronously.
* *
* @deprecated Use {@linkcode WritableStream} instead. {@linkcode WriterSync} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O */ * @category I/O */
export interface WriterSync { export interface WriterSync {
@ -1775,8 +1779,9 @@ declare namespace Deno {
* An abstract interface which when implemented provides an interface to close * An abstract interface which when implemented provides an interface to close
* files/resources that were previously opened. * files/resources that were previously opened.
* *
* @deprecated Use {@linkcode ReadableStream} and {@linkcode WritableStream} * @deprecated This will be removed in Deno 2.0. See the
* instead. {@linkcode Closer} will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O */ * @category I/O */
export interface Closer { export interface Closer {
@ -1830,8 +1835,9 @@ declare namespace Deno {
* an error occurs. It resolves to the number of bytes copied or rejects with * an error occurs. It resolves to the number of bytes copied or rejects with
* the first error encountered while copying. * the first error encountered while copying.
* *
* @deprecated Use {@linkcode https://deno.land/std/io/copy.ts?s=copy | copy} * @deprecated This will be removed in Deno 2.0. See the
* instead. {@linkcode Deno.copy} will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
* *
@ -1848,8 +1854,9 @@ declare namespace Deno {
/** /**
* Turns a Reader, `r`, into an async iterator. * Turns a Reader, `r`, into an async iterator.
* *
* @deprecated Use {@linkcode ReadableStream} instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.iter} will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -1861,8 +1868,9 @@ declare namespace Deno {
/** /**
* Turns a ReaderSync, `r`, into an iterator. * Turns a ReaderSync, `r`, into an iterator.
* *
* @deprecated Use {@linkcode ReadableStream} instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.iterSync} will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -1983,8 +1991,9 @@ declare namespace Deno {
* const text = new TextDecoder().decode(buf); // "hello world" * const text = new TextDecoder().decode(buf); // "hello world"
* ``` * ```
* *
* @deprecated Use `reader.read()` instead. {@linkcode Deno.read} will be * @deprecated This will be removed in Deno 2.0. See the
* removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2015,8 +2024,9 @@ declare namespace Deno {
* const text = new TextDecoder().decode(buf); // "hello world" * const text = new TextDecoder().decode(buf); // "hello world"
* ``` * ```
* *
* @deprecated Use `reader.readSync()` instead. {@linkcode Deno.readSync} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2039,8 +2049,9 @@ declare namespace Deno {
* const bytesWritten = await Deno.write(file.rid, data); // 11 * const bytesWritten = await Deno.write(file.rid, data); // 11
* ``` * ```
* *
* @deprecated Use `writer.write()` instead. {@linkcode Deno.write} will be * @deprecated This will be removed in Deno 2.0. See the
* removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2064,8 +2075,9 @@ declare namespace Deno {
* const bytesWritten = Deno.writeSync(file.rid, data); // 11 * const bytesWritten = Deno.writeSync(file.rid, data); // 11
* ``` * ```
* *
* @deprecated Use `writer.writeSync()` instead. {@linkcode Deno.writeSync} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2108,8 +2120,9 @@ declare namespace Deno {
* console.log(await Deno.seek(file.rid, -2, Deno.SeekMode.End)); // "9" (i.e. 11-2) * console.log(await Deno.seek(file.rid, -2, Deno.SeekMode.End)); // "9" (i.e. 11-2)
* ``` * ```
* *
* @deprecated Use `file.seek()` instead. {@linkcode Deno.seek} will be * @deprecated This will be removed in Deno 2.0. See the
* removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2156,8 +2169,9 @@ declare namespace Deno {
* console.log(Deno.seekSync(file.rid, -2, Deno.SeekMode.End)); // "9" (i.e. 11-2) * console.log(Deno.seekSync(file.rid, -2, Deno.SeekMode.End)); // "9" (i.e. 11-2)
* ``` * ```
* *
* @deprecated Use `file.seekSync()` instead. {@linkcode Deno.seekSync} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2258,8 +2272,9 @@ declare namespace Deno {
* // do work with "file" object * // do work with "file" object
* ``` * ```
* *
* @deprecated Use `.close()` method on the resource instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.close} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2296,8 +2311,9 @@ declare namespace Deno {
* The resource ID associated with the file instance. The resource ID * The resource ID associated with the file instance. The resource ID
* should be considered an opaque reference to resource. * should be considered an opaque reference to resource.
* *
* @deprecated Use {@linkcode Deno.FsFile} instance methods instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.FsFile.rid} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
readonly rid: number; readonly rid: number;
/** A {@linkcode ReadableStream} instance representing to the byte contents /** A {@linkcode ReadableStream} instance representing to the byte contents
@ -2333,9 +2349,9 @@ declare namespace Deno {
* not be constructed directly. Instead use {@linkcode Deno.open} or * not be constructed directly. Instead use {@linkcode Deno.open} or
* {@linkcode Deno.openSync} to create a new instance of `FsFile`. * {@linkcode Deno.openSync} to create a new instance of `FsFile`.
* *
* @deprecated Use {@linkcode Deno.open} or {@linkcode Deno.openSync} * @deprecated This will be removed in Deno 2.0. See the
* instead. {@linkcode Deno.FsFile.constructor} will be removed in Deno * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* 2.0. * for migration instructions.
*/ */
constructor(rid: number); constructor(rid: number);
/** Write the contents of the array buffer (`p`) to the file. /** Write the contents of the array buffer (`p`) to the file.
@ -2666,8 +2682,9 @@ declare namespace Deno {
/** /**
* The Deno abstraction for reading and writing files. * The Deno abstraction for reading and writing files.
* *
* @deprecated Use {@linkcode Deno.FsFile} instead. {@linkcode Deno.File} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category File System * @category File System
*/ */
@ -2723,8 +2740,9 @@ declare namespace Deno {
* The resource ID assigned to `stdin`. This can be used with the discreet * The resource ID assigned to `stdin`. This can be used with the discreet
* I/O functions in the `Deno` namespace. * I/O functions in the `Deno` namespace.
* *
* @deprecated Use {@linkcode Deno.stdin} instance methods instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.stdin.rid} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
readonly rid: number; readonly rid: number;
/** A readable stream interface to `stdin`. */ /** A readable stream interface to `stdin`. */
@ -2770,8 +2788,9 @@ declare namespace Deno {
* The resource ID assigned to `stdout`. This can be used with the discreet * The resource ID assigned to `stdout`. This can be used with the discreet
* I/O functions in the `Deno` namespace. * I/O functions in the `Deno` namespace.
* *
* @deprecated Use {@linkcode Deno.stdout} instance methods instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.stdout.rid} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
readonly rid: number; readonly rid: number;
/** A writable stream interface to `stdout`. */ /** A writable stream interface to `stdout`. */
@ -2803,8 +2822,9 @@ declare namespace Deno {
* The resource ID assigned to `stderr`. This can be used with the discreet * The resource ID assigned to `stderr`. This can be used with the discreet
* I/O functions in the `Deno` namespace. * I/O functions in the `Deno` namespace.
* *
* @deprecated Use {@linkcode Deno.stderr} instance methods instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.stderr.rid} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
readonly rid: number; readonly rid: number;
/** A writable stream interface to `stderr`. */ /** A writable stream interface to `stderr`. */
@ -2900,9 +2920,9 @@ declare namespace Deno {
* console.log(Deno.isatty(ttyRid)); // true * console.log(Deno.isatty(ttyRid)); // true
* ``` * ```
* *
* @deprecated Use `Deno.stdin.isTerminal()`, `Deno.stdout.isTerminal()` or * @deprecated This will be removed in Deno 2.0. See the
* `Deno.stderr.isTerminal()` instead. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* {@linkcode Deno.isatty} will be removed in v2.0.0. * for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2911,9 +2931,9 @@ declare namespace Deno {
/** /**
* A variable-sized buffer of bytes with `read()` and `write()` methods. * A variable-sized buffer of bytes with `read()` and `write()` methods.
* *
* @deprecated Use * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode https://deno.land/std/io/buffer.ts?s=Buffer | Buffer} instead. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* {@linkcode Deno.Buffer} will be removed in v2.0.0. * for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2987,9 +3007,9 @@ declare namespace Deno {
* Read Reader `r` until EOF (`null`) and resolve to the content as * Read Reader `r` until EOF (`null`) and resolve to the content as
* Uint8Array`. * Uint8Array`.
* *
* @deprecated Use * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode https://deno.land/std/io/read_all.ts?s=readAll | readAll} * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* instead. {@linkcode Deno.readAll} will be removed in v2.0.0. * for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -2999,9 +3019,9 @@ declare namespace Deno {
* Synchronously reads Reader `r` until EOF (`null`) and returns the content * Synchronously reads Reader `r` until EOF (`null`) and returns the content
* as `Uint8Array`. * as `Uint8Array`.
* *
* @deprecated Use * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode https://deno.land/std/io/read_all.ts?s=readAllSync | readAllSync} * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* instead. {@linkcode Deno.readAllSync} will be removed in v2.0.0. * for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -3010,9 +3030,9 @@ declare namespace Deno {
/** /**
* Write all the content of the array buffer (`arr`) to the writer (`w`). * Write all the content of the array buffer (`arr`) to the writer (`w`).
* *
* @deprecated Use * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode https://deno.land/std/io/write_all.ts?s=writeAll | writeAll} * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* instead. {@linkcode Deno.writeAll} will be removed in v2.0.0. * for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -3022,9 +3042,9 @@ declare namespace Deno {
* Synchronously write all the content of the array buffer (`arr`) to the * Synchronously write all the content of the array buffer (`arr`) to the
* writer (`w`). * writer (`w`).
* *
* @deprecated Use * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode https://deno.land/std/io/write_all.ts?s=writeAllSync | writeAllSync} * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* instead. {@linkcode Deno.writeAllSync} will be removed in v2.0.0. * for migration instructions.
* *
* @category I/O * @category I/O
*/ */
@ -3971,7 +3991,7 @@ declare namespace Deno {
/** @category Observability /** @category Observability
* *
* @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. * @deprecated This will be removed in Deno 2.0.
*/ */
export interface OpMetrics { export interface OpMetrics {
opsDispatched: number; opsDispatched: number;
@ -3989,7 +4009,7 @@ declare namespace Deno {
/** @category Observability /** @category Observability
* *
* @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. * @deprecated This will be removed in Deno 2.0.
*/ */
export interface Metrics extends OpMetrics { export interface Metrics extends OpMetrics {
ops: Record<string, OpMetrics>; ops: Record<string, OpMetrics>;
@ -4020,7 +4040,7 @@ declare namespace Deno {
* *
* @category Observability * @category Observability
* *
* @deprecated {@linkcode Deno.metrics} will be removed in v2.0.0. * @deprecated This will be removed in Deno 2.0.
*/ */
export function metrics(): Metrics; export function metrics(): Metrics;
@ -4028,7 +4048,7 @@ declare namespace Deno {
* A map of open resources that Deno is tracking. The key is the resource ID * A map of open resources that Deno is tracking. The key is the resource ID
* (_rid_) and the value is its representation. * (_rid_) and the value is its representation.
* *
* @deprecated {@linkcode Deno.resources} will be removed in Deno 2.0. * @deprecated This will be removed in Deno 2.0.
* *
* @category Observability */ * @category Observability */
interface ResourceMap { interface ResourceMap {
@ -4048,7 +4068,7 @@ declare namespace Deno {
* // { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" } * // { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" }
* ``` * ```
* *
* @deprecated {@linkcode Deno.resources} will be removed in Deno 2.0. * @deprecated This will be removed in Deno 2.0.
* *
* @category Observability * @category Observability
*/ */
@ -4094,8 +4114,9 @@ declare namespace Deno {
/** /**
* The resource id. * The resource id.
* *
* @deprecated Use {@linkcode Deno.FsWatcher} instance methods instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.FsWatcher.rid} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
readonly rid: number; readonly rid: number;
/** Stops watching the file system and closes the watcher resource. */ /** Stops watching the file system and closes the watcher resource. */
@ -4103,7 +4124,9 @@ declare namespace Deno {
/** /**
* Stops watching the file system and closes the watcher resource. * Stops watching the file system and closes the watcher resource.
* *
* @deprecated {@linkcode Deno.FsWatcher.return} will be removed in Deno 2.0. * @deprecated This will be removed in Deno 2.0. See the
* {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
return?(value?: any): Promise<IteratorResult<FsEvent>>; return?(value?: any): Promise<IteratorResult<FsEvent>>;
[Symbol.asyncIterator](): AsyncIterableIterator<FsEvent>; [Symbol.asyncIterator](): AsyncIterableIterator<FsEvent>;
@ -4156,8 +4179,9 @@ declare namespace Deno {
/** /**
* Options which can be used with {@linkcode Deno.run}. * Options which can be used with {@linkcode Deno.run}.
* *
* @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category Sub Process */ * @category Sub Process */
export interface RunOptions { export interface RunOptions {
@ -4222,8 +4246,9 @@ declare namespace Deno {
* If `success` is `true`, then `code` will be `0`, but if `success` is * If `success` is `true`, then `code` will be `0`, but if `success` is
* `false`, the sub-process exit code will be set in `code`. * `false`, the sub-process exit code will be set in `code`.
* *
* @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category Sub Process */ * @category Sub Process */
export type ProcessStatus = export type ProcessStatus =
@ -4242,8 +4267,9 @@ declare namespace Deno {
* Represents an instance of a sub process that is returned from * Represents an instance of a sub process that is returned from
* {@linkcode Deno.run} which can be used to manage the sub-process. * {@linkcode Deno.run} which can be used to manage the sub-process.
* *
* @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category Sub Process */ * @category Sub Process */
export class Process<T extends RunOptions = RunOptions> { export class Process<T extends RunOptions = RunOptions> {
@ -4444,8 +4470,9 @@ declare namespace Deno {
* *
* Requires `allow-run` permission. * Requires `allow-run` permission.
* *
* @deprecated Use {@linkcode Deno.Command} instead. {@linkcode Deno.run} * @deprecated This will be removed in Deno 2.0. See the
* will be removed in v2.0.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @tags allow-run * @tags allow-run
* @category Sub Process * @category Sub Process
@ -5249,8 +5276,9 @@ declare namespace Deno {
* called when `Deno.inspect()` is called, or when the object is logged to * called when `Deno.inspect()` is called, or when the object is logged to
* the console. * the console.
* *
* @deprecated Use `Symbol.for("Deno.customInspect")` instead. This symbol * @deprecated This will be removed in Deno 2.0. See the
* will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category Console and Debugging * @category Console and Debugging
*/ */
@ -5355,8 +5383,9 @@ declare namespace Deno {
* console.log(new TextDecoder().decode(data)); // Hello W * console.log(new TextDecoder().decode(data)); // Hello W
* ``` * ```
* *
* @deprecated Use {@linkcode Deno.FsFile.truncate} instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.ftruncate} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category File System * @category File System
*/ */
@ -5400,8 +5429,9 @@ declare namespace Deno {
* console.log(new TextDecoder().decode(data)); // Hello W * console.log(new TextDecoder().decode(data)); // Hello W
* ``` * ```
* *
* @deprecated Use {@linkcode Deno.FsFile.truncateSync} instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.ftruncateSync} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category File System * @category File System
*/ */
@ -5417,8 +5447,9 @@ declare namespace Deno {
* Deno.futimeSync(file.rid, 1556495550, new Date()); * Deno.futimeSync(file.rid, 1556495550, new Date());
* ``` * ```
* *
* @deprecated Use {@linkcode Deno.FsFile.utimeSync} instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.futimeSync} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category File System * @category File System
*/ */
@ -5438,8 +5469,9 @@ declare namespace Deno {
* await Deno.futime(file.rid, 1556495550, new Date()); * await Deno.futime(file.rid, 1556495550, new Date());
* ``` * ```
* *
* @deprecated Use {@linkcode Deno.FsFile.utime} instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.futime} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category File System * @category File System
*/ */
@ -5460,8 +5492,9 @@ declare namespace Deno {
* assert(fileInfo.isFile); * assert(fileInfo.isFile);
* ``` * ```
* *
* @deprecated Use `file.stat()` instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.fstat} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category File System * @category File System
*/ */
@ -5479,8 +5512,9 @@ declare namespace Deno {
* assert(fileInfo.isFile); * assert(fileInfo.isFile);
* ``` * ```
* *
* @deprecated Use `file.statSync()` instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.fstatSync} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
* *
* @category File System * @category File System
*/ */
@ -5530,8 +5564,10 @@ declare namespace Deno {
* request from a remote client. * request from a remote client.
* *
* @category HTTP Server * @category HTTP Server
* @deprecated Use {@linkcode Deno.serve} instead. This will be removed in *
* Deno 2.0. * @deprecated This will be removed in Deno 2.0. See the
* {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
export interface RequestEvent { export interface RequestEvent {
/** The request from the client in the form of the web platform /** The request from the client in the form of the web platform
@ -5552,8 +5588,10 @@ declare namespace Deno {
* requests on the HTTP server connection. * requests on the HTTP server connection.
* *
* @category HTTP Server * @category HTTP Server
* @deprecated Use {@linkcode Deno.serve} instead. This will be removed in *
* Deno 2.0. * @deprecated This will be removed in Deno 2.0. See the
* {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
export interface HttpConn extends AsyncIterable<RequestEvent>, Disposable { export interface HttpConn extends AsyncIterable<RequestEvent>, Disposable {
/** The resource ID associated with this connection. Generally users do not /** The resource ID associated with this connection. Generally users do not
@ -5619,8 +5657,9 @@ declare namespace Deno {
* used elsewhere. In such a case, this function will fail. * used elsewhere. In such a case, this function will fail.
* *
* @category HTTP Server * @category HTTP Server
* @deprecated Use {@linkcode Deno.serve} instead. This will be removed in * @deprecated This will be removed in Deno 2.0. See the
* Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
export function serveHttp(conn: Conn): HttpConn; export function serveHttp(conn: Conn): HttpConn;
@ -6280,8 +6319,9 @@ declare namespace Deno {
/** /**
* @category HTTP Server * @category HTTP Server
* *
* @deprecated Use {@linkcode Deno.HttpServer} instead. * @deprecated This will be removed in Deno 2.0. See the
* {@linkcode Deno.Server} will be removed in Deno 2.0. * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
* for migration instructions.
*/ */
export type Server = HttpServer; export type Server = HttpServer;

View file

@ -85,7 +85,6 @@ import {
workerRuntimeGlobalProperties, workerRuntimeGlobalProperties,
} from "ext:runtime/98_global_scope_worker.js"; } from "ext:runtime/98_global_scope_worker.js";
import { SymbolAsyncDispose, SymbolDispose } from "ext:deno_web/00_infra.js"; import { SymbolAsyncDispose, SymbolDispose } from "ext:deno_web/00_infra.js";
// deno-lint-ignore prefer-primordials // deno-lint-ignore prefer-primordials
if (Symbol.dispose) throw "V8 supports Symbol.dispose now, no need to shim it!"; if (Symbol.dispose) throw "V8 supports Symbol.dispose now, no need to shim it!";
ObjectDefineProperties(Symbol, { ObjectDefineProperties(Symbol, {
@ -172,6 +171,10 @@ function warnOnDeprecatedApi(apiName, stack, ...suggestions) {
"font-weight: bold;", "font-weight: bold;",
); );
console.error();
console.error(
"See the Deno 1 to 2 Migration Guide for more information at https://docs.deno.com/runtime/manual/advanced/migrate_deprecations",
);
console.error(); console.error();
if (stackLines.length > 0) { if (stackLines.length > 0) {
console.error("Stack trace:"); console.error("Stack trace:");