New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-preset-gatsby

Package Overview
Dependencies
Maintainers
6
Versions
407
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-gatsby - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

6

CHANGELOG.md

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

## [0.1.7](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.1.6...babel-preset-gatsby@0.1.7) (2019-02-06)
### Bug Fixes
- **babel-preset-gatsby:** Show a helpful error when used in the wrong environment ([#11555](https://github.com/gatsbyjs/gatsby/issues/11555)) ([adf06e5](https://github.com/gatsbyjs/gatsby/commit/adf06e5))
<a name="0.1.6"></a>

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

11

index.js

@@ -11,3 +11,12 @@ "use strict";

if (process.env.NODE_ENV !== `test`) {
pluginBabelConfig = require(path.join(process.cwd(), `./.cache/babelState.json`));
try {
pluginBabelConfig = require(path.join(process.cwd(), `./.cache/babelState.json`));
} catch (err) {
if (err.message.includes(`Cannot find module`)) {
// This probably is being used outside of the Gatsby CLI.
throw Error(`\`babel-preset-gatsby\` has been loaded, which consumes config generated by the Gatsby CLI. Set \`NODE_ENV=test\` to bypass, or run \`gatsby build\` first.`);
} else {
throw err;
}
}
}

@@ -14,0 +23,0 @@

4

package.json
{
"name": "babel-preset-gatsby",
"version": "0.1.6",
"version": "0.1.7",
"author": "Philipp Spiess <hello@philippspiess.com>",

@@ -23,3 +23,3 @@ "dependencies": {

},
"gitHead": "805956e1c7d2d4fc9ba6816d993a23b709fa50d9"
"gitHead": "300ae709e85084ae9145360fed9b76290ae12f2a"
}
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