Skip to content

Commit

Permalink
core mode: add internalRuntimeVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
samouri committed Jul 19, 2021
1 parent c3a9b21 commit 86542de
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion 3p/integration-lib.js
Expand Up @@ -26,7 +26,7 @@ import {
userAssert,
} from '../src/log';
import {installEmbedStateListener, manageWin} from './environment';
import {internalRuntimeVersion} from '../src/internal-version';
import {internalRuntimeVersion} from '#core/mode';
import {parseJson} from '#core/types/object/json';
import {run, setExperimentToggles} from './3p';
import {urls} from '../src/config';
Expand Down
2 changes: 1 addition & 1 deletion ads/google/a4a/utils.js
Expand Up @@ -28,7 +28,7 @@ import {getMode} from '../../../src/mode';
import {getOrCreateAdCid} from '../../../src/ad-cid';
import {getPageLayoutBoxBlocking} from '#core/dom/layout/page-layout-box';
import {getTimingDataSync} from '#service/variable-source';
import {internalRuntimeVersion} from '../../../src/internal-version';
import {internalRuntimeVersion} from '#core/mode';
import {parseJson} from '#core/types/object/json';
import {whenUpgradedToCustomElement} from '../../../src/amp-element-helpers';

Expand Down
2 changes: 0 additions & 2 deletions build-system/test-configs/dep-check-config.js
Expand Up @@ -104,7 +104,6 @@ exports.rules = [
'3p/**->src/mode.js',
'3p/**->src/core/types/object/json.js',
'3p/**->src/3p-frame-messaging.js',
'3p/**->src/internal-version.js',
'3p/polyfills.js->src/polyfills/math-sign.js',
'3p/polyfills.js->src/polyfills/object-assign.js',
'3p/polyfills.js->src/polyfills/object-values.js',
Expand Down Expand Up @@ -139,7 +138,6 @@ exports.rules = [
'ads/**->src/url.js',
'ads/**->src/core/dom/static-template.js',
'ads/**->src/core/dom/style.js',
'ads/**->src/internal-version.js',
// ads/google/a4a doesn't contain 3P ad code and should probably move
// somewhere else at some point
'ads/google/a4a/**->src/ad-cid.js',
Expand Down
2 changes: 1 addition & 1 deletion build-system/test-configs/forbidden-terms.js
Expand Up @@ -150,7 +150,7 @@ const forbiddenTermsGlobal = {
message:
'Do not use build constants directly. Instead, use the helpers in `#core/mode`.',
allowlist: [
'src/internal-version.js',
'src/core/mode/internal-runtime-version.js',
'src/core/mode/minified.js',
'src/core/mode/for-testing.js',
'build-system/compile/build-constants.js',
Expand Down
Expand Up @@ -26,7 +26,7 @@ import {getBinaryType, isExperimentOn} from '#experiments';
import {getFlexibleAdSlotData} from './flexible-ad-slot-utils';
import {getOrCreateAdCid} from '../../../src/ad-cid';
import {getPageLayoutBoxBlocking} from '#core/dom/layout/page-layout-box';
import {internalRuntimeVersion} from '../../../src/internal-version';
import {internalRuntimeVersion} from '#core/mode';
import {stringHash32} from '#core/types/string';

/** @type {string} */
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-addthis/0.1/amp-addthis.js
Expand Up @@ -66,7 +66,7 @@ import {
} from './addthis-utils/mode';
import {getOgImage} from './addthis-utils/meta';
import {getWidgetOverload} from './addthis-utils/get-widget-id-overloaded-with-json-for-anonymous-mode';
import {internalRuntimeVersion} from '../../../src/internal-version';
import {internalRuntimeVersion} from '#core/mode';
import {listen} from '../../../src/event-helper';
import {parseUrlDeprecated} from '../../../src/url';
import {setStyle} from '#core/dom/style';
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-analytics/0.1/iframe-transport.js
Expand Up @@ -19,7 +19,7 @@ import {createElementWithAttributes} from '#core/dom';
import {devAssert, user} from '../../../src/log';
import {getMode} from '../../../src/mode';
import {hasOwn} from '#core/types/object';
import {internalRuntimeVersion} from '../../../src/internal-version';
import {internalRuntimeVersion} from '#core/mode';
import {toggle} from '#core/dom/style';
import {urls} from '../../../src/config';

Expand Down
Expand Up @@ -28,7 +28,7 @@ import {dict} from '#core/types/object';
import {getMode} from '../../../src/mode';
import {getServicePromiseForDoc} from '../../../src/service-helpers';
import {getSourceOrigin} from '../../../src/url';
import {internalRuntimeVersion} from '../../../src/internal-version';
import {internalRuntimeVersion} from '#core/mode';
import {listenFor, postMessage} from '../../../src/iframe-helper';
import {loadPromise} from '../../../src/event-helper';
import {removeElement} from '#core/dom';
Expand Down
1 change: 1 addition & 0 deletions src/core/mode/index.js
Expand Up @@ -18,3 +18,4 @@ export {isFortesting} from './for-testing';
export {isLocalDev} from './local-dev';
export {isMinified} from './minified';
export {isTest} from './test';
export {internalRuntimeVersion} from './internal-runtime-version';
@@ -1,5 +1,5 @@
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
* Copyright 2021 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,4 +25,4 @@
*/
export function internalRuntimeVersion() {
return INTERNAL_RUNTIME_VERSION;
}
}
1 change: 0 additions & 1 deletion src/mode.js
Expand Up @@ -24,7 +24,6 @@ import {internalRuntimeVersion} from './internal-version';
* development: boolean,
* minified: boolean,
* test: boolean,
* log: (string|undefined),
* version: string,
* rtvVersion: string,
* runtime: (null|string|undefined),
Expand Down

0 comments on commit 86542de

Please sign in to comment.