Merge branch 'master' into worktree/remove-ignorable-session-events

This commit is contained in:
Tianyi Cui
2026-08-26 02:44:26 +08:00
committed by GitHub
47 changed files with 1174 additions and 121 deletions
@@ -4,6 +4,7 @@ import { describe, expect, it } from 'vitest'
import {
checkExperimentalDependencyIsolation,
checkExperimentalManifest,
expectedDshPackageFiles,
type WorkspaceManifest,
} from './check-workspace-constraints.ts'
@@ -74,3 +75,17 @@ describe('experimental workspace constraints', () => {
])
})
})
describe('package payload constraints', () => {
it('includes a declared profile patch without a package-name allowlist', () => {
expect(expectedDshPackageFiles({
name: '@deepseek-ai/dsh-private-profile',
dsh: { bundle: { patch: './cordis.patch.yml' } },
})).toEqual([
'lib/index.js',
'lib/invariant.js',
'cordis.patch.yml',
'lib/types/**/*.d.ts',
])
})
})
+1 -1
View File
@@ -174,7 +174,7 @@ function sameStringList(actual: readonly string[] | undefined, expected: readonl
return !!actual && actual.length === expected.length && actual.every((value, index) => value === expected[index])
}
function expectedDshPackageFiles(manifest: PackageManifest): readonly string[] {
export function expectedDshPackageFiles(manifest: PackageManifest): readonly string[] {
const declaredPatch = manifest.dsh?.bundle?.patch
const bundleFiles = declaredPatch === undefined ? [] : [declaredPatch.replace(/^\.\//, '')]
const extras = [