Skip to content

Replace corepack with npm #1013

Open
Open
@int128

Description

@int128

https://github.com/search?q=user%3Aint128+%22corepack+enable+pnpm%22++NOT+is%3Aarchived&type=code

Script

migrate_corepack () {
  cd "$1"
  git fetch origin
  git checkout main
  git reset --hard origin/main
  perl -i -pne 's/corepack enable pnpm/npm install -g pnpm\@latest-10/g' .github/workflows/*
  perl -i -pne 's/"packageManager": "pnpm@9.+"/"packageManager": "pnpm\@10.1.0"/' package.json
  pnpm add -D [email protected]
  pnpm add -D @eslint/[email protected]
  git commit -a -m 'Replace corepack with npm'
  ghpc --body 'https://github.com/int128/typescript-action/issues/1013'
}

Prompt

Fix the workflows under .github/workflows as follows:

-      - run: corepack enable pnpm
+      - run: npm install -g pnpm@latest-10

Fix packageManager property of package.json:

-  "packageManager": "[email protected]"
+  "packageManager": "[email protected]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions