|
8 | 8 |
|
9 | 9 | import { join, resolve } from 'node:path'; |
10 | 10 | import { toPosixPath } from '../../../utils/path'; |
| 11 | +import type { |
| 12 | + BundleResult, |
| 13 | + NormalizedEntryPoint, |
| 14 | + NormalizedLibraryOptions, |
| 15 | + PackageJsonData, |
| 16 | + SingleBuildState, |
| 17 | +} from '../types'; |
11 | 18 | import { |
12 | | - type NormalizedEntryPoint, |
13 | 19 | getEntryPointBundleName, |
14 | 20 | haveEntryPointsChanged, |
15 | 21 | normalizeEntryPoints, |
@@ -349,19 +355,20 @@ describe('entry-points pipeline', () => { |
349 | 355 | entryPoints: initialEntryPoints, |
350 | 356 | projectRoot, |
351 | 357 | packageName, |
352 | | - }; |
| 358 | + } as unknown as NormalizedLibraryOptions; |
353 | 359 |
|
354 | 360 | const buildState = { |
355 | | - previousBundleResults: new Map<string, unknown>([ |
356 | | - ['.', { result: 'primary' }], |
357 | | - ['old-feature', { result: 'old' }], |
| 361 | + previousBundleResults: new Map<string, BundleResult>([ |
| 362 | + ['.', { esmModuleIds: new Set(), dtsModuleIds: new Set() }], |
| 363 | + ['old-feature', { esmModuleIds: new Set(), dtsModuleIds: new Set() }], |
358 | 364 | ]), |
359 | 365 | hasEntryPointsChanges: false, |
360 | | - }; |
| 366 | + } as unknown as SingleBuildState; |
361 | 367 |
|
362 | 368 | const allWatchedFiles = new Set<string>(); |
363 | 369 |
|
364 | | - const newPackageJson = { |
| 370 | + const newPackageJson: PackageJsonData = { |
| 371 | + name: packageName, |
365 | 372 | exports: { |
366 | 373 | '.': './src/public-api.ts', |
367 | 374 | './new-feature': './new-feature/src/public-api.ts', |
@@ -402,19 +409,20 @@ describe('entry-points pipeline', () => { |
402 | 409 | entryPoints: initialEntryPoints, |
403 | 410 | projectRoot, |
404 | 411 | packageName, |
405 | | - }; |
| 412 | + } as unknown as NormalizedLibraryOptions; |
406 | 413 |
|
407 | 414 | const buildState = { |
408 | | - previousBundleResults: new Map<string, unknown>([ |
409 | | - ['.', { result: 'primary' }], |
410 | | - ['feature', { result: 'feature' }], |
| 415 | + previousBundleResults: new Map<string, BundleResult>([ |
| 416 | + ['.', { esmModuleIds: new Set(), dtsModuleIds: new Set() }], |
| 417 | + ['feature', { esmModuleIds: new Set(), dtsModuleIds: new Set() }], |
411 | 418 | ]), |
412 | 419 | hasEntryPointsChanges: false, |
413 | | - }; |
| 420 | + } as unknown as SingleBuildState; |
414 | 421 |
|
415 | 422 | const allWatchedFiles = new Set<string>(); |
416 | 423 |
|
417 | | - const samePackageJson = { |
| 424 | + const samePackageJson: PackageJsonData = { |
| 425 | + name: packageName, |
418 | 426 | exports: { |
419 | 427 | '.': './src/public-api.ts', |
420 | 428 | './feature': './feature/src/public-api.ts', |
|
0 commit comments