Skip to content

Commit a1454f5

Browse files
committed
Merge branch 'main' into amp-story-subscription
2 parents d26b5a8 + 1edf4ae commit a1454f5

117 files changed

Lines changed: 53584 additions & 42348 deletions

File tree

Some content is hidden

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

.eslintrc.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ module.exports = {
355355
'test/**/*.js',
356356
'extensions/**/test/**/*.js',
357357
'extensions/**/test-e2e/*.js',
358+
'src/bento/components/**/test/**/*.js',
359+
'src/bento/components/**/test-e2e/*.js',
358360
'ads/**/test/**/*.js',
359361
'testing/**/*.js',
360362
'build-system/**/test/*.js',
@@ -462,7 +464,12 @@ module.exports = {
462464
'rules': {'import/order': 0},
463465
},
464466
{
465-
'files': ['src/preact/**', 'extensions/**/1.0/**', '**/storybook/**'],
467+
'files': [
468+
'extensions/**/1.0/**',
469+
'src/bento/**',
470+
'src/preact/**',
471+
'**/storybook/**',
472+
],
466473
'rules': {'local/preact-preferred-props': 2},
467474
},
468475
{

ads/vendors/myua.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {validateData} from '#3p/3p';
55
* @param {!Object} data
66
*/
77
export function myua(global, data) {
8-
validateData(data, ['sid', 'iid'], ['demo', 'options']);
8+
validateData(data, ['sid', 'iid'], ['env', 'options']);
99

1010
const informerTag = global.document.createElement('div');
1111
informerTag.setAttribute('data-top-iid', data.iid);

ads/vendors/revcontent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function revcontent(global, data) {
1212
if (typeof data.env === 'undefined') {
1313
endpoint = 'https://assets.revcontent.com/master/delivery.js';
1414
} else if (data.env == 'dev') {
15-
endpoint = 'https://performante.revcontent.dev/delivery.js';
15+
endpoint = 'https://preact.revcontent.dev/delivery.js';
1616
} else {
1717
endpoint = 'https://assets.revcontent.com/' + data.env + '/delivery.js';
1818
}
@@ -46,6 +46,7 @@ export function revcontent(global, data) {
4646
'gdpr',
4747
'gdprConsent',
4848
'usPrivacy',
49+
'gamEnabled',
4950
];
5051

5152
data.endpoint = data.endpoint ? data.endpoint : 'trends.revcontent.com';

amp.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ createTask('release');
6161
createTask('serve');
6262
createTask('server-tests', 'serverTests');
6363
createTask('storybook');
64-
createTask('storybook-react');
6564
createTask('sweep-experiments', 'sweepExperiments');
6665
createTask('test-report-upload', 'testReportUpload');
6766
createTask('unit');
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
'use strict';
22

3+
const path = require('path');
34
const {getMinifiedConfig} = require('./minified-config');
45
const {getUnminifiedConfig} = require('./unminified-config');
56

67
/**
78
* @param {!Object} config
89
* @return {Object}
910
*/
10-
function mergeWithConfig(config) {
11+
function mergeReactBabelConfig(config) {
12+
const rootDir = path.join(__dirname, '../../');
1113
return {
1214
...config,
1315
plugins: [
14-
'./build-system/babel-plugins/babel-plugin-react-style-props',
15-
...config.plugins,
16+
path.join(
17+
rootDir,
18+
'./build-system/babel-plugins/babel-plugin-react-style-props'
19+
),
20+
...(config.plugins || []),
1621
],
1722
};
1823
}
@@ -21,17 +26,18 @@ function mergeWithConfig(config) {
2126
* @return {!Object}
2227
*/
2328
function getReactUnminifiedConfig() {
24-
return mergeWithConfig(getUnminifiedConfig());
29+
return mergeReactBabelConfig(getUnminifiedConfig());
2530
}
2631

2732
/**
2833
* @return {!Object}
2934
*/
3035
function getReactMinifiedConfig() {
31-
return mergeWithConfig(getMinifiedConfig());
36+
return mergeReactBabelConfig(getMinifiedConfig());
3237
}
3338

3439
module.exports = {
3540
getReactMinifiedConfig,
3641
getReactUnminifiedConfig,
42+
mergeReactBabelConfig,
3743
};

build-system/babel-config/test-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function getTestConfig() {
1717
'ads/**/*.js',
1818
'build-system/**/*.js',
1919
'extensions/**/test/**/*.js',
20+
'src/bento/components/**/test/**/*.js',
2021
'third_party/**/*.js',
2122
'test/**/*.js',
2223
'testing/**/*.js',

build-system/common/preact-prop-names.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ function objectFlip(obj) {
1919

2020
const DOM_ATTRIBUTES_REACT_TO_PREACT = {
2121
className: 'class',
22-
// TODO(wg-bento): Revert tabIndex with tabindex
23-
tabindex: 'tabIndex',
22+
tabIndex: 'tabindex',
2423
};
2524

2625
/**
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{
3+
"name": "jwplayer",
4+
"version": "1.0",
5+
"options": {}
6+
}
7+
]

build-system/compile/bundles.config.extensions.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,7 @@
613613
"version": "1.0",
614614
"latestVersion": "0.1",
615615
"options": {
616-
"hasCss": true,
617-
"bento": true,
618-
"npm": true
616+
"hasCss": true
619617
}
620618
},
621619
{

build-system/compile/bundles.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
const bentoBundles = require('./bundles.config.bento.json');
23
const extensionBundles = require('./bundles.config.extensions.json');
34
const wrappers = require('./compile-wrappers');
45
const {cyan, red} = require('kleur/colors');
@@ -206,6 +207,11 @@ exports.jsBundles = {
206207
*/
207208
exports.extensionBundles = extensionBundles;
208209

210+
/**
211+
* Used to generate component build targets
212+
*/
213+
exports.bentoBundles = bentoBundles;
214+
209215
/**
210216
* Used to alias a version of an extension to an older deprecated version.
211217
*/
@@ -260,3 +266,30 @@ exports.verifyExtensionBundles = function () {
260266
);
261267
});
262268
};
269+
270+
exports.verifyBentoBundles = function () {
271+
bentoBundles.forEach((bundle, i) => {
272+
const bundleString = JSON.stringify(bundle, null, 2);
273+
verifyBundle_(
274+
'name' in bundle,
275+
'name',
276+
'is missing from',
277+
'',
278+
bundleString
279+
);
280+
verifyBundle_(
281+
i === 0 || bundle.name.localeCompare(bentoBundles[i - 1].name) >= 0,
282+
'name',
283+
'is out of order. bentoBundles should be alphabetically sorted by name.',
284+
bundle.name,
285+
bundleString
286+
);
287+
verifyBundle_(
288+
'version' in bundle,
289+
'version',
290+
'is missing from',
291+
bundle.name,
292+
bundleString
293+
);
294+
});
295+
};

0 commit comments

Comments
 (0)