Skip to content

Commit

Permalink
Merge branch 'main' into exp/ext-node/buffer-optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju authored Feb 20, 2023
2 parents aea06e4 + 6915a9b commit 13be2d7
Show file tree
Hide file tree
Showing 698 changed files with 65,530 additions and 63 deletions.
1 change: 1 addition & 0 deletions .dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"cli/bench/testdata/express-router.js",
"cli/bench/testdata/npm/*",
"cli/tsc/dts/*.d.ts",
"cli/tests/node_compat/test",
"cli/tests/testdata/fmt/badly_formatted.json",
"cli/tests/testdata/fmt/badly_formatted.md",
"cli/tests/testdata/byte_order_mark.ts",
Expand Down
5 changes: 4 additions & 1 deletion bench_util/benches/utf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ use deno_bench_util::bencher::Bencher;
use deno_bench_util::BenchOptions;
use deno_core::Extension;
use deno_core::ExtensionFileSource;
use deno_core::ExtensionFileSourceCode;

fn setup() -> Vec<Extension> {
vec![Extension::builder("bench_setup")
.js(vec![ExtensionFileSource {
specifier: "setup.js".to_string(),
code: r#"
code: ExtensionFileSourceCode::IncludedInBinary(
r#"
const hello = "hello world\n";
const hello1k = hello.repeat(1e3);
const hello1m = hello.repeat(1e6);
const helloEncoded = Deno.core.encode(hello);
const hello1kEncoded = Deno.core.encode(hello1k);
const hello1mEncoded = Deno.core.encode(hello1m);
"#,
),
}])
.build()]
}
Expand Down
12 changes: 7 additions & 5 deletions cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ use std::env;
use std::path::Path;
use std::path::PathBuf;

use deno_core::include_js_files_dir;
use deno_core::include_js_files;
use deno_core::snapshot_util::*;
use deno_core::Extension;
use deno_core::ExtensionFileSource;
use deno_core::ExtensionFileSourceCode;
use deno_runtime::deno_cache::SqliteBackedCache;
use deno_runtime::permissions::PermissionsContainer;
use deno_runtime::*;
Expand All @@ -17,7 +18,6 @@ mod ts {
use crate::deno_webgpu_get_declaration;
use deno_core::error::custom_error;
use deno_core::error::AnyError;
use deno_core::include_js_files_dir;
use deno_core::op;
use deno_core::OpState;
use deno_runtime::deno_node::SUPPORTED_BUILTIN_NODE_MODULES;
Expand Down Expand Up @@ -260,7 +260,7 @@ mod ts {
op_load::decl(),
op_script_version::decl(),
])
.js(include_js_files_dir! {
.js(include_js_files! {
dir "tsc",
"00_typescript.js",
"99_main_compiler.js",
Expand Down Expand Up @@ -354,13 +354,15 @@ fn create_cli_snapshot(snapshot_path: PathBuf) {
deno_flash::init::<PermissionsContainer>(false), // No --unstable
];

let mut esm_files = include_js_files_dir!(
let mut esm_files = include_js_files!(
dir "js",
"40_testing.js",
);
esm_files.push(ExtensionFileSource {
specifier: "runtime/js/99_main.js".to_string(),
code: deno_runtime::js::SOURCE_CODE_FOR_99_MAIN_JS,
code: ExtensionFileSourceCode::IncludedInBinary(
deno_runtime::js::SOURCE_CODE_FOR_99_MAIN_JS,
),
});
let extensions_with_js = vec![Extension::builder("cli")
// FIXME(bartlomieju): information about which extensions were
Expand Down
Loading

0 comments on commit 13be2d7

Please sign in to comment.