Use Node 16 module resolution
Types of changes
- [x] Chore (a non-breaking change which is related to package maintenance)
- [x] Bug fix (a non-breaking change which fixes an issue)
- [ ] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
What I changed:
- Changed
tsconfig.jsontarget, package, etc fields to appropriate values for Node 16 as per the official documentation. - Updated import statements to include explicit
.jsextension where appropriate. This also means no more implicit index.js imports. :horse: - Added
causeproperty declaration toNotFoundErrorand changed the constructor code a little to make TypeScript happy. This part is slightly annoying, because Node 16 is ES2021 according to the above docs, but it also hasError.causeand the two argument Error constructor from ES2022 since v16.9.0. TypeScript doesn't account for that, so I had to smack it with a wrench to get it working.
As for why—"node" for tsconfig's module and moduleResolution is deprecated in favor of "node16". Akte is currently incompatible with projects that use that setting. This PR fixes that, and you'll now get type errors if you try to use language features that aren't supported on Node 16 as an added bonus.
Checklist:
- [ ] My change requires an update to the official documentation.
- [x] All TSDoc comments are up-to-date and new ones have been added where necessary.
- [x] All new and existing tests are passing.
Deploy Preview for akte ready!
| Name | Link |
|---|---|
| Latest commit | d45280100cd5cfb4d1be11e6d348f40ffd1b2698 |
| Latest deploy log | https://app.netlify.com/sites/akte/deploys/66ccc29d9d854200085704e5 |
| Deploy Preview | https://deploy-preview-1--akte.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Hi Astrid, thanks a lot for your time opening this PR, and sorry for the over-a-year ghosting.
I don't think it's worth publishing a new version of Akte, and I think the project might die as I don't have the time/interest in maintaining it anymore (mainly because Nuxt caught up in performance a lot since I first released Akte, and I also believe I'm the only user of Akte(?))
Let me know if you think I should reconsider, in the meantime I'll close this PR 🙏