Skip to content

Commit 2c4b0ca

Browse files
tonyxiaoclaude
andcommitted
Fix conformance.test.ts: correct packages path and relax publishConfig.bin check
- Fix ../../packages → ../packages (e2e/ and packages/ are siblings at repo root) - Allow bin → .js directly without publishConfig.bin (connector packages already point bin to dist/bin.js, making publishConfig.bin redundant) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
1 parent 4b03040 commit 2c4b0ca

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

e2e/conformance.test.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
destinationTestSpec,
1111
} from '@stripe/sync-engine'
1212

13-
const packagesDir = resolve(import.meta.dirname, '../../packages')
13+
const packagesDir = resolve(import.meta.dirname, '../packages')
1414
const packageDirs = readdirSync(packagesDir, { withFileTypes: true })
1515
.filter((d) => d.isDirectory())
1616
.map((d) => d.name)
@@ -166,15 +166,20 @@ describe.each(connectorDirs)('connector bin: %s', (dir) => {
166166
expect(typeof pkg.bin).toBe('object')
167167
const binPaths = Object.values(pkg.bin!)
168168
expect(binPaths.length).toBeGreaterThan(0)
169-
// Dev bin points to .ts source; publishConfig.bin points to .js dist
170-
for (const p of binPaths) {
171-
expect(p).toMatch(/\.(js|ts)$/)
172-
}
173-
// publishConfig.bin must exist and point to .js
174169
const publishBin = pkg.publishConfig?.bin as Record<string, string> | undefined
175-
expect(publishBin, 'publishConfig.bin should exist').toBeDefined()
176-
for (const p of Object.values(publishBin!)) {
177-
expect(p).toMatch(/\.js$/)
170+
if (publishBin) {
171+
// Two-field pattern: bin → .ts source, publishConfig.bin → .js dist
172+
for (const p of binPaths) {
173+
expect(p).toMatch(/\.(js|ts)$/)
174+
}
175+
for (const p of Object.values(publishBin)) {
176+
expect(p).toMatch(/\.js$/)
177+
}
178+
} else {
179+
// Single-field pattern: bin already points to .js dist
180+
for (const p of binPaths) {
181+
expect(p, `bin path "${p}" should point to a .js file`).toMatch(/\.js$/)
182+
}
178183
}
179184
})
180185

0 commit comments

Comments
 (0)