Skip to content

Commit 174983c

Browse files
committed
Add postinstall scripts to bundles
1 parent ed2beb0 commit 174983c

File tree

30 files changed

+92
-58
lines changed

30 files changed

+92
-58
lines changed

.github/actions/src/info/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface PackageRecord {
77
directory: string
88
name: string
99
changes: boolean
10+
needsPlaywright: boolean
1011
}
1112

1213
/**
@@ -40,12 +41,13 @@ async function findPackages(directory: string, maxDepth?: number) {
4041
if (item.isFile()) {
4142
if (item.name === 'package.json') {
4243
try {
43-
const { default: { name } } = await import(fullPath, { with: { type: 'json' }});
44+
const { default: { name, devDependencies } } = await import(fullPath, { with: { type: 'json' }});
4445
const changes = await checkForChanges(currentDir);
4546
yield {
4647
directory: currentDir,
4748
changes,
48-
name
49+
name,
50+
needsPlaywright: 'playwright' in devDependencies
4951
};
5052
return;
5153
} catch {}
@@ -90,6 +92,7 @@ async function main() {
9092
<ul>
9193
<li>Directory: <code>${packageInfo.directory}</code></li>
9294
<li>Changes: <code>${packageInfo.changes}</code></li>
95+
<li>Needs Playwright: <code>${packageInfo.needsPlaywright}</code></li>
9396
</ul>
9497
</div>`;
9598
});

.github/workflows/workflow-again.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ jobs:
4242
runs-on: ubuntu-latest
4343
needs: find-packages
4444
strategy:
45+
fail-fast: false
4546
matrix:
4647
tabInfo: ${{ fromJson(needs.find-packages.outputs.tabs) }}
4748

4849
steps:
4950
- name: Check out source code
50-
uses: actions/checkout@v4
51+
uses: actions/checkout@v4
5152

5253
- name: Enable Corepack
5354
run: corepack enable
@@ -70,3 +71,5 @@ jobs:
7071
cd ${{ matrix.tabInfo.directory }}
7172
yarn tsc
7273
yarn lint
74+
yarn playwright install --with-deps
75+
yarn test

src/bundles/ar/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"build": "buildtools build bundle .",
2020
"lint": "buildtools lint .",
2121
"tsc": "buildtools tsc .",
22-
"test": "buildtools test --project ."
22+
"test": "buildtools test --project .",
23+
"postinstall": "yarn tsc"
2324
}
24-
}
25+
}

src/bundles/arcade_2d/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"build": "buildtools build bundle .",
2020
"lint": "buildtools lint .",
2121
"tsc": "buildtools tsc .",
22-
"test": "buildtools test --project ."
22+
"test": "buildtools test --project .",
23+
"postinstall": "yarn tsc"
2324
}
2425
}

src/bundles/binary_tree/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"tsc": "buildtools tsc .",
1616
"build": "buildtools build bundle .",
1717
"lint": "buildtools lint .",
18-
"test": "buildtools test --project ."
18+
"test": "buildtools test --project .",
19+
"postinstall": "yarn tsc"
1920
}
20-
}
21+
}

src/bundles/communication/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"build": "buildtools build bundle .",
2121
"test": "buildtools test --project .",
2222
"tsc": "buildtools tsc .",
23-
"lint": "buildtools lint ."
23+
"lint": "buildtools lint .",
24+
"postinstall": "yarn tsc"
2425
}
25-
}
26+
}

src/bundles/copy_gc/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"tsc": "buildtools tsc .",
1616
"build": "buildtools build bundle .",
1717
"lint": "buildtools lint .",
18-
"test": "buildtools test --project ."
18+
"test": "buildtools test --project .",
19+
"postinstall": "yarn tsc"
1920
}
20-
}
21+
}

src/bundles/csg/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"tsc": "buildtools tsc .",
2222
"build": "buildtools build bundle .",
2323
"lint": "buildtools lint .",
24-
"test": "buildtools test --project ."
24+
"test": "buildtools test --project .",
25+
"postinstall": "yarn tsc"
2526
}
26-
}
27+
}

src/bundles/curve/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"lint": "buildtools lint .",
2222
"prepare": "yarn tsc",
2323
"test": "buildtools test --project .",
24-
"tsc": "buildtools tsc ."
24+
"tsc": "buildtools tsc .",
25+
"postinstall": "yarn tsc"
2526
}
26-
}
27+
}

src/bundles/game/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"tsc": "buildtools tsc .",
2020
"build": "buildtools build bundle .",
2121
"lint": "buildtools lint .",
22-
"test": "buildtools test --project ."
22+
"test": "buildtools test --project .",
23+
"postinstall": "yarn tsc"
2324
}
24-
}
25+
}

0 commit comments

Comments
 (0)