mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-25 11:35:25 -07:00
chore(build): consolidate packaging inputs and build output layout (#299)
This commit is contained in:
1 parent
b0a8b6b3fc
commit
3549e0ed93
43 files changed
+195
-160
No files matched your search
@@ -4,6 +4,9 @@ import fs from 'node:fs/promises';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import {
|
||||
DEFAULT_MANIFEST_PATH,
|
||||
DEFAULT_PACKAGE_JSON_PATH,
|
||||
DEFAULT_RUNTIME_MANIFEST_PATH,
|
||||
downloadArchive,
|
||||
parseRegisteredRepositories,
|
||||
parseSourceManifest,
|
||||
@@ -67,10 +70,26 @@ describe('Bun corresponding-source manifest', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('default manifest paths resolve to aligned checked-in manifests', async () => {
|
||||
const [manifestText, runtimeManifestText, packageJsonText] = await Promise.all([
|
||||
fs.readFile(DEFAULT_MANIFEST_PATH, 'utf8'),
|
||||
fs.readFile(DEFAULT_RUNTIME_MANIFEST_PATH, 'utf8'),
|
||||
fs.readFile(DEFAULT_PACKAGE_JSON_PATH, 'utf8'),
|
||||
]);
|
||||
|
||||
expect(() =>
|
||||
validateRuntimeAlignment(
|
||||
parseSourceManifest(JSON.parse(manifestText)),
|
||||
JSON.parse(packageJsonText),
|
||||
JSON.parse(runtimeManifestText),
|
||||
),
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
test('rejects stale runtime or package-manager pins', async () => {
|
||||
const manifest = parseSourceManifest(
|
||||
JSON.parse(
|
||||
await fs.readFile(path.join(projectRoot, 'build/bun-source-manifest.json'), 'utf8'),
|
||||
await fs.readFile(path.join(projectRoot, 'packaging/bun/bun-source-manifest.json'), 'utf8'),
|
||||
),
|
||||
);
|
||||
const runtimeManifest = {
|
||||
@@ -100,7 +119,7 @@ describe('Bun corresponding-source manifest', () => {
|
||||
test('rejects drift in CMake dependency and WebKit pins', async () => {
|
||||
const manifest = parseSourceManifest(
|
||||
JSON.parse(
|
||||
await fs.readFile(path.join(projectRoot, 'build/bun-source-manifest.json'), 'utf8'),
|
||||
await fs.readFile(path.join(projectRoot, 'packaging/bun/bun-source-manifest.json'), 'utf8'),
|
||||
),
|
||||
);
|
||||
const registrations = manifest.sources
|
||||
|
||||
Reference in new issue
Block a user