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

build(plugin-satp-hermes): dist/lib/knex/knexfile.ts not under rootDir #3709

Open
wants to merge 1 commit into
base: satp-dev
Choose a base branch
from

Conversation

petermetz
Copy link
Contributor

  1. Moved the typescript knex sources into the appropriate directory to match
    the established patterns we use for building the code (./src/main/typescript/)
    This fixed the problem of the bundler not finding the knexfile sources.
  2. Also refactored the runtime require calls of the knex files to be build-time
    import statements instead. This came with the benefit that we no longer require
    the linter to be turned off and also that compile time checks are in effect.
    In the future if we want to go back to importing the knex files dynamically
    we could do so by adding a parameter to the log repository constructor parameter
    object which could be holding the path to a knex file to be included at runtime.
    (though I would only do this if we have no other choice - by default we should
    always thrive to use the compiler and do as much at build time as possible).

Fixes #3708

Signed-off-by: Peter Somogyvari [email protected]

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

1. Moved the typescript knex sources into the appropriate directory to match
the established patterns we use for building the code (./src/main/typescript/)
This fixed the problem of the bundler not finding the knexfile sources.
2. Also refactored the runtime require calls of the knex files to be build-time
import statements instead. This came with the benefit that we no longer require
the linter to be turned off and also that compile time checks are in effect.
In the future if we want to go back to importing the knex files dynamically
we could do so by adding a parameter to the log repository constructor parameter
object which could be holding the path to a knex file to be included at runtime.
(though I would only do this if we have no other choice - by default we should
always thrive to use the compiler and do as much at build time as possible).

Fixes hyperledger-cacti#3708

Signed-off-by: Peter Somogyvari <[email protected]>
@petermetz petermetz requested a review from RafaelAPB as a code owner December 20, 2024 19:04
@LordKubaya
Copy link
Contributor

LGTM

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.

2 participants