Back to Explore

floatdrop/require-from-string

GitHub
1 watchersOpen source

Last release:

require-from-string is a Node utility that loads a module from a JavaScript code string using `requireFromString(code, [filename], [options])`. It is useful for dynamically evaluating module code from text, with options to prepend or append extra module search paths (appendPaths and prependPaths).

Project status

  • Maintenance status: Appears dormant/in maintenance mode. The upstream is marked archived, and the last upstream push was 2018-04-09 (over 8 years ago as of 2026-06-09).
  • Update cadence: Updates are clustered in 2015 to 2018, with no evidenced updates after 2018-04 (earlier patch activity in 2017-09, then a final known update in 2018-04).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v2.0.2

    Release v2.0.2 contains a very small change set. The only runtime modification adds a safety check around accessing `parent.children`, and the README text is corrected.

  • v2.0.1

    Release v2.0.1 makes a small internal change to the module cleanup logic in index.js and bumps the package version. There are no release notes provided for this version, so the behavioral impact of the code change is not documented.

  • v2.0.0

    Release v2.0.0 was published, but no release notes were provided by the publisher. As a result, there is no documented information about new features, bug fixes, security updates, or potential breaking changes.

  • v1.2.1

    Release v1.2.1 contains no publisher-provided release notes. The code diff shows a very small internal change in index.js (how the Node Module constructor is obtained) plus a package.json version bump.

  • v1.2.0

    v1.2.0 makes the optional filename argument behave more predictably by normalizing a missing filename to an empty string. It also updates the test suite to assert a more consistent error stack trace when requiring code from a string without providing a filename.

  • v1.1.0

    This release introduces an options parameter to `requireFromString` to allow callers to customize Node module resolution paths. It also updates tests and the README to document the new `prependPaths` and `appendPaths` behavior. No release notes were provided by the publisher, so the behavioral changes are not explicitly communicated there.

    Features
  • v1.0.2

    v1.0.2 makes a small internal change to how the generated Module instance is constructed when compiling code from a string. There are also test/fixture adjustments that indicate the module parent relationship and exported value expectations changed under the hood.

    Breaking
  • v1.0.1

    v1.0.1 updates the core require-from-string implementation and adds a test suite. The main functional change is that module compilation and dependency resolution are now tied to a provided filename (via dirname-based module search paths). Release notes were not provided for this version.

    Features
  • v1.0.0

    Release v1.0.0 was published on 2015-07-18, but no release notes were provided by the publisher. As a result, this release cannot be reliably analyzed for specific new features, breaking changes, bug fixes, security updates, or migration steps.