Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prod backport to dev #697

Merged
merged 11 commits into from
Mar 21, 2024
31 changes: 0 additions & 31 deletions .changeset/forty-pears-laugh.md

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
plugins: ['standard', 'prettier', 'react'],
rules: {
'react/prop-types': 'warn',
'object-shorthand': 'off',
},
settings: {
react: {
Expand All @@ -12,7 +13,6 @@ module.exports = {
overrides: [
{
files: ['*.test.js', '__mocks__/**'],

},
],
env: {
Expand Down
4 changes: 2 additions & 2 deletions __mocks__/fusion:content-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module.exports = (options, ...moreSchemas) => {
const args = !(options instanceof Object)
? { schemas: [options].concat(...moreSchemas) }
: Array.isArray(options)
? { schemas: options.concat(...moreSchemas) }
: options
? { schemas: options.concat(...moreSchemas) }
: options

return taggablePrimitive(instance, 'contentConfig', args)
}
16 changes: 8 additions & 8 deletions __mocks__/fusion:prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ function _stringify(value) {
return Array.isArray(value)
? `[${value.map(_stringify).join(',')}]`
: value instanceof Object
? `{${Object.keys(value)
.filter(ignorePropTypeMethods)
.filter(exists)
.map((key) => {
return `"${key}":${_stringify(value[key])}`
})
.join(',')}}`
: JSON.stringify(value)
? `{${Object.keys(value)
.filter(ignorePropTypeMethods)
.filter(exists)
.map((key) => {
return `"${key}":${_stringify(value[key])}`
})
.join(',')}}`
: JSON.stringify(value)
}
FusionPropTypes.stringify = function stringify(value, replacer, space) {
const str = _stringify(value)
Expand Down
14 changes: 8 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module.exports = {
presets: [ [
'@babel/preset-env',
{
targets: { esmodules: false, node: "current" }
},
presets: [
[
'@babel/preset-env',
{
targets: { esmodules: false, node: 'current' },
},
],
'@babel/preset-react',
],
'@babel/preset-react'],
}
11 changes: 11 additions & 0 deletions blocks/ans-feature-block/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @wpmedia/ans-feature-block

## 2.0.0

### Major Changes

- [#665](https://github.com/WPMedia/feed-components/pull/665) [`c39ce40`](https://github.com/WPMedia/feed-components/commit/c39ce40bc95a95755bff01b4616a170e69572995) Thanks [@nschubach](https://github.com/nschubach)! - Adds resizer v2 support.

### Patch Changes

- Updated dependencies [[`c39ce40`](https://github.com/WPMedia/feed-components/commit/c39ce40bc95a95755bff01b4616a170e69572995)]:
- @wpmedia/[email protected]

## 1.15.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions blocks/ans-feature-block/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wpmedia/ans-feature-block",
"version": "1.15.0",
"version": "2.0.0",
"description": "Fusion components for building ANS feeds",
"main": "index.js",
"files": [
Expand All @@ -25,6 +25,6 @@
"build": ""
},
"dependencies": {
"@wpmedia/feeds-resizer": "^1.0.8 || ^2.0.0"
"@wpmedia/feeds-resizer": "^2.0.0"
}
}
11 changes: 11 additions & 0 deletions blocks/feeds-source-collections-block/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @wpmedia/feeds-source-collections-block

## 2.0.0

### Major Changes

- [#665](https://github.com/WPMedia/feed-components/pull/665) [`c39ce40`](https://github.com/WPMedia/feed-components/commit/c39ce40bc95a95755bff01b4616a170e69572995) Thanks [@nschubach](https://github.com/nschubach)! - Adds resizer v2 support.

### Patch Changes

- Updated dependencies [[`c39ce40`](https://github.com/WPMedia/feed-components/commit/c39ce40bc95a95755bff01b4616a170e69572995)]:
- @wpmedia/[email protected]

## 1.15.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions blocks/feeds-source-collections-block/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wpmedia/feeds-source-collections-block",
"version": "1.15.0",
"version": "2.0.0",
"description": "Content source to search collections by _id or alias",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"@wpmedia/feeds-content-source-utils": "^1.0.8",
"@wpmedia/feeds-resizer": "^1.0.8 || ^2.0.0",
"@wpmedia/feeds-resizer": "^2.0.0",
"axios": "^1.6.7"
},
"devDependencies": {
Expand Down
11 changes: 11 additions & 0 deletions blocks/feeds-source-content-api-block/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @wpmedia/feeds-source-content-api-block

## 2.0.0

### Major Changes

- [#665](https://github.com/WPMedia/feed-components/pull/665) [`c39ce40`](https://github.com/WPMedia/feed-components/commit/c39ce40bc95a95755bff01b4616a170e69572995) Thanks [@nschubach](https://github.com/nschubach)! - Adds resizer v2 support.

### Patch Changes

- Updated dependencies [[`c39ce40`](https://github.com/WPMedia/feed-components/commit/c39ce40bc95a95755bff01b4616a170e69572995)]:
- @wpmedia/[email protected]

## 1.15.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions blocks/feeds-source-content-api-block/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wpmedia/feeds-source-content-api-block",
"version": "1.15.0",
"version": "2.0.0",
"description": "Fusion components for building sitemaps",
"main": "index.js",
"files": [
Expand All @@ -27,7 +27,7 @@
},
"dependencies": {
"@wpmedia/feeds-content-source-utils": "^1.0.8",
"@wpmedia/feeds-resizer": "^1.0.8 || ^2.0.0",
"@wpmedia/feeds-resizer": "^2.0.0",
"axios": "^1.6.7"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from '@wpmedia/feeds-content-source-utils'
import { signImagesInANSObject, resizerFetch } from '@wpmedia/feeds-resizer'


const fetch = (key, { cachedCall }) => {
const requestUri = `${CONTENT_BASE}/content/v4/search/published`
const ansFields = [
Expand Down Expand Up @@ -218,7 +217,7 @@ const fetch = (key, { cachedCall }) => {
RESIZER_TOKEN_VERSION,
)(result)
})
.then(({data, ...rest}) => ({ ...rest, data: transform(data, key), }))
.then(({ data, ...rest }) => ({ ...rest, data: transform(data, key) }))
.then(({ data }) => data)
.catch((error) => console.log('== error ==', error))

Expand Down
Loading