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

🏗 Partial updates for core devDependencies #39759

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ module.exports = function ({types: t}) {
return {
name: 'amp-story-supported-languages',
visitor: {
// Ignore 'ReferencedIdentifier' does not exist in type 'Visitor<PluginPass>'.
// The tests prove that this type of visitor works with the current
// version of babel we use.
// @ts-ignore
ReferencedIdentifier(path) {
if (path.get('name').node !== 'AMP_STORY_SUPPORTED_LANGUAGES') {
if (path.node.name !== 'AMP_STORY_SUPPORTED_LANGUAGES') {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function (babel) {

/**
* @param {object} replacements
* @return {babel.Node}
* @return {babel.types.Statement}
*/
function buildWrapper(replacements) {
if (!wrapperTemplate) {
Expand All @@ -44,7 +44,7 @@ module.exports = function (babel) {

/**
* @param {babel.NodePath<import('@babel/types').Program>} path
* @param {babel.Node} wrapper
* @param {babel.types.Statement} wrapper
*/
function injectWrapper(path, wrapper) {
const {body, directives} = path.node;
Expand Down
2 changes: 1 addition & 1 deletion build-system/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function getExperimentConfig(experiment) {
config?.name &&
config?.define_experiment_constant &&
config?.expiration_date_utc &&
new Number(new Date(config.expiration_date_utc)) >= Date.now();
Number(new Date(config.expiration_date_utc)) >= Date.now();
return valid ? config : null;
}

Expand Down
Loading
Loading