Skip to content

Commit 88e58f2

Browse files
authored
Merge pull request #253 from hyperweb-io/pnpm
yarn -> pnpm
2 parents 91fbcb2 + 7755e02 commit 88e58f2

File tree

95 files changed

+13577
-10966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+13577
-10966
lines changed

.github/workflows/run-tests.yaml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,36 +54,44 @@ jobs:
5454
- name: checkout
5555
uses: actions/checkout@v4
5656

57+
- name: setup pnpm
58+
run: |
59+
corepack enable
60+
corepack prepare pnpm@9.12.1 --activate
61+
5762
- name: deps
58-
run: yarn
63+
run: pnpm install --frozen-lockfile
5964

6065
- name: build
61-
run: yarn build
66+
run: pnpm run build
6267

6368
- name: fix lql permissions
64-
run: chmod +x node_modules/.bin/lql
69+
run: |
70+
if [ -f node_modules/.bin/lql ]; then
71+
chmod +x node_modules/.bin/lql
72+
fi
6573
6674
- name: seed app_user
6775
run: |
68-
yarn lql admin-users bootstrap --yes
69-
yarn lql admin-users add --test --yes
76+
pnpm exec lql admin-users bootstrap --yes
77+
pnpm exec lql admin-users add --test --yes
7078
env:
7179
PGHOST: pg_db
7280
PGPORT: 5432
7381
PGUSER: postgres
7482
PGPASSWORD: password
7583

7684
- name: mime-bytes
77-
run: cd ./packages/mime-bytes && yarn test
85+
run: cd ./packages/mime-bytes && pnpm test
7886

7987
- name: launchql/core
80-
run: cd ./packages/core && yarn test
88+
run: cd ./packages/core && pnpm test
8189

8290
- name: launchql/cli
83-
run: cd ./packages/cli && yarn test
91+
run: cd ./packages/cli && pnpm test
8492

8593
- name: launchql/client
86-
run: cd ./packages/client && yarn test
94+
run: cd ./packages/client && pnpm test
8795
env:
8896
TEST_DATABASE_URL: postgres://postgres:password@pg_db:5432/postgres
8997

@@ -93,51 +101,51 @@ jobs:
93101
createdb graphile_test_db
94102
psql -f sql/test.sql graphile_test_db
95103
psql -f sql/roles.sql graphile_test_db
96-
yarn test
104+
pnpm test
97105
98106
- name: pgsql-test
99107
run: |
100108
cd ./packages/pgsql-test
101-
yarn test
109+
pnpm test
102110
103111
- name: launchql/orm
104-
run: cd ./packages/orm && yarn test
112+
run: cd ./packages/orm && pnpm test
105113

106114
- name: launchql/url-domains
107-
run: cd ./packages/url-domains && yarn test
115+
run: cd ./packages/url-domains && pnpm test
108116

109117
- name: launchql/uuid-hash
110-
run: cd ./packages/uuid-hash && yarn test
118+
run: cd ./packages/uuid-hash && pnpm test
111119

112120
- name: launchql/uuid-stream
113-
run: cd ./packages/uuid-stream && yarn test
121+
run: cd ./packages/uuid-stream && pnpm test
114122

115123
- name: launchql/introspectron
116-
run: cd ./packages/introspectron && yarn test
124+
run: cd ./packages/introspectron && pnpm test
117125

118126
- name: launchql/query-builder
119-
run: cd ./packages/query-builder && yarn test
127+
run: cd ./packages/query-builder && pnpm test
120128

121129
- name: launchql/query
122-
run: cd ./packages/query && yarn test
130+
run: cd ./packages/query && pnpm test
123131

124132
- name: launchql/launchql-gen
125-
run: cd ./packages/launchql-gen && yarn test
133+
run: cd ./packages/launchql-gen && pnpm test
126134

127135
- name: launchql/pg-ast
128-
run: cd ./packages/pg-ast && yarn test
136+
run: cd ./packages/pg-ast && pnpm test
129137

130138
- name: launchql/pg-codegen
131-
run: cd ./packages/pg-codegen && yarn test
139+
run: cd ./packages/pg-codegen && pnpm test
132140

133141
- name: launchql-gen
134-
run: cd ./packages/launchql-gen && yarn test
142+
run: cd ./packages/launchql-gen && pnpm test
135143

136144
- name: launchql/content-type-stream
137-
run: cd ./packages/content-type-stream && yarn test
145+
run: cd ./packages/content-type-stream && pnpm test
138146

139147
- name: launchql/s3-streamer
140-
run: cd ./packages/s3-streamer && yarn test
148+
run: cd ./packages/s3-streamer && pnpm test
141149
env:
142150
MINIO_ENDPOINT: http://minio_cdn:9000
143151
AWS_ACCESS_KEY: minioadmin
@@ -146,4 +154,4 @@ jobs:
146154
BUCKET_NAME: test-bucket
147155

148156
- name: launchql/upload-names
149-
run: cd ./packages/upload-names && yarn test
157+
run: cd ./packages/upload-names && pnpm test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
**/node_modules/
22
**/.DS_Store
33
**/dist
4-
**/yarn-error.log
4+
**/pnpm-debug.log
55
lerna-debug.log
66
.vscode
77
ignore

DEVELOPMENT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ docker exec postgres /sql-bin/install.sh
2020
Then you can run
2121

2222
```sh
23-
yarn
24-
yarn build
23+
pnpm install
24+
pnpm run build
2525
```
2626

2727
Then to run a test:
2828

2929
```sh
3030
cd packages/core
31-
yarn test
31+
pnpm test
3232
```
3333

GRAPHQL_ISSUES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The following packages now have GraphQL resolutions set to `15.5.2`:
4444

4545
## Why Resolutions Aren't Sufficient
4646

47-
Yarn's `resolutions` field doesn't always override peer dependency requirements. When packages have conflicting peer dependency ranges, Node.js can still load multiple versions of GraphQL, causing the "duplicate modules" error.
47+
pnpm's `overrides` field does not always override peer dependency requirements. When packages have conflicting peer dependency ranges, Node.js can still load multiple versions of GraphQL, causing the "duplicate modules" error.
4848

4949
## Investigation Findings
5050

@@ -63,7 +63,7 @@ Yarn's `resolutions` field doesn't always override peer dependency requirements.
6363
1. **Downgrade graphql-upload**: From `15.0.2` to `13.0.0` (supports GraphQL 15.5.2)
6464
2. **Handle @pyramation/postgis**: Add to overrides or find alternative package
6565
3. **Add overrides field**: Stronger enforcement than resolutions
66-
4. **Clean install**: Remove node_modules and yarn.lock, reinstall
66+
4. **Clean install**: Remove node_modules and pnpm-lock.yaml, then reinstall with `pnpm install`
6767

6868
### Option 2: Upgrade GraphQL (Higher Risk)
6969
- Upgrade to GraphQL 16.x to satisfy `graphql-upload`

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ ssh:
1414
docker exec -it postgres /bin/bash
1515

1616
roles:
17-
yarn lql admin-users bootstrap --yes
18-
yarn lql admin-users add --test --yes
17+
pnpm exec lql admin-users bootstrap --yes
18+
pnpm exec lql admin-users add --test --yes
1919

2020
install:
2121
docker exec postgres /sql-bin/install.sh

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ await proj.deploy(
3636
- [ ] DB_CWD, db.cwd ???? in types/src
3737

3838

39-
- [ ] pnpm instead of yarn
39+
- [x] switch package management to pnpm
4040
- [ ] Add tests for pg-ast
4141
- [ ] bring back csv-to-pg
4242
- [ ] bootstrap-roles.sql and any other "bootstrap" can be included in actual code for onboarding

__fixtures__/kitchen-sink/.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ before_install:
2929
- while ! docker exec -it postgritty pg_isready -U postgres -h 127.0.0.1; do echo "$(date) - waiting for database to start"; sleep 1; done
3030
script:
3131
- cd $PACKAGE
32-
- yarn install
33-
- yarn test
32+
- pnpm install
33+
- pnpm test

__fixtures__/kitchen-sink/md.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ cd packages/myfirstmodule
8282
skitch maketest
8383
```
8484

85-
Then you can use `jest` via `yarn` to test your logic.
85+
Then you can use `jest` via `pnpm` to test your logic.
8686

8787
```sh
88-
yarn test:watch
88+
pnpm test:watch
8989
```
9090

9191
## what's different
@@ -124,7 +124,7 @@ utility
124124
You can install an npm module and then bundle it for `plv8`
125125

126126
```sh
127-
yarn add my-awesome-npm-module
127+
pnpm add my-awesome-npm-module
128128
skitch bundle my-awesome-npm-module awesomeThing
129129
```
130130

__fixtures__/kitchen-sink/shellscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fi
88

99

1010

11-
find . -name yarn.lock | grep -v node_modules | xargs rm
11+
find . -name pnpm-lock.yaml | grep -v node_modules | xargs rm
1212
git add .
1313
git commit -am "$1"
1414
lerna publish

__fixtures__/sqitch/simple-w-tags/packages/my-first/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"copy": "copyfiles -f ../../LICENSE README.md package.json dist",
2424
"clean": "rimraf dist/**",
2525
"prepare": "npm run build",
26-
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
27-
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
26+
"build": "npm run clean; tsc -p tsconfig.json; tsc -p tsconfig.esm.json; npm run copy",
27+
"build:dev": "npm run clean; tsc -p tsconfig.json --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
2828
"lint": "eslint . --fix",
2929
"test": "jest",
3030
"test:watch": "jest --watch"

0 commit comments

Comments
 (0)