Skip to content

Commit

Permalink
Merge branch 'main' into node-crypto-setAutoPadding
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Feb 15, 2024
2 parents 7e77b7b + 1ad754b commit 9979f2e
Show file tree
Hide file tree
Showing 271 changed files with 1,589 additions and 768 deletions.
4 changes: 2 additions & 2 deletions .dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"cli/tsc/*typescript.js",
"gh-pages",
"target",
"test_ffi/tests/test.js",
"test_util/std",
"tests/ffi/tests/test.js",
"tests/util/std",
"test_util/wpt",
"third_party",
"tools/node_compat/TODO.md",
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/ci.generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ const ci = {
},
steps: skipJobsIfPrAndMarkedSkip([
...cloneRepoStep,
submoduleStep("./test_util/std"),
submoduleStep("./tests/util/std"),
{
...submoduleStep("./test_util/wpt"),
if: "matrix.wpt",
Expand Down Expand Up @@ -704,6 +704,7 @@ const ci = {
run: [
"cd target/release",
"zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno",
"zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort",
"./deno types > lib.deno.d.ts",
].join("\n"),
},
Expand All @@ -728,6 +729,7 @@ const ci = {
"--entitlements-xml-file=cli/entitlements.plist",
"cd target/release",
"zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno",
"zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort",
]
.join("\n"),
},
Expand All @@ -740,8 +742,10 @@ const ci = {
"github.repository == 'denoland/deno'",
].join("\n"),
shell: "pwsh",
run:
run: [
"Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip",
"Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip",
].join("\n"),
},
{
name: "Upload canary to dl.deno.land",
Expand Down Expand Up @@ -942,6 +946,7 @@ const ci = {
run: [
'du -hd1 "./target/${{ matrix.profile }}"',
'du -ha "./target/${{ matrix.profile }}/deno"',
'du -ha "./target/${{ matrix.profile }}/denort"',
].join("\n"),
},
{
Expand Down Expand Up @@ -1007,10 +1012,15 @@ const ci = {
with: {
files: [
"target/release/deno-x86_64-pc-windows-msvc.zip",
"target/release/denort-x86_64-pc-windows-msvc.zip",
"target/release/deno-x86_64-unknown-linux-gnu.zip",
"target/release/denort-x86_64-unknown-linux-gnu.zip",
"target/release/deno-x86_64-apple-darwin.zip",
"target/release/denort-x86_64-apple-darwin.zip",
"target/release/deno-aarch64-unknown-linux-gnu.zip",
"target/release/denort-aarch64-unknown-linux-gnu.zip",
"target/release/deno-aarch64-apple-darwin.zip",
"target/release/denort-aarch64-apple-darwin.zip",
"target/release/deno_src.tar.gz",
"target/release/lib.deno.d.ts",
].join("\n"),
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ jobs:
fetch-depth: 5
submodules: false
if: '!(matrix.skip)'
- name: Clone submodule ./test_util/std
run: git submodule update --init --recursive --depth=1 -- ./test_util/std
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
if: '!(matrix.skip)'
- name: Clone submodule ./test_util/wpt
run: git submodule update --init --recursive --depth=1 -- ./test_util/wpt
Expand Down Expand Up @@ -424,6 +424,7 @@ jobs:
run: |-
cd target/release
zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno
zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort
./deno types > lib.deno.d.ts
- name: Pre-release (mac)
if: |-
Expand All @@ -439,14 +440,17 @@ jobs:
rcodesign sign target/release/deno --code-signature-flags=runtime --p12-password="$APPLE_CODESIGN_PASSWORD" --p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) --entitlements-xml-file=cli/entitlements.plist
cd target/release
zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno
zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort
- name: Pre-release (windows)
if: |-
!(matrix.skip) && (matrix.os == 'windows' &&
matrix.job == 'test' &&
matrix.profile == 'release' &&
github.repository == 'denoland/deno')
shell: pwsh
run: 'Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip'
run: |-
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip
- name: Upload canary to dl.deno.land
if: |-
!(matrix.skip) && (matrix.job == 'test' &&
Expand Down Expand Up @@ -588,6 +592,7 @@ jobs:
run: |-
du -hd1 "./target/${{ matrix.profile }}"
du -ha "./target/${{ matrix.profile }}/deno"
du -ha "./target/${{ matrix.profile }}/denort"
- name: Worker info
if: '!(matrix.skip) && (matrix.job == ''bench'')'
run: |-
Expand Down Expand Up @@ -632,10 +637,15 @@ jobs:
with:
files: |-
target/release/deno-x86_64-pc-windows-msvc.zip
target/release/denort-x86_64-pc-windows-msvc.zip
target/release/deno-x86_64-unknown-linux-gnu.zip
target/release/denort-x86_64-unknown-linux-gnu.zip
target/release/deno-x86_64-apple-darwin.zip
target/release/denort-x86_64-apple-darwin.zip
target/release/deno-aarch64-unknown-linux-gnu.zip
target/release/denort-aarch64-unknown-linux-gnu.zip
target/release/deno-aarch64-apple-darwin.zip
target/release/denort-aarch64-apple-darwin.zip
target/release/deno_src.tar.gz
target/release/lib.deno.d.ts
body_path: target/release/release-notes.md
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ gclient_config.py_entries
/std/hash/_wasm/target
/tools/wpt/manifest.json
/third_party/
/test_napi/node_modules
/test_napi/build
/test_napi/third_party_tests/node_modules
/tests/napi/node_modules
/tests/napi/build
/tests/napi/third_party_tests/node_modules

# MacOS generated files
.DS_Store
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "test_util/std"]
path = test_util/std
[submodule "tests/util/std"]
path = tests/util/std
url = https://github.com/denoland/deno_std
shallow = true
[submodule "test_util/wpt"]
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ members = [
"ext/websocket",
"ext/webstorage",
"runtime",
"test_ffi",
"test_napi",
"test_util",
"tests",
"tests/ffi",
"tests/napi",
]
exclude = ["test_util/std/hash/_wasm"]
exclude = ["tests/util/std/hash/_wasm"]

[workspace.package]
authors = ["the Deno authors"]
Expand All @@ -43,7 +43,7 @@ repository = "https://github.com/denoland/deno"

[workspace.dependencies]
deno_ast = { version = "0.33.2", features = ["transpiling"] }
deno_core = { version = "0.261.0" }
deno_core = { version = "0.262.0" }

deno_bench_util = { version = "0.131.0", path = "./bench_util" }
deno_lockfile = "0.18.2"
Expand Down
11 changes: 7 additions & 4 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
name = "deno"
version = "1.40.4"
authors.workspace = true
autotests = false
default-run = "deno"
edition.workspace = true
exclude = ["tests/testdata/npm/registry/*"]
license.workspace = true
repository.workspace = true
description = "Provides the deno executable"
Expand All @@ -17,9 +15,14 @@ name = "deno"
path = "main.rs"
doc = false

[[bin]]
name = "denort"
path = "mainrt.rs"
doc = false

[[test]]
name = "integration"
path = "../tests/integration_tests_runner.rs"
path = "integration_tests_runner.rs"
harness = false

[[bench]]
Expand Down Expand Up @@ -65,7 +68,7 @@ deno_config = "=0.9.2"
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
deno_doc = { version = "=0.103.0", features = ["html"] }
deno_emit = "=0.36.0"
deno_graph = "=0.65.1"
deno_graph = "=0.65.3"
deno_lint = { version = "=0.56.0", features = ["docs"] }
deno_lockfile.workspace = true
deno_npm = "=0.16.0"
Expand Down
4 changes: 4 additions & 0 deletions cli/args/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2379,6 +2379,8 @@ fn publish_subcommand() -> Command {
.long("token")
.help("The API token to use when publishing. If unset, interactive authentication is be used")
)
.arg(config_arg())
.arg(no_config_arg())
.arg(
Arg::new("dry-run")
.long("dry-run")
Expand Down Expand Up @@ -3821,6 +3823,8 @@ fn vendor_parse(flags: &mut Flags, matches: &mut ArgMatches) {
}

fn publish_parse(flags: &mut Flags, matches: &mut ArgMatches) {
config_args_parse(flags, matches);

flags.subcommand = DenoSubcommand::Publish(PublishFlags {
token: matches.remove_one("token"),
dry_run: matches.get_flag("dry-run"),
Expand Down
26 changes: 13 additions & 13 deletions cli/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ pub fn npm_registry_default_url() -> &'static Url {
&NPM_REGISTRY_DEFAULT_URL
}

pub fn deno_registry_url() -> &'static Url {
static DENO_REGISTRY_URL: Lazy<Url> = Lazy::new(|| {
let env_var_name = "DENO_REGISTRY_URL";
pub fn jsr_url() -> &'static Url {
static JSR_URL: Lazy<Url> = Lazy::new(|| {
let env_var_name = "JSR_URL";
if let Ok(registry_url) = std::env::var(env_var_name) {
// ensure there is a trailing slash for the directory
let registry_url = format!("{}/", registry_url.trim_end_matches('/'));
Expand All @@ -125,17 +125,17 @@ pub fn deno_registry_url() -> &'static Url {
Url::parse("https://jsr.io/").unwrap()
});

&DENO_REGISTRY_URL
&JSR_URL
}

pub fn deno_registry_api_url() -> &'static Url {
static DENO_REGISTRY_API_URL: Lazy<Url> = Lazy::new(|| {
let mut deno_registry_api_url = deno_registry_url().clone();
deno_registry_api_url.set_path("api/");
deno_registry_api_url
pub fn jsr_api_url() -> &'static Url {
static JSR_API_URL: Lazy<Url> = Lazy::new(|| {
let mut jsr_api_url = jsr_url().clone();
jsr_api_url.set_path("api/");
jsr_api_url
});

&DENO_REGISTRY_API_URL
&JSR_API_URL
}

pub fn ts_config_to_emit_options(
Expand Down Expand Up @@ -2018,10 +2018,10 @@ mod test {
}

#[test]
fn deno_registry_urls() {
let reg_url = deno_registry_url();
fn jsr_urls() {
let reg_url = jsr_url();
assert!(reg_url.as_str().ends_with('/'));
let reg_api_url = deno_registry_api_url();
let reg_api_url = jsr_api_url();
assert!(reg_api_url.as_str().ends_with('/'));
}
}
10 changes: 5 additions & 5 deletions cli/bench/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[
"check",
"--reload",
"--unstable",
"test_util/std/http/file_server_test.ts",
"tests/util/std/http/file_server_test.ts",
],
None,
),
Expand All @@ -134,7 +134,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[
"--reload",
"--no-check",
"--unstable",
"test_util/std/http/file_server_test.ts",
"tests/util/std/http/file_server_test.ts",
],
None,
),
Expand All @@ -143,7 +143,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[
&[
"bundle",
"--unstable",
"test_util/std/http/file_server_test.ts",
"tests/util/std/http/file_server_test.ts",
],
None,
),
Expand All @@ -153,7 +153,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[
"bundle",
"--no-check",
"--unstable",
"test_util/std/http/file_server_test.ts",
"tests/util/std/http/file_server_test.ts",
],
None,
),
Expand Down Expand Up @@ -306,7 +306,7 @@ fn get_binary_sizes(target_dir: &Path) -> Result<HashMap<String, i64>> {
}

const BUNDLES: &[(&str, &str)] = &[
("file_server", "./test_util/std/http/file_server.ts"),
("file_server", "./tests/util/std/http/file_server.ts"),
("welcome", "./tests/testdata/welcome.ts"),
];
fn bundle_benchmark(deno_exe: &Path) -> Result<HashMap<String, i64>> {
Expand Down
2 changes: 1 addition & 1 deletion cli/bench/napi/bench.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

import { loadTestLibrary } from "../../../test_napi/common.js";
import { loadTestLibrary } from "../../../tests/napi/common.js";

const lib = loadTestLibrary();

Expand Down
2 changes: 1 addition & 1 deletion cli/bench/napi/bench_node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { bench, run } from "mitata";
import { createRequire } from "module";

const require = createRequire(import.meta.url);
const lib = require("../../../test_napi.node");
const lib = require("../../../tests/napi.node");

bench("warmup", () => {});
bench("napi_get_undefined", () => lib.test_get_undefined(0));
Expand Down
Loading

0 comments on commit 9979f2e

Please sign in to comment.