From 6db226e566652f339583e86fe676c1fb8d09300c Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Thu, 4 Apr 2024 11:59:02 +0400 Subject: [PATCH 1/3] Revert changes --- .../javascript/checkDeployBlockers/checkDeployBlockers.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/actions/javascript/checkDeployBlockers/checkDeployBlockers.js b/.github/actions/javascript/checkDeployBlockers/checkDeployBlockers.js index 919747a0410f..08e4857112f7 100644 --- a/.github/actions/javascript/checkDeployBlockers/checkDeployBlockers.js +++ b/.github/actions/javascript/checkDeployBlockers/checkDeployBlockers.js @@ -1,8 +1,6 @@ -// eslint-disable-next-line import/no-import-module-exports -import CONST from '@github/libs/CONST'; - const _ = require('underscore'); const core = require('@actions/core'); +const CONST = require('../../../libs/CONST'); const GithubUtils = require('../../../libs/GithubUtils'); const run = function () { @@ -71,4 +69,4 @@ if (require.main === module) { run(); } -export default run; +module.exports = run; From 3b15f9239709a048c25c2d7f883dbf9f0d2f40ef Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Thu, 4 Apr 2024 11:59:56 +0400 Subject: [PATCH 2/3] Update built output --- .../javascript/checkDeployBlockers/index.js | 82 +++---------------- 1 file changed, 12 insertions(+), 70 deletions(-) diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index ed02825b9ea5..fd6f7ddf20c0 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -5,20 +5,11 @@ /******/ var __webpack_modules__ = ({ /***/ 6265: -/***/ ((module, __webpack_exports__, __nccwpck_require__) => { - -"use strict"; -__nccwpck_require__.r(__webpack_exports__); -/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _github_libs_CONST__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(9873); -/* module decorator */ module = __nccwpck_require__.hmd(module); -// eslint-disable-next-line import/no-import-module-exports - +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const _ = __nccwpck_require__(5067); const core = __nccwpck_require__(2186); +const CONST = __nccwpck_require__(9873); const GithubUtils = __nccwpck_require__(9296); const run = function () { @@ -28,8 +19,8 @@ const run = function () { return GithubUtils.octokit.issues .get({ - owner: _github_libs_CONST__WEBPACK_IMPORTED_MODULE_0__["default"].GITHUB_OWNER, - repo: _github_libs_CONST__WEBPACK_IMPORTED_MODULE_0__["default"].APP_REPO, + owner: CONST.GITHUB_OWNER, + repo: CONST.APP_REPO, issue_number: issueNumber, }) .then(({data}) => { @@ -44,8 +35,8 @@ const run = function () { } return GithubUtils.octokit.issues.listComments({ - owner: _github_libs_CONST__WEBPACK_IMPORTED_MODULE_0__["default"].GITHUB_OWNER, - repo: _github_libs_CONST__WEBPACK_IMPORTED_MODULE_0__["default"].APP_REPO, + owner: CONST.GITHUB_OWNER, + repo: CONST.APP_REPO, issue_number: issueNumber, per_page: 100, }); @@ -83,11 +74,11 @@ const run = function () { }); }; -if (__nccwpck_require__.c[__nccwpck_require__.s] === module) { +if (require.main === require.cache[eval('__filename')]) { run(); } -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (run); +module.exports = run; /***/ }), @@ -14356,8 +14347,8 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"] /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { -/******/ id: moduleId, -/******/ loaded: false, +/******/ // no module.id needed +/******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ @@ -14370,70 +14361,21 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"] /******/ if(threw) delete __webpack_module_cache__[moduleId]; /******/ } /******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ -/******/ // expose the module cache -/******/ __nccwpck_require__.c = __webpack_module_cache__; -/******/ /************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/harmony module decorator */ -/******/ (() => { -/******/ __nccwpck_require__.hmd = (module) => { -/******/ module = Object.create(module); -/******/ if (!module.children) module.children = []; -/******/ Object.defineProperty(module, 'exports', { -/******/ enumerable: true, -/******/ set: () => { -/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id); -/******/ } -/******/ }); -/******/ return module; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nccwpck_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; /******/ /************************************************************************/ /******/ -/******/ // module cache are used so entry inlining is disabled /******/ // startup /******/ // Load entry module and return exports -/******/ var __webpack_exports__ = __nccwpck_require__(__nccwpck_require__.s = 6265); +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __nccwpck_require__(6265); /******/ module.exports = __webpack_exports__; /******/ /******/ })() From 094b66ab053a703f7a26c2792fe76b0300337809 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Thu, 4 Apr 2024 13:06:37 +0400 Subject: [PATCH 3/3] Fix core imports --- .../createOrUpdateStagingDeploy.ts | 2 +- .../createOrUpdateStagingDeploy/index.js | 27 ++++++++++++++-- .../getDeployPullRequestList.ts | 2 +- .../getDeployPullRequestList/index.js | 31 ++++++++++++++++--- 4 files changed, 54 insertions(+), 8 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.ts b/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.ts index fb706240e975..4ef4d565ffd1 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.ts +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.ts @@ -1,4 +1,4 @@ -import core from '@actions/core'; +import * as core from '@actions/core'; import format from 'date-fns/format'; import fs from 'fs'; import CONST from '@github/libs/CONST'; diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 992d6dcd9732..228ae24f4f62 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -14181,11 +14181,34 @@ function wrappy (fn, cb) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const core_1 = __importDefault(__nccwpck_require__(2186)); +const core = __importStar(__nccwpck_require__(2186)); const format_1 = __importDefault(__nccwpck_require__(2168)); const fs_1 = __importDefault(__nccwpck_require__(7147)); const CONST_1 = __importDefault(__nccwpck_require__(9873)); @@ -14299,7 +14322,7 @@ async function run() { } catch (err) { console.error('An unknown error occurred!', err); - core_1.default.setFailed(err); + core.setFailed(err); } } if (require.main === require.cache[eval('__filename')]) { diff --git a/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts b/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts index e814a10ca188..2ef789df76da 100644 --- a/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts +++ b/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts @@ -1,4 +1,4 @@ -import core from '@actions/core'; +import * as core from '@actions/core'; import github from '@actions/github'; import {getJSONInput} from '@github/libs/ActionUtils'; import GithubUtils from '@github/libs/GithubUtils'; diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index bac5ad33270d..3b845b6daa37 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -11470,18 +11470,41 @@ function wrappy (fn, cb) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const core_1 = __importDefault(__nccwpck_require__(2186)); +const core = __importStar(__nccwpck_require__(2186)); const github_1 = __importDefault(__nccwpck_require__(5438)); const ActionUtils_1 = __nccwpck_require__(6981); const GithubUtils_1 = __importDefault(__nccwpck_require__(9296)); const GitUtils_1 = __importDefault(__nccwpck_require__(1547)); async function run() { try { - const inputTag = core_1.default.getInput('TAG', { required: true }); + const inputTag = core.getInput('TAG', { required: true }); const isProductionDeploy = (0, ActionUtils_1.getJSONInput)('IS_PRODUCTION_DEPLOY', { required: false }, false); const deployEnv = isProductionDeploy ? 'production' : 'staging'; console.log(`Looking for PRs deployed to ${deployEnv} in ${inputTag}...`); @@ -11497,11 +11520,11 @@ async function run() { console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`); const prList = await GitUtils_1.default.getPullRequestsMergedBetween(priorTag ?? '', inputTag); console.log('Found the pull request list: ', prList); - core_1.default.setOutput('PR_LIST', prList); + core.setOutput('PR_LIST', prList); } catch (error) { console.error(error.message); - core_1.default.setFailed(error); + core.setFailed(error); } } if (require.main === require.cache[eval('__filename')]) {