-
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] - [email protected]
- Loading branch information
1 parent
4c0916b
commit ba0597b
Showing
85 changed files
with
3,623 additions
and
14 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.70](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.1.70) (2020-06-19) | ||
|
||
**Note:** Version bump only for package gatsby-admin | ||
|
||
## [0.1.69](https://github.com/gatsbyjs/gatsby/compare/[email protected]@0.1.69) (2020-06-19) | ||
|
||
### 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
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,12 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [3.0.4](https://github.com/gatsbyjs/gatsby/compare/[email protected]@3.0.4) (2020-06-19) | ||
|
||
### Bug Fixes | ||
|
||
- Several Fixes for Scroll Handling and Restoration ([#24306](https://github.com/gatsbyjs/gatsby/issues/24306)) ([4c0916b](https://github.com/gatsbyjs/gatsby/commit/4c0916b)) | ||
|
||
## [3.0.3](https://github.com/gatsbyjs/gatsby/compare/[email protected]@3.0.3) (2020-06-09) | ||
|
||
**Note:** Version bump only for package gatsby-react-router-scroll | ||
|
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export declare const prematureEnd: () => void; | ||
export declare const catchExitSignals: () => void; |
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,54 @@ | ||
"use strict"; | ||
|
||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
|
||
exports.__esModule = true; | ||
exports.catchExitSignals = exports.prematureEnd = void 0; | ||
|
||
var _signalExit = _interopRequireDefault(require("signal-exit")); | ||
|
||
var _redux = require("./redux"); | ||
|
||
var _actions = require("./redux/actions"); | ||
|
||
var _constants = require("./constants"); | ||
|
||
var _reporter = require("./reporter"); | ||
|
||
/* | ||
* This module is used to catch if the user kills the gatsby process via cmd+c | ||
* When this happens, there is some clean up logic we need to fire offf | ||
*/ | ||
const interruptActivities = () => { | ||
const { | ||
activities | ||
} = (0, _redux.getStore)().getState().logs; | ||
Object.keys(activities).forEach(activityId => { | ||
const activity = activities[activityId]; | ||
|
||
if (activity.status === _constants.ActivityStatuses.InProgress || activity.status === _constants.ActivityStatuses.NotStarted) { | ||
_reporter.reporter.completeActivity(activityId, _constants.ActivityStatuses.Interrupted); | ||
} | ||
}); | ||
}; | ||
|
||
const prematureEnd = () => { | ||
// hack so at least one activity is surely failed, so | ||
// we are guaranteed to generate FAILED status | ||
// if none of activity did explicitly fail | ||
(0, _actions.createPendingActivity)({ | ||
id: `panic`, | ||
status: _constants.ActivityStatuses.Failed | ||
}); | ||
interruptActivities(); | ||
}; | ||
|
||
exports.prematureEnd = prematureEnd; | ||
|
||
const catchExitSignals = () => { | ||
(0, _signalExit.default)((code, signal) => { | ||
if (code !== 0 && signal !== `SIGINT` && signal !== `SIGTERM`) prematureEnd();else interruptActivities(); | ||
}); | ||
}; | ||
|
||
exports.catchExitSignals = catchExitSignals; |
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,39 @@ | ||
export declare enum Actions { | ||
LogAction = "LOG_ACTION", | ||
SetStatus = "SET_STATUS", | ||
Log = "LOG", | ||
SetLogs = "SET_LOGS", | ||
StartActivity = "ACTIVITY_START", | ||
EndActivity = "ACTIVITY_END", | ||
UpdateActivity = "ACTIVITY_UPDATE", | ||
PendingActivity = "ACTIVITY_PENDING", | ||
CancelActivity = "ACTIVITY_CANCEL", | ||
ActivityErrored = "ACTIVITY_ERRORED" | ||
} | ||
export declare enum LogLevels { | ||
Debug = "DEBUG", | ||
Success = "SUCCESS", | ||
Info = "INFO", | ||
Warning = "WARNING", | ||
Log = "LOG", | ||
Error = "ERROR" | ||
} | ||
export declare enum ActivityLogLevels { | ||
Success = "ACTIVITY_SUCCESS", | ||
Failed = "ACTIVITY_FAILED", | ||
Interrupted = "ACTIVITY_INTERRUPTED" | ||
} | ||
export declare enum ActivityStatuses { | ||
InProgress = "IN_PROGRESS", | ||
NotStarted = "NOT_STARTED", | ||
Interrupted = "INTERRUPTED", | ||
Failed = "FAILED", | ||
Success = "SUCCESS", | ||
Cancelled = "CANCELLED" | ||
} | ||
export declare enum ActivityTypes { | ||
Spinner = "spinner", | ||
Hidden = "hidden", | ||
Progress = "progress", | ||
Pending = "pending" | ||
} |
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,62 @@ | ||
"use strict"; | ||
|
||
exports.__esModule = true; | ||
exports.ActivityTypes = exports.ActivityStatuses = exports.ActivityLogLevels = exports.LogLevels = exports.Actions = void 0; | ||
let Actions; | ||
exports.Actions = Actions; | ||
|
||
(function (Actions) { | ||
Actions["LogAction"] = "LOG_ACTION"; | ||
Actions["SetStatus"] = "SET_STATUS"; | ||
Actions["Log"] = "LOG"; | ||
Actions["SetLogs"] = "SET_LOGS"; | ||
Actions["StartActivity"] = "ACTIVITY_START"; | ||
Actions["EndActivity"] = "ACTIVITY_END"; | ||
Actions["UpdateActivity"] = "ACTIVITY_UPDATE"; | ||
Actions["PendingActivity"] = "ACTIVITY_PENDING"; | ||
Actions["CancelActivity"] = "ACTIVITY_CANCEL"; | ||
Actions["ActivityErrored"] = "ACTIVITY_ERRORED"; | ||
})(Actions || (exports.Actions = Actions = {})); | ||
|
||
let LogLevels; | ||
exports.LogLevels = LogLevels; | ||
|
||
(function (LogLevels) { | ||
LogLevels["Debug"] = "DEBUG"; | ||
LogLevels["Success"] = "SUCCESS"; | ||
LogLevels["Info"] = "INFO"; | ||
LogLevels["Warning"] = "WARNING"; | ||
LogLevels["Log"] = "LOG"; | ||
LogLevels["Error"] = "ERROR"; | ||
})(LogLevels || (exports.LogLevels = LogLevels = {})); | ||
|
||
let ActivityLogLevels; | ||
exports.ActivityLogLevels = ActivityLogLevels; | ||
|
||
(function (ActivityLogLevels) { | ||
ActivityLogLevels["Success"] = "ACTIVITY_SUCCESS"; | ||
ActivityLogLevels["Failed"] = "ACTIVITY_FAILED"; | ||
ActivityLogLevels["Interrupted"] = "ACTIVITY_INTERRUPTED"; | ||
})(ActivityLogLevels || (exports.ActivityLogLevels = ActivityLogLevels = {})); | ||
|
||
let ActivityStatuses; | ||
exports.ActivityStatuses = ActivityStatuses; | ||
|
||
(function (ActivityStatuses) { | ||
ActivityStatuses["InProgress"] = "IN_PROGRESS"; | ||
ActivityStatuses["NotStarted"] = "NOT_STARTED"; | ||
ActivityStatuses["Interrupted"] = "INTERRUPTED"; | ||
ActivityStatuses["Failed"] = "FAILED"; | ||
ActivityStatuses["Success"] = "SUCCESS"; | ||
ActivityStatuses["Cancelled"] = "CANCELLED"; | ||
})(ActivityStatuses || (exports.ActivityStatuses = ActivityStatuses = {})); | ||
|
||
let ActivityTypes; | ||
exports.ActivityTypes = ActivityTypes; | ||
|
||
(function (ActivityTypes) { | ||
ActivityTypes["Spinner"] = "spinner"; | ||
ActivityTypes["Hidden"] = "hidden"; | ||
ActivityTypes["Progress"] = "progress"; | ||
ActivityTypes["Pending"] = "pending"; | ||
})(ActivityTypes || (exports.ActivityTypes = ActivityTypes = {})); |
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,2 @@ | ||
import PrettyError from "pretty-error"; | ||
export declare function getErrorFormatter(): PrettyError; |
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,49 @@ | ||
"use strict"; | ||
|
||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
|
||
exports.__esModule = true; | ||
exports.getErrorFormatter = getErrorFormatter; | ||
|
||
var _prettyError = _interopRequireDefault(require("pretty-error")); | ||
|
||
function getErrorFormatter() { | ||
const prettyError = new _prettyError.default(); | ||
const baseRender = prettyError.render; | ||
prettyError.skipNodeFiles(); | ||
prettyError.skipPackage(`regenerator-runtime`, `graphql`, `core-js` // `static-site-generator-webpack-plugin`, | ||
// `tapable`, // webpack | ||
); // @ts-ignore the type defs in prettyError are wrong | ||
|
||
prettyError.skip(traceLine => { | ||
if (traceLine && traceLine.file === `asyncToGenerator.js`) return true; | ||
return false; | ||
}); | ||
prettyError.appendStyle({ | ||
"pretty-error": { | ||
marginTop: 1 | ||
}, | ||
"pretty-error > header": { | ||
background: `red` | ||
}, | ||
"pretty-error > header > colon": { | ||
color: `white` | ||
} | ||
}); | ||
|
||
if (process.env.FORCE_COLOR === `0`) { | ||
prettyError.withoutColors(); | ||
} | ||
|
||
prettyError.render = err => { | ||
if (Array.isArray(err)) { | ||
return err.map(e => prettyError.render(e)).join(`\n`); | ||
} | ||
|
||
let rendered = baseRender.call(prettyError, err); | ||
if (`codeFrame` in err) rendered = `\n${err.codeFrame}\n${rendered}`; | ||
return rendered; | ||
}; | ||
|
||
return prettyError; | ||
} |
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,9 @@ | ||
import { reporter } from "./reporter"; | ||
import { setStore } from "./redux"; | ||
import { IGatsbyCLIState } from "./redux/types"; | ||
import { IActivityArgs, IPhantomReporter, IProgressReporter } from "./types"; | ||
export { reporter }; | ||
export { setStore }; | ||
export declare const reduxLogReducer: (state: IGatsbyCLIState | undefined, action: import("./redux/types").ActionsUnion) => IGatsbyCLIState; | ||
export { IActivityArgs, IPhantomReporter, IProgressReporter, IGatsbyCLIState }; | ||
export declare type IGatsbyReporter = typeof reporter; |
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,36 @@ | ||
"use strict"; | ||
|
||
exports.__esModule = true; | ||
exports.reduxLogReducer = void 0; | ||
|
||
var _startLogger = require("./start-logger"); | ||
|
||
var _patchConsole = require("./patch-console"); | ||
|
||
var _catchExitSignals = require("./catch-exit-signals"); | ||
|
||
var _reporter = require("./reporter"); | ||
|
||
exports.reporter = _reporter.reporter; | ||
|
||
var _redux = require("./redux"); | ||
|
||
exports.setStore = _redux.setStore; | ||
|
||
var _reducer = require("./redux/reducer"); | ||
|
||
var _types = require("./redux/types"); | ||
|
||
exports.IGatsbyCLIState = _types.IGatsbyCLIState; | ||
|
||
var _types2 = require("./types"); | ||
|
||
exports.IActivityArgs = _types2.IActivityArgs; | ||
exports.IPhantomReporter = _types2.IPhantomReporter; | ||
exports.IProgressReporter = _types2.IProgressReporter; | ||
(0, _catchExitSignals.catchExitSignals)(); | ||
(0, _startLogger.startLogger)(); | ||
(0, _patchConsole.patchConsole)(_reporter.reporter); | ||
const reduxLogReducer = _reducer.reducer; // Types | ||
|
||
exports.reduxLogReducer = reduxLogReducer; |
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,18 @@ | ||
import React from "react"; | ||
import { IGatsbyCLIState } from "../../redux/types"; | ||
interface ICLIProps { | ||
logs: IGatsbyCLIState; | ||
showStatusBar: boolean; | ||
} | ||
interface ICLIState { | ||
hasError: boolean; | ||
error?: Error; | ||
} | ||
declare class CLI extends React.Component<ICLIProps, ICLIState> { | ||
readonly state: ICLIState; | ||
memoizedReactElementsForMessages: React.ReactElement[]; | ||
componentDidCatch(error: Error, info: React.ErrorInfo): void; | ||
static getDerivedStateFromError(error: Error): ICLIState; | ||
render(): React.ReactElement; | ||
} | ||
export default CLI; |
Oops, something went wrong.