gatsby-transformer-cloudinary
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -0,1 +1,11 @@ | ||
# Version 2.2.1 | ||
Additions: | ||
- Added types for `fixedImageObject` and `fluidImageObject`. | ||
Fixes: | ||
- `fixedImageObject` and `fluidImageObject` uses default plugin options properly in runtime. | ||
- Moved `fixedImageObject` and `fluidImageObject` APIs to `/api`. Fixes `fs` error when importing from `index.js`. | ||
- Set default value for `fieldsToSelect` in `fixedImageObject` and `fluidImageObject` to empty array. | ||
# Version 2.2.0 | ||
@@ -2,0 +12,0 @@ |
@@ -19,3 +19,3 @@ const { getPluginOptions } = require('./options'); | ||
defaultBase64, | ||
fieldsToSelect, | ||
fieldsToSelect = [], | ||
defaultTracedSVG, | ||
@@ -122,3 +122,3 @@ height, | ||
defaultBase64, | ||
fieldsToSelect, | ||
fieldsToSelect = [], | ||
defaultTracedSVG, | ||
@@ -125,0 +125,0 @@ ignoreDefaultBase64 = false, |
exports.createRemoteImageNode = require('./create-remote-image-node').createRemoteImageNode; | ||
exports.getFixedImageObject = require('./get-image-objects').getFixedImageObject; | ||
exports.getFluidImageObject = require('./get-image-objects').getFluidImageObject; |
@@ -1,2 +0,2 @@ | ||
let options = null; | ||
let options = {}; | ||
@@ -14,2 +14,5 @@ const defaultOptions = { | ||
// Assign defaultOptions to options for run time operations | ||
Object.assign(options, defaultOptions) | ||
exports.setPluginOptions = ({ pluginOptions, reporter }) => { | ||
@@ -25,6 +28,8 @@ if ( | ||
options = { | ||
...defaultOptions, | ||
...pluginOptions, | ||
}; | ||
// options = { | ||
// ...defaultOptions, | ||
// ...pluginOptions, | ||
// }; | ||
Object.assign(options, pluginOptions) | ||
}; | ||
@@ -31,0 +36,0 @@ |
{ | ||
"name": "gatsby-transformer-cloudinary", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Transform local files into Cloudinary-managed assets for Gatsby sites.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -271,6 +271,6 @@ # gatsby-transformer-cloudinary | ||
import Image from 'gatsby-image'; | ||
import { getFluidImageObject } from 'gatsby-transformer-cloudinary'; | ||
import { getFluidImageObject } from 'gatsby-transformer-cloudinary/api'; | ||
export default () => { | ||
const [fluid, setFluid] = useState(false); | ||
const [fluid, setFluid] = useState(undefined); | ||
@@ -298,6 +298,6 @@ useEffect(() => { | ||
import Image from 'gatsby-image'; | ||
import { getFixedImageObject } from 'gatsby-transformer-cloudinary'; | ||
import { getFixedImageObject } from 'gatsby-transformer-cloudinary/api'; | ||
export default () => { | ||
const [fixed, setFixed] = useState(false); | ||
const [fixed, setFixed] = useState(undefined); | ||
@@ -304,0 +304,0 @@ useEffect(() => { |
104087
24
2148