@openfin/node-adapter
npm package replaces openfin-adapter
package
14-Sep-2023
Here™ is updating its @openfin/core
and openfin-adapter
packages to simplify their usage contracts and improve the developer experience for our package consumers.
This initiative is being driven by significant improvements in our Here Core type system, released in Here Core 30. In Here Core 30.110.74.8 (and its corresponding packages), we released improvements to ensure more accuracy, robustness and semantic types.
Here™ is leveraging this opportunity to pair these improvements in our types with improvements in the way they are exposed and consumed in our public NPM packages.
When are these changes effective?
As of the publication of this notice, these changes are now in effect.
Who is most likely to be impacted by this change?
Consumers of the openfin-adapter
npm package.
This package will remain available but will no longer receive further updates.
We leverage @openfin/core
package today. What can be expected going forward?
@openfin/core
The @openfin/core
package's structure now provides a single entry file format.
This means that there is a single JavaScript file included in the package, as opposed to the previous package structure, in which files are broken up into many common JS modules.
These changes allow for an improved API and type discoverability via code suggestion and type inspection, a reduction in the dependency size, and a clearer, more dependable usage contract for package consumers.
Impact to consumers of @openfin/core
Explicit imports from arbitrary files within the module directory ("@openfin/core/*"
) are no longer supported in new versions of @openfin/core
. For example:
import { fin } from '@openfin/core/src/mock'; // no longer supported
However, until further notice, older versions of the @openfin/core
package are future-proof with newer versions of the Here Core Runtime.
Package consumers using the default entry point, as instructed in the usage guide, are unaffected by this change:
import OpenFin, { fin } from '@openfin/core'; // supported in old and newer versions
All current exports exposed via the @openfin/core
main entry point are unaffected.
openfin-adapter
In order to clarify usage and improve discoverability, the openfin-adapter
package is being replaced with the @openfin/node-adapter
and @openfin/core
packages.
Customers who consume the openfin-adapter
package solely for the types should move over to the new @openfin/core
package instead.
The openfin-adapter
package is still compatible with newer Here Core Runtime versions; however it will no longer receive further updates.
Both @openfin/node-adapter
and @openfin/core
have a single entry point. This means that all the functionality supported by this library will be easier to discover via code suggestion and type inspection.
Please note that arbitrary imports from within the included src
folder are not supported in the replacement packages.
These single entry points improve discoverability and protect consumers of the package from internal changes to the structure of the package.
Migration Guides
If you use openfin-adapter
to connect to Here Core from a node.js or node-like environment, use @openfin/node-adapter
instead. Please review the migration guide.
If you use openfin-adapter
to get a type for the fin
object, use @openfin/core
instead.