Merge P2.2 part 2: remove the excluded packages and scrub internal names
This commit is contained in:
@@ -800,7 +800,6 @@ describe('Tauri Production Configuration', () => {
|
||||
'js-yaml': '4.3.1',
|
||||
'better-sqlite3': '12.6.2',
|
||||
'@huggingface/transformers': { sharp: '0.35.3' },
|
||||
next: '16.3.0',
|
||||
};
|
||||
|
||||
expect(manifest.engines?.node).toBe('^20.19.0 || >=22.12.0');
|
||||
@@ -821,7 +820,6 @@ describe('Tauri Production Configuration', () => {
|
||||
|
||||
const betterSqliteRanges = [
|
||||
'core',
|
||||
'hive-mind-core',
|
||||
'launcher',
|
||||
'marketplace',
|
||||
'server',
|
||||
@@ -1366,14 +1364,14 @@ describe('Tauri Production Configuration', () => {
|
||||
fixtureResources,
|
||||
'node_modules',
|
||||
'@waggle',
|
||||
'hive-mind-core',
|
||||
'core',
|
||||
'package.json',
|
||||
);
|
||||
const coreDistEntry = path.join(
|
||||
fixtureResources,
|
||||
'node_modules',
|
||||
'@waggle',
|
||||
'hive-mind-core',
|
||||
'core',
|
||||
'dist',
|
||||
'index.js',
|
||||
);
|
||||
@@ -1381,7 +1379,7 @@ describe('Tauri Production Configuration', () => {
|
||||
fs.writeFileSync(
|
||||
coreManifestPath,
|
||||
JSON.stringify({
|
||||
name: '@waggle/hive-mind-core',
|
||||
name: '@waggle/core',
|
||||
main,
|
||||
...(exports === undefined ? {} : { exports }),
|
||||
}),
|
||||
@@ -1683,14 +1681,14 @@ describe('Tauri Production Configuration', () => {
|
||||
);
|
||||
writeFixtureFile(
|
||||
path.join(fixtureResources, 'node_modules'),
|
||||
'@waggle/hive-mind-core/src/evolution-runs.ts',
|
||||
'export const proprietary = true;\n',
|
||||
'@waggle/core/src/private.ts',
|
||||
'export const privateSource = true;\n',
|
||||
);
|
||||
const hiveSourceDir = path.join(
|
||||
const coreSourceDir = path.join(
|
||||
fixtureResources,
|
||||
'node_modules',
|
||||
'@waggle',
|
||||
'hive-mind-core',
|
||||
'core',
|
||||
'src',
|
||||
);
|
||||
writeFixtureFile(
|
||||
@@ -1721,22 +1719,22 @@ describe('Tauri Production Configuration', () => {
|
||||
);
|
||||
const firstPartyReadme = writeFixtureFile(
|
||||
path.join(fixtureResources, 'node_modules'),
|
||||
'@waggle/hive-mind-core/README.md',
|
||||
'@waggle/core/README.md',
|
||||
'internal package documentation\n',
|
||||
);
|
||||
const disallowedPayloadResult = await runChecker();
|
||||
expect(disallowedPayloadResult.status).toBe(1);
|
||||
for (const diagnostic of [
|
||||
'resources/service.js.map must not be packaged',
|
||||
'resources/node_modules/@waggle/hive-mind-core/src/evolution-runs.ts must not be packaged',
|
||||
'resources/node_modules/@waggle/core/src/private.ts must not be packaged',
|
||||
'resources/node_modules/waggle-test-runtime/src/private.ts must not be packaged',
|
||||
'resources/node_modules/vendor/node_modules/@waggle/shared/src/private.ts must not be packaged',
|
||||
'resources/node_modules/@waggle/hive-mind-core/README.md is not a runtime package entry',
|
||||
'resources/node_modules/@waggle/core/README.md is not a runtime package entry',
|
||||
]) {
|
||||
expect(disallowedPayloadResult.stderr).toContain(diagnostic);
|
||||
}
|
||||
fs.rmSync(serviceMapPath);
|
||||
fs.rmSync(hiveSourceDir, { recursive: true });
|
||||
fs.rmSync(coreSourceDir, { recursive: true });
|
||||
fs.rmSync(unscopedSourceDir, { recursive: true });
|
||||
fs.rmSync(nestedVendorDir, { recursive: true });
|
||||
fs.rmSync(firstPartyReadme);
|
||||
@@ -1785,7 +1783,7 @@ describe('Tauri Production Configuration', () => {
|
||||
fixtureResources,
|
||||
'node_modules',
|
||||
'@waggle',
|
||||
'hive-mind-core',
|
||||
'core',
|
||||
'dist',
|
||||
'runtime-directory',
|
||||
);
|
||||
@@ -1834,7 +1832,7 @@ describe('Tauri Production Configuration', () => {
|
||||
const inlineMapResult = await runChecker();
|
||||
expect(inlineMapResult.status).toBe(1);
|
||||
expect(inlineMapResult.stderr).toContain(
|
||||
'resources/node_modules/@waggle/hive-mind-core/dist/index.js contains a sourceMappingURL directive',
|
||||
'resources/node_modules/@waggle/core/dist/index.js contains a sourceMappingURL directive',
|
||||
);
|
||||
expect(inlineMapResult.stderr).toContain(
|
||||
'resources/service.js contains a sourceMappingURL directive',
|
||||
@@ -2106,13 +2104,6 @@ describe('CI/CD Configuration', () => {
|
||||
const vendorPackage = JSON.parse(
|
||||
fs.readFileSync(path.join(ROOT, 'vendor', 'pptxgenjs', 'package.json'), 'utf-8'),
|
||||
) as { name?: string; version?: string };
|
||||
const workflow = parseYaml(fs.readFileSync(
|
||||
path.join(ROOT, '.github', 'workflows', 'hive-mind-cli-cross-platform.yml'),
|
||||
'utf-8',
|
||||
)) as {
|
||||
on?: { pull_request?: { paths?: string[] } };
|
||||
jobs?: Record<string, { steps?: Array<{ name?: string; run?: string }> }>;
|
||||
};
|
||||
const vaultTests = fs.readFileSync(
|
||||
path.join(ROOT, 'packages', 'core', 'tests', 'vault.test.ts'),
|
||||
'utf-8',
|
||||
@@ -2147,18 +2138,6 @@ describe('CI/CD Configuration', () => {
|
||||
});
|
||||
expect(vendorPackage).toMatchObject({ name: 'pptxgenjs', version: '4.0.1-waggle.0' });
|
||||
|
||||
const installStep = workflow.jobs?.['install-and-smoke']?.steps?.find(
|
||||
(step) => step.name === 'Install workspace deps',
|
||||
);
|
||||
expect(installStep?.run).toBe('npm ci');
|
||||
expect(workflow.on?.pull_request?.paths).toEqual(
|
||||
expect.arrayContaining([
|
||||
'vendor/pptxgenjs/**',
|
||||
'package.json',
|
||||
'package-lock.json',
|
||||
'.github/workflows/hive-mind-cli-cross-platform.yml',
|
||||
]),
|
||||
);
|
||||
expect(vaultTests).toMatch(
|
||||
/removes a pre-existing explicit Everyone allow ACE[\s\S]*?node_modules\/vite-node\/vite-node\.mjs[\s\S]*?'--config'[\s\S]*?probePath[\s\S]*?\r?\n\s*210_000,\r?\n\s*\);/,
|
||||
);
|
||||
@@ -4158,40 +4137,6 @@ Expect-Rejection {
|
||||
expect(workflow).toContain('stage-sidecar-deps');
|
||||
});
|
||||
|
||||
it('Windows desktop workflows verify isolated packaged hook lifecycles after staging', () => {
|
||||
const workflows = [
|
||||
{
|
||||
name: 'release.yml',
|
||||
windowsJob: ' build-windows-prebuilt:',
|
||||
nextJob: ' sign-windows:',
|
||||
},
|
||||
{
|
||||
name: 'tauri-build-pr.yml',
|
||||
windowsJob: ' verify-windows:',
|
||||
nextJob: ' verify-macos:',
|
||||
},
|
||||
];
|
||||
|
||||
for (const { name, windowsJob, nextJob } of workflows) {
|
||||
const workflow = fs.readFileSync(
|
||||
path.join(ROOT, '.github', 'workflows', name),
|
||||
'utf-8',
|
||||
);
|
||||
const windowsStart = workflow.indexOf(windowsJob);
|
||||
const nextStart = workflow.indexOf(nextJob, windowsStart);
|
||||
expect(windowsStart).toBeGreaterThanOrEqual(0);
|
||||
expect(nextStart).toBeGreaterThan(windowsStart);
|
||||
|
||||
const windowsSteps = workflow.slice(windowsStart, nextStart);
|
||||
const stageIndex = windowsSteps.indexOf('node scripts/stage-sidecar-deps.mjs');
|
||||
const lifecycleIndex = windowsSteps.indexOf('hook-packages-runtime.test.ts');
|
||||
expect(stageIndex).toBeGreaterThanOrEqual(0);
|
||||
expect(lifecycleIndex).toBeGreaterThan(stageIndex);
|
||||
expect(windowsSteps).toContain('WAGGLE_VERIFY_STAGED_HOOK_RUNTIME');
|
||||
expect(windowsSteps).toContain('runs staged Tauri hook lifecycles');
|
||||
}
|
||||
});
|
||||
|
||||
it('PR Windows workflow certifies the locally built NSIS lifecycle before upload', () => {
|
||||
const workflow = fs.readFileSync(
|
||||
path.join(ROOT, '.github', 'workflows', 'tauri-build-pr.yml'),
|
||||
|
||||
Reference in New Issue
Block a user