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')))