Skip to content

Commit

Permalink
Merge pull request #91 from AthennaIO/develop
Browse files Browse the repository at this point in the history
Resolve with query params
  • Loading branch information
jlenon7 authored Oct 4, 2023
2 parents 1586a6b + 815024a commit 353e248
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body:
attributes:
value: |
## Ask for help through appropriate channels
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord](https://discord.gg/mZyBkA936X) before posting a bug report. The issue tracker is not a help forum.
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord](https://discord.gg/JdEbBAKw6X) before posting a bug report. The issue tracker is not a help forum.
- type: markdown
attributes:
value: |
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
For anything else, such as questions or getting help, please see:
- [The Athenna help page](https://athenna.io/help)
- [Our `#help` channel in Discord](https://discord.gg/j6FKKQQrW9)
- [Our `#help` channel in Discord](https://discord.gg/JdEbBAKw6X)
- The [AthennaIO](https://stackoverflow.com/questions/tagged/AthennaIO) tag on [StackOverflow](https://stackoverflow.com/questions/ask)
- type: checkboxes
id: no-post
Expand Down
2 changes: 1 addition & 1 deletion .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/athennaio) or [Discord channel](https://discord.gg/mZyBkA936X) for questions.
Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/athennaio) or [Discord channel](https://discord.gg/JdEbBAKw6X) for questions.

<!-- Love Athenna? Please consider supporting our collective: 👉 https://opencollective.com/athennaio/donate -->
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: npm link @athenna/common

- name: Run tests
run: npm run test:coverage
run: npm run test

- name: Test code compilation
run: npm run build
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/common",
"version": "4.17.0",
"version": "4.17.1",
"description": "The Athenna common helpers to use in any Node.js ESM project.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
13 changes: 11 additions & 2 deletions src/helpers/Module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,17 @@ export class Module {
queries
)

// `await` is not needed for `import.meta.resolve` method, but TypeScript complains on it.
return Module.get(import(await import.meta.resolve(path, meta)))
// `await` is not needed for `import.meta.resolve` method,
// but TypeScript complains on it.
let resolvedPath = await import.meta.resolve(path, meta)

debug('resolved path: %s', resolvedPath)

if (queries) {
resolvedPath = resolvedPath.concat('?', queries)
}

return Module.get(import(resolvedPath))
}

/**
Expand Down

0 comments on commit 353e248

Please sign in to comment.