From 88fd031c706eb7f2a1239b49a19a2ee67f141d96 Mon Sep 17 00:00:00 2001 From: Peter van der Zee Date: Thu, 4 Jun 2020 10:31:50 +0200 Subject: [PATCH] chore(release): Publish - gatsby-admin@0.1.62 - gatsby-theme-blog-core@1.5.37 - gatsby-theme-blog@1.6.37 - gatsby-theme-notes@1.3.63 - gatsby-theme-ui-preset@0.0.52 - gatsby@2.22.21 --- packages/gatsby-admin/CHANGELOG.md | 4 + packages/gatsby-admin/package.json | 4 +- packages/gatsby-theme-blog-core/CHANGELOG.md | 4 + packages/gatsby-theme-blog-core/package.json | 4 +- packages/gatsby-theme-blog/CHANGELOG.md | 4 + packages/gatsby-theme-blog/package.json | 6 +- packages/gatsby-theme-notes/CHANGELOG.md | 4 + packages/gatsby-theme-notes/package.json | 4 +- packages/gatsby-theme-ui-preset/CHANGELOG.md | 4 + packages/gatsby-theme-ui-preset/package.json | 4 +- packages/gatsby/CHANGELOG.md | 4 + packages/gatsby/package.json | 4 +- packages/gatsby/src/timesum.js | 104 +++++++++++++++++++ 13 files changed, 141 insertions(+), 13 deletions(-) create mode 100644 packages/gatsby/src/timesum.js diff --git a/packages/gatsby-admin/CHANGELOG.md b/packages/gatsby-admin/CHANGELOG.md index ffdbcd43e379e..20975945d2421 100644 --- a/packages/gatsby-admin/CHANGELOG.md +++ b/packages/gatsby-admin/CHANGELOG.md @@ -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/gatsby-admin@0.1.61...gatsby-admin@0.1.62) (2020-06-04) + +**Note:** Version bump only for package gatsby-admin + ## [0.1.61](https://github.com/gatsbyjs/gatsby/compare/gatsby-admin@0.1.60...gatsby-admin@0.1.61) (2020-06-03) **Note:** Version bump only for package gatsby-admin diff --git a/packages/gatsby-admin/package.json b/packages/gatsby-admin/package.json index 474b68a990a4f..f79d65d7174b6 100644 --- a/packages/gatsby-admin/package.json +++ b/packages/gatsby-admin/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-admin", - "version": "0.1.61", + "version": "0.1.62", "main": "index.js", "author": "Max Stoiber", "license": "MIT", @@ -17,7 +17,7 @@ "@typescript-eslint/parser": "^2.28.0", "csstype": "^2.6.10", "formik": "^2.1.4", - "gatsby": "^2.22.20", + "gatsby": "^2.22.21", "gatsby-interface": "0.0.167", "gatsby-plugin-typescript": "^2.4.4", "gatsby-source-graphql": "^2.5.3", diff --git a/packages/gatsby-theme-blog-core/CHANGELOG.md b/packages/gatsby-theme-blog-core/CHANGELOG.md index 54f1bfc00f511..b8b3a9408377f 100644 --- a/packages/gatsby-theme-blog-core/CHANGELOG.md +++ b/packages/gatsby-theme-blog-core/CHANGELOG.md @@ -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/gatsby-theme-blog-core@1.5.36...gatsby-theme-blog-core@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/gatsby-theme-blog-core@1.5.35...gatsby-theme-blog-core@1.5.36) (2020-06-03) **Note:** Version bump only for package gatsby-theme-blog-core diff --git a/packages/gatsby-theme-blog-core/package.json b/packages/gatsby-theme-blog-core/package.json index 04d1d59d3c741..914d2059710b5 100644 --- a/packages/gatsby-theme-blog-core/package.json +++ b/packages/gatsby-theme-blog-core/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-theme-blog-core", - "version": "1.5.36", + "version": "1.5.37", "main": "index.js", "author": "christopherbiscardi (@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" diff --git a/packages/gatsby-theme-blog/CHANGELOG.md b/packages/gatsby-theme-blog/CHANGELOG.md index 91583eb164c3e..3682dff74829a 100644 --- a/packages/gatsby-theme-blog/CHANGELOG.md +++ b/packages/gatsby-theme-blog/CHANGELOG.md @@ -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/gatsby-theme-blog@1.6.36...gatsby-theme-blog@1.6.37) (2020-06-04) + +**Note:** Version bump only for package gatsby-theme-blog + ## [1.6.36](https://github.com/gatsbyjs/gatsby/compare/gatsby-theme-blog@1.6.35...gatsby-theme-blog@1.6.36) (2020-06-03) **Note:** Version bump only for package gatsby-theme-blog diff --git a/packages/gatsby-theme-blog/package.json b/packages/gatsby-theme-blog/package.json index 580a50d99bfcb..baee1ad2d5891 100644 --- a/packages/gatsby-theme-blog/package.json +++ b/packages/gatsby-theme-blog/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-theme-blog", - "version": "1.6.36", + "version": "1.6.37", "description": "A Gatsby theme for miscellaneous blogging with a dark/light mode", "main": "index.js", "keywords": [ @@ -29,7 +29,7 @@ "gatsby-plugin-react-helmet": "^3.3.3", "gatsby-plugin-theme-ui": "^0.2.53", "gatsby-plugin-twitter": "^2.3.3", - "gatsby-theme-blog-core": "^1.5.36", + "gatsby-theme-blog-core": "^1.5.37", "mdx-utils": "0.2.0", "react-helmet": "^5.2.1", "react-switch": "^5.0.1", @@ -39,7 +39,7 @@ "typography-theme-wordpress-2016": "^0.16.19" }, "devDependencies": { - "gatsby": "^2.22.20", + "gatsby": "^2.22.21", "prettier": "2.0.5", "react": "^16.12.0", "react-dom": "^16.12.0" diff --git a/packages/gatsby-theme-notes/CHANGELOG.md b/packages/gatsby-theme-notes/CHANGELOG.md index 67c918fca7cc9..fb78c8396a45f 100644 --- a/packages/gatsby-theme-notes/CHANGELOG.md +++ b/packages/gatsby-theme-notes/CHANGELOG.md @@ -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/gatsby-theme-notes@1.3.62...gatsby-theme-notes@1.3.63) (2020-06-04) + +**Note:** Version bump only for package gatsby-theme-notes + ## [1.3.62](https://github.com/gatsbyjs/gatsby/compare/gatsby-theme-notes@1.3.61...gatsby-theme-notes@1.3.62) (2020-06-03) **Note:** Version bump only for package gatsby-theme-notes diff --git a/packages/gatsby-theme-notes/package.json b/packages/gatsby-theme-notes/package.json index cf18624615d57..cc536ed296fdc 100644 --- a/packages/gatsby-theme-notes/package.json +++ b/packages/gatsby-theme-notes/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-theme-notes", "description": "Gatsby Theme for adding a notes section to your website", - "version": "1.3.62", + "version": "1.3.63", "author": "John Otander", "license": "MIT", "main": "index.js", @@ -20,7 +20,7 @@ }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-theme-notes#readme", "devDependencies": { - "gatsby": "^2.22.20", + "gatsby": "^2.22.21", "react": "^16.12.0", "react-dom": "^16.12.0" }, diff --git a/packages/gatsby-theme-ui-preset/CHANGELOG.md b/packages/gatsby-theme-ui-preset/CHANGELOG.md index bc4dc9fc53641..86eed56c2dc07 100644 --- a/packages/gatsby-theme-ui-preset/CHANGELOG.md +++ b/packages/gatsby-theme-ui-preset/CHANGELOG.md @@ -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/gatsby-theme-ui-preset@0.0.51...gatsby-theme-ui-preset@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/gatsby-theme-ui-preset@0.0.50...gatsby-theme-ui-preset@0.0.51) (2020-06-03) **Note:** Version bump only for package gatsby-theme-ui-preset diff --git a/packages/gatsby-theme-ui-preset/package.json b/packages/gatsby-theme-ui-preset/package.json index d7e66e8d95319..3c5ca3b26b663 100644 --- a/packages/gatsby-theme-ui-preset/package.json +++ b/packages/gatsby-theme-ui-preset/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-theme-ui-preset", - "version": "0.0.51", + "version": "0.0.52", "description": "A Gatsby theme for theme-ui styles", "main": "index.js", "keywords": [ @@ -30,7 +30,7 @@ "typography-theme-wordpress-2016": "^0.16.19" }, "devDependencies": { - "gatsby": "^2.22.20", + "gatsby": "^2.22.21", "prettier": "2.0.5", "react": "^16.12.0", "react-dom": "^16.12.0" diff --git a/packages/gatsby/CHANGELOG.md b/packages/gatsby/CHANGELOG.md index 317689424aebe..54c290233b78a 100644 --- a/packages/gatsby/CHANGELOG.md +++ b/packages/gatsby/CHANGELOG.md @@ -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/gatsby@2.22.20...gatsby@2.22.21) (2020-06-04) + +**Note:** Version bump only for package gatsby + ## [2.22.20](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.22.19...gatsby@2.22.20) (2020-06-03) ### Bug Fixes diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 76a6d0570e070..e3c26a6abeb1f 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -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 ", "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", diff --git a/packages/gatsby/src/timesum.js b/packages/gatsby/src/timesum.js new file mode 100644 index 0000000000000..71b8572d4c1cf --- /dev/null +++ b/packages/gatsby/src/timesum.js @@ -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 +}