Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-layout

Package Overview
Dependencies
Maintainers
1
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-layout - npm Package Compare versions

Comparing version 1.0.0-rc.3 to 1.0.0-rc.4

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

<a name="1.0.0-rc.4"></a>
# [1.0.0-rc.4](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-layout@1.0.0-rc.3...gatsby-plugin-layout@1.0.0-rc.4) (2018-09-07)
**Note:** Version bump only for package gatsby-plugin-layout
<a name="1.0.0-rc.3"></a>

@@ -8,0 +14,0 @@

10

gatsby-node.js
"use strict";
var fs = require("fs");
var path = require("path");

@@ -13,3 +11,2 @@

var component = _ref2.component;
var userSpecifiedPath = true;
var defaultLayoutComponentPath = "src/layouts/index";

@@ -20,3 +17,2 @@

component = path.join(store.getState().program.directory, defaultLayoutComponentPath);
userSpecifiedPath = false;
}

@@ -26,8 +22,2 @@

throw new Error("You can only have single instance of gatsby-plugin-layout in your gatsby-config.js");
} else if (!fs.existsSync(component)) {
if (userSpecifiedPath) {
throw new Error("Couldn't find layout component at specified path: \"" + component + "\".");
} else {
throw new Error("Couldn't find layout component at \"" + defaultLayoutComponentPath + ".\n\n" + "Please create layout component in that location or specify path to layout component in gatsby-config.js");
}
}

@@ -34,0 +24,0 @@

4

package.json
{
"name": "gatsby-plugin-layout",
"version": "1.0.0-rc.3",
"version": "1.0.0-rc.4",
"description": "Stub description for gatsby-plugin-layout",

@@ -33,3 +33,3 @@ "main": "index.js",

},
"gitHead": "ded70b070587aa1a6097f3d5dcc607a9bb3479e7"
"gitHead": "2a93b851ea620f3c8a8012724321beced179cb8a"
}

@@ -9,4 +9,15 @@ "use strict";

var Layout = preferDefault(require(GATSBY_LAYOUT_COMPONENT_PATH)); // eslint-disable-next-line react/prop-types,react/display-name
var Layout;
try {
Layout = preferDefault(require(GATSBY_LAYOUT_COMPONENT_PATH));
} catch (e) {
if (e.toString().indexOf("Error: Cannot find module") !== -1) {
throw new Error("Couldn't find layout component at \"" + GATSBY_LAYOUT_COMPONENT_PATH + ".\n\n" + "Please create layout component in that location or specify path to layout component in gatsby-config.js");
} else {
throw e;
}
} // eslint-disable-next-line react/prop-types,react/display-name
module.exports = function (_ref) {

@@ -13,0 +24,0 @@ var element = _ref.element,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc