Skip to content

Commit

Permalink
Migrate to pnpm (#890)
Browse files Browse the repository at this point in the history
* Migrate to pnpm

* Update workflows

* Fix
  • Loading branch information
int128 authored Mar 2, 2024
1 parent ea1e503 commit 6103676
Show file tree
Hide file tree
Showing 7 changed files with 5,748 additions and 6,317 deletions.
3 changes: 2 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": [
"github>int128/renovate-base",
"github>int128/typescript-action-renovate-config"
"github>int128/typescript-action-renovate-config#v1.5.0",
"helpers:pinGitHubActionDigests",
]
}
16 changes: 9 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ on:
jobs:
tag:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: yarn
- run: yarn
- run: yarn build
- run: yarn package
- uses: int128/release-typescript-action@v1
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm build
- uses: int128/release-typescript-action@f057c1399c41e922268a3d9036966d74e8341a15 # v1.28.0
50 changes: 28 additions & 22 deletions .github/workflows/ts.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
name: ts

on:
push:
branches: [main]
pull_request:
paths:
- src/**
- tests/**
- '*.json'
- action.yaml
- '*.yaml'
- .github/workflows/ts.yaml
pull_request:
branches: [main]
push:
branches:
- main
paths:
- src/**
- tests/**
- '*.json'
- action.yaml
- '*.yaml'
- .github/workflows/ts.yaml

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: yarn
- run: yarn
- run: yarn lint
- run: yarn format-check
- run: yarn test
- run: yarn build
- run: yarn package
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm test
- run: pnpm build

- if: github.event_name == 'pull_request'
uses: actions/github-script@v7
Expand Down Expand Up @@ -77,13 +78,18 @@ jobs:
generate:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: yarn
- run: yarn
- run: yarn format
- run: yarn graphql-codegen
- uses: int128/update-generated-files-action@v2
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm lint --fix
- run: pnpm format
- run: pnpm graphql-codegen
- uses: int128/update-generated-files-action@1bf39f3aec4afa88c0c7060cdb0d88332c052991 # v2.48.0
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"private": true,
"main": "lib/src/main.js",
"scripts": {
"build": "tsc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint **/*.ts",
"package": "ncc build --source-map --license licenses.txt",
"build": "ncc build --source-map --license licenses.txt src/main.ts",
"test": "jest",
"graphql-codegen": "graphql-codegen --config graphql-codegen.yaml",
"check": "yarn graphql-codegen && yarn format && yarn lint && yarn test"
Expand All @@ -22,7 +19,7 @@
"@graphql-codegen/typescript": "4.0.6",
"@graphql-codegen/typescript-operations": "4.2.0",
"@octokit/graphql-schema": "14.58.0",
"@tsconfig/node16": "16.1.1",
"@tsconfig/node20": "20.1.2",
"@types/jest": "29.5.12",
"@types/node": "20.11.24",
"@typescript-eslint/eslint-plugin": "7.1.0",
Expand Down
Loading

0 comments on commit 6103676

Please sign in to comment.