Merge pull request #7129 from webpack/deps/in-range

Upgrade dependencies in range
This commit is contained in:
Tobias Koppers 2018-04-27 07:45:33 +02:00 committed by GitHub
commit ec83e8ea9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 507 additions and 542 deletions

26
declarations.d.ts vendored
View File

@ -9,25 +9,23 @@ declare namespace NodeJS {
}
// There are no typings for chrome-trace-event
declare module 'chrome-trace-event' {
declare module "chrome-trace-event" {
interface Event {
name: string
id?: number
cat: string[]
args?: Object
name: string;
id?: number;
cat: string[];
args?: Object;
}
export class Tracer {
constructor(options: {
noStream: boolean
})
pipe(stream: NodeJS.WritableStream) : void
instantEvent(event: Event) : void
counter: number
constructor(options: { noStream: boolean });
pipe(stream: NodeJS.WritableStream): void;
instantEvent(event: Event): void;
counter: number;
trace: {
begin(event: Event) : void
end(event: Event) : void
}
begin(event: Event): void;
end(event: Event): void;
};
}
}

View File

@ -100,7 +100,9 @@ class Stats {
const optionOrLocalFallback = (v, def) =>
typeof v !== "undefined"
? v
: typeof options.all !== "undefined" ? options.all : def;
: typeof options.all !== "undefined"
? options.all
: def;
const testAgainstGivenOption = item => {
if (typeof item === "string") {
@ -266,7 +268,9 @@ class Stats {
text += `chunk ${e.chunk.name || e.chunk.id}${
e.chunk.hasRuntime()
? " [entry]"
: e.chunk.canBeInitial() ? " [initial]" : ""
: e.chunk.canBeInitial()
? " [initial]"
: ""
}\n`;
}
if (e.file) {

View File

@ -235,7 +235,9 @@ class WebpackOptionsApply extends OptionsApply {
"MappingURL=[url]\n*/"
: legacy
? "\n/*\n//@ source" + "MappingURL=[url]\n*/"
: modern ? "\n//# source" + "MappingURL=[url]" : null;
: modern
? "\n//# source" + "MappingURL=[url]"
: null;
let Plugin = evalWrapped
? EvalSourceMapDevToolPlugin
: SourceMapDevToolPlugin;
@ -259,7 +261,9 @@ class WebpackOptionsApply extends OptionsApply {
? "\n//@ sourceURL=[url]\n//# sourceURL=[url]"
: legacy
? "\n//@ sourceURL=[url]"
: modern ? "\n//# sourceURL=[url]" : null;
: modern
? "\n//# sourceURL=[url]"
: null;
new EvalDevToolModulePlugin({
sourceUrlComment: comment,
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,

View File

@ -291,11 +291,15 @@ module.exports = class SplitChunksPlugin {
minSize:
cacheGroupSource.minSize !== undefined
? cacheGroupSource.minSize
: cacheGroupSource.enforce ? 0 : this.options.minSize,
: cacheGroupSource.enforce
? 0
: this.options.minSize,
minChunks:
cacheGroupSource.minChunks !== undefined
? cacheGroupSource.minChunks
: cacheGroupSource.enforce ? 1 : this.options.minChunks,
: cacheGroupSource.enforce
? 1
: this.options.minChunks,
maxAsyncRequests:
cacheGroupSource.maxAsyncRequests !== undefined
? cacheGroupSource.maxAsyncRequests

View File

@ -8,9 +8,8 @@ const Chunk = require("../lib/Chunk");
describe("Chunk", () => {
let ChunkInstance;
beforeEach(
() => (ChunkInstance = new Chunk("chunk-test", "module-test", "loc-test"))
);
beforeEach(() =>
(ChunkInstance = new Chunk("chunk-test", "module-test", "loc-test")));
it("should have debugId more than 999", () =>
should(ChunkInstance.debugId).be.above(999));

View File

@ -33,9 +33,8 @@ describe("NullDependency", () => {
it("is a function", () => NullDependency.Template.should.be.a.Function());
describe("when created", () => {
beforeEach(
() => (env.nullDependencyTemplate = new NullDependency.Template())
);
beforeEach(() =>
(env.nullDependencyTemplate = new NullDependency.Template()));
it("has apply function", () =>
env.nullDependencyTemplate.apply.should.be.Function());

View File

@ -11,32 +11,28 @@ describe("SourceMapDevToolModuleOptionsPlugin", () => {
beforeEach(() => (eventBindings = undefined));
describe("with module false and line-to-line false", () => {
beforeEach(
() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: false,
lineToLine: false
}
))
);
beforeEach(() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: false,
lineToLine: false
}
)));
it("does not bind any event handlers", () =>
eventBindings.length.should.be.exactly(0));
});
describe("with module true", () => {
beforeEach(
() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: true,
lineToLine: false
}
))
);
beforeEach(() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: true,
lineToLine: false
}
)));
it("binds one event handler", () =>
eventBindings.length.should.be.exactly(1));
@ -56,16 +52,14 @@ describe("SourceMapDevToolModuleOptionsPlugin", () => {
});
describe("with line-to-line true", () => {
beforeEach(
() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: false,
lineToLine: true
}
))
);
beforeEach(() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: false,
lineToLine: true
}
)));
it("binds one event handler", () =>
eventBindings.length.should.be.exactly(1));
@ -85,16 +79,14 @@ describe("SourceMapDevToolModuleOptionsPlugin", () => {
});
describe("with line-to-line object", () => {
beforeEach(
() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: false,
lineToLine: {}
}
))
);
beforeEach(() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: false,
lineToLine: {}
}
)));
it("binds one event handler", () =>
eventBindings.length.should.be.exactly(1));

917
yarn.lock

File diff suppressed because it is too large Load Diff