From efa389e7f24a7dca7c14b1bea81a755bb9af407c Mon Sep 17 00:00:00 2001 From: ryu <114303361+ryuapp@users.noreply.github.com> Date: Fri, 28 Jun 2024 05:45:29 +0900 Subject: [PATCH] chore: update CI (#54) --- .github/workflows/ci.yml | 6 ++++-- src/index.ts | 9 +++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6378cea..2b35967 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,13 +10,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x, 20.x] + node-version: [18.x, 20.x, 22.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: yarn install --frozen-lockfile + - run: yarn format + - run: yarn lint - run: yarn test - run: yarn build diff --git a/src/index.ts b/src/index.ts index d2551f6..8779754 100644 --- a/src/index.ts +++ b/src/index.ts @@ -146,9 +146,9 @@ async function main() { }`, ) } - + const packageJsonPath = path.join(targetDirectoryPath, 'package.json') - + if (fs.existsSync(packageJsonPath)) { const packageJson = fs.readFileSync(packageJsonPath, 'utf-8') @@ -158,10 +158,7 @@ async function main() { ...packageJsonParsed, } - fs.writeFileSync( - packageJsonPath, - JSON.stringify(newPackageJson, null, 2), - ) + fs.writeFileSync(packageJsonPath, JSON.stringify(newPackageJson, null, 2)) } console.log(chalk.green('🎉 ' + chalk.bold('Copied project files')))