Update prettier to v1.13
This commit is contained in:
parent
b80296f0c8
commit
faf04e005c
|
@ -83,7 +83,12 @@ declare module "@webassemblyjs/ast" {
|
|||
export class IndexInFuncSection extends Node {}
|
||||
export function indexLiteral(index: number): IndexLiteral;
|
||||
export function numberLiteralFromRaw(num: number): NumberLiteral;
|
||||
export function floatLiteral(value: number, nan?: boolean, inf?: boolean, raw?: string): FloatLiteral;
|
||||
export function floatLiteral(
|
||||
value: number,
|
||||
nan?: boolean,
|
||||
inf?: boolean,
|
||||
raw?: string
|
||||
): FloatLiteral;
|
||||
export function global(globalType: string, nodes: Node[]): Global;
|
||||
export function identifier(indentifier: string): Identifier;
|
||||
export function funcParam(valType: string, id: Identifier): FuncParam;
|
||||
|
@ -96,7 +101,10 @@ declare module "@webassemblyjs/ast" {
|
|||
): ObjectInstruction;
|
||||
export function signature(params: FuncParam[], results: string[]): Signature;
|
||||
export function func(initFuncId, Signature, funcBody): Func;
|
||||
export function typeInstruction(id: Identifier, functype: Signature): TypeInstruction;
|
||||
export function typeInstruction(
|
||||
id: Identifier,
|
||||
functype: Signature
|
||||
): TypeInstruction;
|
||||
export function indexInFuncSection(index: IndexLiteral): IndexInFuncSection;
|
||||
export function moduleExport(
|
||||
identifier: string,
|
||||
|
|
|
@ -101,7 +101,7 @@ class ProgressPlugin {
|
|||
|
||||
const update = module => {
|
||||
handler(
|
||||
0.1 + doneModules / Math.max(lastModulesCount, moduleCount) * 0.6,
|
||||
0.1 + (doneModules / Math.max(lastModulesCount, moduleCount)) * 0.6,
|
||||
"building modules",
|
||||
`${doneModules}/${moduleCount} modules`,
|
||||
`${activeModules.length} active`,
|
||||
|
@ -187,7 +187,7 @@ class ProgressPlugin {
|
|||
const numberOfHooks = Object.keys(hooks).length;
|
||||
Object.keys(hooks).forEach((name, idx) => {
|
||||
const title = hooks[name];
|
||||
const percentage = idx / numberOfHooks * 0.25 + 0.7;
|
||||
const percentage = (idx / numberOfHooks) * 0.25 + 0.7;
|
||||
compilation.hooks[name].intercept({
|
||||
name: "ProgressPlugin",
|
||||
context: true,
|
||||
|
|
|
@ -121,7 +121,7 @@ class SourceMapDevToolPlugin {
|
|||
const tasks = [];
|
||||
files.forEach(({ file, chunk }, idx) => {
|
||||
reportProgress(
|
||||
0.5 * idx / files.length,
|
||||
(0.5 * idx) / files.length,
|
||||
file,
|
||||
"generate SourceMap"
|
||||
);
|
||||
|
@ -205,7 +205,7 @@ class SourceMapDevToolPlugin {
|
|||
}
|
||||
tasks.forEach((task, index) => {
|
||||
reportProgress(
|
||||
0.5 + 0.5 * index / tasks.length,
|
||||
0.5 + (0.5 * index) / tasks.length,
|
||||
task.file,
|
||||
"attach SourceMap"
|
||||
);
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
"less": "^2.5.1",
|
||||
"less-loader": "^4.0.3",
|
||||
"lodash": "^4.17.4",
|
||||
"prettier": "^1.11.1",
|
||||
"prettier": "^1.13.2",
|
||||
"pug": "^2.0.3",
|
||||
"pug-loader": "^2.4.0",
|
||||
"raw-loader": "~0.5.0",
|
||||
|
|
|
@ -254,8 +254,8 @@ describe("BenchmarkTestCases", function() {
|
|||
const n = stats.sample.length;
|
||||
const nSqrt = Math.sqrt(n);
|
||||
const z = tDistribution(n - 1);
|
||||
stats.minConfidence = stats.mean - z * stats.deviation / nSqrt;
|
||||
stats.maxConfidence = stats.mean + z * stats.deviation / nSqrt;
|
||||
stats.minConfidence = stats.mean - (z * stats.deviation) / nSqrt;
|
||||
stats.maxConfidence = stats.mean + (z * stats.deviation) / nSqrt;
|
||||
stats.text = `${Math.round(stats.mean * 1000)}ms ± ${Math.round(
|
||||
stats.deviation * 1000
|
||||
)}ms [${Math.round(stats.minConfidence * 1000)}ms; ${Math.round(
|
||||
|
@ -352,7 +352,7 @@ describe("BenchmarkTestCases", function() {
|
|||
) {
|
||||
console.log(
|
||||
`======> HEAD is ${Math.round(
|
||||
baselineStats.mean / headStats.mean * 100 - 100
|
||||
(baselineStats.mean / headStats.mean) * 100 - 100
|
||||
)}% faster than ${baseline.name} (90% confidence)!`
|
||||
);
|
||||
}
|
||||
|
|
|
@ -109,12 +109,12 @@ describe("Compiler (caching)", () => {
|
|||
|
||||
// Copy over file since we"ll be modifying some of them
|
||||
fs.mkdirSync(fixturePath);
|
||||
fs
|
||||
.createReadStream(path.join(__dirname, "fixtures", "a.js"))
|
||||
.pipe(fs.createWriteStream(aFilepath));
|
||||
fs
|
||||
.createReadStream(path.join(__dirname, "fixtures", "c.js"))
|
||||
.pipe(fs.createWriteStream(cFilepath));
|
||||
fs.createReadStream(path.join(__dirname, "fixtures", "a.js")).pipe(
|
||||
fs.createWriteStream(aFilepath)
|
||||
);
|
||||
fs.createReadStream(path.join(__dirname, "fixtures", "c.js")).pipe(
|
||||
fs.createWriteStream(cFilepath)
|
||||
);
|
||||
|
||||
fixtureCount++;
|
||||
return {
|
||||
|
|
|
@ -4703,9 +4703,9 @@ preserve@^0.2.0:
|
|||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||
|
||||
prettier@^1.11.1:
|
||||
version "1.12.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"
|
||||
prettier@^1.13.2:
|
||||
version "1.13.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.2.tgz#412b87bc561cb11074d2877a33a38f78c2303cda"
|
||||
|
||||
pretty-format@^23.0.0-charlie.3:
|
||||
version "23.0.0-charlie.3"
|
||||
|
|
Loading…
Reference in New Issue