fix(ci): satisfy client script quality gates

This commit is contained in:
imccyu
2026-08-18 02:07:09 +08:00
parent 3c2d2d3cc9
commit d9ea5da2ff
2 changed files with 6 additions and 4 deletions
@@ -91,7 +91,7 @@ function bench(
describe('Cordis plugin face', () => {
it('rejects activation before the HTML facade creates the module system', () => {
expect(() => apply(new Context())).toThrow('createClientModuleSystem must run before plugin boot')
expect(() => { apply(new Context()) }).toThrow('createClientModuleSystem must run before plugin boot')
})
})
+5 -3
View File
@@ -102,10 +102,12 @@ function importCarriesRuntimeValue(node: ts.ImportDeclaration): boolean {
const clause = node.importClause
if (clause === undefined) return true
if (clause.phaseModifier === ts.SyntaxKind.TypeKeyword) return false
if (clause.name !== undefined) return true
const bindings = clause.namedBindings
if (bindings === undefined || ts.isNamespaceImport(bindings)) return true
return bindings.elements.length === 0 || bindings.elements.some(element => !element.isTypeOnly)
return clause.name !== undefined
|| bindings === undefined
|| ts.isNamespaceImport(bindings)
|| bindings.elements.length === 0
|| bindings.elements.some(element => !element.isTypeOnly)
}
function exportCarriesRuntimeValue(node: ts.ExportDeclaration): boolean {