Skip to content

Commit

Permalink
use pnpm instead of yarn (#1758)
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l authored May 3, 2023
1 parent fae7fbb commit 1088ff3
Show file tree
Hide file tree
Showing 322 changed files with 28,739 additions and 17,985 deletions.
7 changes: 4 additions & 3 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool
that works with multi-package repos, or single-package repos to help you version and publish your
code. You can find the full documentation for it
[in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ about: Create a bug report to help us improve

### Issue workflow progress

_Progress of the issue based on the [Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow)_
_Progress of the issue based on the
[Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow)_

- [ ] 1. The issue provides a [minimal reproduction](https://en.wikipedia.org/wiki/Minimal_reproducible_example) available on [Stackblitz](https://stackblitz.com/fork/node).
- [ ] 1. The issue provides a
[minimal reproduction](https://en.wikipedia.org/wiki/Minimal_reproducible_example) available on
[Stackblitz](https://stackblitz.com/fork/node).
- _Please install the latest `@envelop/*` packages that you are using._
- _Please make sure the reproduction is as small as possible._
- [ ] 2. A failing test has been provided
Expand All @@ -20,8 +23,7 @@ _Progress of the issue based on the [Contributor Workflow](https://github.com/th

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
Steps to reproduce the behavior:
**To Reproduce** Steps to reproduce the behavior:

**Expected behavior**

Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ blank_issues_enabled: false
contact_links:
- name: Have a question?
url: https://github.com/n1ru4l/envelop/discussions/new
about: Not sure about something? need help from the community? have a question to our team? please ask and answer questions here.
about:
Not sure about something? need help from the community? have a question to our team? please
ask and answer questions here.
22 changes: 15 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
🚨 **IMPORTANT: Please do not create a Pull Request without creating an issue first.**

_Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request._
_Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of
the pull request._

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Please include a summary of the change and which issue is fixed. Please also include relevant
motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Expand All @@ -14,16 +16,19 @@ Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as
expected)
- [ ] This change requires a documentation update

## Screenshots/Sandbox (if appropriate/relevant):

Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate
Adding links to sandbox or providing screenshots can help us understand more about this PR and take
action on it as appropriate

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please describe the tests that you ran to verify your changes. Provide instructions so we can
reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B
Expand All @@ -36,7 +41,9 @@ Please describe the tests that you ran to verify your changes. Provide instructi

## Checklist:

- [ ] I have followed the [CONTRIBUTING](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) doc and the style guidelines of this project
- [ ] I have followed the
[CONTRIBUTING](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) doc and the
style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented on my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
Expand All @@ -47,4 +54,5 @@ Please describe the tests that you ran to verify your changes. Provide instructi

## Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
If this is a relatively large or complex change, kick off the discussion by explaining why you chose
the solution you did and what alternatives you considered, etc...
32 changes: 10 additions & 22 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node
uses: actions/setup-node@master
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
node-version: 17

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache Yarn
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-17-16-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-17-16-yarn-
- name: Install Dependencies using Yarn
run: yarn install --ignore-engines && git checkout yarn.lock
nodeVersion: 17
packageManager: 'pnpm'

- name: Build
run: yarn build
run: pnpm run build

- name: Setup K6
run: |
Expand All @@ -45,8 +31,10 @@ jobs:
- name: GraphQL API
run: |
yarn loadtest:start-server &
yarn wait-on tcp:3000
pnpm run loadtest:start-server &
pnpm wait-on tcp:3000
- name: Run Benchmark
run: k6 -e GITHUB_PR=${{ github.event.number }} -e GITHUB_SHA=${{ github.sha }} -e GITHUB_TOKEN=${{secrets.GH_API_TOKEN}} -e GRAPHQL_HOSTNAME="[::1]" run ./benchmark/k6.js
run:
k6 -e GITHUB_PR=${{ github.event.number }} -e GITHUB_SHA=${{ github.sha }} -e
GITHUB_TOKEN=${{secrets.GH_API_TOKEN}} -e GRAPHQL_HOSTNAME="[::1]" run ./benchmark/k6.js
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
with:
installDependencies: true
packageManager: yarn
packageManager: pnpm
nodeVersion: 18
preCommit: 'yarn prettier'
preCommit: 'pnpm run prettier'
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}

Expand Down Expand Up @@ -44,5 +44,6 @@ jobs:
with:
domain: https://www.the-guild.dev/graphql/envelop/
source: 'Envelop'
packageManager: 'pnpm'
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
with:
releaseScript: release
nodeVersion: 18
packageManager: 'pnpm'
secrets:
githubToken: ${{ secrets.GUILD_BOT_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
Expand All @@ -22,3 +23,4 @@ jobs:
with:
domain: https://www.the-guild.dev/graphql/envelop/
source: 'Envelop'
packageManager: 'pnpm'
41 changes: 27 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ jobs:
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 17
packageManager: 'pnpm'
- name: Lint Prettier
run: yarn lint:prettier
run: pnpm run lint:prettier

lint:
name: Lint
uses: the-guild-org/shared-config/.github/workflows/lint.yml@main
with:
script: yarn ci:lint
script: pnpm run ci:lint
nodeVersion: 17
packageManager: 'pnpm'
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -40,12 +43,13 @@ jobs:
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
packageManager: 'pnpm'
- name: Use GraphQL v${{matrix.graphql_version}}
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
- name: Install Dependencies using Yarn
run: yarn install --ignore-engines && git checkout yarn.lock
- name: Install Dependencies using pnpm
run: pnpm install --no-frozen-lockfile && git checkout pnpm-lock.yaml
- name: Build
run: yarn ts:check
run: pnpm run ts:check

unit:
name: Unit Test
Expand All @@ -60,20 +64,25 @@ jobs:
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
packageManager: 'pnpm'
- name: Install Dependencies
run: yarn install --ignore-engines && git checkout yarn.lock
run: pnpm install --no-frozen-lockfile && git checkout pnpm-lock.yaml
- name: Cache Jest
uses: actions/cache@v3
with:
path: .cache/jest
key: ${{ runner.os }}-${{matrix.node-version}}-${{matrix.graphql_version}}-jest-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*.patch') }}
key:
${{ runner.os }}-${{matrix.node-version}}-${{matrix.graphql_version}}-jest-${{
hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('patches/*.patch') }}
- name: Test
run: yarn test
run: pnpm run test
env:
CI: true

core:
name: Core Test / ${{matrix.os}} / node v${{matrix.node-version}} / graphql v${{matrix.graphql_version}}
name:
Core Test / ${{matrix.os}} / node v${{matrix.node-version}} / graphql
v${{matrix.graphql_version}}
runs-on: ${{matrix.os}}
strategy:
matrix:
Expand All @@ -87,17 +96,20 @@ jobs:
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: ${{ matrix.node-version }}
packageManager: 'pnpm'
- name: Use GraphQL v${{matrix.graphql_version}}
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
- name: Install Dependencies
run: yarn install --ignore-engines && git checkout yarn.lock
run: pnpm install --no-frozen-lockfile && git checkout pnpm-lock.yaml
- name: Cache Jest
uses: actions/cache@v3
with:
path: .cache/jest
key: ${{ runner.os }}-${{matrix.node-version}}-${{matrix.graphql_version}}-jest-${{ hashFiles('yarn.lock') }}-${{ hashFiles('patches/*.patch') }}
key:
${{ runner.os }}-${{matrix.node-version}}-${{matrix.graphql_version}}-jest-${{
hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('patches/*.patch') }}
- name: Test Core
run: yarn test:core --ci
run: pnpm run test:core --ci
env:
CI: true

Expand All @@ -111,7 +123,8 @@ jobs:
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: 18
packageManager: 'pnpm'
- name: Build Packages
run: yarn build
run: pnpm run build
- name: Test ESM & CJS exports integrity
run: yarn bob check
run: pnpm bob check
12 changes: 7 additions & 5 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:
jobs:
deployment:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
if:
github.event.pull_request.head.repo.full_name == github.repository || github.event_name ==
'push'
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -22,19 +24,19 @@ jobs:
name: setup env
with:
nodeVersion: 18
packageManager: yarn

packageManager: pnpm
- uses: the-guild-org/shared-config/website-cf@main
name: build and deploy website
env:
NEXT_BASE_PATH: ${{ github.ref == 'refs/heads/main' && '/graphql/envelop' || '' }}
SITE_URL: ${{ github.ref == 'refs/heads/main' && 'https://the-guild.dev/graphql/envelop' || '' }}
SITE_URL:
${{ github.ref == 'refs/heads/main' && 'https://the-guild.dev/graphql/envelop' || '' }}
with:
cloudflareApiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflareAccountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: envelop
prId: ${{ github.event.pull_request.number }}
websiteDirectory: ./
buildScript: cd website && yarn build && yarn next export
buildScript: cd website && pnpm run build && pnpm next export
artifactDir: website/out
Loading

0 comments on commit 1088ff3

Please sign in to comment.