Skip to content

Commit 7725494

Browse files
committed
Merge branch 'main' into feat/graphql-subscription
2 parents 78e950d + 5ab5857 commit 7725494

129 files changed

Lines changed: 6349 additions & 3726 deletions

File tree

Some content is hidden

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

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up pnpm
1818
uses: pnpm/action-setup@v4
1919
with:
20-
version: 9.14.0
20+
version: 9.15.0
2121

2222
- name: Set up Node.js
2323
uses: actions/setup-node@v4
@@ -52,7 +52,7 @@ jobs:
5252
- name: Set up pnpm
5353
uses: pnpm/action-setup@v4
5454
with:
55-
version: 9.14.0
55+
version: 9.15.0
5656

5757
- name: Set up Node.js
5858
uses: actions/setup-node@v4
@@ -88,7 +88,7 @@ jobs:
8888
- name: Set up pnpm
8989
uses: pnpm/action-setup@v4
9090
with:
91-
version: 9.14.0
91+
version: 9.15.0
9292

9393
- name: Set up Node.js
9494
uses: actions/setup-node@v4
@@ -108,7 +108,7 @@ jobs:
108108
run: pnpm install
109109

110110
- name: Install Playwright browsers
111-
run: pnpm exec playwright install
111+
run: pnpm exec playwright install chromium --with-deps --only-shell
112112

113113
- name: Unit tests
114114
run: pnpm test:unit
@@ -124,7 +124,7 @@ jobs:
124124
- name: Set up pnpm
125125
uses: pnpm/action-setup@v4
126126
with:
127-
version: 9.14.0
127+
version: 9.15.0
128128

129129
- name: Set up Node.js
130130
uses: actions/setup-node@v4
@@ -157,7 +157,7 @@ jobs:
157157
- name: Set up pnpm
158158
uses: pnpm/action-setup@v4
159159
with:
160-
version: 9.14.0
160+
version: 9.15.0
161161

162162
- name: Set up Node.js
163163
uses: actions/setup-node@v4
@@ -190,7 +190,7 @@ jobs:
190190
- name: Set up pnpm
191191
uses: pnpm/action-setup@v4
192192
with:
193-
version: 9.14.0
193+
version: 9.15.0
194194

195195
- name: Set up Node.js
196196
uses: actions/setup-node@v4
@@ -215,7 +215,7 @@ jobs:
215215
- name: Set up pnpm
216216
uses: pnpm/action-setup@v4
217217
with:
218-
version: 9.14.0
218+
version: 9.15.0
219219

220220
- name: Set up Node.js
221221
uses: actions/setup-node@v4
@@ -235,7 +235,7 @@ jobs:
235235
run: pnpm install
236236

237237
- name: Playwright install
238-
run: pnpm exec playwright install --with-deps chromium
238+
run: pnpm exec playwright install chromium --with-deps --only-shell
239239

240240
- name: Browser tests
241241
run: pnpm test:browser
@@ -258,7 +258,7 @@ jobs:
258258
- name: Set up pnpm
259259
uses: pnpm/action-setup@v4
260260
with:
261-
version: 9.14.0
261+
version: 9.15.0
262262

263263
- name: Set up Node.js
264264
uses: actions/setup-node@v4

.github/workflows/compat.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
- name: Set up pnpm
2323
uses: pnpm/action-setup@v4
2424
with:
25-
version: 9.14.0
25+
version: 9.15.0
2626

2727
- name: Install dependencies
2828
run: pnpm install
2929

3030
- name: Install Playwright browsers
31-
run: pnpm exec playwright install
31+
run: pnpm exec playwright install chromium --with-deps --only-shell
3232

3333
- name: Build
3434
run: pnpm build
@@ -66,7 +66,7 @@ jobs:
6666

6767
- uses: pnpm/action-setup@v4
6868
with:
69-
version: 9.14.0
69+
version: 9.15.0
7070

7171
- name: Install dependencies
7272
run: pnpm install

.github/workflows/release-preview.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: release-preview
22

33
on:
4-
pull_request:
54
push:
65
branches-ignore:
76
- 'main'
@@ -24,13 +23,13 @@ jobs:
2423
- name: Set up pnpm
2524
uses: pnpm/action-setup@v4
2625
with:
27-
version: 9.14.0
26+
version: 9.15.0
2827

2928
- name: Install dependencies
3029
run: pnpm install
3130

3231
- name: Install Playwright browsers
33-
run: pnpm exec playwright install
32+
run: pnpm exec playwright install chromium --with-deps --only-shell
3433

3534
- name: Lint
3635
run: pnpm lint

.github/workflows/release.yml

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,30 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
release:
9+
build:
1010
runs-on: macos-latest
11-
permissions:
12-
contents: read
13-
id-token: write
1411
steps:
1512
- name: Checkout
1613
uses: actions/checkout@v4
1714
with:
18-
fetch-depth: 0
1915
token: ${{ secrets.GH_ADMIN_TOKEN }}
2016

21-
- name: Set up Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version: 20
25-
always-auth: true
26-
registry-url: https://registry.npmjs.org
27-
2817
- name: Set up pnpm
2918
uses: pnpm/action-setup@v4
3019
with:
31-
version: 9.14.0
20+
version: 9.15.0
3221

33-
- name: Setup Git
34-
run: |
35-
git config --local user.name "Artem Zakharchenko"
36-
git config --local user.email "kettanaito@gmail.com"
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: 'pnpm'
3727

3828
- name: Install dependencies
3929
run: pnpm install
4030

4131
- name: Install Playwright browsers
42-
run: pnpm exec playwright install
32+
run: pnpm exec playwright install chromium --with-deps --only-shell
4333

4434
- name: Lint
4535
run: pnpm lint
@@ -50,8 +40,52 @@ jobs:
5040
- name: Tests
5141
run: pnpm test
5242

43+
- name: Upload build artifacts
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: build-artifacts
47+
path: ./lib
48+
49+
release:
50+
needs: [build]
51+
runs-on: macos-latest
52+
permissions:
53+
contents: read
54+
id-token: write
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v4
58+
with:
59+
fetch-depth: 0
60+
token: ${{ secrets.GH_ADMIN_TOKEN }}
61+
62+
- name: Set up pnpm
63+
uses: pnpm/action-setup@v4
64+
with:
65+
version: 9.15.0
66+
67+
- name: Set up Node.js
68+
uses: actions/setup-node@v4
69+
with:
70+
# Trusted Publishing only works on Node.js v24.
71+
node-version: 24
72+
cache: 'pnpm'
73+
74+
- name: Setup Git
75+
run: |
76+
git config --local user.name "Artem Zakharchenko"
77+
git config --local user.email "kettanaito@gmail.com"
78+
79+
- name: Install dependencies
80+
run: pnpm install
81+
82+
- name: Download build artifacts
83+
uses: actions/download-artifact@v4
84+
with:
85+
name: build-artifacts
86+
path: ./lib
87+
5388
- name: Release
5489
run: pnpm release
5590
env:
5691
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
57-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/smoke-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up pnpm
2626
uses: pnpm/action-setup@v4
2727
with:
28-
version: 9.14.0
28+
version: 9.15.0
2929

3030
- name: Install dependencies
3131
run: pnpm install

.github/workflows/typescript-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set up pnpm
4848
uses: pnpm/action-setup@v4
4949
with:
50-
version: 9.14.0
50+
version: 9.15.0
5151

5252
- name: Install dependencies
5353
run: pnpm install

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20
1+
v20

config/copyServiceWorker.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from 'node:fs'
22
import path from 'node:path'
3-
import { until } from '@open-draft/until'
3+
import { until } from 'until-async'
44

55
/**
66
* Copies the given Service Worker source file into the destination.
@@ -11,20 +11,23 @@ export default async function copyServiceWorker(
1111
destFilePath: string,
1212
checksum: string,
1313
): Promise<void> {
14+
// eslint-disable-next-line no-console
1415
console.log('Compiling Service Worker...')
1516

16-
const readFileResult = await until(() =>
17+
const [readFileError, readFileResult] = await until(() =>
1718
fs.promises.readFile(sourceFilePath, 'utf8'),
1819
)
1920

20-
if (readFileResult.error) {
21+
if (readFileError) {
2122
throw new Error('Failed to read file.\n${readError.message}')
2223
}
2324

2425
const destFileDirectory = path.dirname(destFilePath)
26+
// eslint-disable-next-line no-console
2527
console.log('Checking if "%s" path exists...', destFileDirectory)
2628

2729
if (!fs.existsSync(destFileDirectory)) {
30+
// eslint-disable-next-line no-console
2831
console.log('Destination directory does not exist, creating...')
2932
await fs.promises.mkdir(destFileDirectory, { recursive: true })
3033
}
@@ -33,17 +36,18 @@ export default async function copyServiceWorker(
3336
fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8'),
3437
)
3538

36-
const nextFileContent = readFileResult.data
39+
const nextFileContent = readFileResult
3740
.replace('<INTEGRITY_CHECKSUM>', checksum)
3841
.replace('<PACKAGE_VERSION>', packageJson.version)
3942

40-
const writeFileResult = await until(() =>
43+
const [writeFileError] = await until(() =>
4144
fs.promises.writeFile(destFilePath, nextFileContent),
4245
)
4346

44-
if (writeFileResult.error) {
45-
throw new Error(`Failed to write file.\n${writeFileResult.error.message}`)
47+
if (writeFileError) {
48+
throw new Error(`Failed to write file.\n${writeFileError.message}`)
4649
}
4750

51+
// eslint-disable-next-line no-console
4852
console.log('Service Worker copied to: %s', destFilePath)
4953
}

0 commit comments

Comments
 (0)