Skip to content

Commit ef6e84e

Browse files
authored
Transpile packages (#30)
* Use Next 13.1 transpilePackages * Fix lockfile * Fixup config * Trim down runtime deps and remove @next/swc * Updates to node modules caching * Fix caching of runtime deps modules
1 parent 993d52a commit ef6e84e

File tree

11 files changed

+678
-1484
lines changed

11 files changed

+678
-1484
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ on:
1010
# New versions are deployed with `deploy` build
1111
push:
1212
branches: [ main ]
13+
paths:
14+
- '**'
15+
- '!**/README.md'
1316
pull_request:
1417
branches: [ main ]
15-
# release:
16-
# types: [published]
18+
paths:
19+
- '**'
20+
- '!**/README.md'
1721

1822
env:
1923
# This is used by the SharedProps to detect a PR build
@@ -66,15 +70,15 @@ jobs:
6670
with:
6771
node-version: 16
6872

69-
# https://www.jonathan-wilkinson.com/github-actions-cache-everything
7073
- name: Cache Node Modules
7174
id: cache-node-modules
7275
uses: actions/cache@v3
7376
with:
7477
path: |
7578
node_modules
7679
packages/**/node_modules
77-
key: node-modules-${{ hashFiles('package.json', '**/package-lock.json') }}
80+
!node_modules/.cache
81+
key: node-modules-${{ hashFiles('package.json', 'package-lock.json') }}
7882

7983
- name: Install Dependencies
8084
if: steps.cache-node-modules.outputs.cache-hit != 'true'

.github/workflows/jsii.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ name: JSII Build
88
on:
99
push:
1010
branches: [ main ]
11+
paths:
12+
- '**'
13+
- '!**/README.md'
1114
pull_request:
1215
branches: [ main ]
16+
paths:
17+
- '**'
18+
- '!**/README.md'
1319

1420
env:
1521
# This is used by the SharedProps to detect a PR build

.github/workflows/pr-closed.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99

1010
workflow_dispatch:
1111

12-
1312
env:
1413
PR_NUMBER: ${{ github.event.pull_request.number }}
1514
NODE_ENV: prod

.github/workflows/r_build-app.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ jobs:
3737
with:
3838
node-version: 16
3939

40-
# https://www.jonathan-wilkinson.com/github-actions-cache-everything
4140
- name: Cache Node Modules
4241
id: cache-node-modules
4342
uses: actions/cache@v3
4443
with:
4544
path: |
4645
node_modules
4746
packages/**/node_modules
48-
key: node-modules-${{ hashFiles('package.json', '**/package-lock.json') }}
47+
!node_modules/.cache
48+
key: node-modules-${{ hashFiles('package.json', 'package-lock.json') }}
4949

5050
- name: Install Dependencies
5151
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@@ -112,8 +112,17 @@ jobs:
112112
run: |
113113
npm run build:entry
114114
115+
- name: Cache Runtime Node Modules
116+
id: cache-runtime-node-modules
117+
uses: actions/cache@v3
118+
with:
119+
path: |
120+
packages/app-entry/runtime-deps/node_modules
121+
!packages/app-entry/runtime-deps/node_modules/.cache
122+
key: node-modules-${{ hashFiles('packages/app-entry/runtime-deps/package.json', 'packages/app-entry/runtime-deps/package-lock.json') }}
123+
115124
- name: Install Runtime Deps for Rollup
116-
if: steps.cache-node-modules.outputs.cache-hit != 'true'
125+
if: steps.cache-runtime-node-modules.outputs.cache-hit != 'true'
117126
working-directory: packages/app-entry/runtime-deps/
118127
run: |
119128
npm ci --omit=dev

.github/workflows/r_version.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ jobs:
4545
with:
4646
node-version: 16
4747

48+
- name: Cache Node Modules
49+
id: cache-node-modules
50+
uses: actions/cache@v3
51+
with:
52+
path: |
53+
node_modules
54+
packages/**/node_modules
55+
!node_modules/.cache
56+
key: node-modules-${{ hashFiles('package.json', 'package-lock.json') }}
57+
58+
- name: Install Dependencies
59+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
60+
run: npm ci
61+
4862
# Use the tagged version as NPM package version for releases.
4963
# This will cause versions to be deployed matching the tag on dev/qa/prod
5064
# when a release is created from main.

0 commit comments

Comments
 (0)