Skip to content

Commit e8e4aa9

Browse files
committed
Merge remote-tracking branch 'origin/master' into chore/optional-chaining-compliance
2 parents d731fae + 0801b85 commit e8e4aa9

376 files changed

Lines changed: 16259 additions & 7003 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.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Build docs
2+
description: Sets up Node.js and builds the documentation
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- uses: ./.github/actions/setup-node
8+
with:
9+
working-directory: ./docs
10+
11+
- run: pnpm run build
12+
shell: bash
13+
working-directory: ./docs
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Setup Node.js with pnpm
2+
description: Sets up pnpm, Node.js with caching, and installs dependencies
3+
4+
inputs:
5+
node-version:
6+
description: Node.js version
7+
required: false
8+
default: "24"
9+
working-directory:
10+
description: Working directory
11+
required: false
12+
download-build:
13+
description: Download build artifact
14+
required: false
15+
default: "false"
16+
17+
runs:
18+
using: composite
19+
steps:
20+
- uses: pnpm/action-setup@v5
21+
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version: ${{ inputs.node-version }}
25+
cache: pnpm
26+
27+
- run: pnpm install --frozen-lockfile
28+
shell: bash
29+
working-directory: ${{ inputs.working-directory || '.' }}
30+
31+
- uses: actions/download-artifact@v8
32+
if: inputs.download-build == 'true'
33+
with:
34+
name: build
35+
path: build/

‎.github/workflows/deploy-docs-cloudflare-pages.yml‎

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,14 @@ concurrency:
1515
jobs:
1616
deploy:
1717
runs-on: ubuntu-latest
18-
name: Deploy Docs
1918
permissions:
2019
contents: read
2120
deployments: write
2221
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v6
22+
- uses: actions/checkout@v6
23+
- uses: ./.github/actions/build-docs
2524

26-
- name: Setup pnpm
27-
uses: pnpm/action-setup@v4
28-
29-
- name: Setup Node.js
30-
uses: actions/setup-node@v6
31-
with:
32-
node-version: 20
33-
cache: pnpm
34-
cache-dependency-path: docs/pnpm-lock.yaml
35-
36-
- name: Install dependencies
37-
working-directory: ./docs
38-
run: pnpm install --frozen-lockfile
39-
40-
- name: Build docs
41-
working-directory: ./docs
42-
run: pnpm run build
43-
44-
- name: Deploy to Cloudflare Pages
45-
uses: cloudflare/wrangler-action@v3
25+
- uses: cloudflare/wrangler-action@v3
4626
with:
4727
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4828
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

‎.github/workflows/mutation-test.yml‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,8 @@ jobs:
4444
4545
steps:
4646
- uses: actions/checkout@v6
47-
- uses: pnpm/action-setup@v4
48-
- uses: actions/setup-node@v6
49-
with:
50-
node-version: 24
51-
cache: "pnpm"
52-
- run: pnpm install
47+
- uses: ./.github/actions/setup-node
48+
5349
- run: |
5450
jq 'map(select(.type | IN($ARGS.positional[])))' \
5551
ormconfig.sample.json \
@@ -60,6 +56,7 @@ jobs:
6056
"postgres" \
6157
"sqljs" \
6258
> ormconfig.json
59+
6360
- run: pnpm exec stryker run
6461
env:
6562
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

‎.github/workflows/preview.yml‎

Lines changed: 55 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,74 @@ on:
44
pull_request:
55
paths:
66
- .github/workflows/preview.yml
7+
# core
78
- src/**
89
- gulpfile.ts
910
- package.json
10-
- tsconfig.json
11-
- tsconfig.browser.json
12-
- tsconfig.node.json
11+
- tsconfig*.json
12+
# codemod
13+
- packages/codemod/src/**
14+
- packages/codemod/package.json
15+
- packages/codemod/tsconfig*.json
1316

1417
concurrency:
1518
group: ${{ github.workflow }}-${{ github.ref }}
1619
cancel-in-progress: true
1720

1821
jobs:
19-
release:
20-
name: Release preview build
22+
detect-changes:
2123
runs-on: ubuntu-latest
24+
outputs:
25+
changes: ${{ steps.detect-changes.outputs.changes }}
26+
steps:
27+
- uses: actions/checkout@v6
28+
- uses: dorny/paths-filter@v4
29+
id: detect-changes
30+
with:
31+
filters: |
32+
ci: &ci
33+
- .github/workflows/preview.yml
34+
35+
typeorm:
36+
- *ci
37+
- src/**
38+
- gulpfile.ts
39+
- package.json
40+
- tsconfig*.json
41+
42+
codemod:
43+
- *ci
44+
- packages/codemod/**
2245
46+
preview:
47+
needs: detect-changes
48+
if: needs.detect-changes.outputs.changes != '[]'
49+
runs-on: ubuntu-latest
2350
steps:
2451
- uses: actions/checkout@v6
2552
with:
2653
fetch-depth: 0
27-
- uses: pnpm/action-setup@v4
28-
- uses: actions/setup-node@v6
29-
with:
30-
node-version: 20
31-
cache: "pnpm"
54+
- uses: ./.github/actions/setup-node
55+
56+
# typeorm
57+
- name: build typeorm
58+
if: contains(needs.detect-changes.outputs.changes, 'typeorm')
59+
run: |
60+
pnpm run package
61+
echo "PACKAGES=./build/package" >> "$GITHUB_ENV"
62+
63+
# @typeorm/codemod
64+
- name: install codemod
65+
if: contains(needs.detect-changes.outputs.changes, 'codemod')
66+
run: pnpm install --frozen-lockfile
67+
working-directory: packages/codemod
68+
69+
- name: build codemod
70+
if: contains(needs.detect-changes.outputs.changes, 'codemod')
71+
run: |
72+
pnpm run build
73+
echo "PACKAGES=${{ env.PACKAGES }} ./packages/codemod" >> "$GITHUB_ENV"
74+
working-directory: packages/codemod
3275

33-
- run: pnpm install
34-
- run: pnpm run package
35-
- run: pnpm run publish:preview
76+
# publish
77+
- run: pnpm exec pkg-pr-new publish ${{ env.PACKAGES }} --template='./sample/playground'

‎.github/workflows/publish-package.yml‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
with:
9898
ref: ${{ matrix.ref || github.ref }}
9999

100-
- uses: pnpm/action-setup@v4
100+
- uses: pnpm/action-setup@v5
101101

102102
- name: Check if there are new commits since last publish (nightly) or if it's a release
103103
id: publishable
@@ -163,7 +163,29 @@ jobs:
163163
pnpm version "${BASE}-nightly.$(date -u +%Y%m%d)" --no-git-tag-version --allow-same-version
164164
working-directory: build/package
165165

166-
- name: Publish
166+
- name: Publish typeorm
167167
if: steps.publishable.outputs.should_publish == 'true'
168168
run: pnpm publish --provenance --access public --no-git-checks --tag "${{ steps.publishable.outputs.tag }}"
169169
working-directory: build/package
170+
171+
- name: Install @typeorm/codemod dependencies
172+
if: steps.publishable.outputs.should_publish == 'true' && matrix.ref != 'v0.3'
173+
run: pnpm install --frozen-lockfile
174+
working-directory: packages/codemod
175+
176+
- name: Build @typeorm/codemod
177+
if: steps.publishable.outputs.should_publish == 'true' && matrix.ref != 'v0.3'
178+
run: pnpm run build
179+
working-directory: packages/codemod
180+
181+
- name: Set codemod nightly version
182+
if: steps.publishable.outputs.should_publish == 'true' && matrix.target != 'release' && matrix.ref != 'v0.3'
183+
run: |
184+
BASE=$(node -p "require('./package.json').version.replace(/-.*/, '')")
185+
pnpm version "${BASE}-nightly.$(date -u +%Y%m%d)" --no-git-tag-version --allow-same-version
186+
working-directory: packages/codemod
187+
188+
- name: Publish @typeorm/codemod
189+
if: steps.publishable.outputs.should_publish == 'true' && matrix.ref != 'v0.3'
190+
run: pnpm publish --provenance --access public --no-git-checks --tag "${{ steps.publishable.outputs.tag }}"
191+
working-directory: packages/codemod

0 commit comments

Comments
 (0)