Skip to content

Commit

Permalink
remove cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
kirahsapong committed Mar 29, 2024
1 parent e221206 commit 7716e0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/protocol/build/compile-validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ const moduleCode = replaceRequireWithImport(generatedCode)
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))

await mkdirp(path.join(__dirname, '../generated'))
fs.writeFileSync(path.join(__dirname, '../generated/compiled-validators.cjs'), moduleCode)
fs.writeFileSync(path.join(__dirname, '../generated/compiled-validators.js'), moduleCode)
2 changes: 1 addition & 1 deletion packages/protocol/src/validator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ErrorObject } from 'ajv'
// validator functions are compiled at build time. check ./build/compile-validators.js for more details
import * as compiledValidators from '../generated/compiled-validators.cjs'
import * as compiledValidators from '../generated/compiled-validators.js'

/**
* validates the payload against a json schema identified by name
Expand Down

0 comments on commit 7716e0a

Please sign in to comment.