Skip to content

Commit 7b0ead0

Browse files
committed
ignoring packagejson for now
1 parent 066b5a7 commit 7b0ead0

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

scripts/validateBuild.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { readFileSync, readdirSync } from 'fs'
2-
import packageJson from '../package.json'
32

43
export 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-
}

tsup.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { defineConfig, Options } from 'tsup'
44
import { 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
})

0 commit comments

Comments
 (0)