File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed
Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change 11import { readFileSync , readdirSync } from 'fs'
2- import packageJson from '../package.json'
32
43export interface ExpectedBuildOutput {
54 buildDir : string
@@ -29,9 +28,3 @@ export function validateBuildFiles(expectedBuildOutput: ExpectedBuildOutput) {
2928 }
3029 }
3130}
32-
33- export function validatePackageExports ( expectedBuildOutput : ExpectedBuildOutput ) {
34- if ( ! packageJson . files . includes ( expectedBuildOutput . buildDir ) ) {
35- throw Error ( `package.json does not included the expected build output directory: ${ expectedBuildOutput . buildDir } in "files"` )
36- }
37- }
Original file line number Diff line number Diff line change 22
33import { defineConfig , Options } from 'tsup'
44import { prependDirective } from './scripts/prependDirectivePlugin.ts'
5- import { ExpectedBuildOutput , validateBuildFiles , validatePackageExports } from './scripts/validateBuild.ts'
5+ import { ExpectedBuildOutput , validateBuildFiles } from './scripts/validateBuild.ts'
66
77// Get any environment variables passed to tsup and make them
88// available here.
@@ -82,6 +82,5 @@ process.on('beforeExit', (code) => {
8282 }
8383 console . log ( '[POST-BUILD] Validating build files...' )
8484 validateBuildFiles ( expectedBuildOutput )
85- validatePackageExports ( expectedBuildOutput )
8685 console . log ( '[POST-BUILD] Validation successful! Build complete.' )
8786} )
You can’t perform that action at this time.
0 commit comments