Skip to content

Commit cfe4dad

Browse files
authored
Merge pull request #255 from launchql/feat/pnpm
Feat/pnpm
2 parents 2df3130 + aba88fc commit cfe4dad

File tree

117 files changed

+13615
-11161
lines changed

Some content is hidden

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

117 files changed

+13615
-11161
lines changed

.github/workflows/run-tests.yaml

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
--health-interval 10s
4444
--health-timeout 5s
4545
--health-retries 5
46-
46+
4747
steps:
48-
# TODO remove deps on git config
48+
# TODO remove deps on git config
4949
- name: Configure Git (for tests)
5050
run: |
5151
git config --global user.name "CI Test User"
@@ -54,36 +54,38 @@ jobs:
5454
- name: checkout
5555
uses: actions/checkout@v4
5656

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

6065
- name: build
61-
run: yarn build
62-
63-
- name: fix lql permissions
64-
run: chmod +x node_modules/.bin/lql
66+
run: pnpm run build
6567

6668
- name: seed app_user
6769
run: |
68-
yarn lql admin-users bootstrap --yes
69-
yarn lql admin-users add --test --yes
70+
pnpm --filter @launchql/cli exec node dist/index.js admin-users bootstrap --yes
71+
pnpm --filter @launchql/cli exec node dist/index.js admin-users add --test --yes
7072
env:
7173
PGHOST: pg_db
7274
PGPORT: 5432
7375
PGUSER: postgres
7476
PGPASSWORD: password
7577

7678
- name: mime-bytes
77-
run: cd ./packages/mime-bytes && yarn test
79+
run: cd ./packages/mime-bytes && pnpm test
7880

7981
- name: launchql/core
80-
run: cd ./packages/core && yarn test
82+
run: cd ./packages/core && pnpm test
8183

8284
- name: launchql/cli
83-
run: cd ./packages/cli && yarn test
85+
run: cd ./packages/cli && pnpm test
8486

8587
- name: launchql/client
86-
run: cd ./packages/client && yarn test
88+
run: cd ./packages/client && pnpm test
8789
env:
8890
TEST_DATABASE_URL: postgres://postgres:password@pg_db:5432/postgres
8991

@@ -93,57 +95,57 @@ jobs:
9395
createdb graphile_test_db
9496
psql -f sql/test.sql graphile_test_db
9597
psql -f sql/roles.sql graphile_test_db
96-
yarn test
98+
pnpm test
9799
98100
- name: pgsql-test
99101
run: |
100102
cd ./packages/pgsql-test
101-
yarn test
103+
pnpm test
102104
103105
- name: launchql/orm
104-
run: cd ./packages/orm && yarn test
106+
run: cd ./packages/orm && pnpm test
105107

106108
- name: launchql/url-domains
107-
run: cd ./packages/url-domains && yarn test
109+
run: cd ./packages/url-domains && pnpm test
108110

109111
- name: launchql/uuid-hash
110-
run: cd ./packages/uuid-hash && yarn test
112+
run: cd ./packages/uuid-hash && pnpm test
111113

112114
- name: launchql/uuid-stream
113-
run: cd ./packages/uuid-stream && yarn test
115+
run: cd ./packages/uuid-stream && pnpm test
114116

115117
- name: launchql/introspectron
116-
run: cd ./packages/introspectron && yarn test
118+
run: cd ./packages/introspectron && pnpm test
117119

118120
- name: launchql/query-builder
119-
run: cd ./packages/query-builder && yarn test
121+
run: cd ./packages/query-builder && pnpm test
120122

121123
- name: launchql/query
122-
run: cd ./packages/query && yarn test
124+
run: cd ./packages/query && pnpm test
123125

124126
- name: launchql/launchql-gen
125-
run: cd ./packages/launchql-gen && yarn test
127+
run: cd ./packages/launchql-gen && pnpm test
126128

127129
- name: launchql/pg-ast
128-
run: cd ./packages/pg-ast && yarn test
130+
run: cd ./packages/pg-ast && pnpm test
129131

130132
- name: launchql/pg-codegen
131-
run: cd ./packages/pg-codegen && yarn test
133+
run: cd ./packages/pg-codegen && pnpm test
132134

133135
- name: launchql-gen
134-
run: cd ./packages/launchql-gen && yarn test
136+
run: cd ./packages/launchql-gen && pnpm test
135137

136138
- name: launchql/content-type-stream
137-
run: cd ./packages/content-type-stream && yarn test
139+
run: cd ./packages/content-type-stream && pnpm test
138140

139141
- name: launchql/s3-streamer
140-
run: cd ./packages/s3-streamer && yarn test
142+
run: cd ./packages/s3-streamer && pnpm test
141143
env:
142144
MINIO_ENDPOINT: http://minio_cdn:9000
143145
AWS_ACCESS_KEY: minioadmin
144146
AWS_SECRET_KEY: minioadmin
145147
AWS_REGION: us-east-1
146148
BUCKET_NAME: test-bucket
147-
149+
148150
- name: launchql/upload-names
149-
run: cd ./packages/upload-names && yarn test
151+
run: cd ./packages/upload-names && pnpm test

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
**/node_modules/
22
**/.DS_Store
33
**/dist
4-
**/yarn-error.log
4+
**/pnpm-debug.log
55
lerna-debug.log
66
.vscode
7-
ignore
7+
ignore
8+
packages/pgsql-test/output/

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

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ RUN set -eux; \
1616
ca-certificates curl git python3 make g++; \
1717
update-ca-certificates || true; \
1818
corepack enable; \
19-
corepack prepare [email protected] --activate; \
19+
corepack prepare [email protected] --activate; \
2020
rm -rf /var/lib/apt/lists/*
2121

2222
# Copy full repo (build context must be repo root when building this image)
2323
COPY . .
2424

2525
# Install and build all workspaces
2626
RUN set -eux; \
27-
yarn install --frozen-lockfile; \
28-
yarn build
27+
pnpm install --frozen-lockfile; \
28+
pnpm run build
2929

3030
################################################################################
3131
FROM ${BASE}:${BASE_VERSION} AS launchql
@@ -39,7 +39,7 @@ RUN set -eux; \
3939
apt-get install -y --no-install-recommends ca-certificates postgresql-client; \
4040
update-ca-certificates || true; \
4141
corepack enable; \
42-
corepack prepare [email protected] --activate; \
42+
corepack prepare [email protected] --activate; \
4343
rm -rf /var/lib/apt/lists/*
4444

4545
# Copy built repo from builder

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

0 commit comments

Comments
 (0)