Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(run): Allow zip path as first argument #3

Merged
merged 7 commits into from
Jan 23, 2021

Conversation

karfau
Copy link
Owner

@karfau karfau commented Jan 23, 2021

...to allow usage with other zip files.

  • exposed formerly internal methods contentLoader and entriesLoader
    • both of them now use a (zip file) location based in memory cache
  • xmltest.json is now only required as part of getEntries, not when the module is loaded. It's also the only method that uses those entries.
  • tests for run method

to allow usage with other zip files.
- created minimal in memory cache implementation
- `contentLoader` is no longer responsible for storing the value, since it doesn't know the key
- added `entriesLoader.CACHE` so it also impacts reading entries from other zip files.
- `xmltest.json` is now only required as part of `getEntries`, not when the module is loaded. It's also the only method that uses the the entries.
- Extracted and simplified type for `Entries` so it's no longer tied to the keys in `xmltest.json`
when using without file argument. (If run would use `entries`,
we would not be able to update the file with `runex ./xmltest.js > xmltest.json`.)
@karfau karfau marked this pull request as ready for review January 23, 2021 17:11
@karfau karfau merged commit bdaedb5 into master Jan 23, 2021
@karfau karfau deleted the feat/run-with-other-zip-files branch January 23, 2021 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant