babel-preset-gatsby
Advanced tools
Comparing version 0.3.1 to 0.3.2-prompt-restart.128
@@ -6,2 +6,40 @@ # Change Log | ||
## [0.4.2](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.4.1...babel-preset-gatsby@0.4.2) (2020-05-13) | ||
**Note:** Version bump only for package babel-preset-gatsby | ||
## [0.4.1](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.4.0...babel-preset-gatsby@0.4.1) (2020-05-05) | ||
### Bug Fixes | ||
- **babel-preset-gatsby:** remove prop-types in production for dependencies ([#23609](https://github.com/gatsbyjs/gatsby/issues/23609)) ([a844157](https://github.com/gatsbyjs/gatsby/commit/a844157)) | ||
# [0.4.0](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.6...babel-preset-gatsby@0.4.0) (2020-04-27) | ||
**Note:** Version bump only for package babel-preset-gatsby | ||
## [0.3.6](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.5...babel-preset-gatsby@0.3.6) (2020-04-24) | ||
### Bug Fixes | ||
- **optimize-hook-destructuring:** handle skipped items ([#23438](https://github.com/gatsbyjs/gatsby/issues/23438)) ([2cf2dc5](https://github.com/gatsbyjs/gatsby/commit/2cf2dc5)) | ||
## [0.3.5](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.4...babel-preset-gatsby@0.3.5) (2020-04-24) | ||
**Note:** Version bump only for package babel-preset-gatsby | ||
## [0.3.4](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.3...babel-preset-gatsby@0.3.4) (2020-04-22) | ||
**Note:** Version bump only for package babel-preset-gatsby | ||
## [0.3.3](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.2...babel-preset-gatsby@0.3.3) (2020-04-17) | ||
### Bug Fixes | ||
- wrap ignore pattern in quotes ([#23176](https://github.com/gatsbyjs/gatsby/issues/23176)) ([7563db6](https://github.com/gatsbyjs/gatsby/commit/7563db6)) | ||
## [0.3.2](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.1...babel-preset-gatsby@0.3.2) (2020-04-16) | ||
**Note:** Version bump only for package babel-preset-gatsby | ||
## [0.3.1](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.3.0...babel-preset-gatsby@0.3.1) (2020-03-23) | ||
@@ -8,0 +46,0 @@ |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
var _path = _interopRequireDefault(require("path")); | ||
// This file is heavily based on create-react-app's implementation | ||
// @see https://github.com/facebook/create-react-app/blob/master/packages/babel-preset-react-app/dependencies.js | ||
const path = require(`path`); | ||
// export default is required here because it is passed directly to webpack | ||
// via require.resolve | ||
// This function has a better inference than would be beneficial to type, and it's relatively easy to grok. | ||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type | ||
var _default = (_, options = {}) => { | ||
const absoluteRuntimePath = _path.default.dirname(require.resolve(`@babel/runtime/package.json`)); // TODO(v3): Remove process.env.GATSBY_BUILD_STAGE, needs to be passed as an option | ||
const resolve = m => require.resolve(m); | ||
module.exports = function (api, options = {}) { | ||
const absoluteRuntimePath = path.dirname(resolve(`@babel/runtime/package.json`)); | ||
const stage = options.stage || process.env.GATSBY_BUILD_STAGE || `test`; | ||
return { | ||
@@ -18,3 +28,3 @@ // Babel assumes ES Modules, which isn't safe until CommonJS | ||
presets: [[// Latest stable ECMAScript features | ||
resolve(`@babel/preset-env`), { | ||
require.resolve(`@babel/preset-env`), { | ||
// Allow importing core-js in entrypoint and use browserlist to select polyfills | ||
@@ -29,3 +39,3 @@ useBuiltIns: `usage`, | ||
// https://babeljs.io/docs/en/babel-plugin-transform-runtime | ||
[resolve(`@babel/plugin-transform-runtime`), { | ||
[require.resolve(`@babel/plugin-transform-runtime`), { | ||
corejs: false, | ||
@@ -43,4 +53,9 @@ helpers: true, | ||
}], // Adds syntax support for import() | ||
resolve(`@babel/plugin-syntax-dynamic-import`)] | ||
require.resolve(`@babel/plugin-syntax-dynamic-import`), stage === `build-javascript` && [// Remove PropTypes from production build | ||
require.resolve(`babel-plugin-transform-react-remove-prop-types`), { | ||
removeImport: true | ||
}]].filter(Boolean) | ||
}; | ||
}; | ||
}; | ||
exports.default = _default; |
@@ -61,3 +61,5 @@ "use strict"; | ||
}]], | ||
plugins: [[resolve(`@babel/plugin-proposal-class-properties`), { | ||
plugins: [[resolve(`./optimize-hook-destructuring`), { | ||
lib: true | ||
}], [resolve(`@babel/plugin-proposal-class-properties`), { | ||
loose: true | ||
@@ -64,0 +66,0 @@ }], [resolve(`@babel/plugin-proposal-nullish-coalescing-operator`)], [resolve(`@babel/plugin-proposal-optional-chaining`)], resolve(`babel-plugin-macros`), resolve(`@babel/plugin-syntax-dynamic-import`), [resolve(`@babel/plugin-transform-runtime`), { |
{ | ||
"name": "babel-preset-gatsby", | ||
"version": "0.3.1", | ||
"version": "0.3.2-prompt-restart.128+cf906f433", | ||
"author": "Philipp Spiess <hello@philippspiess.com>", | ||
@@ -14,13 +14,13 @@ "repository": { | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", | ||
"@babel/plugin-proposal-optional-chaining": "^7.8.3", | ||
"@babel/plugin-proposal-optional-chaining": "^7.9.0", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/plugin-transform-runtime": "^7.8.3", | ||
"@babel/plugin-transform-runtime": "^7.9.6", | ||
"@babel/plugin-transform-spread": "^7.8.3", | ||
"@babel/preset-env": "^7.8.7", | ||
"@babel/preset-react": "^7.8.3", | ||
"@babel/runtime": "^7.8.7", | ||
"babel-plugin-dynamic-import-node": "^2.3.0", | ||
"@babel/preset-env": "^7.9.6", | ||
"@babel/preset-react": "^7.9.4", | ||
"@babel/runtime": "^7.9.6", | ||
"babel-plugin-dynamic-import-node": "^2.3.3", | ||
"babel-plugin-macros": "^2.8.0", | ||
"babel-plugin-transform-react-remove-prop-types": "^0.4.24", | ||
"gatsby-core-utils": "^1.1.1" | ||
"gatsby-core-utils": "1.1.2-prompt-restart.128+cf906f433" | ||
}, | ||
@@ -33,9 +33,9 @@ "peerDependencies": { | ||
"scripts": { | ||
"build": "babel src --out-dir . --ignore **/__tests__ --ignore **/utils/path-serializer.ts --extensions \".ts,.js\"", | ||
"build": "babel src --out-dir . --ignore \"**/__tests__\" --ignore \"**/utils/path-serializer.ts\" --extensions \".ts,.js\"", | ||
"prepare": "cross-env NODE_ENV=production npm run build", | ||
"watch": "babel -w src --out-dir . --ignore **/__tests__ --ignore **/utils/path-serializer.ts --extensions \".ts,.js\"" | ||
"watch": "babel -w src --out-dir . --ignore \"**/__tests__\" --ignore \"**/utils/path-serializer.ts\" --extensions \".ts,.js\"" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.8.4", | ||
"babel-preset-gatsby-package": "^0.3.1", | ||
"babel-preset-gatsby-package": "0.4.1", | ||
"cross-env": "^5.2.1", | ||
@@ -47,3 +47,3 @@ "slash": "^3.0.0" | ||
}, | ||
"gitHead": "10722585e3544fd7672c6a262198461a6968b0eb" | ||
"gitHead": "cf906f4335677f5a3a89c153e4eb28f23130427a" | ||
} |
@@ -18,2 +18,3 @@ # babel-preset-gatsby | ||
- [`@babel/plugin-proposal-optional-chaining`](https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining) | ||
- [`babel-plugin-optimize-hook-destructuring`](https://www.github.com/gatsbyjs/gatsby/packages/babel-plugin-optimize-hook-destructring) | ||
@@ -20,0 +21,0 @@ ## Usage |
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
27025
9
161
41
291010
13
1
- Removedci-info@2.0.0(transitive)
- Removedconfigstore@5.0.1(transitive)
- Removedcrypto-random-string@2.0.0(transitive)
- Removeddot-prop@5.3.0(transitive)
- Removedfs-extra@8.1.0(transitive)
- Removedgatsby-core-utils@1.10.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedimurmurhash@0.1.4(transitive)
- Removedis-obj@2.0.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedmake-dir@3.1.0(transitive)
- Removednode-object-hash@2.3.10(transitive)
- Removedproper-lockfile@4.1.2(transitive)
- Removedretry@0.12.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedtmp@0.2.3(transitive)
- Removedtypedarray-to-buffer@3.1.5(transitive)
- Removedunique-string@2.0.0(transitive)
- Removeduniversalify@0.1.2(transitive)
- Removedwrite-file-atomic@3.0.3(transitive)
- Removedxdg-basedir@4.0.0(transitive)
Updated@babel/preset-env@^7.9.6
Updated@babel/preset-react@^7.9.4
Updated@babel/runtime@^7.9.6