diff --git a/.codecov.yml b/.codecov.yml index 7072c0262cbf..95023199dd73 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -5,9 +5,9 @@ codecov: ci: - 'travis.org' max_report_age: 24 - require_ci_to_pass: yes + require_ci_to_pass: no notify: - wait_for_ci: yes + wait_for_ci: no # Pull request comments disabled because they were too noisy # See https://docs.codecov.io/docs/pull-request-comments @@ -18,19 +18,19 @@ comment: false coverage: precision: 2 round: down - range: '80...100' + range: '75...100' status: project: default: base: auto if_not_found: success only_pulls: true - target: 80% + target: 75% threshold: 1% patch: default: base: auto if_not_found: success only_pulls: true - target: 80% + target: 75% threshold: 1% diff --git a/3p/twitter.js b/3p/twitter.js index 59357add44eb..7bc39f784e60 100644 --- a/3p/twitter.js +++ b/3p/twitter.js @@ -97,12 +97,12 @@ export function twitter(global, data) { return; } - resize(el); + resize(/** @type {!Element} */ (el)); twttr.events.bind('resize', (event) => { // To be safe, make sure the resize event was triggered for the widget we // created below. if (el === event.target) { - resize(el); + resize(/** @type {!Element} */ (el)); } }); } diff --git a/ads/inabox/inabox-host.md b/ads/inabox/inabox-host.md index 0adfe8bdffe9..24f950c3e633 100644 --- a/ads/inabox/inabox-host.md +++ b/ads/inabox/inabox-host.md @@ -78,11 +78,6 @@ Main workflow: 1. The ads tag creates an iframe, and set the response content to the iframe using `srcdoc`. -Note that this friendly iframe approach right now is in an experimental -stage. Put the following meta tag in the head of the ad HTML to opt-in -the experiment: -``. - ###### Security assurance In case that the AMPHTML ad is generated by a 3rd party, to ensure it's diff --git a/build-system/common/utils.js b/build-system/common/utils.js index 3b1f80ed4ccb..3c945f860f52 100644 --- a/build-system/common/utils.js +++ b/build-system/common/utils.js @@ -29,10 +29,22 @@ const ROOT_DIR = path.resolve(__dirname, '../../'); /** * Cleans and builds binaries with --fortesting flag and * overriden config. + * + * @param {boolean} minified */ -function buildMinifiedRuntime() { +// TODO(gh/amphtml/28312): Directly call dist() or build() +// instead of spwaning a new process. +function buildRuntime(minified = true) { execOrDie('gulp clean'); - execOrDie(`gulp dist --fortesting --config ${argv.config}`); + + let command = minified ? `gulp dist --fortesting` : `gulp build --fortesting`; + if (argv.core_runtime_only) { + command += ` --core_runtime_only`; + } else if (argv.extensions) { + command += ` --extensions=${argv.extensions}`; + } + + execOrDie(command); } /** @@ -157,7 +169,7 @@ function installPackages(dir) { } module.exports = { - buildMinifiedRuntime, + buildRuntime, getFilesChanged, getFilesFromArgv, getFilesToCheck, diff --git a/build-system/compile/compile.js b/build-system/compile/compile.js index 6123fd11cd7e..8318a8ef3a23 100644 --- a/build-system/compile/compile.js +++ b/build-system/compile/compile.js @@ -266,7 +266,7 @@ function compile( compilation_level: options.compilationLevel || 'SIMPLE_OPTIMIZATIONS', // Turns on more optimizations. assume_function_wrapper: true, - language_in: 'ECMASCRIPT_2018', + language_in: 'ECMASCRIPT_2020', // Do not transpile down to ES5 if running with `--esm`, since we do // limited transpilation in Babel. language_out: argv.esm ? 'NO_TRANSPILE' : 'ECMASCRIPT5', diff --git a/build-system/compile/single-pass.js b/build-system/compile/single-pass.js index 5dd692b623fe..43579fd53be6 100644 --- a/build-system/compile/single-pass.js +++ b/build-system/compile/single-pass.js @@ -107,7 +107,7 @@ exports.getFlags = function (config) { // accessing the symbol, we remedy this by attaching all public exports // to `_` and everything imported across modules is is accessed through `_`. rename_prefix_namespace: '_', - language_in: 'ECMASCRIPT_2018', + language_in: 'ECMASCRIPT_2020', language_out: config.esm ? 'NO_TRANSPILE' : config.language_out || 'ECMASCRIPT5', diff --git a/build-system/global-configs/canary-config.json b/build-system/global-configs/canary-config.json index 202b4e78e626..b99c28447964 100644 --- a/build-system/global-configs/canary-config.json +++ b/build-system/global-configs/canary-config.json @@ -1,9 +1,5 @@ { - "allow-doc-opt-in": [ - "amp-next-page", - "inabox-viewport-friendly", - "analytics-chunks" - ], + "allow-doc-opt-in": ["amp-next-page", "analytics-chunks"], "allow-url-opt-in": ["pump-early-frame"], "canary": 1, "a4aProfilingRate": 0.01, diff --git a/build-system/global-configs/experiments-config.json b/build-system/global-configs/experiments-config.json index 6aff5ed333c9..8f0b87d0f3fb 100644 --- a/build-system/global-configs/experiments-config.json +++ b/build-system/global-configs/experiments-config.json @@ -7,13 +7,6 @@ "expirationDateUTC": "2020-05-31", "defineExperimentConstant": "INTERSECTION_OBSERVER_POLYFILL" }, - "experimentB": { - "name": "MOVE_FIXED_LAYER", - "environment": "AMP", - "command": "gulp dist --define_experiment_constant=MOVE_FIXED_LAYER", - "issue": "", - "expiration_date_utc": "2020-12-31", - "define_experiment_constant": "MOVE_FIXED_LAYER" - }, + "experimentB": {}, "experimentC": {} } diff --git a/build-system/global-configs/prod-config.json b/build-system/global-configs/prod-config.json index c4d5bde7575d..82ac5779df95 100644 --- a/build-system/global-configs/prod-config.json +++ b/build-system/global-configs/prod-config.json @@ -1,9 +1,5 @@ { - "allow-doc-opt-in": [ - "amp-next-page", - "inabox-viewport-friendly", - "analytics-chunks" - ], + "allow-doc-opt-in": ["amp-next-page", "analytics-chunks"], "allow-url-opt-in": ["pump-early-frame"], "canary": 0, "a4aProfilingRate": 0.01, @@ -37,5 +33,7 @@ "random-subdomain-for-safeframe": 0.02, "swg-gpay-api": 1, "swg-gpay-native": 1, - "version-locking": 1 + "version-locking": 1, + "amp-ad-no-center-css": 0.05, + "analytics-chunks": 1 } diff --git a/build-system/pr-check/OWNERS b/build-system/pr-check/OWNERS index 2c8f163b1f3d..8425845cae3e 100644 --- a/build-system/pr-check/OWNERS +++ b/build-system/pr-check/OWNERS @@ -4,11 +4,7 @@ { rules: [ { - owners: [ - {name: 'ampproject/wg-infra'}, - {name: 'estherkim', notify: true}, - {name: 'rsimha', notify: true}, - ], + owners: [{name: 'ampproject/wg-infra'}, {name: 'rsimha', notify: true}], }, ], } diff --git a/build-system/pr-check/build-targets.js b/build-system/pr-check/build-targets.js index 89397fb17121..38b4cfee3723 100644 --- a/build-system/pr-check/build-targets.js +++ b/build-system/pr-check/build-targets.js @@ -147,6 +147,12 @@ const targetMatchers = { 'PACKAGE_UPGRADE': (file) => { return file == 'package.json' || file == 'yarn.lock'; }, + 'RUNTIME': (file) => { + if (isOwnersFile(file)) { + return false; + } + return file.startsWith('src/'); + }, 'SERVER': (file) => { if (isOwnersFile(file)) { return false; diff --git a/build-system/pr-check/e2e-tests.js b/build-system/pr-check/e2e-tests.js index 62f37da13196..5b34a16d80bf 100644 --- a/build-system/pr-check/e2e-tests.js +++ b/build-system/pr-check/e2e-tests.js @@ -42,7 +42,7 @@ async function main() { if (!isTravisPullRequestBuild()) { downloadDistOutput(FILENAME); timedExecOrDie('gulp update-packages'); - timedExecOrDie('gulp e2e --nobuild --headless'); + timedExecOrDie('gulp e2e --nobuild --headless --compiled'); } else { printChangeSummary(FILENAME); const buildTargets = determineBuildTargets(FILENAME); @@ -53,7 +53,7 @@ async function main() { ) { downloadDistOutput(FILENAME); timedExecOrDie('gulp update-packages'); - timedExecOrDie('gulp e2e --nobuild --headless'); + timedExecOrDie('gulp e2e --nobuild --headless --compiled'); } else { console.log( `${FILELOGPREFIX} Skipping`, diff --git a/build-system/pr-check/experiment-tests.js b/build-system/pr-check/experiment-tests.js index ae62530b53c9..bd39d39cbcda 100644 --- a/build-system/pr-check/experiment-tests.js +++ b/build-system/pr-check/experiment-tests.js @@ -60,7 +60,7 @@ function build_(config) { function test_() { timedExecOrDie('gulp integration --nobuild --compiled --headless'); - timedExecOrDie('gulp e2e --nobuild --headless'); + timedExecOrDie('gulp e2e --nobuild --compiled --headless'); } function main() { diff --git a/build-system/server/routes/a4a-envelopes.js b/build-system/server/routes/a4a-envelopes.js index 1247b611f63b..0912d7329845 100644 --- a/build-system/server/routes/a4a-envelopes.js +++ b/build-system/server/routes/a4a-envelopes.js @@ -48,14 +48,12 @@ app.use('/inabox-(friendly|safeframe)', (req, res) => { fs.promises .readFile(process.cwd() + templatePath, 'utf8') .then((template) => { - let url; + const url = getInaboxUrl(req); if (req.baseUrl == '/inabox-friendly') { - url = getInaboxUrl(req, 'inabox-viewport-friendly'); template = template .replace('SRCDOC_ATTRIBUTE', 'srcdoc="BODY"') .replace('INABOX_ADS_TAG_INTEGRATION', ''); } else { - url = getInaboxUrl(req); template = template .replace( /NAME/g, diff --git a/build-system/tasks/e2e/functional-test-controller.js b/build-system/tasks/e2e/functional-test-controller.js index 6e19f8dd74f7..934e21081d4f 100644 --- a/build-system/tasks/e2e/functional-test-controller.js +++ b/build-system/tasks/e2e/functional-test-controller.js @@ -170,9 +170,10 @@ class FunctionalTestController { * {@link https://www.w3.org/TR/webdriver1/#find-element} * * @param {string} unusedSelector + * @param {number=} unusedTimeout * @return {!Promise} */ - async findElement(unusedSelector) {} + async findElement(unusedSelector, unusedTimeout) {} /** * The Find Elements command is used to find all elements matching the diff --git a/build-system/tasks/e2e/index.js b/build-system/tasks/e2e/index.js index f525ee226ad9..94c15868914d 100644 --- a/build-system/tasks/e2e/index.js +++ b/build-system/tasks/e2e/index.js @@ -24,7 +24,7 @@ const log = require('fancy-log'); const Mocha = require('mocha'); const path = require('path'); const { - buildMinifiedRuntime, + buildRuntime, getFilesFromArgv, installPackages, } = require('../../common/utils'); @@ -39,11 +39,11 @@ const PORT = 8000; const SLOW_TEST_THRESHOLD_MS = 2500; const TEST_RETRIES = isTravisBuild() ? 2 : 0; -async function launchWebServer_() { +async function launchWebServer_(minified) { await startServer( {host: HOST, port: PORT}, {quiet: !argv.debug}, - {compiled: true} + {compiled: minified} ); } @@ -84,11 +84,11 @@ async function e2e() { // build runtime if (!argv.nobuild) { - buildMinifiedRuntime(); + buildRuntime(/* minified */ !!argv.compiled); } // start up web server - await launchWebServer_(); + await launchWebServer_(/* minified */ argv.compiled); // run tests if (!argv.watch) { @@ -150,7 +150,11 @@ e2e.flags = { '`chrome`, `firefox`, `safari`.', 'config': ' Sets the runtime\'s AMP_CONFIG to one of "prod" (default) or "canary"', - 'nobuild': ' Skips building the runtime via `gulp dist --fortesting`', + 'core_runtime_only': ' Builds only the core runtime.', + 'nobuild': + ' Skips building the runtime via `gulp (build|dist) --fortesting`', + 'extensions': ' Builds only the listed extensions.', + 'compiled': ' Runs the tests using minified js', 'files': ' Run tests found in a specific path (ex: **/test-e2e/*.js)', 'testnames': ' Lists the name of each test being run', 'watch': ' Watches for changes in files, runs corresponding test(s)', diff --git a/build-system/tasks/e2e/package.json b/build-system/tasks/e2e/package.json index 9ece0207a85f..4753a2633edf 100644 --- a/build-system/tasks/e2e/package.json +++ b/build-system/tasks/e2e/package.json @@ -7,7 +7,7 @@ "@babel/register": "7.9.0", "babel-regenerator-runtime": "6.5.0", "chromedriver": "81.0.0", - "puppeteer": "3.0.2", + "puppeteer": "3.0.4", "geckodriver": "1.19.1", "selenium-webdriver": "4.0.0-alpha.7" }, diff --git a/build-system/tasks/e2e/puppeteer-controller.js b/build-system/tasks/e2e/puppeteer-controller.js index a9f8269006fc..263ac2868e48 100644 --- a/build-system/tasks/e2e/puppeteer-controller.js +++ b/build-system/tasks/e2e/puppeteer-controller.js @@ -189,17 +189,18 @@ class PuppeteerController { /** * @param {string} selector + * @param {number=} timeout * @return {!Promise>} * @override */ - async findElement(selector) { + async findElement(selector, timeout = DEFAULT_WAIT_TIMEOUT) { const frame = await this.getCurrentFrame_(); const root = await this.getRoot_(); const jsHandle = await frame.waitForFunction( (root, selector) => { return root./*OK*/ querySelector(selector); }, - {timeout: DEFAULT_WAIT_TIMEOUT}, + {timeout}, root, selector ); diff --git a/build-system/tasks/e2e/selenium-webdriver-controller.js b/build-system/tasks/e2e/selenium-webdriver-controller.js index ea57e7343dbb..ae55755ded7a 100644 --- a/build-system/tasks/e2e/selenium-webdriver-controller.js +++ b/build-system/tasks/e2e/selenium-webdriver-controller.js @@ -117,10 +117,11 @@ class SeleniumWebDriverController { * until.js#elementLocated * {@link https://github.com/SeleniumHQ/selenium/blob/6a717f20/javascript/node/selenium-webdriver/lib/until.js#L237} * @param {string} selector + * @param {number=} timeout * @return {!Promise>} * @override */ - async findElement(selector) { + async findElement(selector, timeout = ELEMENT_WAIT_TIMEOUT) { const bySelector = By.css(selector); const label = 'for element to be located ' + selector; @@ -139,7 +140,7 @@ class SeleniumWebDriverController { throw e; } }); - const webElement = await this.driver.wait(condition, ELEMENT_WAIT_TIMEOUT); + const webElement = await this.driver.wait(condition, timeout); return new ElementHandle(webElement, this); } diff --git a/build-system/tasks/e2e/yarn.lock b/build-system/tasks/e2e/yarn.lock index 7acdf01bc912..09eed59681a5 100644 --- a/build-system/tasks/e2e/yarn.lock +++ b/build-system/tasks/e2e/yarn.lock @@ -53,11 +53,6 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/mime-types@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73" - integrity sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM= - "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -662,18 +657,6 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -mime-db@1.43.0: - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== - -mime-types@^2.1.25: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== - dependencies: - mime-db "1.43.0" - mime@^2.0.3: version "2.4.0" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.0.tgz#e051fd881358585f3279df333fe694da0bcffdd6" @@ -882,17 +865,15 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -puppeteer@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.2.tgz#1d08cdb7c0c2666f5e743221b1cb1946fea493f0" - integrity sha512-5jS/POFVDW9fqb76O8o0IBpXOnq+Na8ocGMggYtnjCRBRqmAFvX0csmwgLOHkYnQ/vCBcBPYlOq0Pp60z1850Q== +puppeteer@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.4.tgz#f445aae0a6732c65bbb90e963dcd6fd8fde0d780" + integrity sha512-1QEb4tJXXbNId7WSHlcDkS3B4GklTIebKn8Y9D6B7tAdUjQncb+8QlTjbQsAgGX5dhRG32Qycuk5XKzJgLs0sg== dependencies: - "@types/mime-types" "^2.1.0" debug "^4.1.0" extract-zip "^2.0.0" https-proxy-agent "^4.0.0" mime "^2.0.3" - mime-types "^2.1.25" progress "^2.0.1" proxy-from-env "^1.0.0" rimraf "^3.0.2" diff --git a/build-system/tasks/performance/config.json b/build-system/tasks/performance/config.json index 9474ff1cdd26..791640714400 100644 --- a/build-system/tasks/performance/config.json +++ b/build-system/tasks/performance/config.json @@ -9,8 +9,8 @@ { "handlerName": "analyticsHandler", "urls": [ - "http://localhost:8000/test/manual/amp-analytics/performanceTestPages/visible-basic.html", - "http://localhost:8000/test/manual/amp-analytics/performanceTestPages/visible-multiple.html" + "http://localhost:8000/test/manual/amp-analytics/performance-test-pages/visible-basic.html", + "http://localhost:8000/test/manual/amp-analytics/performance-test-pages/visible-multiple.html" ], "timeout": 2000, "extraUrlParam": { diff --git a/build-system/tasks/performance/package.json b/build-system/tasks/performance/package.json index 2c2c347de469..487d57ae473a 100644 --- a/build-system/tasks/performance/package.json +++ b/build-system/tasks/performance/package.json @@ -6,6 +6,6 @@ "devDependencies": { "chai": "4.2.0", "mocha": "7.1.2", - "puppeteer": "3.0.2" + "puppeteer": "3.0.4" } } diff --git a/build-system/tasks/performance/yarn.lock b/build-system/tasks/performance/yarn.lock index c17efe8a2c6a..7294aa20e9f5 100644 --- a/build-system/tasks/performance/yarn.lock +++ b/build-system/tasks/performance/yarn.lock @@ -2,11 +2,6 @@ # yarn lockfile v1 -"@types/mime-types@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73" - integrity sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM= - "@types/node@*": version "13.13.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54" @@ -537,18 +532,6 @@ log-symbols@3.0.0: dependencies: chalk "^2.4.2" -mime-db@1.43.0: - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== - -mime-types@^2.1.25: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== - dependencies: - mime-db "1.43.0" - mime@^2.0.3: version "2.4.4" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" @@ -728,17 +711,15 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -puppeteer@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.2.tgz#1d08cdb7c0c2666f5e743221b1cb1946fea493f0" - integrity sha512-5jS/POFVDW9fqb76O8o0IBpXOnq+Na8ocGMggYtnjCRBRqmAFvX0csmwgLOHkYnQ/vCBcBPYlOq0Pp60z1850Q== +puppeteer@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.4.tgz#f445aae0a6732c65bbb90e963dcd6fd8fde0d780" + integrity sha512-1QEb4tJXXbNId7WSHlcDkS3B4GklTIebKn8Y9D6B7tAdUjQncb+8QlTjbQsAgGX5dhRG32Qycuk5XKzJgLs0sg== dependencies: - "@types/mime-types" "^2.1.0" debug "^4.1.0" extract-zip "^2.0.0" https-proxy-agent "^4.0.0" mime "^2.0.3" - mime-types "^2.1.25" progress "^2.0.1" proxy-from-env "^1.0.0" rimraf "^3.0.2" diff --git a/build-system/tasks/presubmit-checks.js b/build-system/tasks/presubmit-checks.js index 6198cbb51256..4c5d2acf6061 100644 --- a/build-system/tasks/presubmit-checks.js +++ b/build-system/tasks/presubmit-checks.js @@ -625,6 +625,7 @@ const forbiddenTerms = { 'dist.3p/current/integration.js', // Includes the previous. 'src/polyfills/custom-elements.js', 'ads/google/imaVideo.js', // Required until #22277 is fixed. + '3p/twitter.js', // Runs in a 3p window context, so cannot import log.js. ], }, 'startupChunk\\(': { diff --git a/build-system/tasks/runtime-test/OWNERS b/build-system/tasks/runtime-test/OWNERS index d3a1b00d7fa5..32c5ea6d7543 100644 --- a/build-system/tasks/runtime-test/OWNERS +++ b/build-system/tasks/runtime-test/OWNERS @@ -4,10 +4,7 @@ { rules: [ { - owners: [ - {name: 'ampproject/wg-infra'}, - {name: 'estherkim', notify: true}, - ], + owners: [{name: 'ampproject/wg-infra'}], }, ], } diff --git a/build-system/tasks/visual-diff/index.js b/build-system/tasks/visual-diff/index.js index 1d65e4f925bf..8378f9ddda67 100644 --- a/build-system/tasks/visual-diff/index.js +++ b/build-system/tasks/visual-diff/index.js @@ -38,7 +38,7 @@ const { gitTravisMasterBaseline, shortSha, } = require('../../common/git'); -const {buildMinifiedRuntime, installPackages} = require('../../common/utils'); +const {buildRuntime, installPackages} = require('../../common/utils'); const {execScriptAsync} = require('../../common/exec'); const {isTravisBuild} = require('../../common/travis'); const {startServer, stopServer} = require('../serve'); @@ -760,7 +760,7 @@ async function ensureOrBuildAmpRuntimeInTestMode_() { ); } } else { - buildMinifiedRuntime(); + buildRuntime(); } } diff --git a/build-system/tasks/visual-diff/package.json b/build-system/tasks/visual-diff/package.json index d8a436d2ade9..4d40f6a5ed69 100644 --- a/build-system/tasks/visual-diff/package.json +++ b/build-system/tasks/visual-diff/package.json @@ -6,7 +6,7 @@ "devDependencies": { "@percy/agent": "0.26.2", "@percy/puppeteer": "1.1.0", - "puppeteer": "3.0.2" + "puppeteer": "3.0.4" }, "resolutions": { "**/**/minimist": "^1.2.3" diff --git a/build-system/tasks/visual-diff/yarn.lock b/build-system/tasks/visual-diff/yarn.lock index cbb479592b84..ddfbba26d527 100644 --- a/build-system/tasks/visual-diff/yarn.lock +++ b/build-system/tasks/visual-diff/yarn.lock @@ -194,11 +194,6 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/mime-types@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73" - integrity sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM= - "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -1452,11 +1447,6 @@ mime-db@1.40.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== -mime-db@1.43.0: - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== - mime-db@~1.37.0: version "1.37.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" @@ -1469,13 +1459,6 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "~1.37.0" -mime-types@^2.1.25: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== - dependencies: - mime-db "1.43.0" - mime-types@~2.1.24: version "2.1.24" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" @@ -1700,17 +1683,15 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.2.tgz#1d08cdb7c0c2666f5e743221b1cb1946fea493f0" - integrity sha512-5jS/POFVDW9fqb76O8o0IBpXOnq+Na8ocGMggYtnjCRBRqmAFvX0csmwgLOHkYnQ/vCBcBPYlOq0Pp60z1850Q== +puppeteer@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.4.tgz#f445aae0a6732c65bbb90e963dcd6fd8fde0d780" + integrity sha512-1QEb4tJXXbNId7WSHlcDkS3B4GklTIebKn8Y9D6B7tAdUjQncb+8QlTjbQsAgGX5dhRG32Qycuk5XKzJgLs0sg== dependencies: - "@types/mime-types" "^2.1.0" debug "^4.1.0" extract-zip "^2.0.0" https-proxy-agent "^4.0.0" mime "^2.0.3" - mime-types "^2.1.25" progress "^2.0.1" proxy-from-env "^1.0.0" rimraf "^3.0.2" diff --git a/build-system/test-configs/dep-check-config.js b/build-system/test-configs/dep-check-config.js index 2a486c323235..44ea7e80263a 100644 --- a/build-system/test-configs/dep-check-config.js +++ b/build-system/test-configs/dep-check-config.js @@ -251,6 +251,7 @@ exports.rules = [ // Story education 'extensions/amp-story-education/0.1/amp-story-education.js->extensions/amp-story/1.0/amp-story-store-service.js', 'extensions/amp-story-education/0.1/amp-story-education.js->extensions/amp-story/1.0/utils.js', + 'extensions/amp-story-education/0.1/amp-story-education.js->extensions/amp-story/1.0/amp-story-localization-service.js', // Subscriptions. 'extensions/amp-subscriptions/0.1/expr.js->extensions/amp-access/0.1/access-expr.js', @@ -363,6 +364,10 @@ exports.rules = [ // For action macros. 'extensions/amp-link-rewriter/0.1/amp-link-rewriter.js->' + 'src/service/navigation.js', + // For localization. + 'extensions/amp-story/0.1/amp-story-localization-service.js->src/service/localization.js', + 'extensions/amp-story/1.0/amp-story-localization-service.js->src/service/localization.js', + 'extensions/amp-story-auto-ads/0.1/story-ad-localization.js->src/service/localization.js', // Accessing calculateScriptBaseUrl() for vendor config URLs 'extensions/amp-analytics/0.1/config.js->' + 'src/service/extension-location.js', diff --git a/examples/amp-consent/cmp-vendors.amp.html b/examples/amp-consent/cmp-vendors.amp.html index 5d950b4d5d29..e35ff2b2bcd8 100644 --- a/examples/amp-consent/cmp-vendors.amp.html +++ b/examples/amp-consent/cmp-vendors.amp.html @@ -101,6 +101,7 @@ + @@ -269,6 +270,23 @@