Skip to content

Commit

Permalink
Merge in 'release/5.0' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Feb 11, 2021
2 parents c52be62 + 2cc9c2d commit 1ff21d0
Show file tree
Hide file tree
Showing 10 changed files with 1,730 additions and 1,642 deletions.
10 changes: 6 additions & 4 deletions src/Components/Web.JS/dist/Release/blazor.server.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Components/Web.JS/dist/Release/blazor.webassembly.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/Components/Web.JS/src/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ module.exports = (env, args) => ({
'blazor.webassembly': './Boot.WebAssembly.ts',
'blazor.server': './Boot.Server.ts',
},
output: { path: path.join(__dirname, '/..', '/dist', args.mode == 'development' ? '/Debug' : '/Release'), filename: '[name].js' }
output: { path: path.join(__dirname, '/..', '/dist', args.mode == 'development' ? '/Debug' : '/Release'), filename: '[name].js' },
performance: {
maxAssetSize: 276000,
}
});
2 changes: 1 addition & 1 deletion src/Components/Web.JS/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3484,7 +3484,7 @@ ms@^2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==

msgpack5@^4.0.2:
msgpack5@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/msgpack5/-/msgpack5-4.5.0.tgz#c7e6c0fcd5c1aab76e6f551496a57a7ba2e5428d"
integrity sha512-LYuyrhCncpw29VSAsoYyW8x+eubDtkkXCJQzHKren//b70/71GZcFpys+OpR8Qo5Seeeju6ULz5vIhTblFEMPg==
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ import { DEFAULT_TIMEOUT_INTERVAL, eachTransport, eachTransportAndProtocolAndHtt
import "./LogBannerReporter";
import { TestLogger } from "./TestLogger";

import { PromiseSource } from "../../signalr/tests/Utils";

import * as RX from "rxjs";
import { PromiseSource } from "./Utils";

const TESTHUBENDPOINT_URL = ENDPOINT_BASE_URL + "/testhub";
const TESTHUBENDPOINT_HTTPS_URL = ENDPOINT_BASE_HTTPS_URL ? (ENDPOINT_BASE_HTTPS_URL + "/testhub") : undefined;
Expand Down
33 changes: 33 additions & 0 deletions src/SignalR/clients/ts/FunctionalTests/ts/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,36 @@ export function getParameterByName(name: string) {
}
return decodeURIComponent(results[2].replace(/\+/g, " "));
}

export class PromiseSource<T = void> implements Promise<T> {
public promise: Promise<T>;

private resolver!: (value?: T | PromiseLike<T>) => void;
private rejecter!: (reason?: any) => void;

constructor() {
this.promise = new Promise<T>((resolve, reject) => {
this.resolver = resolve;
this.rejecter = reject;
});
}

public resolve(value?: T | PromiseLike<T>) {
this.resolver(value);
}

public reject(reason?: any) {
this.rejecter(reason);
}

// Look like a promise so we can be awaited directly;
public then<TResult1 = T, TResult2 = never>(onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2> {
return this.promise.then(onfulfilled, onrejected);
}
public catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult> {
return this.promise.catch(onrejected);
}

// @ts-ignore: value never read
public [Symbol.toStringTag]: "Promise";
}
Loading

0 comments on commit 1ff21d0

Please sign in to comment.