Skip to content

Releases: sapphi-red/fresh-import

v0.2.1

12 Jun 06:15
Immutable release. Only release title and notes can be modified.
fbbf467

Choose a tag to compare

Patch Changes

  • #8 113bdb8 Thanks @sapphi-red! - Derive the tracking query name from a per-instance random value (fresh-import-<instance>). Previously two copies of the same build loaded into one process (e.g. Vite bundles fresh-import while another package uses a separately bundled copy) registered the same query name, so only the first-registered hook captured the imports. A random value unique to each loaded module instance keeps their hooks distinct. This replaces the build-time hash, which could not disambiguate two instances of the same build.

v0.2.0

12 Jun 05:48
Immutable release. Only release title and notes can be modified.
7f2c0e7

Choose a tag to compare

Minor Changes

  • #6 a19d7d9 Thanks @sapphi-red! - Replace createFreshImporter with a freshImport(specifier) function and remove the queryName option.

    • 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 neither Module.registerHooks nor Module.register (e.g. non-Node), it returns undefined, mirroring createFreshImporter's old undefined return.
    • The tracking query name is now derived internally as fresh-import-<hash> (a build-time hash of the output), so the queryName option and the FreshImporterOptions type 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)

v0.1.0

11 Jun 08:24
Immutable release. Only release title and notes can be modified.
1ec1658

Choose a tag to compare

Minor Changes

Patch Changes

v0.0.2

04 Jun 10:36
ddb7e28

Choose a tag to compare

Patch Changes

  • 1647ecc: setup trusted publishing