You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the main openmct project converted to an ES module nasa/openmct#7330 we tested how an upstream sourcing project would function when sourcing this change.
We found that there was no impact to sourcing repo's functionality and assumed that each repo that treated openmct-as-a-depenency would elect to "opt in" to using the esmodule.
After the ESmodule change was made, the tests from openmct-yamcs/e2e started to fail. The tests were converted to using ESModule imports instead of CJS. The simplest approach was to convert the entire package (openmct-yamcs#file:package.json#type:module) to a module. When this change was made, our upstream project failed to compile.
This import statement:
importinstallYamcsPluginfrom'openmct-yamcs';
Produced this error:
WARNING in ./src/index.js 32:16-34
export'default' (imported as 'installYamcsPlugin') was not found in'openmct-yamcs' (module has no exports)
We found that the openmct-yamcs module needed to be imported in a different way.
unlikelyzero
changed the title
[Packaging] Convert openmct-yamcs to an ESmodule
[Packaging] Update openmct and openmct-yamcs to have a default export as an ESmodule
Jan 25, 2024
When the main openmct project converted to an ES module nasa/openmct#7330 we tested how an upstream sourcing project would function when sourcing this change.
We found that there was no impact to sourcing repo's functionality and assumed that each repo that treated openmct-as-a-depenency would elect to "opt in" to using the esmodule.
After the ESmodule change was made, the tests from openmct-yamcs/e2e started to fail. The tests were converted to using ESModule imports instead of CJS. The simplest approach was to convert the entire package (openmct-yamcs#file:package.json#type:module) to a module. When this change was made, our upstream project failed to compile.
This import statement:
Produced this error:
We found that the openmct-yamcs module needed to be imported in a different way.
This is what we ended up with:
On the upstream sourcing project, we made the following changes that "work". These are not necessarily desirable.
This all "works", but doesn't get us where we want to be. We want to be able to simply import yamcs as:
The text was updated successfully, but these errors were encountered: