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

Resolve with query params #91

Merged
merged 3 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading