Unverified Commit 428f4027 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #211227 from 06kellyjac/deno

deno: 1.29.3 -> 1.29.4
parents 4b91dcfc 159f042d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -17,15 +17,15 @@

rustPlatform.buildRustPackage rec {
  pname = "deno";
  version = "1.29.3";
  version = "1.29.4";

  src = fetchFromGitHub {
    owner = "denoland";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-CH0uri8mnpcojuE8Pil/gsvEfDu/txjCevvGjqhiK1k=";
    sha256 = "sha256-oCBtqOm/d5dpIv70/Ht0M6izxdvm59LCiDHgcMcwLek=";
  };
  cargoSha256 = "sha256-I7MIcZeMQzgplza8YAqmuWaX4Gw3ZoDXHyzq/5opO4M=";
  cargoSha256 = "sha256-Y/1yfCeWleNrk5MgkIoAtkH8e6YSZWa+GF5RgLaZXQA=";

  postPatch = ''
    # upstream uses lld on aarch64-darwin for faster builds
@@ -85,6 +85,7 @@ rustPlatform.buildRustPackage rec {
  '';

  passthru.updateScript = ./update/update.ts;
  passthru.tests = callPackage ./tests { };

  meta = with lib; {
    homepage = "https://deno.land/";
+5 −5
Original line number Diff line number Diff line
@@ -11,11 +11,11 @@ let
  };
in
fetch_librusty_v8 {
  version = "0.60.0";
  version = "0.60.1";
  shas = {
    x86_64-linux = "sha256-2cq9fpKhx3ctZ5Lo2RofXD5bXfVUUN6bRtG453MQMW4=";
    aarch64-linux = "sha256-hjVUzCYdGkc3kMC/cSXDFOaqJmMBi83dqqASS5R2158=";
    x86_64-darwin = "sha256-EyYWfDU0eVFVzSVAHBFUbsppzpHtwe+Fd+z2ZmIub2c=";
    aarch64-darwin = "sha256-2VyEFqWsPZlkEDvNxkmrMCIKfsO7LAO+VvsjSMcyFUo=";
    x86_64-linux = "sha256-P8H+XJqrt9jdKM885L1epMldp+stwmEw+0Gtd2x3r4g=";
    aarch64-linux = "sha256-frHpBP2pL3o4efFLHP2r3zsWJrNT93yYu2Qkxv+7m8Y=";
    x86_64-darwin = "sha256-taewoYBkyikqWueLSD9dW1EDjzkV68Xplid1UaLZgRM=";
    aarch64-darwin = "sha256-s2YEVbuYpiT/qrmE37aXk13MetrnJo6l+s1Q2y6b5kU=";
  };
}
+1 −0
Original line number Diff line number Diff line
console.log(1 + 1)
+68 −0
Original line number Diff line number Diff line
{ deno, runCommand, lib, testers }:
let
  testDenoRun =
    name:
    { args ? ""
    , dir ? ./. + "/${name}"
    , file ? "index.ts"
    , expected ? ""
    , expectFailure ? false
    }:
    let
      command = "deno run ${args} ${dir}/${file}";
    in
    runCommand "deno-test-${name}" { nativeBuildInputs = [ deno ]; meta.timeout = 60; } ''
      HOME=$(mktemp -d)
      if output=$(${command} 2>&1); then
        if [[ $output =~ '${expected}' ]]; then
          echo "Test '${name}' passed"
          touch $out
        else
          echo -n ${lib.escapeShellArg command} >&2
          echo " output did not match what was expected." >&2
          echo "The expected was:" >&2
          echo '${expected}' >&2
          echo "The output was:" >&2
          echo "$output" >&2
          exit 1
        fi
      else
        if [[ "${toString expectFailure}" == "1" ]]; then
          echo "Test '${name}' failed as expected"
          touch $out
          exit 0
        fi
        echo -n ${lib.escapeShellArg command} >&2
        echo " returned a non-zero exit code." >&2
        echo "$output" >&2
        exit 1
      fi
    '';
in
(lib.mapAttrs testDenoRun {
  basic = {
    dir = ./.;
    file = "basic.ts";
    expected = "2";
  };
  import-json = {
    expected = "hello from JSON";
  };
  import-ts = {
    expected = "hello from ts";
  };
  read-file = {
    args = "--allow-read";
    expected = "hello from a file";
  };
  fail-read-file = {
    expectFailure = true;
    dir = ./read-file;
  };
}) //
{
  version = testers.testVersion {
    package = deno;
    command = "deno --version";
  };
}
+1 −0
Original line number Diff line number Diff line
{ "msg": "hello from JSON" }
Loading