-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected]
- Loading branch information
Showing
13 changed files
with
141 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [0.1.62](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.1.62) (2020-06-04) | ||
|
||
**Note:** Version bump only for package gatsby-admin | ||
|
||
## [0.1.61](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.1.61) (2020-06-03) | ||
|
||
**Note:** Version bump only for package gatsby-admin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [1.5.37](https://github.com/gatsbyjs/gatsby/compare/[email protected]@1.5.37) (2020-06-04) | ||
|
||
**Note:** Version bump only for package gatsby-theme-blog-core | ||
|
||
## [1.5.36](https://github.com/gatsbyjs/gatsby/compare/[email protected]@1.5.36) (2020-06-03) | ||
|
||
**Note:** Version bump only for package gatsby-theme-blog-core | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "gatsby-theme-blog-core", | ||
"version": "1.5.36", | ||
"version": "1.5.37", | ||
"main": "index.js", | ||
"author": "christopherbiscardi <[email protected]> (@chrisbiscardi)", | ||
"license": "MIT", | ||
|
@@ -30,7 +30,7 @@ | |
}, | ||
"devDependencies": { | ||
"@mdx-js/react": "^1.6.5", | ||
"gatsby": "^2.22.20", | ||
"gatsby": "^2.22.21", | ||
"prettier": "2.0.5", | ||
"react": "^16.12.0", | ||
"react-dom": "^16.12.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [1.6.37](https://github.com/gatsbyjs/gatsby/compare/[email protected]@1.6.37) (2020-06-04) | ||
|
||
**Note:** Version bump only for package gatsby-theme-blog | ||
|
||
## [1.6.36](https://github.com/gatsbyjs/gatsby/compare/[email protected]@1.6.36) (2020-06-03) | ||
|
||
**Note:** Version bump only for package gatsby-theme-blog | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [1.3.63](https://github.com/gatsbyjs/gatsby/compare/[email protected]@1.3.63) (2020-06-04) | ||
|
||
**Note:** Version bump only for package gatsby-theme-notes | ||
|
||
## [1.3.62](https://github.com/gatsbyjs/gatsby/compare/[email protected]@1.3.62) (2020-06-03) | ||
|
||
**Note:** Version bump only for package gatsby-theme-notes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [0.0.52](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.0.52) (2020-06-04) | ||
|
||
**Note:** Version bump only for package gatsby-theme-ui-preset | ||
|
||
## [0.0.51](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.0.51) (2020-06-03) | ||
|
||
**Note:** Version bump only for package gatsby-theme-ui-preset | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [2.22.21](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.22.21) (2020-06-04) | ||
|
||
**Note:** Version bump only for package gatsby | ||
|
||
## [2.22.20](https://github.com/gatsbyjs/gatsby/compare/[email protected]@2.22.20) (2020-06-03) | ||
|
||
### Bug Fixes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "gatsby", | ||
"description": "Blazing fast modern site generator for React", | ||
"version": "2.22.20", | ||
"version": "2.22.21", | ||
"author": "Kyle Mathews <[email protected]>", | ||
"bin": { | ||
"gatsby": "./dist/bin/gatsby.js" | ||
|
@@ -72,7 +72,7 @@ | |
"flat": "^4.1.0", | ||
"fs-exists-cached": "1.0.0", | ||
"fs-extra": "^8.1.0", | ||
"gatsby-admin": "^0.1.61", | ||
"gatsby-admin": "^0.1.62", | ||
"gatsby-cli": "^2.12.43", | ||
"gatsby-core-utils": "^1.3.4", | ||
"gatsby-graphiql-explorer": "^0.4.4", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
const { performance } = require("perf_hooks") | ||
|
||
let running = new Map() | ||
let data = new Map() | ||
let indent = 0 | ||
|
||
console.timeSum = function _timeSum(name, callback) { | ||
if (running.has(name)) { | ||
return console.warn("console.timeSum: name already being recorded:", name) | ||
} | ||
|
||
const now = performance.now() | ||
running.set(" ".repeat(indent) + name, now, true) | ||
|
||
if (callback) { | ||
try { | ||
callback() | ||
} finally { | ||
console.timeSumEnd(" ".repeat(indent) + name) | ||
} | ||
} | ||
} | ||
|
||
console.timeSumEnd = function _timeEndSum(name, recordAs = name) { | ||
const endTime = performance.now() | ||
const indentedName = " ".repeat(indent) + name | ||
const indentedRecordAs = " ".repeat(indent) + recordAs | ||
const start = running.get(indentedName) | ||
if (start === undefined) { | ||
return console.warn("console.timeEndSum: name not being recorded:", name) | ||
} | ||
running.delete(indentedName) | ||
|
||
add(indentedRecordAs, endTime - start, true) | ||
} | ||
|
||
console.timeSumGroup = function _timeSumGroup(name, callback) { | ||
_timeSum(name, callback) | ||
indent += 2 | ||
} | ||
|
||
console.timeSumGroupEnd = function _timeSumGroupEnd(name, recordAs = name) { | ||
indent -= 2 | ||
_timeEndSum(name, recordAs) | ||
} | ||
|
||
console.timeSumCancel = function _timeSumCancel(name) { | ||
// Should this warn if the name does not exist..? | ||
running.delete(name) | ||
} | ||
|
||
console.timeSumPrint = function _timeSumPrint() { | ||
// console.log(data) | ||
console.group("timeSum report;") | ||
let maxs = 0 | ||
let maxc = 0 | ||
data.forEach(({ sum, count }, name) => { | ||
const whole = Math.floor(sum).toString() | ||
maxs = Math.max(maxs, whole.length) | ||
maxc = Math.max(maxc, String(count).length) | ||
}) | ||
const arr = [] | ||
data.forEach(({ sum, count, isTimer }, name) => { | ||
const whole = Math.floor(sum).toString() | ||
const rest = String(sum % 1).slice(1) // Either zero or `0.` plus fraction | ||
arr.push( | ||
"- " + | ||
(isTimer | ||
? whole.padStart(maxs, " ") + rest.slice(0, 3).padEnd(3, " ") + "ms" | ||
: (whole.padStart(maxs, " ") + (sum === count ? rest + ' x' : rest.padEnd(3, " "))).padEnd( | ||
maxs + 5, | ||
" " | ||
)) + | ||
(isTimer || count !== sum | ||
? " (" + count.toString().padStart(maxc + 1, " ") + "x )" | ||
: " ".repeat(maxc + 6)) + | ||
": " + | ||
name | ||
) | ||
}) | ||
console.log(arr.reverse().join("\n")) | ||
console.groupEnd() | ||
} | ||
|
||
console.timeSumReset = function _timeSumClear() { | ||
data = new Map() | ||
running = new Map() | ||
indent = 0 | ||
} | ||
|
||
console.timeSumCount = function _timeSumCount(name, delta = 1) { | ||
add(name, delta, false) | ||
} | ||
|
||
function add(name, delta, isTimer) { | ||
let obj = data.get(name) | ||
if (obj === undefined) { | ||
obj = { sum: 0, count: 0, isTimer } | ||
data.set(name, obj) | ||
} | ||
obj.sum += delta | ||
obj.isTimer = isTimer | ||
++obj.count | ||
} |