v0.2.0
·
5 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Minor Changes
-
#6
a19d7d9Thanks @sapphi-red! - ReplacecreateFreshImporterwith afreshImport(specifier)function and remove thequeryNameoption.freshImport(specifier)imports an entry in a fresh module graph and resolves to{ result, dependencies }. It lazily creates and reuses a single underlying importer (registering the resolution hook once) instead of one per call. On runtimes that provide neitherModule.registerHooksnorModule.register(e.g. non-Node), it returnsundefined, mirroringcreateFreshImporter's oldundefinedreturn.- The tracking query name is now derived internally as
fresh-import-<hash>(a build-time hash of the output), so thequeryNameoption and theFreshImporterOptionstype are gone.
-import { createFreshImporter } from 'fresh-import' -const importer = createFreshImporter() -const { result, dependencies } = await importer.collect(url) +import { freshImport } from 'fresh-import' +const { result, dependencies } = await freshImport(url)