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

Async resolver #165

Merged
merged 6 commits into from
Apr 5, 2017
Merged

Async resolver #165

merged 6 commits into from
Apr 5, 2017

Conversation

dlmr
Copy link
Member

@dlmr dlmr commented Apr 3, 2017

  • Adds async resolver
  • Changed the API for the resolver
    • Takes an option object as the third argument
    • Possible to provide a custom resolver that should be used
  • Solved a bug where some characters in directory names could cause problems

This change is a breaking change for direct consumers of the resolver that used the third argument to enable fallback. This does not affect projects generally but rather some extensions.

dlmr added 4 commits April 3, 2017 10:03
- Third argument changed to an optional option object
- The option object supports defining a custom resolver
- Custom resolvers will get an additional argument, the identifier
This solves a bug that would cause issues if the folder name contained
RegExp characters.
const log = require('debug')('roc:core:require'); // eslint-disable-line

const contextCache = {};
const pattern = /^([^\/]*)\/?([^\/]*)/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better name for a variable would be information what this pattern is looking for?

@dlmr dlmr merged commit 28fda75 into master Apr 5, 2017
@dlmr dlmr deleted the feat/async-resolver branch April 5, 2017 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants