Skip to content

Commit 9583001

Browse files
authored
ref: Use fossilize for Node SEA builds (#703)
1 parent bb7a499 commit 9583001

File tree

9 files changed

+337
-389
lines changed

9 files changed

+337
-389
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ jobs:
3737
node-version-file: 'package.json'
3838
cache: 'pnpm'
3939

40+
- name: Fossilize Cache
41+
uses: actions/cache@v4
42+
with:
43+
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
44+
restore-keys: pnpm-
45+
path: |
46+
${{ github.workspace }}/packages/spotlight/.node-cache
47+
4048
- name: Setup NPM dependencies
4149
run: pnpm install
4250

@@ -55,7 +63,6 @@ jobs:
5563
5664
- name: Build packages
5765
env:
58-
BUILD_PLATFORMS: 'linux-x64,linux-arm64,win-x64,darwin-x64,darwin-arm64'
5966
APPLE_CERT_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
6067
APPLE_TEAM_ID: ${{ secrets.TEAMID }}
6168
run: pnpm build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dist-ssr
1717
test-results
1818

1919
.eslintcache
20+
.node-cache
2021

2122
# Editor directories and files
2223
.vscode/*

packages/spotlight/build.js

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

packages/spotlight/entitlements.plist

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

packages/spotlight/import-meta-url.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/spotlight/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"scripts": {
88
"start": "./bin/run.js",
99
"dev": "vite build --watch",
10-
"build": "vite build && vite build --config vite.overlay.config.ts && ./build.js && tsc",
10+
"build:sea": "fossilize --sign -m dist/overlay/manifest.json -p linux-x64 -p linux-arm64 -p win-x64 -p darwin-x64 -p darwin-arm64",
11+
"build": "vite build && vite build --config vite.overlay.config.ts && npm run build:sea && tsc",
1112
"build:watch": "vite build --watch",
1213
"yalc:publish": "yalc publish --push --sig --private",
1314
"clean": "rimraf dist"
@@ -51,7 +52,7 @@
5152
"devDependencies": {
5253
"@spotlightjs/tsconfig": "workspace:*",
5354
"@types/node": "^18.19.55",
54-
"esbuild": "^0.24.0",
55+
"fossilize": "^0.2.2",
5556
"typescript": "^5.6.2",
5657
"vite": "^5.4.12"
5758
},

packages/website/astro.config.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import starlight from '@astrojs/starlight';
22
import tailwind from '@astrojs/tailwind';
33
import vercelStatic from '@astrojs/vercel/static';
44
import sentry from '@sentry/astro';
5-
import spotlight from '@spotlightjs/astro';
65
import { defineConfig } from 'astro/config';
76
import Inspect from 'vite-plugin-inspect';
87

@@ -32,9 +31,6 @@ export default defineConfig({
3231
authToken: process.env.SENTRY_AUTH_TOKEN,
3332
},
3433
}),
35-
spotlight({
36-
debug: true,
37-
}),
3834
starlight({
3935
title: 'Spotlight',
4036
logo: {

packages/website/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"@astrojs/vercel": "^7.8.1",
2121
"@fontsource/raleway": "^5.1.0",
2222
"@sentry/astro": "^8.49.0",
23-
"@spotlightjs/astro": "workspace:*",
2423
"@types/react": "^18.3.11",
2524
"@types/react-dom": "^18.3.0",
2625
"astro": "^4.16.18",

0 commit comments

Comments
 (0)