A translator accidentally used a new line character in the translated
string and that broke JS code we generate in Twig helper function.
We don't want to support new lines in translated strings so as a fix
we just remove those characters to prevent the error in case it happens again.
[MAILPOET-4153]
When one needs to ignore promise result (for instance in a useEffect React hook), the
"@typescript-eslint/no-floating-promises" will enforce it's ignored using "void doSomething()"
but the "no-void" rule disables that. It's probably better to keep "no-floating-promises" so
that we mark ignored promise results explicitly with "void".
[MAILPOET-4135]
This is very simple implementation of query-like and mutation-like REST API
calling hooks using the native fetch() function. We'll probably replace it
with a more robust existing library later on, ideally one that implements the
stale-while-revalidate mechanism, such as SWR by Vercel.
[MAILPOET-4135]
We don't have any hooks for feature activation (yet) so this seems to
be the most handy place to create the database schema at the moment.
[MAILPOET-4135]
This is a simple service used only for prototyping that will allow us
to simply change and recreate database schemas. Eventually, we'll need
to replace it with database migration logic.
[MAILPOET-4135]
This means the exception need to have string error code, HTTP status code, and a message,
as the WP REST API errors look as foolows:
{"code":"rest_invalid_json","message":"Invalid JSON body passed.","data":{"status":400,"json_error_code":4,"json_error_message":"Syntax error"}}
[MAILPOET-4135]
Each endpoint will be a class that can implement get/post/put/delete methods.
The routes are registered to WP REST API automatically based on the existence
of implemented methods. The endpoint classes are handled standard services and
therefore can leverage full powers of the DI container.
[MAILPOET-4135]
We have turned some checks off for free plugin which need
to be added to the eslint config for the premium plugin
since we are going to use the free plugin's files as type
source for the premium plugin
[MAILPOET-3140]
This fixes the issue we sometimes experience where tsc
finds multiple definitions for React types since several of
dependencies have React or related packages as dependency
[MAILPOET-3140]
- Convert mailpoet_public.js to ts
- Update webpack to use the ts file when replacing
mailpoet.ts with mailpoet_public.ts for public build
[MAILPOET-3140]
- Expose mailpoet and dependencies for premium plugin to use
- Update type definitions for window
- Fix typings
- Get rid of side-effects in mailpoet.js(ts)
[MAILPOET-3140]