romcal: Maintenance and bug fixes for new Typescript codebase
Shalom @emagnier and @tukusejssirs!
Here’s a list of issues that I suggest we look into (in no particular order) before the _F-TypeScript branch is merged to dev:
- Revise locale management to make it behave as here in
master. Keep output messages in the console but downgrade error messages to warnings. - Revise variable names (especially type declarations) to be more consistent and meaningful
- Add more
tsdoccompliant comments to code to improve quality of API documentation - Fix known issues with TS code as described here
- Cleanup folder structure and file naming conventions
- Cleanup
README.md - Cleanup of
romcalconsumer facing response (#180). - Consistency of configuration options (#163)
Suggestions to make this list achievable and this issue “close-able” in a reasonable amount of time:
- Let’s keep the list concise and targeted mostly to bug fixes.
- If there’s a need for new features to be listed here, they should be for better usability of existing features (i.e. #180). New functionality and features should be done at another time.
- Lets keep this issue list short and sweet and link to extended discussion in other issues.
Considerations:
- I started transforming some of the comments in the codebase to be
tsdoccompliant. However, it is far from completion. Bettertsdoccompliant comments in our code = better API documentation for our consumers.
Let me know your thoughts!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (10 by maintainers)
Commits related to this issue
- task: update docs + lightens and simplifies the main README.ts — committed to romcal/romcal by emagnier 6 years ago
Hello @pejulian, I’m reply to your message written here https://github.com/romcal/romcal/pull/189#issuecomment-620936919.
I also agree for an interim release of the TS work, at least into the dev branch for a first step. After that we could reevaluate the way to a master release. And I agree with you to focus on critical bugs. This should also include the build system, so everyone can work, contribute and also debug the codebase for all their needs.
I wanted to give more time to contribute to this, especially the build, but I’m still very busy on other projects currently. However, as I needed romcal’s new features quickly for my projects, I was able to implement most of them on a private fork (but still sticked on JS). This gave me the possibility to test and challenge quickly their use cases for real needs. I would like to port them progressively to TS on this repo, especially as I now use almost exclusively TS for all my web projects.
Thank you @pejulian for your message. It’s same here in Paris, almost everything is suspended, and we are just at the beginning of all of that in Europe. Thanks to you two for your prayers, let’s stay together in prayer fellowship.
And also thank you for your time on the build system for romcal and all the TS improvement. No worry for your silence, we are all well busy. I didn’t had yet luck to invest more time on it, and learn more about tsconfig and webpack for both browser and Node usages, so all your hard work is precious. I’m following with a great interest all the moves on the TS branch!
@pejulian, same here in Slovakia (no Masses at least for two weeks). I pray for you @romcal/romcal-contributors, two!
Hi @emagnier
Pardon my silence for the past few days.
I had a bit of a learning curve with getting
tsconfigpath aliases to work with webpack, jest and finally the typings output indist. It was indeed a struggle but it was not in vain. Finally, with the appropriate tooling, I believe I have a workable solution for us all. Now, we should be able to import and use constructs fromromcalas needed. Note however that the import syntax is slightly different.In the main entry point, I have made one default export called
Romcalfollowed by a ton of other named exports for advanced usage.Romcalremains the main entry point class, containing the 2 main static methodscalendarForandqueryForthat returns the standard output of the library. Therefore, a possible usage scenario in a consuming ES6 or TS application could look something like this:I tested this out on a typescript react application that I am working on now (
romcal-app). I was able to import the functions I needed and get typings and tsdoc metadata for them.npm install romcal@canaryto give it a go and let me know your thoughts.PS:- I pray that you, @tukusejssirs and everyone else who’s been a part of
romcalis taking good care of yourselves in light of the corona virus outbreak in Europe. It’s also a big concern here in Malaysia where I am. Masses and other gatherings in all archdioceses have been temporarily suspended until the situation improves. Let us keep each other in prayer in these troubling times.It’s now possible to get multiple optional memories falling on a specific day (in addition to the feria). Support for that has been added in #162 (and the original issue: #12).
@tukusejssirs yes I know this project. It’s another good one, with a different approach and technologies 👍
I don’t know why you say it seems to be unmaintained, since it seems maintained to me. Also, note that the project that you linked to mostly just provides an API for the functionality of this project by the same author.
FYI I’ve added a few commits to the TS branch.
node romcal-debug.ts -r ts-node/register -r tsconfig-paths/register, or directly from an IDE like WebStorm or VSCode.lodash-esmodules. This was causing some issues when running and debugging the source code without webpack. For the time being we are back to the traditionallodashdependency. The frontend library generated by webpack has now ~200KiB more, so we should pay some attention again on the lodash library and find a solution for all cases.tsconfig.jsonin 2 files. The defaulttsconfig.jsoncontain the settings to run or debug the codebase. IDEs or tools like ts-node generally lean on the defaulttsconfig.json. Then I created atsconfig.build.jsonthat inherit from the default one, for all webpack tasks. There are still 2 other existing tsconfig, one for jest and another one for webpack, we may try to include them in the 2 others, to not have too many config files.@and/chars) easiest to read, and be closest to the codebase structure. Let me know if it bothers you.DateItemobject toRomcalDateItem, so when playing with theRomcalDateItemobjects outside the romcal codebase, this object remain identified to romcal.And more to come, hopefully soon.
Hi @emagnier,
After running further tests on my machine, I realised that only the
defaultexport ofromcal, which is namedRomcalis “import”-able by the end user. When importing some other construct (i.e.Seasons), the typings to source doesn’t work correctly therefore resulting in the errors you see. I am guessing this has something to do with the combination of settings I used intsconfig.jsonand webpack itself. I will look into the issue and see how it can be fixed.@tukusejssirs: There is some good ideas and most of them are already exposed in different issues. But here it’s about releasing the TS branch, or eventually review the usage of existing features. Not about adding new features (we will not do everything in one release). So we should try to stay on the scope of this topic. Otherwise it will be hard to keep track on things and keep the issue tracker organised.
Regarding the documentation, what do you think to use
.mdfiles in the codebase, instead of the wiki. Indeed, thereadme.mdshould be lightened and give only concise information. But having the rest of the documentation (in a/doc/**/*.md) would allow having versioning on the documentation (to be able to get the documentation for a specific romcal version). In addition,.mdfiles will be easy to wrap up in a future romcal website that could include the documentation.However wiki could still be a first step to help us writing and organise all the documentation.
On the
README.mdand the docs: #61 and #57.Added to the list! 😄
The suggestion definitely has merit, but I’d vote to implement it as a new feature in a future milestone as there is some technical impact to the how stuff works now.
Indeed, you are right:- we should move all the lengthy details to the Wiki and leave only important information in the main
README.mdfile. I’ve renamed the item in the list to “CleanupREADME.md” instead.Yes, there are breaking changes on the way:- a major release definitely makes more sense. My mistake, I’ll reassign the milestone.
Is there an issue you could link me to for more information about this?