@@ -53250,7 +53250,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
5325053250const core = __importStar(__nccwpck_require__(6108));
5325153251const exec_1 = __nccwpck_require__(9629);
5325253252const read_1 = __importDefault(__nccwpck_require__(1746));
53253- const fs_extra_1 = __importDefault (__nccwpck_require__(77));
53253+ const fs = __importStar (__nccwpck_require__(77));
5325453254const resolve_from_1 = __importDefault(__nccwpck_require__(1345));
5325553255const apis_1 = __importDefault(__nccwpck_require__(6500));
5325653256const utils_1 = __nccwpck_require__(3927);
@@ -53301,7 +53301,7 @@ function main() {
5330153301 // publish 스크립트에 태그를 붙여줍니다.
5330253302 const npmTag = core.getInput('npm_tag');
5330353303 const rootPackageJsonPath = `package.json`;
53304- const rootPackageJson = JSON.parse(fs_extra_1.default .readFileSync(rootPackageJsonPath, 'utf8'));
53304+ const rootPackageJson = JSON.parse(fs .readFileSync(rootPackageJsonPath, 'utf8'));
5330553305 for (const [key, script] of Object.entries(rootPackageJson.scripts)) {
5330653306 if (script.includes('changeset publish')) {
5330753307 // 카나리배포는 태그를 남기지 않습니다
@@ -53314,14 +53314,14 @@ function main() {
5331453314 }
5331553315 }
5331653316 }
53317- fs_extra_1.default .writeFileSync(rootPackageJsonPath, JSON.stringify(rootPackageJson, null, 2), 'utf8');
53317+ fs .writeFileSync(rootPackageJsonPath, JSON.stringify(rootPackageJson, null, 2), 'utf8');
5331853318 // 변경된 패키지들의 버전을 강제로 치환합니다
5331953319 changedPackageInfos.forEach((packageJsonPath) => {
53320- const packageJson = JSON.parse(fs_extra_1.default .readFileSync(packageJsonPath, 'utf8'));
53320+ const packageJson = JSON.parse(fs .readFileSync(packageJsonPath, 'utf8'));
5332153321 const newVersion = `${packageJson.version}-${npmTag}-${pullRequestInfo.head.sha.slice(0, 7)}`;
5332253322 core.info(`✅ [${packageJson.name}] 이전 버전: ${packageJson.version} / 😘 새로운 버전: ${newVersion}`);
5332353323 packageJson.version = newVersion;
53324- fs_extra_1.default .writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
53324+ fs .writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
5332553325 });
5332653326 // 변경된 버전으로 카나리 배포
5332753327 const publishScript = core.getInput('publish_script');
@@ -53397,7 +53397,7 @@ exports.protectUnchangedPackages = protectUnchangedPackages;
5339753397exports.removeChangesetMdFiles = removeChangesetMdFiles;
5339853398const core = __importStar(__nccwpck_require__(6108));
5339953399const fast_glob_1 = __importDefault(__nccwpck_require__(6014));
53400- const fs_extra_1 = __importDefault (__nccwpck_require__(77));
53400+ const fs = __importStar (__nccwpck_require__(77));
5340153401const utils_1 = __nccwpck_require__(3927);
5340253402function getChangedPackages(_a) {
5340353403 return __awaiter(this, arguments, void 0, function* ({ changedFiles, packagesDir, excludes, }) {
@@ -53434,10 +53434,10 @@ function protectUnchangedPackages(changedPackages) {
5343453434 const allPackageJSON = yield getAllPackageJSON();
5343553435 for (const packageJsonPath of allPackageJSON) {
5343653436 if (!changedPackages.includes(packageJsonPath)) {
53437- const packageJson = JSON.parse(fs_extra_1.default .readFileSync(packageJsonPath, 'utf8'));
53437+ const packageJson = JSON.parse(fs .readFileSync(packageJsonPath, 'utf8'));
5343853438 core.info(`🔨 [${packageJson.name}] private:true 를 추가합니다`);
5343953439 packageJson.private = true;
53440- fs_extra_1.default .writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
53440+ fs .writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
5344153441 }
5344253442 }
5344353443 });
@@ -53448,7 +53448,7 @@ function removeChangesetMdFiles(_a) {
5344853448 return Promise.all(markdownPaths.map((markdownPath) => __awaiter(this, void 0, void 0, function* () {
5344953449 if (changedFiles.find(({ filename }) => filename === markdownPath) == null) {
5345053450 console.log(`PR과 관련없는 ${markdownPath} 제거`); // eslint-disable-line
53451- yield fs_extra_1.default .remove(markdownPath);
53451+ yield fs .remove(markdownPath);
5345253452 }
5345353453 })));
5345453454 });
@@ -53494,20 +53494,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
5349453494 step((generator = generator.apply(thisArg, _arguments || [])).next());
5349553495 });
5349653496};
53497- var __importDefault = (this && this.__importDefault) || function (mod) {
53498- return (mod && mod.__esModule) ? mod : { "default": mod };
53499- };
5350053497Object.defineProperty(exports, "__esModule", ({ value: true }));
5350153498exports.setNpmRc = setNpmRc;
5350253499const core = __importStar(__nccwpck_require__(6108));
53503- const fs_extra_1 = __importDefault (__nccwpck_require__(77));
53500+ const fs = __importStar (__nccwpck_require__(77));
5350453501function setNpmRc() {
5350553502 return __awaiter(this, void 0, void 0, function* () {
5350653503 core.info('No changesets found, attempting to publish any unpublished packages to npm');
5350753504 const userNpmrcPath = `${process.env.HOME}/.npmrc`;
53508- if (fs_extra_1.default .existsSync(userNpmrcPath)) {
53505+ if (fs .existsSync(userNpmrcPath)) {
5350953506 core.info('Found existing user .npmrc file');
53510- const userNpmrcContent = yield fs_extra_1.default .readFile(userNpmrcPath, 'utf8');
53507+ const userNpmrcContent = yield fs .readFile(userNpmrcPath, 'utf8');
5351153508 const authLine = userNpmrcContent.split('\n').find((line) => {
5351253509 // check based on https://github.com/npm/cli/blob/8f8f71e4dd5ee66b3b17888faad5a7bf6c657eed/test/lib/adduser.js#L103-L105
5351353510 return /^\s*\/\/registry\.npmjs\.org\/:[_-]authToken=/i.test(line);
@@ -53517,12 +53514,12 @@ function setNpmRc() {
5351753514 }
5351853515 else {
5351953516 core.info("Didn't find existing auth token for the npm registry in the user .npmrc file, creating one");
53520- fs_extra_1.default .appendFileSync(userNpmrcPath, `\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}\n`);
53517+ fs .appendFileSync(userNpmrcPath, `\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}\n`);
5352153518 }
5352253519 }
5352353520 else {
5352453521 core.info('No user .npmrc file found, creating one');
53525- fs_extra_1.default .writeFileSync(userNpmrcPath, `//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}\n`);
53522+ fs .writeFileSync(userNpmrcPath, `//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}\n`);
5352653523 }
5352753524 });
5352853525}
0 commit comments