Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 11, 2025

Bumps import-module-string from 2.0.1 to 2.0.3.

Release notes

Sourced from import-module-string's releases.

import-module-string v2.0.3

Adds compileAsFunction Boolean option to wrap the string code content in a function and return that function for lazy execution. This bypasses the need for any data serialization (which means we’re no longer limited to JSON.stringify-friendly data) to control the context of the executed function.

This behavior is import and export friendly (any exported things are returned from the returned function—note that export default is not currently supported here yet)

let { default: callback } = await importFromString(`export const b = 1;`, {
	compileAsFunction: true,
});
let { b } = callback();
// b === 1

You can pass in your own context for global use:

let { default: callback } = await importFromString(`export const b = myVar;`, {
	compileAsFunction: true,
});
let { b } = callback({ myVar: 99 });
// b === 99

import-module-string v2.0.2

  • Reinstate Vitest on CI (and skips Safari on non-macOS)
  • Adds serializeData option callback to override data serialization (default uses JSON.stringify)
  • Adds used property returned from code walker (internals for WebC)

Full Changelog: zachleat/import-module-string@v2.0.1...v2.0.2

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [import-module-string](https://github.com/zachleat/import-module-string) from 2.0.1 to 2.0.3.
- [Release notes](https://github.com/zachleat/import-module-string/releases)
- [Commits](zachleat/import-module-string@v2.0.1...v2.0.3)

---
updated-dependencies:
- dependency-name: import-module-string
  dependency-version: 2.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@zachleat zachleat merged commit 7b116f8 into main Aug 21, 2025
14 checks passed
@zachleat zachleat deleted the dependabot/npm_and_yarn/import-module-string-2.0.3 branch August 21, 2025 14:27
@zachleat zachleat added this to the Eleventy v4.0.0 milestone Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant