int128 / int128/typescript-action

Migrate to pnpm

Open
#746 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
13
Forks
2
Avg merge
2h 46m
Merged PRs (30d)
37

Description

migrate_pnpm () {
  perl -pi \
    -e 's/          cache: yarn/      - run: corepack enable pnpm/;' \
    -e 's/- run: yarn$/- run: pnpm i/;' \
    -e 's/- run: yarn build/- run: pnpm build/;' \
    -e 's/\s+- run: yarn package\s//;' \
    .github/workflows/release.yaml

  perl -pi \
    -e "s/- action.yaml/- '*.yaml'/;" \
    -e 's/          cache: yarn/      - run: corepack enable pnpm/;' \
    -e 's/- run: yarn$/- run: pnpm i/;' \
    -e 's/\s+- run: yarn package\s//;' \
    -e 's/- run: yarn /- run: pnpm /;' \
    .github/workflows/ts.yaml

  perl -pi \
    -e 's/\s+"main": .+\s//;' \
    -e 's/\s+"build": .+\s//;' \
    -e 's/\s+"format-check": .+\s//;' \
    -e 's/"package": .+/"build": "ncc build --source-map --license licenses.txt src\/main.ts",/;' \
    -e 's/"\@tsconfig\/node16": .+/"\@tsconfig\/node20": "20.1.2",/;' \
    package.json

  perl -pi \
    -e 's/node16/node20/;' \
    tsconfig.json

  rm yarn.lock
  rm -fr node_modules
  pnpm i
}

create_migration_pnpm () {
  git fom
  git cob pnpm
  migrate_pnpm
  git add .
  git ci -m 'Migrate to pnpm'
  ghpc --body 'https://github.com/int128/typescript-action/issues/746'
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .github/workflows/release.yaml, .github/workflows/ts.yaml, package.json, and tsconfig.json, using the migration commands in the issue as a checklist. Update the workflows and package configuration for pnpm and Node 20, remove yarn.lock, and verify the resulting installation and build succeed with pnpm.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
build-system, ci-cd
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.