Skip to content

Commit

Permalink
🏗 Partial updates for core devDependencies (#39759)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg authored Jan 25, 2024
1 parent 36fa762 commit 7ee5198
Show file tree
Hide file tree
Showing 5 changed files with 7,541 additions and 8,859 deletions.
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

0 comments on commit 7ee5198

Please sign in to comment.