1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

Rename crate_ops to extensions (#10431)

This commit is contained in:
Andy Hayden 2021-04-30 12:51:48 -07:00 committed by GitHub
parent abaec7a88e
commit 684c357136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
97 changed files with 55 additions and 55 deletions

View file

@ -8,14 +8,14 @@ members = [
"serde_v8",
"test_plugin",
"test_util",
"op_crates/crypto",
"op_crates/fetch",
"op_crates/timers",
"op_crates/url",
"op_crates/web",
"op_crates/webgpu",
"op_crates/webidl",
"op_crates/websocket",
"extensions/crypto",
"extensions/fetch",
"extensions/timers",
"extensions/url",
"extensions/web",
"extensions/webgpu",
"extensions/webidl",
"extensions/websocket",
]
exclude = [
"std/hash/_wasm"

View file

@ -62,7 +62,7 @@ declare function confirm(message?: string): boolean;
*/
declare function prompt(message?: string, defaultValue?: string): string | null;
// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is.
// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is.
// The types there must first be split into window, worker and global types.
/** The location (URL) of the object it is linked to. Changes done on it are
* reflected on the object it relates to. Accessible via
@ -130,6 +130,6 @@ declare class Location {
replace(url: string): void;
}
// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is.
// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is.
// The types there must first be split into window, worker and global types.
declare var location: Location;

View file

@ -71,7 +71,7 @@ declare var close: () => void;
declare var name: string;
declare var postMessage: (message: any) => void;
// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is.
// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is.
// The types there must first be split into window, worker and global types.
/** The absolute location of the script executed by the Worker. Such an object
* is initialized for each worker and is available via the
@ -90,6 +90,6 @@ declare class WorkerLocation {
readonly search: string;
}
// TODO(nayeemrmn): Move this to `op_crates/web` where its implementation is.
// TODO(nayeemrmn): Move this to `extensions/web` where its implementation is.
// The types there must first be split into window, worker and global types.
declare var location: WorkerLocation;

View file

@ -2,5 +2,5 @@
new Event();
^
at [WILDCARD]
at new Event (deno:op_crates/web/[WILDCARD])
at new Event (deno:extensions/web/[WILDCARD])
at [WILDCARD]

View file

@ -3109,9 +3109,9 @@ console.log("finish");
output: "error_008_checkjs.js.out",
});
itest!(error_009_op_crates_error {
args: "run error_009_op_crates_error.js",
output: "error_009_op_crates_error.js.out",
itest!(error_009_extensions_error {
args: "run error_009_extensions_error.js",
output: "error_009_extensions_error.js.out",
exit_code: 1,
});

View file

@ -70,7 +70,7 @@ unitTest(
},
);
// Test that ops from op_crates have metrics (via OpMiddleware)
// Test that ops from extensions have metrics (via OpMiddleware)
unitTest(function metricsForOpCrates(): void {
const _ = new URL("https://deno.land");

View file

@ -110,7 +110,7 @@ impl ExtensionBuilder {
/// Example:
/// ```ignore
/// include_js_files!(
/// prefix "deno:op_crates/hello",
/// prefix "deno:extensions/hello",
/// "01_hello.js",
/// "02_goodbye.js",
/// )

View file

@ -905,8 +905,8 @@
if (customInspect in value && typeof value[customInspect] === "function") {
return String(value[customInspect]());
}
// This non-unique symbol is used to support op_crates, ie.
// in op_crates/web we don't want to depend on unique "Deno.customInspect"
// This non-unique symbol is used to support extensions, ie.
// in extensions/web we don't want to depend on unique "Deno.customInspect"
// symbol defined in the public API. Internal only, shouldn't be used
// by users.
const nonUniqueCustomInspect = Symbol.for("Deno.customInspect");
@ -915,7 +915,7 @@
typeof value[nonUniqueCustomInspect] === "function"
) {
// TODO(nayeemrmn): `inspect` is passed as an argument because custom
// inspect implementations in `op_crates` need it, but may not have access
// inspect implementations in `extensions` need it, but may not have access
// to the `Deno` namespace in web workers. Remove when the `Deno`
// namespace is always enabled.
return String(value[nonUniqueCustomInspect](inspect));

View file

@ -7,7 +7,7 @@ use std::path::PathBuf;
pub fn init() -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/console",
prefix "deno:extensions/console",
"01_colors.js",
"02_console.js",
))

View file

@ -18,7 +18,7 @@ pub use rand; // Re-export rand
pub fn init(maybe_seed: Option<u64>) -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/crypto",
prefix "deno:extensions/crypto",
"01_crypto.js",
))
.ops(vec![(

View file

@ -58,7 +58,7 @@ pub fn init<P: FetchPermissions + 'static>(
) -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/fetch",
prefix "deno:extensions/fetch",
"01_fetch_util.js",
"11_streams.js",
"20_headers.js",

View file

@ -90,7 +90,7 @@ pub fn init(
) -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/file",
prefix "deno:extensions/file",
"01_file.js",
"02_filereader.js",
"03_blob_url.js",

View file

@ -4,7 +4,7 @@
((window) => {
const core = window.Deno.core;
// Shamelessly cribbed from op_crates/fetch/11_streams.js
// Shamelessly cribbed from extensions/fetch/11_streams.js
class AssertionError extends Error {
constructor(msg) {
super(msg);

View file

@ -44,7 +44,7 @@ impl TimersPermission for NoTimersPermission {
pub fn init<P: TimersPermission + 'static>() -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/timers",
prefix "deno:extensions/timers",
"01_timers.js",
))
.ops(vec![

View file

@ -19,7 +19,7 @@ use std::path::PathBuf;
pub fn init() -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/url",
prefix "deno:extensions/url",
"00_url.js",
))
.ops(vec![

View file

@ -8,7 +8,7 @@ use std::path::PathBuf;
pub fn init() -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/web",
prefix "deno:extensions/web",
"00_infra.js",
"01_dom_exception.js",
"01_mimesniff.js",

View file

@ -97,7 +97,7 @@ impl Resource for WebGpuQuerySet {
pub fn init(unstable: bool) -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/webgpu",
prefix "deno:extensions/webgpu",
"01_webgpu.js",
"02_idl_types.js",
))

View file

@ -7,7 +7,7 @@ use deno_core::Extension;
pub fn init() -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/webidl",
prefix "deno:extensions/webidl",
"00_webidl.js",
))
.build()

View file

@ -339,7 +339,7 @@ pub fn init<P: WebSocketPermissions + 'static>(
) -> Extension {
Extension::builder()
.js(include_js_files!(
prefix "deno:op_crates/websocket",
prefix "deno:extensions/websocket",
"01_websocket.js",
))
.ops(vec![

View file

@ -18,34 +18,34 @@ name = "hello_runtime"
path = "examples/hello_runtime.rs"
[build-dependencies]
deno_console = { path = "../op_crates/console", version = "0.5.0" }
deno_console = { path = "../extensions/console", version = "0.5.0" }
deno_core = { path = "../core", version = "0.86.0" }
deno_crypto = { path = "../op_crates/crypto", version = "0.19.0" }
deno_fetch = { path = "../op_crates/fetch", version = "0.27.0" }
deno_file = { path = "../op_crates/file", version = "0.4.0" }
deno_timers = { path = "../op_crates/timers", version = "0.3.0" }
deno_url = { path = "../op_crates/url", version = "0.5.0" }
deno_web = { path = "../op_crates/web", version = "0.35.0" }
deno_webgpu = { path = "../op_crates/webgpu", version = "0.6.0" }
deno_webidl = { path = "../op_crates/webidl", version = "0.5.0" }
deno_websocket = { path = "../op_crates/websocket", version = "0.10.0" }
deno_crypto = { path = "../extensions/crypto", version = "0.19.0" }
deno_fetch = { path = "../extensions/fetch", version = "0.27.0" }
deno_file = { path = "../extensions/file", version = "0.4.0" }
deno_timers = { path = "../extensions/timers", version = "0.3.0" }
deno_url = { path = "../extensions/url", version = "0.5.0" }
deno_web = { path = "../extensions/web", version = "0.35.0" }
deno_webgpu = { path = "../extensions/webgpu", version = "0.6.0" }
deno_webidl = { path = "../extensions/webidl", version = "0.5.0" }
deno_websocket = { path = "../extensions/websocket", version = "0.10.0" }
[target.'cfg(windows)'.build-dependencies]
winres = "0.1.11"
winapi = "0.3.9"
[dependencies]
deno_console = { path = "../op_crates/console", version = "0.5.0" }
deno_console = { path = "../extensions/console", version = "0.5.0" }
deno_core = { path = "../core", version = "0.86.0" }
deno_crypto = { path = "../op_crates/crypto", version = "0.19.0" }
deno_fetch = { path = "../op_crates/fetch", version = "0.27.0" }
deno_file = { path = "../op_crates/file", version = "0.4.0" }
deno_timers = { path = "../op_crates/timers", version = "0.3.0" }
deno_url = { path = "../op_crates/url", version = "0.5.0" }
deno_web = { path = "../op_crates/web", version = "0.35.0" }
deno_webgpu = { path = "../op_crates/webgpu", version = "0.6.0" }
deno_webidl = { path = "../op_crates/webidl", version = "0.5.0" }
deno_websocket = { path = "../op_crates/websocket", version = "0.10.0" }
deno_crypto = { path = "../extensions/crypto", version = "0.19.0" }
deno_fetch = { path = "../extensions/fetch", version = "0.27.0" }
deno_file = { path = "../extensions/file", version = "0.4.0" }
deno_timers = { path = "../extensions/timers", version = "0.3.0" }
deno_url = { path = "../extensions/url", version = "0.5.0" }
deno_web = { path = "../extensions/web", version = "0.35.0" }
deno_webgpu = { path = "../extensions/webgpu", version = "0.6.0" }
deno_webidl = { path = "../extensions/webidl", version = "0.5.0" }
deno_websocket = { path = "../extensions/websocket", version = "0.10.0" }
atty = "0.2.14"
bytes = "1"

View file

@ -4,7 +4,7 @@
release from) should be frozen and no commits should land until the release is
cut.**
1. Create a PR that bumps versions of all crates in `op_crates` and `runtime`
1. Create a PR that bumps versions of all crates in `extensions` and `runtime`
directories.
To determine if you should bump a crate a minor version instead of a patch
@ -32,9 +32,9 @@ between the crates, it must be done in specific order:
- `deno_core` - all crates depend on `deno_core` so it must always be published
first
- crates in `op_crates/` directory - there is no specific order required for
- crates in `extensions/` directory - there is no specific order required for
those
- `runtime` - this crate depends on `deno_core` and all crates in `op_crates/`
- `runtime` - this crate depends on `deno_core` and all crates in `extensions/`
directory
If there are any problems when you publish, that require you to change the code,