const TransformCache = require('./transform-cache')const generateSnapshotScript = require('./generate-snapshot-script')module.exports = async function (options) {const cacheInvalidationKey = options.shouldExcludeModule.toString() + require('../package.json').versionconst cache = new TransformCache(options.cachePath, cacheInvalidationKey)await cache.loadOrCreate()delete options.cachePathconst result = await generateSnapshotScript(cache, options)await cache.dispose()return result}