Skip to content

Commit 855fca2

Browse files
committed
Merge branch 'develop' of github.com:ampproject/amp-wp into update/php-css-parser-8.4.0
* 'develop' of github.com:ampproject/amp-wp: (205 commits) Bump sirbrillig/phpcs-variable-analysis from 2.11.2 to 2.11.3 Bump php-stubs/wordpress-stubs from 5.9.0 to 5.9.1 Update Gutenberg package dependencies Bump eslint-plugin-jsdoc from 37.9.1 to 37.9.4 Bump postcss-preset-env from 7.4.0 to 7.4.1 Bump @babel/core from 7.17.4 to 7.17.5 Bump postcss-preset-env from 7.3.3 to 7.4.0 Bump @babel/core from 7.17.2 to 7.17.4 Bump eslint-plugin-jest from 26.1.0 to 26.1.1 Update Gutenberg package dependencies Bump eslint-plugin-jsdoc from 37.9.0 to 37.9.1 Bump postcss-preset-env from 7.3.1 to 7.3.3 Bump lint-staged from 12.3.3 to 12.3.4 Bump axios from 0.25.0 to 0.26.0 Update snapshots Remove redundant array_values Fix pattern match for package-lock.json Ensure non-zero CSS_FILE_COUNT when npm package updated for sake of stylelint Bump eslint from 8.8.0 to 8.9.0 Bump follow-redirects from 1.14.7 to 1.14.8 ...
2 parents 9d29e1d + 7c2b5ae commit 855fca2

File tree

102 files changed

+11278
-9081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+11278
-9081
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
],
8888
"jest/no-hooks": "off",
8989
"jest/prefer-expect-assertions": "off",
90-
"jest/prefer-inline-snapshots": "off"
90+
"jest/prefer-inline-snapshots": "off",
91+
"jest/prefer-snapshot-hint": "off"
9192
}
9293
},
9394
{

.github/actions/draft-release/package-lock.json

Lines changed: 58 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/build-test-measure.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
6161
FILE_COUNT=$(php -f bin/determine-modified-files-count.php "$IGNORE_PATH_REGEX" "$MODIFIED_FILES" --invert)
6262
PHP_FILE_COUNT=$(php -f bin/determine-modified-files-count.php ".+\.php|composer\.(json|lock)|phpstan\.neon\.dist" "$MODIFIED_FILES")
63-
CSS_FILE_COUNT=$(php -f bin/determine-modified-files-count.php ".+\.s?css" "$MODIFIED_FILES")
64-
JS_FILE_COUNT=$(php -f bin/determine-modified-files-count.php "(.+\.(js|snap)|package\.(json|lock))" "$MODIFIED_FILES")
63+
CSS_FILE_COUNT=$(php -f bin/determine-modified-files-count.php ".+\.s?css|package\.json|package-lock\.json" "$MODIFIED_FILES")
64+
JS_FILE_COUNT=$(php -f bin/determine-modified-files-count.php ".+\.(js|snap)|package\.json|package-lock\.json" "$MODIFIED_FILES")
6565
6666
echo "Changed file count: $FILE_COUNT"
6767
echo "Changed PHP file count: $PHP_FILE_COUNT"
@@ -202,6 +202,7 @@ jobs:
202202
- name: Normalize composer.json
203203
run: |
204204
composer require --no-interaction --dev ergebnis/composer-normalize --ignore-platform-reqs
205+
composer config --no-interaction --no-plugins allow-plugins.ergebnis/composer-normalize true
205206
composer --no-interaction normalize --dry-run
206207
207208
#-----------------------------------------------------------------------------------------------------------------------

.stylelintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
{
2020
"message": "Selector should use lowercase and separate words with hyphens (selector-id-pattern)"
2121
}
22-
]
22+
],
23+
"value-keyword-case": null
2324
}
2425
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ An easier path to great Page Experience for everyone. Powered by AMP.
88
**Tags:** [page experience](https://wordpress.org/plugins/tags/page-experience), [performance](https://wordpress.org/plugins/tags/performance), [amp](https://wordpress.org/plugins/tags/amp), [mobile](https://wordpress.org/plugins/tags/mobile), [optimization](https://wordpress.org/plugins/tags/optimization), [accelerated mobile pages](https://wordpress.org/plugins/tags/accelerated-mobile-pages)
99
**Requires at least:** 4.9
1010
**Tested up to:** 5.9
11-
**Stable tag:** 2.2.0
11+
**Stable tag:** 2.2.1
1212
**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
1313
**Requires PHP:** 5.6
1414

assets/css/src/amp-default.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,15 @@ amp-carousel .amp-wp-gallery-caption {
6060
background-color: rgba(0, 0, 0, 0.5);
6161
color: #fff;
6262
padding: 1rem;
63+
margin-bottom: 0;
6364
}
6465

65-
.wp-block-gallery[data-amp-carousel="true"] {
66+
amp-carousel .amp-wp-gallery-caption a {
67+
color: inherit;
68+
}
69+
70+
.wp-block-gallery[data-amp-carousel="true"],
71+
.wp-block-gallery[data-amp-carousel="true"].has-nested-images {
6672
display: block;
6773
flex-wrap: unset;
6874
}

assets/src/admin/amp-plugin-install.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
/**
2-
* WordPress dependencies
3-
*/
4-
import domReady from '@wordpress/dom-ready';
5-
import { __ } from '@wordpress/i18n';
6-
71
/**
82
* External dependencies
93
*/
104
import { AMP_PLUGINS, AMP_COMPATIBLE } from 'amp-plugins'; // From WP inline script.
115
import { debounce } from 'lodash';
126

7+
/**
8+
* WordPress dependencies
9+
*/
10+
import domReady from '@wordpress/dom-ready';
11+
import { __ } from '@wordpress/i18n';
12+
1313
const ampPluginInstall = {
1414

1515
/**

assets/src/admin/amp-theme-install.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
2-
* WordPress dependencies
2+
* External dependencies
33
*/
4-
import { __ } from '@wordpress/i18n';
5-
import domReady from '@wordpress/dom-ready';
4+
import { AMP_COMPATIBLE } from 'amp-themes'; // From WP inline script.
65

76
/**
8-
* External dependencies
7+
* WordPress dependencies
98
*/
10-
import { AMP_COMPATIBLE } from 'amp-themes'; // From WP inline script.
9+
import { __ } from '@wordpress/i18n';
10+
import domReady from '@wordpress/dom-ready';
1111

1212
/**
1313
* Internal dependencies

assets/src/admin/site-scan-notice/notice.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/**
2-
* WordPress dependencies
3-
*/
4-
import { useContext, useEffect } from '@wordpress/element';
5-
import { __ } from '@wordpress/i18n';
6-
71
/**
82
* External dependencies
93
*/
@@ -12,6 +6,12 @@ import {
126
SETTINGS_LINK,
137
} from 'amp-site-scan-notice'; // From WP inline script.
148

9+
/**
10+
* WordPress dependencies
11+
*/
12+
import { useContext, useEffect } from '@wordpress/element';
13+
import { __ } from '@wordpress/i18n';
14+
1515
/**
1616
* Internal dependencies
1717
*/

assets/src/admin/site-scan-notice/plugins-with-amp-incompatibility.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
2-
* WordPress dependencies
2+
* External dependencies
33
*/
4-
import { useContext } from '@wordpress/element';
5-
import { _n, sprintf } from '@wordpress/i18n';
4+
import PropTypes from 'prop-types';
65

76
/**
8-
* External dependencies
7+
* WordPress dependencies
98
*/
10-
import PropTypes from 'prop-types';
9+
import { useContext } from '@wordpress/element';
10+
import { _n, sprintf } from '@wordpress/i18n';
1111

1212
/**
1313
* Internal dependencies

0 commit comments

Comments
 (0)