From 62913324551a020d7da50a349b5758bfb3f622b7 Mon Sep 17 00:00:00 2001 From: Blake Friedman Date: Thu, 24 Oct 2024 13:43:43 -0700 Subject: [PATCH] fix: mitigate DangerJS transpilation bug Danger seems to have a bug where it's not transpiling the import of @rnx-kit/rn-changelog-generator. This mitigates the issue to get our project back on track. Changelog: [internal] --- packages/react-native-bots/dangerfile.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/react-native-bots/dangerfile.js b/packages/react-native-bots/dangerfile.js index a3666548ea2fe5..b7704da189a251 100644 --- a/packages/react-native-bots/dangerfile.js +++ b/packages/react-native-bots/dangerfile.js @@ -8,9 +8,6 @@ */ 'use strict'; - -const {validate: validateChangelog} = - require('@rnx-kit/rn-changelog-generator').default; const {danger, fail, /*message,*/ warn} = require('danger'); const includes = require('lodash.includes'); @@ -60,7 +57,7 @@ if (!includesTestPlan && !isFromPhabricator) { // Check if there is a changelog and validate it if (!isFromPhabricator) { - const status = validateChangelog(danger.github.pr.body); + const status = require('@rnx-kit/rn-changelog-generator').default.validate(danger.github.pr.body); const changelogInstructions = 'See Changelog format'; if (status === 'missing') {