/
githubmirror
/
react-hook-form
Обзор
Документация
Войти
/
githubmirror
/
react-hook-form
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
scripts/rollup/assert-cjs-exports.cjs
21 строка
616 B
Eric Chen
🧿 chore: improve ESLint configuration and Windows compatibility (#13155)
07 дек 2025, 03:50
Не верифицирован
07 дек 2025, 03:50
adfcaaa
Код
Авторство
О чём код?
/** * This file, when executed in the postbuild lifecycle, ensures that * the CJS output is valid CJS according to the package.json spec. * * @see https://nodejs.org/docs/latest/api/packages.html#packages_determining_module_system */ const exported = require('react-hook-form'); const assert = require('assert'); const fs = require('fs'); /** * When this fails, fine the update one-liner in ./assert-esm-exports.mjs */ const expected = JSON.parse( fs.readFileSync( require('path').resolve(__dirname, './all-exports.json'), 'utf-8', ), ); assert.deepStrictEqual(Object.keys(exported), expected);