diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-10-04 20:28:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 20:28:51 -0400 |
commit | b81e5db17aa8b3088d6034ddf86b79c69410f012 (patch) | |
tree | 579e4c23d60d1b0d038156bc28a04f74ea87b2f0 | |
parent | 9049213867d30f7df090a83b6baf3e0717a4d2d2 (diff) |
Merge deno_cli_snapshots into deno_cli (#3064)
-rw-r--r-- | .eslintignore | 1 | ||||
-rw-r--r-- | Cargo.lock | 9 | ||||
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | cli/Cargo.toml | 4 | ||||
-rw-r--r-- | cli/build.rs (renamed from js/build.rs) | 4 | ||||
-rw-r--r-- | cli/file_fetcher.rs | 4 | ||||
-rw-r--r-- | cli/js.rs (renamed from js/lib.rs) | 4 | ||||
-rw-r--r-- | cli/js/base64.ts (renamed from js/base64.ts) | 0 | ||||
-rw-r--r-- | cli/js/blob.ts (renamed from js/blob.ts) | 0 | ||||
-rw-r--r-- | cli/js/blob_test.ts (renamed from js/blob_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/body.ts (renamed from js/body.ts) | 0 | ||||
-rw-r--r-- | cli/js/body_test.ts (renamed from js/body_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/buffer.ts (renamed from js/buffer.ts) | 0 | ||||
-rw-r--r-- | cli/js/buffer_test.ts (renamed from js/buffer_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/build.ts (renamed from js/build.ts) | 0 | ||||
-rw-r--r-- | cli/js/build_test.ts (renamed from js/build_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/chmod.ts (renamed from js/chmod.ts) | 0 | ||||
-rw-r--r-- | cli/js/chmod_test.ts (renamed from js/chmod_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/chown.ts (renamed from js/chown.ts) | 0 | ||||
-rw-r--r-- | cli/js/chown_test.ts (renamed from js/chown_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/colors.ts (renamed from js/colors.ts) | 0 | ||||
-rw-r--r-- | cli/js/compiler.ts (renamed from js/compiler.ts) | 0 | ||||
-rw-r--r-- | cli/js/console.ts (renamed from js/console.ts) | 0 | ||||
-rw-r--r-- | cli/js/console_table.ts (renamed from js/console_table.ts) | 0 | ||||
-rw-r--r-- | cli/js/console_test.ts (renamed from js/console_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/copy_file.ts (renamed from js/copy_file.ts) | 0 | ||||
-rw-r--r-- | cli/js/copy_file_test.ts (renamed from js/copy_file_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/core.ts (renamed from js/core.ts) | 0 | ||||
-rw-r--r-- | cli/js/custom_event.ts (renamed from js/custom_event.ts) | 0 | ||||
-rw-r--r-- | cli/js/custom_event_test.ts (renamed from js/custom_event_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/deno.ts (renamed from js/deno.ts) | 0 | ||||
-rw-r--r-- | cli/js/diagnostics.ts (renamed from js/diagnostics.ts) | 0 | ||||
-rw-r--r-- | cli/js/dir.ts (renamed from js/dir.ts) | 0 | ||||
-rw-r--r-- | cli/js/dir_test.ts (renamed from js/dir_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/dispatch.ts (renamed from js/dispatch.ts) | 0 | ||||
-rw-r--r-- | cli/js/dispatch_json.ts (renamed from js/dispatch_json.ts) | 0 | ||||
-rw-r--r-- | cli/js/dispatch_json_test.ts (renamed from js/dispatch_json_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/dispatch_minimal.ts (renamed from js/dispatch_minimal.ts) | 0 | ||||
-rw-r--r-- | cli/js/dom_file.ts (renamed from js/dom_file.ts) | 0 | ||||
-rw-r--r-- | cli/js/dom_types.ts (renamed from js/dom_types.ts) | 0 | ||||
-rw-r--r-- | cli/js/dom_util.ts (renamed from js/dom_util.ts) | 0 | ||||
-rw-r--r-- | cli/js/error_stack.ts (renamed from js/error_stack.ts) | 0 | ||||
-rw-r--r-- | cli/js/error_stack_test.ts (renamed from js/error_stack_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/errors.ts (renamed from js/errors.ts) | 0 | ||||
-rw-r--r-- | cli/js/event.ts (renamed from js/event.ts) | 0 | ||||
-rw-r--r-- | cli/js/event_target.ts (renamed from js/event_target.ts) | 0 | ||||
-rw-r--r-- | cli/js/event_target_test.ts (renamed from js/event_target_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/event_test.ts (renamed from js/event_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/fetch.ts (renamed from js/fetch.ts) | 0 | ||||
-rw-r--r-- | cli/js/fetch_test.ts (renamed from js/fetch_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/file_info.ts (renamed from js/file_info.ts) | 0 | ||||
-rw-r--r-- | cli/js/file_test.ts (renamed from js/file_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/files.ts (renamed from js/files.ts) | 0 | ||||
-rw-r--r-- | cli/js/files_test.ts (renamed from js/files_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/form_data.ts (renamed from js/form_data.ts) | 0 | ||||
-rw-r--r-- | cli/js/form_data_test.ts (renamed from js/form_data_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/format_error.ts (renamed from js/format_error.ts) | 0 | ||||
-rw-r--r-- | cli/js/get_random_values.ts (renamed from js/get_random_values.ts) | 0 | ||||
-rw-r--r-- | cli/js/get_random_values_test.ts (renamed from js/get_random_values_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/globals.ts (renamed from js/globals.ts) | 0 | ||||
-rw-r--r-- | cli/js/globals_test.ts (renamed from js/globals_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/headers.ts (renamed from js/headers.ts) | 0 | ||||
-rw-r--r-- | cli/js/headers_test.ts (renamed from js/headers_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/io.ts (renamed from js/io.ts) | 0 | ||||
-rw-r--r-- | cli/js/lib.deno_runtime.d.ts (renamed from js/lib.deno_runtime.d.ts) | 0 | ||||
-rw-r--r-- | cli/js/lib.web_assembly.d.ts (renamed from js/lib.web_assembly.d.ts) | 0 | ||||
-rw-r--r-- | cli/js/link.ts (renamed from js/link.ts) | 0 | ||||
-rw-r--r-- | cli/js/link_test.ts (renamed from js/link_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/location.ts (renamed from js/location.ts) | 0 | ||||
-rw-r--r-- | cli/js/location_test.ts (renamed from js/location_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/main.ts (renamed from js/main.ts) | 0 | ||||
-rw-r--r-- | cli/js/make_temp_dir.ts (renamed from js/make_temp_dir.ts) | 0 | ||||
-rw-r--r-- | cli/js/make_temp_dir_test.ts (renamed from js/make_temp_dir_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/metrics.ts (renamed from js/metrics.ts) | 0 | ||||
-rw-r--r-- | cli/js/metrics_test.ts (renamed from js/metrics_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/mixins/dom_iterable.ts (renamed from js/mixins/dom_iterable.ts) | 0 | ||||
-rw-r--r-- | cli/js/mixins/dom_iterable_test.ts (renamed from js/mixins/dom_iterable_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/mkdir.ts (renamed from js/mkdir.ts) | 0 | ||||
-rw-r--r-- | cli/js/mkdir_test.ts (renamed from js/mkdir_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/mock_builtin.js (renamed from js/mock_builtin.js) | 0 | ||||
-rw-r--r-- | cli/js/net.ts (renamed from js/net.ts) | 0 | ||||
-rw-r--r-- | cli/js/net_test.ts (renamed from js/net_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/os.ts (renamed from js/os.ts) | 0 | ||||
-rw-r--r-- | cli/js/os_test.ts (renamed from js/os_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/performance.ts (renamed from js/performance.ts) | 0 | ||||
-rw-r--r-- | cli/js/performance_test.ts (renamed from js/performance_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/permissions.ts (renamed from js/permissions.ts) | 0 | ||||
-rw-r--r-- | cli/js/permissions_test.ts (renamed from js/permissions_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/process.ts (renamed from js/process.ts) | 0 | ||||
-rw-r--r-- | cli/js/process_test.ts (renamed from js/process_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/read_dir.ts (renamed from js/read_dir.ts) | 0 | ||||
-rw-r--r-- | cli/js/read_dir_test.ts (renamed from js/read_dir_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/read_file.ts (renamed from js/read_file.ts) | 0 | ||||
-rw-r--r-- | cli/js/read_file_test.ts (renamed from js/read_file_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/read_link.ts (renamed from js/read_link.ts) | 0 | ||||
-rw-r--r-- | cli/js/read_link_test.ts (renamed from js/read_link_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/remove.ts (renamed from js/remove.ts) | 0 | ||||
-rw-r--r-- | cli/js/remove_test.ts (renamed from js/remove_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/rename.ts (renamed from js/rename.ts) | 0 | ||||
-rw-r--r-- | cli/js/rename_test.ts (renamed from js/rename_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/repl.ts (renamed from js/repl.ts) | 0 | ||||
-rw-r--r-- | cli/js/request.ts (renamed from js/request.ts) | 0 | ||||
-rw-r--r-- | cli/js/request_test.ts (renamed from js/request_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/resources.ts (renamed from js/resources.ts) | 0 | ||||
-rw-r--r-- | cli/js/resources_test.ts (renamed from js/resources_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/stat.ts (renamed from js/stat.ts) | 0 | ||||
-rw-r--r-- | cli/js/stat_test.ts (renamed from js/stat_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/symlink.ts (renamed from js/symlink.ts) | 0 | ||||
-rw-r--r-- | cli/js/symlink_test.ts (renamed from js/symlink_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/test_util.ts (renamed from js/test_util.ts) | 6 | ||||
-rw-r--r-- | cli/js/text_encoding.ts (renamed from js/text_encoding.ts) | 0 | ||||
-rw-r--r-- | cli/js/text_encoding_test.ts (renamed from js/text_encoding_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/timers.ts (renamed from js/timers.ts) | 0 | ||||
-rw-r--r-- | cli/js/timers_test.ts (renamed from js/timers_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/tls.ts (renamed from js/tls.ts) | 0 | ||||
-rw-r--r-- | cli/js/tls_test.ts (renamed from js/tls_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/truncate.ts (renamed from js/truncate.ts) | 0 | ||||
-rw-r--r-- | cli/js/truncate_test.ts (renamed from js/truncate_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/ts_global.d.ts (renamed from js/ts_global.d.ts) | 0 | ||||
-rw-r--r-- | cli/js/type_directives.ts (renamed from js/type_directives.ts) | 0 | ||||
-rw-r--r-- | cli/js/types.ts (renamed from js/types.ts) | 0 | ||||
-rwxr-xr-x | cli/js/unit_test_runner.ts (renamed from js/unit_test_runner.ts) | 4 | ||||
-rw-r--r-- | cli/js/unit_tests.ts (renamed from js/unit_tests.ts) | 6 | ||||
-rw-r--r-- | cli/js/url.ts (renamed from js/url.ts) | 0 | ||||
-rw-r--r-- | cli/js/url_search_params.ts (renamed from js/url_search_params.ts) | 0 | ||||
-rw-r--r-- | cli/js/url_search_params_test.ts (renamed from js/url_search_params_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/url_test.ts (renamed from js/url_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/util.ts (renamed from js/util.ts) | 0 | ||||
-rw-r--r-- | cli/js/utime.ts (renamed from js/utime.ts) | 0 | ||||
-rw-r--r-- | cli/js/utime_test.ts (renamed from js/utime_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/version.ts (renamed from js/version.ts) | 0 | ||||
-rw-r--r-- | cli/js/version_test.ts (renamed from js/version_test.ts) | 0 | ||||
-rw-r--r-- | cli/js/window.ts (renamed from js/window.ts) | 0 | ||||
-rw-r--r-- | cli/js/workers.ts (renamed from js/workers.ts) | 0 | ||||
-rw-r--r-- | cli/js/write_file.ts (renamed from js/write_file.ts) | 0 | ||||
-rw-r--r-- | cli/js/write_file_test.ts (renamed from js/write_file_test.ts) | 0 | ||||
-rw-r--r-- | cli/lib.rs | 4 | ||||
-rw-r--r-- | cli/ops/compiler.rs | 2 | ||||
-rw-r--r-- | cli/source_maps.rs | 4 | ||||
-rw-r--r-- | cli/startup_data.rs | 4 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 2 | ||||
-rw-r--r-- | cli/version.rs | 2 | ||||
-rw-r--r-- | js/Cargo.toml | 25 | ||||
-rw-r--r-- | js/README.md | 10 | ||||
-rwxr-xr-x | tools/cargo_publish_others.py | 4 | ||||
-rwxr-xr-x | tools/complex_permissions_test.py | 11 | ||||
-rw-r--r-- | tsconfig.json | 8 | ||||
-rw-r--r-- | website/app_test.ts | 2 |
148 files changed, 38 insertions, 83 deletions
diff --git a/.eslintignore b/.eslintignore index 1b9e35537..30daa9c54 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1 @@ -/js/deps/ cli/tests/error_syntax.js diff --git a/Cargo.lock b/Cargo.lock index 20e94e0c9..aed292e74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,7 +272,6 @@ dependencies = [ "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "deno 0.19.0", - "deno_cli_snapshots 0.19.0", "deno_typescript 0.19.0", "dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -314,14 +313,6 @@ dependencies = [ ] [[package]] -name = "deno_cli_snapshots" -version = "0.19.0" -dependencies = [ - "deno 0.19.0", - "deno_typescript 0.19.0", -] - -[[package]] name = "deno_typescript" version = "0.19.0" dependencies = [ diff --git a/Cargo.toml b/Cargo.toml index 0f0b10de4..a54477a12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,5 +4,4 @@ members = [ "core", "tools/hyper_hello", "deno_typescript", - "js", ] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 8894980d7..56110b5e6 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -18,9 +18,11 @@ path = "lib.rs" name = "deno" path = "main.rs" +[build-dependencies] +deno_typescript = { path = "../deno_typescript", version = "0.19.0" } + [dependencies] deno = { path = "../core", version = "0.19.0" } -deno_cli_snapshots = { path = "../js", version = "0.19.0" } deno_typescript = { path = "../deno_typescript", version = "0.19.0" } ansi_term = "0.12.1" diff --git a/js/build.rs b/cli/build.rs index 1063fd8eb..365e01aa8 100644 --- a/js/build.rs +++ b/cli/build.rs @@ -14,13 +14,13 @@ fn main() { let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()); let o = PathBuf::from(env::var_os("OUT_DIR").unwrap()); - let root_names = vec![c.join("main.ts")]; + let root_names = vec![c.join("js/main.ts")]; let bundle = o.join("CLI_SNAPSHOT.js"); let state = deno_typescript::compile_bundle(&bundle, root_names).unwrap(); assert!(bundle.exists()); deno_typescript::mksnapshot_bundle(&bundle, state).unwrap(); - let root_names = vec![c.join("compiler.ts")]; + let root_names = vec![c.join("js/compiler.ts")]; let bundle = o.join("COMPILER_SNAPSHOT.js"); let state = deno_typescript::compile_bundle(&bundle, root_names).unwrap(); assert!(bundle.exists()); diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index 128bba2ef..4ae48c422 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -1284,8 +1284,6 @@ mod tests { assert!(r.is_err()); let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) - .parent() - .unwrap() .join("js/main.ts") .to_owned(); let specifier = @@ -1308,8 +1306,6 @@ mod tests { assert!(r.is_err()); let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) - .parent() - .unwrap() .join("js/main.ts") .to_owned(); let specifier = @@ -4,6 +4,7 @@ pub static CLI_SNAPSHOT: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.bin")); pub static CLI_SNAPSHOT_MAP: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.js.map")); +#[allow(dead_code)] pub static CLI_SNAPSHOT_DTS: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.d.ts")); @@ -11,10 +12,11 @@ pub static COMPILER_SNAPSHOT: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/COMPILER_SNAPSHOT.bin")); pub static COMPILER_SNAPSHOT_MAP: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/COMPILER_SNAPSHOT.js.map")); +#[allow(dead_code)] pub static COMPILER_SNAPSHOT_DTS: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/COMPILER_SNAPSHOT.d.ts")); -static DENO_RUNTIME: &str = include_str!("lib.deno_runtime.d.ts"); +static DENO_RUNTIME: &str = include_str!("js/lib.deno_runtime.d.ts"); /// Same as deno_typescript::get_asset but also has lib.deno_runtime.d.ts pub fn get_asset(name: &str) -> Option<&'static str> { diff --git a/js/base64.ts b/cli/js/base64.ts index 4d30e00f1..4d30e00f1 100644 --- a/js/base64.ts +++ b/cli/js/base64.ts diff --git a/js/blob.ts b/cli/js/blob.ts index 50ab7f374..50ab7f374 100644 --- a/js/blob.ts +++ b/cli/js/blob.ts diff --git a/js/blob_test.ts b/cli/js/blob_test.ts index afa1182a9..afa1182a9 100644 --- a/js/blob_test.ts +++ b/cli/js/blob_test.ts diff --git a/js/body.ts b/cli/js/body.ts index 6567b1934..6567b1934 100644 --- a/js/body.ts +++ b/cli/js/body.ts diff --git a/js/body_test.ts b/cli/js/body_test.ts index ec76e9072..ec76e9072 100644 --- a/js/body_test.ts +++ b/cli/js/body_test.ts diff --git a/js/buffer.ts b/cli/js/buffer.ts index dc73b7e60..dc73b7e60 100644 --- a/js/buffer.ts +++ b/cli/js/buffer.ts diff --git a/js/buffer_test.ts b/cli/js/buffer_test.ts index a157b927e..a157b927e 100644 --- a/js/buffer_test.ts +++ b/cli/js/buffer_test.ts diff --git a/js/build.ts b/cli/js/build.ts index 942f57458..942f57458 100644 --- a/js/build.ts +++ b/cli/js/build.ts diff --git a/js/build_test.ts b/cli/js/build_test.ts index 4423de338..4423de338 100644 --- a/js/build_test.ts +++ b/cli/js/build_test.ts diff --git a/js/chmod.ts b/cli/js/chmod.ts index 7bf54cc5b..7bf54cc5b 100644 --- a/js/chmod.ts +++ b/cli/js/chmod.ts diff --git a/js/chmod_test.ts b/cli/js/chmod_test.ts index 420f4f313..420f4f313 100644 --- a/js/chmod_test.ts +++ b/cli/js/chmod_test.ts diff --git a/js/chown.ts b/cli/js/chown.ts index a8bad1193..a8bad1193 100644 --- a/js/chown.ts +++ b/cli/js/chown.ts diff --git a/js/chown_test.ts b/cli/js/chown_test.ts index 84106d545..84106d545 100644 --- a/js/chown_test.ts +++ b/cli/js/chown_test.ts diff --git a/js/colors.ts b/cli/js/colors.ts index 9937bdb57..9937bdb57 100644 --- a/js/colors.ts +++ b/cli/js/colors.ts diff --git a/js/compiler.ts b/cli/js/compiler.ts index 57e5e3a47..57e5e3a47 100644 --- a/js/compiler.ts +++ b/cli/js/compiler.ts diff --git a/js/console.ts b/cli/js/console.ts index 9f0ce4bd6..9f0ce4bd6 100644 --- a/js/console.ts +++ b/cli/js/console.ts diff --git a/js/console_table.ts b/cli/js/console_table.ts index d74dc0127..d74dc0127 100644 --- a/js/console_table.ts +++ b/cli/js/console_table.ts diff --git a/js/console_test.ts b/cli/js/console_test.ts index 903e65a82..903e65a82 100644 --- a/js/console_test.ts +++ b/cli/js/console_test.ts diff --git a/js/copy_file.ts b/cli/js/copy_file.ts index 94d2b63db..94d2b63db 100644 --- a/js/copy_file.ts +++ b/cli/js/copy_file.ts diff --git a/js/copy_file_test.ts b/cli/js/copy_file_test.ts index 72ae43f3e..72ae43f3e 100644 --- a/js/copy_file_test.ts +++ b/cli/js/copy_file_test.ts diff --git a/js/core.ts b/cli/js/core.ts index d394d822f..d394d822f 100644 --- a/js/core.ts +++ b/cli/js/core.ts diff --git a/js/custom_event.ts b/cli/js/custom_event.ts index 922abd4b1..922abd4b1 100644 --- a/js/custom_event.ts +++ b/cli/js/custom_event.ts diff --git a/js/custom_event_test.ts b/cli/js/custom_event_test.ts index 4d2eb2c16..4d2eb2c16 100644 --- a/js/custom_event_test.ts +++ b/cli/js/custom_event_test.ts diff --git a/js/deno.ts b/cli/js/deno.ts index 511e4f0ec..511e4f0ec 100644 --- a/js/deno.ts +++ b/cli/js/deno.ts diff --git a/js/diagnostics.ts b/cli/js/diagnostics.ts index 7cdb154b9..7cdb154b9 100644 --- a/js/diagnostics.ts +++ b/cli/js/diagnostics.ts diff --git a/js/dir.ts b/cli/js/dir.ts index ef1111555..ef1111555 100644 --- a/js/dir.ts +++ b/cli/js/dir.ts diff --git a/js/dir_test.ts b/cli/js/dir_test.ts index 6c4e36d7a..6c4e36d7a 100644 --- a/js/dir_test.ts +++ b/cli/js/dir_test.ts diff --git a/js/dispatch.ts b/cli/js/dispatch.ts index bff4d0f5b..bff4d0f5b 100644 --- a/js/dispatch.ts +++ b/cli/js/dispatch.ts diff --git a/js/dispatch_json.ts b/cli/js/dispatch_json.ts index 572ec855a..572ec855a 100644 --- a/js/dispatch_json.ts +++ b/cli/js/dispatch_json.ts diff --git a/js/dispatch_json_test.ts b/cli/js/dispatch_json_test.ts index 11dadc620..11dadc620 100644 --- a/js/dispatch_json_test.ts +++ b/cli/js/dispatch_json_test.ts diff --git a/js/dispatch_minimal.ts b/cli/js/dispatch_minimal.ts index 98636f85b..98636f85b 100644 --- a/js/dispatch_minimal.ts +++ b/cli/js/dispatch_minimal.ts diff --git a/js/dom_file.ts b/cli/js/dom_file.ts index 1f9bf93a5..1f9bf93a5 100644 --- a/js/dom_file.ts +++ b/cli/js/dom_file.ts diff --git a/js/dom_types.ts b/cli/js/dom_types.ts index 308505cf5..308505cf5 100644 --- a/js/dom_types.ts +++ b/cli/js/dom_types.ts diff --git a/js/dom_util.ts b/cli/js/dom_util.ts index 725a35aaf..725a35aaf 100644 --- a/js/dom_util.ts +++ b/cli/js/dom_util.ts diff --git a/js/error_stack.ts b/cli/js/error_stack.ts index 98b0b02d4..98b0b02d4 100644 --- a/js/error_stack.ts +++ b/cli/js/error_stack.ts diff --git a/js/error_stack_test.ts b/cli/js/error_stack_test.ts index 4c7edb2fd..4c7edb2fd 100644 --- a/js/error_stack_test.ts +++ b/cli/js/error_stack_test.ts diff --git a/js/errors.ts b/cli/js/errors.ts index 02ddfa2f2..02ddfa2f2 100644 --- a/js/errors.ts +++ b/cli/js/errors.ts diff --git a/js/event.ts b/cli/js/event.ts index 3efc1c517..3efc1c517 100644 --- a/js/event.ts +++ b/cli/js/event.ts diff --git a/js/event_target.ts b/cli/js/event_target.ts index 08c39544c..08c39544c 100644 --- a/js/event_target.ts +++ b/cli/js/event_target.ts diff --git a/js/event_target_test.ts b/cli/js/event_target_test.ts index 9d7e7974c..9d7e7974c 100644 --- a/js/event_target_test.ts +++ b/cli/js/event_target_test.ts diff --git a/js/event_test.ts b/cli/js/event_test.ts index 72f4f5855..72f4f5855 100644 --- a/js/event_test.ts +++ b/cli/js/event_test.ts diff --git a/js/fetch.ts b/cli/js/fetch.ts index 0a5f793a8..0a5f793a8 100644 --- a/js/fetch.ts +++ b/cli/js/fetch.ts diff --git a/js/fetch_test.ts b/cli/js/fetch_test.ts index 56c693681..56c693681 100644 --- a/js/fetch_test.ts +++ b/cli/js/fetch_test.ts diff --git a/js/file_info.ts b/cli/js/file_info.ts index a98989e79..a98989e79 100644 --- a/js/file_info.ts +++ b/cli/js/file_info.ts diff --git a/js/file_test.ts b/cli/js/file_test.ts index 345dcd8fe..345dcd8fe 100644 --- a/js/file_test.ts +++ b/cli/js/file_test.ts diff --git a/js/files.ts b/cli/js/files.ts index b83a147e1..b83a147e1 100644 --- a/js/files.ts +++ b/cli/js/files.ts diff --git a/js/files_test.ts b/cli/js/files_test.ts index 004cb662b..004cb662b 100644 --- a/js/files_test.ts +++ b/cli/js/files_test.ts diff --git a/js/form_data.ts b/cli/js/form_data.ts index 89efb3c00..89efb3c00 100644 --- a/js/form_data.ts +++ b/cli/js/form_data.ts diff --git a/js/form_data_test.ts b/cli/js/form_data_test.ts index fe8b6cf32..fe8b6cf32 100644 --- a/js/form_data_test.ts +++ b/cli/js/form_data_test.ts diff --git a/js/format_error.ts b/cli/js/format_error.ts index 801da0d0b..801da0d0b 100644 --- a/js/format_error.ts +++ b/cli/js/format_error.ts diff --git a/js/get_random_values.ts b/cli/js/get_random_values.ts index e54f34785..e54f34785 100644 --- a/js/get_random_values.ts +++ b/cli/js/get_random_values.ts diff --git a/js/get_random_values_test.ts b/cli/js/get_random_values_test.ts index 68c13d597..68c13d597 100644 --- a/js/get_random_values_test.ts +++ b/cli/js/get_random_values_test.ts diff --git a/js/globals.ts b/cli/js/globals.ts index b734b8da3..b734b8da3 100644 --- a/js/globals.ts +++ b/cli/js/globals.ts diff --git a/js/globals_test.ts b/cli/js/globals_test.ts index d7c50c5b1..d7c50c5b1 100644 --- a/js/globals_test.ts +++ b/cli/js/globals_test.ts diff --git a/js/headers.ts b/cli/js/headers.ts index dc0de54dd..dc0de54dd 100644 --- a/js/headers.ts +++ b/cli/js/headers.ts diff --git a/js/headers_test.ts b/cli/js/headers_test.ts index f08283c51..f08283c51 100644 --- a/js/headers_test.ts +++ b/cli/js/headers_test.ts diff --git a/js/io.ts b/cli/js/io.ts index 1a7bf8c4c..1a7bf8c4c 100644 --- a/js/io.ts +++ b/cli/js/io.ts diff --git a/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index 94b6b61cd..94b6b61cd 100644 --- a/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts diff --git a/js/lib.web_assembly.d.ts b/cli/js/lib.web_assembly.d.ts index 8c357840a..8c357840a 100644 --- a/js/lib.web_assembly.d.ts +++ b/cli/js/lib.web_assembly.d.ts diff --git a/js/link.ts b/cli/js/link.ts index a6f732926..a6f732926 100644 --- a/js/link.ts +++ b/cli/js/link.ts diff --git a/js/link_test.ts b/cli/js/link_test.ts index 9425e6eab..9425e6eab 100644 --- a/js/link_test.ts +++ b/cli/js/link_test.ts diff --git a/js/location.ts b/cli/js/location.ts index d495f99ca..d495f99ca 100644 --- a/js/location.ts +++ b/cli/js/location.ts diff --git a/js/location_test.ts b/cli/js/location_test.ts index c8daab16d..c8daab16d 100644 --- a/js/location_test.ts +++ b/cli/js/location_test.ts diff --git a/js/main.ts b/cli/js/main.ts index 09e7ce453..09e7ce453 100644 --- a/js/main.ts +++ b/cli/js/main.ts diff --git a/js/make_temp_dir.ts b/cli/js/make_temp_dir.ts index 14494b5da..14494b5da 100644 --- a/js/make_temp_dir.ts +++ b/cli/js/make_temp_dir.ts diff --git a/js/make_temp_dir_test.ts b/cli/js/make_temp_dir_test.ts index aa44b65c5..aa44b65c5 100644 --- a/js/make_temp_dir_test.ts +++ b/cli/js/make_temp_dir_test.ts diff --git a/js/metrics.ts b/cli/js/metrics.ts index b32c29789..b32c29789 100644 --- a/js/metrics.ts +++ b/cli/js/metrics.ts diff --git a/js/metrics_test.ts b/cli/js/metrics_test.ts index de41a0cb1..de41a0cb1 100644 --- a/js/metrics_test.ts +++ b/cli/js/metrics_test.ts diff --git a/js/mixins/dom_iterable.ts b/cli/js/mixins/dom_iterable.ts index bbd1905ce..bbd1905ce 100644 --- a/js/mixins/dom_iterable.ts +++ b/cli/js/mixins/dom_iterable.ts diff --git a/js/mixins/dom_iterable_test.ts b/cli/js/mixins/dom_iterable_test.ts index 4c84fa68e..4c84fa68e 100644 --- a/js/mixins/dom_iterable_test.ts +++ b/cli/js/mixins/dom_iterable_test.ts diff --git a/js/mkdir.ts b/cli/js/mkdir.ts index bc09ba358..bc09ba358 100644 --- a/js/mkdir.ts +++ b/cli/js/mkdir.ts diff --git a/js/mkdir_test.ts b/cli/js/mkdir_test.ts index 9e97265f0..9e97265f0 100644 --- a/js/mkdir_test.ts +++ b/cli/js/mkdir_test.ts diff --git a/js/mock_builtin.js b/cli/js/mock_builtin.js index 9c6730d69..9c6730d69 100644 --- a/js/mock_builtin.js +++ b/cli/js/mock_builtin.js diff --git a/js/net.ts b/cli/js/net.ts index a7ad2b73c..a7ad2b73c 100644 --- a/js/net.ts +++ b/cli/js/net.ts diff --git a/js/net_test.ts b/cli/js/net_test.ts index 33f4f7d07..33f4f7d07 100644 --- a/js/net_test.ts +++ b/cli/js/net_test.ts diff --git a/js/os.ts b/cli/js/os.ts index 2fc06434a..2fc06434a 100644 --- a/js/os.ts +++ b/cli/js/os.ts diff --git a/js/os_test.ts b/cli/js/os_test.ts index 0d07df1b4..0d07df1b4 100644 --- a/js/os_test.ts +++ b/cli/js/os_test.ts diff --git a/js/performance.ts b/cli/js/performance.ts index 6ea8e56e1..6ea8e56e1 100644 --- a/js/performance.ts +++ b/cli/js/performance.ts diff --git a/js/performance_test.ts b/cli/js/performance_test.ts index ac682364e..ac682364e 100644 --- a/js/performance_test.ts +++ b/cli/js/performance_test.ts diff --git a/js/permissions.ts b/cli/js/permissions.ts index 4f393501c..4f393501c 100644 --- a/js/permissions.ts +++ b/cli/js/permissions.ts diff --git a/js/permissions_test.ts b/cli/js/permissions_test.ts index 6511c2dcb..6511c2dcb 100644 --- a/js/permissions_test.ts +++ b/cli/js/permissions_test.ts diff --git a/js/process.ts b/cli/js/process.ts index 0c77929f9..0c77929f9 100644 --- a/js/process.ts +++ b/cli/js/process.ts diff --git a/js/process_test.ts b/cli/js/process_test.ts index 42db06dee..42db06dee 100644 --- a/js/process_test.ts +++ b/cli/js/process_test.ts diff --git a/js/read_dir.ts b/cli/js/read_dir.ts index 2fa6a566b..2fa6a566b 100644 --- a/js/read_dir.ts +++ b/cli/js/read_dir.ts diff --git a/js/read_dir_test.ts b/cli/js/read_dir_test.ts index 3e11df9fe..3e11df9fe 100644 --- a/js/read_dir_test.ts +++ b/cli/js/read_dir_test.ts diff --git a/js/read_file.ts b/cli/js/read_file.ts index de6630cc0..de6630cc0 100644 --- a/js/read_file.ts +++ b/cli/js/read_file.ts diff --git a/js/read_file_test.ts b/cli/js/read_file_test.ts index 7d4f4789c..7d4f4789c 100644 --- a/js/read_file_test.ts +++ b/cli/js/read_file_test.ts diff --git a/js/read_link.ts b/cli/js/read_link.ts index 861fbff0b..861fbff0b 100644 --- a/js/read_link.ts +++ b/cli/js/read_link.ts diff --git a/js/read_link_test.ts b/cli/js/read_link_test.ts index 83a693e3b..83a693e3b 100644 --- a/js/read_link_test.ts +++ b/cli/js/read_link_test.ts diff --git a/js/remove.ts b/cli/js/remove.ts index 36413a7c4..36413a7c4 100644 --- a/js/remove.ts +++ b/cli/js/remove.ts diff --git a/js/remove_test.ts b/cli/js/remove_test.ts index f14386f7f..f14386f7f 100644 --- a/js/remove_test.ts +++ b/cli/js/remove_test.ts diff --git a/js/rename.ts b/cli/js/rename.ts index c906ce37b..c906ce37b 100644 --- a/js/rename.ts +++ b/cli/js/rename.ts diff --git a/js/rename_test.ts b/cli/js/rename_test.ts index 43d02d419..43d02d419 100644 --- a/js/rename_test.ts +++ b/cli/js/rename_test.ts diff --git a/js/repl.ts b/cli/js/repl.ts index 966e809e8..966e809e8 100644 --- a/js/repl.ts +++ b/cli/js/repl.ts diff --git a/js/request.ts b/cli/js/request.ts index 0c77b8854..0c77b8854 100644 --- a/js/request.ts +++ b/cli/js/request.ts diff --git a/js/request_test.ts b/cli/js/request_test.ts index e9e1f5164..e9e1f5164 100644 --- a/js/request_test.ts +++ b/cli/js/request_test.ts diff --git a/js/resources.ts b/cli/js/resources.ts index 27598ce09..27598ce09 100644 --- a/js/resources.ts +++ b/cli/js/resources.ts diff --git a/js/resources_test.ts b/cli/js/resources_test.ts index 753ef3e17..753ef3e17 100644 --- a/js/resources_test.ts +++ b/cli/js/resources_test.ts diff --git a/js/stat.ts b/cli/js/stat.ts index 1f53e6f7b..1f53e6f7b 100644 --- a/js/stat.ts +++ b/cli/js/stat.ts diff --git a/js/stat_test.ts b/cli/js/stat_test.ts index 1542f1080..1542f1080 100644 --- a/js/stat_test.ts +++ b/cli/js/stat_test.ts diff --git a/js/symlink.ts b/cli/js/symlink.ts index 21ebb2f59..21ebb2f59 100644 --- a/js/symlink.ts +++ b/cli/js/symlink.ts diff --git a/js/symlink_test.ts b/cli/js/symlink_test.ts index bce1f6ae5..bce1f6ae5 100644 --- a/js/symlink_test.ts +++ b/cli/js/symlink_test.ts diff --git a/js/test_util.ts b/cli/js/test_util.ts index bb75082e6..2f2916e11 100644 --- a/js/test_util.ts +++ b/cli/js/test_util.ts @@ -7,8 +7,8 @@ // tests by the special string. permW1N0 means allow-write but not allow-net. // See tools/unit_tests.py for more details. -import * as testing from "../std/testing/mod.ts"; -import { assert, assertEquals } from "../std/testing/asserts.ts"; +import * as testing from "../../std/testing/mod.ts"; +import { assert, assertEquals } from "../../std/testing/asserts.ts"; export { assert, assertThrows, @@ -18,7 +18,7 @@ export { assertStrictEq, assertStrContains, unreachable -} from "../std/testing/asserts.ts"; +} from "../../std/testing/asserts.ts"; interface TestPermissions { read?: boolean; diff --git a/js/text_encoding.ts b/cli/js/text_encoding.ts index 8386ff8b0..8386ff8b0 100644 --- a/js/text_encoding.ts +++ b/cli/js/text_encoding.ts diff --git a/js/text_encoding_test.ts b/cli/js/text_encoding_test.ts index aaa9e6b9d..aaa9e6b9d 100644 --- a/js/text_encoding_test.ts +++ b/cli/js/text_encoding_test.ts diff --git a/js/timers.ts b/cli/js/timers.ts index 5bc4922e3..5bc4922e3 100644 --- a/js/timers.ts +++ b/cli/js/timers.ts diff --git a/js/timers_test.ts b/cli/js/timers_test.ts index bc4fcffcf..bc4fcffcf 100644 --- a/js/timers_test.ts +++ b/cli/js/timers_test.ts diff --git a/js/tls.ts b/cli/js/tls.ts index ec24b458b..ec24b458b 100644 --- a/js/tls.ts +++ b/cli/js/tls.ts diff --git a/js/tls_test.ts b/cli/js/tls_test.ts index 25900f876..25900f876 100644 --- a/js/tls_test.ts +++ b/cli/js/tls_test.ts diff --git a/js/truncate.ts b/cli/js/truncate.ts index 5ce7b5158..5ce7b5158 100644 --- a/js/truncate.ts +++ b/cli/js/truncate.ts diff --git a/js/truncate_test.ts b/cli/js/truncate_test.ts index 055db8652..055db8652 100644 --- a/js/truncate_test.ts +++ b/cli/js/truncate_test.ts diff --git a/js/ts_global.d.ts b/cli/js/ts_global.d.ts index 71a01e30e..71a01e30e 100644 --- a/js/ts_global.d.ts +++ b/cli/js/ts_global.d.ts diff --git a/js/type_directives.ts b/cli/js/type_directives.ts index 9b27887b5..9b27887b5 100644 --- a/js/type_directives.ts +++ b/cli/js/type_directives.ts diff --git a/js/types.ts b/cli/js/types.ts index 88462d758..88462d758 100644 --- a/js/types.ts +++ b/cli/js/types.ts diff --git a/js/unit_test_runner.ts b/cli/js/unit_test_runner.ts index 24dae7706..d310f0a4e 100755 --- a/js/unit_test_runner.ts +++ b/cli/js/unit_test_runner.ts @@ -57,7 +57,7 @@ async function main(): Promise<void> { "run", "--no-prompt", ...cliPerms, - "js/unit_tests.ts" + "cli/js/unit_tests.ts" ]; const p = Deno.run({ @@ -73,7 +73,7 @@ async function main(): Promise<void> { let result = 0; if (!actual && !expected) { - console.error("Bad js/unit_test.ts output"); + console.error("Bad cli/js/unit_test.ts output"); result = 1; } else if (expected !== actual) { result = 1; diff --git a/js/unit_tests.ts b/cli/js/unit_tests.ts index a83b57c15..a3f150f4c 100644 --- a/js/unit_tests.ts +++ b/cli/js/unit_tests.ts @@ -1,7 +1,7 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // This test is executed as part of tools/test.py -// But it can also be run manually: ./target/debug/deno js/unit_tests.ts +// But it can also be run manually: ./target/debug/deno cli/js/unit_tests.ts import "./blob_test.ts"; import "./body_test.ts"; @@ -53,9 +53,9 @@ import "./performance_test.ts"; import "./permissions_test.ts"; import "./version_test.ts"; -import "../website/app_test.ts"; +import "../../website/app_test.ts"; -import { runIfMain } from "../std/testing/mod.ts"; +import { runIfMain } from "../../std/testing/mod.ts"; async function main(): Promise<void> { // Testing entire test suite serially diff --git a/js/url.ts b/cli/js/url.ts index f22198da4..f22198da4 100644 --- a/js/url.ts +++ b/cli/js/url.ts diff --git a/js/url_search_params.ts b/cli/js/url_search_params.ts index 0835133d5..0835133d5 100644 --- a/js/url_search_params.ts +++ b/cli/js/url_search_params.ts diff --git a/js/url_search_params_test.ts b/cli/js/url_search_params_test.ts index 08b0c5a1f..08b0c5a1f 100644 --- a/js/url_search_params_test.ts +++ b/cli/js/url_search_params_test.ts diff --git a/js/url_test.ts b/cli/js/url_test.ts index 07a8028ce..07a8028ce 100644 --- a/js/url_test.ts +++ b/cli/js/url_test.ts diff --git a/js/util.ts b/cli/js/util.ts index 013dc7ee1..013dc7ee1 100644 --- a/js/util.ts +++ b/cli/js/util.ts diff --git a/js/utime.ts b/cli/js/utime.ts index 7495378b1..7495378b1 100644 --- a/js/utime.ts +++ b/cli/js/utime.ts diff --git a/js/utime_test.ts b/cli/js/utime_test.ts index 535ee1f40..535ee1f40 100644 --- a/js/utime_test.ts +++ b/cli/js/utime_test.ts diff --git a/js/version.ts b/cli/js/version.ts index 08ac58122..08ac58122 100644 --- a/js/version.ts +++ b/cli/js/version.ts diff --git a/js/version_test.ts b/cli/js/version_test.ts index b32230812..b32230812 100644 --- a/js/version_test.ts +++ b/cli/js/version_test.ts diff --git a/js/window.ts b/cli/js/window.ts index 3d3d6601f..3d3d6601f 100644 --- a/js/window.ts +++ b/cli/js/window.ts diff --git a/js/workers.ts b/cli/js/workers.ts index 281fe619f..281fe619f 100644 --- a/js/workers.ts +++ b/cli/js/workers.ts diff --git a/js/write_file.ts b/cli/js/write_file.ts index d6307e002..d6307e002 100644 --- a/js/write_file.ts +++ b/cli/js/write_file.ts diff --git a/js/write_file_test.ts b/cli/js/write_file_test.ts index e1bbb67b3..e1bbb67b3 100644 --- a/js/write_file_test.ts +++ b/cli/js/write_file_test.ts diff --git a/cli/lib.rs b/cli/lib.rs index 6584c0fa3..8d0904ddb 100644 --- a/cli/lib.rs +++ b/cli/lib.rs @@ -9,7 +9,6 @@ extern crate futures; extern crate serde_json; extern crate clap; extern crate deno; -extern crate deno_cli_snapshots; extern crate indexmap; #[cfg(unix)] extern crate nix; @@ -32,6 +31,7 @@ mod global_timer; mod http_body; mod http_util; mod import_map; +mod js; pub mod msg; pub mod ops; pub mod permissions; @@ -121,7 +121,7 @@ fn create_worker_and_state( } fn types_command() { - let content = deno_cli_snapshots::get_asset("lib.deno_runtime.d.ts").unwrap(); + let content = crate::js::get_asset("lib.deno_runtime.d.ts").unwrap(); println!("{}", content); } diff --git a/cli/ops/compiler.rs b/cli/ops/compiler.rs index 8fb1ad988..4228842dd 100644 --- a/cli/ops/compiler.rs +++ b/cli/ops/compiler.rs @@ -91,7 +91,7 @@ pub fn op_fetch_asset( _zero_copy: Option<PinnedBuf>, ) -> Result<JsonOp, ErrBox> { let args: FetchAssetArgs = serde_json::from_value(args)?; - if let Some(source_code) = deno_cli_snapshots::get_asset(&args.name) { + if let Some(source_code) = crate::js::get_asset(&args.name) { Ok(JsonOp::Sync(json!(source_code))) } else { panic!("op_fetch_asset bad asset {}", args.name) diff --git a/cli/source_maps.rs b/cli/source_maps.rs index ec96ccf5b..95df48a31 100644 --- a/cli/source_maps.rs +++ b/cli/source_maps.rs @@ -74,9 +74,9 @@ fn builtin_source_map(_: &str) -> Option<Vec<u8>> { #[cfg(not(feature = "check-only"))] fn builtin_source_map(script_name: &str) -> Option<Vec<u8>> { if script_name.ends_with("CLI_SNAPSHOT.js") { - Some(deno_cli_snapshots::CLI_SNAPSHOT_MAP.to_vec()) + Some(crate::js::CLI_SNAPSHOT_MAP.to_vec()) } else if script_name.ends_with("COMPILER_SNAPSHOT.js") { - Some(deno_cli_snapshots::COMPILER_SNAPSHOT_MAP.to_vec()) + Some(crate::js::COMPILER_SNAPSHOT_MAP.to_vec()) } else { None } diff --git a/cli/startup_data.rs b/cli/startup_data.rs index 593859be7..7dc2fdb60 100644 --- a/cli/startup_data.rs +++ b/cli/startup_data.rs @@ -2,9 +2,9 @@ #[cfg(feature = "no-snapshot-init")] use deno::Script; +use crate::js::CLI_SNAPSHOT; +use crate::js::COMPILER_SNAPSHOT; use deno::StartupData; -use deno_cli_snapshots::CLI_SNAPSHOT; -use deno_cli_snapshots::COMPILER_SNAPSHOT; #[cfg(feature = "no-snapshot-init")] pub fn deno_isolate_init() -> StartupData<'static> { diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 0e30e05c7..4271036d1 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -42,7 +42,7 @@ fn js_unit_tests() { .arg("--reload") .arg("--allow-run") .arg("--allow-env") - .arg("js/unit_test_runner.ts") + .arg("cli/js/unit_test_runner.ts") .spawn() .expect("failed to spawn script"); let status = deno.wait().expect("failed to wait for the child process"); diff --git a/cli/version.rs b/cli/version.rs index 44e394d18..a62d904f8 100644 --- a/cli/version.rs +++ b/cli/version.rs @@ -1,6 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. pub const DENO: &str = env!("CARGO_PKG_VERSION"); -pub const TYPESCRIPT: &str = deno_cli_snapshots::TS_VERSION; +pub const TYPESCRIPT: &str = crate::js::TS_VERSION; pub fn v8() -> &'static str { deno::v8_version() diff --git a/js/Cargo.toml b/js/Cargo.toml deleted file mode 100644 index 40cc43d93..000000000 --- a/js/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] -name = "deno_cli_snapshots" -version = "0.19.0" -license = "MIT" -authors = ["the Deno authors"] -edition = "2018" -description = "Provides snapshots for the deno CLI" -repository = "https://github.com/denoland/deno" -exclude = [ - "std/fs/testdata/0-link.ts", - "std/fs/testdata/copy_dir_link_file/0.txt", -] - -[lib] -path = "lib.rs" - -[dependencies] -deno_typescript = { path = "../deno_typescript", version = "0.19.0" } - -[dev-dependencies] -deno = { path = "../core", version = "0.19.0" } - -[build-dependencies] -deno_typescript = { path = "../deno_typescript", version = "0.19.0" } - diff --git a/js/README.md b/js/README.md deleted file mode 100644 index 850adb6ee..000000000 --- a/js/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Crate: `deno_cli_snapshots` - -## AKA `cli_snapshots` AKA `//js` - -This is a small crate which exports just a few static blobs. It contains a -build.rs file which compiles Deno's internal JavaScript and TypeScript code -first into a single AMD bundle, and then into a binary V8 Snapshot. - -The main Deno executable crate ("cli") depends on this crate and has access to -all the runtime code. diff --git a/tools/cargo_publish_others.py b/tools/cargo_publish_others.py index 4b57c37c0..83b9b50e2 100755 --- a/tools/cargo_publish_others.py +++ b/tools/cargo_publish_others.py @@ -21,10 +21,6 @@ def main(): os.chdir(os.path.join(root_path, "deno_typescript")) run(cargo_publish) - # Publish the deno_cli_snapshots crate. - os.chdir(os.path.join(root_path, "js")) - run(cargo_publish) - # Publish the deno_cli crate. os.chdir(os.path.join(root_path, "cli")) run(cargo_publish) diff --git a/tools/complex_permissions_test.py b/tools/complex_permissions_test.py index 985f9a972..9f0fcd7e7 100755 --- a/tools/complex_permissions_test.py +++ b/tools/complex_permissions_test.py @@ -55,7 +55,8 @@ class BaseReadWritePermissionsTest(object): def test_outside_test_and_js_dir(self): code, _stdout, stderr = self._run_deno([ "--allow-" + self.test_type + "=" + os.path.join( - root_path, "cli/tests") + "," + os.path.join(root_path, "js") + root_path, "cli/tests") + "," + os.path.join( + root_path, "cli/js") ], [self.test_type, "package.json"]) assert code == 1 assert PROMPT_PATTERN not in stderr @@ -64,8 +65,12 @@ class BaseReadWritePermissionsTest(object): def test_inside_test_and_js_dir(self): code, _stdout, stderr = self._run_deno([ "--allow-" + self.test_type + "=" + os.path.join( - root_path, "cli/tests") + "," + os.path.join(root_path, "js") - ], [self.test_type, "js/dir_test.ts", "cli/tests/subdir/config.json"]) + root_path, "cli/tests") + "," + os.path.join( + root_path, "cli/js") + ], [ + self.test_type, "cli/js/dir_test.ts", + "cli/tests/subdir/config.json" + ]) assert code == 0 assert PROMPT_PATTERN not in stderr assert PERMISSION_DENIED_PATTERN not in stderr diff --git a/tsconfig.json b/tsconfig.json index cf252cfd7..6c9e7344d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,9 +21,9 @@ "types": [] }, "files": [ - "js/lib.web_assembly.d.ts", - "js/lib.deno_runtime.d.ts", - "js/main.ts", - "js/compiler.ts" + "cli/js/lib.web_assembly.d.ts", + "cli/js/lib.deno_runtime.d.ts", + "cli/js/main.ts", + "cli/js/compiler.ts" ] } diff --git a/website/app_test.ts b/website/app_test.ts index 12ac92dd6..ebc8699f6 100644 --- a/website/app_test.ts +++ b/website/app_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import { test, assertEquals } from "../js/test_util.ts"; +import { test, assertEquals } from "../cli/js/test_util.ts"; import { runIfMain } from "../std/testing/mod.ts"; import { BenchmarkRun, |