Engineering's Log

--L❤☮🤚

Update D.12

2022.03.24

We received good news from the Microsoft Edge Extension team that their publish API is now in beta available: link.

Following a brief discussion with the edge team, we immediately get to work on a nodejs module to abstract away the API calls. 8 hours later, we released our new open source package Edge Webstore Upload module, with the code available to audit here under MIT License.

Our initial process to deliver this module is as follow:

While mirroring, we also upgrade the dependencies on both project to latest. As we refine our build setup, we found that ES interop via a final bundling in BMS is achievable. Thus, we converted cwu and ewu to target just ESM.

Above concludes our setup phase. We now start our exploration with the edge publish API. At Plasmo, we love ourselves a quick, iterative, feedback-driven, explorative programming session. The basic idea is that there is an evaluator that continuously run our code as we press ctrl+s. For this, our evaluator is the unit test runner (jest).

Since the API gives example in curl, we used this curl to fetch tool to convert the calls, and then convert it to got api manually. Once the API usage is clear, we start moving our test code into our library module's class method, and refactor the unit test to be more modular for each API call. We then study the response type and the error returned by the API, and compose them into typescript types. We then exports everything so that other library can consume our code.

Since the edge API is very straight forward, there was not many challenge we faced while working on our node API. There were two annoying issues:

  1. Creating the test zip file
  2. ESM + jest + TypeScript

We found quick workaround for the above, but maybe future tooling improvement will make it easier.


Update C.11

2022.03.25

For annoying issue #1, we have added a new sub command to our internal tool mb called test-zip, which creates a new test.zip chrome extension file that can be quicky used for our future test modules. It only generate chrome extension at the moment, but maybe we can add another params for firefox addons, as well as safari?


Update B.10

Captain's Log released: link


Update A.9

The Microsoft Edge Extension publish API is now publicly available: link.

${plasmo:universe}/U64eCftcNBXxHZRu3

Back to Engineering Quarter